The time now is Tue 24 Apr 2018, 04:38
All times are UTC - 4 |
Page 41 of 56 [833 Posts] |
Goto page: Previous 1, 2, 3, ..., 39, 40, 41, 42, 43, ..., 54, 55, 56 Next |
Author |
Message |
thunor

Joined: 14 Oct 2010 Posts: 350 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: 2682 Location: South Australia
|
Posted: Wed 03 Oct 2012, 18:37 Post subject:
|
|
It works ok in 0.8.1 too.
Thanks
_________________ Software <-> Distros <-> Tips <-> Newsletters
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6541 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: 141
|
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: 1447 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 |
603 Time(s) |
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1447 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 |
616 Time(s) |
|
Back to top
|
|
 |
ariel

Joined: 03 Jul 2009 Posts: 141
|
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.
Last edited by ariel on Sat 17 Nov 2012, 16:03; edited 2 times in total
|
Back to top
|
|
 |
8-bit

Joined: 03 Apr 2007 Posts: 3425 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: 6541 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: 6541 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: 6541 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: 4787 Location: Kingwood, TX
|
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>
_________________ Check out my github repositories. I may eventually get around to updating my blogspot.
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6541 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: 6541 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: 917
|
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
|
|
 |
|
Page 41 of 56 [833 Posts] |
Goto page: Previous 1, 2, 3, ..., 39, 40, 41, 42, 43, ..., 54, 55, 56 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
|