comparison ui/mainwindow.cpp @ 1003:db7e7156c824

(issue66) Only depend on is_system_install on windows to decide privilege raise
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 02 Sep 2014 10:50:04 +0200
parents 405c97ca4ab0
children 6aa115b206df
comparison
equal deleted inserted replaced
1002:e9ff3107b885 1003:db7e7156c824
310 shExecInfo.lpParameters = reinterpret_cast<LPCWSTR> (parameters.utf16()); 310 shExecInfo.lpParameters = reinterpret_cast<LPCWSTR> (parameters.utf16());
311 311
312 // shExecInfo.fMask = SEE_MASK_NOASYNC; 312 // shExecInfo.fMask = SEE_MASK_NOASYNC;
313 shExecInfo.nShow = SW_SHOWDEFAULT; 313 shExecInfo.nShow = SW_SHOWDEFAULT;
314 314
315 if (!is_system_install() || !is_admin()) { 315 if (!is_system_install()) {
316 shExecInfo.lpVerb = L"open"; 316 shExecInfo.lpVerb = L"open";
317 } else { 317 } else {
318 shExecInfo.lpVerb = L"runas"; 318 shExecInfo.lpVerb = L"runas";
319 } 319 }
320 320
621 mQuitButton->setFixedHeight(30); 621 mQuitButton->setFixedHeight(30);
622 622
623 mInstallButton = new QPushButton(" " + tr("Install certificates again")); 623 mInstallButton = new QPushButton(" " + tr("Install certificates again"));
624 mInstallButton->setFixedHeight(30); 624 mInstallButton->setFixedHeight(30);
625 #ifdef Q_OS_WIN 625 #ifdef Q_OS_WIN
626 if (is_admin() && is_system_install()) { 626 if (is_system_install()) {
627 QIcon uacShield = QApplication::style()->standardIcon(QStyle::SP_VistaShield); 627 QIcon uacShield = QApplication::style()->standardIcon(QStyle::SP_VistaShield);
628 mInstallButton->setIcon(uacShield); 628 mInstallButton->setIcon(uacShield);
629 } 629 }
630 #else 630 #else
631 mInstallButton->setIcon(QIcon(":/img/view-refresh_16px.png")); 631 mInstallButton->setIcon(QIcon(":/img/view-refresh_16px.png"));
1188 unselected << mUpdatesRemove->unselectedCertificates(); 1188 unselected << mUpdatesRemove->unselectedCertificates();
1189 unselected << mInstallList->unselectedCertificates(); 1189 unselected << mInstallList->unselectedCertificates();
1190 unselected << mRemoveList->unselectedCertificates(); 1190 unselected << mRemoveList->unselectedCertificates();
1191 1191
1192 #ifdef Q_OS_WIN 1192 #ifdef Q_OS_WIN
1193 if (!is_admin() || !is_system_install()) { 1193 if (!is_system_install()) {
1194 QMessageBox::information(this, 1194 QMessageBox::warning(this,
1195 tr("Installation with standard user account"), 1195 tr("Installation with standard user account"),
1196 tr("Windows will now ask you to confirm qeach root certificate modification " 1196 tr("Windows will now ask you to confirm qeach root certificate modification "
1197 "because TrustBridge does not have the necessary privileges to install " 1197 "because TrustBridge does not have the necessary privileges to install "
1198 "root certificates into the Windows certificate store silently.")); 1198 "root certificates into the Windows certificate store silently."));
1199 } 1199 }

http://wald.intevation.org/projects/trustbridge/