aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-04-22 05:28:17 +0800
committerDan Winship <danw@src.gnome.org>2000-04-22 05:28:17 +0800
commited4fea3fe3bdd9eb41feae648a0dbe84f410ad1c (patch)
tree14551a89417bb7220de8ee50277455e0e13a38e8
parenteb87301392618f045df2df70149c95f637179413 (diff)
downloadgsoc2013-evolution-ed4fea3fe3bdd9eb41feae648a0dbe84f410ad1c.tar
gsoc2013-evolution-ed4fea3fe3bdd9eb41feae648a0dbe84f410ad1c.tar.gz
gsoc2013-evolution-ed4fea3fe3bdd9eb41feae648a0dbe84f410ad1c.tar.bz2
gsoc2013-evolution-ed4fea3fe3bdd9eb41feae648a0dbe84f410ad1c.tar.lz
gsoc2013-evolution-ed4fea3fe3bdd9eb41feae648a0dbe84f410ad1c.tar.xz
gsoc2013-evolution-ed4fea3fe3bdd9eb41feae648a0dbe84f410ad1c.tar.zst
gsoc2013-evolution-ed4fea3fe3bdd9eb41feae648a0dbe84f410ad1c.zip
Connect "Exit" menu item finally.
* e-msg-composer.c (exit_cb): Connect "Exit" menu item finally. svn path=/trunk/; revision=2549
-rw-r--r--composer/ChangeLog1
-rw-r--r--composer/e-msg-composer.c22
2 files changed, 22 insertions, 1 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index ea41af4a34..1f3b0f4824 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -2,6 +2,7 @@
* e-msg-composer.c (e_msg_composer_set_headers):
(e_msg_composer_set_body_text): new functions
+ (exit_cb): Connect "Exit" menu item finally.
* e-msg-composer-hdrs.c: const poisoning
(e_msg_composer_hdrs_set_subject):
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 220880ee4c..d4ed8d49bf 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -277,6 +277,26 @@ send_cb (GtkWidget *widget,
}
static void
+exit_dialog_cb (int reply, gpointer data)
+{
+ if (reply == 0)
+ gtk_widget_destroy (GTK_WIDGET (data));
+}
+
+static void
+exit_cb (GtkWidget *widget, gpointer data)
+{
+ EMsgComposer *composer = E_MSG_COMPOSER (data);
+ GtkWindow *parent =
+ GTK_WINDOW (gtk_widget_get_ancestor (GTK_WIDGET (data),
+ GTK_TYPE_WINDOW));
+
+ gnome_ok_cancel_dialog_parented ("Discard this message?",
+ exit_dialog_cb, composer, parent);
+}
+
+
+static void
menu_view_attachments_activate_cb (GtkWidget *widget,
gpointer data)
{
@@ -383,7 +403,7 @@ static GnomeUIInfo file_tree[] = {
GNOMEUIINFO_ITEM_STOCK (N_("Send"), N_("Send the message"),
send_cb, GNOME_STOCK_MENU_MAIL_SND),
GNOMEUIINFO_SEPARATOR,
- GNOMEUIINFO_MENU_EXIT_ITEM (NULL, NULL),
+ GNOMEUIINFO_MENU_EXIT_ITEM (exit_cb, NULL),
GNOMEUIINFO_END
};