[polari/wip/fmuellner/combined-gsoc: 50/136] app: Add shortcut to toggle search button
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/fmuellner/combined-gsoc: 50/136] app: Add shortcut to toggle search button
- Date: Tue, 26 Jul 2016 23:20:11 +0000 (UTC)
commit 19189178e877d34d1333f46877146dd6ced63f9e
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Jul 22 14:02:21 2016 +0200
app: Add shortcut to toggle search button
data/resources/main-window.ui | 1 +
src/application.js | 4 ++++
2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/data/resources/main-window.ui b/data/resources/main-window.ui
index 6d923e6..a1fbf9c 100644
--- a/data/resources/main-window.ui
+++ b/data/resources/main-window.ui
@@ -54,6 +54,7 @@
<property name="valign">center</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
+ <property name="action-name">app.toggle-search</property>
<property name="active" bind-source="searchBar"
bind-property="search-mode-enabled"
bind-flags="sync-create|bidirectional"/>
<style>
diff --git a/src/application.js b/src/application.js
index 4d7fea3..026772e 100644
--- a/src/application.js
+++ b/src/application.js
@@ -116,6 +116,10 @@ const Application = new Lang.Class({
accels: ['<Alt><Shift>Down', '<Primary><Shift>Page_Down']},
{ name: 'previous-pending-room',
accels: ['<Alt><Shift>Up', '<Primary><Shift>Page_Up']},
+ { name: 'toggle-search',
+ activate: Lang.bind(this, this._onToggleAction),
+ state: GLib.Variant.new('b', false),
+ accels: ['<Primary>f','<Primary>s'] },
{ name: 'search-terms',
parameter_type: GLib.VariantType.new('s'),
state: GLib.Variant.new('s', '') },
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]