Need to make custom gtkDialog TableBox right click menu.

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

Need to make custom gtkDialog TableBox right click menu.

#1 Post by sunburnt »

I want a popup menu instead of buttons, being as the TableBox is the object of the app.
Menu = ROX, mount, boot. I searched zigbert`s tips but it`s sooo looong...

Also... Does gtkDialog need the list item selected with a left click first, and then right click?
I`ve seen this behavior in some apps. and it`s a real pain that a right click doesn`t select also.

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#2 Post by seaside »

Sunburnt,

Maybe you could trap the "<action signal="on-click" or "button-press-event" action and then trap the right-click by a test-

Code: Select all

 if [ $BUTTON = 3 ]; then POPYOURMENU 

Cheers,
s
(How's the Driveman Driving) :D

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#3 Post by sunburnt »

Hi seaside; DriveMan is what this is for, the buttons aren`t needed if there`s a context menu.
Near as I can tell DriveMan is finished, I can`t find any more nasty interactions in settings.
I`ll give your suggestion a go, I have terrible luck with gtkDialog ( undocumented syntax ).

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#4 Post by zigbert »

External menus is not described in the 'Tips and Tricks' post, but it is possible. I am in a hurry right now, so can't explain, but if you want to see it in action, you should look at Ptheme. - a script in the Stardust desktop environment.


Sigmund

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#5 Post by sunburnt »

Thanks zigbert; It looks like a TreeBox screen positioned to popup over the main GUI.
I didn`t think of using a plain gtkDialog control for it, very clever...
Obviously some screen calculations are required to get which TreeBox item was selected.

This "more complicated" gtkDialog related code makes having a library even more valuable.
Lets "can" these routines into a function library to extend gtkDialog for easier development.

Post Reply