[dconf-editor] Rework Help overlay and About dialog shortcuts.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf-editor] Rework Help overlay and About dialog shortcuts.
- Date: Thu, 22 Nov 2018 12:35:50 +0000 (UTC)
commit 973adf72049dfc9b47adeae2219ef1f54aff24c7
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Thu Nov 15 18:08:09 2018 +0100
Rework Help overlay and About dialog shortcuts.
editor/dconf-editor.vala | 3 +++
editor/dconf-window.vala | 16 +++++++++-------
2 files changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/editor/dconf-editor.vala b/editor/dconf-editor.vala
index c618b0c..357c568 100644
--- a/editor/dconf-editor.vala
+++ b/editor/dconf-editor.vala
@@ -328,6 +328,9 @@ private class ConfigurationEditor : Gtk.Application
set_accels_for_action ("kbd.toggle-boolean", { "<Primary>Return",
"<Primary>KP_Enter" });
+ // set_accels_for_action ("app.about", { "<Shift><Primary>F1" }); // TODO report bug:
needs a dance in the window
+ set_accels_for_action ("win.show-help-overlay", { "F1" }); // "<Primary>F1" is
automatically done
+
init_night_mode ();
Gtk.CssProvider css_provider = new Gtk.CssProvider ();
diff --git a/editor/dconf-window.vala b/editor/dconf-window.vala
index 5bd55df..79ea0c4 100644
--- a/editor/dconf-window.vala
+++ b/editor/dconf-window.vala
@@ -1601,18 +1601,20 @@ private class DConfWindow : ApplicationWindow
request_search (true, PathEntry.SearchMode.SEARCH);
return true;
- case "F1": // TODO dance done to avoid <Primary>F1 to show help overlay
- browser_view.discard_row_popover ();
- if ((event.state & Gdk.ModifierType.SHIFT_MASK) == 0)
- return false; // help overlay
- ((ConfigurationEditor) get_application ()).about_cb ();
- return true;
-
default:
break;
}
}
+ if (name == "F1") // TODO fix dance done with the F1 & <Primary>F1 shortcuts that show help overlay
+ {
+ browser_view.discard_row_popover ();
+ if ((event.state & Gdk.ModifierType.SHIFT_MASK) == 0)
+ return false; // help overlay
+ ((ConfigurationEditor) get_application ()).about_cb ();
+ return true;
+ }
+
/* don't use "else if", or some widgets will not be hidden on <ctrl>F10 or such things */
if (name == "F10" && (event.state & Gdk.ModifierType.SHIFT_MASK) != 0)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]