Fixed icon name
authorSoyoung Kim <sy037.kim@samsung.com>
Tue, 12 Feb 2013 12:13:13 +0000 (21:13 +0900)
committerSoyoung Kim <sy037.kim@samsung.com>
Tue, 12 Feb 2013 12:13:13 +0000 (21:13 +0900)
[Issue#] N/A
[Problem] icon name isn't updated.
[Cause] installer doesn't send icon_path signal to pkgmgr
[Solution] send icon_path signal to pkgmgr for update icon name.
[SCMRequest] N/A

src/jobs/job.cpp
src/jobs/job.h
src/jobs/widget_install/job_widget_install.cpp
src/jobs/widget_install/job_widget_install.h
src/jobs/widget_install/task_manifest_file.cpp
src/pkg-manager/pkgmgr_signal.h

index a94bc63..ec56d3d 100644 (file)
@@ -95,6 +95,9 @@ void Job::SendFinishedSuccess()
 void Job::SendFinishedFailure()
 {}
 
+void Job::SendProgressIconPath(const std::string &path)
+{}
+
 void Job::SaveExceptionData(const Jobs::JobExceptionBase&)
 {}
 } //namespace Jobs
index c8d35ab..1050cbc 100644 (file)
@@ -54,6 +54,7 @@ class Job :
     virtual void SendProgress();
     virtual void SendFinishedSuccess();
     virtual void SendFinishedFailure();
+    virtual void SendProgressIconPath(const std::string &path);
 
     virtual void SaveExceptionData(const Jobs::JobExceptionBase&);
 
index 1337293..f8dc52d 100644 (file)
@@ -792,6 +792,19 @@ void JobWidgetInstall::SendProgress()
     }
 }
 
+void JobWidgetInstall::SendProgressIconPath(const std::string &path)
+{
+    using namespace PackageManager;
+    if (GetProgressFlag() != false) {
+        if (getInstallerStruct().progressCallback != NULL) {
+            // send progress signal of pkgmgr
+            getInstallerStruct().pkgmgrInterface->sendSignal(
+                PKGMGR_ICON_PATH,
+                path);
+        }
+    }
+}
+
 void JobWidgetInstall::SendFinishedSuccess()
 {
     using namespace PackageManager;
index a97b8eb..b323cc3 100644 (file)
@@ -100,6 +100,7 @@ class JobWidgetInstall :
     void SendProgress();
     void SendFinishedSuccess();
     void SendFinishedFailure();
+    void SendProgressIconPath(const std::string &path);
     void SaveExceptionData(const Jobs::JobExceptionBase&);
 };
 } //namespace WidgetInstall
index 7187b52..298a06d 100644 (file)
@@ -716,6 +716,10 @@ void TaskManifestFile::generateWidgetIcon(UiApplication & uiApp,
     } else {
         uiApp.addIcon(IconType(iconText));
     }
+    std::ostringstream iconPath;
+    iconPath << GlobalConfig::GetUserWidgetDesktopIconPath() << "/";
+    iconPath << getIconTargetFilename(locale);
+     m_context.job->SendProgressIconPath(iconPath.str());
 }
 
 void TaskManifestFile::setWidgetManifest(Manifest & manifest)
index 734d77d..638e593 100644 (file)
@@ -35,6 +35,7 @@ namespace PackageManager {
 #define PKGMGR_END_SUCCESS          "ok"
 #define PKGMGR_END_FAILURE          "fail"
 #define PKGMGR_PROGRESS_KEY         "install_percent"
+#define PKGMGR_ICON_PATH            "icon_path"
 
 typedef pkgmgr_installer* PkgmgrHandle;