[vlc-commits] Start dbus always, move inhibit and dbus startup to vlc

Rémi Denis-Courmont git at videolan.org
Mon Feb 6 21:43:25 CET 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Feb  6 22:40:48 2012 +0200| [db36045cd98dde367fca9b1b825530bfe1de329c] | committer: Rémi Denis-Courmont

Start dbus always, move inhibit and dbus startup to vlc

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=db36045cd98dde367fca9b1b825530bfe1de329c
---

 bin/vlc.c    |    4 ++++
 src/libvlc.c |   16 ----------------
 2 files changed, 4 insertions(+), 16 deletions(-)

diff --git a/bin/vlc.c b/bin/vlc.c
index 2b18719..057266b 100644
--- a/bin/vlc.c
+++ b/bin/vlc.c
@@ -209,6 +209,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;
 
diff --git a/src/libvlc.c b/src/libvlc.c
index c0e37f7..237267b 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -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" )



More information about the vlc-commits mailing list