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

List:       kde-commits
Subject:    kdeutils/kgpg
From:       Jean-Baptiste Mardelle <bj () altern ! org>
Date:       2003-08-27 18:05:24
[Download RAW message or body]

CVS commit by mardelle: 

fix key refresh after expiration/trust change


  M +10 -2     keyinfowidget.cpp   1.4
  M +3 -0      keyinfowidget.h   1.3
  M +5 -1      listkeys.cpp   1.109


--- kdeutils/kgpg/keyinfowidget.cpp  #1.3:1.4
@@ -356,4 +356,5 @@ void KgpgKeyInfo::slotChangePass()
 void KgpgKeyInfo::slotPreOk1()
 {
+if ((expirationDate==prop->tLExpiration->text()) && \
(ownerTrust==prop->kCOwnerTrust->currentText())) return;  if \
(expirationDate!=prop->tLExpiration->text()) {  KgpgInterface \
*KeyExpirationProcess=new KgpgInterface(); @@ -372,6 +373,13 @@ void \
KgpgKeyInfo::slotPreOk2(int)  KgpgInterface *KeyTrustProcess=new KgpgInterface();
                 KeyTrustProcess->KgpgTrustExpire(displayedKeyID,prop->kCOwnerTrust->currentText());
                
-                connect(KeyTrustProcess,SIGNAL(trustfinished()),this,SLOT(accept()));
 +                connect(KeyTrustProcess,SIGNAL(trustfinished()),this,SLOT(slotAccept()));
  } else
-                accept();
+                slotAccept();
+}
+
+void KgpgKeyInfo::slotAccept()
+{
+//kdDebug()<<"Key was modified\n";
+emit keyNeedsRefresh();
+accept();
 }

--- kdeutils/kgpg/keyinfowidget.h  #1.2:1.3
@@ -73,4 +73,5 @@ private slots:
         void slotSetMainPhoto(QStringList list);
         void reloadMainPhoto(const QString &uid);
+        void slotAccept();
 
 private:
@@ -88,4 +89,6 @@ signals:
 void signalPhotoId(const QPixmap&);
 void changeMainPhoto(const QPixmap&);
+void keyNeedsRefresh();
+
 };
 

--- kdeutils/kgpg/listkeys.cpp  #1.108:1.109
@@ -1321,5 +1321,7 @@ void listKeys::showKeyInfo(QString keyID
 {
         KgpgKeyInfo *opts=new KgpgKeyInfo(this,"key_props",keyID);
+        //connect(opts,SIGNAL(keyNeedsRefresh()),keysList2,SLOT(refreshselfkey()));
         opts->show();
+
         //delete opts;
         /*
@@ -1365,5 +1367,6 @@ void listKeys::listsigns()
         if (!key.isEmpty()) {
                 KgpgKeyInfo *opts=new KgpgKeyInfo(this,"key_props",key);
-                if (opts->exec()==QDialog::Accepted) \
keysList2->refreshcurrentkey(keysList2->currentItem()); +                \
connect(opts,SIGNAL(keyNeedsRefresh()),keysList2,SLOT(refreshselfkey())); +           \
opts->exec();  } else
                 editGroup();
@@ -2472,4 +2475,5 @@ void KeyView::refreshgroups()
 void KeyView::refreshselfkey()
 {
+kdDebug()<<"Refreshing key\n";
 if (currentItem()->depth()==0)
 refreshcurrentkey(currentItem());


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

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