Mercurial > pidgin.yaz
comparison pidgin/gtkdocklet-x11.c @ 15823:32c366eeeb99
sed -ie 's/gaim/purple/g'
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Mon, 19 Mar 2007 07:01:17 +0000 |
parents | 84b0f9b23ede |
children | ca75eccdca3d |
comparison
equal
deleted
inserted
replaced
15822:84b0f9b23ede | 15823:32c366eeeb99 |
---|---|
1 /* | 1 /* |
2 * System tray icon (aka docklet) plugin for Gaim | 2 * System tray icon (aka docklet) plugin for Purple |
3 * | 3 * |
4 * Copyright (C) 2002-3 Robert McQueen <robot101@debian.org> | 4 * Copyright (C) 2002-3 Robert McQueen <robot101@debian.org> |
5 * Copyright (C) 2003 Herman Bloggs <hermanator12002@yahoo.com> | 5 * Copyright (C) 2003 Herman Bloggs <hermanator12002@yahoo.com> |
6 * Inspired by a similar plugin by: | 6 * Inspired by a similar plugin by: |
7 * John (J5) Palmieri <johnp@martianrock.com> | 7 * John (J5) Palmieri <johnp@martianrock.com> |
55 } | 55 } |
56 | 56 |
57 static void | 57 static void |
58 docklet_x11_embedded_cb(GtkWidget *widget, void *data) | 58 docklet_x11_embedded_cb(GtkWidget *widget, void *data) |
59 { | 59 { |
60 gaim_debug(GAIM_DEBUG_INFO, "docklet", "embedded\n"); | 60 purple_debug(PURPLE_DEBUG_INFO, "docklet", "embedded\n"); |
61 | 61 |
62 g_source_remove(embed_timeout); | 62 g_source_remove(embed_timeout); |
63 embed_timeout = 0; | 63 embed_timeout = 0; |
64 pidgin_docklet_embedded(); | 64 pidgin_docklet_embedded(); |
65 } | 65 } |
66 | 66 |
67 static void | 67 static void |
68 docklet_x11_destroyed_cb(GtkWidget *widget, void *data) | 68 docklet_x11_destroyed_cb(GtkWidget *widget, void *data) |
69 { | 69 { |
70 gaim_debug(GAIM_DEBUG_INFO, "docklet", "destroyed\n"); | 70 purple_debug(PURPLE_DEBUG_INFO, "docklet", "destroyed\n"); |
71 | 71 |
72 pidgin_docklet_remove(); | 72 pidgin_docklet_remove(); |
73 | 73 |
74 g_object_unref(G_OBJECT(docklet)); | 74 g_object_unref(G_OBJECT(docklet)); |
75 docklet = NULL; | 75 docklet = NULL; |
215 g_object_unref(G_OBJECT(blank_icon)); | 215 g_object_unref(G_OBJECT(blank_icon)); |
216 blank_icon = NULL; | 216 blank_icon = NULL; |
217 | 217 |
218 image = NULL; | 218 image = NULL; |
219 | 219 |
220 gaim_debug(GAIM_DEBUG_INFO, "docklet", "destroyed\n"); | 220 purple_debug(PURPLE_DEBUG_INFO, "docklet", "destroyed\n"); |
221 } | 221 } |
222 | 222 |
223 static gboolean | 223 static gboolean |
224 docklet_x11_embed_timeout_cb() | 224 docklet_x11_embed_timeout_cb() |
225 { | 225 { |
226 /* The docklet was not embedded within the timeout. | 226 /* The docklet was not embedded within the timeout. |
227 * Remove it as a visibility manager, but leave the plugin | 227 * Remove it as a visibility manager, but leave the plugin |
228 * loaded so that it can embed automatically if/when a notification | 228 * loaded so that it can embed automatically if/when a notification |
229 * area becomes available. | 229 * area becomes available. |
230 */ | 230 */ |
231 gaim_debug_info("docklet", "failed to embed within timeout\n"); | 231 purple_debug_info("docklet", "failed to embed within timeout\n"); |
232 pidgin_docklet_remove(); | 232 pidgin_docklet_remove(); |
233 | 233 |
234 return FALSE; | 234 return FALSE; |
235 } | 235 } |
236 | 236 |
241 | 241 |
242 if (docklet) { | 242 if (docklet) { |
243 /* if this is being called when a tray icon exists, it's because | 243 /* if this is being called when a tray icon exists, it's because |
244 something messed up. try destroying it before we proceed, | 244 something messed up. try destroying it before we proceed, |
245 although docklet_refcount may be all hosed. hopefully won't happen. */ | 245 although docklet_refcount may be all hosed. hopefully won't happen. */ |
246 gaim_debug(GAIM_DEBUG_WARNING, "docklet", "trying to create icon but it already exists?\n"); | 246 purple_debug(PURPLE_DEBUG_WARNING, "docklet", "trying to create icon but it already exists?\n"); |
247 docklet_x11_destroy(); | 247 docklet_x11_destroy(); |
248 } | 248 } |
249 | 249 |
250 docklet = egg_tray_icon_new(PIDGIN_NAME); | 250 docklet = egg_tray_icon_new(PIDGIN_NAME); |
251 box = gtk_event_box_new(); | 251 box = gtk_event_box_new(); |
274 * icon was actually embedded. | 274 * icon was actually embedded. |
275 */ | 275 */ |
276 pidgin_docklet_embedded(); | 276 pidgin_docklet_embedded(); |
277 embed_timeout = g_timeout_add(EMBED_TIMEOUT, docklet_x11_embed_timeout_cb, NULL); | 277 embed_timeout = g_timeout_add(EMBED_TIMEOUT, docklet_x11_embed_timeout_cb, NULL); |
278 | 278 |
279 gaim_debug(GAIM_DEBUG_INFO, "docklet", "created\n"); | 279 purple_debug(PURPLE_DEBUG_INFO, "docklet", "created\n"); |
280 } | 280 } |
281 | 281 |
282 static struct docklet_ui_ops ui_ops = | 282 static struct docklet_ui_ops ui_ops = |
283 { | 283 { |
284 docklet_x11_create, | 284 docklet_x11_create, |