Mercurial > pidgin
changeset 15942:ee397e53d9ce
allow cancellation of transfers waiting to be accepted
author | Richard Nelson <wabz@pidgin.im> |
---|---|
date | Tue, 27 Mar 2007 00:52:19 +0000 |
parents | 47a9454dbb95 |
children | 1071320641b9 |
files | finch/gntft.c |
diffstat | 1 files changed, 5 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/finch/gntft.c Tue Mar 27 00:50:51 2007 +0000 +++ b/finch/gntft.c Tue Mar 27 00:52:19 2007 +0000 @@ -158,18 +158,12 @@ stop_button_cb(GntButton *button) { PurpleXfer *selected_xfer = gnt_tree_get_selection_data(GNT_TREE(xfer_dialog->tree)); - if (selected_xfer && selected_xfer->status == PURPLE_XFER_STATUS_STARTED) + if (selected_xfer && selected_xfer->status != PURPLE_XFER_STATUS_CANCEL_LOCAL && + selected_xfer->status != PURPLE_XFER_STATUS_CANCEL_REMOTE && + selected_xfer->status != PURPLE_XFER_STATUS_DONE) purple_xfer_cancel_local(selected_xfer); } -#if 0 -static void -tree_selection_changed_cb(GntTree *tree, GntTreeRow *old, GntTreeRow *current, gpointer n) -{ - xfer_dialog->selected_xfer = (PurpleXfer *)gnt_tree_get_selection_data(tree); -} -#endif - /************************************************************************** * Dialog Building Functions **************************************************************************/ @@ -209,8 +203,7 @@ gnt_tree_set_col_width(GNT_TREE(tree), COLUMN_STATUS, 10); gnt_tree_set_show_title(GNT_TREE(tree), TRUE); gnt_box_add_widget(GNT_BOX(window), tree); - /*g_signal_connect(G_OBJECT(tree), "selection-changed",*/ - /*G_CALLBACK(tree_selection_changed_cb), NULL);*/ + checkbox = gnt_check_box_new( _("Close this window when all transfers finish")); gnt_check_box_set_checked(GNT_CHECK_BOX(checkbox), !xfer_dialog->keep_open); @@ -430,6 +423,7 @@ g_free(remaining_str); if (purple_xfer_is_completed(xfer)) { gnt_tree_change_text(GNT_TREE(xfer_dialog->tree), xfer, COLUMN_STATUS, _("Finished")); + gnt_tree_change_text(GNT_TREE(xfer_dialog->tree), xfer, COLUMN_REMAINING, _("Finished")); } else { gnt_tree_change_text(GNT_TREE(xfer_dialog->tree), xfer, COLUMN_STATUS, _("Transferring")); }