[polari/wip/gsv] Add search button



commit feedc30c2ad848d2f6a162a6dfe6b170e776e68f
Author: Ignacio Casal Quinteiro <ignacio casal nice-software com>
Date:   Thu Aug 8 16:45:26 2013 +0200

    Add search button

 data/resources/main-window.ui |   28 ++++++++++++++++++++++++++--
 src/application.js            |    9 +++++++++
 2 files changed, 35 insertions(+), 2 deletions(-)
---
diff --git a/data/resources/main-window.ui b/data/resources/main-window.ui
index 5ff61db..abb4027 100644
--- a/data/resources/main-window.ui
+++ b/data/resources/main-window.ui
@@ -123,7 +123,7 @@
               </object>
             </child>
             <child>
-              <object class="GtkToggleButton" id="button3">
+              <object class="GtkToggleButton" id="search_button">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="focus_on_click">False</property>
@@ -133,12 +133,36 @@
                      it on the first and last button has the same effect,
                      and spares us from using a custom title widget -->
                 <property name="margin-left">24</property>
+                <property name="action_name">app.search</property>
+                <style>
+                  <class name="image-button"/>
+                </style>
+                <child>
+                  <object class="GtkImage" id="search_image">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="icon_name">edit-find-symbolic</property>
+                    <property name="icon_size">1</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="pack_type">end</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToggleButton" id="button4">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="halign">end</property>
+                <property name="valign">center</property>
                 <property name="action_name">app.user-list</property>
                 <style>
                   <class name="image-button"/>
                 </style>
                 <child>
-                  <object class="GtkImage" id="image3">
+                  <object class="GtkImage" id="image4">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="icon_name">system-users-symbolic</property>
diff --git a/src/application.js b/src/application.js
index c0a448b..354aaef 100644
--- a/src/application.js
+++ b/src/application.js
@@ -86,6 +86,11 @@ const Application = new Lang.Class({
             create_hook: Lang.bind(this, this._leaveRoomCreateHook),
             accel: '<Primary>w' },
           { name: 'leave-selected-rooms' },
+          { name: 'search',
+            activate: Lang.bind(this, this._onToggleAction),
+            create_hook: Lang.bind(this, this._searchHook),
+            state: GLib.Variant.new('b', false),
+            accel: '<Primary>F' },
           { name: 'user-list',
             activate: Lang.bind(this, this._onToggleAction),
             create_hook: Lang.bind(this, this._userListCreateHook),
@@ -189,6 +194,10 @@ const Application = new Lang.Class({
             action.change_state(GLib.Variant.new('b', false));
     },
 
+    _searchHook: function(action) {
+        
+    },
+
     _userListCreateHook: function(action) {
         this._chatroomManager.connect('active-changed', Lang.bind(this,
             function() {


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