Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 21 Apr 2014, 00:32
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Gtkdialog Development
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 41 of 55 [821 Posts]   Goto page: Previous 1, 2, 3, ..., 39, 40, 41, 42, 43, ..., 53, 54, 55 Next
Author Message
thunor


Joined: 14 Oct 2010
Posts: 350
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings

PostPosted: 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
View user's profile Send private message Visit poster's website 
smokey01


Joined: 30 Dec 2006
Posts: 1792
Location: South Australia

PostPosted: 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
View user's profile Send private message Visit poster's website 
zigbert


Joined: 29 Mar 2006
Posts: 5562
Location: Valåmoen, Norway

PostPosted: 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 Smile
_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
ariel


Joined: 03 Jul 2009
Posts: 92

PostPosted: 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
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Sun 07 Oct 2012, 12:04    Post subject:  

Dear ariel,

Here is example from thunor's sources.

WIth kind regards,
vovchik
c_embedded.tar.gz
Description 
gz

 Download 
Filename  c_embedded.tar.gz 
Filesize  2.29 KB 
Downloaded  391 Time(s) 
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: 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
bacon-gtkdialog.tar.gz
Description 
gz

 Download 
Filename  bacon-gtkdialog.tar.gz 
Filesize  12.68 KB 
Downloaded  404 Time(s) 
Back to top
View user's profile Send private message 
ariel


Joined: 03 Jul 2009
Posts: 92

PostPosted: Sun 07 Oct 2012, 15:39    Post subject:  

Thanks vovchik Very Happy 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
View user's profile Send private message 
8-bit


Joined: 03 Apr 2007
Posts: 3282
Location: Oregon

PostPosted: 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?

Embarassed 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
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5562
Location: Valåmoen, Norway

PostPosted: 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
View user's profile Send private message Visit poster's website 
zigbert


Joined: 29 Mar 2006
Posts: 5562
Location: Valåmoen, Norway

PostPosted: 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
View user's profile Send private message Visit poster's website 
zigbert


Joined: 29 Mar 2006
Posts: 5562
Location: Valåmoen, Norway

PostPosted: 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
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4134

PostPosted: 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>

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5562
Location: Valåmoen, Norway

PostPosted: 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
View user's profile Send private message Visit poster's website 
zigbert


Joined: 29 Mar 2006
Posts: 5562
Location: Valåmoen, Norway

PostPosted: 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 Smile

<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
View user's profile Send private message Visit poster's website 
seaside

Joined: 11 Apr 2007
Posts: 878

PostPosted: 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 Smile

<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
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 41 of 55 [821 Posts]   Goto page: Previous 1, 2, 3, ..., 39, 40, 41, 42, 43, ..., 53, 54, 55 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

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
[ Time: 0.0953s ][ Queries: 13 (0.0158s) ][ GZIP on ]