summaryrefslogtreecommitdiffstats
path: root/kmix
diff options
context:
space:
mode:
Diffstat (limited to 'kmix')
-rw-r--r--kmix/kmix.cpp4
-rw-r--r--kmix/kmix.desktop3
-rw-r--r--kmix/kmix.h1
-rw-r--r--kmix/kmixprefdlg.cpp4
-rw-r--r--kmix/kmixprefdlg.h1
5 files changed, 13 insertions, 0 deletions
diff --git a/kmix/kmix.cpp b/kmix/kmix.cpp
index 85a3d39e..ce4ab910 100644
--- a/kmix/kmix.cpp
+++ b/kmix/kmix.cpp
@@ -270,6 +270,7 @@ KMixWindow::saveConfig()
config->writeEntry( "Orientation","Vertical" );
else
config->writeEntry( "Orientation","Horizontal" );
+ config->writeEntry( "Autostart", m_autoStart );
// save mixer widgets
for ( KMixerWidget *mw = m_mixerWidgets.first(); mw != 0; mw = m_mixerWidgets.next() )
@@ -321,6 +322,7 @@ KMixWindow::loadConfig()
m_toplevelOrientation = Qt::Vertical;
else
m_toplevelOrientation = Qt::Horizontal;
+ m_autoStart = config->readBoolEntry("Autostart", true);
// show/hide menu bar
m_showMenubar = config->readBoolEntry("Menubar", true);
@@ -436,6 +438,7 @@ KMixWindow::showSettings()
m_prefDlg->_rbNone->setChecked( m_valueStyle == MixDeviceWidget::NNONE );
m_prefDlg->_rbAbsolute->setChecked( m_valueStyle == MixDeviceWidget::NABSOLUTE );
m_prefDlg->_rbRelative->setChecked( m_valueStyle == MixDeviceWidget::NRELATIVE );
+ m_prefDlg->m_autoStartChk->setChecked( m_autoStart );
m_prefDlg->show();
}
@@ -526,6 +529,7 @@ KMixWindow::applyPrefs( KMixPrefDlg *prefDlg )
//kdDebug(67100) << "KMix should change to Horizontal layout\n";
m_toplevelOrientation = Qt::Horizontal;
}
+ m_autoStart = prefDlg->m_autoStartChk->isChecked();
this->setUpdatesEnabled(false);
diff --git a/kmix/kmix.desktop b/kmix/kmix.desktop
index 4cb25f7a..6635ba42 100644
--- a/kmix/kmix.desktop
+++ b/kmix/kmix.desktop
@@ -89,4 +89,7 @@ Name[ven]=U tanganisa ha K
Name[zh_TW]=KMix 混音器
X-KDE-StartupNotify=true
X-DCOP-ServiceType=Unique
+X-KDE-autostart-phase=2
+X-KDE-autostart-after=panel
+X-KDE-autostart-condition=kmixrc::Autostart:true
Categories=Qt;KDE;AudioVideo;Audio;Mixer;
diff --git a/kmix/kmix.h b/kmix/kmix.h
index 76f3f32c..398c88d8 100644
--- a/kmix/kmix.h
+++ b/kmix/kmix.h
@@ -96,6 +96,7 @@ KMixWindow : public KMainWindow
TQPopupMenu *m_viewMenu;
TQPopupMenu *m_helpMenu;
+ bool m_autoStart;
bool m_showDockWidget;
bool m_volumeWidget;
bool m_hideOnClose;
diff --git a/kmix/kmixprefdlg.cpp b/kmix/kmixprefdlg.cpp
index 6e25cb63..dbf2ae93 100644
--- a/kmix/kmixprefdlg.cpp
+++ b/kmix/kmixprefdlg.cpp
@@ -90,6 +90,10 @@ KMixPrefDlg::KMixPrefDlg( TQWidget *parent )
numbersLayout->add(_rbRelative);
numbersLayout->addStretch();
+ m_autoStartChk = new TQCheckBox( i18n("&Autostart"), m_generalTab );
+ layout->addWidget( m_autoStartChk );
+ TQWhatsThis::add(m_autoStartChk, i18n("Automatically start mixer when you login"));
+
TQBoxLayout *orientationLayout = new TQHBoxLayout( layout );
TQButtonGroup* orientationGroup = new TQButtonGroup( 2, Qt::Horizontal, i18n("Orientation"), m_generalTab );
//orientationLayout->add(orientationGroup);
diff --git a/kmix/kmixprefdlg.h b/kmix/kmixprefdlg.h
index b2e294ab..2c299515 100644
--- a/kmix/kmixprefdlg.h
+++ b/kmix/kmixprefdlg.h
@@ -51,6 +51,7 @@ KMixPrefDlg : public KDialogBase
KMixApp *m_mixApp;
KMixPrefWidget *m_mixPrefTab;
+ TQCheckBox *m_autoStartChk;
TQCheckBox *m_dockingChk;
TQCheckBox *m_volumeChk;
TQCheckBox *m_hideOnCloseChk;