| Author |
Message |
thunor

Joined: 14 Oct 2010 Posts: 344 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Wed 03 Oct 2012, 18:33 Post_subject:
|
|
| smokey01 wrote: | export script='
<window title="Nudger" icon-name="gtk-preferences" 0 0> |
The above produces this error in 0.8.2:
| Code: | | ** ERROR **: gtkdialog: Error in line 2, near token 'tag attribute name': syntax error |
It doesn't error in 0.8.0.
The cause is the " 0 0" at the end but what's interesting is that previous versions allowed it. The error will be coming from the parser and I guess it wasn't being too thorough before, but I've recently modified the parser to allow tag attribute names to include numbers (arg0="" arg1="" etc. for the terminal widget) so that's likely the reason why it's not tolerated anymore.
Regards,
Thunor
|
|
Back to top
|
|
 |
smokey01

Joined: 30 Dec 2006 Posts: 1642 Location: South Australia
|
Posted: Wed 03 Oct 2012, 18:37 Post_subject:
|
|
It works ok in 0.8.1 too.
Thanks
_________________ Puppy Software <-> Distros <-> Puppy Linux Tips
|
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 5291 Location: Valåmoen, Norway
|
Posted: Thu 04 Oct 2012, 13:33 Post_subject:
|
|
| thunor wrote: | | I'm in the process of setting-up slacko 533 to use as my main distro so Sigmund I will look into your issues once I'm settled. | Good news
_________________ Stardust resources
|
|
Back to top
|
|
 |
ariel

Joined: 03 Jul 2009 Posts: 86
|
Posted: Sun 07 Oct 2012, 11:52 Post_subject:
|
|
if my memory serves me well I remember reading in the gtkdialog website that it could be possible to insert gtkdialog guis into C code. it seems that now I cannot find that reference anymore.
can anybody give me a very simple example of it?
|
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1239 Location: Ukraine
|
Posted: Sun 07 Oct 2012, 12:04 Post_subject:
|
|
Dear ariel,
Here is example from thunor's sources.
WIth kind regards,
vovchik
| Description |
|

Download |
| Filename |
c_embedded.tar.gz |
| Filesize |
2.29 KB |
| Downloaded |
244 Time(s) |
|
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1239 Location: Ukraine
|
Posted: Sun 07 Oct 2012, 15:17 Post_subject:
|
|
Dear guys,
While I was at it, I did two examples of the c-embedded in BaCon. They might be useful for somebody....
With kind regards,
vovchik
| Description |
|

Download |
| Filename |
bacon-gtkdialog.tar.gz |
| Filesize |
12.68 KB |
| Downloaded |
254 Time(s) |
|
|
Back to top
|
|
 |
ariel

Joined: 03 Jul 2009 Posts: 86
|
Posted: Sun 07 Oct 2012, 15:39 Post_subject:
|
|
Thanks vovchik I browsed neither all the 40 odd pages of the thread nor the sources you mentioned. the examples look interesting.
Edited_times_total
|
|
Back to top
|
|
 |
8-bit

Joined: 03 Apr 2007 Posts: 3033 Location: Oregon
|
Posted: Mon 08 Oct 2012, 02:27 Post_subject:
|
|
I have gtkdialog subversion 375 installed along with vte-0.28.2-i486.pet and I am getting a segmentation fault trying to run the terminal example.
Am I missing something or did something get changed in the progress of development of gtkdialog?
I feel like the motley fool complaining about things without checking my puppy for the latest version of gtkdialog!
I found that I had installed an early version and after installing the later version, the terminal example worked fine.
So now, I will be able to use it.
|
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 5291 Location: Valåmoen, Norway
|
Posted: Wed 24 Oct 2012, 08:32 Post_subject:
|
|
Bugreport
Trying to sort out the bugs for pMusic 3, I have met another gtkdialog-issue.
While the previous mentioned (use reorderable="true" in <tree>) is not documented in the gtkdialog reference guide, this one is:
Somehow, hidden <entry> does show up.
This happens only if <entry> is set invisible in the first place. After executing 'show' and then 'hide', the <entry> is not visible anymore.
Image shows what user meets at first run of pMusic 3.
The search-dock is hidden and contains an <entry> - the one you can see over the scrollbar.
To simplify and make it all clearer, I have made a small test-script.
| Code: | echo '|there is hidden entry disturbing
|me so badly in this simple bash script.
|Is there a way to get around this
|annoying behaviour.' > /tmp/test
echo '
<vbox>
<hbox>
<tree>
<label>1|2</label>
<input file>/tmp/test</input>
</tree>
<entry visible="false"><variable>HIDDEN_ENTRY</variable><default>Am I hidden</default></entry>
</hbox>
<togglebutton label="show/hide entry">
<action>if true show:HIDDEN_ENTRY</action>
<action>if false hide:HIDDEN_ENTRY</action>
</togglebutton>
</vbox>
' | gtkdialog -s
|
_________________ Stardust resources
|
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 5291 Location: Valåmoen, Norway
|
Posted: Thu 25 Oct 2012, 17:05 Post_subject:
|
|
What does the <input> control of the <menu> widget?
I could not find any example, and tried both to set label and icon via the <input> directive....
Sigmund
_________________ Stardust resources
|
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 5291 Location: Valåmoen, Norway
|
Posted: Thu 25 Oct 2012, 17:20 Post_subject:
|
|
This is probably way off the line, but I have several times wished this behavior, so must ask......
Would it be possible to combine the builtin functions with other <actions>. Something like:
| Code: | | <action>[ $FORMAT = flac" ] && disable:BITRATE</action> | or | Code: | | <action>[ $FORMAT = flac" ] && <action>disable:BITRATE</action></action> |
Sigmund
_________________ Stardust resources
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3845
|
Posted: Thu 25 Oct 2012, 18:17 Post_subject:
|
|
I haven't tried but would something like this pseudo work
disable_bitrate_if_fmt()
[ "$FORMAT" = "$1" ] && export BITRATEVISIBLE=disabled
}
<action>disable_bitrate_if_fmt flac</action>
...
<visible>BITRATEVISIBLE</visible>
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 5291 Location: Valåmoen, Norway
|
Posted: Sat 27 Oct 2012, 02:59 Post_subject:
|
|
technosaurus
I'm often wrong, but I think <input> is the only thing you can refresh after the gui is loaded.
That is how <checkbox> and <togglebutton> have different usage. The first refreshes state, the latter refreshes icon.
Sigmund
EDIT
It is often not a question IF you can solve it, but HOW. Too many workarounds make my code harder to maintain.
It is of course possible to disable a widget from a non-builtin function but it requires some code... One way is to use an invisible checkbox to disable/enable while the function changes status of the checkbox's input file.
_________________ Stardust resources
|
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 5291 Location: Valåmoen, Norway
|
Posted: Sun 28 Oct 2012, 05:04 Post_subject:
|
|
I have no idea if this is a bug, a limitation or just how stuff are supposed to work. - But I will mention it anyway
<comboboxentry> is only returning the signal for key-release-event.
Other signals seems to be 'dead'
| Code: | #!/bin/sh
echo '
<window title="Signals">
<comboboxentry>
<input>ls -1 '$HOME'/</input>
<action signal="button-press-event">echo Entry: button-press_event</action>
<action signal="button-release-event">echo Entry: button-release-event</action>
<action signal="configure-event">echo Entry: configure-event</action>
<action signal="enter-notify-event">echo Entry: enter-notify-event</action>
<action signal="leave-notify-event">echo Entry: leave-notify-event</action>
<action signal="focus-in-event">echo Entry: focus-in-event</action>
<action signal="focus-out-event">echo Entry: focus-out-event</action>
<action signal="key-press-event">echo Entry: key-press-event</action>
<action signal="key-release-event">echo Entry: key-release-event</action>
<action signal="hide">echo Entry: hide</action>
<action signal="show">echo Entry: show</action>
<action signal="map-event">echo Entry: map-event</action>
<action signal="unmap-event">echo Entry: unmap-event</action>
</comboboxentry>
</window>
' | gtkdialog -s
|
_________________ Stardust resources
|
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 841
|
Posted: Sun 28 Oct 2012, 12:40 Post_subject:
|
|
| zigbert wrote: | I have no idea if this is a bug, a limitation or just how stuff are supposed to work. - But I will mention it anyway
<comboboxentry> is only returning the signal for key-release-event.
Other signals seems to be 'dead'
| Code: | #!/bin/sh
echo '
<window title="Signals">
<comboboxentry>
<input>ls -1 '$HOME'/</input>
<action signal="button-press-event">echo Entry: button-press_event</action>
<action signal="button-release-event">echo Entry: button-release-event</action>
<action signal="configure-event">echo Entry: configure-event</action>
<action signal="enter-notify-event">echo Entry: enter-notify-event</action>
<action signal="leave-notify-event">echo Entry: leave-notify-event</action>
<action signal="focus-in-event">echo Entry: focus-in-event</action>
<action signal="focus-out-event">echo Entry: focus-out-event</action>
<action signal="key-press-event">echo Entry: key-press-event</action>
<action signal="key-release-event">echo Entry: key-release-event</action>
<action signal="hide">echo Entry: hide</action>
<action signal="show">echo Entry: show</action>
<action signal="map-event">echo Entry: map-event</action>
<action signal="unmap-event">echo Entry: unmap-event</action>
</comboboxentry>
</window>
' | gtkdialog -s
|
|
zigbert,
They work if you put them just within the </window> tag after the </comboboxentry> tag.
| Code: | #!/bin/sh
echo '
<window title="Signals">
<comboboxentry>
<input>ls -1 '$HOME'/</input>
</comboboxentry>
<action signal="configure-event">echo Entry: configure-event</action>
<action signal="enter-notify-event">echo Entry: enter-notify-event</action>
<action signal="leave-notify-event">echo Entry: leave-notify-event</action>
<action signal="focus-in-event">echo Entry: focus-in-event</action>
<action signal="focus-out-event">echo Entry: focus-out-event</action>
<action signal="key-press-event">echo Entry: key-press-event</action>
<action signal="key-release-event">echo Entry: key-release-event</action>
<action signal="hide">echo Entry: hide</action>
<action signal="show">echo Entry: show</action>
<action signal="map-event">echo Entry: map-event</action>
<action signal="unmap-event">echo Entry: unmap-event</action>
</window>
' | gtkdialog -s |
I think the "button press" events have to be within a <button> tag
Maybe more good info for the tips thread.
Regards,
s
|
|
Back to top
|
|
 |
|