[geary] Use HeaderBars for composers



commit 221d8f740094368660658ac1709a06e4ab1ffd53
Author: Robert Schroll <rschroll gmail com>
Date:   Thu Jul 10 02:27:33 2014 -0400

    Use HeaderBars for composers
    
    Move the buttons from the bottom of the composer into the header.  The
    draft save text is moved into the composer toolbar, for lack of a better
    location.  When it's inline, we insert our own close button, so we can
    control what it does.  When it's detached (and not using Unity), we
    enable to default close button.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=731537

 po/POTFILES.in                              |    1 +
 src/CMakeLists.txt                          |    1 +
 src/client/composer/composer-headerbar.vala |   81 +++++++++
 src/client/composer/composer-toolbar.vala   |    8 +
 src/client/composer/composer-widget.vala    |   92 ++++-------
 src/client/composer/composer-window.vala    |   13 ++-
 ui/composer.glade                           |  248 ++++++---------------------
 7 files changed, 191 insertions(+), 253 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 8679e35..5983043 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -31,6 +31,7 @@ src/client/components/status-bar.vala
 src/client/components/stock.vala
 src/client/composer/composer-container.vala
 src/client/composer/composer-embed.vala
+src/client/composer/composer-headerbar.vala
 src/client/composer/composer-widget.vala
 src/client/composer/composer-toolbar.vala
 src/client/composer/composer-window.vala
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 54e10da..7033783 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -326,6 +326,7 @@ client/components/stylish-webview.vala
 
 client/composer/composer-container.vala
 client/composer/composer-embed.vala
+client/composer/composer-headerbar.vala
 client/composer/composer-toolbar.vala
 client/composer/composer-widget.vala
 client/composer/composer-window.vala
diff --git a/src/client/composer/composer-headerbar.vala b/src/client/composer/composer-headerbar.vala
new file mode 100644
index 0000000..3d1f40f
--- /dev/null
+++ b/src/client/composer/composer-headerbar.vala
@@ -0,0 +1,81 @@
+/* Copyright 2014 Yorba Foundation
+ *
+ * This software is licensed under the GNU Lesser General Public License
+ * (version 2.1 or later).  See the COPYING file in this distribution.
+ */
+
+public class ComposerHeaderbar : PillHeaderbar {
+    
+    public ComposerWidget.ComposerState state { get; set; }
+    public bool show_pending_attachments { get; set; default = false; }
+    public bool send_enabled { get; set; default = false; }
+    
+    private Gtk.Button recipients;
+    private Gtk.Label recipients_label;
+    
+    public ComposerHeaderbar(Gtk.ActionGroup action_group) {
+        base(action_group);
+        
+        show_close_button = false;
+        
+        Gtk.Button send_button = create_toolbar_button(null, ComposerWidget.ACTION_SEND, true);
+        send_button.get_style_context().add_class("suggested-action");
+        
+        Gtk.Box win_buttons = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0);
+        Gtk.Button detach_button = create_toolbar_button(null, ComposerWidget.ACTION_DETACH);
+        Gtk.Button close_button = create_toolbar_button(null, ComposerWidget.ACTION_CLOSE);
+        detach_button.set_relief(Gtk.ReliefStyle.NONE);
+        close_button.set_relief(Gtk.ReliefStyle.NONE);
+        win_buttons.pack_end(close_button);
+        win_buttons.pack_end(detach_button);
+        win_buttons.pack_end(new Gtk.Separator(Gtk.Orientation.VERTICAL));
+        
+        Gtk.Box attach_buttons = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0);
+        Gtk.Button attach_only = create_toolbar_button(null, ComposerWidget.ACTION_ADD_ATTACHMENT);
+        Gee.List<Gtk.Button> insert = new Gee.ArrayList<Gtk.Button>();
+        insert.add(create_toolbar_button(null, ComposerWidget.ACTION_ADD_ATTACHMENT));
+        insert.add(create_toolbar_button(null, ComposerWidget.ACTION_ADD_ORIGINAL_ATTACHMENTS));
+        Gtk.Box attach_pending = create_pill_buttons(insert, false);
+        attach_buttons.pack_start(attach_only);
+        attach_buttons.pack_start(attach_pending);
+        
+        recipients = new Gtk.Button();
+        recipients.set_relief(Gtk.ReliefStyle.NONE);
+        recipients_label = new Gtk.Label(null);
+        recipients_label.set_ellipsize(Pango.EllipsizeMode.END);
+        recipients.add(recipients_label);
+        recipients.clicked.connect(() => { state = ComposerWidget.ComposerState.INLINE; });
+        
+        bind_property("state", win_buttons, "visible", BindingFlags.SYNC_CREATE,
+            (binding, source_value, ref target_value) => {
+                target_value = (state != ComposerWidget.ComposerState.DETACHED);
+                return true;
+            });
+        bind_property("state", recipients, "visible", BindingFlags.SYNC_CREATE,
+            (binding, source_value, ref target_value) => {
+                target_value = (state == ComposerWidget.ComposerState.INLINE_COMPACT);
+                return true;
+            });
+        bind_property("show-pending-attachments", attach_only, "visible",
+            BindingFlags.SYNC_CREATE | BindingFlags.INVERT_BOOLEAN);
+        bind_property("show-pending-attachments", attach_pending, "visible",
+            BindingFlags.SYNC_CREATE);
+        bind_property("send-enabled", send_button, "sensitive", BindingFlags.SYNC_CREATE);
+        
+        add_start(attach_buttons);
+        add_start(recipients);
+#if !GTK_3_12
+        add_end(send_button);
+#endif
+        add_end(win_buttons);
+#if GTK_3_12
+        add_end(send_button);
+#endif
+    }
+    
+    public void set_recipients(string label, string tooltip) {
+        recipients_label.label = label;
+        recipients.tooltip_text = tooltip;
+    }
+}
+
diff --git a/src/client/composer/composer-toolbar.vala b/src/client/composer/composer-toolbar.vala
index 4699ddd..943ba61 100644
--- a/src/client/composer/composer-toolbar.vala
+++ b/src/client/composer/composer-toolbar.vala
@@ -5,6 +5,9 @@
  */
 
 public class ComposerToolbar : PillToolbar {
+    
+    public string draft_save_text { get; set; }
+    
     public ComposerToolbar(Gtk.ActionGroup toolbar_action_group, Gtk.Menu menu) {
         base(toolbar_action_group);
         
@@ -37,6 +40,11 @@ public class ComposerToolbar : PillToolbar {
         insert.clear();
         insert.add(create_menu_button(null, menu, ComposerWidget.ACTION_MENU));
         add_end(create_pill_buttons(insert));
+        
+        Gtk.Label draft_save_label = new Gtk.Label(null);
+        draft_save_label.get_style_context().add_class("dim-label");
+        bind_property("draft-save-text", draft_save_label, "label", BindingFlags.SYNC_CREATE);
+        add_end(draft_save_label);
     }
 }
 
diff --git a/src/client/composer/composer-widget.vala b/src/client/composer/composer-widget.vala
index 79f844c..2ef4f25 100644
--- a/src/client/composer/composer-widget.vala
+++ b/src/client/composer/composer-widget.vala
@@ -49,6 +49,10 @@ public class ComposerWidget : Gtk.EventBox {
     public const string ACTION_INSERT_LINK = "insertlink";
     public const string ACTION_COMPOSE_AS_HTML = "compose as html";
     public const string ACTION_CLOSE = "close";
+    public const string ACTION_DETACH = "detach";
+    public const string ACTION_SEND = "send";
+    public const string ACTION_ADD_ATTACHMENT = "add attachment";
+    public const string ACTION_ADD_ORIGINAL_ATTACHMENTS = "add original attachments";
     
     private const string DRAFT_SAVED_TEXT = _("Saved");
     private const string DRAFT_SAVING_TEXT = _("Saving");
@@ -154,6 +158,10 @@ public class ComposerWidget : Gtk.EventBox {
         }
     }
     
+    public ComposerHeaderbar header { get; private set; }
+    
+    public string draft_save_text { get; private set; }
+    
     private ContactListStore? contact_list_store = null;
     
     private string? body_html = null;
@@ -168,21 +176,13 @@ public class ComposerWidget : Gtk.EventBox {
     private EmailEntry cc_entry;
     private EmailEntry bcc_entry;
     public Gtk.Entry subject_entry;
-    private Gtk.Button close_button;
-    private Gtk.Button send_button;
-    private Gtk.Button detach_button;
     private Gtk.Label message_overlay_label;
     private WebKit.DOM.Element? prev_selected_link = null;
-    private Gtk.Separator attachments_separator;
     private Gtk.Box attachments_box;
-    private Gtk.Button add_attachment_button;
-    private Gtk.Button pending_attachments_button;
     private Gtk.Alignment hidden_on_attachment_drag_over;
     private Gtk.Alignment visible_on_attachment_drag_over;
     private Gtk.Widget hidden_on_attachment_drag_over_child;
     private Gtk.Widget visible_on_attachment_drag_over_child;
-    private Gtk.Label compact_header_label;
-    private Gtk.Label draft_save_label;
     
     private Gtk.Menu menu = new Gtk.Menu();
     private Gtk.RadioMenuItem font_small;
@@ -238,27 +238,7 @@ public class ComposerWidget : Gtk.EventBox {
         add_events(Gdk.EventMask.KEY_PRESS_MASK | Gdk.EventMask.KEY_RELEASE_MASK);
         builder = GearyApplication.instance.create_builder("composer.glade");
         
-        // Add the content-view style class for the elementary GTK theme.
-        Gtk.Box button_area = (Gtk.Box) builder.get_object("button_area");
-        button_area.get_style_context().add_class("content-view");
-        
         Gtk.Box box = builder.get_object("composer") as Gtk.Box;
-        close_button = builder.get_object("Close") as Gtk.Button;
-        close_button.clicked.connect(on_close);
-        send_button = builder.get_object("Send") as Gtk.Button;
-        send_button.clicked.connect(on_send);
-        detach_button = builder.get_object("Detach") as Gtk.Button;
-        detach_button.clicked.connect(on_detach);
-        bind_property("state", detach_button, "visible", BindingFlags.SYNC_CREATE,
-            (binding, source_value, ref target_value) => {
-                target_value = (state != ComposerState.DETACHED);
-                return true;
-            });
-        add_attachment_button  = builder.get_object("add_attachment_button") as Gtk.Button;
-        add_attachment_button.clicked.connect(on_add_attachment_button_clicked);
-        pending_attachments_button = builder.get_object("add_pending_attachments") as Gtk.Button;
-        pending_attachments_button.clicked.connect(on_pending_attachments_button_clicked);
-        attachments_separator = builder.get_object("separator") as Gtk.Separator;
         attachments_box = builder.get_object("attachments_box") as Gtk.Box;
         hidden_on_attachment_drag_over = (Gtk.Alignment) 
builder.get_object("hidden_on_attachment_drag_over");
         hidden_on_attachment_drag_over_child = (Gtk.Widget) 
builder.get_object("hidden_on_attachment_drag_over_child");
@@ -272,12 +252,6 @@ public class ComposerWidget : Gtk.EventBox {
                 target_value = (state != ComposerState.INLINE_COMPACT);
                 return true;
             });
-        Gtk.Widget compact_header = builder.get_object("compact_recipients") as Gtk.Widget;
-        bind_property("state", compact_header, "visible", BindingFlags.SYNC_CREATE,
-            (binding, source_value, ref target_value) => {
-                target_value = (state == ComposerState.INLINE_COMPACT);
-                return true;
-            });
         string[] subject_elements = {"subject label", "subject"};
         foreach (string name in subject_elements) {
             Gtk.Widget widget = builder.get_object(name) as Gtk.Widget;
@@ -288,9 +262,6 @@ public class ComposerWidget : Gtk.EventBox {
                 });
         }
         notify["state"].connect((s, p) => { update_from_field(); });
-        compact_header_label = builder.get_object("compact_recipients_label") as Gtk.Label;
-        Gtk.Button expand_button = builder.get_object("expand_button") as Gtk.Button;
-        expand_button.clicked.connect(() => { state = ComposerState.INLINE; });
         // Set the visibilities later, after show_all is called on the widget.
         Idle.add(() => {
             state = state;  // Triggers visibilities
@@ -320,12 +291,15 @@ public class ComposerWidget : Gtk.EventBox {
         set_entry_completions();
         subject_entry = builder.get_object("subject") as Gtk.Entry;
         Gtk.Alignment message_area = builder.get_object("message area") as Gtk.Alignment;
-        draft_save_label = (Gtk.Label) builder.get_object("draft_save_label");
-        draft_save_label.get_style_context().add_class("dim-label");
         actions = builder.get_object("compose actions") as Gtk.ActionGroup;
         // Can only happen after actions exits
         compose_as_html = GearyApplication.instance.config.compose_as_html;
         
+        header = new ComposerHeaderbar(actions);
+        Gtk.Alignment header_area = (Gtk.Alignment) builder.get_object("header_area");
+        header_area.add(header);
+        bind_property("state", header, "state", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL);
+        
         // Listen to account signals to update from menu.
         Geary.Engine.instance.account_available.connect(update_from_field);
         Geary.Engine.instance.account_unavailable.connect(update_from_field);
@@ -360,6 +334,7 @@ public class ComposerWidget : Gtk.EventBox {
         ComposerToolbar composer_toolbar = new ComposerToolbar(actions, menu);
         Gtk.Alignment toolbar_area = (Gtk.Alignment) builder.get_object("toolbar area");
         toolbar_area.add(composer_toolbar);
+        bind_property("draft-save-text", composer_toolbar, "draft-save-text", BindingFlags.SYNC_CREATE);
         
         actions.get_action(ACTION_UNDO).activate.connect(on_action);
         actions.get_action(ACTION_REDO).activate.connect(on_action);
@@ -391,6 +366,11 @@ public class ComposerWidget : Gtk.EventBox {
         
         actions.get_action(ACTION_CLOSE).activate.connect(on_close);
         
+        actions.get_action(ACTION_DETACH).activate.connect(on_detach);
+        actions.get_action(ACTION_SEND).activate.connect(on_send);
+        actions.get_action(ACTION_ADD_ATTACHMENT).activate.connect(on_add_attachment_button_clicked);
+        
actions.get_action(ACTION_ADD_ORIGINAL_ATTACHMENTS).activate.connect(on_pending_attachments_button_clicked);
+        
         ui = new Gtk.UIManager();
         ui.insert_action_group(actions, 0);
         GearyApplication.instance.load_ui_file_for_manager(ui, "composer_accelerators.ui");
@@ -530,8 +510,6 @@ public class ComposerWidget : Gtk.EventBox {
         
         add(box);
         validate_send_button();
-        
-        check_pending_attachments();
 
         // Place the message area before the compose toolbar in the focus chain, so that
         // the user can tab directly from the Subject: field to the message area.
@@ -540,7 +518,6 @@ public class ComposerWidget : Gtk.EventBox {
         chain.append(message_area);
         chain.append(composer_toolbar);
         chain.append(attachments_box);
-        chain.append(button_area);
         box.set_focus_chain(chain);
         
         // If there's only one account, open the drafts folder.  If there's more than one account,
@@ -1030,7 +1007,7 @@ public class ComposerWidget : Gtk.EventBox {
         
         cancel_draft_timer();
         
-        draft_save_label.label = DRAFT_SAVING_TEXT;
+        draft_save_text = DRAFT_SAVING_TEXT;
         
         Geary.EmailFlags flags = new Geary.EmailFlags();
         flags.add(Geary.EmailFlags.DRAFT);
@@ -1041,10 +1018,10 @@ public class ComposerWidget : Gtk.EventBox {
             draft_id = yield drafts_folder.create_email_async(new Geary.RFC822.Message.from_composed_email(
                 get_composed_email(null, true), null), flags, null, draft_id, cancellable);
             
-            draft_save_label.label = DRAFT_SAVED_TEXT;
+            draft_save_text = DRAFT_SAVED_TEXT;
         } catch (Error e) {
             GLib.message("Error saving draft: %s", e.message);
-            draft_save_label.label = DRAFT_ERROR_TEXT;
+            draft_save_text = DRAFT_ERROR_TEXT;
         }
     }
     
@@ -1111,12 +1088,12 @@ public class ComposerWidget : Gtk.EventBox {
         if (pending_attachments != null) {
             foreach (Geary.Attachment attachment in pending_attachments) {
                 if (!attachment_files.contains(attachment.file)) {
-                    pending_attachments_button.show();
+                    header.show_pending_attachments = true;
                     return;
                 }
             }
         }
-        pending_attachments_button.hide();
+        header.show_pending_attachments = false;
     }
     
     private void attachment_failed(string msg) {
@@ -1188,8 +1165,6 @@ public class ComposerWidget : Gtk.EventBox {
         
         show_attachments();
         
-        check_pending_attachments();
-        
         return true;
     }
     
@@ -1210,18 +1185,15 @@ public class ComposerWidget : Gtk.EventBox {
         }
         
         show_attachments();
-        
-        check_pending_attachments();
     }
     
     private void show_attachments() {
         if (attachment_files.size > 0 ) {
             attachments_box.show_all();
-            attachments_separator.show();
         } else {
             attachments_box.hide();
-            attachments_separator.hide();
         }
+        check_pending_attachments();
     }
     
     private void on_subject_changed() {
@@ -1229,13 +1201,13 @@ public class ComposerWidget : Gtk.EventBox {
     }
     
     private void validate_send_button() {
-        send_button.sensitive =
+        header.send_enabled =
             to_entry.valid_or_empty && cc_entry.valid_or_empty && bcc_entry.valid_or_empty
             && (!to_entry.empty || !cc_entry.empty || !bcc_entry.empty);
-        bool tocc = !to_entry.empty && !cc_entry.empty,
-            ccbcc = !(to_entry.empty && cc_entry.empty) && !bcc_entry.empty;
         if (state == ComposerState.INLINE_COMPACT) {
-            compact_header_label.label = to_entry.buffer.text + (tocc ? ", " : "")
+            bool tocc = !to_entry.empty && !cc_entry.empty,
+                ccbcc = !(to_entry.empty && cc_entry.empty) && !bcc_entry.empty;
+            string label = to_entry.buffer.text + (tocc ? ", " : "")
                 + cc_entry.buffer.text + (ccbcc ? ", " : "") + bcc_entry.buffer.text;
             StringBuilder tooltip = new StringBuilder();
             if (to_entry.addresses != null)
@@ -1247,7 +1219,7 @@ public class ComposerWidget : Gtk.EventBox {
             if (bcc_entry.addresses != null)
                 foreach(Geary.RFC822.MailboxAddress addr in bcc_entry.addresses)
                     tooltip.append(_("Bcc: ") + addr.get_full_address() + "\n");
-            compact_header_label.tooltip_text = tooltip.str.slice(0, -1);  // Remove trailing \n
+            header.set_recipients(label, tooltip.str.slice(0, -1));  // Remove trailing \n
         }
         
         reset_draft_timer();
@@ -1645,7 +1617,7 @@ public class ComposerWidget : Gtk.EventBox {
                 // always trap Ctrl+Enter/Ctrl+KeypadEnter to prevent the Enter leaking through
                 // to the controls, but only send if send is available
                 if ((event.state & Gdk.ModifierType.CONTROL_MASK) != 0) {
-                    if (send_button.sensitive)
+                    if (header.send_enabled)
                         on_send();
                     
                     return true;
@@ -1798,7 +1770,7 @@ public class ComposerWidget : Gtk.EventBox {
         if (!can_save())
             return;
         
-        draft_save_label.label = "";
+        draft_save_text = "";
         cancel_draft_timer();
         
         if (drafts_folder != null)
diff --git a/src/client/composer/composer-window.vala b/src/client/composer/composer-window.vala
index e153b24..8e7e57f 100644
--- a/src/client/composer/composer-window.vala
+++ b/src/client/composer/composer-window.vala
@@ -16,11 +16,22 @@ public class ComposerWindow : Gtk.Window, ComposerContainer {
         
         add(composer);
         composer.subject_entry.changed.connect(() => {
-            title = Geary.String.is_empty(composer.subject_entry.text.strip()) ? DEFAULT_TITLE :
+#if ENABLE_UNITY
+            title
+#else
+            composer.header.title
+#endif
+                = Geary.String.is_empty(composer.subject_entry.text.strip()) ? DEFAULT_TITLE :
                 composer.subject_entry.text.strip();
         });
         composer.subject_entry.changed();
         
+#if !ENABLE_UNITY
+        composer.header.show_close_button = true;
+        composer.header.parent.remove(composer.header);
+        set_titlebar(composer.header);
+#endif
+        
         add_accel_group(composer.ui.get_accel_group());
         show();
         set_position(Gtk.WindowPosition.CENTER);
diff --git a/ui/composer.glade b/ui/composer.glade
index 8588aa9..39f9df9 100644
--- a/ui/composer.glade
+++ b/ui/composer.glade
@@ -141,7 +141,9 @@
       </object>
     </child>
     <child>
-      <object class="GtkAction" id="close"/>
+      <object class="GtkAction" id="close">
+        <property name="icon_name">window-close-symbolic</property>
+      </object>
       <accelerator key="w" modifiers="GDK_CONTROL_MASK"/>
     </child>
     <child>
@@ -180,6 +182,38 @@
         <property name="short_label" translatable="yes">Fixed Width</property>
       </object>
     </child>
+    <child>
+      <object class="GtkAction" id="detach">
+        <property name="label" translatable="yes">Detach</property>
+        <property name="short_label" translatable="yes">Detach</property>
+        <property name="tooltip" translatable="yes">Detach</property>
+        <property name="icon_name">window-maximize-symbolic</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="send">
+        <property name="label" translatable="yes">_Send</property>
+        <property name="short_label" translatable="yes">Send</property>
+        <property name="tooltip" translatable="yes">Send</property>
+        <property name="icon_name">mail-send-symbolic</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="add attachment">
+        <property name="label" translatable="yes">_Attach File</property>
+        <property name="short_label" translatable="yes">Attach File</property>
+        <property name="tooltip" translatable="yes">Attach File</property>
+        <property name="icon_name">mail-attachment-symbolic</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="add original attachments">
+        <property name="label" translatable="yes">_Include Original Attachments</property>
+        <property name="short_label" translatable="yes">Include Original Attachments</property>
+        <property name="tooltip" translatable="yes">Include Original Attachments</property>
+        <property name="icon_name">edit-copy-symbolic</property>
+      </object>
+    </child>
   </object>
   <object class="GtkBox" id="composer">
     <property name="visible">True</property>
@@ -187,6 +221,20 @@
     <property name="orientation">vertical</property>
     <property name="spacing">2</property>
     <child>
+      <object class="GtkAlignment" id="header_area">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <child>
+          <placeholder/>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
       <object class="GtkAlignment" id="hidden_on_attachment_drag_over">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
@@ -194,56 +242,15 @@
           <object class="GtkBox" id="hidden_on_attachment_drag_over_child">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="margin_left">6</property>
-            <property name="margin_right">6</property>
-            <property name="margin_top">6</property>
             <property name="orientation">vertical</property>
             <property name="spacing">6</property>
             <child>
-              <object class="GtkBox" id="compact_recipients">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="resize_mode">queue</property>
-                <child>
-                  <object class="GtkButton" id="expand_button">
-                    <property name="label" translatable="no">@</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="tooltip_text" translatable="yes">Edit recipients</property>
-                    <property name="margin_right">6</property>
-                    <property name="xalign">0.54000002145767212</property>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="compact_recipients_label">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label" translatable="no">label</property>
-                    <property name="ellipsize">end</property>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
               <object class="GtkGrid" id="recipients">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
+                <property name="margin_left">6</property>
+                <property name="margin_right">6</property>
+                <property name="margin_top">6</property>
                 <property name="row_spacing">6</property>
                 <property name="column_spacing">6</property>
                 <child>
@@ -440,7 +447,7 @@
       <packing>
         <property name="expand">False</property>
         <property name="fill">True</property>
-        <property name="position">0</property>
+        <property name="position">1</property>
       </packing>
     </child>
     <child>
@@ -489,7 +496,7 @@
       <packing>
         <property name="expand">False</property>
         <property name="fill">False</property>
-        <property name="position">1</property>
+        <property name="position">2</property>
       </packing>
     </child>
     <child>
@@ -505,7 +512,7 @@
       <packing>
         <property name="expand">False</property>
         <property name="fill">True</property>
-        <property name="position">2</property>
+        <property name="position">3</property>
       </packing>
     </child>
     <child>
@@ -530,7 +537,7 @@
       <packing>
         <property name="expand">True</property>
         <property name="fill">True</property>
-        <property name="position">3</property>
+        <property name="position">4</property>
       </packing>
     </child>
     <child>
@@ -550,151 +557,8 @@
       <packing>
         <property name="expand">False</property>
         <property name="fill">True</property>
-        <property name="position">4</property>
-      </packing>
-    </child>
-    <child>
-      <object class="GtkSeparator" id="separator">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="margin_left">6</property>
-        <property name="margin_right">6</property>
-      </object>
-      <packing>
-        <property name="expand">False</property>
-        <property name="fill">True</property>
-        <property name="padding">2</property>
         <property name="position">5</property>
       </packing>
     </child>
-    <child>
-      <object class="GtkButtonBox" id="button_area">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="margin_left">6</property>
-        <property name="margin_right">6</property>
-        <property name="margin_top">6</property>
-        <property name="margin_bottom">6</property>
-        <property name="spacing">8</property>
-        <property name="layout_style">start</property>
-        <child>
-          <object class="GtkButton" id="add_attachment_button">
-            <property name="label" translatable="yes">_Attach File</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="halign">start</property>
-            <property name="valign">center</property>
-            <property name="use_underline">True</property>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">0</property>
-            <property name="non_homogeneous">True</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="add_pending_attachments">
-            <property name="label" translatable="yes">_Include Original Attachments</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="no_show_all">True</property>
-            <property name="halign">start</property>
-            <property name="valign">center</property>
-            <property name="use_underline">True</property>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">1</property>
-            <property name="non_homogeneous">True</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkLabel" id="draft_save_label">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="xalign">0</property>
-            <style>
-              <class name="draft-save-label"/>
-            </style>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">2</property>
-            <property name="non_homogeneous">True</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButtonBox" id="buttonbox1">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="spacing">8</property>
-            <property name="layout_style">start</property>
-            <child>
-              <object class="GtkButton" id="Close">
-                <property name="label" translatable="yes">C_lose</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_underline">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">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="Detach">
-                <property name="label" translatable="yes">Detach</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="focus_on_click">False</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">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="Send">
-                <property name="label" translatable="yes">_Send</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_underline">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>
-            <property name="fill">True</property>
-            <property name="position">3</property>
-            <property name="secondary">True</property>
-          </packing>
-        </child>
-      </object>
-      <packing>
-        <property name="expand">False</property>
-        <property name="fill">True</property>
-        <property name="position">6</property>
-      </packing>
-    </child>
   </object>
 </interface>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]