=== modified file 'gnome-calculator/data/gnome-calculator.gresource.xml'
--- gnome-calculator/data/gnome-calculator.gresource.xml	2013-11-21 12:33:41 +0000
+++ gnome-calculator/data/gnome-calculator.gresource.xml	2013-11-21 12:35:08 +0000
@@ -6,5 +6,6 @@
     <file preprocess="xml-stripblanks">buttons-financial.ui</file>
     <file preprocess="xml-stripblanks">buttons-programming.ui</file>
     <file preprocess="xml-stripblanks">menu.ui</file>
+    <file preprocess="xml-stripblanks">classicmenu.ui</file>
   </gresource>
 </gresources>

=== added file 'gnome-calculator/data/classicmenu.ui'
--- gnome-calculator/data/classicmenu.ui	1970-01-01 00:00:00 +0000
+++ gnome-calculator/data/classicmenu.ui	2013-11-21 16:41:30 +0000
@@ -0,0 +1,83 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <menu id="appmenu">
+    <submenu>
+    <attribute name='label' translatable='yes'>Edit</attribute>
+      <section>
+          <item>
+           <attribute name="label" translatable="yes">Copy</attribute>
+            <attribute name="action">app.copy</attribute>
+            <attribute name="accel">&lt;control&gt;C</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">Paste</attribute>
+          <attribute name="action">app.paste</attribute>
+          <attribute name="accel">&lt;control&gt;V</attribute>
+        </item>
+      </section>
+      <section>
+        <item>
+          <attribute name="label" translatable="yes">Undo</attribute>
+          <attribute name="action">app.undo</attribute>
+          <attribute name="accel">&lt;control&gt;Z</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">Redo</attribute>
+          <attribute name="action">app.redo</attribute>
+          <attribute name="accel">&lt;control&gt;&lt;shift&gt;Z</attribute>
+        </item>
+      </section>
+      <section>
+        <item>
+          <attribute name="label" translatable="yes">Preferences</attribute>
+          <attribute name="action">app.preferences</attribute>
+        </item>
+      </section>
+      <section>
+        <item>
+          <attribute name="label" translatable="yes">Quit</attribute>
+          <attribute name="action">app.quit</attribute>
+          <attribute name="accel">&lt;Primary&gt;q</attribute>
+        </item>
+      </section>
+    </submenu>
+    <submenu>
+      <attribute name='label' translatable='yes'>Mode</attribute>
+        <section>
+          <item>
+            <attribute name="label" translatable="yes">Basic</attribute>
+            <attribute name="action">app.mode</attribute>
+            <attribute name="target">basic</attribute>
+          </item>
+          <item>
+            <attribute name="label" translatable="yes">Advanced</attribute>
+            <attribute name="action">app.mode</attribute>
+            <attribute name="target">advanced</attribute>
+          </item>
+          <item>
+            <attribute name="label" translatable="yes">Financial</attribute>
+            <attribute name="action">app.mode</attribute>
+            <attribute name="target">financial</attribute>
+          </item>
+          <item>
+            <attribute name="label" translatable="yes">Programming</attribute>
+            <attribute name="action">app.mode</attribute>
+            <attribute name="target">programming</attribute>
+          </item>
+        </section>
+    </submenu>
+    <submenu>
+     <attribute name='label' translatable='yes'>Help</attribute>
+          <item>
+            <attribute name="label" translatable="yes">Contents</attribute>
+            <attribute name="action">app.help</attribute>
+            <attribute name="accel">F1</attribute>
+      </item>
+          <item>
+            <attribute name="label" translatable="yes">About</attribute>
+            <attribute name="action">app.about</attribute>
+          </item>
+    </submenu>
+  </menu>
+</interface>

=== modified file 'gnome-calculator/src/gnome-calculator.vala'
--- gnome-calculator/src/gnome-calculator.vala	2013-11-21 12:33:41 +0000
+++ gnome-calculator/src/gnome-calculator.vala	2013-11-21 16:43:46 +0000
@@ -75,9 +75,14 @@
         mode_cb ();
 
         var builder = new Gtk.Builder ();
+        
+        bool has_app_menu = calculator_has_app_menu ();
         try
         {
-            builder.add_from_resource ("/org/gnome/calculator/menu.ui");
+            if (has_app_menu)
+                builder.add_from_resource ("/org/gnome/calculator/menu.ui");
+            else
+                builder.add_from_resource ("/org/gnome/calculator/classicmenu.ui");
         }
         catch (Error e)
         {
@@ -85,12 +90,34 @@
         }
 
         var menu = builder.get_object ("appmenu") as MenuModel;
-        set_app_menu (menu);
-
-        add_accelerator ("<control>C", "app.copy", null);
-        add_accelerator ("<control>V", "app.paste", null);
-        add_accelerator ("<control>Z", "app.undo", null);
-        add_accelerator ("<control><shift>Z", "app.redo", null);
+
+        if (has_app_menu)
+        {
+            set_app_menu (menu);
+
+            add_accelerator ("<control>C", "app.copy", null);
+            add_accelerator ("<control>V", "app.paste", null);
+            add_accelerator ("<control>Z", "app.undo", null);
+            add_accelerator ("<control><shift>Z", "app.redo", null);
+        }
+        else
+            set_menubar(menu);
+
+    }
+
+    protected bool calculator_has_app_menu ()
+    {
+        Gtk.Settings gtksettings = Gtk.Settings.get_default();
+
+        /* We have three cases:
+         * - GNOME 3: show-app-menu true, show-menubar false -> use the app menu
+         * - Unity, OSX: show-app-menu and show-menubar true -> use the normal menu
+         * - Other WM, Windows: show-app-menu and show-menubar false -> use the normal menu
+         */
+        bool show_app_menu = gtksettings.gtk_shell_shows_app_menu;
+        bool show_menubar = gtksettings.gtk_shell_shows_menubar;
+
+        return show_app_menu && !show_menubar;
     }
 
     protected override void activate ()

