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
This commit is contained in:
parent
68f31e0e59
commit
9eead5d145
8 changed files with 99 additions and 169 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue