[geary/wip/email-flag-refinement-redux: 8/14] Scope composer editor shortcuts to the toolbar and web view only



commit dbc867fba57932b66f9e9c7e4df84bccf6143a00
Author: Michael Gratton <mike vee net>
Date:   Wed Feb 13 22:58:01 2019 +1100

    Scope composer editor shortcuts to the toolbar and web view only
    
    This prevents something like Ctrl+I being typed in the subject line
    triggering italic in the editor.

 src/client/composer/composer-widget.vala |  93 ++--
 ui/composer-widget.ui                    | 754 ++++++++++++++++---------------
 2 files changed, 443 insertions(+), 404 deletions(-)
---
diff --git a/src/client/composer/composer-widget.vala b/src/client/composer/composer-widget.vala
index 754ee573..a3f619b0 100644
--- a/src/client/composer/composer-widget.vala
+++ b/src/client/composer/composer-widget.vala
@@ -91,8 +91,7 @@ public class ComposerWidget : Gtk.EventBox, Geary.BaseInterface {
         ACTION_OLIST, ACTION_ULIST
     };
 
-    private const ActionEntry[] action_entries = {
-        // Editor commands
+    private const ActionEntry[] editor_action_entries = {
         {ACTION_UNDO,                     on_undo                                       },
         {ACTION_REDO,                     on_redo                                       },
         {ACTION_CUT,                      on_cut                                        },
@@ -116,18 +115,20 @@ public class ComposerWidget : Gtk.EventBox, Geary.BaseInterface {
         {ACTION_COLOR,                    on_select_color                               },
         {ACTION_INSERT_IMAGE,             on_insert_image                               },
         {ACTION_INSERT_LINK,              on_insert_link                                },
-        // Composer commands
-        {ACTION_COMPOSE_AS_HTML,          on_toggle_action,        null,   "true",  
on_compose_as_html_toggled },
-        {ACTION_SHOW_EXTENDED,            on_toggle_action,        null,  "false",  on_show_extended_toggled 
  },
+        {ACTION_OPEN_INSPECTOR,           on_open_inspector                             },
+    };
+
+    private const ActionEntry[] composer_action_entries = {
+        {ACTION_ADD_ATTACHMENT,           on_add_attachment                                                  
  },
+        {ACTION_ADD_ORIGINAL_ATTACHMENTS, on_pending_attachments                                             
  },
         {ACTION_CLOSE,                    on_close                                                           
  },
-        {ACTION_CLOSE_AND_SAVE,           on_close_and_save                                                  
  },
         {ACTION_CLOSE_AND_DISCARD,        on_close_and_discard                                               
  },
+        {ACTION_CLOSE_AND_SAVE,           on_close_and_save                                                  
  },
+        {ACTION_COMPOSE_AS_HTML,          on_toggle_action,        null,   "true",  
on_compose_as_html_toggled },
         {ACTION_DETACH,                   on_detach                                                          
  },
-        {ACTION_SEND,                     on_send                                                            
  },
-        {ACTION_ADD_ATTACHMENT,           on_add_attachment                                                  
  },
-        {ACTION_ADD_ORIGINAL_ATTACHMENTS, on_pending_attachments                                             
  },
         {ACTION_SELECT_DICTIONARY,        on_select_dictionary                                               
  },
-        {ACTION_OPEN_INSPECTOR,           on_open_inspector                                                  
  },
+        {ACTION_SEND,                     on_send                                                            
  },
+        {ACTION_SHOW_EXTENDED,            on_toggle_action,        null,  "false",  on_show_extended_toggled 
  },
     };
 
     public static Gee.MultiMap<string, string> action_accelerators = new Gee.HashMultiMap<string, string>();
@@ -250,6 +251,9 @@ public class ComposerWidget : Gtk.EventBox, Geary.BaseInterface {
     [GtkChild]
     internal Gtk.Grid editor_container;
 
+    [GtkChild]
+    internal Gtk.Grid body_container;
+
     [GtkChild]
     private Gtk.Label from_label;
     [GtkChild]
@@ -320,7 +324,8 @@ public class ComposerWidget : Gtk.EventBox, Geary.BaseInterface {
     [GtkChild]
     private Gtk.Box message_area;
 
-    private SimpleActionGroup actions = new SimpleActionGroup();
+    private SimpleActionGroup composer_actions = new SimpleActionGroup();
+    private SimpleActionGroup editor_actions = new SimpleActionGroup();
 
     private Menu html_menu;
     private Menu plain_menu;
@@ -457,7 +462,7 @@ public class ComposerWidget : Gtk.EventBox, Geary.BaseInterface {
         this.editor.set_vexpand(true);
         this.editor.show();
 
-        this.editor_container.add(this.editor);
+        this.body_container.add(this.editor);
 
         // Initialize menus
         Gtk.Builder builder = new Gtk.Builder.from_resource(
@@ -807,18 +812,31 @@ public class ComposerWidget : Gtk.EventBox, Geary.BaseInterface {
 
     // Initializes all actions and adds them to the action group
     private void initialize_actions() {
-        this.actions.add_action_entries(action_entries, this);
-
-        // Main actions should use 'win' prefix so they override main
-        // window action. But for some reason, we can't use the same
-        // prefix for the headerbar.
-        insert_action_group("win", this.actions);
-        this.header.insert_action_group("cmh", this.actions);
+        // Composer actions
+        this.composer_actions.add_action_entries(
+            ComposerWidget.composer_action_entries, this
+        );
+        // Main actions use 'win' prefix so they override main window
+        // action. But for some reason, we can't use the same prefix
+        // for the headerbar.
+        insert_action_group("win", this.composer_actions);
+        this.header.insert_action_group("cmh", this.composer_actions);
+
+        // Editor actions - scoped to the editor only. Need to include
+        // composer actions however since if not found in this group,
+        // ancestors (including the composer's) will not be consulted.
+        this.editor_actions.add_action_entries(
+            ComposerWidget.composer_action_entries, this
+        );
+        this.editor_actions.add_action_entries(
+            ComposerWidget.editor_action_entries, this
+        );
+        this.editor_container.insert_action_group("win", this.editor_actions);
 
-        this.actions.change_action_state(
+        this.composer_actions.change_action_state(
             ACTION_SHOW_EXTENDED, false
         );
-        this.actions.change_action_state(
+        this.composer_actions.change_action_state(
             ACTION_COMPOSE_AS_HTML, this.config.compose_as_html
         );
 
@@ -1183,7 +1201,7 @@ public class ComposerWidget : Gtk.EventBox, Geary.BaseInterface {
         // conversation back in the main window. The workaround here
         // sets a new menu model and hence the menu_button constructs
         // a new popover.
-        this.actions.change_action_state(ACTION_COMPOSE_AS_HTML,
+        this.composer_actions.change_action_state(ACTION_COMPOSE_AS_HTML,
             GearyApplication.instance.config.compose_as_html);
 
         this.state = ComposerWidget.ComposerState.DETACHED;
@@ -1672,7 +1690,7 @@ public class ComposerWidget : Gtk.EventBox, Geary.BaseInterface {
                 // the Enter leaking through to the controls, but only
                 // send if send is available
                 if ((event.state & Gdk.ModifierType.CONTROL_MASK) != 0) {
-                    this.actions.activate_action(ACTION_SEND, null);
+                    this.composer_actions.activate_action(ACTION_SEND, null);
                     ret = Gdk.EVENT_STOP;
                 }
             break;
@@ -2019,8 +2037,12 @@ public class ComposerWidget : Gtk.EventBox, Geary.BaseInterface {
      * Helper method, returns a composer action.
      * @param action_name - The name of the action (as found in action_entries)
      */
-    public SimpleAction? get_action(string action_name) {
-        return this.actions.lookup_action(action_name) as SimpleAction;
+    public GLib.SimpleAction? get_action(string action_name) {
+        GLib.Action? action = this.composer_actions.lookup_action(action_name);
+        if (action == null) {
+            action = this.editor_actions.lookup_action(action_name);
+        }
+        return action as SimpleAction;
     }
 
     private bool add_account_emails_to_from_list(Geary.Account other_account, bool set_active = false) {
@@ -2240,7 +2262,8 @@ public class ComposerWidget : Gtk.EventBox, Geary.BaseInterface {
         // without the popover immediately appearing and raining on
         // their text selection parade.
         if (this.pointer_url != null &&
-            this.actions.get_action_state(ACTION_COMPOSE_AS_HTML).get_boolean()) {
+            this.composer_actions.get_action_state(ACTION_COMPOSE_AS_HTML)
+                .get_boolean()) {
             Gdk.EventButton? button = (Gdk.EventButton) event;
             Gdk.Rectangle location = Gdk.Rectangle();
             location.x = (int) button.x;
@@ -2262,31 +2285,33 @@ public class ComposerWidget : Gtk.EventBox, Geary.BaseInterface {
         this.cursor_url = context.is_link ? context.link_url : null;
         update_cursor_actions();
 
-        this.actions.change_action_state(ACTION_FONT_FAMILY, context.font_family);
+        this.editor_actions.change_action_state(
+            ACTION_FONT_FAMILY, context.font_family
+        );
 
         if (context.font_size < 11)
-            this.actions.change_action_state(ACTION_FONT_SIZE, "small");
+            this.editor_actions.change_action_state(ACTION_FONT_SIZE, "small");
         else if (context.font_size > 20)
-            this.actions.change_action_state(ACTION_FONT_SIZE, "large");
+            this.editor_actions.change_action_state(ACTION_FONT_SIZE, "large");
         else
-            this.actions.change_action_state(ACTION_FONT_SIZE, "medium");
+            this.editor_actions.change_action_state(ACTION_FONT_SIZE, "medium");
     }
 
     private void on_typing_attributes_changed() {
         uint mask = this.editor.get_editor_state().get_typing_attributes();
-        this.actions.change_action_state(
+        this.editor_actions.change_action_state(
             ACTION_BOLD,
             (mask & WebKit.EditorTypingAttributes.BOLD) == WebKit.EditorTypingAttributes.BOLD
         );
-        this.actions.change_action_state(
+        this.editor_actions.change_action_state(
             ACTION_ITALIC,
             (mask & WebKit.EditorTypingAttributes.ITALIC) == WebKit.EditorTypingAttributes.ITALIC
         );
-        this.actions.change_action_state(
+        this.editor_actions.change_action_state(
             ACTION_UNDERLINE,
             (mask & WebKit.EditorTypingAttributes.UNDERLINE) == WebKit.EditorTypingAttributes.UNDERLINE
         );
-        this.actions.change_action_state(
+        this.editor_actions.change_action_state(
             ACTION_STRIKETHROUGH,
             (mask & WebKit.EditorTypingAttributes.STRIKETHROUGH) == 
WebKit.EditorTypingAttributes.STRIKETHROUGH
         );
diff --git a/ui/composer-widget.ui b/ui/composer-widget.ui
index d22e881c..6b9eb834 100644
--- a/ui/composer-widget.ui
+++ b/ui/composer-widget.ui
@@ -329,33 +329,71 @@
           </packing>
         </child>
         <child>
-          <object class="GtkBox" id="composer_toolbar">
+          <object class="GtkGrid" id="editor_container">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="margin_start">6</property>
-            <property name="margin_end">6</property>
-            <property name="spacing">6</property>
             <child>
-              <object class="GtkBox" id="command_buttons">
+              <object class="GtkBox" id="composer_toolbar">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
+                <property name="margin_start">6</property>
+                <property name="margin_end">6</property>
+                <property name="spacing">6</property>
                 <child>
-                  <object class="GtkButton">
+                  <object class="GtkBox" id="command_buttons">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="focus_on_click">False</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Undo last edit (Ctrl+Z)</property>
-                    <property name="action_name">win.undo</property>
-                    <property name="always_show_image">True</property>
+                    <property name="can_focus">False</property>
                     <child>
-                      <object class="GtkImage">
+                      <object class="GtkButton">
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="pixel_size">16</property>
-                        <property name="icon_name">edit-undo-symbolic</property>
+                        <property name="can_focus">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="receives_default">False</property>
+                        <property name="tooltip_text" translatable="yes">Undo last edit (Ctrl+Z)</property>
+                        <property name="action_name">win.undo</property>
+                        <property name="always_show_image">True</property>
+                        <child>
+                          <object class="GtkImage">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="pixel_size">16</property>
+                            <property name="icon_name">edit-undo-symbolic</property>
+                          </object>
+                        </child>
                       </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
                     </child>
+                    <child>
+                      <object class="GtkButton">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="receives_default">False</property>
+                        <property name="tooltip_text" translatable="yes">Redo last edit  
(Ctrl+Shift+Z)</property>
+                        <property name="action_name">win.redo</property>
+                        <property name="always_show_image">True</property>
+                        <child>
+                          <object class="GtkImage">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="pixel_size">16</property>
+                            <property name="icon_name">edit-redo-symbolic</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <style>
+                      <class name="linked"/>
+                    </style>
                   </object>
                   <packing>
                     <property name="expand">False</property>
@@ -364,84 +402,108 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton">
+                  <object class="GtkBox" id="font_style_buttons">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="focus_on_click">False</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Redo last edit  
(Ctrl+Shift+Z)</property>
-                    <property name="action_name">win.redo</property>
-                    <property name="always_show_image">True</property>
+                    <property name="can_focus">False</property>
                     <child>
-                      <object class="GtkImage">
+                      <object class="GtkToggleButton" id="bold_button">
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="pixel_size">16</property>
-                        <property name="icon_name">edit-redo-symbolic</property>
+                        <property name="can_focus">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="receives_default">False</property>
+                        <property name="tooltip_text" translatable="yes">Bold (Ctrl+B)</property>
+                        <property name="action_name">win.bold</property>
+                        <property name="always_show_image">True</property>
+                        <child>
+                          <object class="GtkImage" id="bold_image">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="pixel_size">16</property>
+                            <property name="icon_name">format-text-bold-symbolic</property>
+                          </object>
+                        </child>
                       </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
                     </child>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-                <style>
-                  <class name="linked"/>
-                </style>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkBox" id="font_style_buttons">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <child>
-                  <object class="GtkToggleButton" id="bold_button">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="focus_on_click">False</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Bold (Ctrl+B)</property>
-                    <property name="action_name">win.bold</property>
-                    <property name="always_show_image">True</property>
                     <child>
-                      <object class="GtkImage" id="bold_image">
+                      <object class="GtkToggleButton" id="italics_button">
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="pixel_size">16</property>
-                        <property name="icon_name">format-text-bold-symbolic</property>
+                        <property name="can_focus">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="receives_default">False</property>
+                        <property name="tooltip_text" translatable="yes">Italic (Ctrl+I)</property>
+                        <property name="action_name">win.italic</property>
+                        <property name="always_show_image">True</property>
+                        <child>
+                          <object class="GtkImage" id="italics_image">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="pixel_size">16</property>
+                            <property name="icon_name">format-text-italic-symbolic</property>
+                          </object>
+                        </child>
                       </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="GtkToggleButton" id="italics_button">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="focus_on_click">False</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Italic (Ctrl+I)</property>
-                    <property name="action_name">win.italic</property>
-                    <property name="always_show_image">True</property>
                     <child>
-                      <object class="GtkImage" id="italics_image">
+                      <object class="GtkToggleButton" id="underline_button">
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="pixel_size">16</property>
-                        <property name="icon_name">format-text-italic-symbolic</property>
+                        <property name="can_focus">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="receives_default">False</property>
+                        <property name="tooltip_text" translatable="yes">Underline (Ctrl+U)</property>
+                        <property name="action_name">win.underline</property>
+                        <property name="always_show_image">True</property>
+                        <child>
+                          <object class="GtkImage" id="underline_image">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="pixel_size">16</property>
+                            <property name="icon_name">format-text-underline-symbolic</property>
+                          </object>
+                        </child>
                       </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">2</property>
+                      </packing>
                     </child>
+                    <child>
+                      <object class="GtkToggleButton" id="strikethrough_button">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="receives_default">False</property>
+                        <property name="tooltip_text" translatable="yes">Strikethrough (Ctrl+K)</property>
+                        <property name="action_name">win.strikethrough</property>
+                        <property name="always_show_image">True</property>
+                        <child>
+                          <object class="GtkImage" id="strikethrough_image">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="pixel_size">16</property>
+                            <property name="icon_name">format-text-strikethrough-symbolic</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">3</property>
+                      </packing>
+                    </child>
+                    <style>
+                      <class name="linked"/>
+                    </style>
                   </object>
                   <packing>
                     <property name="expand">False</property>
@@ -450,22 +512,60 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkToggleButton" id="underline_button">
+                  <object class="GtkBox" id="list_buttons">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="focus_on_click">False</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Underline (Ctrl+U)</property>
-                    <property name="action_name">win.underline</property>
-                    <property name="always_show_image">True</property>
+                    <property name="can_focus">False</property>
                     <child>
-                      <object class="GtkImage" id="underline_image">
+                      <object class="GtkButton" id="ulist_button">
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="pixel_size">16</property>
-                        <property name="icon_name">format-text-underline-symbolic</property>
+                        <property name="can_focus">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="receives_default">False</property>
+                        <property name="tooltip_text" translatable="yes">Insert unordered list</property>
+                        <property name="action_name">win.ulist</property>
+                        <property name="always_show_image">True</property>
+                        <child>
+                          <object class="GtkImage" id="ulist_image">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="pixel_size">16</property>
+                            <property name="icon_name">format-unordered-list-symbolic</property>
+                          </object>
+                        </child>
                       </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
                     </child>
+                    <child>
+                      <object class="GtkButton" id="olist_button">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="receives_default">False</property>
+                        <property name="tooltip_text" translatable="yes">Insert ordered list</property>
+                        <property name="action_name">win.olist</property>
+                        <property name="always_show_image">True</property>
+                        <child>
+                          <object class="GtkImage" id="olist_image">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="pixel_size">16</property>
+                            <property name="icon_name">format-ordered-list-symbolic</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <style>
+                      <class name="linked"/>
+                    </style>
                   </object>
                   <packing>
                     <property name="expand">False</property>
@@ -474,22 +574,60 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkToggleButton" id="strikethrough_button">
+                  <object class="GtkBox" id="indentation_buttons">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="focus_on_click">False</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Strikethrough (Ctrl+K)</property>
-                    <property name="action_name">win.strikethrough</property>
-                    <property name="always_show_image">True</property>
+                    <property name="can_focus">False</property>
                     <child>
-                      <object class="GtkImage" id="strikethrough_image">
+                      <object class="GtkButton" id="indent_button">
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="pixel_size">16</property>
-                        <property name="icon_name">format-text-strikethrough-symbolic</property>
+                        <property name="can_focus">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="receives_default">False</property>
+                        <property name="tooltip_text" translatable="yes">Quote text  (Ctrl+])</property>
+                        <property name="action_name">win.indent</property>
+                        <property name="always_show_image">True</property>
+                        <child>
+                          <object class="GtkImage" id="indent_image">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="pixel_size">16</property>
+                            <property name="icon_name">format-indent-more-symbolic</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="outdent_button">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="receives_default">False</property>
+                        <property name="tooltip_text" translatable="yes">Unquote text  (Ctrl+[)</property>
+                        <property name="action_name">win.outdent</property>
+                        <property name="always_show_image">True</property>
+                        <child>
+                          <object class="GtkImage" id="outdent_image">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="pixel_size">16</property>
+                            <property name="icon_name">format-indent-less-symbolic</property>
+                          </object>
+                        </child>
                       </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
                     </child>
+                    <style>
+                      <class name="linked"/>
+                    </style>
                   </object>
                   <packing>
                     <property name="expand">False</property>
@@ -497,378 +635,254 @@
                     <property name="position">3</property>
                   </packing>
                 </child>
-                <style>
-                  <class name="linked"/>
-                </style>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkBox" id="list_buttons">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
                 <child>
-                  <object class="GtkButton" id="ulist_button">
+                  <object class="GtkBox" id="insert_buttons">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="focus_on_click">False</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Insert unordered list</property>
-                    <property name="action_name">win.ulist</property>
-                    <property name="always_show_image">True</property>
+                    <property name="can_focus">False</property>
                     <child>
-                      <object class="GtkImage" id="ulist_image">
+                      <object class="GtkButton" id="insert_link_button">
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="pixel_size">16</property>
-                        <property name="icon_name">format-unordered-list-symbolic</property>
+                        <property name="can_focus">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="receives_default">False</property>
+                        <property name="tooltip_text" translatable="yes">Insert or update selection link 
(Ctrl+L)</property>
+                        <property name="action_name">win.insert-link</property>
+                        <property name="always_show_image">True</property>
+                        <child>
+                          <object class="GtkImage" id="insert_link_image">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="pixel_size">16</property>
+                            <property name="icon_name">insert-link-symbolic</property>
+                          </object>
+                        </child>
                       </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</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="GtkButton" id="olist_button">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="focus_on_click">False</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Insert ordered list</property>
-                    <property name="action_name">win.olist</property>
-                    <property name="always_show_image">True</property>
                     <child>
-                      <object class="GtkImage" id="olist_image">
+                      <object class="GtkButton" id="insert_image_button">
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="pixel_size">16</property>
-                        <property name="icon_name">format-ordered-list-symbolic</property>
+                        <property name="can_focus">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="receives_default">False</property>
+                        <property name="tooltip_text" translatable="yes">Insert an image (Ctrl+G)</property>
+                        <property name="action_name">win.insert-image</property>
+                        <property name="always_show_image">True</property>
+                        <child>
+                          <object class="GtkImage">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="pixel_size">16</property>
+                            <property name="icon_name">insert-image-symbolic</property>
+                          </object>
+                        </child>
                       </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
                     </child>
+                    <style>
+                      <class name="linked"/>
+                    </style>
                   </object>
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">True</property>
-                    <property name="position">1</property>
+                    <property name="position">4</property>
                   </packing>
                 </child>
-                <style>
-                  <class name="linked"/>
-                </style>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkBox" id="indentation_buttons">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
                 <child>
-                  <object class="GtkButton" id="indent_button">
+                  <object class="GtkButton" id="remove_format_button">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="focus_on_click">False</property>
                     <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Quote text  (Ctrl+])</property>
-                    <property name="action_name">win.indent</property>
+                    <property name="tooltip_text" translatable="yes">Remove selection formatting 
(Ctrl+Space)</property>
+                    <property name="action_name">win.remove-format</property>
                     <property name="always_show_image">True</property>
                     <child>
-                      <object class="GtkImage" id="indent_image">
+                      <object class="GtkImage" id="remove_format_image">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="pixel_size">16</property>
-                        <property name="icon_name">format-indent-more-symbolic</property>
+                        <property name="icon_name">format-text-remove-symbolic</property>
                       </object>
                     </child>
                   </object>
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">True</property>
-                    <property name="position">0</property>
+                    <property name="position">5</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton" id="outdent_button">
+                  <object class="GtkButton" id="select_dictionary_button">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="focus_on_click">False</property>
                     <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Unquote text  (Ctrl+[)</property>
-                    <property name="action_name">win.outdent</property>
+                    <property name="tooltip_text" translatable="yes">Select spell checking 
languages</property>
+                    <property name="action_name">win.select-dictionary</property>
                     <property name="always_show_image">True</property>
                     <child>
-                      <object class="GtkImage" id="outdent_image">
+                      <object class="GtkImage" id="select_dictionary_image">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="pixel_size">16</property>
-                        <property name="icon_name">format-indent-less-symbolic</property>
+                        <property name="icon_name">accessories-dictionary-symbolic</property>
                       </object>
                     </child>
                   </object>
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">True</property>
-                    <property name="position">1</property>
+                    <property name="position">6</property>
                   </packing>
                 </child>
-                <style>
-                  <class name="linked"/>
-                </style>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">3</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkBox" id="insert_buttons">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
                 <child>
-                  <object class="GtkButton" id="insert_link_button">
+                  <object class="GtkMenuButton" id="menu_button">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
+                    <property name="can_focus">False</property>
                     <property name="focus_on_click">False</property>
                     <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Insert or update selection link 
(Ctrl+L)</property>
-                    <property name="action_name">win.insert-link</property>
-                    <property name="always_show_image">True</property>
                     <child>
-                      <object class="GtkImage" id="insert_link_image">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="pixel_size">16</property>
-                        <property name="icon_name">insert-link-symbolic</property>
-                      </object>
+                      <placeholder/>
                     </child>
                   </object>
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">True</property>
-                    <property name="position">0</property>
+                    <property name="pack_type">end</property>
+                    <property name="position">7</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton" id="insert_image_button">
+                  <object class="GtkLabel" id="info_label">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="focus_on_click">False</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Insert an image (Ctrl+G)</property>
-                    <property name="action_name">win.insert-image</property>
-                    <property name="always_show_image">True</property>
-                    <child>
-                      <object class="GtkImage">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="pixel_size">16</property>
-                        <property name="icon_name">insert-image-symbolic</property>
-                      </object>
-                    </child>
+                    <property name="ellipsize">end</property>
+                    <property name="width_chars">6</property>
+                    <property name="xalign">0</property>
+                    <style>
+                      <class name="dim-label"/>
+                    </style>
                   </object>
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">True</property>
-                    <property name="position">1</property>
+                    <property name="pack_type">end</property>
+                    <property name="position">8</property>
                   </packing>
                 </child>
-                <style>
-                  <class name="linked"/>
-                </style>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">4</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="remove_format_button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="focus_on_click">False</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Remove selection formatting 
(Ctrl+Space)</property>
-                <property name="action_name">win.remove-format</property>
-                <property name="always_show_image">True</property>
-                <child>
-                  <object class="GtkImage" id="remove_format_image">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="pixel_size">16</property>
-                    <property name="icon_name">format-text-remove-symbolic</property>
-                  </object>
-                </child>
               </object>
               <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">5</property>
+                <property name="left_attach">0</property>
+                <property name="top_attach">0</property>
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="select_dictionary_button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="focus_on_click">False</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Select spell checking languages</property>
-                <property name="action_name">win.select-dictionary</property>
-                <property name="always_show_image">True</property>
-                <child>
-                  <object class="GtkImage" id="select_dictionary_image">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="pixel_size">16</property>
-                    <property name="icon_name">accessories-dictionary-symbolic</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">6</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkMenuButton" id="menu_button">
+              <object class="GtkFrame">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="focus_on_click">False</property>
-                <property name="receives_default">False</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">in</property>
                 <child>
-                  <placeholder/>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="pack_type">end</property>
-                <property name="position">7</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="info_label">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="ellipsize">end</property>
-                <property name="width_chars">6</property>
-                <property name="xalign">0</property>
-                <style>
-                  <class name="dim-label"/>
-                </style>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="pack_type">end</property>
-                <property name="position">8</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">3</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkFrame">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="label_xalign">0</property>
-            <property name="shadow_type">in</property>
-            <child>
-              <object class="GtkBox" id="message_area">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <child>
-                  <object class="GtkOverlay" id="message_overlay">
+                  <object class="GtkBox" id="message_area">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <child>
-                      <object class="GtkGrid" id="editor_container">
-                        <property name="height_request">250</property>
+                      <object class="GtkOverlay" id="message_overlay">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <child>
-                          <placeholder/>
-                        </child>
-                        <child>
-                          <placeholder/>
-                        </child>
-                        <child>
-                          <placeholder/>
-                        </child>
-                        <child>
-                          <placeholder/>
-                        </child>
-                        <child>
-                          <placeholder/>
-                        </child>
-                        <child>
-                          <placeholder/>
-                        </child>
-                        <child>
-                          <placeholder/>
-                        </child>
-                        <child>
-                          <placeholder/>
+                          <object class="GtkGrid" id="body_container">
+                            <property name="height_request">250</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="index">-1</property>
+                          </packing>
                         </child>
-                        <child>
-                          <placeholder/>
+                        <child type="overlay">
+                          <object class="GtkLabel" id="message_overlay_label">
+                            <property name="can_focus">False</property>
+                            <property name="no_show_all">True</property>
+                            <property name="halign">start</property>
+                            <property name="valign">end</property>
+                            <property name="ellipsize">middle</property>
+                            <style>
+                              <class name="geary-overlay"/>
+                            </style>
+                          </object>
                         </child>
                       </object>
                       <packing>
-                        <property name="index">-1</property>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
                       </packing>
                     </child>
-                    <child type="overlay">
-                      <object class="GtkLabel" id="message_overlay_label">
-                        <property name="can_focus">False</property>
-                        <property name="no_show_all">True</property>
-                        <property name="halign">start</property>
-                        <property name="valign">end</property>
-                        <property name="ellipsize">middle</property>
-                        <style>
-                          <class name="geary-overlay"/>
-                        </style>
-                      </object>
-                    </child>
                   </object>
-                  <packing>
-                    <property name="expand">True</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
-                  </packing>
                 </child>
+                <style>
+                  <class name="geary-composer-body"/>
+                </style>
               </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">1</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
             </child>
-            <style>
-              <class name="geary-composer-body"/>
-            </style>
           </object>
           <packing>
-            <property name="expand">True</property>
+            <property name="expand">False</property>
             <property name="fill">True</property>
-            <property name="position">4</property>
+            <property name="position">3</property>
           </packing>
         </child>
         <child>
           <object class="GtkBox" id="attachments_box">
             <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_start">6</property>
             <property name="margin_end">6</property>
             <property name="margin_top">6</property>
@@ -882,7 +896,7 @@
           <packing>
             <property name="expand">False</property>
             <property name="fill">True</property>
-            <property name="position">5</property>
+            <property name="position">4</property>
           </packing>
         </child>
       </object>


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