# HG changeset patch # User Andre Heinecke # Date 1411461491 -7200 # Node ID 9bdce8d6fd4398e758a8b912c809b0651b48acad # Parent 7b24109c1a55619c7a398290e73cfb316aef871e (issue144) Handle removal certificates differently in manual changes. diff -r 7b24109c1a55 -r 9bdce8d6fd43 ui/mainwindow.cpp --- a/ui/mainwindow.cpp Tue Sep 23 09:21:01 2014 +0200 +++ b/ui/mainwindow.cpp Tue Sep 23 10:38:11 2014 +0200 @@ -1493,10 +1493,19 @@ if (!mUpdatesManual->contains(cert)) { QToolButton* actionBtn = new QToolButton(); QIcon btnIcon; - btnIcon.addFile(":/img/write-into-48.png", QSize(48, 48), QIcon::Normal, QIcon::On); - btnIcon.addFile(":/img/write-remove-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off); - actionBtn->setProperty("ToolTip_On", tr("Certificate will be installed.")); - actionBtn->setProperty("ToolTip_Off", tr("Certificate will be removed.")); + if (mRemoveList->contains(cert)) { + btnIcon.addFile(":/img/write-remove-48.png", QSize(48, 48), QIcon::Normal, QIcon::On); + btnIcon.addFile(":/img/cert-is-installed-bad-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off); + actionBtn->setProperty("ToolTip_On", tr("Certificate will be removed.")); + /* Off should never be possible here + * As the manual change of removed certificates is disabled */ + actionBtn->setProperty("ToolTip_Off", tr("Certificate will not be removed.")); + } else { + btnIcon.addFile(":/img/write-into-48.png", QSize(48, 48), QIcon::Normal, QIcon::On); + btnIcon.addFile(":/img/write-remove-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off); + actionBtn->setProperty("ToolTip_On", tr("Certificate will be installed.")); + actionBtn->setProperty("ToolTip_Off", tr("Certificate will be removed.")); + } actionBtn->setIcon(btnIcon); mUpdatesManual->addCertificate(cert, state, actionBtn); }