Gnutella Forums  

Go Back   Gnutella Forums > Current Gnutella Client Forums > Gtk-Gnutella (Linux/Unix)
Register FAQ Members List Calendar Arcade Search Today's Posts Mark Forums Read


Welcome to Gnutella Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.



Once registered but before posting, members MUST READ the FORUM RULES (click here) and LimeWire/FrostWire users should include System details - help us to help you (click on blue link) in their posts if their problem relates to using the program. Whilst forum helpers are happy to help where they can, without these system details your post might be ignored. And wise to read How to create a New Thread

Thank you

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old January 30th, 2006
Junior Member
 

Join Date: January 30th, 2006
Posts: 3
nmadhudia
Default Question regarding Right click menu in GTK CTree

Dear friends,

I am using a GTK to develop one GUI. I have taken a event box in which there is a scrolled window. Inside the scrolled window there is a CTree. The number of tree nodes are going to be changed dynamically at run time according one XML document.

I want to know how can i connect a signal to a node such that each node will show me its corresponding right click menu. I have hard coded the nodes at present in the tree and i have made a rightclick menu. But i have no idea how to attach the menu to individual node so that each category of node can show their corresponding right click menus.

__________________
Thanking You
Nilesh Madhudia
Reply With Quote
  #2 (permalink)  
Old January 30th, 2006
Junior Member
 

Join Date: January 30th, 2006
Posts: 3
nmadhudia
Default test mail

Regarding Right click menu
__________________
Thanking You
Nilesh Madhudia
Reply With Quote
  #3 (permalink)  
Old January 31st, 2006
flame-retardant
 

Join Date: November 22nd, 2005
Posts: 196
Hyper-kun is on a distinguished road
Default

You shouldn't be using GTK+ 1.2 anymore. It's old and deprecated. Some distros even consider removing it completely. For newly-written software use GTK+ 2.0 instead.
GTK+ 1.2 really has no concept of a cursor in a CTree so you have to keep track of the last selected row manually and use that when you receive the "clicked" signal. With GTK+ 2.0 you can simply check the current cursor position in a GtkTreeView and also connected to the "cursor-changed" signal.

You can then fetch the node data and modify the current context popup menu or select the appropriate one from a set.
The nodes themselves don't receive any signal. You could manually delegate the signal to an object stored in the node of course, if you prefer it that way.
Reply With Quote
  #4 (permalink)  
Old April 6th, 2007
Junior Member
 

Join Date: January 30th, 2006
Posts: 3
nmadhudia
Default Thanks Hyper-kun

Quote:
Originally Posted by Hyper-kun
You shouldn't be using GTK+ 1.2 anymore. It's old and deprecated. Some distros even consider removing it completely. For newly-written software use GTK+ 2.0 instead.
GTK+ 1.2 really has no concept of a cursor in a CTree so you have to keep track of the last selected row manually and use that when you receive the "clicked" signal. With GTK+ 2.0 you can simply check the current cursor position in a GtkTreeView and also connected to the "cursor-changed" signal.

You can then fetch the node data and modify the current context popup menu or select the appropriate one from a set.
The nodes themselves don't receive any signal. You could manually delegate the signal to an object stored in the node of course, if you prefer it that way.

Thanks a lot buddy. This will really work buddy.
__________________
Thanking You
Nilesh Madhudia
Reply With Quote
Reply



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
New feature in right click menu (systray) nerd New Feature Requests 5 June 11th, 2006 04:20 AM
Left Click, Right Click... Same? LucidDream Open Discussion topics 2 July 3rd, 2003 05:28 PM
why does LimeWire quit (crash) if I click on any the Apple menu? Mike Levin General Mac Support 3 January 26th, 2003 05:10 PM
Limewire crashes every time I touch apple menu / finder menu peeweejd General Mac Support 2 February 25th, 2002 06:43 PM
add an "open" option to the right click menu on transfers - nt Unregistered XoloX Feature Request 0 October 24th, 2001 04:34 PM


All times are GMT -7. The time now is 05:41 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0

Copyright © 2007 Gnutelliums LLC.
All Rights Reserved.