Commit f1892eeb authored by Zander Brown's avatar Zander Brown

Always show hamburger menu

parent e7128a57
......@@ -258,8 +258,7 @@ Tobias Bernard
</child>
<child>
<object class="GtkMenuButton" id="menu_toggle">
<property name="visible">False</property>
<property name="no_show_all">True</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="valign">center</property>
......@@ -286,4 +285,4 @@ Tobias Bernard
<property name="can_focus">False</property>
<property name="relative_to">menu_toggle</property>
</object>
</interface>
</interface>
\ No newline at end of file
......@@ -117,8 +117,7 @@ impl App {
"Content Initialization failed."));
// Create the headerbar
let local_menu = !app.prefers_app_menu();
let header = Rc::new(Header::new(&content, &window, &sender, local_menu));
let header = Rc::new(Header::new(&content, &window, &sender));
// Add the content main stack to the overlay.
let overlay = gtk::Overlay::new();
......
......@@ -26,7 +26,6 @@ pub struct Header {
update_box: gtk::Box,
update_label: gtk::Label,
update_spinner: gtk::Spinner,
menu_button: gtk::Button,
menu_popover: gtk::Popover,
app_menu: MenuModel,
}
......@@ -43,7 +42,6 @@ impl Default for Header {
let update_box = builder.get_object("update_notification").unwrap();
let update_label = builder.get_object("update_label").unwrap();
let update_spinner = builder.get_object("update_spinner").unwrap();
let menu_button = builder.get_object("menu_toggle").unwrap();
let menu_popover = builder.get_object("menu_popover").unwrap();
let menus = gtk::Builder::new_from_resource("/org/gnome/Hammond/gtk/menus.ui");
let app_menu = menus.get_object("app-menu").unwrap();
......@@ -57,7 +55,6 @@ impl Default for Header {
update_box,
update_label,
update_spinner,
menu_button,
menu_popover,
app_menu,
}
......@@ -70,10 +67,9 @@ impl Header {
content: &Content,
window: &gtk::ApplicationWindow,
sender: &Sender<Action>,
local_menu: bool,
) -> Header {
let h = Header::default();
h.init(content, window, &sender, local_menu);
h.init(content, window, &sender);
h
}
......@@ -82,7 +78,6 @@ impl Header {
content: &Content,
window: &gtk::ApplicationWindow,
sender: &Sender<Action>,
local_menu: bool,
) {
let builder = gtk::Builder::new_from_resource("/org/gnome/Hammond/gtk/headerbar.ui");
......@@ -125,10 +120,7 @@ impl Header {
}),
);
if local_menu {
self.menu_popover.bind_model(Some(&self.app_menu), None);
self.menu_button.set_visible(true);
}
self.menu_popover.bind_model(Some(&self.app_menu), None);
}
pub fn switch_to_back(&self, title: &str) {
......
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