Hello community,
here is the log from the commit of package kdemultimedia4
checked in at Mon Feb 4 17:37:42 CET 2008.
--------
--- KDE/kdemultimedia4/kdemultimedia4.changes 2008-02-03 17:15:31.000000000 +0100
+++ /mounts/work_src_done/STABLE/kdemultimedia4/kdemultimedia4.changes 2008-02-04 16:01:47.000000000 +0100
@@ -1,0 +2,5 @@
+Mon Feb 4 16:01:45 CET 2008 - stbinner@suse.de
+
+- port kmix-autostart.diff
+
+-------------------------------------------------------------------
New:
----
kmix-autostart.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kdemultimedia4.spec ++++++
--- /var/tmp/diff_new_pack.RVI587/_old 2008-02-04 17:37:33.000000000 +0100
+++ /var/tmp/diff_new_pack.RVI587/_new 2008-02-04 17:37:33.000000000 +0100
@@ -18,11 +18,12 @@
Summary: kdemultimedia base package
Url: http://www.kde.org
Version: 4.0.1
-Release: 1
+Release: 3
%define rversion 4.0.1
Source0: kdemultimedia-%rversion.tar.bz2
Source1: _upstream
Patch0: 4_0_BRANCH.diff
+Patch1: kmix-autostart.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%kde4_runtime_requires
Requires: libkcddb4
@@ -50,8 +51,8 @@
%prep
%setup -q -n kdemultimedia-%rversion
-#%patch0
#%patch
+%patch1
%build
%cmake_kde4 -d build
@@ -325,6 +326,8 @@
%doc COPYING COPYING-DOCS README
%changelog
+* Mon Feb 04 2008 stbinner@suse.de
+- port kmix-autostart.diff
* Thu Jan 31 2008 dmueller@suse.de
- update to 4.0.1
* Sun Jan 20 2008 stbinner@suse.de
++++++ kmix-autostart.diff ++++++
Index: kmix/KMixApp.h
===================================================================
--- kmix/KMixApp.h (revision 770699)
+++ kmix/KMixApp.h (working copy)
@@ -36,6 +36,7 @@
public slots:
//void quitExtended(); // For a hack on visibility()
static void keepVisibility(bool);
+ static void autoStart(bool);
/*
signals:
void stopUpdatesOnVisibility();
@@ -43,6 +44,7 @@
private:
KMixWindow *m_kmix;
static bool _keepVisibility;
+ static bool _autoStart;
};
#endif
Index: kmix/kmixprefdlg.h
===================================================================
--- kmix/kmixprefdlg.h (revision 770699)
+++ kmix/kmixprefdlg.h (working copy)
@@ -57,6 +57,7 @@
QCheckBox *m_showTicks;
QCheckBox *m_showLabels;
QCheckBox *m_onLogin;
+ QCheckBox *m_disableAutoStart;
QRadioButton *_rbVertical;
QRadioButton *_rbHorizontal;
};
Index: kmix/kmix.cpp
===================================================================
--- kmix/kmix.cpp (revision 770699)
+++ kmix/kmix.cpp (working copy)
@@ -27,8 +27,10 @@
#include <QLabel>
#include
#include <KTabWidget>
+#include <QTimer>
// include files for KDE
+#include
#include
#include
#include
@@ -85,6 +87,10 @@
theKMixDeviceManager->initHotplug();
connect(theKMixDeviceManager, SIGNAL( plugged( const char*, const QString&, QString&)), SLOT (plugged( const char*, const QString&, QString&) ) );
connect(theKMixDeviceManager, SIGNAL( unplugged( const QString&)), SLOT (unplugged( const QString&) ) );
+
+ if (KCmdLineArgs::parsedArgs()->isSet("autostart") && ! Mixer::mixers().first())
+ QTimer::singleShot(0, kapp, SLOT(quit()));
+
if ( m_startVisible )
show(); // Started visible: We don't do "m_isVisible = true;", as the showEvent() already does it
@@ -221,6 +227,7 @@
config.writeEntry( "Tickmarks", m_showTicks );
config.writeEntry( "Labels", m_showLabels );
config.writeEntry( "startkdeRestore", m_onLogin );
+ config.writeEntry( "AutoStart", m_autoStart );
Mixer* mixerMasterCard = Mixer::getGlobalMasterMixer();
if ( mixerMasterCard != 0 ) {
config.writeEntry( "MasterMixer", mixerMasterCard->id() );
@@ -291,6 +298,7 @@
m_showLabels = config.readEntry("Labels", true);
m_onLogin = config.readEntry("startkdeRestore", true );
m_startVisible = config.readEntry("Visible", true);
+ m_autoStart = config.readEntry("AutoStart", true);
m_multiDriverMode = config.readEntry("MultiDriver", false);
const QString& orientationString = config.readEntry("Orientation", "Vertical");
QString mixerMasterCard = config.readEntry( "MasterMixer", "" );
@@ -553,6 +561,7 @@
m_prefDlg->m_volumeChk->setChecked(m_volumeWidget);
m_prefDlg->m_volumeChk->setEnabled( m_showDockWidget );
m_prefDlg->m_onLogin->setChecked( m_onLogin );
+ m_prefDlg->m_disableAutoStart->setChecked( !m_autoStart );
m_prefDlg->m_showTicks->setChecked( m_showTicks );
m_prefDlg->m_showLabels->setChecked( m_showLabels );
@@ -594,6 +603,7 @@
m_showDockWidget = prefDlg->m_dockingChk->isChecked();
m_volumeWidget = prefDlg->m_volumeChk->isChecked();
m_onLogin = prefDlg->m_onLogin->isChecked();
+ m_autoStart = !prefDlg->m_disableAutoStart->isChecked();
if ( prefDlg->_rbVertical->isChecked() ) {
m_toplevelOrientation = Qt::Vertical;
}
Index: kmix/KMixApp.cpp
===================================================================
--- kmix/KMixApp.cpp (revision 770699)
+++ kmix/KMixApp.cpp (working copy)
@@ -22,9 +22,11 @@
#include "KMixApp.h"
#include "kmix.h"
#include
+#include
bool KMixApp::_keepVisibility = false;
+bool KMixApp::_autoStart = false;
KMixApp::KMixApp()
: KUniqueApplication(), m_kmix( 0 )
@@ -49,6 +51,16 @@
KMixApp::newInstance()
{
//kDebug(67100) << "KMixApp::newInstance() isRestored()=" << isRestored() << "_keepVisibility=" << _keepVisibility;
+ KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+
+ if (args->isSet("autostart"))
+ {
+ kapp->disableSessionManagement();
+
+ if ( m_kmix )
+ return 0;
+ }
+
if ( m_kmix )
{ // There already exists an instance/window
kDebug(67100) << "KMixApp::newInstance() Instance exists";
@@ -94,6 +106,11 @@
_keepVisibility = val_keepVisibility;
}
+void KMixApp::autoStart(bool val_autoStart) {
+ //kDebug(67100) << "KMixApp::autoStart()";
+ _autoStart = val_autoStart;
+}
+
/*
void
KMixApp::quitExtended()
Index: kmix/kmix.h
===================================================================
--- kmix/kmix.h (revision 770699)
+++ kmix/kmix.h (working copy)
@@ -94,6 +94,7 @@
bool m_showDockWidget;
bool m_volumeWidget;
+ bool m_autoStart;
bool m_showTicks;
bool m_showLabels;
bool m_onLogin;
Index: kmix/main.cpp
===================================================================
--- kmix/main.cpp (revision 770699)
+++ kmix/main.cpp (working copy)
@@ -55,12 +55,15 @@
KCmdLineOptions options;
options.add("keepvisibility", ki18n("Inhibits the unhiding of the KMix main window, if KMix is already running."));
+ options.add("autostart", ki18n("Used by kmix_autostart.desktop"));
KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
KUniqueApplication::addCmdLineOptions();
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
bool hasArgKeepvisibility = args->isSet("keepvisibility");
KMixApp::keepVisibility(hasArgKeepvisibility);
+ bool hasAutoStart = args->isSet("autostart");
+ KMixApp::autoStart(hasAutoStart);
if (!KMixApp::start())
return 0;
Index: kmix/kmixprefdlg.cpp
===================================================================
--- kmix/kmixprefdlg.cpp (revision 770699)
+++ kmix/kmixprefdlg.cpp (working copy)
@@ -78,6 +78,12 @@
m_onLogin = new QCheckBox( i18n("Restore volumes on login"), m_generalTab );
l->addWidget( m_onLogin );
+ l = new QHBoxLayout();
+ layout->addItem( l );
+ l->addSpacing(10);
+ m_disableAutoStart = new QCheckBox( i18n("Disable automatic startup on login"), m_generalTab );
+ l->addWidget( m_disableAutoStart );
+
// -----------------------------------------------------------
label = new QLabel( i18n("Visual"), m_generalTab );
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org