GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Sat Oct 25, 2014 4:47 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: How to bring up GTKStatusIcon popup menu using a left click?
PostPosted: Mon Jan 07, 2008 10:15 pm 
Offline
Familiar Face

Joined: Tue Feb 13, 2007 6:59 am
Posts: 13
[code=]g_signal_connect (G_OBJECT (statusicon), "activate", G_CALLBACK (activate_menu), menu);

static void activate_menu (GtkStatusIcon *statusicon, GtkWidget *menu)
{
g_signal_emit_by_name (statusicon, "popup_menu", 3, 0);

}
[/code]

Using the code above I can left click to bring up the popup menu but, the popup menu will not stay up without me keeping the mouse button pressed. On a mouse release, the selected item is activated but, I need it to act like a right click.

Any ideas?


Top
 Profile  
 
 Post subject: [Solved]
PostPosted: Tue Jan 08, 2008 12:04 am 
Offline
Familiar Face

Joined: Tue Feb 13, 2007 6:59 am
Posts: 13
[code=]
g_signal_emit_by_name(statusicon, "popup_menu", 3, gtk_get_current_event_time());[/code]


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 2 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group