GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
FAQ
Search
Memberlist
Usergroups
Register
Profile
Log in to check your private messages
Log in
How to bring up GTKStatusIcon popup menu using a left click?
GTK+ Forums Forum Index
->
GTK+ Programming
Author
Message
wheels53
Familiar Face
Joined: 13 Feb 2007
Posts: 13
Posted: Mon Jan 07, 2008 10:15 pm
Post subject: How to bring up GTKStatusIcon popup menu using a left click?
Code:
(Plaintext)
1
2
3
4
5
6
7
8
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);
}
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?
Back to top
wheels53
Familiar Face
Joined: 13 Feb 2007
Posts: 13
Posted: Tue Jan 08, 2008 12:04 am
Post subject: [Solved]
Code:
(Plaintext)
1
2
g_signal_emit_by_name(statusicon, "popup_menu", 3, gtk_get_current_event_time());
Back to top
Display posts from previous:
All Posts
1 Day
7 Days
2 Weeks
1 Month
3 Months
6 Months
1 Year
Oldest First
Newest First
GTK+ Forums Forum Index
->
GTK+ Programming
All times are GMT
Page
1
of
1
Powered by
phpBB
© 2001, 2005 phpBB Group
CodeBB
1.0 Beta 2
Protected by
Anti-Spam ACP