[geary/wip/composer-shortcuts: 1/4] Replace composer keyboard shortcut with standard widget action scoping



commit 9eead5d14507b6543d957a59ff16b68bab6d61cd
Author: Michael Gratton <mike vee net>
Date:   Wed Feb 13 22:19:44 2019 +1100

    Replace composer keyboard shortcut with standard widget action scoping
    
    Rather than adding and removing shortcuts when the composer's web view
    gains and loses focus to avoid invoking main window shortcuts, just
    rely on standard GTK action scoping rules.
    
    This fixes editing shortcuts like Ctrl+I breaking when clicking on
    toolbar buttons, a crasher because the composer left the undo button
    enabled after it was closed, and allows Escape to close the composer
    from anywherre.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=774651,
    https://bugzilla.gnome.org/show_bug.cgi?id=785187, and
    https://bugzilla.gnome.org/show_bug.cgi?id=741741

 src/client/application/geary-application.vala | 11 +++-
 src/client/composer/composer-box.vala         | 11 +---
 src/client/composer/composer-container.vala   | 77 ---------------------------
 src/client/composer/composer-embed.vala       | 11 ----
 src/client/composer/composer-widget.vala      | 52 +++++++++---------
 src/client/composer/composer-window.vala      |  6 ---
 ui/composer-menus.ui                          | 44 +++++++--------
 ui/composer-widget.ui                         | 56 +++++++++++++------
 8 files changed, 99 insertions(+), 169 deletions(-)
---
diff --git a/src/client/application/geary-application.vala b/src/client/application/geary-application.vala
index a589ad17..79740282 100644
--- a/src/client/application/geary-application.vala
+++ b/src/client/application/geary-application.vala
@@ -235,10 +235,11 @@ public class GearyApplication : Gtk.Application {
         // the other instances called when sending commands to the app via the command-line)
         message("%s %s prefix=%s exec_dir=%s is_installed=%s", NAME, VERSION, INSTALL_PREFIX,
             exec_dir.get_path(), is_installed().to_string());
-        
+
         config = new Configuration(APP_ID);
+        ComposerWidget.add_window_accelerators(this);
         yield controller.open_async(null);
-        
+
         release();
     }
     
@@ -253,6 +254,12 @@ public class GearyApplication : Gtk.Application {
         is_destroyed = true;
     }
 
+    public void add_window_accelerators(string action,
+                                        string[] accelerators,
+                                        Variant? param = null) {
+        set_accels_for_action("win." + action, accelerators);
+    }
+
     public void show_accounts() {
         activate();
 
diff --git a/src/client/composer/composer-box.vala b/src/client/composer/composer-box.vala
index e3116d88..9bf9f3e9 100644
--- a/src/client/composer/composer-box.vala
+++ b/src/client/composer/composer-box.vala
@@ -37,17 +37,10 @@ public class ComposerBox : Gtk.Frame, ComposerContainer {
 
         add(this.composer);
         this.main_toolbar.set_conversation_header(composer.header);
-        this.composer.editor.focus_in_event.connect(on_focus_in);
-        this.composer.editor.focus_out_event.connect(on_focus_out);
         show();
     }
 
     public void remove_composer() {
-        if (this.composer.editor.has_focus)
-            on_focus_out();
-        this.composer.editor.focus_in_event.disconnect(on_focus_in);
-        this.composer.editor.focus_out_event.disconnect(on_focus_out);
-
         remove(this.composer);
         close_container();
     }
@@ -56,8 +49,6 @@ public class ComposerBox : Gtk.Frame, ComposerContainer {
         hide();
         this.main_toolbar.remove_conversation_header(composer.header);
         this.composer.state = ComposerWidget.ComposerState.DETACHED;
-        this.composer.editor.focus_in_event.disconnect(on_focus_in);
-        this.composer.editor.focus_out_event.disconnect(on_focus_out);
         vanished();
     }
 
@@ -66,5 +57,5 @@ public class ComposerBox : Gtk.Frame, ComposerContainer {
             vanish();
         destroy();
     }
-}
 
