summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/configdlg.cpp2
-rw-r--r--src/configdlgbase.ui8
-rw-r--r--src/kerberostray.desktop7
-rw-r--r--src/toplevel.cpp2
-rw-r--r--src/toplevel.h1
5 files changed, 18 insertions, 2 deletions
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 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
+ <widget class="TQCheckBox" row="0" column="0" colspan="3">
+ <property name="name">
+ <cstring>autostart</cstring>
+ </property>
+ <property name="text">
+ <string>Automatically start the Kerberos Ticket Manager on login</string>
+ </property>
+ </widget>
<widget class="TQCheckBox" row="1" column="0" colspan="3">
<property name="name">
<cstring>notifyExpiry</cstring>
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;