[dconf-editor] More shortcuts love.
- From: Arnaud Bonatti <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf-editor] More shortcuts love.
- Date: Mon, 15 Feb 2016 23:59:33 +0000 (UTC)
commit 8d3d4705fea9b3182543a4d2bb92ebc055522bb9
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Tue Feb 16 00:58:15 2016 +0100
More shortcuts love.
editor/dconf-editor.vala | 4 ++--
editor/dconf-window.vala | 10 ++++++++++
editor/help-overlay.ui | 16 +++++++++++++++-
3 files changed, 27 insertions(+), 3 deletions(-)
---
diff --git a/editor/dconf-editor.vala b/editor/dconf-editor.vala
index ae3b9bb..82a5f8c 100644
--- a/editor/dconf-editor.vala
+++ b/editor/dconf-editor.vala
@@ -133,14 +133,14 @@ class ConfigurationEditor : Gtk.Application
* * App-menu callbacks
\*/
- private void about_cb ()
+ public void about_cb ()
{
string [] authors = { "Robert Ancell", "Arnaud Bonatti" };
Gtk.show_about_dialog (get_active_window (),
"program-name", _("dconf Editor"),
"version", Config.VERSION,
"comments", _("Directly edit your entire configuration database"),
- "copyright", _("Copyright \xc2\xa9 2010-2014 – Canonical Ltd\nCopyright
\xc2\xa9 2015 – Arnaud Bonatti"),
+ "copyright", _("Copyright \xc2\xa9 2010-2014 – Canonical Ltd\nCopyright
\xc2\xa9 2015-2016 – Arnaud Bonatti"),
"license-type", Gtk.License.GPL_3_0,
"wrap-license", true,
"authors", authors,
diff --git a/editor/dconf-window.vala b/editor/dconf-window.vala
index d934276..b8e3c5b 100644
--- a/editor/dconf-window.vala
+++ b/editor/dconf-window.vala
@@ -305,6 +305,16 @@ class DConfWindow : ApplicationWindow
ConfigurationEditor application = (ConfigurationEditor) get_application ();
application.copy (selected_row == null ? current_path : ((KeyListBoxRow) ((!)
selected_row).get_child ()).get_text ());
return true;
+ case "C":
+ ((ConfigurationEditor) get_application ()).copy (current_path);
+ return true;
+ case "F1":
+ if ((event.state & Gdk.ModifierType.SHIFT_MASK) != 0)
+ {
+ ((ConfigurationEditor) get_application ()).about_cb ();
+ return true;
+ }
+ return false;
default:
break; // TODO report bug for making <ctrl>v work?
}
diff --git a/editor/help-overlay.ui b/editor/help-overlay.ui
index b67bb08..baf3026 100644
--- a/editor/help-overlay.ui
+++ b/editor/help-overlay.ui
@@ -53,10 +53,17 @@
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">True</property>
- <property name="title" translatable="yes" context="shortcut window">Copy path or
descriptor</property>
+ <property name="title" translatable="yes" context="shortcut window">Copy
descriptor</property>
<property name="accelerator"><Primary>c</property>
</object>
</child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes" context="shortcut window">Copy path</property>
+ <property name="accelerator"><Primary><Shift>c</property>
+ </object>
+ </child>
</object>
</child>
<child>
@@ -105,6 +112,13 @@
</object>
</child>
<child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes" context="shortcut window">About</property>
+ <property name="accelerator"><Primary><Shift>F1</property>
+ </object>
+ </child>
+ <child>
<object class="GtkShortcutsShortcut"> <!-- TODO doesn't quit if a KeyEditor dialog is opened
-->
<property name="visible">True</property>
<property name="title" translatable="yes" context="shortcut window">Quit</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]