]> git.sesse.net Git - vlc/blobdiff - bin/vlc.c
macosx: fix main menu initialization order on startup
[vlc] / bin / vlc.c
index 9546077832a5d82f97eb92bf3444a2900f4ea112..e0deebe474e2d2b96ed9d18fdd46b4d9816aec58 100644 (file)
--- a/bin/vlc.c
+++ b/bin/vlc.c
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * vlc.c: the VLC player
  *****************************************************************************
- * Copyright (C) 1998-2008 the VideoLAN team
+ * Copyright (C) 1998-2013 the VideoLAN team
  * $Id$
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
@@ -207,14 +207,7 @@ int main( int i_argc, const char *ppsz_argv[] )
     argv[argc++] = "--no-ignore-config";
     argv[argc++] = "--media-library";
     ppsz_argv++; i_argc--; /* skip executable path */
-#ifdef __APPLE__
-    /* When VLC.app is run by double clicking in Mac OS X, the 2nd arg
-     * is the PSN - process serial number (a unique PID-ish thingie)
-     * still ok for real Darwin & when run from command line
-     * for example -psn_0_9306113 */
-    if (i_argc >= 1 && !strncmp (*ppsz_argv, "-psn" , 4))
-        ppsz_argv++, i_argc--;
-#endif
+
 #ifdef __OS2__
     for (int i = 0; i < i_argc; i++)
         if ((argv[argc++] = FromSystem (ppsz_argv[i])) == NULL)
@@ -238,15 +231,15 @@ int main( int i_argc, const char *ppsz_argv[] )
 
     int ret = 1;
     libvlc_set_exit_handler (vlc, vlc_kill, &self);
+    libvlc_set_app_id (vlc, "org.VideoLAN.VLC", PACKAGE_VERSION, PACKAGE_NAME);
     libvlc_set_user_agent (vlc, "VLC media player", "VLC/"PACKAGE_VERSION);
 
     libvlc_add_intf (vlc, "hotkeys,none");
-#if !defined (HAVE_MAEMO) && !defined __APPLE__ && !defined (__OS2__)
+#if !defined (__OS2__)
     libvlc_add_intf (vlc, "globalhotkeys,none");
 #endif
 #ifdef HAVE_DBUS
     libvlc_add_intf (vlc, "dbus,none");
-    libvlc_add_intf (vlc, "inhibit,none");
 #endif
     if (libvlc_add_intf (vlc, NULL))
         goto out;
@@ -281,7 +274,7 @@ int main( int i_argc, const char *ppsz_argv[] )
 out:
     libvlc_release (vlc);
 #ifdef __OS2__
-    for (int i = 2; i < argc; i++)
+    for (int i = argc - i_argc; i < argc; i++)
         free (argv[i]);
 #endif
     return ret;