pidgin: 5c4e0962: Improve win32 behavior of the GtkStatusI...
datallah at pidgin.im
datallah at pidgin.im
Mon Sep 5 20:31:59 EDT 2011
----------------------------------------------------------------------
Revision: 5c4e09621b978c0972fd440fd215b775a926e26d
Parent: 1db344c18f0cadda5acb7c1b12e34357fb242255
Author: datallah at pidgin.im
Date: 09/05/11 20:25:29
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/5c4e09621b978c0972fd440fd215b775a926e26d
Changelog:
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)
Changes against parent 1db344c18f0cadda5acb7c1b12e34357fb242255
patched pidgin/gtkdocklet.c
-------------- next part --------------
============================================================
--- pidgin/gtkdocklet.c e101de232236d2fbdff1bf4d525dfe47da827fc5
+++ pidgin/gtkdocklet.c a68bafdc81add7fdb3836838edc5ddcfc868514c
@@ -715,6 +715,7 @@ docklet_menu(void)
{
static GtkWidget *menu = NULL;
GtkWidget *menuitem;
+ GtkMenuPositionFunc pos_func = gtk_status_icon_position_menu;
if (menu) {
gtk_widget_destroy(menu);
@@ -790,10 +791,11 @@ docklet_menu(void)
#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 @@ docklet_gtk_status_create(gboolean recre
*/
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 @@ docklet_gtk_status_create(gboolean recre
#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");
More information about the Commits
mailing list