diff --git a/src/client/ui/composer-window.vala b/src/client/ui/composer-window.vala index b2ddaadd..75fc44d1 100644 --- a/src/client/ui/composer-window.vala +++ b/src/client/ui/composer-window.vala @@ -6,6 +6,7 @@ // Window for sending messages. public class ComposerWindow : Gtk.Window { + private static string DEFAULT_TITLE = _("New Message"); private Gtk.Entry to_entry; private Gtk.Entry cc_entry; @@ -54,6 +55,9 @@ public class ComposerWindow : Gtk.Window { subject_entry = builder.get_object("subject") as Gtk.Entry; message_text = builder.get_object("message") as Gtk.TextView; + title = DEFAULT_TITLE; + subject_entry.changed.connect(on_subject_changed); + add(box); } @@ -67,4 +71,9 @@ public class ComposerWindow : Gtk.Window { send(this); } + private void on_subject_changed() { + title = Geary.String.is_empty(subject_entry.text.strip()) ? DEFAULT_TITLE : + subject_entry.text.strip(); + } + }