Added a Cancel button to the composer window. Closes #5794.
This commit is contained in:
parent
e4a88d124a
commit
dfbf5cd955
2 changed files with 27 additions and 0 deletions
|
|
@ -100,6 +100,7 @@ public class ComposerWindow : Gtk.Window {
|
|||
private EmailEntry cc_entry;
|
||||
private EmailEntry bcc_entry;
|
||||
private Gtk.Entry subject_entry;
|
||||
private Gtk.Button cancel_button;
|
||||
private Gtk.Button send_button;
|
||||
private Gtk.ToggleToolButton font_button;
|
||||
private Gtk.ToggleToolButton font_size_button;
|
||||
|
|
@ -146,6 +147,8 @@ public class ComposerWindow : Gtk.Window {
|
|||
Gtk.Builder builder = GearyApplication.instance.create_builder("composer.glade");
|
||||
|
||||
Gtk.Box box = builder.get_object("composer") as Gtk.Box;
|
||||
cancel_button = builder.get_object("Cancel") as Gtk.Button;
|
||||
cancel_button.clicked.connect(on_cancel);
|
||||
send_button = builder.get_object("Send") as Gtk.Button;
|
||||
send_button.clicked.connect(on_send);
|
||||
add_attachment_button = builder.get_object("add_attachment_button") as Gtk.Button;
|
||||
|
|
@ -485,6 +488,11 @@ public class ComposerWindow : Gtk.Window {
|
|||
return !should_close();
|
||||
}
|
||||
|
||||
private void on_cancel() {
|
||||
if (should_close())
|
||||
destroy();
|
||||
}
|
||||
|
||||
private void on_send() {
|
||||
linkify_document(editor.get_dom_document());
|
||||
send(this);
|
||||
|
|
|
|||
|
|
@ -628,10 +628,29 @@
|
|||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">3</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button1">
|
||||
<property name="label">gtk-cancel</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_stock">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">3</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue