Mercurial > pidgin.yaz
changeset 138:e8ea1e2fdf0c
[gaim-migrate @ 148]
Bugfixes and memleaks mostly.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Wed, 19 Apr 2000 12:36:18 +0000 |
parents | fe81c8b4951d |
children | c009c4f4ad02 |
files | plugins/iconaway.c plugins/spellchk.c src/aim.c src/plugins.c |
diffstat | 4 files changed, 22 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/iconaway.c Wed Apr 19 08:49:49 2000 +0000 +++ b/plugins/iconaway.c Wed Apr 19 12:36:18 2000 +0000 @@ -16,8 +16,7 @@ GDK_WINDOW_XWINDOW(imaway->window), ((_XPrivDisplay)GDK_DISPLAY())->default_screen); #ifdef USE_APPLET - gnome_buddy_hide(); - set_applet_draw_closed(); + applet_destroy_buddy(); #else XIconifyWindow(GDK_DISPLAY(), GDK_WINDOW_XWINDOW(blist->window),
--- a/plugins/spellchk.c Wed Apr 19 08:49:49 2000 +0000 +++ b/plugins/spellchk.c Wed Apr 19 12:36:18 2000 +0000 @@ -48,7 +48,7 @@ struct replace_words *r; r = (struct replace_words *)(w->data); tmp = have_word(*message, word); - if (!strcmp(have_word(*message, word), r->bad)) { + if (!strcmp(tmp, r->bad)) { substitute(message, word, strlen(r->bad), r->good); l += num_words(r->good) - num_words(r->bad);
--- a/src/aim.c Wed Apr 19 08:49:49 2000 +0000 +++ b/src/aim.c Wed Apr 19 12:36:18 2000 +0000 @@ -404,11 +404,9 @@ gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(remember), (general_options & OPT_GEN_REMEMBER_PASS)); if (current_user) { - GList *all = combo_user_names(); - GList *srch = g_list_find(all, (void *)current_user->username); + GList *all = aim_users; + GList *srch = g_list_find(all, (void *)current_user); int length = g_list_length(all) - g_list_length(srch); - g_list_free(srch); - g_list_free(all); gtk_combo_set_value_in_list(GTK_COMBO(name), length, 0); if ((general_options & OPT_GEN_REMEMBER_PASS)) {
--- a/src/plugins.c Wed Apr 19 08:49:49 2000 +0000 +++ b/src/plugins.c Wed Apr 19 12:36:18 2000 +0000 @@ -87,10 +87,16 @@ { char *buf = g_malloc(BUF_LEN); - if (!plugin_dialog) { - plugin_dialog = gtk_file_selection_new("Gaim - Plugin List"); + if (plugin_dialog) { + g_free(buf); + gtk_widget_show(plugin_dialog); + gdk_window_raise(plugin_dialog->window); + return; + } - gtk_file_selection_hide_fileop_buttons( + plugin_dialog = gtk_file_selection_new("Gaim - Plugin List"); + + gtk_file_selection_hide_fileop_buttons( GTK_FILE_SELECTION(plugin_dialog)); if(getenv("PLUGIN_DIR") == NULL) { @@ -109,8 +115,6 @@ gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(plugin_dialog)->cancel_button), "clicked", GTK_SIGNAL_FUNC(destroy_plugins), NULL); - } - g_free(buf); gtk_widget_show(plugin_dialog); gdk_window_raise(plugin_dialog->window); @@ -335,14 +339,18 @@ while (c) { g = (struct gaim_callback *)c->data; if (g->handle == p->handle) { - callbacks = g_list_remove(callbacks, c); + callbacks = g_list_remove(callbacks, c->data); g_free(g); + c = callbacks; + if (c == NULL) break; } c = c->next; } - dlclose(p->handle); + /* don't ask me why this works */ + if (callbacks != NULL) dlclose(p->handle); plugins = g_list_remove(plugins, p); + g_free(p->filename); g_free(p); gtk_widget_set_sensitive(config, 0); update_show_plugins(); @@ -394,8 +402,10 @@ while (c) { g = (struct gaim_callback *)c->data; if (handle == g->handle && func == g->function) { - callbacks = g_list_remove(callbacks, g); + callbacks = g_list_remove(callbacks, c->data); g_free(g); + c = callbacks; + if (c == NULL) break; } c = c->next; }