summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAlessandro Decina <alessandro.decina@collabora.co.uk>2012-05-22 14:26:13 +0200
committerAlessandro Decina <alessandro.decina@collabora.co.uk>2012-05-23 11:43:32 +0200
commit41df02bb2de86cec4e2b5eeebc4af8ddcf4b77df (patch)
tree0e6c1d8ee58e5de9035f4b0a871e7ca4a895c7a9 /sys
parent04e8a9fa574cc6058f290b08b833e111d167271c (diff)
osxvideosink: don't create application menus
Diffstat (limited to 'sys')
-rw-r--r--sys/osxvideo/osxvideosink.m83
1 files changed, 0 insertions, 83 deletions
diff --git a/sys/osxvideo/osxvideosink.m b/sys/osxvideo/osxvideosink.m
index 942bddccc..200e798ff 100644
--- a/sys/osxvideo/osxvideosink.m
+++ b/sys/osxvideo/osxvideosink.m
@@ -85,88 +85,6 @@ gst_osx_video_sink_call_from_main_thread(NSObject * object, SEL function,
[pool release];
}
-static NSString *
-GetApplicationName(void)
-{
- NSDictionary *dict;
- NSString *appName = 0;
-
- /* Determine the application name */
- dict = (NSDictionary *)CFBundleGetInfoDictionary(CFBundleGetMainBundle());
- if (dict)
- appName = [dict objectForKey: @"CFBundleName"];
-
- if (![appName length])
- appName = [[NSProcessInfo processInfo] processName];
-
- return appName;
-}
-
-static void
-CreateApplicationMenus(void)
-{
- NSString *appName;
- NSString *title;
- NSMenu *appleMenu;
- NSMenu *windowMenu;
- NSMenuItem *menuItem;
-
- /* Create the main menu bar */
- [NSApp setMainMenu:[[NSMenu alloc] init]];
-
- /* Create the application menu */
- appName = GetApplicationName();
- appleMenu = [[NSMenu alloc] initWithTitle:@""];
-
- /* Add menu items */
- title = [@"About " stringByAppendingString:appName];
- [appleMenu addItemWithTitle:title action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""];
-
- [appleMenu addItem:[NSMenuItem separatorItem]];
-
- title = [@"Hide " stringByAppendingString:appName];
- [appleMenu addItemWithTitle:title action:@selector(hide:) keyEquivalent:@/*"h"*/""];
-
- menuItem = (NSMenuItem *)[appleMenu addItemWithTitle:@"Hide Others" action:@selector(hideOtherApplications:) keyEquivalent:@/*"h"*/""];
- [menuItem setKeyEquivalentModifierMask:(NSAlternateKeyMask|NSCommandKeyMask)];
-
- [appleMenu addItemWithTitle:@"Show All" action:@selector(unhideAllApplications:) keyEquivalent:@""];
-
- [appleMenu addItem:[NSMenuItem separatorItem]];
-
- title = [@"Quit " stringByAppendingString:appName];
- [appleMenu addItemWithTitle:title action:@selector(terminate:) keyEquivalent:@/*"q"*/""];
-
- /* Put menu into the menubar */
- menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""];
- [menuItem setSubmenu:appleMenu];
- [[NSApp mainMenu] addItem:menuItem];
- [menuItem release];
-
- /* Tell the application object that this is now the application menu */
- [NSApp setAppleMenu:appleMenu];
- [appleMenu release];
-
-
- /* Create the window menu */
- windowMenu = [[NSMenu alloc] initWithTitle:@"Window"];
-
- /* "Minimize" item */
- menuItem = [[NSMenuItem alloc] initWithTitle:@"Minimize" action:@selector(performMiniaturize:) keyEquivalent:@/*"m"*/""];
- [windowMenu addItem:menuItem];
- [menuItem release];
-
- /* Put menu into the menubar */
- menuItem = [[NSMenuItem alloc] initWithTitle:@"Window" action:nil keyEquivalent:@""];
- [menuItem setSubmenu:windowMenu];
- [[NSApp mainMenu] addItem:menuItem];
- [menuItem release];
-
- /* Tell the application object that this is now the window menu */
- [NSApp setWindowsMenu:windowMenu];
- [windowMenu release];
-}
-
/* Poll for cocoa events */
static void
cocoa_poll_events (void) {
@@ -796,7 +714,6 @@ gst_osx_video_sink_get_type (void)
rect.size.height = (float) osxwindow->height;
if (!osxvideosink->app_started) {
- CreateApplicationMenus();
[NSApplication sharedApplication];
[NSApp finishLaunching];
osxvideosink->app_started = TRUE;