mirror of
https://github.com/hexchat/hexchat.git
synced 2024-11-10 05:02:50 +01:00
add confirm dialog to clearing ignores
This commit is contained in:
parent
d37ef26104
commit
b282c6f2f3
@ -273,13 +273,15 @@ ignore_store_new (int cancel, char *mask, gpointer data)
|
||||
}
|
||||
|
||||
static void
|
||||
ignore_clear_entry_clicked (GtkWidget * wid, gpointer unused)
|
||||
ignore_clear_cb (GtkDialog *dialog, gint response)
|
||||
{
|
||||
GtkListStore *store = GTK_LIST_STORE (get_store ());
|
||||
GtkTreeIter iter;
|
||||
char *mask;
|
||||
|
||||
if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter))
|
||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||
|
||||
if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter) && response == GTK_RESPONSE_OK)
|
||||
{
|
||||
/* remove from ignore_list */
|
||||
do
|
||||
@ -296,6 +298,20 @@ ignore_clear_entry_clicked (GtkWidget * wid, gpointer unused)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
ignore_clear_entry_clicked (GtkWidget * wid)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
|
||||
dialog = gtk_message_dialog_new (NULL, 0,
|
||||
GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL,
|
||||
_("Are you sure you want to remove all ignores?"));
|
||||
g_signal_connect (G_OBJECT (dialog), "response",
|
||||
G_CALLBACK (ignore_clear_cb), NULL);
|
||||
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE);
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
|
||||
static void
|
||||
ignore_new_entry_clicked (GtkWidget * wid, struct session *sess)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user