]> git.sesse.net Git - vlc/commitdiff
Start dbus always, move inhibit and dbus startup to vlc
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 6 Feb 2012 20:40:48 +0000 (22:40 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 6 Feb 2012 20:43:20 +0000 (22:43 +0200)
bin/vlc.c
src/libvlc.c

index 2b1871941531be992e7c75b141a638e7e9d61fbb..057266b128d7df59e18501d52af2177c158c732c 100644 (file)
--- a/bin/vlc.c
+++ b/bin/vlc.c
@@ -208,6 +208,10 @@ int main( int i_argc, const char *ppsz_argv[] )
 
 #if !defined (HAVE_MAEMO) && !defined __APPLE__ && !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;
index c0e37f7a223d455ce6fa78adb08fe486f256986d..237267b1ebfb3a02bea8f24f274726c6335c3c70 100644 (file)
@@ -646,22 +646,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
      */
     intf_Create( p_libvlc, "hotkeys,none" );
 
-#ifdef HAVE_DBUS
-    /* loads dbus control interface if in one-instance mode
-     * we do it only when playlist exists, because dbus module needs it */
-    if( var_InheritBool( p_libvlc, "one-instance" )
-     || ( var_InheritBool( p_libvlc, "one-instance-when-started-from-file" )
-       && var_InheritBool( p_libvlc, "started-from-file" ) ) )
-        intf_Create( p_libvlc, "dbus,none" );
-
-# if !defined (HAVE_MAEMO)
-    /* Prevents the power management daemon from suspending the system
-     * when VLC is active */
-    if( var_InheritBool( p_libvlc, "inhibit" ) > 0 )
-        intf_Create( p_libvlc, "inhibit,none" );
-# endif
-#endif
-
     if( var_InheritBool( p_libvlc, "file-logging" )
 #ifdef HAVE_SYSLOG_H
         && !var_InheritBool( p_libvlc, "syslog" )