Set up the configuration action

This commit is contained in:
Savanni D'Gerinel 2023-08-23 17:51:51 -04:00
parent 3998538e88
commit 0bf6e079a2
2 changed files with 2 additions and 11 deletions

View File

@ -76,14 +76,6 @@ fn main() {
}); });
app.add_action(&action_config); app.add_action(&action_config);
app.connect_startup(|app| {
println!("connect_startup");
let menu_model = gio::Menu::new();
menu_model.append(Some("Quit"), None);
menu_model.append(Some("Configuration"), Some("show-config"));
app.set_menubar(Some(&menu_model));
});
app.connect_activate({ app.connect_activate({
let runtime = runtime.clone(); let runtime = runtime.clone();
move |app| { move |app| {

View File

@ -13,12 +13,11 @@ impl Default for LayoutPrivate {
fn default() -> Self { fn default() -> Self {
let header = adw::HeaderBar::builder() let header = adw::HeaderBar::builder()
.title_widget(&gtk::Label::new(Some("Placeholder Title"))) .title_widget(&gtk::Label::new(Some("Placeholder Title")))
.show_start_title_buttons(true)
.show_end_title_buttons(true)
.build(); .build();
let app_menu = gio::Menu::new(); let app_menu = gio::Menu::new();
app_menu.append(Some("Configuration"), Some("show-config")); let menu_item = gio::MenuItem::new(Some("Configuration"), Some("app.show-config"));
app_menu.append_item(&menu_item);
let hamburger = gtk::MenuButton::builder() let hamburger = gtk::MenuButton::builder()
.icon_name("open-menu-symbolic") .icon_name("open-menu-symbolic")