Gtkdialog Development
- thunor
- Posts: 350
- Joined: Thu 14 Oct 2010, 15:24
- Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
- Contact:
Mick
The gtkdialog-0.8.0 source package is r306 and is for the masses.
You and many people here are checking-out from SVN and you can continue to do that.
I have committed r307 which is a simple version change to 0.8.1 and I did this so that I can reserve even numbers for official source package releases.
[EDIT] I should mention too that the wiki is in the repository and working on that will up the revision. When checking out, if you type "svn log -r n" you'll see the commit message (editing wiki pages through the browser results in a default message containing a line of dashes, otherwise it'll be something I've written).
Regards,
Thunor
The gtkdialog-0.8.0 source package is r306 and is for the masses.
You and many people here are checking-out from SVN and you can continue to do that.
I have committed r307 which is a simple version change to 0.8.1 and I did this so that I can reserve even numbers for official source package releases.
[EDIT] I should mention too that the wiki is in the repository and working on that will up the revision. When checking out, if you type "svn log -r n" you'll see the commit message (editing wiki pages through the browser results in a default message containing a line of dashes, otherwise it'll be something I've written).
Regards,
Thunor
- thunor
- Posts: 350
- Joined: Thu 14 Oct 2010, 15:24
- Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
- Contact:
I'm an application developer now
This might be a top tip: I'm using functions in my script to build the XML and I'm creating a game board of varying sizes. Initially I started with an 8x8 board which took 2.5 seconds to appear and when I increased it to 12x12 it took 10.5 seconds! 15x15 jumped to 24 seconds!!! Obviously I'm not going to put anyone through that experience so I thought I'd investigate why it was taking so long. I found that building the XML in a shell variable was the cause and simply echoing the XML to a file and using "gtkdialog --file=filename" instead results in 8x8 loading in about 1s, 12x12 in 1.25s and 15x15 in 1.75s. It really makes that much difference so I recommend trying it.
Regards,
Thunor
This might be a top tip: I'm using functions in my script to build the XML and I'm creating a game board of varying sizes. Initially I started with an 8x8 board which took 2.5 seconds to appear and when I increased it to 12x12 it took 10.5 seconds! 15x15 jumped to 24 seconds!!! Obviously I'm not going to put anyone through that experience so I thought I'd investigate why it was taking so long. I found that building the XML in a shell variable was the cause and simply echoing the XML to a file and using "gtkdialog --file=filename" instead results in 8x8 loading in about 1s, 12x12 in 1.25s and 15x15 in 1.75s. It really makes that much difference so I recommend trying it.
Regards,
Thunor
Yes Thunor kiss smack and more
Thank's for gtkdialog --file=filename !!!
for 256 img time load responds
Normal: user 0m2.848s
XML version: user 0m0.712s
Download example: http://liveusb.info/tmp/colorchooser.tar.bz2
1° test ./ColorPicKer.sh
2° test ./ColorPicKe-xml.sh
Thank's for gtkdialog --file=filename !!!
for 256 img time load responds
Normal: user 0m2.848s
XML version: user 0m0.712s
Download example: http://liveusb.info/tmp/colorchooser.tar.bz2
1° test ./ColorPicKer.sh
2° test ./ColorPicKe-xml.sh
- thunor
- Posts: 350
- Joined: Thu 14 Oct 2010, 15:24
- Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
- Contact:
Hi frafa
Firstly I had to change ColorPicKe-xml.sh:22 to "gtkdialog --file=ColorPicKe-xml.sh" and then I ran your applications:
PIII 866 MHz
ColorPicKer.sh = 0m25.65s
ColorPicKe-xml.sh = 0m1.07s
That's a nice application You should change
to
and then in generate.sh:63 add name="borderless" to the button tag because you are applying styleBorderless to all GtkButtons (look at Quitter, it has no border).
Regards,
Thunor
Firstly I had to change ColorPicKe-xml.sh:22 to "gtkdialog --file=ColorPicKe-xml.sh" and then I ran your applications:
PIII 866 MHz
ColorPicKer.sh = 0m25.65s
ColorPicKe-xml.sh = 0m1.07s
That's a nice application You should change
Code: Select all
widget "*Button" style "styleBorderless"
Code: Select all
widget "*borderless" style "styleBorderless"
Regards,
Thunor
Last edited by thunor on Fri 30 Sep 2011, 11:46, edited 1 time in total.
- thunor
- Posts: 350
- Joined: Thu 14 Oct 2010, 15:24
- Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
- Contact:
I've since realised that MAXWIDGETS is a limit placed upon a container (vbox, hbox, frame), not the entire project, so you can currently have 529 widgets per container which isn't so bad.thunor wrote:MAXWIDGETS
...when I was working on the widget packing I noticed that the maximum number of widgets Gtkdialog accepted was 256 (16^) so I've increased it to 529 (23^)....
The project limit I've just discovered is 2048.
This is just for the record so that everyone is aware of this.
Regards,
Thunor
- Dougal
- Posts: 2502
- Joined: Wed 19 Oct 2005, 13:06
- Location: Hell more grotesque than any medieval woodcut
Thunor,
I just finished catching up on this thread and it's great what you've done, really excellent work both the features and documentation -- I see you've also added the html docs, which I thought of suggesting (I hope you deleted the old texinfo stuff...).
I do have one nitpick, though: your examples are really good and detailed, but have one problem: readability.
Since you use functions to auto-generate the pseudo-XML code, when an example is run it is not possible to look at the bit of code that produces a certain widget (and copy-paste it...), which I consider to be one of the main points of the examples.
I see two ways to change this:
- just put the static code in the scripts
- make the example scripts support a -d/--dump switch, which will only require a small change from to
Other than that, I'll have to wait until the next time I use gtkdialog (and learn all the new widgets...) to see if I have any more suggestions... (but if you get bored and aren't listening to Hell, JWM needs some love!)
I just finished catching up on this thread and it's great what you've done, really excellent work both the features and documentation -- I see you've also added the html docs, which I thought of suggesting (I hope you deleted the old texinfo stuff...).
I do have one nitpick, though: your examples are really good and detailed, but have one problem: readability.
Since you use functions to auto-generate the pseudo-XML code, when an example is run it is not possible to look at the bit of code that produces a certain widget (and copy-paste it...), which I consider to be one of the main points of the examples.
I see two ways to change this:
- just put the static code in the scripts
- make the example scripts support a -d/--dump switch, which will only require a small change from
Code: Select all
$GTKDIALOG --program=MAIN_DIALOG
Code: Select all
case $1 in
-d|--dump) echo "MAIN_DIALOG" ;;
*) $GTKDIALOG --program=MAIN_DIALOG ;;
esac
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind
Some say your nose
Some say your toes
But I think it's your mind
Dear puppians,
I am wondering whether any of you can show me, in a simple and understandable way, how to display elapsed time in the new statusbar widget (most probably using <timer>). I would like it to update the statusbar display every second and to be able to reset it to 00:00:00 upon a button click.
Thanks in advance.
With kind regards,
vovchik
I am wondering whether any of you can show me, in a simple and understandable way, how to display elapsed time in the new statusbar widget (most probably using <timer>). I would like it to update the statusbar display every second and to be able to reset it to 00:00:00 upon a button click.
Thanks in advance.
With kind regards,
vovchik
Hello,
in case there is here using Debian or Ubuntu,
know that the last stable verstion gtkdialog 0.8.0 developed by Thunor is available in my deposit.
I can not thank enough Thunor for all the work done on gtkdialog.
François
in case there is here using Debian or Ubuntu,
know that the last stable verstion gtkdialog 0.8.0 developed by Thunor is available in my deposit.
Code: Select all
## Depôt gtkdialog/multimystem
deb http://liveusb.info/multisystem/depot all main
#deb-src http://liveusb.info/multisystem/depot all main
#wget -q http://liveusb.info/multisystem/depot/multisystem.asc -O- | sudo apt-key add -
François
- thunor
- Posts: 350
- Joined: Thu 14 Oct 2010, 15:24
- Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
- Contact:
Hi vovchikvovchik wrote:...how to display elapsed time in the new statusbar widget (most probably using <timer>). I would like it to update the statusbar display every second and to be able to reset it to 00:00:00 upon a button click.
I've included a few commented-out instructions so that you can test the boundaries, and a pause/unpause button.
Code: Select all
#!/bin/sh
GTKDIALOG=gtkdialog
funcStatusBarUpdate() {
SECONDS=$(($(<$ELAPSED) + 1))
if [ $SECONDS -ge 216000 ]; then SECONDS=0; fi
echo $SECONDS > $ELAPSED
printf "%02d:%02d:%02d" $(($SECONDS / 3600)) \
$(($SECONDS % 3600 / 60)) $(($SECONDS % 60)) > $MESSAGE
}
export -f funcStatusBarUpdate
export ELAPSED=$(mktemp)
echo 0 > $ELAPSED
#echo 55 > $ELAPSED
#echo 3595 > $ELAPSED
#echo 215995 > $ELAPSED
export MESSAGE=$(mktemp)
echo "00:00:00" > $MESSAGE
export MAIN_DIALOG='
<window title="StatusBar Elapsed Time" border-width="0" resizable="false">
<vbox>
<timer visible="false">
<variable>tmr0</variable>
<action>funcStatusBarUpdate</action>
<action>refresh:stb0</action>
</timer>
<hbox border-width="100">
<togglebutton>
<label>Active</label>
<default>true</default>
<action>if true enable:tmr0</action>
<action>if false disable:tmr0</action>
</togglebutton>
<button>
<label>Reset</label>
<action>echo -1 > '$ELAPSED'</action>
<action>funcStatusBarUpdate</action>
<action>refresh:stb0</action>
</button>
</hbox>
<statusbar has-resize-grip="false">
<variable>stb0</variable>
<input file>'$MESSAGE'</input>
</statusbar>
</vbox>
<action signal="hide">exit:Exit</action>
</window>
'
$GTKDIALOG --program=MAIN_DIALOG
rm $ELAPSED $MESSAGE
Thunor
How's your game coming along thunor?
Slacko releases in about a week, would be cool to include it
Cheers
Slacko releases in about a week, would be cool to include it
Cheers
Puppy Linux Blog - contact me for access
- thunor
- Posts: 350
- Joined: Thu 14 Oct 2010, 15:24
- Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
- Contact:
Cheers DougalDougal wrote:Thunor,
I just finished catching up on this thread and it's great what you've done, really excellent work both the features and documentation -- I see you've also added the html docs, which I thought of suggesting (I hope you deleted the old texinfo stuff...).
I placed a message inside gtkdialog.texi/info warning the reader that it's very old and incomplete but still informative for beginners.
When I added, extended and researched the widgets I also created examples to test their capabilities which mostly ended up being posted here, so I used functions to reduce them. Eventually I merged them into the repository and added "_advanced" to their filenames so at least the reader will know what to expect. I think your --dump suggestion is a good idea and I'll implement it when I get a chance.Dougal wrote:I do have one nitpick, though: your examples are really good and detailed, but have one problem: readability.
Since you use functions to auto-generate the pseudo-XML code, when an example is run it is not possible to look at the bit of code that produces a certain widget (and copy-paste it...), which I consider to be one of the main points of the examples.
Thanks for the Hell demo links; I've downloaded them and I'll give them a listen.Dougal wrote:Other than that, I'll have to wait until the next time I use gtkdialog (and learn all the new widgets...) to see if I have any more suggestions... (but if you get bored and aren't listening to Hell, JWM needs some love!)
Mick: My game's coming along nicely and I'll see if I can make the deadline
Regards,
Thunor
Dear thunar,
Thanks a million for the statusbar demo. I need the elapsed time for a little sbagen player (moddded and extended from Lobster's original psbagen). I have it integrated now into my gui but would like it not to start automatically, since no sequence has been chosen. I am looking into how to do this.
With kiind regards,
vovchik
Thanks a million for the statusbar demo. I need the elapsed time for a little sbagen player (moddded and extended from Lobster's original psbagen). I have it integrated now into my gui but would like it not to start automatically, since no sequence has been chosen. I am looking into how to do this.
With kiind regards,
vovchik
Dear thunor,
Works like a charm. Thanks. This was what all the fuss was about: http://www.murga-linux.com/puppy/viewto ... 660#570660.
With kind regards,
vovchik
PS. I should actually read the dirs and generate the gtkdialog xml, but I'll do that in the next version.
Works like a charm. Thanks. This was what all the fuss was about: http://www.murga-linux.com/puppy/viewto ... 660#570660.
With kind regards,
vovchik
PS. I should actually read the dirs and generate the gtkdialog xml, but I'll do that in the next version.
Does gtkdialog/ GTK have any options that will force a window to always be dominant? That is to say it would always display in front of any other windows opened with the file manager.
I have a script with two entry boxes that can accept input directly, by chooser, or drag and drop from a Rox window.
Using drag and drop, when I open a directory using ROX, I end up having to reposition the window of my script to have the entry boxes visible for the drag and drop.
I fight this with ROX as even after using Puppy for a number of years, I still do not know if there is a command to snap two windows into a side by side layout.
I have a script with two entry boxes that can accept input directly, by chooser, or drag and drop from a Rox window.
Using drag and drop, when I open a directory using ROX, I end up having to reposition the window of my script to have the entry boxes visible for the drag and drop.
I fight this with ROX as even after using Puppy for a number of years, I still do not know if there is a command to snap two windows into a side by side layout.
Hi 8bit8-bit wrote:Does gtkdialog/ GTK have any options that will force a window to always be dominant? That is to say it would always display in front of any other windows opened with the file manager.
I have a script with two entry boxes that can accept input directly, by chooser, or drag and drop from a Rox window.
Using drag and drop, when I open a directory using ROX, I end up having to reposition the window of my script to have the entry boxes visible for the drag and drop.
I fight this with ROX as even after using Puppy for a number of years, I still do not know if there is a command to snap two windows into a side by side layout.
I can't speak for gtk but there is options in windowmanagers to keep a window on top.
Also, there is xdotool which can control window size/placement. Seaside wrote an app using it awhile ago for rox.
Sorry not really an answer but maybe some possibilities there.
Puppy Linux Blog - contact me for access
8-bit,
You can create an "on-top" window class by inserting in (for example JWM) the following code at the end of "/root/.jwm/jwmrc-personal" just before "</JWM>.
Then, in your gtkdialog program call it with "gtkdialog3 -p GUI --class on-top" and presto your program will not be covered.
If you use Yad, it can do that directly by option without making an entry group as above.
Regards,
s
You can create an "on-top" window class by inserting in (for example JWM) the following code at the end of "/root/.jwm/jwmrc-personal" just before "</JWM>.
Code: Select all
<Group>
<Name>on-top</Name>
<Class>on-top</Class>
<Option>layer:12</Option>
</Group>
If you use Yad, it can do that directly by option without making an entry group as above.
Regards,
s