diff --git a/src/client/application/geary-controller.vala b/src/client/application/geary-controller.vala index cd600c2b..1cbed511 100644 --- a/src/client/application/geary-controller.vala +++ b/src/client/application/geary-controller.vala @@ -428,7 +428,14 @@ public class GearyController : Geary.BaseObject { error("Unable to parse app_menu.interface: %s", e.message); } MenuModel menu = (MenuModel) builder.get_object("app-menu"); - GearyApplication.instance.set_app_menu(menu); + + // We'd *like* to always export an app menu and just let the shell + // decide whether to display it or not. Unfortunately Mint (Cinnamon, + // I believe) and maybe others will insert a menu bar for your + // application, even if you didn't have one otherwise, if you export + // the app menu. So, we only export it if the shell claims to show it. + if (Gtk.Settings.get_default().gtk_shell_shows_app_menu) + GearyApplication.instance.set_app_menu(menu); } private void open_account(Geary.Account account) { diff --git a/src/client/components/main-toolbar.vala b/src/client/components/main-toolbar.vala index 1c4c9494..b8fc3ce4 100644 --- a/src/client/components/main-toolbar.vala +++ b/src/client/components/main-toolbar.vala @@ -96,10 +96,12 @@ public class MainToolbar : PillToolbar { search_entry.get_preferred_width(out minimum_width, out natural_width); search_upgrade_progress_bar.width_request = minimum_width; - // Application button. - insert.clear(); - insert.add(create_menu_button("emblem-system-symbolic", application_menu, GearyController.ACTION_GEAR_MENU)); - add(create_pill_buttons(insert)); + // Application button. If we exported an app menu, we don't need this. + if (!Gtk.Settings.get_default().gtk_shell_shows_app_menu) { + insert.clear(); + insert.add(create_menu_button("emblem-system-symbolic", application_menu, GearyController.ACTION_GEAR_MENU)); + add(create_pill_buttons(insert)); + } set_search_placeholder_text(DEFAULT_SEARCH_TEXT); }