diff --git a/src/configdlg.cpp b/src/configdlg.cpp
index d6b6740..3ec9cc5 100644
--- a/src/configdlg.cpp
+++ b/src/configdlg.cpp
@@ -42,11 +42,13 @@ KTMConfigureDialog::KTMConfigureDialog(TopLevel* tlapp, TQWidget* parent, const
setMainWidget(m_base);
+ m_base->autostart->setChecked(m_tlapp->autostart);
m_base->notifyExpiry->setChecked(m_tlapp->notifyExpiry);
m_base->notifyExpiryMinutes->setValue(m_tlapp->notifyExpiryMinutes);
}
void KTMConfigureDialog::save() {
+ m_tlapp->autostart = m_base->autostart->isOn();
m_tlapp->notifyExpiry = m_base->notifyExpiry->isOn();
m_tlapp->notifyExpiryMinutes = m_base->notifyExpiryMinutes->value();
diff --git a/src/configdlgbase.ui b/src/configdlgbase.ui
index 8b55675..2d4dbd1 100644
--- a/src/configdlgbase.ui
+++ b/src/configdlgbase.ui
@@ -8,6 +8,14 @@
unnamed
+
+
+ autostart
+
+
+ Automatically start the Kerberos Ticket Manager on login
+
+
notifyExpiry
diff --git a/src/kerberostray.desktop b/src/kerberostray.desktop
index f44e971..710e5a9 100644
--- a/src/kerberostray.desktop
+++ b/src/kerberostray.desktop
@@ -6,6 +6,9 @@ Icon=kerberostray
Type=Application
Terminal=false
DocPath=kerberostray/index.html
-X-KDE-StartupNotify=true
+X-TDE-StartupNotify=true
X-DCOP-ServiceType=Multi
-Categories=Qt;KDE;Utility;
+Categories=Qt;TDE;Utility;
+X-TDE-autostart-phase=2
+X-TDE-autostart-after=panel
+X-TDE-autostart-condition=kerberostrayrc::Autostart:true
diff --git a/src/toplevel.cpp b/src/toplevel.cpp
index 99cb1f7..3b80d2d 100644
--- a/src/toplevel.cpp
+++ b/src/toplevel.cpp
@@ -119,6 +119,7 @@ TopLevel::~TopLevel()
void TopLevel::load() {
KConfig* config = KGlobal::instance()->config();
config->setGroup(NULL);
+ autostart = config->readBoolEntry("Autostart", true);
notifyExpiry = config->readBoolEntry("notifyExpiry", true);
notifyExpiryMinutes = config->readNumEntry("notifyExpiryMinutes", 5);
}
@@ -126,6 +127,7 @@ void TopLevel::load() {
void TopLevel::save() {
KConfig* config = KGlobal::instance()->config();
config->setGroup(NULL);
+ config->writeEntry("Autostart", autostart);
config->writeEntry("notifyExpiry", notifyExpiry);
config->writeEntry("notifyExpiryMinutes", notifyExpiryMinutes);
config->sync();
diff --git a/src/toplevel.h b/src/toplevel.h
index 081adb6..4082eef 100644
--- a/src/toplevel.h
+++ b/src/toplevel.h
@@ -92,6 +92,7 @@ private:
KDirWatch *ticketWatch;
TQTimer *m_refreshTimer;
+ bool autostart;
bool notifyExpiry;
int notifyExpiryMinutes;