[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdeutils/kwallet
From:       George Staikos <staikos () kde ! org>
Date:       2004-11-03 4:37:30
Message-ID: 20041103043730.0413E16B22 () office ! kde ! org
[Download RAW message or body]

CVS commit by staikos: 

Don't automatically exit the manager if it's started manually.
(Needs updated kwalletd and kded restart)
BUG: 69397


  A            kwalletmanager-kwalletd.desktop   1.1
  M +1 -1      Makefile.am   1.15
  M +15 -2     kwalletmanager.cpp   1.49
  M +3 -0      kwalletmanager.h   1.18
  M +12 -7     main.cpp   1.13


--- kdeutils/kwallet/Makefile.am  #1.14:1.15
@@ -13,5 +13,5 @@
                 allyourbase.h kwmapeditor.h
 
-xdg_apps_DATA = kwalletmanager.desktop
+xdg_apps_DATA = kwalletmanager.desktop kwalletmanager-kwalletd.desktop
 
 KDE_ICON = kwalletmanager

--- kdeutils/kwallet/kwalletmanager.cpp  #1.48:1.49
@@ -47,4 +47,5 @@
 KWalletManager::KWalletManager(QWidget *parent, const char *name, WFlags f)
 : KMainWindow(parent, name, f), DCOPObject("KWalletManager") {
+        _kwalletdLaunch = false;
         QAccel *accel = new QAccel(this, "kwalletmanager");
 
@@ -139,4 +140,10 @@ KWalletManager::~KWalletManager() {
 }
 
+
+void KWalletManager::kwalletdLaunch() {
+        _kwalletdLaunch = true;
+}
+
+
 bool KWalletManager::queryClose() {
         if (!_shuttingDown && !kapp->sessionSaving()) {
@@ -290,5 +298,5 @@ void KWalletManager::openWallet(QIconVie
 
 void KWalletManager::allWalletsClosed() {
-        if ( _tray ) {
+        if (_tray) {
                 _tray->setPixmap(loadSystemTrayIcon("wallet_closed"));
                 QToolTip::remove(_tray);
@@ -304,5 +312,6 @@ void KWalletManager::possiblyQuit() {
         if (_windows.isEmpty() &&
                         !isVisible() &&
-                        !cfg.readBoolEntry("Leave Manager Open", false)) {
+                        !cfg.readBoolEntry("Leave Manager Open", false) &&
+                        _kwalletdLaunch) {
                 kapp->quit();
         }

--- kdeutils/kwallet/kwalletmanager.h  #1.17:1.18
@@ -41,4 +41,6 @@ class KWalletManager : public KMainWindo
                 QPixmap loadSystemTrayIcon(const QString &icon);
 
+                void kwalletdLaunch();
+
         public slots:
                 void createWallet();
@@ -76,4 +78,5 @@ class KWalletManager : public KMainWindo
                 DCOPRef *_dcopRef;
                 QPtrList<KMainWindow> _windows;
+                bool _kwalletdLaunch;
 };
 

--- kdeutils/kwallet/main.cpp  #1.12:1.13
@@ -35,5 +35,5 @@
 class MyApp : public KUniqueApplication {
         public:
-                MyApp() : KUniqueApplication() {}
+                MyApp() : KUniqueApplication() { ref(); }
                 virtual ~MyApp() {}
 
@@ -42,14 +42,15 @@ class MyApp : public KUniqueApplication 
 
 int main(int argc, char **argv) {
-static KCmdLineOptions options[] = {
+        static KCmdLineOptions options[] = {
         {"show", I18N_NOOP("Show window on startup"), 0},
+                {"kwalletd", I18N_NOOP("For use by kwalletd only"), 0},
         {"+name", I18N_NOOP("A wallet name"), 0},
         KCmdLineLastOption
-};
+        };
 
         KAboutData about("kwalletmanager", I18N_NOOP("KDE Wallet Manager"), "1.0",
                 I18N_NOOP("KDE Wallet Management Tool"),
                 KAboutData::License_GPL,
-                I18N_NOOP("(c) 2003 George Staikos"), 0,
+                I18N_NOOP("(c) 2003,2004 George Staikos"), 0,
                 "http://www.kde.org/");
 
@@ -78,4 +79,8 @@ static KCmdLineOptions options[] = {
         }
 
+        if (args->isSet("kwalletd")) {
+                wm.kwalletdLaunch();
+        }
+
         for (int i = 0; i < args->count(); ++i) {
                 QString fn = QFileInfo(args->arg(i)).absFilePath();


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic