[gnome-books/wip/hadess/sensitive-menu: 3/6] overview: Keep the main menu sensitive when no books



commit b680f37aa8b3574ede8b5f59fcfdae4857516d17
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Aug 2 17:17:34 2019 +0200

    overview: Keep the main menu sensitive when no books
    
    When there are no books, keep the main menu sensitive nonetheless, as
    the old app menu used to be, so that the about box can be accessed.
    
    Closes: #30

 src/overview.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/overview.js b/src/overview.js
index e8f699bd..6d538634 100644
--- a/src/overview.js
+++ b/src/overview.js
@@ -708,7 +708,8 @@ const OverviewToolbar = new Lang.Class({
             function(controller, count) {
                 this.toolbar.foreach(Lang.bind(this,
                     function(child) {
-                        child.set_sensitive(count != 0);
+                        if (child.name != 'menu-button')
+                            child.set_sensitive(count != 0);
                     }));
             }));
 


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