| Author |
Message |
brokenman
Joined: 20 Oct 2011 Posts: 15
|
Posted: 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
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 2533 Location: Ontario
|
Posted: 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
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 2533 Location: Ontario
|
Posted: 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.
_________________________________________________
| Description |
Decompress to obtain script
|

Download |
| Filename |
demo_script.tar.gz |
| Filesize |
662 Bytes |
| Downloaded |
247 Time(s) |
|
|
Back to top
|
|
 |
glene77is

Joined: 17 Aug 2010 Posts: 108 Location: Memphis, TN, USA
|
Posted: 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.
glene77is
_________________ Puppy Linux is more fun than a barrel of M$ monkeys
glene77is --- {^,^} --- electricity is shocking, Memphis, TN, USA.
|
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 2533 Location: Ontario
|
Posted: Sat 26 May 2012, 13:13 Post subject:
|
|
Porteus is getting behind the gtkdialog bandwagen
http://forum.porteus.org/viewtopic.php?f=94&t=1132
Some examples
http://puppy2.org/slaxer/Porteus/Gtkdialog_Examples_color.html
_________________________________________________________
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3845
|
Posted: Sat 26 May 2012, 18:17 Post subject:
|
|
did bigbass jump ship?
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 2533 Location: Ontario
|
Posted: 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.
| Description |
|

Download |
| Filename |
compression-demo.tar.gz |
| Filesize |
1.32 KB |
| Downloaded |
203 Time(s) |
Last edited by don570 on Sat 09 Jun 2012, 15:19; edited 1 time in total
|
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 2533 Location: Ontario
|
Posted: 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...
___________________________________________________
| Description |
two scripts to demonstrate calulating time
|

Download |
| Filename |
Gtkdialog-demos.tar.gz |
| Filesize |
1.85 KB |
| Downloaded |
195 Time(s) |
|
|
Back to top
|
|
 |
postfs1

Joined: 27 Mar 2010 Posts: 831
|
Posted: 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
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 2533 Location: Ontario
|
Posted: 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
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 5295 Location: Valåmoen, Norway
|
Posted: 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
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 2533 Location: Ontario
|
Posted: 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
_________________________________
|
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 5295 Location: Valåmoen, Norway
|
Posted: Thu 21 Jun 2012, 11:44 Post subject:
|
|
| don570 wrote: | | No I thought you tested it. |
_________________ Stardust resources
|
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 7037 Location: qld
|
Posted: 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
|
_________________ keep the faith .. 
|
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6200 Location: Auckland, New Zealand
|
Posted: 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
|
|
 |
|