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

List:       kde-commits
Subject:    branch-1-0: kdeextragear-3/pwmanager/pwmanager
From:       Michael Buesch <mbuesch () freenet ! de>
Date:       2004-09-12 10:35:10
Message-ID: 20040912103510.3C4341C67 () office ! kde ! org
[Download RAW message or body]

CVS commit by mbuesch: 

add "exec launcher and copy password to clipboard" option


  M +9 -0      pwmtray.cpp   1.1.1.1.2.2
  M +1 -0      pwmtray.h   1.1.1.1.2.1
  M +9 -0      pwmview.cpp   1.1.1.1.2.3
  M +2 -0      pwmview.h   1.1.1.1.2.2


--- kdeextragear-3/pwmanager/pwmanager/pwmtray.cpp  #1.1.1.1.2.1:1.1.1.1.2.2
@@ -29,4 +29,5 @@ void ActiveTreeItem::execIt()
 
         switch (task) {
+                case execLauncherAndCopy:
                 case pwToClipboard: {
                         PwMDataItem d;
@@ -38,4 +39,6 @@ void ActiveTreeItem::execIt()
                         doc->putDataChangedLock();
                         PwM::copyToClipboard(d.pw.c_str());
+                        if (task == execLauncherAndCopy)
+                                doc->execLauncher(cat, entr);
                         break;
                 } case nameToClipboard: {
@@ -228,4 +231,10 @@ void PwMTray::rebuildTree(KPopupMenu *po
 
                         insertActiveTreeItem(newEntrMenu,
+                                             i18n("Execute \"Launcher\" and "
+                                                  "copy password"),
+                                             ActiveTreeItem::execLauncherAndCopy, doc, i, j,
+                                             activeItems);
+
+                        insertActiveTreeItem(newEntrMenu,
                                              i18n("Go to \"URL\""),
                                              ActiveTreeItem::goToURL, doc, i, j,

--- kdeextragear-3/pwmanager/pwmanager/pwmtray.h  #1.1.1.1:1.1.1.1.2.1
@@ -48,4 +48,5 @@ public:
                 commentToClipboard,
                 execLauncher,
+                execLauncherAndCopy,
                 goToURL,
                 openMainWnd,

--- kdeextragear-3/pwmanager/pwmanager/pwmview.cpp  #1.1.1.1.2.2:1.1.1.1.2.3
@@ -78,4 +78,7 @@ void PwMView::initCtxMenu()
         ctxMenu->insertItem(i18n("Execute \"Launcher\""), mainClass,
                             SLOT(execLauncher_slot()));
+        ctxMenu->insertItem(i18n("Execute \"Launcher\" and "
+                                 "copy password"), this,
+                            SLOT(execLauncherAndCopy()));
         ctxMenu->insertItem(i18n("Go to \"URL\""), mainClass,
                             SLOT(goToURL_slot()));
@@ -435,3 +438,9 @@ void PwMView::copyCommentToClip()
 }
 
+void PwMView::execLauncherAndCopy()
+{
+        copyPwToClip();
+        mainClass->execLauncher_slot();
+}
+
 #include "pwmview.moc"

--- kdeextragear-3/pwmanager/pwmanager/pwmview.h  #1.1.1.1.2.1:1.1.1.1.2.2
@@ -118,4 +118,6 @@ protected slots:
         /** copy comment to clipboard */
         void copyCommentToClip();
+        /** execute the launcher and copy the pw to clipboard. */
+        void execLauncherAndCopy();
         /** reorganize the "listViewPos" positions in the document
           * (for the current category only!)


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

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