Title of composer window is now subject. Closes #4282
This commit is contained in:
parent
3e77cbccde
commit
e8ca0f132c
1 changed files with 9 additions and 0 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue