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 Wed 17 Dec 2014, 19:33
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 Posts_count   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_website 
smokey01


Joined: 30 Dec 2006
Posts: 1856
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_website 
zigbert


Joined: 29 Mar 2006
Posts: 5811
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_website 
ariel


Joined: 03 Jul 2009
Posts: 97

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: 1287
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  466 Time(s) 
Back to top
View user's profile Send_private_message 
vovchik


Joined: 23 Oct 2006
Posts: 1287
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  484 Time(s) 
Back to top
View user's profile Send_private_message 
ariel


Joined: 03 Jul 2009
Posts: 97

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.
Edited_times_total
Back to top
View user's profile Send_private_message 
8-bit


Joined: 03 Apr 2007
Posts: 3398
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: 5811
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_website 
zigbert


Joined: 29 Mar 2006
Posts: 5811
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_website 
zigbert


Joined: 29 Mar 2006
Posts: 5811
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_website 
technosaurus


Joined: 18 May 2008
Posts: 4423

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: 5811
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_website 
zigbert


Joined: 29 Mar 2006
Posts: 5811
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_website 
seaside

Joined: 11 Apr 2007
Posts: 888

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:   Sort by:   
Page 41 of 55 Posts_count   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:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1115s ][ Queries: 13 (0.0170s) ][ GZIP on ]