Reinstated 'Open Recent' menu
authorPhilip Chimento <philip.chimento@gmail.com>
Fri, 4 Feb 2011 23:44:31 +0000 (00:44 +0100)
committerPhilip Chimento <philip.chimento@gmail.com>
Sat, 5 Feb 2011 01:57:32 +0000 (02:57 +0100)
And added a configure option, '--disable-recent' to skip it, in order to
work around the GTK Quartz bug on OS X that makes the player crash.

configure.ac
player/chimara.menus [deleted file]
player/chimara.menus.in [new file with mode: 0644]

index 3a4364c91011322ca6255eaa14c8d99e046720ef..444ad3181eee9a2e6aa99bc1b14c2881e5684534 100644 (file)
@@ -88,6 +88,19 @@ AC_ARG_ENABLE([iliad],
 
 AM_CONDITIONAL([TARGET_ILIAD], [$TEST "x$iliad" = xtrue])
 
+### BUILD WITHOUT RECENT FILES MANAGER #########################################
+# (to work around a bug on OS X)
+AC_ARG_ENABLE([recent],
+       [AS_HELP_STRING([--disable-recent],[Omit recent files menu (to work around a bug on OS X])],
+       [AS_CASE([${enableval}],
+               [yes], [OPEN_RECENT_MENU_ITEM="<menuitem action=\"recent\"/>"],
+               [no], [OPEN_RECENT_MENU_ITEM="<!--  <menuitem action=\"recent\"/>-->"],
+               [AC_MSG_ERROR([bad value ${enableval} for --enable-recent])]
+       )],
+       [OPEN_RECENT_MENU_ITEM="<menuitem action=\"recent\"/>"]
+)
+AC_SUBST(OPEN_RECENT_MENU_ITEM)
+
 ### RPM CONFIGURATION ##########################################################
 # --enable-rpm requires rpm and rpmbuild
 AC_PATH_PROG([RPMBUILD], [rpmbuild], [notfound])
@@ -178,6 +191,7 @@ interpreters/glulxe/Makefile
 interpreters/git/Makefile
 tests/Makefile
 player/Makefile
+player/chimara.menus
 docs/Makefile
 docs/reference/Makefile
 docs/reference/version.xml
diff --git a/player/chimara.menus b/player/chimara.menus
deleted file mode 100644 (file)
index 7f28fd5..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0"?>
-<ui>
-  <menubar>
-    <menu action="game">
-      <menuitem action="open"/>
-         <!--  <menuitem action="recent"/>-->
-      <separator/>
-      <menuitem action="stop"/>
-      <menuitem action="quit_chimara"/>
-    </menu>
-    <menu action="edit">
-      <menuitem action="copy"/>
-      <menuitem action="paste"/>
-      <separator/>
-      <menuitem action="preferences"/>
-    </menu>
-    <menu action="view">
-      <menuitem action="toolbar"/>
-    </menu>
-    <menu action="command">
-      <menuitem action="undo"/>
-      <menuitem action="save"/>
-      <menuitem action="restore"/>
-      <menuitem action="restart"/>
-      <menuitem action="quit"/>
-    </menu>
-    <menu action="help">
-      <menuitem action="about"/>
-    </menu>
-  </menubar>
-  <toolbar>
-    <toolitem action="open"/>
-    <separator/>
-    <toolitem action="restore"/>
-    <toolitem action="save"/>
-  </toolbar>
-</ui>
diff --git a/player/chimara.menus.in b/player/chimara.menus.in
new file mode 100644 (file)
index 0000000..cb383f7
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<ui>
+  <menubar>
+    <menu action="game">
+      <menuitem action="open"/>
+         @OPEN_RECENT_MENU_ITEM@
+      <separator/>
+      <menuitem action="stop"/>
+      <menuitem action="quit_chimara"/>
+    </menu>
+    <menu action="edit">
+      <menuitem action="copy"/>
+      <menuitem action="paste"/>
+      <separator/>
+      <menuitem action="preferences"/>
+    </menu>
+    <menu action="view">
+      <menuitem action="toolbar"/>
+    </menu>
+    <menu action="command">
+      <menuitem action="undo"/>
+      <menuitem action="save"/>
+      <menuitem action="restore"/>
+      <menuitem action="restart"/>
+      <menuitem action="quit"/>
+    </menu>
+    <menu action="help">
+      <menuitem action="about"/>
+    </menu>
+  </menubar>
+  <toolbar>
+    <toolitem action="open"/>
+    <separator/>
+    <toolitem action="restore"/>
+    <toolitem action="save"/>
+  </toolbar>
+</ui>