Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 01 Sep 2014, 19:51
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
GtkDialog - tips
Post new topic   Reply to topic View previous topic :: View next topic
Page 46 of 64 [949 Posts]   Goto page: Previous 1, 2, 3, ..., 44, 45, 46, 47, 48, ..., 62, 63, 64 Next
Author Message
brokenman

Joined: 20 Oct 2011
Posts: 25

PostPosted: Thu 15 Mar 2012, 21:00    Post subject:  

Quote:
find a file on your system something like /root/.config/gtk-2.0/gtkfilechooser.ini
In it there is a setting `ShowHidden=false`. Change it to true.


Yes. That's what i was looking for. Thanks very much. I didn't even realize a config file was created!
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 3261
Location: Ontario

PostPosted: Sat 05 May 2012, 12:33    Post subject: page full of script examples  

There's a single page full of script examples for beginners.
A very convenient resource. HERE

and the user manual is HERE


and stock icons are listed HERE



___________________________________________________
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 3261
Location: Ontario

PostPosted: Sat 12 May 2012, 15:47    Post subject: press the Enter key  

To explain how it is possible to press the Enter key to
input the data to your program I have written a little script.

Just look at the script and run it and you will
understand the method that Zigbert explains on the first page.

Decompress to obtain script.
_________________________________________________
demo_script.tar.gz
Description  Decompress to obtain script
gz

 Download 
Filename  demo_script.tar.gz 
Filesize  662 Bytes 
Downloaded  359 Time(s) 
Back to top
View user's profile Send private message 
glene77is


Joined: 17 Aug 2010
Posts: 112
Location: Memphis, TN, USA

PostPosted: Tue 22 May 2012, 09:36    Post subject:  

Don 570,
Thanks for the demo script.
Just what I needed to begin with.
Resolved some myterious syntax that was killing my efforts.
Thanks. Very Happy
glene77is

_________________
Puppy Linux is more fun than a barrel of M$ monkeys Razz
glene77is --- {^,^} --- electricity is shocking, Memphis, TN, USA.
Back to top
View user's profile Send private message Visit poster's website 
don570


Joined: 10 Mar 2010
Posts: 3261
Location: Ontario

PostPosted: Sat 26 May 2012, 13:13    Post subject:  

Porteus is getting behind the gtkdialog bandwagen Laughing

http://forum.porteus.org/viewtopic.php?f=94&t=1132

Some examples
http://puppy2.org/slaxer/Porteus/Gtkdialog_Examples_color.html

_________________________________________________________
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4348

PostPosted: Sat 26 May 2012, 18:17    Post subject:  

did bigbass jump ship?
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 3261
Location: Ontario

PostPosted: Tue 05 Jun 2012, 20:06    Post subject:  

To show the selection of a folder by the two possible
methods Xdialog or gtkdialog. Compare each method
and decide which is best.

I wrote a simple script to compress a folder that the user selects.

The big difference is that Xdialog adds a slash at end of path.

compression-demo.tar.gz
Description 
gz

 Download 
Filename  compression-demo.tar.gz 
Filesize  1.32 KB 
Downloaded  301 Time(s) 

Last edited by don570 on Sat 09 Jun 2012, 15:19; edited 1 time in total
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 3261
Location: Ontario

PostPosted: Sat 09 Jun 2012, 15:18    Post subject:  

I wanted to show how it is possible to choose a folder and
enter data in another field at the same time.

To see the final application I created go HERE

Using the most recent version of gtkdialog this is possible
(See image) When the folder is choosen the time
to compress is calculated (using a simple estimate based on size)
and then displayed in box underneath.

Compare this with the old method where a
refresh button had to be clicked to make a calculation.

I've included two scripts to show the two methods.
Re quires the most recent version of gtkdialog


refresh button version...



___________________________________________________
Gtkdialog-demos.tar.gz
Description  two scripts to demonstrate calulating time
gz

 Download 
Filename  Gtkdialog-demos.tar.gz 
Filesize  1.85 KB 
Downloaded  291 Time(s) 
Back to top
View user's profile Send private message 
postfs1


Joined: 27 Mar 2010
Posts: 831

PostPosted: Sat 16 Jun 2012, 16:51    Post subject:  

