Mercurial > pidgin.yaz
diff plugins/docklet/docklet-x11.c @ 10504:1a97d5e88d12
[gaim-migrate @ 11796]
Lots of things here:
- Several memory leak fixes
- A few invalid memory access fixes
- Fix a yahoo crash going idle when away
- Fix Add user in chats to actually fill in the screenname
- Add gaim_account_{get,set}_enabled to perl
- Fix command priorities (fixes /me in IRC)
- Fix MSN notification server transfer to be quiet about it
- Fix MSN blist sync if user has insane friendly name
- Make the docklet less crash-happy if it fails to embed in 3 seconds
- Only probe for native plugins with the correct file extension
- 1 typo fix :)
... and quite possibly something else I forgot.
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Tue, 11 Jan 2005 17:25:06 +0000 |
parents | 9655389f4b81 |
children | 91f17026b693 |
line wrap: on
line diff
--- a/plugins/docklet/docklet-x11.c Tue Jan 11 02:00:44 2005 +0000 +++ b/plugins/docklet/docklet-x11.c Tue Jan 11 17:25:06 2005 +0000 @@ -88,6 +88,8 @@ { const gchar *icon_name = NULL; + g_return_if_fail(image != NULL); + switch (icon) { case offline: icon_name = GAIM_STOCK_ICON_OFFLINE; @@ -152,9 +154,11 @@ *push_in = TRUE; } -static gboolean +static void docklet_x11_destroy() { + g_return_if_fail(docklet != NULL); + docklet_remove(GTK_WIDGET_VISIBLE(docklet)); g_signal_handlers_disconnect_by_func(G_OBJECT(docklet), G_CALLBACK(docklet_x11_destroyed_cb), NULL); @@ -167,7 +171,18 @@ g_object_unref(G_OBJECT(blank_icon)); blank_icon = NULL; + if (image) + gtk_widget_destroy(image); + image = NULL; + gaim_debug(GAIM_DEBUG_INFO, "tray icon", "destroyed\n"); +} + +static gboolean +docklet_x11_embed_timeout_cb() +{ + docklet_unload(); + return FALSE; } @@ -203,7 +218,7 @@ /* ref the docklet before we bandy it about the place */ g_object_ref(G_OBJECT(docklet)); docklet_embedded(); - embed_timeout = g_timeout_add(EMBED_TIMEOUT, docklet_x11_destroy, NULL); + embed_timeout = g_timeout_add(EMBED_TIMEOUT, docklet_x11_embed_timeout_cb, NULL); gaim_debug(GAIM_DEBUG_INFO, "tray icon", "created\n"); }