File autorun-kmix.diff of Package kdemultimedia3

--- kmix/restore_kmix_volumes.desktop
+++ kmix/restore_kmix_volumes.desktop
@@ -3,7 +3,7 @@
 X-KDE-autostart-phase=1
 X-KDE-autostart-condition=kmixrc::startkdeRestore:true
 Type=Application
-Exec=kmixctrl --restore
+Exec=kmixctrl --restore --autorun-kmix
 OnlyShowIn=KDE;
 Name=Restore Mixer Volumes
 Name[bg]=Възстановяване на стойностите на миксера
--- kmix/kmixctrl.cpp
+++ kmix/kmixctrl.cpp
@@ -28,6 +28,7 @@
 #include <kconfig.h>
 #include <kdebug.h>
 #include <qptrlist.h>
+#include <dcopclient.h>
 
 #include "kmixtoolbox.h"
 #include "mixer.h"
@@ -42,6 +43,7 @@
    { "save", I18N_NOOP("Save current volumes as default"), 0 },
    { "r", 0, 0 },
    { "restore", I18N_NOOP("Restore default volumes"), 0 },
+   { "autorun-kmix", I18N_NOOP("Launch kmix if mixer found"), 0 },
    KCmdLineLastOption
    // INSERT YOUR COMMANDLINE OPTIONS HERE
 };
@@ -75,6 +77,8 @@
        for (Mixer *mixer=Mixer::mixers().first(); mixer!=0; mixer=Mixer::mixers().next()) {
 	   mixer->volumeLoad( KGlobal::config() );
        }
+       if (args->isSet("autorun-kmix") && Mixer::mixers().first() && !kapp->dcopClient()->isApplicationRegistered("kmix"))
+           KApplication::kdeinitExec("kmix", QStringList(), 0, 0, "0");
    }
 
    // save volumes