void finch_xfer_dialog_remove_xfer(PurpleXfer *xfer) { PurpleGntXferUiData *data; g_return_if_fail(xfer_dialog != NULL); g_return_if_fail(xfer != NULL); data = FINCHXFER(xfer); if (data == NULL) return; if (!data->in_list) return; data->in_list = FALSE; gnt_tree_remove(GNT_TREE(xfer_dialog->tree), xfer); xfer_dialog->num_transfers--; if (xfer_dialog->num_transfers == 0 && !xfer_dialog->keep_open) finch_xfer_dialog_destroy(); else update_title_progress(); purple_xfer_unref(xfer); }
static void pounces_manager_delete_confirm_cb(PurplePounce *pounce) { gnt_tree_remove(GNT_TREE(pounces_manager->tree), pounce); purple_request_close_with_handle(pounce); purple_pounce_destroy(pounce); }
static void fl_add_room(PurpleRoomlist *roomlist, PurpleRoomlistRoom *room) { gboolean category; if (froomlist.roomlist != roomlist) return; category = (purple_roomlist_room_get_type(room) == PURPLE_ROOMLIST_ROOMTYPE_CATEGORY); gnt_tree_remove(GNT_TREE(froomlist.tree), room); gnt_tree_add_row_after(GNT_TREE(froomlist.tree), room, gnt_tree_create_row(GNT_TREE(froomlist.tree), purple_roomlist_room_get_name(room), category ? "<" : ""), purple_roomlist_room_get_parent(room), NULL); gnt_tree_set_expanded(GNT_TREE(froomlist.tree), room, !category); }
static void really_delete_status(PurpleSavedStatus *saved) { GList *iter; for (iter = edits; iter; iter = iter->next) { EditStatus *edit = iter->data; if (edit->saved == saved) { gnt_widget_destroy(edit->window); break; } } if (statuses.tree) gnt_tree_remove(GNT_TREE(statuses.tree), saved); purple_savedstatus_delete(purple_savedstatus_get_title(saved)); }
static void prof_del_cb(GntWidget *button, gpointer null) { const char * profile = gnt_entry_get_text(GNT_ENTRY(pref_dialog->new_profile)); gchar * pref; if (!strcmp(profile, DEFAULT_PROFILE)) return; pref = g_strdup_printf(FINCH_PREFS_ROOT "/sound/profiles/%s", profile); purple_prefs_remove(pref); g_free(pref); if (!strcmp(pref_dialog->original_profile, profile)) { g_free(pref_dialog->original_profile); pref_dialog->original_profile = g_strdup(DEFAULT_PROFILE); } if(!strcmp(profile, finch_sound_get_active_profile())) reload_pref_window(DEFAULT_PROFILE); gnt_tree_remove(GNT_TREE(pref_dialog->profiles), (gchar *) profile); }