+}
diff --git a/src/client/composer/composer-container.vala b/src/client/composer/composer-container.vala
index c96a9e51..466e8166 100644
--- a/src/client/composer/composer-container.vala
+++ b/src/client/composer/composer-container.vala
@@ -44,81 +44,4 @@ public interface ComposerContainer {
      */
     public abstract void remove_composer();
 
-    protected virtual bool on_focus_in() {
-        if (this.old_accelerators == null) {
-            this.old_accelerators = new Gee.HashMultiMap<string, string>();
-            add_accelerators();
-        }
-        return false;
-    }
-
-    protected virtual bool on_focus_out() {
-        if (this.old_accelerators != null) {
-            remove_accelerators();
-            this.old_accelerators = null;
-        }
-        return false;
-    }
-
-    /**
-     * Adds the accelerators for the child composer, and temporarily removes conflicting
-     * accelerators from existing actions.
-     */
-    protected virtual void add_accelerators() {
-        GearyApplication app = GearyApplication.instance;
-
-        // Check for actions with conflicting accelerators
-        foreach (string action in ComposerWidget.action_accelerators.get_keys()) {
-            foreach (string accelerator in ComposerWidget.action_accelerators[action]) {
-                string[] actions = app.get_actions_for_accel(accelerator);
-
-                foreach (string conflicting_action in actions) {
-                    remove_conflicting_accelerator(conflicting_action, accelerator);
-                    this.old_accelerators[conflicting_action] = accelerator;
-                }
-            }
-        }
-
-        // Now add our actions to the window and their accelerators
-        foreach (string action in ComposerWidget.action_accelerators.get_keys()) {
-            this.top_window.add_action(composer.get_action(action));
-            app.set_accels_for_action("win." + action,
-                                      ComposerWidget.action_accelerators[action].to_array());
-        }
-    }
-
-    /**
-     * Removes the accelerators for the child composer, and restores previously removed accelerators.
-     */
-    protected virtual void remove_accelerators() {
-        foreach (string action in ComposerWidget.action_accelerators.get_keys())
-            GearyApplication.instance.set_accels_for_action("win." + action, {});
-
-        foreach (string action in old_accelerators.get_keys())
-            foreach (string accelerator in this.old_accelerators[action])
-                restore_conflicting_accelerator(action, accelerator);
-    }
-
-    // Helper method. Removes the given conflicting accelerator from the action's accelerators.
-    private void remove_conflicting_accelerator(string action, string accelerator) {
-        GearyApplication app = GearyApplication.instance;
-        string[] accelerators = app.get_accels_for_action(action);
-        if (accelerators.length == 0)
-            return;
-
-        string[] without_accel = new string[accelerators.length - 1];
-        foreach (string a in accelerators)
-            if (a != accelerator)
-                without_accel += a;
-
-        app.set_accels_for_action(action, without_accel);
-    }
-
-    // Helper method. Adds the given accelerator back to the action's accelerators.
-    private void restore_conflicting_accelerator(string action, string accelerator) {
-        GearyApplication app = GearyApplication.instance;
-        string[] accelerators = app.get_accels_for_action(action);
-        accelerators += accelerator;
-        app.set_accels_for_action(action, accelerators);
-    }
 }
diff --git a/src/client/composer/composer-embed.vala b/src/client/composer/composer-embed.vala
index 460e164e..ce2390e4 100644
--- a/src/client/composer/composer-embed.vala
+++ b/src/client/composer/composer-embed.vala
@@ -42,8 +42,6 @@ public class ComposerEmbed : Gtk.EventBox, ComposerContainer {
 
         add(composer);
         realize.connect(on_realize);
-        this.composer.editor.focus_in_event.connect(on_focus_in);
-        this.composer.editor.focus_out_event.connect(on_focus_out);
         show();
     }
 
@@ -71,14 +69,7 @@ public class ComposerEmbed : Gtk.EventBox, ComposerContainer {
     }
 
     public void remove_composer() {
-        if (this.composer.editor.has_focus)
-            on_focus_out();
-
-        this.composer.editor.focus_in_event.disconnect(on_focus_in);
-        this.composer.editor.focus_out_event.disconnect(on_focus_out);
-
         disable_scroll_reroute(this);
-
         remove(this.composer);
         close_container();
     }
