# HG changeset patch # User Mark Doliner # Date 1131067852 0 # Node ID 5db4ae4c94a1a86b2b8806dd454822a6682f064e # Parent d8787960e398130a8f8aa7c6a179c23769af1f9b [gaim-migrate @ 14255] sf patch #1347710, from Levi Bard Make text repl detach from existing conversations on unload committer: Tailor Script diff -r d8787960e398 -r 5db4ae4c94a1 plugins/iconaway.c --- a/plugins/iconaway.c Fri Nov 04 01:29:58 2005 +0000 +++ b/plugins/iconaway.c Fri Nov 04 01:30:52 2005 +0000 @@ -43,7 +43,7 @@ static void iconify_windows(GaimAccount *account, char *state, char *message, void *data) { -#if 0 /* STATUS */ +#if 0 /* XXX TODO STATUS */ GaimConvWindow *win; GList *windows; GaimConnection *gc; @@ -70,7 +70,7 @@ gtk_window_iconify(GTK_WINDOW(gtkwin->window)); } } -#endif /* STATUS */ +#endif /* XXX TODO STATUS */ } /* diff -r d8787960e398 -r 5db4ae4c94a1 plugins/spellchk.c --- a/plugins/spellchk.c Fri Nov 04 01:29:58 2005 +0000 +++ b/plugins/spellchk.c Fri Nov 04 01:30:52 2005 +0000 @@ -264,6 +264,8 @@ { GtkTextBuffer *buffer; + g_return_if_fail(spell != NULL); + buffer = gtk_text_view_get_buffer(spell->view); g_signal_handlers_disconnect_matched(spell->view, @@ -581,6 +583,17 @@ return; } +static void +spellchk_detach(GaimConversation *conv) +{ + GaimGtkConversation *gtkconv; + spellchk *spell; + + gtkconv = GAIM_GTK_CONVERSATION(conv); + spell = g_object_steal_data(G_OBJECT(gtkconv->entry), SPELLCHK_OBJECT_KEY); + spellchk_free(spell); +} + static int buf_get_line(char *ibuf, char **buf, int *position, int len) { int pos = *position; @@ -1938,6 +1951,20 @@ return TRUE; } +static gboolean +plugin_unload(GaimPlugin *plugin) +{ + GList *convs; + + /* Detach from existing conversations */ + for (convs = gaim_get_conversations(); convs != NULL; convs = convs->next) + { + spellchk_detach((GaimConversation *)convs->data); + } + + return TRUE; +} + static GtkWidget * get_config_frame(GaimPlugin *plugin) { @@ -2108,7 +2135,7 @@ "Eric Warmenhoven ", GAIM_WEBSITE, plugin_load, - NULL, + plugin_unload, NULL, &ui_info, NULL,