zigbert wrote:

...
'mpg321 /dir/file' to play a audio-file.
If you use 'ffmpeg -i "/dir/file" -f au - | aplay -D plughw' it will play mp3, ogg, wma, flac, wav, ... without including more dependencies.
...


I tried -a 0:0, then -a :hw, then -a 'hw:0,0', then -a 0:hw:0, but now, i know the right word!
Finally, i've found the solution! Thanks!

-=Quirky Linux -1.40=-
mpg321 -a :plughw -o alsa /folder/file.mp3

OR:

mpg321 -a 0,0:plughw -o alsa /folder/file.mp3

To share sound card which has no hardware sound mixing:

aoss mpg321 -o alsa /folder/file.mp3

_________________
  • I don't know why laboratories are named a hospitals.
  • The alive personage is like a tea bag with granules of unknown density inside, at that one the packet was made of organic material and was placed in the evaporated liquid or liquid.

Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 3261
Location: Ontario

PostPosted: Mon 18 Jun 2012, 17:18    Post subject:  

To Zigbert

On the first page -----> scrolling text example

Is this line correct? Just one quote sign?

Code:
  while : ; do echo -e "x\n 100; sleep 0.5; done


_______________________________________________
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5698
Location: Valåmoen, Norway

PostPosted: Wed 20 Jun 2012, 06:42    Post subject:  

don570 wrote:
To Zigbert

On the first page -----> scrolling text example

Is this line correct? Just one quote sign?

Code:
  while : ; do echo -e "x\n 100; sleep 0.5; done


_______________________________________________

I guess it should be
Code:
  while : ; do echo -e "x\n 100"; sleep 0.5; done
Have you tested it?
_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
don570


Joined: 10 Mar 2010
Posts: 3261
Location: Ontario

PostPosted: Wed 20 Jun 2012, 19:36    Post subject:  

Quote:
Have you tested it?


No I thought you tested it.

It's a bit too complicated for me Crying or Very sad

_________________________________
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5698
Location: Valåmoen, Norway

PostPosted: Thu 21 Jun 2012, 11:44    Post subject:  

don570 wrote:
No I thought you tested it.
Very Happy
_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
01micko


Joined: 11 Oct 2008
Posts: 7794
Location: qld

PostPosted: Fri 22 Jun 2012, 21:48    Post subject:  

Scrolling text with <text> and <timer> widgets, added theme thrown in..
Code:
#!/bin/sh
# Scrolling text & embedded timer event illustration #2
# using text and timer widgets
FG=$1 BG=$2 MSG=$3
! [ "$1" -a "$2" -a "$3" ] && echo "usage: $0 fg-color bg-color \"string\"" &&\
FG=white BG=black MSG="This is a test... I repeat: This is a test... "

echo 'style "gtkdialog-prog"
{
   bg[NORMAL] = "'"$BG"'"
   fg[NORMAL] = "'"$FG"'"
}
widget "*prog" style "gtkdialog-prog"

class "*" style "gtkdialog-prog"' > /tmp/gtkrc_prog

export GTK2_RC_FILES=/tmp/gtkrc_prog:/root/.gtkrc-2.0

function scrolltext() {
  thestr="${1}"
  echo -en "${thestr:2}${thestr:0:2}"
}

export SCROLLMSG="$MSG"
export -f scrolltext

export GTKBOX='
<window title="Embedded Timer Event #2">
  <vbox width-request="300">
    <text>
      <variable>SCROLLMSG</variable>
      <input>scrolltext "$SCROLLMSG"</input>
    </text>
    <timer interval="1" visible="false">
      <action type="refresh">SCROLLMSG</action>
    </timer> 
  </vbox>
</window>'

gtkdialog4 -p GTKBOX -c
unset GTKBOX

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
disciple

Joined: 20 May 2006
Posts: 6430
Location: Auckland, New Zealand

PostPosted: Fri 22 Jun 2012, 23:25    Post subject:  

A pity it can't refresh more often than once a second...
_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 46 of 64 [949 Posts]   Goto page: Previous 1, 2, 3, ..., 44, 45, 46, 47, 48, ..., 62, 63, 64 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1291s ][ Queries: 13 (0.0418s) ][ GZIP on ]