@@ -189,8 +180,6 @@ public class ComposerEmbed : Gtk.EventBox, ComposerContainer {
     public void vanish() {
         hide();
         this.composer.state = ComposerWidget.ComposerState.DETACHED;
-        this.composer.editor.focus_in_event.disconnect(on_focus_in);
-        this.composer.editor.focus_out_event.disconnect(on_focus_out);
         vanished();
     }
 
diff --git a/src/client/composer/composer-widget.vala b/src/client/composer/composer-widget.vala
index 0e3e16c0..754ee573 100644
--- a/src/client/composer/composer-widget.vala
+++ b/src/client/composer/composer-widget.vala
@@ -47,8 +47,6 @@ public class ComposerWidget : Gtk.EventBox, Geary.BaseInterface {
         }
     }
 
-    private SimpleActionGroup actions = new SimpleActionGroup();
-
     private const string ACTION_UNDO = "undo";
     private const string ACTION_REDO = "redo";
     private const string ACTION_CUT = "cut";
@@ -90,7 +88,7 @@ public class ComposerWidget : Gtk.EventBox, Geary.BaseInterface {
         ACTION_BOLD, ACTION_ITALIC, ACTION_UNDERLINE, ACTION_STRIKETHROUGH,
         ACTION_FONT_SIZE, ACTION_FONT_FAMILY, ACTION_COLOR, ACTION_JUSTIFY,
         ACTION_INSERT_IMAGE, ACTION_COPY_LINK,
-       ACTION_OLIST, ACTION_ULIST
+        ACTION_OLIST, ACTION_ULIST
     };
 
     private const ActionEntry[] action_entries = {
@@ -133,26 +131,26 @@ public class ComposerWidget : Gtk.EventBox, Geary.BaseInterface {
     };
 
     public static Gee.MultiMap<string, string> action_accelerators = new Gee.HashMultiMap<string, string>();
-    static construct {
-        action_accelerators.set(ACTION_UNDO, "<Ctrl>z");
-        action_accelerators.set(ACTION_REDO, "<Ctrl><Shift>z");
-        action_accelerators.set(ACTION_CUT, "<Ctrl>x");
-        action_accelerators.set(ACTION_COPY, "<Ctrl>c");
-        action_accelerators.set(ACTION_PASTE, "<Ctrl>v");
-        action_accelerators.set(ACTION_PASTE_WITHOUT_FORMATTING, "<Ctrl><Shift>v");
-        action_accelerators.set(ACTION_INSERT_IMAGE, "<Ctrl>g");
-        action_accelerators.set(ACTION_INSERT_LINK, "<Ctrl>l");
-        action_accelerators.set(ACTION_INDENT, "<Ctrl>bracketright");
-        action_accelerators.set(ACTION_OUTDENT, "<Ctrl>bracketleft");
-        action_accelerators.set(ACTION_REMOVE_FORMAT, "<Ctrl>space");
-        action_accelerators.set(ACTION_BOLD, "<Ctrl>b");
-        action_accelerators.set(ACTION_ITALIC, "<Ctrl>i");
-        action_accelerators.set(ACTION_UNDERLINE, "<Ctrl>u");
-        action_accelerators.set(ACTION_STRIKETHROUGH, "<Ctrl>k");
-        action_accelerators.set(ACTION_CLOSE, "<Ctrl>w");
-        action_accelerators.set(ACTION_CLOSE, "Escape");
-        action_accelerators.set(ACTION_ADD_ATTACHMENT, "<Ctrl>t");
-        action_accelerators.set(ACTION_DETACH, "<Ctrl>d");
+
+    public static void add_window_accelerators(GearyApplication application) {
+        application.add_window_accelerators(ACTION_UNDO, { "<Ctrl>z" } );
+        application.add_window_accelerators(ACTION_REDO, { "<Ctrl><Shift>z" } );
+        application.add_window_accelerators(ACTION_CUT, { "<Ctrl>x" } );
+        application.add_window_accelerators(ACTION_COPY, { "<Ctrl>c" } );
+        application.add_window_accelerators(ACTION_PASTE, { "<Ctrl>v" } );
+        application.add_window_accelerators(ACTION_PASTE_WITHOUT_FORMATTING, { "<Ctrl><Shift>v" } );
+        application.add_window_accelerators(ACTION_INSERT_IMAGE, { "<Ctrl>g" } );
+        application.add_window_accelerators(ACTION_INSERT_LINK, { "<Ctrl>l" } );
+        application.add_window_accelerators(ACTION_INDENT, { "<Ctrl>bracketright" } );
+        application.add_window_accelerators(ACTION_OUTDENT, { "<Ctrl>bracketleft" } );
+        application.add_window_accelerators(ACTION_REMOVE_FORMAT, { "<Ctrl>space" } );
+        application.add_window_accelerators(ACTION_BOLD, { "<Ctrl>b" } );
+        application.add_window_accelerators(ACTION_ITALIC, { "<Ctrl>i" } );
+        application.add_window_accelerators(ACTION_UNDERLINE, { "<Ctrl>u" } );
+        application.add_window_accelerators(ACTION_STRIKETHROUGH, { "<Ctrl>k" } );
+        application.add_window_accelerators(ACTION_CLOSE, { "<Ctrl>w", "Escape" } );
+        application.add_window_accelerators(ACTION_ADD_ATTACHMENT, { "<Ctrl>t" } );
+        application.add_window_accelerators(ACTION_DETACH, { "<Ctrl>d" } );
     }
 
     private const string DRAFT_SAVED_TEXT = _("Saved");
@@ -322,6 +320,8 @@ public class ComposerWidget : Gtk.EventBox, Geary.BaseInterface {
     [GtkChild]
     private Gtk.Box message_area;
 
+    private SimpleActionGroup actions = new SimpleActionGroup();
+
     private Menu html_menu;
     private Menu plain_menu;
 
@@ -809,8 +809,10 @@ public class ComposerWidget : Gtk.EventBox, Geary.BaseInterface {
     private void initialize_actions() {
         this.actions.add_action_entries(action_entries, this);
 
-        // for some reason, we can't use the same prefix.
-        insert_action_group("cmp", this.actions);
+        // 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);
 
         this.actions.change_action_state(
diff --git a/src/client/composer/composer-window.vala b/src/client/composer/composer-window.vala
index 634ba095..d11fbcb1 100644
--- a/src/client/composer/composer-window.vala
+++ b/src/client/composer/composer-window.vala
@@ -36,8 +36,6 @@ public class ComposerWindow : Gtk.ApplicationWindow, ComposerContainer {
         set_property("name", "GearyComposerWindow");
 
         add(this.composer);
-        focus_in_event.connect(on_focus_in);
-        focus_out_event.connect(on_focus_out);
 
         if (composer.config.desktop_environment == Configuration.DesktopEnvironment.UNITY) {
             composer.embed_header();
@@ -105,10 +103,6 @@ public class ComposerWindow : Gtk.ApplicationWindow, ComposerContainer {
     }
 
     public void close_container() {
-        on_focus_out();
-        this.composer.editor.focus_in_event.disconnect(on_focus_in);
-        this.composer.editor.focus_out_event.disconnect(on_focus_out);
-
         this.closing = true;
         destroy();
     }
diff --git a/ui/composer-menus.ui b/ui/composer-menus.ui
index 72f5b37c..e6854a4e 100644
--- a/ui/composer-menus.ui
+++ b/ui/composer-menus.ui
@@ -5,53 +5,53 @@
     <section>
       <item>
         <attribute name="label" translatable="yes">S_ans Serif</attribute>
-        <attribute name="action">cmp.font-family</attribute>
+        <attribute name="action">win.font-family</attribute>
         <attribute name="target">sans</attribute>
       </item>
       <item>
         <attribute name="label" translatable="yes">S_erif</attribute>
-        <attribute name="action">cmp.font-family</attribute>
+        <attribute name="action">win.font-family</attribute>
         <attribute name="target">serif</attribute>
       </item>
       <item>
         <attribute name="label" translatable="yes">_Fixed Width</attribute>
-        <attribute name="action">cmp.font-family</attribute>
+        <attribute name="action">win.font-family</attribute>
         <attribute name="target">monospace</attribute>
       </item>
     </section>
     <section>
       <item>
         <attribute name="label" translatable="yes">_Small</attribute>
-        <attribute name="action">cmp.font-size</attribute>
+        <attribute name="action">win.font-size</attribute>
         <attribute name="target">small</attribute>
       </item>
       <item>
         <attribute name="label" translatable="yes">_Medium</attribute>
-        <attribute name="action">cmp.font-size</attribute>
+        <attribute name="action">win.font-size</attribute>
         <attribute name="target">medium</attribute>
       </item>
       <item>
         <attribute name="label" translatable="yes">Lar_ge</attribute>
-        <attribute name="action">cmp.font-size</attribute>
+        <attribute name="action">win.font-size</attribute>
         <attribute name="target">large</attribute>
       </item>
     </section>
     <section>
       <item>
         <attribute name="label" translatable="yes">C_olor</attribute>
-        <attribute name="action">cmp.color</attribute>
+        <attribute name="action">win.color</attribute>
       </item>
     </section>
     <section>
       <item>
         <attribute name="label" translatable="yes">_Rich Text</attribute>
-        <attribute name="action">cmp.compose-as-html</attribute>
+        <attribute name="action">win.compose-as-html</attribute>
       </item>
     </section>
     <section>
       <item>
         <attribute name="label" translatable="yes">Show Extended Fields</attribute>
-        <attribute name="action">cmp.show-extended</attribute>
+        <attribute name="action">win.show-extended</attribute>
       </item>
     </section>
   </menu>
@@ -60,13 +60,13 @@
     <section>
       <item>
         <attribute name="label" translatable="yes">_Rich Text</attribute>
-        <attribute name="action">cmp.compose-as-html</attribute>
+        <attribute name="action">win.compose-as-html</attribute>
       </item>
     </section>
     <section>
       <item>
         <attribute name="label" translatable="yes">Show Extended Fields</attribute>
-        <attribute name="action">cmp.show-extended</attribute>
+        <attribute name="action">win.show-extended</attribute>
       </item>
     </section>
   </menu>
@@ -76,56 +76,56 @@
     <section>
       <item>
         <attribute name="label" translatable="yes">_Undo</attribute>
-        <attribute name="action">cmp.undo</attribute>
+        <attribute name="action">win.undo</attribute>
       </item>
       <item>
         <attribute name="label" translatable="yes">_Redo</attribute>
-        <attribute name="action">cmp.redo</attribute>
+        <attribute name="action">win.redo</attribute>
       </item>
     </section>
     <section id="context_menu_rich_text">
       <item>
         <attribute name="label" translatable="yes">Cu_t</attribute>
-        <attribute name="action">cmp.cut</attribute>
+        <attribute name="action">win.cut</attribute>
       </item>
       <item>
         <attribute name="label" translatable="yes">_Copy</attribute>
-        <attribute name="action">cmp.copy</attribute>
+        <attribute name="action">win.copy</attribute>
       </item>
       <item>
         <attribute name="label" translatable="yes">_Paste</attribute>
-        <attribute name="action">cmp.paste</attribute>
+        <attribute name="action">win.paste</attribute>
       </item>
       <item>
         <attribute name="label" translatable="yes" context="Clipboard paste as plain text">Paste _Without 
Formatting</attribute>
-        <attribute name="action">cmp.paste-without-formatting</attribute>
+        <attribute name="action">win.paste-without-formatting</attribute>
       </item>
     </section>
     <section id="context_menu_plain_text">
       <item>
         <attribute name="label" translatable="yes">Cu_t</attribute>
-        <attribute name="action">cmp.cut</attribute>
+        <attribute name="action">win.cut</attribute>
       </item>
       <item>
         <attribute name="label" translatable="yes">_Copy</attribute>
-        <attribute name="action">cmp.copy</attribute>
+        <attribute name="action">win.copy</attribute>
       </item>
       <item>
         <attribute name="label" translatable="yes">_Paste</attribute>
-        <attribute name="action">cmp.paste</attribute>
+        <attribute name="action">win.paste</attribute>
       </item>
     </section>
     <section>
       <item>
         <attribute name="label" translatable="yes">Select _All</attribute>
-        <attribute name="action">cmp.select-all</attribute>
+        <attribute name="action">win.select-all</attribute>
       </item>
     </section>
     <section id="context_menu_webkit_text_entry"/>
     <section id="context_menu_inspector">
       <item>
         <attribute name="label" translatable="yes">_Inspect…</attribute>
-        <attribute name="action">cmp.open_inspector</attribute>
+        <attribute name="action">win.open_inspector</attribute>
       </item>
     </section>
   </menu>
diff --git a/ui/composer-widget.ui b/ui/composer-widget.ui
index 4414f4fb..d22e881c 100644
--- a/ui/composer-widget.ui
+++ b/ui/composer-widget.ui
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.0 -->
+<!-- Generated with glade 3.22.1 -->
 <interface>
   <requires lib="gtk+" version="3.20"/>
   <template class="ComposerWidget" parent="GtkEventBox">
@@ -346,7 +346,7 @@
                     <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">cmp.undo</property>
+                    <property name="action_name">win.undo</property>
                     <property name="always_show_image">True</property>
                     <child>
                       <object class="GtkImage">
@@ -370,7 +370,7 @@
                     <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">cmp.redo</property>
+                    <property name="action_name">win.redo</property>
                     <property name="always_show_image">True</property>
                     <child>
                       <object class="GtkImage">
@@ -408,7 +408,7 @@
                     <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">cmp.bold</property>
+                    <property name="action_name">win.bold</property>
                     <property name="always_show_image">True</property>
                     <child>
                       <object class="GtkImage" id="bold_image">
@@ -432,7 +432,7 @@
                     <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">cmp.italic</property>
+                    <property name="action_name">win.italic</property>
                     <property name="always_show_image">True</property>
                     <child>
                       <object class="GtkImage" id="italics_image">
@@ -456,7 +456,7 @@
                     <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">cmp.underline</property>
+                    <property name="action_name">win.underline</property>
                     <property name="always_show_image">True</property>
                     <child>
                       <object class="GtkImage" id="underline_image">
@@ -480,7 +480,7 @@
                     <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">cmp.strikethrough</property>
+                    <property name="action_name">win.strikethrough</property>
                     <property name="always_show_image">True</property>
                     <child>
                       <object class="GtkImage" id="strikethrough_image">
@@ -518,7 +518,7 @@
                     <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">cmp.ulist</property>
+                    <property name="action_name">win.ulist</property>
                     <property name="always_show_image">True</property>
                     <child>
                       <object class="GtkImage" id="ulist_image">
@@ -542,7 +542,7 @@
                     <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">cmp.olist</property>
+                    <property name="action_name">win.olist</property>
                     <property name="always_show_image">True</property>
                     <child>
                       <object class="GtkImage" id="olist_image">
@@ -580,7 +580,7 @@
                     <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">cmp.indent</property>
+                    <property name="action_name">win.indent</property>
                     <property name="always_show_image">True</property>
                     <child>
                       <object class="GtkImage" id="indent_image">
@@ -604,7 +604,7 @@
                     <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">cmp.outdent</property>
+                    <property name="action_name">win.outdent</property>
                     <property name="always_show_image">True</property>
                     <child>
                       <object class="GtkImage" id="outdent_image">
@@ -642,7 +642,7 @@
                     <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">cmp.insert-link</property>
+                    <property name="action_name">win.insert-link</property>
                     <property name="always_show_image">True</property>
                     <child>
                       <object class="GtkImage" id="insert_link_image">
@@ -666,7 +666,7 @@
                     <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">cmp.insert-image</property>
+                    <property name="action_name">win.insert-image</property>
                     <property name="always_show_image">True</property>
                     <child>
                       <object class="GtkImage">
@@ -700,7 +700,7 @@
                 <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">cmp.remove-format</property>
+                <property name="action_name">win.remove-format</property>
                 <property name="always_show_image">True</property>
                 <child>
                   <object class="GtkImage" id="remove_format_image">
@@ -724,7 +724,7 @@
                 <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">cmp.select-dictionary</property>
+                <property name="action_name">win.select-dictionary</property>
                 <property name="always_show_image">True</property>
                 <child>
                   <object class="GtkImage" id="select_dictionary_image">
@@ -764,7 +764,7 @@
                 <property name="can_focus">True</property>
                 <property name="ellipsize">end</property>
                 <property name="width_chars">6</property>
-                <property name="xalign">0.0</property>
+                <property name="xalign">0</property>
                 <style>
                   <class name="dim-label"/>
                 </style>
@@ -805,6 +805,30 @@
                         <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>


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