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:51
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
GtkDialog - tips
Post new topic   Reply to topic View previous topic :: View next topic
Page 38 of 62 [928 Posts]   Goto page: Previous 1, 2, 3, ..., 36, 37, 38, 39, 40, ..., 60, 61, 62 Next
Author Message
8-bit


Joined: 03 Apr 2007
Posts: 3282
Location: Oregon

PostPosted: Wed 29 Jun 2011, 21:02    Post subject:  

I had downloaded and compiled the source on June 27th at 9:37 am.
I had no problems with the close or exit buttons in programs.
What programs did you use for reference to verify this?
Back to top
View user's profile Send private message 
smokey01


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

PostPosted: Thu 30 Jun 2011, 06:12    Post subject:  

It was only the button in partview. The other apps I tested, the close button seem to work ok.

I think the problem is with partview not gtkdialog.

_________________
Puppy Software <-> Distros <-> Puppy Linux Tips
Back to top
View user's profile Send private message Visit poster's website 
pemasu


Joined: 08 Jul 2009
Posts: 5458
Location: Finland

PostPosted: Thu 30 Jun 2011, 08:02    Post subject:  

I was sure I got nonworking quit button with some other gtkdialog application also. I recompiled the latest gtkdialog again. I cant reproduce the problem with any other than Partview, all the other apps I tested works as it should. Reverting back to the Patriots gtkdialog version restores the Partview Quit button usage.

Sorry, it seems there is so far only Partview in my Puppies which does not work as it should.
I have used in woof partview-2.1.pet. It is from quirky repo.
http://distro.ibiblio.org/quirky/pet_packages-quirky/partview-2.1.pet
Back to top
View user's profile Send private message 
thunor


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

PostPosted: Thu 30 Jun 2011, 18:25    Post subject:  

pemasu wrote:
I was sure I got nonworking quit button with some other gtkdialog application also. I recompiled the latest gtkdialog again. I cant reproduce the problem with any other than Partview, all the other apps I tested works as it should. Reverting back to the Patriots gtkdialog version restores the Partview Quit button usage.

Sorry, it seems there is so far only Partview in my Puppies which does not work as it should.
I have used in woof partview-2.1.pet. It is from quirky repo.
http://distro.ibiblio.org/quirky/pet_packages-quirky/partview-2.1.pet

Hi pemasu

I was intrigued so I took a look. /usr/sbin/partview uses a perl script to create /tmp/partview.glade which is passed to gtkdialog3.

Yes it quits using the gtkdialog3 binary that came with my lupu 520, but I compiled gtkdialog3-0.7.20-pe-1, edited /usr/sbin/partview to use that instead and I experienced the same problem. There's a message in the terminal which will help to resolve it:
Code:

