aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-07-08 04:58:02 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-07-08 04:58:02 +0000
commit8f85197cc2c306abc3bceee155afddf34e59f643 (patch)
tree5c623f063f343a8cf447bd7ca9767e3752a990f8
parentffbe13af6a93a90c8fec6cf05f4f7110f1608fb2 (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
-rw-r--r--ChangeLog7
-rw-r--r--ChangeLog.ja7
-rw-r--r--src/addressbook.c2
-rw-r--r--src/alertpanel.c4
-rw-r--r--src/alertpanel.h5
-rw-r--r--src/summaryview.c6
6 files changed, 23 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 73f4ac55..50ff7728 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-07-08
+
+ * src/addressbook.c
+ src/alertpanel.[ch]
+ src/summaryview.c: added G_ALERTCANCEL to AlertValue, and return it
+ if cancelled.
+
2005-07-07
* src/summary_search.c
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 7518a09a..b6c6d5f0 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,3 +1,10 @@
+2005-07-08
+
+ * src/addressbook.c
+ src/alertpanel.[ch]
+ src/summaryview.c: G_ALERTCANCEL を AlertValue に追加し、キャンセル
+ された場合はそれを返すようにした。
+
2005-07-07
* src/summary_search.c
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;