diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-07-08 04:58:02 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-07-08 04:58:02 +0000 |
commit | 8f85197cc2c306abc3bceee155afddf34e59f643 (patch) | |
tree | 5c623f063f343a8cf447bd7ca9767e3752a990f8 /src | |
parent | ffbe13af6a93a90c8fec6cf05f4f7110f1608fb2 (diff) |
added G_ALERTCANCEL to AlertValue, and return it if cancelled.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@407 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r-- | src/addressbook.c | 2 | ||||
-rw-r--r-- | src/alertpanel.c | 4 | ||||
-rw-r--r-- | src/alertpanel.h | 5 | ||||
-rw-r--r-- | src/summaryview.c | 6 |
4 files changed, 9 insertions, 8 deletions
diff --git a/src/addressbook.c b/src/addressbook.c index 6175abab..6b0964f6 100644 --- a/src/addressbook.c +++ b/src/addressbook.c @@ -1666,7 +1666,7 @@ static void addressbook_treenode_delete_cb(gpointer data, guint action, obj->name ); aval = alertpanel( _("Delete"), message, _("Folder only"), _("Folder and Addresses"), GTK_STOCK_CANCEL ); g_free(message); - if( aval == G_ALERTOTHER ) return; + if( aval != G_ALERTDEFAULT && aval != G_ALERTALTERNATE ) return; } else { message = g_strdup_printf(_("Really delete `%s' ?"), obj->name); diff --git a/src/alertpanel.c b/src/alertpanel.c index c24360d3..46d7dd5a 100644 --- a/src/alertpanel.c +++ b/src/alertpanel.c @@ -196,10 +196,10 @@ static void alertpanel_create(const gchar *title, gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE); g_signal_connect(G_OBJECT(dialog), "delete_event", G_CALLBACK(alertpanel_deleted), - (gpointer)G_ALERTOTHER); + (gpointer)G_ALERTCANCEL); g_signal_connect(G_OBJECT(dialog), "key_press_event", G_CALLBACK(alertpanel_close), - (gpointer)G_ALERTOTHER); + (gpointer)G_ALERTCANCEL); /* for title icon, label and message */ hbox = gtk_hbox_new(FALSE, 12); diff --git a/src/alertpanel.h b/src/alertpanel.h index 7492cead..3e03323b 100644 --- a/src/alertpanel.h +++ b/src/alertpanel.h @@ -27,11 +27,14 @@ typedef enum G_ALERTDEFAULT, G_ALERTALTERNATE, G_ALERTOTHER, + G_ALERTCANCEL, G_ALERTWAIT, G_ALERTDISABLE = 1 << 16 } AlertValue; +#define G_ALERT_VALUE_MASK 0x0000ffff + typedef enum { ALERT_NOTICE, @@ -40,8 +43,6 @@ typedef enum ALERT_ERROR } AlertType; -#define G_ALERT_VALUE_MASK 0x0000ffff - AlertValue alertpanel (const gchar *title, const gchar *message, const gchar *button1_label, diff --git a/src/summaryview.c b/src/summaryview.c index 8b568c0c..a18e3e28 100644 --- a/src/summaryview.c +++ b/src/summaryview.c @@ -1143,13 +1143,13 @@ static void summary_select_next_flagged_or_folder(SummaryView *summaryview, AlertValue val; val = alertpanel(title, ask_msg, - GTK_STOCK_YES, _("Search again"), - GTK_STOCK_NO); + GTK_STOCK_YES, GTK_STOCK_NO, + _("Search again")); if (val == G_ALERTDEFAULT) { folderview_select_next_unread(summaryview->folderview); return; - } else if (val == G_ALERTALTERNATE) { + } else if (val == G_ALERTOTHER) { start_from_next = FALSE; if (!gtk_tree_model_get_iter_first(model, &iter)) return; |