- if (GlobalSettings::GetPopupsEnabledFlag()) {
- m_contextData.job->Pause();
- std::string label = _("IDS_IM_POP_WIDGET_UNTRUSTED_WARNING") +
- LABEL_NEW_LINE +
- _("IDS_IM_WIDGET_WANT_TO_INSTALL");
- using namespace DPL::Popup;
- CtrlPopupPtr popup =
- PopupControllerSingleton::Instance().CreatePopup();
- popup->SetTitle(_("IDS_IM_POP_WIDGET_UNTRUSTED_TITLE"));
- popup->Append(new PopupObject::Label(label));
- popup->Append(new PopupObject::Button(_("IDS_IM_BUTTON_INSTALL"),
- BUTTON_ID_INSTALL));
- popup->Append(new PopupObject::Button(_("IDS_IM_BUTTON_RESIGN"),
- BUTTON_ID_RESIGN));
-
- ListenForAnswer(popup);
-
- PopupAnswerCallback cb = MakeAnswerCallback(this,
- &TaskCertify::onWarningPopupAnswer);
-
- ShowPopupEvent event(popup, cb, DPL::Event::UNDEFINED_LOOP_HANDLE);
- CONTROLLER_POST_EVENT(PopupController, event);
- } else {
- m_userAgreedToInstallUntrustedWidget = true;
- }
- }
-}
-
-void TaskCertify::stepWarningPopupAnswer()
-{
- LogInfo("Step: <<Warning Popup Answer>>");
- if (false == m_contextData.wacSecurity.isDistributorSigned() &&
- false == m_userAgreedToInstallUntrustedWidget)
- {
- LogWarning("User does not agreed to install unsigned widgets!");
- ThrowMsg(Exceptions::NotAllowed, "Widget not allowed");
- }
-}
-
-void TaskCertify::stepAuthorInfoPopupAnswer()
-{
- LogInfo("Step: <<Author Info Popup Answer>>");
- if (m_cancelInstallation) {
- LogWarning("User does not agreed to install widget!");
- ThrowMsg(Exceptions::NotAllowed, "Widget not allowed");