The time now is Wed 19 Jun 2013, 22:13
All times are UTC - 4 |
|
Page 24 of 54 [808 Posts] |
Goto page: Previous 1, 2, 3, ..., 22, 23, 24, 25, 26, ..., 52, 53, 54 Next |
| Author |
Message |
frafa

Joined: 04 Aug 2011 Posts: 10 Location: MONTPELIER
|
Posted: Fri 30 Sep 2011, 08:19 Post subject:
|
|
Ok modified
it's just an example, same adress download ...
if you modify generate.sh
erase all files and folder without generate.sh
run generate.sh all files/folder are regenerate
sorry for my broken English
François
EDIT: must be installed imagemagick to use generate.sh ...
|
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 344 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Sun 02 Oct 2011, 09:40 Post subject:
|
|
| 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^)....
|
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.
The project limit I've just discovered is 2048.
This is just for the record so that everyone is aware of this.
Regards,
Thunor
|
|
Back to top
|
|
 |
Dougal

Joined: 19 Oct 2005 Posts: 2505 Location: Hell more grotesque than any medieval woodcut
|
Posted: Mon 03 Oct 2011, 09:59 Post subject:
|
|
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 | Code: | | $GTKDIALOG --program=MAIN_DIALOG | to | Code: | case $1 in
-d|--dump) echo "MAIN_DIALOG" ;;
*) $GTKDIALOG --program=MAIN_DIALOG ;;
esac |
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!)
_________________ What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind
|
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1239 Location: Ukraine
|
Posted: Mon 03 Oct 2011, 10:12 Post subject:
|
|
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
|
|
Back to top
|
|
 |
frafa

Joined: 04 Aug 2011 Posts: 10 Location: MONTPELIER
|
Posted: Mon 03 Oct 2011, 11:40 Post subject:
|
|
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.
| Code: | ## 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 - |
I can not thank enough Thunor for all the work done on gtkdialog.
François
|
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 344 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Tue 04 Oct 2011, 17:16 Post subject:
|
|
| vovchik 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. |
Hi vovchik
I've included a few commented-out instructions so that you can test the boundaries, and a pause/unpause button.
| Code: | #!/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
|
Regards,
Thunor
|
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 7037 Location: qld
|
Posted: Tue 04 Oct 2011, 17:46 Post subject:
|
|
How's your game coming along thunor?
Slacko releases in about a week, would be cool to include it
Cheers
_________________ keep the faith .. 
|
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 344 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Tue 04 Oct 2011, 19:04 Post subject:
|
|
| Dougal 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...). |
Cheers Dougal
I placed a message inside gtkdialog.texi/info warning the reader that it's very old and incomplete but still informative for beginners.
| 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. |
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: | | 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!) |
Thanks for the Hell demo links; I've downloaded them and I'll give them a listen.
Mick: My game's coming along nicely and I'll see if I can make the deadline
Regards,
Thunor
|
|
Back to top
|
|
 |
8-bit

Joined: 03 Apr 2007 Posts: 3033 Location: Oregon
|
Posted: Tue 04 Oct 2011, 22:13 Post subject:
|
|
thunor,
You have mentioned a game you are developing.
Is it going to be a commercial release?
What type of game is it to be?
You have my curiosity aroused.
|
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1239 Location: Ukraine
|
Posted: Wed 05 Oct 2011, 06:42 Post subject:
|
|
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
|
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 344 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Wed 05 Oct 2011, 13:26 Post subject:
|
|
| vovchik wrote: | | ...would like it not to start automatically... |
<sensitive>false<sensitive>
|
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1239 Location: Ukraine
|
Posted: Wed 05 Oct 2011, 14:20 Post subject:
|
|
Dear thunor,
Works like a charm. Thanks. This was what all the fuss was about: http://www.murga-linux.com/puppy/viewtopic.php?p=570660#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.
|
|
Back to top
|
|
 |
8-bit

Joined: 03 Apr 2007 Posts: 3033 Location: Oregon
|
Posted: Wed 05 Oct 2011, 18:17 Post subject:
|
|
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.
|
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 7037 Location: qld
|
Posted: Wed 05 Oct 2011, 18:35 Post subject:
|
|
| 8-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. |
Hi 8bit
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.
_________________ keep the faith .. 
|
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 841
|
Posted: Wed 05 Oct 2011, 20:30 Post subject:
|
|
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>.
| Code: |
<Group>
<Name>on-top</Name>
<Class>on-top</Class>
<Option>layer:12</Option>
</Group>
|
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
|
|
Back to top
|
|
 |
|
|
Page 24 of 54 [808 Posts] |
Goto page: Previous 1, 2, 3, ..., 22, 23, 24, 25, 26, ..., 52, 53, 54 Next |
|
|
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
|