virtual ~InstalledPopup();
result Initialize(Tizen::Ui::Control* pTarget);
result RequestPopup(const Tizen::Base::String& appName, const Tizen::Base::String& installedVersion,
- const Tizen::Base::String& currentVersion);
+ const Tizen::Base::String& currentVersion, bool isLaunchable);
virtual result OnInitializing(void);
virtual result OnTerminating(void);
Tizen::Ui::Control* __pTarget;
Tizen::Base::String __installMessage;
Tizen::Base::String __versionMessage;
+ bool __isLaunchable;
};
#endif /* _IST_INSTALLED_POPUP_H_ */
</Panel>
<Button id="IDC_BUTTON_REINSTALL" parent="IDC_PANEL">
<property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="::IDS_APINST_BUTTON_REINSTALL" textSize="36.0" verticalAlign="ALIGN_MIDDLE"/>
- <layout height="74.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" positionColumn="1" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="209.33331"/>
+ <layout height="74.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" positionColumn="1" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="209.33333"/>
<layout height="74.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" positionColumn="1" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="210.33333"/>
</Button>
<Button id="IDC_BUTTON_LAUNCH" parent="IDC_PANEL">
<property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="::IDS_APINST_BUTTON_OPEN" textSize="36.0" verticalAlign="ALIGN_MIDDLE"/>
- <layout height="74.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" positionColumn="2" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="209.33331"/>
+ <layout height="74.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" positionColumn="2" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="209.33333"/>
<layout height="74.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" positionColumn="2" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="209.33333"/>
</Button>
<Button id="IDC_BUTTON_CANCEL" parent="IDC_PANEL">
<property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="::IDS_ST_SK3_CANCEL" textSize="36.0" verticalAlign="ALIGN_MIDDLE"/>
- <layout height="74.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" positionColumn="0" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="210.33331"/>
+ <layout height="74.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" positionColumn="0" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="210.33333"/>
<layout height="74.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" positionColumn="0" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="209.33333"/>
</Button>
<Label id="IDC_LABEL_VERSION" parent="IDL_INSTALLED_POPUP">
}
result r = Tizen::App::UiApp::Execute(InstallerApp::CreateInstance, &args);
- AppLogExceptionIf(r != E_SUCCESS, "[%s] Application execution failed", GetErrorMessage(r));
+ AppLogExceptionIf(IsFailed(r), "[%s] Application execution failed", GetErrorMessage(r));
AppLog("Application finished.");
return static_cast<int>(r);
InstalledPopup::InstalledPopup()
: __pTarget(null)
+ , __isLaunchable(true)
{
}
result
InstalledPopup::RequestPopup(const Tizen::Base::String& appName, const Tizen::Base::String& installedVersion,
- const Tizen::Base::String& downloadedVersion)
+ const Tizen::Base::String& downloadedVersion, bool isLaunchable)
{
AppResource* pAppResource = AppResource::GetInstance();
int compare = downloadedVersion.CompareTo(installedVersion);
version.Format(version.GetLength() + downloadedVersion.GetLength(), version.GetPointer(), downloadedVersion.GetPointer());
__versionMessage.Append(version);
+ __isLaunchable = isLaunchable;
+
SetShowState(true);
return Show();
}
pCancelButton->SetActionId(IDA_BUTTON_CANCEL);
pCancelButton->AddActionEventListener(*this);
+ if (!__isLaunchable)
+ {
+ GridLayout* pLayout = static_cast<GridLayout*>(static_cast<Panel*>(GetControl(IDC_PANEL))->GetLayoutN());
+ pLayout->SetColumnCollapsed(2, true);
+ pLayout->Update();
+ delete pLayout;
+ }
+
return E_SUCCESS;
}
String displayName = pPackageInfo->GetDisplayName();
AppLogDebug("%ls: It has been already installed.", displayName.GetPointer());
PackageInfo* pInstalledPackageInfo = pPackageManager->GetPackageInfoN(packageId);
- r = __pInstalledPopup->RequestPopup(displayName, pInstalledPackageInfo->GetVersion(), pPackageInfo->GetVersion());
+ PackageAppInfo* pMainAppInfo = pInstalledPackageInfo->GetPackageAppInfoN(pInstalledPackageInfo->GetMainAppId());
+ r = __pInstalledPopup->RequestPopup(displayName, pInstalledPackageInfo->GetVersion(),
+ pPackageInfo->GetVersion(), pMainAppInfo->IsMenuIconVisible());
delete pInstalledPackageInfo;
+ delete pMainAppInfo;
}
else
{
notificationManager.Construct();
NotificationRequest request;
- request.SetIconFilePath(pMainAppInfo->GetAppMenuIconPath());
+ result r = request.SetIconFilePath(pMainAppInfo->GetAppMenuIconPath());
+ AppLogDebugIf(IsFailed(r), "[%s] Failed to set app icon.", GetErrorMessage(r));
delete pMainAppInfo;
String installTime;
mainAppId = L"D7eOJquGtL.Installer";
}
- result r = notificationManager.NotifyByAppId(mainAppId, request);
- AppLogExceptionIf(r == E_SUCCESS, "[%s] Failed to notify message.", GetErrorMessage(r));
+ r = notificationManager.NotifyByAppId(mainAppId, request);
+ AppLogExceptionIf(IsFailed(r), "[%s] Failed to notify message.", GetErrorMessage(r));
String* pFilePath = dynamic_cast<String*>(__filePathList.GetAt(++__index));
if (pFilePath)
String appName = __pInfo->GetDisplayName();
- Label* pIconLabel = static_cast<Label*>(__pFrame->GetControl(IDC_LABEL_ICON));
- pIconLabel->SetBackgroundBitmap(*pAppIcon);
- delete pAppIcon;
+ if (pAppIcon)
+ {
+ Label* pIconLabel = static_cast<Label*>(__pFrame->GetControl(IDC_LABEL_ICON));
+ pIconLabel->SetBackgroundBitmap(*pAppIcon);
+ delete pAppIcon;
+ }
Label* pNameLabel = static_cast<Label*>(__pFrame->GetControl(IDC_LABEL_NAME));
pNameLabel->SetText(appName);
}
result r = Tizen::App::ServiceApp::Execute(InstallerServiceApp::CreateInstance, &args);
- AppLogExceptionIf(r == E_SUCCESS, "[%s] Application execution failed", GetErrorMessage(r));
+ AppLogExceptionIf(IsFailed(r), "[%s] Application execution failed", GetErrorMessage(r));
AppLog("Application finished.");
return static_cast<int>(r);