** (gtkdialog:8741): CRITICAL **: on_any_button_clicked: assertion `command != NULL' failed

Ok, I found bugs in glade_support.c which have always been there, the same bug in 3 functions. The functions should have been checking that "full_command" (the string passed in) was not NULL but were instead checking that a newly allocated uninitialised local pointer called "command" was not NULL Wink I've fixed them but I'm not committing until tomorrow as I have a huge amount of new code to check before I do Very Happy

Regards,
Thunor
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 30 Jun 2011, 18:34    Post subject:  

thunor wrote:
I've fixed them but I'm not committing until tomorrow as I have a huge amount of new code to check before I do Very Happy
You are just wonderful!
_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
pemasu


Joined: 08 Jul 2009
Posts: 5458
Location: Finland

PostPosted: Fri 01 Jul 2011, 02:45    Post subject:  

Thunor. Thank you of your quick testing, fix and report. I will retest new gtkdialog3 when it is time and will include it to the next version of my puppy. It seems nice way to find some problems and it will benefit all to get them hunted.
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7547
Location: qld

PostPosted: Fri 01 Jul 2011, 02:49    Post subject:  

Funny that glade bug is not apparent in spup. Confused Anyway, new spup will be soon and I'll include the latest gtkdialog revision too (and perhaps some other gtkdialog goodies Wink )
_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
8-bit


Joined: 03 Apr 2007
Posts: 3282
Location: Oregon

PostPosted: Tue 26 Jul 2011, 00:50    Post subject:  

I have been playing with the child window that patriot so kindly made work.
I found that by including a text area with a variable for the child process, I could add a child that was a lot more than just a text box.
I then proceeded to add another child process to see if more than one was supported.
It is. But it is a one way thing. The first child process in the script must be launched first or the script will crash.
But after starting both child processes, either can be closed from the main dialog.
It was an interesting experience though.
And for the curious, I actually used one of the gtkdialog examples of tree stock icons as a child process.
Also, the example in usr/share/doc/gtkdialog3/examples/01.02-button_action_types needs the addition of a variable statement to work correctly as to closing the child from the child window.
Back to top
View user's profile Send private message 
Argolance


Joined: 06 Jan 2008
Posts: 1780
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Sun 31 Jul 2011, 06:10    Post subject:  

Hello,
Thank a lot to zigbert for GtkDialog tips which are so clever and... useful!
Question:
In the script showing how to move items in list by drag'n drop...
Code:
#!/bin/sh
   move (){
   PRESS_EVENT="`cat /tmp/PRESS_EVENT`"
   grep -Fv "$PRESS_EVENT" /tmp/list > /tmp/tmp
   grep -Fm1 -B500 "$TREE" /tmp/tmp | grep -v "$TREE" > /tmp/tmp1
   echo "$PRESS_EVENT" >> /tmp/tmp1
   grep -Fm1 -A500 "$TREE" /tmp/tmp >> /tmp/tmp1
   mv -f /tmp/tmp1 /tmp/list
}

export -f move
ls -1 /usr/share/backgrounds > /tmp/list

export test="
<tree rules_hint=\"true\" hover-selection=\"true\" tooltip-text=\"Drag'n drop items to move them in list\">
 <label>Backgrounds</label>
 <input>cat /tmp/list</input>
 <variable>TREE</variable>
 <height>300</height><width>200</width>
 <action signal=\"button-press-event\">echo \$TREE > /tmp/PRESS_EVENT</action>
 <action signal=\"button-release-event\">move</action>
 <action signal=\"button-release-event\">refresh:TREE</action>
</tree>"
gtkdialog3 --center -p test


... I noticed annoying behavior:
When user just clicks any item of the list without dragging it (this may happen!), the list disappears and let just the clicked item inside... Have somebody got any idea about the way to prevent this?

Thanks you a lot for your attention.

Cordialement!

_________________

Back to top
View user's profile Send private message Visit poster's website 
8-bit


Joined: 03 Apr 2007
Posts: 3282
Location: Oregon

PostPosted: Sun 31 Jul 2011, 15:16    Post subject:  

I am not sure how one could code it, but it seems that the button-release-event that calls the move function is not at fault.
Instead, the button-press-event would call another function to note the cursor position in a variable and then the move function would check that variable for a change of cursor position.
If it was the same, the move would be aborted.
Back to top
View user's profile Send private message 
Argolance


Joined: 06 Jan 2008
Posts: 1780
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Mon 01 Aug 2011, 05:13    Post subject:  

Hello 8-bit,
Thanks for your reply.
Quote:
Instead, the button-press-event would call another function to note the cursor position in a variable and then the move function would check that variable for a change of cursor position.
This is probably one of the solutions! Very Happy Please, may I ask you to tell more about or give any link where I could find example or explanations? Embarassed

Cordialement.

_________________

Back to top
View user's profile Send private message Visit poster's website 
8-bit


Joined: 03 Apr 2007
Posts: 3282
Location: Oregon

PostPosted: Tue 02 Aug 2011, 16:22    Post subject:  

Argolance nad others,
If you want to see my solution to the drag example list disappearing, go
HERE.

It may not be the best, but it works.
And by the way, I found all I needed on this forum! Smile Smile
Back to top
View user's profile Send private message 
Argolance


Joined: 06 Jan 2008
Posts: 1780
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Wed 03 Aug 2011, 14:07    Post subject:  

Thank you a lot! Wink
_________________

Back to top
View user's profile Send private message Visit poster's website 
8-bit


Joined: 03 Apr 2007
Posts: 3282
Location: Oregon

PostPosted: Wed 03 Aug 2011, 16:13    Post subject:
Subject description: gtkdialog reserved words list needed
 

When one is writing a gtkdialog script, there seems to be no reference one can refer to as to words that are reserved for gtkdialog.
A list of those words would be nice so one knows not to use them as variables or other areas where they might conflict with reserved words.

Good idea or bad?
Back to top
View user's profile Send private message 
Dave_G


Joined: 21 Jul 2011
Posts: 459

PostPosted: Wed 03 Aug 2011, 17:15    Post subject:  

I've just started coding with gtkdialog and have to agree 100% with 8-bit.

Unfortunately this lack of documentation is not unique to gtkdialog, it seems
to be pretty common in the Linux world.
A very big stumbling block for newbies like myself.

Dave.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 38 of 62 [928 Posts]   Goto page: Previous 1, 2, 3, ..., 36, 37, 38, 39, 40, ..., 60, 61, 62 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
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.0817s ][ Queries: 12 (0.0138s) ][ GZIP on ]