bug fix(StatusBar): Clock is not displayed at the time of the first start 89/18689/1 accepted/tizen/ivi/panda/20140328.181245 submit/tizen/20140328.070021
authorMasayuki Sasaki <masayuki.sasaki@mail.toyota-td.jp>
Fri, 28 Mar 2014 06:49:19 +0000 (15:49 +0900)
committerMasayuki Sasaki <masayuki.sasaki@mail.toyota-td.jp>
Fri, 28 Mar 2014 06:54:12 +0000 (15:54 +0900)
Change-Id: Ic0dd9bc18ba3438362f56ae630ddab767942e8f9
Signed-off-by: Masayuki Sasaki <masayuki.sasaki@mail.toyota-td.jp>
configure.ac
packaging/ico-uxf-homescreen.changes
packaging/ico-uxf-homescreen.spec
src/homescreen/CicoHSLifeCycleController.cpp
src/homescreen/CicoHSMenuTile.cpp
src/onscreen/Makefile.am
src/statusbar/CicoComponentImplementation.cpp
src/statusbar/CicoStatusBar.cpp
src/statusbar/statusbar.edc
tool/notification/Makefile.am
tool/notification/del_notification.cpp

index 83d5826..0cb8190 100644 (file)
@@ -39,6 +39,7 @@ PKG_CHECK_MODULES([AUL], [aul])
 PKG_CHECK_MODULES([PKGMGR], [pkgmgr])
 PKG_CHECK_MODULES([WAYLANDCLIENT], [wayland-client])
 PKG_CHECK_MODULES([NOTIFICATION], [notification])
+PKG_CHECK_MODULES([APPSVC], [appsvc])
 
 # libraries for homescreen.
 PKG_CHECK_MODULES([EDJE], [edje])
index d49582d..fb44569 100644 (file)
@@ -1,3 +1,7 @@
+* Fri Mar 28 2014 Shibata Makoto <shibata@mac.tec.toyota.co.jp> accepted/tizen/ivi/panda/20140326.234210@52d43be
+- bug fix(StatusBar): Clock is not displayed at the time of the first start
+- bug fix(StatusBar): Adjustment of the clock image interval
+
 * Wed Mar 26 2014 Shibata Makoto <shibata@mac.tec.toyota.co.jp> accepted/tizen/ivi/release/20140312.115201@3fee487
 - bug fix: Notification launch support. (TIVI-2926/1892)
 - bug fix: HomeScreen sometimes fails in connection with SystemController at the time of starting.
index 6c8a649..89d7a89 100644 (file)
@@ -31,6 +31,7 @@ BuildRequires: pkgconfig(murphy-domain-controller)
 BuildRequires: pkgconfig(murphy-ecore)
 BuildRequires: pkgconfig(murphy-resource)
 BuildRequires: pkgconfig(notification)
+BuildRequires: pkgconfig(appsvc)
 BuildRequires: boost-devel
 BuildRequires: mesa-devel
 BuildRequires: weston-ivi-shell
@@ -60,6 +61,7 @@ Requires: pkgconfig(elementary)
 Requires: pkgconfig(ecore-wayland)
 Requires: pkgconfig(ecore-x)
 Requires: pkgconfig(glib-2.0)
+Requires: pkgconfig(appsvc)
 
 %description system-controller-devel
 Development files for application that communicate homescreen.
@@ -78,6 +80,10 @@ rm -rf %{buildroot}
 
 cp tool/ico_clear_screen %{buildroot}%{_bindir}
 cp tool/ico_change_loginuser %{buildroot}%{_bindir}
+cp tool/notification/ico_del_notification %{buildroot}%{_bindir}
+cp tool/notification/ico_dump_notification %{buildroot}%{_bindir}
+cp tool/notification/ico_send_notification %{buildroot}%{_bindir}
+cp tool/notification/ico_send_notification2 %{buildroot}%{_bindir}
 
 %post
 /sbin/ldconfig
