Mercurial > pidgin.yaz
comparison pidgin/gtkdocklet-gtk.c @ 30909:25e200cb3532
propagate from branch 'im.pidgin.pidgin' (head dca20e09164518b0f7a773edd7e9649f41d8873d)
to branch 'im.pidgin.cpw.malu.xmpp.google_refactor' (head 7823c556f2d1bbca43f5ef9f0fea30cabc5d313f)
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Tue, 31 Aug 2010 18:28:10 +0000 |
parents | 26c1c5069c28 |
children | 3ed54142386f 7fb5e60fd919 |
comparison
equal
deleted
inserted
replaced
30908:c44ec533a48c | 30909:25e200cb3532 |
---|---|
36 } | 36 } |
37 | 37 |
38 static void | 38 static void |
39 docklet_gtk_status_clicked_cb(GtkStatusIcon *status_icon, guint button, guint activate_time, gpointer user_data) | 39 docklet_gtk_status_clicked_cb(GtkStatusIcon *status_icon, guint button, guint activate_time, gpointer user_data) |
40 { | 40 { |
41 pidgin_docklet_clicked(button); | 41 purple_debug_info("docklet", "The button is %u\n", button); |
42 #ifdef GDK_WINDOWING_QUARTZ | |
43 /* You can only click left mouse button on MacOSX native GTK. Let that be the menu */ | |
44 pidgin_docklet_clicked(3); | |
45 #else | |
46 pidgin_docklet_clicked(button); | |
47 #endif | |
42 } | 48 } |
43 | 49 |
44 static void | 50 static void |
45 docklet_gtk_status_update_icon(PurpleStatusPrimitive status, gboolean connecting, gboolean pending) | 51 docklet_gtk_status_update_icon(PurpleStatusPrimitive status, gboolean connecting, gboolean pending) |
46 { | 52 { |
73 icon_name = PIDGIN_STOCK_TRAY_CONNECT; | 79 icon_name = PIDGIN_STOCK_TRAY_CONNECT; |
74 | 80 |
75 if (icon_name) { | 81 if (icon_name) { |
76 gtk_status_icon_set_from_icon_name(docklet, icon_name); | 82 gtk_status_icon_set_from_icon_name(docklet, icon_name); |
77 } | 83 } |
84 | |
85 if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/docklet/blink")) { | |
86 gtk_status_icon_set_blinking(docklet, (pending && !connecting)); | |
87 } else if (gtk_status_icon_get_blinking(docklet)) { | |
88 gtk_status_icon_set_blinking(docklet, FALSE); | |
89 } | |
78 } | 90 } |
79 | 91 |
80 static void | 92 static void |
81 docklet_gtk_status_set_tooltip(gchar *tooltip) | 93 docklet_gtk_status_set_tooltip(gchar *tooltip) |
82 { | 94 { |
99 docklet_gtk_status_destroy(void) | 111 docklet_gtk_status_destroy(void) |
100 { | 112 { |
101 g_return_if_fail(docklet != NULL); | 113 g_return_if_fail(docklet != NULL); |
102 | 114 |
103 pidgin_docklet_remove(); | 115 pidgin_docklet_remove(); |
104 | 116 |
117 gtk_status_icon_set_visible(docklet, FALSE); | |
105 g_object_unref(G_OBJECT(docklet)); | 118 g_object_unref(G_OBJECT(docklet)); |
106 docklet = NULL; | 119 docklet = NULL; |
107 | 120 |
108 purple_debug_info("docklet", "GTK+ destroyed\n"); | 121 purple_debug_info("docklet", "GTK+ destroyed\n"); |
109 } | 122 } |