# HG changeset patch # User Daniel Atallah # Date 1315268729 0 # Node ID cc55df4702aaf8cd28a49afdc55292e1da71024e # Parent c6943fd38d4433f35a52f796aab1a979d7d2b63c 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) diff -r c6943fd38d44 -r cc55df4702aa pidgin/gtkdocklet.c --- 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");