[geary/bug/720347-gearmenu] Add some notes
- From: Charles Lindsay <clindsay src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/bug/720347-gearmenu] Add some notes
- Date: Fri, 13 Dec 2013 01:14:37 +0000 (UTC)
commit 43dce96a1843c8d3b11b349962ef0e97fc10438f
Author: Charles Lindsay <chaz yorba org>
Date: Thu Dec 12 17:14:29 2013 -0800
Add some notes
src/client/application/geary-controller.vala | 6 ++++++
src/client/components/main-toolbar.vala | 2 +-
2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/client/application/geary-controller.vala b/src/client/application/geary-controller.vala
index cae7dcc..1cbed51 100644
--- a/src/client/application/geary-controller.vala
+++ b/src/client/application/geary-controller.vala
@@ -428,6 +428,12 @@ public class GearyController : Geary.BaseObject {
error("Unable to parse app_menu.interface: %s", e.message);
}
MenuModel menu = (MenuModel) builder.get_object("app-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);
}
diff --git a/src/client/components/main-toolbar.vala b/src/client/components/main-toolbar.vala
index 17fc31f..b8fc3ce 100644
--- a/src/client/components/main-toolbar.vala
+++ b/src/client/components/main-toolbar.vala
@@ -96,7 +96,7 @@ 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.
+ // 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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]