[gitg/gnome-3-20] Show dash activity menu if shell does not show app menu
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg/gnome-3-20] Show dash activity menu if shell does not show app menu
- Date: Mon, 29 Aug 2016 18:25:40 +0000 (UTC)
commit 0d06646a10fca9c21e3569eb71e8e48b6f19ba15
Author: Jesse van den Kieboom <jessevdk gnome org>
Date: Mon Aug 29 20:23:32 2016 +0200
Show dash activity menu if shell does not show app menu
https://bugzilla.gnome.org/show_bug.cgi?id=770534
gitg/gitg-window.vala | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gitg/gitg-window.vala b/gitg/gitg-window.vala
index 4bb2f00..e89536b 100644
--- a/gitg/gitg-window.vala
+++ b/gitg/gitg-window.vala
@@ -55,6 +55,7 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable
[GtkChild]
private Gtk.MenuButton d_gear_menu;
private MenuModel d_activities_model;
+ private MenuModel? d_dash_model;
[GtkChild]
private Gtk.Grid d_grid_main;
@@ -290,10 +291,12 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable
if (Gtk.Settings.get_default().gtk_shell_shows_app_menu)
{
menuname = "win-menu";
+ d_dash_model = null;
}
else
{
menuname = "app-win-menu";
+ d_dash_model = Builder.load_object<MenuModel>("ui/gitg-menus.ui", menuname + "-dash");
}
d_dash_view.application = this;
@@ -543,9 +546,9 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable
d_clone_button.show();
d_add_button.show();
- d_gear_menu.menu_model = null;
- d_gear_menu.hide();
- d_gear_menu.sensitive = false;
+ d_gear_menu.menu_model = d_dash_model;
+ d_gear_menu.visible = d_dash_model != null;
+ d_gear_menu.sensitive = d_dash_model != null;
}
d_activities.update();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]