mirror of
https://github.com/moparisthebest/hexchat
synced 2024-12-01 13:42:16 -05:00
Removed restriction that disabled the clear button if at least one transfer item was selected in dcc download manager.
This commit is contained in:
parent
a8abba84bd
commit
78d14a2b1e
@ -418,6 +418,13 @@ dcc_completed_transfer_exists (void)
|
|||||||
return exist;
|
return exist;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
update_clear_button_sensitivity (void)
|
||||||
|
{
|
||||||
|
gboolean sensitive = dcc_completed_transfer_exists ();
|
||||||
|
gtk_widget_set_sensitive (dccfwin.clear_button, sensitive);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dcc_fill_window (int flags)
|
dcc_fill_window (int flags)
|
||||||
{
|
{
|
||||||
@ -464,10 +471,8 @@ dcc_fill_window (int flags)
|
|||||||
gtk_tree_model_get_iter_first (GTK_TREE_MODEL (dccfwin.store), &iter);
|
gtk_tree_model_get_iter_first (GTK_TREE_MODEL (dccfwin.store), &iter);
|
||||||
gtk_tree_selection_select_iter (dccfwin.sel, &iter);
|
gtk_tree_selection_select_iter (dccfwin.sel, &iter);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
update_clear_button_sensitivity ();
|
||||||
gtk_widget_set_sensitive (dccfwin.clear_button, dcc_completed_transfer_exists ());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* return list of selected DCCs */
|
/* return list of selected DCCs */
|
||||||
@ -502,13 +507,6 @@ dcc_get_selected (void)
|
|||||||
dccfwin.sel, COL_DCC);
|
dccfwin.sel, COL_DCC);
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
static void
|
||||||
resume_clicked (GtkWidget * wid, gpointer none)
|
resume_clicked (GtkWidget * wid, gpointer none)
|
||||||
{
|
{
|
||||||
@ -664,8 +662,6 @@ dcc_row_cb (GtkTreeSelection *sel, gpointer user_data)
|
|||||||
return;
|
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);
|
gtk_widget_set_sensitive (dccfwin.abort_button, TRUE);
|
||||||
|
|
||||||
if (list->next) /* multi selection */
|
if (list->next) /* multi selection */
|
||||||
|
Loading…
Reference in New Issue
Block a user