Gtkdialog Development
Wouldn't a checkbox normally be used in that situation?
Do you know a good gtkdialog program? Please post a link here
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
disciple,
If you have the latest version of gtkdialog from thunor and have ran the spinbutton example, you might get more insight as to what I am saying.
I update gtkdialog3 with thunor's latest each time he shows us a new example as often an update of gtkdialog3 is needed to have the example work properly.
If you have the latest version of gtkdialog from thunor and have ran the spinbutton example, you might get more insight as to what I am saying.
I update gtkdialog3 with thunor's latest each time he shows us a new example as often an update of gtkdialog3 is needed to have the example work properly.
Are you thinking of http://www.murga-linux.com/puppy/viewto ... 870#548870?
Do you know a good gtkdialog program? Please post a link here
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
Maybe there's something I'm missing about what you're asking, but Argolance's example I linked to is for a tree widget. Argolance was looking for help because it had a problem if you clicked on an item and didn't drag it, and 8-bit posted a link to a workaround for that problem using getcurpos http://www.murga-linux.com/puppy/viewto ... 651#549651
Do you know a good gtkdialog program? Please post a link here
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
Ah, sorry - you haven't edited your last post, have you?
I thought you said you were not talking about your example of moving items in a list widget. But you didn't say that - I must have imagined it.
I thought you said you were not talking about your example of moving items in a list widget. But you didn't say that - I must have imagined it.
I think I was missing this bit:disciple wrote:Maybe there's something I'm missing about what you're asking
8-bit's example does not use gtk-options. Unless I'm misunderstanding what "gtk-options" means, of course.zigbert wrote:using gtk-options
Do you know a good gtkdialog program? Please post a link here
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
- thunor
- Posts: 350
- Joined: Thu 14 Oct 2010, 15:24
- Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
- Contact:
The GTK+ property is "reorderable".zigbert wrote:...moving items inside a <tree> widget...using gtk-options.
Regards,
Thunor
Ah yes, "reorderable".
I think this operation needs a tooltip to go with it. I remember struggling with trying to move an item up and down a list and constantly ending up with placing it as a subheading instead.
The trick is after highlighting an item, drag it to the right and keeping the mouse button down move the item up and down and watch for a line under the item where you wish it placed.
Regards,
s
I think this operation needs a tooltip to go with it. I remember struggling with trying to move an item up and down a list and constantly ending up with placing it as a subheading instead.
The trick is after highlighting an item, drag it to the right and keeping the mouse button down move the item up and down and watch for a line under the item where you wish it placed.
Regards,
s
- thunor
- Posts: 350
- Joined: Thu 14 Oct 2010, 15:24
- Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
- Contact:
Hi seasideseaside wrote:I remember struggling with trying to move an item up and down a list and constantly ending up with placing it as a subheading instead.
I researched this a while back and I couldn't stop the branches from appearing when dragging-and-dropping onto existing rows. What I discovered was that Gtkdialog's tree widget is a GtkTreeView using the GtkTreeStore model which is "a tree-like data structure", whereas -- I'm assuming as I haven't tested it yet -- a GtkTreeView using the GtkListStore model implementing "a list-like data structure" may have been more appropriate. Maybe there was a reason why the tree-like structure was chosen over the list-like structure.
Regards,
Thunor
- thunor
- Posts: 350
- Joined: Thu 14 Oct 2010, 15:24
- Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
- Contact:
Added timer widget
The widget reference is available here.
The timer itself doesn't affect CPU usage (I tested with 255x1s timers) but what the application developer executes on the "tick" signal will.
<timer> widget example:
Regards,
Thunor
The widget reference is available here.
- The default signal is "tick", emitted when the timer ticks.
- The default precision is seconds and the default interval is 1s.
- Use the milliseconds="true/yes/1" custom tag attribute to use milliseconds.
- Use the interval="value" custom tag attribute to set the interval (unsigned integer).
- Use the tag attribute (GTK+ property) visible="false" to hide the timer.
- Disabling the timer pauses it, enabling the timer unpauses it.
The timer itself doesn't affect CPU usage (I tested with 255x1s timers) but what the application developer executes on the "tick" signal will.
<timer> widget example:
Code: Select all
#!/bin/sh
# NOTE: This example requires at least gtkdialog-0.7.21 (please visit
# http://code.google.com/p/gtkdialog/). Additionally if you are using
# Puppy Linux then you may find that an historical version of gtkdialog
# already exists in /usr/sbin, and if that is the case then you should
# modify the shell variable below to point to the new gtkdialog binary.
GTKDIALOG=gtkdialog
function funcpixCreate() {
for f in 0 1 2 3; do
echo '<pixmap>
<variable>pix'$1$f'</variable>
<input file>pix'$f'.svg</input>
</pixmap>'
done
}
function funcbtnCreate() {
echo '<button>
<input file stock="'$1'"></input>
<action>'$2':tmr0</action>
<action>'$2':tmr1</action>
<action>'$2':tmr2</action>
<action>'$2':tmr3</action>
</button>'
}
function functmrCreate() {
echo '<variable>tmr'$1'</variable>
<action>funcpixRandomise</action>
<action>refresh:pix'$1'0</action>
<action>refresh:pix'$1'1</action>
<action>refresh:pix'$1'2</action>
<action>refresh:pix'$1'3</action>
</timer>'
}
function funcimageCreate() {
local -a colours=("a00000" "00a000" "0000a0" "ffffff")
echo '
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<rect x="0" y="0" height="64" width="64" fill="#'${colours[$1]}'"/>
</svg>' > image$1.svg
}; export -f funcimageCreate
function funcpixRandomise() {
local rand=
for f in 0 1 2 3; do
rand=$(($RANDOM % 4))
ln -sf image$rand.svg pix$f.svg
done
}; export -f funcpixRandomise
if [ ! -f image0.svg ]; then funcimageCreate 0; fi
if [ ! -f image1.svg ]; then funcimageCreate 1; fi
if [ ! -f image2.svg ]; then funcimageCreate 2; fi
if [ ! -f image3.svg ]; then funcimageCreate 3; fi
funcpixRandomise
export MAIN_DIALOG='
<window title="tmrTimer" resizable="false">
<vbox>
<frame timer widget>
<vbox border-width="20">
<hbox>
<timer>
'"$(functmrCreate 0)"'
'"$(funcpixCreate 0)"'
</hbox>
<hbox>
<timer interval="2">
'"$(functmrCreate 1)"'
'"$(funcpixCreate 1)"'
</hbox>
<hbox>
<timer milliseconds="true" visible="false">
'"$(functmrCreate 2)"'
'"$(funcpixCreate 2)"'
</hbox>
<hbox>
<timer milliseconds="true" interval="500" visible="false">
'"$(functmrCreate 3)"'
'"$(funcpixCreate 3)"'
</hbox>
</vbox>
</frame>
<hbox>
'"$(funcbtnCreate gtk-no disable)"'
'"$(funcbtnCreate gtk-yes enable)"'
<button ok></button>
</hbox>
</vbox>
<action signal="hide">exit:Exit</action>
</window>
'
$GTKDIALOG --center --program=MAIN_DIALOG
Thunor
Last edited by thunor on Fri 12 Aug 2011, 14:41, edited 2 times in total.
I tried to compile the latest but it seems to have a problem, I don't really know much about this so it could be me.
Here is what I get after running make.
The previous version worked fine for me, seems to be the timer widget is the problem.
Here is what I get after running make.
Code: Select all
widget_timer.o: In function `widget_timer_timer_callback':
/root/gtkdialog/src/widget_timer.c:379: undefined reference to `gtk_widget_get_sensitive'
widget_timer.o: In function `widget_timer_envvar_construct':
/root/gtkdialog/src/widget_timer.c:137: undefined reference to `gtk_widget_get_sensitive'
collect2: ld returned 1 exit status
make[3]: *** [gtkdialog] Error 1
make[3]: Leaving directory `/root/gtkdialog/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/root/gtkdialog/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/gtkdialog'
make: *** [all] Error 2
Working ok in Slacko-312.37I tried to compile the latest but it seems to have a problem, I don't really know much about this so it could be me.
Don't you use quirky-NOP Geoffrey? gtk+ version is old in that.
Puppy Linux Blog - contact me for access
01micko wrote:Working ok in Slacko-312.37I tried to compile the latest but it seems to have a problem, I don't really know much about this so it could be me.
Don't you use quirky-NOP Geoffrey? gtk+ version is old in that.
Yeah, quirky 1.20 NOP, strange though it has worked ok up until now, I may have reached it's limitations, not to worry
I should look at using a newer version of puppy, It's just that I prefer xfce as a window manager.
Ah, that's cool.thunor wrote:The GTK+ property is "reorderable".zigbert wrote:...moving items inside a <tree> widget...using gtk-options.
Regards,
Thunor
An interesting point is that neither method works after you sort the tree by clicking on a column header.
Do you know a good gtkdialog program? Please post a link here
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
- thunor
- Posts: 350
- Joined: Thu 14 Oct 2010, 15:24
- Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
- Contact:
Hi GeoffreyGeoffrey wrote:Code: Select all
... /root/gtkdialog/src/widget_timer.c:379: undefined reference to `gtk_widget_get_sensitive' ...
Sorry about that. gtk_widget_get_sensitive requires GTK+ 2.18.0 and I missed it, but thanks for letting me know as there is an older alternative which I've included and committed
Interestingly its sister function gtk_widget_set_sensitive already exists within the project and has no version requirements.
Regards,
Thunor
Last edited by thunor on Fri 12 Aug 2011, 10:10, edited 1 time in total.
I don't have the very latest gtkdialog here, but I'm guessing this isn't fixed yet:
Can anyone confirm?seaside wrote:Just wanted to add that using the "#!/usr/sbin/gtkdialog3" event form requires that gtkdialog3 is symlinked to gtkdialog, otherwise it errs. I ran into this earlier using the "event driven" form of gtkdialog - no matter from a file or on the command line.potong wrote:sunburnt:
Here's a program written in two ways to show the different options.
Secondly --event-driven=filenameCode: Select all
#!/usr/sbin/gtkdialog3 -e display(){ echo "Display: ${!1}"; } ...............
Potong, thanks for supplying all this great information on Gtkdialog. It is immensely helpful.
Regards,
s
Do you know a good gtkdialog program? Please post a link here
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
In other words, if the executable is named something other than "gtkdialog", then you need to create a link to it named "gtkdialog", to be able to use the event-driven option.
Do you know a good gtkdialog program? Please post a link here
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER