[Scummvm-cvs-logs] scummvm master -> 708f7739eb726a08ad5af7208bc34dc9d96a3414

clone2727 clone2727 at gmail.com
Wed Jul 13 15:33:24 CEST 2011


This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
19bb69c7ed BACKENDS: Fix compilation on Mac OS X without translation support
cde3a3d9a0 BACKENDS: Rename appMenu_osx.* to appmenu_osx.*
7f58d62ba1 BACKENDS: Remove unneeded define check
708f7739eb BACKENDS: Fix a typo


Commit: 19bb69c7ed9421fc4b410c58f32a879d9e4c44a0
    https://github.com/scummvm/scummvm/commit/19bb69c7ed9421fc4b410c58f32a879d9e4c44a0
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2011-07-13T06:20:34-07:00

Commit Message:
BACKENDS: Fix compilation on Mac OS X without translation support

Changed paths:
    backends/platform/sdl/macosx/appMenu_osx.mm



diff --git a/backends/platform/sdl/macosx/appMenu_osx.mm b/backends/platform/sdl/macosx/appMenu_osx.mm
index 9305643..794bb2d 100755
--- a/backends/platform/sdl/macosx/appMenu_osx.mm
+++ b/backends/platform/sdl/macosx/appMenu_osx.mm
@@ -53,7 +53,11 @@ void replaceApplicationMenuItems() {
 	appleMenu = [[NSMenu alloc] initWithTitle:@""];
 
 	// Get current encoding
+#ifdef USE_TRANSLATION
 	NSStringEncoding stringEncoding = CFStringConvertEncodingToNSStringEncoding(CFStringConvertIANACharSetNameToEncoding((CFStringRef)[NSString stringWithCString:(TransMan.getCurrentCharset()).c_str() encoding:NSASCIIStringEncoding]));
+#else
+	NSStringEncoding stringEncoding = NSASCIIStringEncoding;
+#endif
 	
 	// Add "About ScummVM" menu item
 	[appleMenu addItemWithTitle:[NSString stringWithCString:_("About ScummVM") encoding:stringEncoding] action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""];


Commit: cde3a3d9a00f67b1bc54a6ac2b135fdb8749ddcf
    https://github.com/scummvm/scummvm/commit/cde3a3d9a00f67b1bc54a6ac2b135fdb8749ddcf
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2011-07-13T06:26:50-07:00

Commit Message:
BACKENDS: Rename appMenu_osx.* to appmenu_osx.*

Changed paths:
  A backends/platform/sdl/macosx/appmenu_osx.h
  A backends/platform/sdl/macosx/appmenu_osx.mm
  R backends/platform/sdl/macosx/appMenu_osx.h
  R backends/platform/sdl/macosx/appMenu_osx.mm
    backends/platform/sdl/module.mk



diff --git a/backends/platform/sdl/macosx/appMenu_osx.h b/backends/platform/sdl/macosx/appMenu_osx.h
deleted file mode 100755
index 005414b..0000000
--- a/backends/platform/sdl/macosx/appMenu_osx.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef APPMENU_OSX_H
-#define APPMENU_OSX_H
-
-#if defined(MACOSX)
-
-void replaceApplicationMenuItems();
-
-#endif // MACOSX
-
-#endif
diff --git a/backends/platform/sdl/macosx/appMenu_osx.mm b/backends/platform/sdl/macosx/appMenu_osx.mm
deleted file mode 100755
index 794bb2d..0000000
--- a/backends/platform/sdl/macosx/appMenu_osx.mm
+++ /dev/null
@@ -1,114 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#if defined(MACOSX)
-
-// Disable symbol overrides so that we can use system headers.
-#define FORBIDDEN_SYMBOL_ALLOW_ALL
-
-#include "backends/platform/sdl/macosx/appMenu_osx.h"
-#include "common/translation.h"
-
-#include <Cocoa/Cocoa.h>
-
-// Apple removed setAppleMenu from the header files in 10.4,
-// but as the method still exists we declare it ourselves here.
-// Yes, this works :)
- at interface NSApplication(MissingFunction)
-- (void)setAppleMenu:(NSMenu *)menu;
- at end
-
-void replaceApplicationMenuItems() {
-
-	// Code mainly copied and adapted from SDLmain.m
-	NSMenu *appleMenu;
-	NSMenu *windowMenu;
-	NSMenuItem *menuItem;
-
-	// For some reason [[NSApp mainMenu] removeAllItems] doesn't work and crashes, so we need
-	// to remove the SDL generated menus one by one
-	[[NSApp mainMenu] removeItemAtIndex:0];		// Remove application menu
-	[[NSApp mainMenu] removeItemAtIndex:0];		// Remove "Windows" menu
-
-	// Create new application menu
-	appleMenu = [[NSMenu alloc] initWithTitle:@""];
-
-	// Get current encoding
-#ifdef USE_TRANSLATION
-	NSStringEncoding stringEncoding = CFStringConvertEncodingToNSStringEncoding(CFStringConvertIANACharSetNameToEncoding((CFStringRef)[NSString stringWithCString:(TransMan.getCurrentCharset()).c_str() encoding:NSASCIIStringEncoding]));
-#else
-	NSStringEncoding stringEncoding = NSASCIIStringEncoding;
-#endif
-	
-	// Add "About ScummVM" menu item
-	[appleMenu addItemWithTitle:[NSString stringWithCString:_("About ScummVM") encoding:stringEncoding] action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""];
-
-	// Add seperator
-	[appleMenu addItem:[NSMenuItem separatorItem]];
-
-	// Add "Hide ScummVM" menu item
-	[appleMenu addItemWithTitle:[NSString stringWithCString:_("Hide ScummVM") encoding:stringEncoding] action:@selector(hide:) keyEquivalent:@"h"];
-
-	// Add "Hide Others" menu item
-	menuItem = (NSMenuItem *)[appleMenu addItemWithTitle:[NSString stringWithCString:_("Hide Others") encoding:stringEncoding] action:@selector(hideOtherApplications:) keyEquivalent:@"h"];
-	[menuItem setKeyEquivalentModifierMask:(NSAlternateKeyMask|NSCommandKeyMask)];
-
-	// Add "Show All" menu item
-	[appleMenu addItemWithTitle:[NSString stringWithCString:_("Show All") encoding:stringEncoding] action:@selector(unhideAllApplications:) keyEquivalent:@""];
-
-	// Add seperator
-	[appleMenu addItem:[NSMenuItem separatorItem]];
-
-	// Add "Quit ScummVM" menu item
-	[appleMenu addItemWithTitle:[NSString stringWithCString:_("Quit ScummVM") encoding:stringEncoding] action:@selector(terminate:) keyEquivalent:@"q"];
-
-	// Put application menu into the menubar
-	menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""];
-	[menuItem setSubmenu:appleMenu];
-	[[NSApp mainMenu] addItem:menuItem];
-
-	// Tell the application object that this is now the application menu
-	[NSApp setAppleMenu:appleMenu];
-
-
-	// Create new "Window" menu
-	windowMenu = [[NSMenu alloc] initWithTitle:[NSString stringWithCString:_("Window") encoding:stringEncoding]];
-
-	// Add "Minimize" menu item
-	menuItem = [[NSMenuItem alloc] initWithTitle:[NSString stringWithCString:_("Minimize") encoding:stringEncoding] action:@selector(performMiniaturize:) keyEquivalent:@"m"];
-	[windowMenu addItem:menuItem];
-
-	// Put menu into the menubar
-	menuItem = [[NSMenuItem alloc] initWithTitle:[NSString stringWithCString:_("Window") encoding:stringEncoding] action:nil keyEquivalent:@""];
-	[menuItem setSubmenu:windowMenu];
-	[[NSApp mainMenu] addItem:menuItem];
-
-	// Tell the application object that this is now the window menu.
-	[NSApp setWindowsMenu:windowMenu];
-
-	// Finally give up our references to the objects
-	[appleMenu release];
-	[windowMenu release];
-	[menuItem release];
-}
-
-#endif // MACOSX
diff --git a/backends/platform/sdl/macosx/appmenu_osx.h b/backends/platform/sdl/macosx/appmenu_osx.h
new file mode 100755
index 0000000..005414b
--- /dev/null
+++ b/backends/platform/sdl/macosx/appmenu_osx.h
@@ -0,0 +1,32 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef APPMENU_OSX_H
+#define APPMENU_OSX_H
+
+#if defined(MACOSX)
+
+void replaceApplicationMenuItems();
+
+#endif // MACOSX
+
+#endif
diff --git a/backends/platform/sdl/macosx/appmenu_osx.mm b/backends/platform/sdl/macosx/appmenu_osx.mm
new file mode 100755
index 0000000..3e930fb
--- /dev/null
+++ b/backends/platform/sdl/macosx/appmenu_osx.mm
@@ -0,0 +1,114 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#if defined(MACOSX)
+
+// Disable symbol overrides so that we can use system headers.
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
+#include "backends/platform/sdl/macosx/appmenu_osx.h"
+#include "common/translation.h"
+
+#include <Cocoa/Cocoa.h>
+
+// Apple removed setAppleMenu from the header files in 10.4,
+// but as the method still exists we declare it ourselves here.
+// Yes, this works :)
+ at interface NSApplication(MissingFunction)
+- (void)setAppleMenu:(NSMenu *)menu;
+ at end
+
+void replaceApplicationMenuItems() {
+
+	// Code mainly copied and adapted from SDLmain.m
+	NSMenu *appleMenu;
+	NSMenu *windowMenu;
+	NSMenuItem *menuItem;
+
+	// For some reason [[NSApp mainMenu] removeAllItems] doesn't work and crashes, so we need
+	// to remove the SDL generated menus one by one
+	[[NSApp mainMenu] removeItemAtIndex:0];		// Remove application menu
+	[[NSApp mainMenu] removeItemAtIndex:0];		// Remove "Windows" menu
+
+	// Create new application menu
+	appleMenu = [[NSMenu alloc] initWithTitle:@""];
+
+	// Get current encoding
+#ifdef USE_TRANSLATION
+	NSStringEncoding stringEncoding = CFStringConvertEncodingToNSStringEncoding(CFStringConvertIANACharSetNameToEncoding((CFStringRef)[NSString stringWithCString:(TransMan.getCurrentCharset()).c_str() encoding:NSASCIIStringEncoding]));
+#else
+	NSStringEncoding stringEncoding = NSASCIIStringEncoding;
+#endif
+	
+	// Add "About ScummVM" menu item
+	[appleMenu addItemWithTitle:[NSString stringWithCString:_("About ScummVM") encoding:stringEncoding] action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""];
+
+	// Add seperator
+	[appleMenu addItem:[NSMenuItem separatorItem]];
+
+	// Add "Hide ScummVM" menu item
+	[appleMenu addItemWithTitle:[NSString stringWithCString:_("Hide ScummVM") encoding:stringEncoding] action:@selector(hide:) keyEquivalent:@"h"];
+
+	// Add "Hide Others" menu item
+	menuItem = (NSMenuItem *)[appleMenu addItemWithTitle:[NSString stringWithCString:_("Hide Others") encoding:stringEncoding] action:@selector(hideOtherApplications:) keyEquivalent:@"h"];
+	[menuItem setKeyEquivalentModifierMask:(NSAlternateKeyMask|NSCommandKeyMask)];
+
+	// Add "Show All" menu item
+	[appleMenu addItemWithTitle:[NSString stringWithCString:_("Show All") encoding:stringEncoding] action:@selector(unhideAllApplications:) keyEquivalent:@""];
+
+	// Add seperator
+	[appleMenu addItem:[NSMenuItem separatorItem]];
+
+	// Add "Quit ScummVM" menu item
+	[appleMenu addItemWithTitle:[NSString stringWithCString:_("Quit ScummVM") encoding:stringEncoding] action:@selector(terminate:) keyEquivalent:@"q"];
+
+	// Put application menu into the menubar
+	menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""];
+	[menuItem setSubmenu:appleMenu];
+	[[NSApp mainMenu] addItem:menuItem];
+
+	// Tell the application object that this is now the application menu
+	[NSApp setAppleMenu:appleMenu];
+
+
+	// Create new "Window" menu
+	windowMenu = [[NSMenu alloc] initWithTitle:[NSString stringWithCString:_("Window") encoding:stringEncoding]];
+
+	// Add "Minimize" menu item
+	menuItem = [[NSMenuItem alloc] initWithTitle:[NSString stringWithCString:_("Minimize") encoding:stringEncoding] action:@selector(performMiniaturize:) keyEquivalent:@"m"];
+	[windowMenu addItem:menuItem];
+
+	// Put menu into the menubar
+	menuItem = [[NSMenuItem alloc] initWithTitle:[NSString stringWithCString:_("Window") encoding:stringEncoding] action:nil keyEquivalent:@""];
+	[menuItem setSubmenu:windowMenu];
+	[[NSApp mainMenu] addItem:menuItem];
+
+	// Tell the application object that this is now the window menu.
+	[NSApp setWindowsMenu:windowMenu];
+
+	// Finally give up our references to the objects
+	[appleMenu release];
+	[windowMenu release];
+	[menuItem release];
+}
+
+#endif // MACOSX
diff --git a/backends/platform/sdl/module.mk b/backends/platform/sdl/module.mk
index 34631c3..f1afe37 100644
--- a/backends/platform/sdl/module.mk
+++ b/backends/platform/sdl/module.mk
@@ -15,7 +15,7 @@ ifdef MACOSX
 MODULE_OBJS += \
 	macosx/macosx-main.o \
 	macosx/macosx.o \
-	macosx/appMenu_osx.o
+	macosx/appmenu_osx.o
 endif
 
 ifdef WIN32


Commit: 7f58d62ba1a7d86083f0896e8e5607fb92fe018a
    https://github.com/scummvm/scummvm/commit/7f58d62ba1a7d86083f0896e8e5607fb92fe018a
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2011-07-13T06:28:53-07:00

Commit Message:
BACKENDS: Remove unneeded define check

Changed paths:
    backends/platform/sdl/macosx/appmenu_osx.mm



diff --git a/backends/platform/sdl/macosx/appmenu_osx.mm b/backends/platform/sdl/macosx/appmenu_osx.mm
index 3e930fb..ab0b8f8 100755
--- a/backends/platform/sdl/macosx/appmenu_osx.mm
+++ b/backends/platform/sdl/macosx/appmenu_osx.mm
@@ -20,8 +20,6 @@
  *
  */
 
-#if defined(MACOSX)
-
 // Disable symbol overrides so that we can use system headers.
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 
@@ -110,5 +108,3 @@ void replaceApplicationMenuItems() {
 	[windowMenu release];
 	[menuItem release];
 }
-
-#endif // MACOSX


Commit: 708f7739eb726a08ad5af7208bc34dc9d96a3414
    https://github.com/scummvm/scummvm/commit/708f7739eb726a08ad5af7208bc34dc9d96a3414
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2011-07-13T06:30:15-07:00

Commit Message:
BACKENDS: Fix a typo

Changed paths:
    backends/platform/sdl/macosx/appmenu_osx.mm



diff --git a/backends/platform/sdl/macosx/appmenu_osx.mm b/backends/platform/sdl/macosx/appmenu_osx.mm
index ab0b8f8..bb089a6 100755
--- a/backends/platform/sdl/macosx/appmenu_osx.mm
+++ b/backends/platform/sdl/macosx/appmenu_osx.mm
@@ -60,7 +60,7 @@ void replaceApplicationMenuItems() {
 	// Add "About ScummVM" menu item
 	[appleMenu addItemWithTitle:[NSString stringWithCString:_("About ScummVM") encoding:stringEncoding] action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""];
 
-	// Add seperator
+	// Add separator
 	[appleMenu addItem:[NSMenuItem separatorItem]];
 
 	// Add "Hide ScummVM" menu item
@@ -73,7 +73,7 @@ void replaceApplicationMenuItems() {
 	// Add "Show All" menu item
 	[appleMenu addItemWithTitle:[NSString stringWithCString:_("Show All") encoding:stringEncoding] action:@selector(unhideAllApplications:) keyEquivalent:@""];
 
-	// Add seperator
+	// Add separator
 	[appleMenu addItem:[NSMenuItem separatorItem]];
 
 	// Add "Quit ScummVM" menu item






More information about the Scummvm-git-logs mailing list