@@ -120,6 +126,10 @@ rm -f /usr/share/applications/org.tizen.ico.system-controller.desktop
 /usr/lib/systemd/user/weston.target.wants/ico-uxf-wait-launchpad-ready.path
 %{_bindir}/ico_clear_screen
 %{_bindir}/ico_change_loginuser
+%{_bindir}/ico_del_notification
+%{_bindir}/ico_dump_notification
+%{_bindir}/ico_send_notification
+%{_bindir}/ico_send_notification2
 %attr(644,app,app) /home/app/ico/defaultApps.info
 %attr(755,app,app) /home/app/ico
 /home/app/ico/defaultApps.info
index a4b0827..91b4831 100644 (file)
@@ -803,7 +803,7 @@ void CicoHSLifeCycleController::getCategory(const char* sPkg, const char* sNm,
     int  appCtgryType;
     char addCtgry[400];
     int  addCtgryLen;
-    char work[80];
+    char work[PATH_MAX];
 
     /* get default category of this application */
     addCtgry[0] = 0;
index 5b5c7b3..d3a98c0 100644 (file)
@@ -178,7 +178,7 @@ CicoHSMenuTile::HideTermIcon(void)
 void
 CicoHSMenuTile::FreeObject(void)
 {
-    char    sWork[80];
+    char    sWork[PATH_MAX];
 
     ICO_DBG("CicoHSMenuTile::FreeObject(appid=%08x<%s>)", (int)this->appid, appid);
 
@@ -519,7 +519,7 @@ CicoHSMenuTile::ValidMenuIcon(void)
 void
 CicoHSMenuTile::ValidThumbnail(int surface)
 {
-    char    sWork[80];
+    char    sWork[PATH_MAX];
 
     ICO_DBG("CicoHSMenuTile::ValidThumbnail(appid=%08x<%s>) run=%d surf=%08x",
             (int)this->appid, appid, app_running, surface);
@@ -601,7 +601,7 @@ CicoHSMenuTile::SetThumbnail(ico_syc_thumb_info_t *info)
     int                 svx, svy;
     int                 unmap;
     int                 fd;
-    char                sWork[80];
+    char                sWork[PATH_MAX];
 #if     0           /* for BMP format   */
 #pragma pack(push, 1)
         struct _bmphead {
@@ -817,7 +817,7 @@ CicoHSMenuTile::SetThumbnail(ico_syc_thumb_info_t *info)
 void
 CicoHSMenuTile::ShowMenu(bool show)
 {
-    char    sWork[80];
+    char    sWork[PATH_MAX];
     menu_show = show;
     if ((thumb_tile) && (thumb.surface != 0)) {
         sprintf(sWork, ICO_HS_THUMB_ICODIR ICO_HS_THUMB_FILEDIR "/%08x."
index 0dcde3b..4404d5d 100644 (file)
@@ -43,6 +43,7 @@ OnScreen_LDADD =                                      \
     $(AUL_LIBS)                                        \
     $(UWS_LIBS)                                        \
        $(NOTIFICATION_LIBS)                    \
+       $(APPSVC_LIBS)                                  \
        -lappsvc                                                \
        ../../lib/apps-framework/.libs/libico-appfw.so
 
index afafb01..1547c5e 100644 (file)
@@ -129,7 +129,7 @@ CicoStatusBarClockComponent::Initialize(Evas_Object *windowobj, Evas *evas)
     evas_object_resize( evasobj_, w_width, h );
     obj = (Evas_Object*)edje_object_part_object_get(evasobj_,"MIN1_img" );
     evas_object_geometry_get( obj, &x, &y, &w, &h );
-    Evas_Coord offset = w_width - x - w;
+    Evas_Coord offset = w_width - x - w -18;
 
     for ( i=0; i<CLOCK_OBJECT_COUNT; i++ ) {
         obj = (Evas_Object*)edje_object_part_object_get(
@@ -137,15 +137,17 @@ CicoStatusBarClockComponent::Initialize(Evas_Object *windowobj, Evas *evas)
         if ( obj != NULL ) {
             evas_object_geometry_get( obj, &x, &y, &w, &h );
             evas_object_move( obj, x+offset , y);
+            evas_object_show(obj);
         }
     }
 
     /*  initial display  */
-    Update();
+    bool ret = true;
+    ret = Update();
     Show();
 
     ICO_TRA("CicoStatusBarClockComponent::Initialize Leave");
-    return Update();
+    return ret;
 }
 
 /*--------------------------------------------------------------------------*/
@@ -196,11 +198,19 @@ CicoStatusBarClockComponent::Update()
             obj = (Evas_Object*)edje_object_part_object_get(
                          evasobj_,clock_image_object[i] );
             if ( obj != NULL ) {
-                ICO_DBG("SetNotification image set[%s][%s]",clock_image_object[i],clock_image_path[i]);
-                evas_object_image_file_set(obj, clock_image_path[now_clock_image[i]], NULL);
+                ICO_DBG("CicoStatusBarClockComponent image set[%s][%s]",
+                        clock_image_object[i],clock_image_path[now_clock_image[i]]);
+                evas_object_image_file_set(obj, 
+                        clock_image_path[now_clock_image[i]], NULL);
+                // add update view area 
+                //    (Omitted update area is set so that evas_object_image_file_set())
+                //Evas_Coord x,y,w,h;
+                //evas_object_geometry_get( obj, &x, &y, &w, &h );
+                //evas_object_image_data_update_add( obj, x, y, w, h );
+
             }
             else {
-                ICO_DBG("SetNotification image set error[object not found]" );
+                ICO_DBG("CicoStatusBarClockComponent image set error[object not found]" );
             }
             last_clock_image[i] = now_clock_image[i];
         }
@@ -367,7 +377,8 @@ CicoNotificationPanelComponent::SetNotification(const char *text,
 bool
 CicoNotificationPanelComponent::SetText(const char *text)
 {
-    ICO_TRA("CicoNotificationPanelComponent::SetText Enter(text=%s)", text? text:"NULL");
+    ICO_TRA("CicoNotificationPanelComponent::SetText Enter(text=%s)",
+            text? text:"NULL");
     if ( text == NULL ) {
         edje_object_part_text_set(evasobj_, "content_text", "");
         return true;
@@ -388,7 +399,8 @@ CicoNotificationPanelComponent::SetText(const char *text)
 void
 CicoNotificationPanelComponent::SetTextEndPosition( Evas_Coord x_end, Evas_Coord y_end)
 {
-    ICO_TRA("CicoNotificationPanelComponent::SetTextEndPosition Enter(%d,%d)",x_end,y_end);
+    ICO_TRA("CicoNotificationPanelComponent::SetTextEndPosition Enter(%d,%d)",
+            x_end,y_end);
 
     if (evasobj_ == NULL) {
         ICO_TRA("CicoNotificationPanelComponent::SetTextEndPosition Leave(false)");
index 242dc44..d527edc 100644 (file)
@@ -79,7 +79,6 @@ CicoStatusBar::Initialize(void)
     if (window_ == NULL) {
         return false;
     }
-    ecore_main_loop_iterate();
     ecore_wl_screen_size_get(&width_, &height_);
 
     ecore_evas_size_min_set(window_, width_, STATUSBAR_HEIGHT);
@@ -104,6 +103,10 @@ CicoStatusBar::Initialize(void)
 
     ecore_evas_object_associate(window_, windowobj_,
                                 ECORE_EVAS_OBJECT_ASSOCIATE_BASE);
+    /*  update initial view  */
+    Show();
+    ecore_main_loop_iterate();
+
     ICO_DBG("Initialize end windowobj_.");
 
     ICO_DBG("Initialize start Clock_Component.");
@@ -131,7 +134,9 @@ CicoStatusBar::Initialize(void)
         noticomp_->SetTextEndPosition( x, y );
     }
 
-    Show();
+    //Show();
+    //ecore_main_loop_iterate();
+    //clockcomp_->Update();
 
     // add timer callback function of time update
     ecore_timer_add(3.0, ecoreUpdateTimeCB, this);
index 7ece7e9..5cae64f 100644 (file)
@@ -86,6 +86,10 @@ collections {
                   rel1 {
                         relative: 0.0 0.0;
                         offset: 500 3;
+/* This Setting not works
+                        relative: 1.0 0.0;
+                        offset: -45 3;
+*/
                   }
                   image{
                     normal: "time_0.png";
@@ -102,7 +106,7 @@ collections {
                   rel1 {
                         to: "MIN1_img";
                         relative: 0.0 0.0;
-                        offset: -31 0;
+                        offset: -30 0;
                   }
                   image{
                     normal: "time_0.png";
@@ -119,7 +123,7 @@ collections {
                   rel1 {
                         to: "MIN10_img";
                         relative: 0.0 0.0;
-                        offset: -13 8;
+                        offset: -24 8;
                   }
                   image{
                     normal: "time_ten.png";
@@ -136,7 +140,7 @@ collections {
                   rel1 {
                         to: "TIME_SP_img";
                         relative: 0.0 0.0;
-                        offset: -31 -8;
+                        offset: -42 -8;
                   }
                   image{
                     normal: "time_0.png";
@@ -153,7 +157,7 @@ collections {
                   rel1 {
                         to: "HOUR1_img";
                         relative: 0.0 0.0;
-                        offset: -31 0;
+                        offset: -30 0;
                   }
                   image{
                     normal: "time_0.png";
@@ -164,13 +168,13 @@ collections {
               name: "AM_PM_img";
               type: IMAGE;
               description {
-                  min: 60 45;
-                  max: 60 45;
+                  min: 60 43;
+                  max: 60 43;
                   align: 0.0 0.0;
                   rel1 {
                         to: "HOUR10_img";
                         relative: 0.0 0.0;
-                        offset: -61 12;
+                        offset: -72 14;
                   }
                   image{
                     normal: "time_am.png";
index fafb454..eef4206 100644 (file)
@@ -32,7 +32,8 @@ ico_send_notification2_CXXFLAGS = \
        $(NOTIFICATION_CFLAGS)
 
 ico_send_notification2_LDADD = \
-       $(NOTIFICATION_LIBS) -lappsvc
+       $(NOTIFICATION_LIBS) \
+       $(APPSVC_LIBS)
        
 #
 #
index e59c080..c65d12b 100644 (file)
@@ -1,7 +1,8 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
 #include <iostream>
+#include <string>
 #include "notification.h"
 using namespace std;
 
@@ -18,20 +19,34 @@ main(int argc, char **argv)
                 printf("notification_delete_group_by_priv_id failed(%d).\n", err);
                 return -1;
             }
+            err = notification_delete_all_by_type("", NOTIFICATION_TYPE_ONGOING);
+            if (NOTIFICATION_ERROR_NONE != err) {
+                printf("notification_delete_group_by_priv_id failed(%d).\n", err);
+                return -1;
+            }
             return 0;
         }
     }
 
     if (argc < 3) {
-        printf("%s pkgname priv_id\n", argv[0]);
+        printf("%s [--ongoing] pkgname priv_id\n", argv[0]);
         return -1;
     }
+    int n_geta = 1;
+    notification_type_e nType = NOTIFICATION_TYPE_NOTI;
+    string sargv1(argv[1]);
+    if (0 == sargv1.compare("--ongoing")) {
+        nType = NOTIFICATION_TYPE_ONGOING;
+        n_geta = 2;
+        if (argc < 4) {
+            printf("%s --ongoing pkgname priv_id\n", argv[0]);
+            return -1;
+        }
+    }
 
-    char *pkgname = argv[1];
-    int  priv_id  = atoi(argv[2]);
-    err = notification_delete_by_priv_id(pkgname, 
-                                         NOTIFICATION_TYPE_NONE,
-                                         priv_id);
+    char *pkgname = argv[n_geta];
+    int  priv_id  = atoi(argv[n_geta+1]);
+    err = notification_delete_by_priv_id(pkgname, nType, priv_id);
     if (err != NOTIFICATION_ERROR_NONE) {
         printf("notification_delete_by_priv_id failed(%d).\n", err);
         return -1;