[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdeutils/kgpg
From: Rolf Eike Beer <kde () opensource ! sf-tec ! de>
Date: 2011-08-03 20:08:39
Message-ID: 20110803200839.B97E4AC86C () svn ! kde ! org
[Download RAW message or body]
SVN commit 1244700 by dakon:
move "revoke key" from context menu to key menu
The context menu is already cluttered enough and this is used so seldomly that
even I did not know of the existence of this action.
M +6 -14 keysmanager.cpp
M +1 -0 keysmanager.h
M +6 -0 keysmanager.rc
--- trunk/KDE/kdeutils/kgpg/keysmanager.cpp #1244699:1244700
@@ -225,7 +225,6 @@
deleteKey = actionCollection()->addAction(QLatin1String("key_delete"), this, \
SLOT(confirmdeletekey())); deleteKey->setIcon(KIcon( QLatin1String( "edit-delete" \
))); deleteKey->setShortcut(QKeySequence(Qt::Key_Delete));
- deleteKey->setEnabled(false);
setDefaultKey = actionCollection()->addAction(QLatin1String("key_default"), this, \
SLOT(slotSetDefKey())); setDefaultKey->setText(i18n("Set as De&fault Key"));
@@ -243,8 +242,8 @@
deleteKeyPair->setText(i18n("Delete Key Pair"));
deleteKeyPair->setIcon(KIcon( QLatin1String( "edit-delete" )));
- QAction *revokeKey = actionCollection()->addAction(QLatin1String("key_revoke"), \
this, SLOT(revokeWidget()));
- revokeKey->setText(i18n("Revoke Key..."));
+ m_revokeKey = actionCollection()->addAction(QLatin1String("key_revoke"), this, \
SLOT(revokeWidget())); + m_revokeKey->setText(i18n("Revoke Key..."));
QAction *regeneratePublic = \
actionCollection()->addAction(QLatin1String("key_regener"), this, \
SLOT(slotregenerate())); regeneratePublic->setText(i18n("&Regenerate Public Key"));
@@ -377,7 +376,6 @@
m_popupsec->addAction(addUid);
m_popupsec->addAction(exportSecretKey);
m_popupsec->addAction(deleteKeyPair);
- m_popupsec->addAction(revokeKey);
m_popupgroup = new KMenu(this);
m_popupgroup->addAction(editCurrentGroup);
@@ -408,17 +406,7 @@
m_popuporphan->addAction(regeneratePublic);
m_popuporphan->addAction(deleteKeyPair);
- editCurrentGroup->setEnabled(false);
- delGroup->setEnabled(false);
- createGroup->setEnabled(false);
- infoKey->setEnabled(false);
- editKey->setEnabled(false);
- signKey->setEnabled(false);
- signUid->setEnabled(false);
- signMailUid->setEnabled(false);
- refreshKey->setEnabled(false);
exportPublicKey->setEnabled(false);
- newContact->setEnabled(false);
KConfigGroup cg = KConfigGroup(KGlobal::config().data(), "KeyView");
iview->restoreLayout(cg);
@@ -479,6 +467,8 @@
toggleNetworkActions(Solid::Networking::status() == Solid::Networking::Unknown || \
Solid::Networking::status() == Solid::Networking::Connected); \
importSignatureKey->setEnabled(false);
+ stateChanged("empty_list");
+
QTimer::singleShot(0, this, SLOT(refreshkey()));
}
@@ -1151,12 +1141,14 @@
switch (exportList.count()) {
case 0:
+ stateChanged("empty_list");
return;
case 1:
if (exportList.at(0)->getType() == ITYPE_GROUP) {
stateChanged(QLatin1String( "group_selected" ));
} else {
stateChanged(QLatin1String( "single_selected" ));
+ m_revokeKey->setEnabled(exportList.at(0)->getType() == ITYPE_PAIR);
if (terminalkey)
editKey->setEnabled(false);
}
--- trunk/KDE/kdeutils/kgpg/keysmanager.h #1244699:1244700
@@ -256,6 +256,7 @@
KAction *exportPublicKey;
KAction *createGroup;
KAction *m_groupRename;
+ KAction *m_revokeKey;
KeyServer *kServer;
--- trunk/KDE/kdeutils/kgpg/keysmanager.rc #1244699:1244700
@@ -9,6 +9,7 @@
<Action name="key_sign"/>
<Action name="key_edit"/>
<Action name="key_gener"/>
+ <Action name="key_revoke"/>
<Separator />
<Action name="key_export"/>
<Action name="key_import"/>
@@ -81,6 +82,8 @@
<Action name="key_edit"/>
<Action name="key_export"/>
<Action name="key_sign_uid"/>
+ <Action name="key_sign_mail_uid"/>
+ <Action name="key_revoke"/>
</disable>
</State>
@@ -119,6 +122,7 @@
<Action name="key_default"/>
<Action name="key_edit"/>
<Action name="key_info"/>
+ <Action name="key_revoke"/>
</disable>
</State>
@@ -136,6 +140,8 @@
<Action name="create_group"/>
<Action name="add_kab"/>
<Action name="key_sign_uid"/>
+ <Action name="key_sign_mail_uid"/>
+ <Action name="key_revoke"/>
</disable>
</State>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic