aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-msg-composer.c
diff options
context:
space:
mode:
authorJason Leach <jasonleach@usa.net>2001-01-18 11:15:16 +0800
committerJacob Leach <jleach@src.gnome.org>2001-01-18 11:15:16 +0800
commit809a9d80148789de20f4d00ec49dce7ead5a3399 (patch)
tree38c36623b45e568243d3675795278a5cca88063c /composer/e-msg-composer.c
parentd184f178b8ede3b173789195ba22a243da08fc42 (diff)
downloadgsoc2013-evolution-809a9d80148789de20f4d00ec49dce7ead5a3399.tar
gsoc2013-evolution-809a9d80148789de20f4d00ec49dce7ead5a3399.tar.gz
gsoc2013-evolution-809a9d80148789de20f4d00ec49dce7ead5a3399.tar.bz2
gsoc2013-evolution-809a9d80148789de20f4d00ec49dce7ead5a3399.tar.lz
gsoc2013-evolution-809a9d80148789de20f4d00ec49dce7ead5a3399.tar.xz
gsoc2013-evolution-809a9d80148789de20f4d00ec49dce7ead5a3399.tar.zst
gsoc2013-evolution-809a9d80148789de20f4d00ec49dce7ead5a3399.zip
(Bug #1192: Set the Composer window title to something useful)
2001-01-17 Jason Leach <jasonleach@usa.net> (Bug #1192: Set the Composer window title to something useful) * e-msg-composer.c (e_msg_composer_construct): Connect up the new signal here. (subject_changed_cb): Set the composer window title to the subject as it's changed, or if it goes blank make it the default "Compose a message". * e-msg-composer-hdrs.c (class_init): Create a new signal "subject_changed". (entry_changed): Emit the signal here when the subject entry is changed. svn path=/trunk/; revision=7610
Diffstat (limited to 'composer/e-msg-composer.c')
-rw-r--r--composer/e-msg-composer.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 539d0d4f8b..2b12abad04 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -1142,6 +1142,23 @@ attachment_bar_changed_cb (EMsgComposerAttachmentBar *bar,
e_msg_composer_show_attachments (composer, FALSE);
}
+static void
+subject_changed_cb (EMsgComposerHdrs *hdrs,
+ gchar *subject,
+ void *data)
+{
+ EMsgComposer *composer;
+
+ composer = E_MSG_COMPOSER (data);
+
+ if (strlen (subject))
+ gtk_window_set_title (GTK_WINDOW (composer), subject);
+ else
+ gtk_window_set_title (GTK_WINDOW (composer),
+ _("Compose a message"));
+ g_free (subject);
+}
+
/* GtkObject methods. */
@@ -1373,6 +1390,8 @@ e_msg_composer_construct (EMsgComposer *composer)
composer->hdrs = e_msg_composer_hdrs_new ();
gtk_box_pack_start (GTK_BOX (vbox), composer->hdrs, FALSE, FALSE, 0);
+ gtk_signal_connect (GTK_OBJECT (composer->hdrs), "subject_changed",
+ GTK_SIGNAL_FUNC (subject_changed_cb), composer);
gtk_widget_show (composer->hdrs);
/* Editor component. */
@@ -1418,7 +1437,7 @@ e_msg_composer_construct (EMsgComposer *composer)
gtk_widget_show (vbox);
e_msg_composer_show_attachments (composer, FALSE);
-
+
/* Set focus on the `To:' field.
gtk_widget_grab_focus (e_msg_composer_hdrs_get_to_entry (E_MSG_COMPOSER_HDRS (composer->hdrs)));