aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-05-25 21:14:51 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-05-25 21:14:51 +0800
commitf49077cfb57ade9013674487a1f371da7c038709 (patch)
tree58ebabbe624409eed22ed13578eab3ed2d4d0206 /composer
parentd3c7420fb977fe5c337f2c917839a6e982a47902 (diff)
parent9fb0290d914e63512f6e3fc719b6b0249d787656 (diff)
downloadgsoc2013-evolution-f49077cfb57ade9013674487a1f371da7c038709.tar
gsoc2013-evolution-f49077cfb57ade9013674487a1f371da7c038709.tar.gz
gsoc2013-evolution-f49077cfb57ade9013674487a1f371da7c038709.tar.bz2
gsoc2013-evolution-f49077cfb57ade9013674487a1f371da7c038709.tar.lz
gsoc2013-evolution-f49077cfb57ade9013674487a1f371da7c038709.tar.xz
gsoc2013-evolution-f49077cfb57ade9013674487a1f371da7c038709.tar.zst
gsoc2013-evolution-f49077cfb57ade9013674487a1f371da7c038709.zip
Merge branch 'gnome-2-30' into express2
Diffstat (limited to 'composer')
-rw-r--r--composer/e-msg-composer.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index dfcd5b924d..469327214a 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -1603,6 +1603,17 @@ msg_composer_finalize (GObject *object)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
+static gboolean
+msg_composer_delete_event_cb (GtkWidget *widget, gpointer user_data)
+{
+ /* This is needed for the ACTION macro. */
+ EMsgComposer *composer = E_MSG_COMPOSER (widget);
+
+ gtk_action_activate (ACTION (CLOSE));
+
+ return FALSE;
+}
+
static void
msg_composer_constructed (GObject *object)
{
@@ -1640,7 +1651,10 @@ msg_composer_constructed (GObject *object)
gtk_window_set_title (GTK_WINDOW (composer), _("Compose Message"));
gtk_window_set_icon_name (GTK_WINDOW (composer), "mail-message-new");
-
+
+ g_signal_connect (object, "delete-event",
+ G_CALLBACK (msg_composer_delete_event_cb), NULL);
+
e_shell_adapt_window_size (shell, GTK_WINDOW (composer));
e_shell_watch_window (shell, GTK_WINDOW (object));
@@ -1796,18 +1810,6 @@ msg_composer_map (GtkWidget *widget)
gtkhtml_editor_run_command (GTKHTML_EDITOR (widget), "grab-focus");
}
-static gint
-msg_composer_delete_event (GtkWidget *widget,
- GdkEventAny *event)
-{
- /* This is needed for the ACTION macro. */
- EMsgComposer *composer = E_MSG_COMPOSER (widget);
-
- gtk_action_activate (ACTION (CLOSE));
-
- return TRUE;
-}
-
static gboolean
msg_composer_key_press_event (GtkWidget *widget,
GdkEventKey *event)
@@ -2089,7 +2091,6 @@ msg_composer_class_init (EMsgComposerClass *class)
widget_class = GTK_WIDGET_CLASS (class);
widget_class->map = msg_composer_map;
- widget_class->delete_event = msg_composer_delete_event;
widget_class->key_press_event = msg_composer_key_press_event;
widget_class->drag_motion = msg_composer_drag_motion;
widget_class->drag_data_received = msg_composer_drag_data_received;