Commit 0d06646a authored by Jesse van den Kieboom's avatar Jesse van den Kieboom

Show dash activity menu if shell does not show app menu

https://bugzilla.gnome.org/show_bug.cgi?id=770534
parent e8913bfa
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment