diff options
author | Helder Martins <heldermartins89@gmail.com> | 2013-07-23 23:55:20 +0100 |
---|---|---|
committer | Helder Martins <heldermartins89@gmail.com> | 2013-07-23 23:55:20 +0100 |
commit | 78d14a2b1e4c62eee76d707e134a6fd37a8658f8 (patch) | |
tree | fbb3ae3d2e6b4b8155a57f5b35643c3976a871e7 /src/fe-gtk | |
parent | a8abba84bda165d283fad84ea77d59e211629bee (diff) |
Removed restriction that disabled the clear button if at least one transfer item was selected in dcc download manager.
Diffstat (limited to 'src/fe-gtk')
-rw-r--r-- | src/fe-gtk/dccgui.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/fe-gtk/dccgui.c b/src/fe-gtk/dccgui.c index 6e1024b0..a3c2619a 100644 --- a/src/fe-gtk/dccgui.c +++ b/src/fe-gtk/dccgui.c @@ -419,6 +419,13 @@ dcc_completed_transfer_exists (void) } static void +update_clear_button_sensitivity (void) +{ + gboolean sensitive = dcc_completed_transfer_exists (); + gtk_widget_set_sensitive (dccfwin.clear_button, sensitive); +} + +static void dcc_fill_window (int flags) { struct DCC *dcc; @@ -464,10 +471,8 @@ dcc_fill_window (int flags) gtk_tree_model_get_iter_first (GTK_TREE_MODEL (dccfwin.store), &iter); gtk_tree_selection_select_iter (dccfwin.sel, &iter); } - else - { - gtk_widget_set_sensitive (dccfwin.clear_button, dcc_completed_transfer_exists ()); - } + + update_clear_button_sensitivity (); } /* return list of selected DCCs */ @@ -503,13 +508,6 @@ dcc_get_selected (void) } static void -update_clear_button_sensitivity (void) -{ - gboolean sensitive = dcc_completed_transfer_exists () && !dcc_get_selected (); - gtk_widget_set_sensitive (dccfwin.clear_button, sensitive); -} - -static void resume_clicked (GtkWidget * wid, gpointer none) { struct DCC *dcc; @@ -663,9 +661,7 @@ dcc_row_cb (GtkTreeSelection *sel, gpointer user_data) dcc_details_populate (NULL); return; } - - /* if a row is selected, the clear button is disabled. */ - gtk_widget_set_sensitive (dccfwin.clear_button, FALSE); + gtk_widget_set_sensitive (dccfwin.abort_button, TRUE); if (list->next) /* multi selection */ |