[gitg/gnome-3-20] Disable burger menu in dash



commit df342990e6544a617ab31afc3350fc6380dba510
Author: Jesse van den Kieboom <jessevdk gnome org>
Date:   Sun Jun 5 11:52:23 2016 +0200

    Disable burger menu in dash
    
    https://bugzilla.gnome.org/show_bug.cgi?id=765536

 gitg/gitg-window.vala           |    8 +++++---
 gitg/resources/ui/gitg-menus.ui |    2 --
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gitg/gitg-window.vala b/gitg/gitg-window.vala
index b4b6150..4bb2f00 100644
--- a/gitg/gitg-window.vala
+++ b/gitg/gitg-window.vala
@@ -54,7 +54,6 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable
        private Gtk.ToggleButton d_search_button;
        [GtkChild]
        private Gtk.MenuButton d_gear_menu;
-       private MenuModel d_dash_model;
        private MenuModel d_activities_model;
 
        [GtkChild]
@@ -299,7 +298,6 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable
 
                d_dash_view.application = this;
 
-               d_dash_model = Builder.load_object<MenuModel>("ui/gitg-menus.ui", menuname + "-dash");
                d_activities_model = Builder.load_object<MenuModel>("ui/gitg-menus.ui", menuname + "-views");
 
                // search bar
@@ -529,8 +527,10 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable
                        d_clone_button.hide();
                        d_add_button.hide();
                        d_dash_view.add_repository(d_repository);
+
                        d_gear_menu.menu_model = d_activities_model;
                        d_gear_menu.show();
+                       d_gear_menu.sensitive = true;
                }
                else
                {
@@ -542,8 +542,10 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable
                        d_dash_button.hide();
                        d_clone_button.show();
                        d_add_button.show();
-                       d_gear_menu.menu_model = d_dash_model;
+
+                       d_gear_menu.menu_model = null;
                        d_gear_menu.hide();
+                       d_gear_menu.sensitive = false;
                }
 
                d_activities.update();
diff --git a/gitg/resources/ui/gitg-menus.ui b/gitg/resources/ui/gitg-menus.ui
index 5968460..92142d6 100644
--- a/gitg/resources/ui/gitg-menus.ui
+++ b/gitg/resources/ui/gitg-menus.ui
@@ -35,8 +35,6 @@
       </item>
     </section>
   </menu>
-  <menu id="win-menu-dash">
-  </menu>
   <menu id="win-menu-views">
     <section>
       <item>


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