[gnome-characters] menu: Close popover when a font is selected



commit 2befc65d02851d630ce12344d7b133494baa7628
Author: Daiki Ueno <dueno src gnome org>
Date:   Wed Aug 19 18:01:14 2015 +0900

    menu: Close popover when a font is selected

 src/menu.js   |    6 +++---
 src/window.js |    1 +
 2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/menu.js b/src/menu.js
index 19a82b2..dc02585 100644
--- a/src/menu.js
+++ b/src/menu.js
@@ -58,8 +58,8 @@ const MenuPopover = new Lang.Class({
         this._keywords = [];
         this._search_entry.connect('search-changed',
                                    Lang.bind(this, this._handleSearchChanged));
-        this._font_listbox.connect('row-selected',
-                                   Lang.bind(this, this._handleRowSelected));
+        this._font_listbox.connect('row-activated',
+                                   Lang.bind(this, this._handleRowActivated));
         this._font_listbox.set_filter_func(Lang.bind(this, this._filterFunc));
         this._font_listbox.set_header_func(Lang.bind(this, this._headerFunc));
 
@@ -79,7 +79,7 @@ const MenuPopover = new Lang.Class({
         return true;
     },
 
-    _handleRowSelected: function(listBox, row) {
+    _handleRowActivated: function(listBox, row) {
         if (row != null) {
             let toplevel = this.get_toplevel();
             let action = toplevel.lookup_action('filter-font');
diff --git a/src/window.js b/src/window.js
index 4d4b8a9..cfc2f05 100644
--- a/src/window.js
+++ b/src/window.js
@@ -214,6 +214,7 @@ const MainWindow = new Lang.Class({
             family = null;
         this._mainView.filterFontFamily = family;
         this._updateTitle(this._mainView.visible_child.title);
+        this._menu_popover.hide();
     },
 
     setSearchKeywords: function(keywords) {


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