Title of composer window is now subject. Closes #4282

This commit is contained in:
Eric Gregory 2011-10-24 17:07:54 -07:00
parent 3e77cbccde
commit e8ca0f132c

View file

@ -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();
}
}