# HG changeset patch # User Mark Doliner # Date 1057900256 0 # Node ID 4314e6be74c423c78bb6f43a126810777ef396a8 # Parent 6e24de5efdb2855b0c6ff3d56de3795c2126fc82 [gaim-migrate @ 6547] Fix removing groups containing chats, thanks to javabsp. Make sound prefs with empty file names show up as "(default)" rather than an empty input box. committer: Tailor Script diff -r 6e24de5efdb2 -r 4314e6be74c4 src/dialogs.c --- a/src/dialogs.c Fri Jul 11 04:38:40 2003 +0000 +++ b/src/dialogs.c Fri Jul 11 05:10:56 2003 +0000 @@ -424,13 +424,18 @@ if(GAIM_BLIST_NODE_IS_BUDDY(b)) { struct buddy *bd = (struct buddy *)b; GaimConversation *c = gaim_find_conversation(bd->name); - if(bd->account->gc) { + if (gaim_account_is_connected(bd->account)) { serv_remove_buddy(bd->account->gc, bd->name, g->name); gaim_blist_remove_buddy(bd); if (c != NULL) gaim_conversation_update(c, GAIM_CONV_UPDATE_REMOVE); } + } else if(GAIM_BLIST_NODE_IS_CHAT(b)) { + struct chat *chat = (struct chat *)b; + if (gaim_account_is_connected(chat->account)) { + gaim_blist_remove_chat(chat); + } } b = b->next; } diff -r 6e24de5efdb2 -r 4314e6be74c4 src/gtkprefs.c --- a/src/gtkprefs.c Fri Jul 11 04:38:40 2003 +0000 +++ b/src/gtkprefs.c Fri Jul 11 05:10:56 2003 +0000 @@ -2003,7 +2003,7 @@ file = gaim_prefs_get_string(pref); g_free(pref); if (sound_entry) - gtk_entry_set_text(GTK_ENTRY(sound_entry), file ? file : "(default)"); + gtk_entry_set_text(GTK_ENTRY(sound_entry), (file && *file != '\0') ? file : "(default)"); g_value_unset (&val); if (sounddialog) gtk_widget_destroy(sounddialog); @@ -2090,7 +2090,7 @@ gaim_gtk_sound_get_event_option(0)); file = gaim_prefs_get_string(pref); g_free(pref); - gtk_entry_set_text(GTK_ENTRY(sound_entry), file ? file : "(default)"); + gtk_entry_set_text(GTK_ENTRY(sound_entry), (file && *file != '\0') ? file : "(default)"); gtk_editable_set_editable(GTK_EDITABLE(sound_entry), FALSE); gtk_box_pack_start(GTK_BOX(hbox), sound_entry, FALSE, FALSE, 5);