changeset 32515:cc55df4702aa

Improve win32 behavior of the GtkStatusIcon based docklet. * Don't use a placement function (this causes the menu behavior to be "Windows Like" - appear where the cursor was during the click). * Don't deal with waiting for embedding - this doesn't appear to work on win32 (also not really a significant problem - there's always a system tray)
author Daniel Atallah <daniel.atallah@gmail.com>
date Tue, 06 Sep 2011 00:25:29 +0000
parents c6943fd38d44
children 0f0996c93c42
files pidgin/gtkdocklet.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkdocklet.c	Mon Sep 05 21:11:07 2011 +0000
+++ b/pidgin/gtkdocklet.c	Tue Sep 06 00:25:29 2011 +0000
@@ -715,6 +715,7 @@
 {
 	static GtkWidget *menu = NULL;
 	GtkWidget *menuitem;
+	GtkMenuPositionFunc pos_func = gtk_status_icon_position_menu;
 
 	if (menu) {
 		gtk_widget_destroy(menu);
@@ -790,10 +791,11 @@
 #ifdef _WIN32
 	g_signal_connect(menu, "leave-notify-event", G_CALLBACK(docklet_menu_leave_enter), NULL);
 	g_signal_connect(menu, "enter-notify-event", G_CALLBACK(docklet_menu_leave_enter), NULL);
+	pos_func = NULL;
 #endif
 	gtk_widget_show_all(menu);
 	gtk_menu_popup(GTK_MENU(menu), NULL, NULL,
-		       gtk_status_icon_position_menu,
+		       pos_func,
 		       docklet, 0, gtk_get_current_event_time());
 }
 
@@ -1003,6 +1005,7 @@
 	 */
 	if (!recreate) {
 		pidgin_docklet_embedded();
+#ifdef _WIN32
 #if GTK_CHECK_VERSION(2,12,0)
 		if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/docklet/gtk/embedded")) {
 			embed_timeout = purple_timeout_add_seconds(LONG_EMBED_TIMEOUT, docklet_gtk_embed_timeout_cb, NULL);
@@ -1012,6 +1015,7 @@
 #else
 		embed_timeout = purple_timeout_add_seconds(SHORT_EMBED_TIMEOUT, docklet_gtk_embed_timeout_cb, NULL);
 #endif
+#endif
 	}
 
 	purple_debug_info("docklet", "GTK+ created\n");