From b62b43511e65e6f6daf45d97c43b8bc3621f6c55 Mon Sep 17 00:00:00 2001 From: taeyoon Date: Thu, 22 Dec 2016 14:14:41 +0900 Subject: [PATCH 01/16] Add release request in update buffer callback By tizen remote surface protocol version up (2), update buffer callback should call release request Change-Id: I07cc06b81a2b7a76735991635c11d0535f5600eb --- .../internal/widget_view/widget_view_impl.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp b/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp index 7927adc..d49aab0 100644 --- a/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp +++ b/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp @@ -36,6 +36,7 @@ #include #include #include +#include namespace Dali { @@ -88,6 +89,8 @@ DALI_ACTION_REGISTRATION( Dali::WidgetView, WidgetView, "activateFaultedWidget", DALI_TYPE_REGISTRATION_END() +struct wl_buffer* preBuffer; + static void OnBufferChanged( struct tizen_remote_surface *surface, uint32_t type, struct wl_buffer *buffer, int32_t img_file_fd, uint32_t img_file_size, uint32_t time, struct wl_array *keys, void *data) { @@ -107,6 +110,15 @@ static void OnBufferChanged( struct tizen_remote_surface *surface, uint32_t type tbm_surface_h tbmSurface = static_cast< tbm_surface_h >( wl_buffer_get_user_data( buffer ) ); widgetView->UpdateImageSource( tbmSurface ); } + + if( preBuffer != NULL && tizen_remote_surface_get_version( surface ) >= TIZEN_REMOTE_SURFACE_RELEASE_SINCE_VERSION ) + { + tizen_remote_surface_release( surface, preBuffer ); + } + + preBuffer = buffer; + + close( img_file_fd ); } static void OnBufferUpdated( struct tizen_remote_surface* surface, wl_buffer* buffer, uint32_t time, void* data ) @@ -127,6 +139,13 @@ static void OnBufferUpdated( struct tizen_remote_surface* surface, wl_buffer* bu tbm_surface_h tbmSurface = static_cast< tbm_surface_h >( wl_buffer_get_user_data( buffer ) ); widgetView->UpdateImageSource( tbmSurface ); } + + if( preBuffer != NULL && tizen_remote_surface_get_version( surface ) >= TIZEN_REMOTE_SURFACE_RELEASE_SINCE_VERSION ) + { + tizen_remote_surface_release( surface, preBuffer ); + } + + preBuffer = buffer; } static void OnSurfaceMissing( struct tizen_remote_surface* surface, void* data ) -- 2.7.4 From e25771c3fca2e59da395a3be0ed8c5a09231c0ac Mon Sep 17 00:00:00 2001 From: taeyoon Date: Wed, 4 Jan 2017 16:58:16 +0900 Subject: [PATCH 02/16] Added extra updated event WIDGET_INSTANCE_EVENT_EXTRA_UPDATED for ContentUpdate signal Change-Id: I18739f505eef7c7e33cdd3e6a9ffe3a73d6040a7 --- widget_viewer_dali/internal/widget_view/widget_view_impl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp b/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp index d49aab0..6013c30 100644 --- a/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp +++ b/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp @@ -464,6 +464,7 @@ void WidgetView::SendWidgetEvent( int event ) switch( event ) { case WIDGET_INSTANCE_EVENT_UPDATE: + case WIDGET_INSTANCE_EVENT_EXTRA_UPDATED: { mWidgetContentUpdatedSignal.Emit( handle ); break; -- 2.7.4 From dd5ab23047278b88b9316ec22828fa73b428cf9f Mon Sep 17 00:00:00 2001 From: Hyunho Kang Date: Wed, 4 Jan 2017 15:09:01 +0900 Subject: [PATCH 03/16] Support widget_viewer_sdk multi class widget widget id is different from widget application's appid Change-Id: I1db0ec2bb6c0961933af356db3a61b0bfeece45b Signed-off-by: Hyunho Kang --- widget_viewer_sdk/src/main.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/widget_viewer_sdk/src/main.c b/widget_viewer_sdk/src/main.c index 98b32aa..87d1378 100644 --- a/widget_viewer_sdk/src/main.c +++ b/widget_viewer_sdk/src/main.c @@ -107,6 +107,23 @@ static struct info { #define LONG_PRESS 1.0f #define CONF_FNAME "/etc/widget_viewer_sdk.conf" +static const char *__to_appid(const char *widget_id) +{ + const char *appid; + + appid = g_strstr_len(widget_id, strlen(widget_id), "@"); + if (appid != NULL) { + if (strlen(appid) == 1) + return widget_id; + + /* skip @ */ + appid++; + } else { + appid = (char *)widget_id; + } + return appid; +} + static void watch_category_handler(char *buffer) { char *old_category; @@ -643,6 +660,7 @@ static Eina_Bool lazy_widget_loader_cb(void *widget_id) static void _app_control(app_control_h service, void *data) { char *widget_id = NULL; + char *app_id = NULL; int ret; char *app_type = NULL; pkgmgrinfo_appinfo_h app_info; @@ -661,9 +679,10 @@ static void _app_control(app_control_h service, void *data) if (!widget_id) return; - ret = pkgmgrinfo_appinfo_get_appinfo(widget_id, &app_info); + app_id = __to_appid(widget_id); + ret = pkgmgrinfo_appinfo_get_appinfo(app_id, &app_info); if (PMINFO_R_OK != ret) { - ErrPrint("fail to get %s appinfo %d", widget_id, ret); + ErrPrint("fail to get %s appinfo %d", app_id, ret); return; } -- 2.7.4 From f9fcc08cceeefe1bc749996d948ff3dff20da167 Mon Sep 17 00:00:00 2001 From: Hyunho Kang Date: Wed, 4 Jan 2017 15:56:47 +0900 Subject: [PATCH 04/16] Fix multi class widget bug screen-connector is running based on appid widget id is different from appid Change-Id: I766f38d31820e757f835dd26650b3c057eea3d09 Signed-off-by: Hyunho Kang --- widget_viewer_evas/src/widget_viewer_evas.c | 32 ++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/widget_viewer_evas/src/widget_viewer_evas.c b/widget_viewer_evas/src/widget_viewer_evas.c index 49b44ed..b32f052 100644 --- a/widget_viewer_evas/src/widget_viewer_evas.c +++ b/widget_viewer_evas/src/widget_viewer_evas.c @@ -249,6 +249,23 @@ static void smart_callback_call(Evas_Object *obj, const char *signal, void *cbda evas_object_smart_callback_call(obj, signal, cbdata); } +static const char *__to_appid(const char *widget_id) +{ + const char *appid; + + appid = g_strstr_len(widget_id, strlen(widget_id), "@"); + if (appid != NULL) { + if (strlen(appid) == 1) + return widget_id; + + /* skip @ */ + appid++; + } else { + appid = (char *)widget_id; + } + return appid; +} + static void __screen_connector_watcher_evas_added_cb(const char *appid, Evas_Object *image, void *data) { struct widget_info *info; @@ -266,10 +283,13 @@ static void __screen_connector_watcher_evas_added_cb(const char *appid, Evas_Obj return; } - if (info->restart || (strcmp(appid, info->widget_id) != 0)) + if (info->restart || (info->widget_id == NULL) || (strcmp(appid, __to_appid(info->widget_id)) != 0)) { + ErrPrint("Wrong added info, %s %s", appid, info->widget_id); return; + } - DbgPrint("widget added: %s, instance : %s, (%p)", appid, info->instance_id, image); + DbgPrint("widget added: %s, widget_id : %s, instance : %s, (%p)", + appid, info->widget_id, info->instance_id, image); evas_object_geometry_get(image, &x, &y, &w, &h); DbgPrint("widget geometry:%d %d %d %d", x, y, w, h); elm_object_part_content_set(info->layout, "tbm,widget", image); @@ -351,6 +371,7 @@ static void __push_event_queue(struct widget_info *info, int event) g_queue_push_tail(info->event_queue, GINT_TO_POINTER(event)); } + static int __restart_terminated_widget(const char *widget_id) { @@ -387,7 +408,8 @@ static int __restart_terminated_widget(const char *widget_id) ops.added = __screen_connector_watcher_evas_added_cb; ops.removed = __screen_connector_watcher_evas_removed_cb; ops.updated = __screen_connector_watcher_evas_updated_cb; - screen_connector_watcher_evas_add(&ops, widget_instance_info->widget_id, widget_instance_info); + + screen_connector_watcher_evas_add(&ops, (char *)__to_appid(widget_instance_info->widget_id), widget_instance_info); widget_instance_info->pid = widget_instance_launch(widget_instance_info->instance_id, widget_instance_info->content_info, w, h); widget_instance_info->restart = false; } @@ -770,7 +792,7 @@ static void resize_cb(void *data, Evas *e, Evas_Object *layout, void *event_info ops.added = __screen_connector_watcher_evas_added_cb; ops.removed = __screen_connector_watcher_evas_removed_cb; ops.updated = __screen_connector_watcher_evas_updated_cb; - screen_connector_watcher_evas_add(&ops, info->widget_id, info); + screen_connector_watcher_evas_add(&ops, (char *)__to_appid(info->widget_id), info); info->pid = widget_instance_launch(info->instance_id, info->content_info, w, h); if (info->pid < 0) { @@ -1428,7 +1450,7 @@ EAPI void widget_viewer_evas_activate_faulted_widget(Evas_Object *widget) ops.added = __screen_connector_watcher_evas_added_cb; ops.removed = __screen_connector_watcher_evas_removed_cb; ops.updated = __screen_connector_watcher_evas_updated_cb; - screen_connector_watcher_evas_add(&ops, info->widget_id, info); + screen_connector_watcher_evas_add(&ops, (char *)__to_appid(info->widget_id), info); info->pid = widget_instance_launch(info->instance_id, info->content_info, w, h); if (info->pid < 0) { ErrPrint("Failed to launch an widget"); -- 2.7.4 From 37fe4c489c22a5c6feddf381432648b23a7ede76 Mon Sep 17 00:00:00 2001 From: Hyunho Kang Date: Thu, 5 Jan 2017 22:20:48 +0900 Subject: [PATCH 05/16] Add widget_viewer_sdk multiple widget view feature To support multi class widget test Multiple widget id should be passed delimited by comma. ex) launch_app org.tizen.widget_viewer_sdk widget_id class3@org.example.multiclass,class2@org.example.multiclass Change-Id: I927572c3bfa12ddcc8aec04350dec2b9f6162c18 Signed-off-by: Hyunho Kang --- widget_viewer_sdk/src/main.c | 643 +++++++++++++++++++++++-------------------- 1 file changed, 341 insertions(+), 302 deletions(-) diff --git a/widget_viewer_sdk/src/main.c b/widget_viewer_sdk/src/main.c index 87d1378..cedae44 100644 --- a/widget_viewer_sdk/src/main.c +++ b/widget_viewer_sdk/src/main.c @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +#include #include #include #include @@ -58,6 +58,21 @@ int errno; #define SDK_VALGRIND "VALGRIND" #define LAZY_LOADER "__LAZY_LOADER__" +typedef struct _widget_info { + char *content_info; + char *title; + double period; + Evas_Object *widget; + Evas_Object *widget_layout; + int *size_types; + int count_of_size_type; +} widget_info; + +typedef struct _widget_size_list_item { + widget_info *info; + int idx; +}widget_size_list_item; + static struct info { int w; int h; @@ -66,17 +81,7 @@ static struct info { Evas_Object *box; Evas_Object *layout; Ecore_Timer *long_press; - - struct ctx_item { - char *content_info; - char *title; - double period; - Evas_Object *widget; - Evas_Object *widget_layout; - int *size_types; - int count_of_size_type; - } ctx; - + GList *widget_info_list; Ecore_Timer *lazy_widget_loader; double lazy_watch_time; char *default_watch; @@ -87,17 +92,7 @@ static struct info { .win = NULL, .layout = NULL, .long_press = NULL, - - .ctx = { - .content_info = NULL, - .title = NULL, - .period = WIDGET_VIEWER_EVAS_DEFAULT_PERIOD, - .widget = NULL, - .widget_layout = NULL, - .size_types = NULL, - .count_of_size_type = 20, - }, - + .widget_info_list = NULL, .lazy_widget_loader = NULL, .lazy_watch_time = LAZY_WATCH_TIME, .default_watch = DEFAULT_WATCH, @@ -186,9 +181,126 @@ static void hide_widget_info_cb(void *data, Evas_Object *obj, const char *emissi elm_object_signal_emit(s_info.layout, "hide", "info"); } +static char *list_item_text_get_cb(void *data, Evas_Object *obj, const char *part) +{ + char buffer[256]; + int ret; + int w; + int h; + widget_size_list_item *item = (widget_size_list_item *)data; + + ret = widget_service_get_size(item->info->size_types[item->idx], &w, &h); + if (ret != WIDGET_ERROR_NONE) + return strdup("Invalid"); + + snprintf(buffer, sizeof(buffer), "%dx%d", w, h); + DbgPrint("Size: [%s]\n", buffer); + return strdup(buffer); +} + +static Evas_Object *list_item_content_get_cb(void *data, Evas_Object *obj, const char *part) +{ + Evas_Object *icon = NULL; + char *icon_filename; + const char *widget_id; + widget_size_list_item *item = (widget_size_list_item *)data; + + widget_id = widget_viewer_evas_get_widget_id(item->info->widget); + + icon_filename = widget_service_get_preview_image_path(widget_id, item->info->size_types[item->idx]); + if (icon_filename) { + icon = elm_icon_add(s_info.win); + if (icon) { + elm_image_file_set(icon, icon_filename, NULL); + elm_image_resizable_set(icon, EINA_TRUE, EINA_TRUE); + evas_object_size_hint_max_set(icon, 100, 100); + DbgPrint("Icon: %s\n", icon_filename); + } + free(icon_filename); + } else { + icon = NULL; + } + + return icon; +} + +static void list_item_clicked_cb(void *data, Evas_Object *obj, void *event_info) +{ + int w; + int h; + widget_size_list_item *item; + + item = (widget_size_list_item *)data; + if (item == NULL) + return; + + if (widget_service_get_size(item->info->size_types[item->idx], &w, &h) != WIDGET_ERROR_NONE) + return; + + evas_object_resize(item->info->widget, w, h); + evas_object_size_hint_min_set(item->info->widget, w, h); + evas_object_size_hint_max_set(item->info->widget, w, h); +} + static Eina_Bool show_widget_info_cb(void *data) { DbgPrint("Show info panel\n"); + + int i; + int w; + int h; + Evas_Object *size_list; + widget_size_list_item *item; + Elm_Object_Item *elm_item; + widget_info *info = (widget_info *)data; + static Elm_Genlist_Item_Class class = { + .item_style = "1text.1icon", + .func = { + .text_get = list_item_text_get_cb, + .content_get = list_item_content_get_cb, + .state_get = NULL, + .del = NULL, + } + }; + + DbgPrint("======== %d", info->count_of_size_type); + + if (info->count_of_size_type <= 1) { + elm_object_signal_emit(s_info.layout, "hide", "size,list"); + return WIDGET_ERROR_NONE; + } else { + elm_object_signal_emit(s_info.layout, "show", "size,list"); + } + + size_list = elm_object_part_content_get(s_info.layout, "widget,size,list"); + if (size_list) { + elm_genlist_clear(size_list); + } else { + size_list = elm_genlist_add(s_info.win); + if (!size_list) { + ErrPrint("Failed to create a genlist\n"); + return WIDGET_ERROR_FAULT; + } + + elm_object_part_content_set(s_info.layout, "widget,size,list", size_list); + } + + DbgPrint("========\nDump supported size types \n"); + for (i = 0; i < info->count_of_size_type; i++) { + if (widget_service_get_size(info->size_types[i], &w, &h) != WIDGET_ERROR_NONE || w == 0 || h == 0) { + DbgPrint("[%X] is not supported (%dx%d)\n", info->size_types[i], w, h); + continue; + } + DbgPrint("Size[%X]\n", info->size_types[i]); + + item = (widget_size_list_item *)calloc(1, sizeof(widget_size_list_item)); + item->info = info; + item->idx = i; + elm_item = elm_genlist_item_append(size_list, &class, (void *)item, NULL, ELM_GENLIST_ITEM_NONE, list_item_clicked_cb, (void *)item); + if (!elm_item) + ErrPrint("Failed to add a new size elm_item\n"); + } + DbgPrint("========\nEnd of a dump\n"); elm_object_signal_emit(s_info.layout, "show", "info"); s_info.long_press = NULL; @@ -202,7 +314,7 @@ static void layout_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_in s_info.long_press = NULL; } - s_info.long_press = ecore_timer_add(LONG_PRESS, show_widget_info_cb, NULL); + s_info.long_press = ecore_timer_add(LONG_PRESS, show_widget_info_cb, data); if (!s_info.long_press) ErrPrint("Failed to add a timer\n"); } @@ -235,6 +347,7 @@ static void __watch_removed(void *data, Evas_Object *obj, void *event_info) static bool app_create(void *data) { + Evas_Object *scroller; s_info.win = elm_win_add(NULL, "Widget Viewer (SDK)", ELM_WIN_BASIC); if (!s_info.win) { LOGD("Failed to create a window\n"); @@ -248,18 +361,6 @@ static bool app_create(void *data) elm_win_alpha_set(s_info.win, EINA_FALSE); elm_win_indicator_mode_set(s_info.win, ELM_WIN_INDICATOR_SHOW); - s_info.box = elm_box_add(s_info.win); - if (!s_info.box) { - evas_object_del(s_info.bg); - evas_object_del(s_info.win); - s_info.bg = NULL; - s_info.win = NULL; - return false; - } - evas_object_size_hint_fill_set(s_info.box, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_size_hint_weight_set(s_info.box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_box_align_set(s_info.box, 0.0, 0.0); - s_info.layout = elm_layout_add(s_info.win); if (!s_info.layout) { evas_object_del(s_info.box); @@ -284,51 +385,92 @@ static bool app_create(void *data) evas_object_size_hint_weight_set(s_info.layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_win_resize_object_add(s_info.win, s_info.layout); evas_object_show(s_info.layout); - elm_object_signal_callback_add(s_info.layout, "mouse,clicked,1", "widget,info,bg", hide_widget_info_cb, NULL); - evas_object_event_callback_add(s_info.layout, EVAS_CALLBACK_MOUSE_DOWN, layout_down_cb, NULL); - evas_object_event_callback_add(s_info.layout, EVAS_CALLBACK_MOUSE_UP, layout_up_cb, NULL); - elm_object_part_content_set(s_info.layout, "widget", s_info.box); + /* Initialize scroller */ + scroller = elm_scroller_add(s_info.layout); + evas_object_size_hint_weight_set(scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_win_resize_object_add(s_info.layout, scroller); + evas_object_show(scroller); + + + /* Initialize box */ + s_info.box = elm_box_add(scroller); + if (!s_info.box) { + evas_object_del(s_info.bg); + evas_object_del(s_info.win); + s_info.bg = NULL; + s_info.win = NULL; + return false; + } + evas_object_size_hint_fill_set(s_info.box, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_size_hint_weight_set(s_info.box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_box_align_set(s_info.box, 0.0, 0.0); + + + elm_object_content_set(scroller, s_info.box); + elm_scroller_bounce_set(scroller, EINA_TRUE, EINA_FALSE); + elm_scroller_policy_set(scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF); + elm_scroller_propagate_events_set(scroller, EINA_TRUE); + elm_scroller_page_relative_set(scroller, 0, 1); + elm_scroller_region_show(scroller, 50, 50, 200, 200); + + elm_object_scroll_lock_x_set(scroller, EINA_FALSE); + elm_object_part_content_set(s_info.layout, "widget", scroller); + /* WIDGET init */ widget_viewer_evas_set_option(WIDGET_VIEWER_EVAS_DIRECT_UPDATE, 1); widget_viewer_evas_set_option(WIDGET_VIEWER_EVAS_EVENT_AUTO_FEED, 1); - widget_viewer_evas_init(s_info.win); eext_object_event_callback_add(s_info.win, EEXT_CALLBACK_BACK, back_key_cb, NULL); - evas_object_show(s_info.win); return true; } -static int unload_widget(void) +static void free_widget_info(gpointer data, gpointer user_data) { const char *tmp; + widget_info *info = (widget_info *)data; - if (!s_info.ctx.widget) - return WIDGET_ERROR_NOT_EXIST; + if (info == NULL) + return; - tmp = widget_viewer_evas_get_widget_id(s_info.ctx.widget); + tmp = widget_viewer_evas_get_widget_id(info->widget); DbgPrint("Unload previous widget: %s\n", tmp); - widget_viewer_evas_set_permanent_delete(s_info.ctx.widget, EINA_TRUE); - elm_box_unpack(s_info.box, s_info.ctx.widget_layout); - evas_object_del(s_info.ctx.widget); - evas_object_del(s_info.ctx.widget_layout); - free(s_info.ctx.title); - free(s_info.ctx.content_info); - free(s_info.ctx.size_types); - - s_info.ctx.widget = NULL; - s_info.ctx.widget_layout = NULL; - s_info.ctx.title = NULL; - s_info.ctx.content_info = NULL; - s_info.ctx.size_types = NULL; - s_info.ctx.period = WIDGET_VIEWER_EVAS_DEFAULT_PERIOD; - s_info.ctx.count_of_size_type = 20; + elm_box_unpack(s_info.box, info->widget_layout); + evas_object_del(info->widget); + evas_object_del(info->widget_layout); + if (info->title) + free(info->title); + if (info->content_info) + free(info->content_info); + if (info->size_types) + free(info->size_types); + + info->widget = NULL; + info->widget_layout = NULL; + info->title = NULL; + info->content_info = NULL; + info->size_types = NULL; + info->period = WIDGET_VIEWER_EVAS_DEFAULT_PERIOD; + info->count_of_size_type = 20; + free(info); +} + +static int unload_widget(void) +{ + int widget_cnt; + + widget_cnt = g_list_length(s_info.widget_info_list); + if (widget_cnt == 0) + return WIDGET_ERROR_NOT_EXIST; + + g_list_free_full(s_info.widget_info_list, free_widget_info); + s_info.widget_info_list = NULL; elm_object_part_text_set(s_info.layout, "widget,id", ""); elm_object_part_text_set(s_info.layout, "widget,content,info", ""); @@ -371,23 +513,11 @@ static void updated_cb(void *data, Evas_Object *obj, void *event_info) DbgPrint("Widget updated\n"); } -static void list_item_clicked_cb(void *data, Evas_Object *obj, void *event_info) -{ - int w; - int h; - - if (widget_service_get_size(s_info.ctx.size_types[(long)data], &w, &h) != WIDGET_ERROR_NONE) - return; - - evas_object_resize(s_info.ctx.widget, w, h); - evas_object_size_hint_min_set(s_info.ctx.widget, w, h); - evas_object_size_hint_max_set(s_info.ctx.widget, w, h); -} - static void extra_updated_cb(void *data, Evas_Object *obj, void *event_info) { const char *string; char *tmp; + widget_info *info = (widget_info *)data; string = widget_viewer_evas_get_title_string(obj); if (string) { @@ -395,10 +525,10 @@ static void extra_updated_cb(void *data, Evas_Object *obj, void *event_info) if (!tmp) return; - free(s_info.ctx.title); - s_info.ctx.title = tmp; + free(info->title); + info->title = tmp; - elm_object_part_text_set(s_info.layout, "widget,title", s_info.ctx.title); + elm_object_part_text_set(s_info.layout, "widget,title", info->title); } string = widget_viewer_evas_get_content_info(obj); @@ -407,20 +537,21 @@ static void extra_updated_cb(void *data, Evas_Object *obj, void *event_info) if (!tmp) return; - free(s_info.ctx.content_info); - s_info.ctx.content_info = tmp; + free(info->content_info); + info->content_info = tmp; - elm_object_part_text_set(s_info.layout, "widget,content,info", s_info.ctx.content_info); - DbgPrint("Content updated: [%s]\n", s_info.ctx.content_info); + elm_object_part_text_set(s_info.layout, "widget,content,info", info->content_info); + DbgPrint("Content updated: [%s]\n", info->content_info); } } static void period_changed_cb(void *data, Evas_Object *obj, void *event_info) { char buffer[96]; + widget_info *info = (widget_info *)data; - s_info.ctx.period = widget_viewer_evas_get_period(obj); - snprintf(buffer, sizeof(buffer), "%lf", s_info.ctx.period); + info->period = widget_viewer_evas_get_period(obj); + snprintf(buffer, sizeof(buffer), "%lf", info->period); elm_object_part_text_set(s_info.layout, "widget,period", buffer); DbgPrint("Period updated: %s\n", buffer); } @@ -454,145 +585,81 @@ static void widget_created_cb(void *data, Evas_Object *obj, void *event_info) extra_updated_cb(data, obj, NULL); } -static int load_widget(const char *widget_id) +static int load_widget(const char *widget_id, widget_info *info) { Evas_Object *bg = NULL; int w = 0; int h = 0; int i; - for (i = 0; i < s_info.ctx.count_of_size_type; i++) { - if (widget_service_get_size(s_info.ctx.size_types[i], &w, &h) != WIDGET_ERROR_NONE || w == 0 || h == 0) + for (i = 0; i < info->count_of_size_type; i++) { + if (widget_service_get_size(info->size_types[i], &w, &h) != WIDGET_ERROR_NONE || w == 0 || h == 0) continue; - break; } - if (i == s_info.ctx.count_of_size_type) { - Evas_Object *rect; - - rect = evas_object_rectangle_add(evas_object_evas_get(s_info.layout)); - evas_object_resize(rect, s_info.w, s_info.h); - evas_object_size_hint_min_set(rect, s_info.w, s_info.h); - evas_object_color_set(rect, 100, 100, 100, 255); - evas_object_show(rect); - elm_box_pack_end(s_info.box, rect); - - update_message("Supported size is not found"); - return WIDGET_ERROR_NOT_SUPPORTED; - } - update_message(NULL); - - DbgPrint("Found valid size[%X]: %dx%d\n", s_info.ctx.size_types[i], w, h); - - s_info.ctx.widget_layout = elm_layout_add(s_info.win); - elm_layout_file_set(s_info.ctx.widget_layout, LAYOUT_EDJ, "widget"); - evas_object_size_hint_weight_set(s_info.ctx.widget_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(s_info.ctx.widget, 0.0, 0.5); - evas_object_show(s_info.ctx.widget_layout); + info->widget_layout = elm_layout_add(s_info.win); + elm_layout_file_set(info->widget_layout, LAYOUT_EDJ, "widget"); + evas_object_size_hint_weight_set(info->widget_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(info->widget, 0.0, 0.5); + evas_object_show(info->widget_layout); bg = evas_object_rectangle_add(evas_object_evas_get(s_info.layout)); evas_object_resize(bg, w, h); evas_object_size_hint_min_set(bg, w, h); evas_object_color_set(bg, 255, 255, 255, 0); evas_object_show(bg); - elm_object_part_content_set(s_info.ctx.widget_layout, "bg", bg); + elm_object_part_content_set(info->widget_layout, "bg", bg); - s_info.ctx.widget = widget_viewer_evas_add_widget(s_info.win, widget_id, s_info.ctx.content_info, s_info.ctx.period); - if (!s_info.ctx.widget) { + info->widget = widget_viewer_evas_add_widget(s_info.win, widget_id, info->content_info, info->period); + if (!info->widget) { update_message("Failed to create a new widget"); return WIDGET_ERROR_FAULT; } - DbgPrint("Resize the widget(%s) to [%X] %dx%d\n", widget_id, s_info.ctx.size_types[0], w, h); + DbgPrint("Resize the widget(%s) to [%X] %dx%d\n", widget_id, info->size_types[0], w, h); - evas_object_smart_callback_add(s_info.ctx.widget, WIDGET_SMART_SIGNAL_UPDATED, updated_cb, NULL); - evas_object_smart_callback_add(s_info.ctx.widget, WIDGET_SMART_SIGNAL_EXTRA_INFO_UPDATED, extra_updated_cb, NULL); - evas_object_smart_callback_add(s_info.ctx.widget, WIDGET_SMART_SIGNAL_PERIOD_CHANGED, period_changed_cb, NULL); - evas_object_smart_callback_add(s_info.ctx.widget, WIDGET_SMART_SIGNAL_WIDGET_CREATED, widget_created_cb, NULL); - evas_object_smart_callback_add(s_info.ctx.widget, WIDGET_SMART_SIGNAL_WIDGET_CREATE_ABORTED, widget_create_aborted_cb, NULL); + evas_object_smart_callback_add(info->widget, WIDGET_SMART_SIGNAL_UPDATED, updated_cb, info); + evas_object_smart_callback_add(info->widget, WIDGET_SMART_SIGNAL_EXTRA_INFO_UPDATED, extra_updated_cb, info); + evas_object_smart_callback_add(info->widget, WIDGET_SMART_SIGNAL_PERIOD_CHANGED, period_changed_cb, info); + evas_object_smart_callback_add(info->widget, WIDGET_SMART_SIGNAL_WIDGET_CREATED, widget_created_cb, info); + evas_object_smart_callback_add(info->widget, WIDGET_SMART_SIGNAL_WIDGET_CREATE_ABORTED, widget_create_aborted_cb, info); - evas_object_resize(s_info.ctx.widget, w, h); - evas_object_size_hint_align_set(s_info.ctx.widget, 0.0, 0.5); - evas_object_show(s_info.ctx.widget); - elm_object_part_content_set(s_info.ctx.widget_layout, "widget", s_info.ctx.widget); + evas_object_resize(info->widget, w, h); + evas_object_size_hint_align_set(info->widget, 0.0, 0.5); + evas_object_show(info->widget); + elm_object_part_content_set(info->widget_layout, "widget", info->widget); - elm_box_pack_end(s_info.box, s_info.ctx.widget_layout); + elm_box_pack_end(s_info.box, info->widget_layout); elm_object_part_text_set(s_info.layout, "widget,id", widget_id); - return WIDGET_ERROR_NONE; -} - -static char *list_item_text_get_cb(void *data, Evas_Object *obj, const char *part) -{ - char buffer[256]; - int ret; - int w; - int h; - - ret = widget_service_get_size(s_info.ctx.size_types[(long)data], &w, &h); - if (ret != WIDGET_ERROR_NONE) - return strdup("Invalid"); - - snprintf(buffer, sizeof(buffer), "%dx%d", w, h); - DbgPrint("Size: [%s]\n", buffer); - return strdup(buffer); -} - -static Evas_Object *list_item_content_get_cb(void *data, Evas_Object *obj, const char *part) -{ - Evas_Object *icon = NULL; - char *icon_filename; - const char *widget_id; + update_message(NULL); + elm_box_padding_set(s_info.box, 0, 5); - widget_id = widget_viewer_evas_get_widget_id(s_info.ctx.widget); + DbgPrint("Found valid size[%X]: %dx%d\n", info->size_types[i], w, h); + evas_object_event_callback_add(info->widget, EVAS_CALLBACK_MOUSE_DOWN, layout_down_cb, info); + evas_object_event_callback_add(info->widget, EVAS_CALLBACK_MOUSE_UP, layout_up_cb, NULL); - icon_filename = widget_service_get_preview_image_path(widget_id, s_info.ctx.size_types[(long)data]); - if (icon_filename) { - icon = elm_icon_add(s_info.win); - if (icon) { - elm_image_file_set(icon, icon_filename, NULL); - elm_image_resizable_set(icon, EINA_TRUE, EINA_TRUE); - evas_object_size_hint_max_set(icon, 100, 100); - DbgPrint("Icon: %s\n", icon_filename); - } - free(icon_filename); - } else { - icon = NULL; - } + s_info.widget_info_list = g_list_append(s_info.widget_info_list, info); - return icon; + return WIDGET_ERROR_NONE; } -static int prepare_widget(const char *widget_id, app_control_h control) +static int prepare_widget(const char *widget_id, app_control_h control, widget_info *info) { int ret; - Evas_Object *size_list; - Elm_Object_Item *item; - long i; - int w; - int h; bundle *b; - static Elm_Genlist_Item_Class class = { - .item_style = "1text.1icon", - .func = { - .text_get = list_item_text_get_cb, - .content_get = list_item_content_get_cb, - .state_get = NULL, - .del = NULL, - } - }; if (app_control_export_as_bundle(control, &b) == APP_CONTROL_ERROR_NONE) { bundle_raw *r; int len; if (bundle_encode(b, &r, &len) == BUNDLE_ERROR_NONE) { - s_info.ctx.content_info = strdup(r); - if (!s_info.ctx.content_info) { + info->content_info = strdup(r); + if (!info->content_info) { ErrPrint("strdup: %d\n", errno); } else { - DbgPrint("Encoded content_info: [%s]\n", s_info.ctx.content_info); + DbgPrint("Encoded content_info: [%s]\n", info->content_info); } free((char *)r); @@ -603,64 +670,57 @@ static int prepare_widget(const char *widget_id, app_control_h control) bundle_free(b); } - s_info.ctx.count_of_size_type = 20; - ret = widget_service_get_supported_size_types(widget_id, &s_info.ctx.count_of_size_type, &s_info.ctx.size_types); + info->count_of_size_type = 20; + ret = widget_service_get_supported_size_types(widget_id, &info->count_of_size_type, &info->size_types); if (ret != WIDGET_ERROR_NONE) ErrPrint("Failed to load an widget\n"); - DbgPrint("[%s] %d\n", widget_id, s_info.ctx.count_of_size_type); - - if (s_info.ctx.count_of_size_type <= 1) { - elm_object_signal_emit(s_info.layout, "hide", "size,list"); - return WIDGET_ERROR_NONE; - } else { - elm_object_signal_emit(s_info.layout, "show", "size,list"); - } - - size_list = elm_object_part_content_get(s_info.layout, "widget,size,list"); - if (size_list) { - elm_genlist_clear(size_list); - } else { - size_list = elm_genlist_add(s_info.win); - if (!size_list) { - ErrPrint("Failed to create a genlist\n"); - return WIDGET_ERROR_FAULT; - } - - elm_object_part_content_set(s_info.layout, "widget,size,list", size_list); - } - - DbgPrint("========\nDump supported size types [%s]\n", widget_id); - for (i = 0; i < s_info.ctx.count_of_size_type; i++) { - if (widget_service_get_size(s_info.ctx.size_types[i], &w, &h) != WIDGET_ERROR_NONE || w == 0 || h == 0) { - DbgPrint("[%X] is not supported (%dx%d)\n", s_info.ctx.size_types[i], w, h); - continue; - } - - DbgPrint("Size[%X]\n", s_info.ctx.size_types[i]); - item = elm_genlist_item_append(size_list, &class, (void *)i, NULL, ELM_GENLIST_ITEM_NONE, list_item_clicked_cb, (void *)i); - if (!item) - ErrPrint("Failed to add a new size item\n"); - } - DbgPrint("========\nEnd of a dump\n"); - + DbgPrint("[%s] %d\n", widget_id, info->count_of_size_type); return ret; } -static Eina_Bool lazy_widget_loader_cb(void *widget_id) +static Eina_Bool lazy_widget_loader_cb(void *widget_id, widget_info *info) { DbgPrint("Lazy loader expired. load widget [%s]\n", widget_id); - - (void)load_widget(widget_id); + (void)load_widget(widget_id, info); free(widget_id); s_info.lazy_widget_loader = NULL; return ECORE_CALLBACK_CANCEL; } +static void _run_widget(char *widget_id, app_control_h service, char *lazy_loader) +{ + widget_info *info = (widget_info *)calloc(1, sizeof(widget_info)); + info->period = WIDGET_VIEWER_EVAS_DEFAULT_PERIOD; + info->count_of_size_type = 20; + + prepare_widget(widget_id, service, info); + if (s_info.lazy_widget_loader) { + char *tmp; + tmp = ecore_timer_del(s_info.lazy_widget_loader); + free(tmp); + } + + if (lazy_loader != NULL && strcmp(lazy_loader, "true") == 0) { + DbgPrint("Load a watch after some time later (%lf)\n", s_info.lazy_watch_time); + s_info.lazy_widget_loader = ecore_timer_add(s_info.lazy_watch_time, lazy_widget_loader_cb, widget_id); + if (!s_info.lazy_widget_loader) { + ErrPrint("Unable to fire the timer\n"); + lazy_widget_loader_cb(widget_id, info); + } + /** + * @note + * widget_id will be deleted from lazy_widget_loader_cb. or return value of ecore_timer_del(). + */ + } else { + DbgPrint("Immediately loads the watch[%s]\n", widget_id); + lazy_widget_loader_cb(widget_id, info); + } +} + static void _app_control(app_control_h service, void *data) { char *widget_id = NULL; - char *app_id = NULL; int ret; char *app_type = NULL; pkgmgrinfo_appinfo_h app_info; @@ -671,92 +731,71 @@ static void _app_control(app_control_h service, void *data) char *sdk_util_path = NULL; char *sdk_util_arg = NULL; char *lazy_loader = NULL; + bool is_array; + int array_len; + char **widget_id_arr; + int i; - ret = app_control_get_extra_data(service, WIDGET_APPID, &widget_id); - if (ret == APP_CONTROL_ERROR_NONE) { - + app_control_get_extra_data(service, WIDGET_APPID, &widget_id); + if (widget_id) { DbgPrint("Loading a widget: [%s]\n", widget_id); - if (!widget_id) - return; - - app_id = __to_appid(widget_id); - ret = pkgmgrinfo_appinfo_get_appinfo(app_id, &app_info); - if (PMINFO_R_OK != ret) { - ErrPrint("fail to get %s appinfo %d", app_id, ret); - return; - } - - pkgmgrinfo_appinfo_get_component_type(app_info, &app_type); - if (app_type != NULL && strcmp(app_type, "watchapp") == 0) { - watch_manager_init(s_info.win); - evas_object_smart_callback_add(s_info.win, WATCH_SMART_SIGNAL_ADDED, __watch_added, NULL); - evas_object_smart_callback_add(s_info.win, WATCH_SMART_SIGNAL_REMOVED, __watch_removed, NULL); - - watch_manager_get_app_control(widget_id, &watch_control); - app_control_to_bundle(watch_control, &b); - app_control_to_bundle(service, &app_control_b); - bundle_get_str(app_control_b, AUL_K_SDK, &sdk_util); - - if (sdk_util != NULL) { - if (strcmp(sdk_util, SDK_VALGRIND) == 0) { - bundle_get_str(app_control_b, DLP_K_VALGRIND_PATH, &sdk_util_path); - bundle_get_str(app_control_b, DLP_K_VALGRIND_ARG, &sdk_util_arg); - bundle_add_str(b, AUL_K_SDK, SDK_VALGRIND); - if (sdk_util_path) - bundle_add_str(b, DLP_K_VALGRIND_PATH, sdk_util_path); - if (sdk_util_arg) - bundle_add_str(b, DLP_K_VALGRIND_ARG, sdk_util_arg); - } else if (strcmp(sdk_util, SDK_DEBUG) == 0) { - bundle_get_str(app_control_b, DLP_K_GDBSERVER_PATH, &sdk_util_path); - bundle_get_str(app_control_b, DLP_K_DEBUG_ARG, &sdk_util_arg); - bundle_add_str(b, AUL_K_SDK, SDK_DEBUG); - if (sdk_util_path) - bundle_add_str(b, DLP_K_GDBSERVER_PATH, sdk_util_path); - if (sdk_util_arg) - bundle_add_str(b, DLP_K_DEBUG_ARG, sdk_util_arg); - } - DbgPrint("util %s arg %s path %s", sdk_util, sdk_util_arg, sdk_util_path); - } - appsvc_run_service(b, 0, NULL, NULL); - DbgPrint("appsvc_run_service returns [%d]", widget_id); - app_control_destroy(watch_control); - } else { - ret = app_control_get_extra_data(service, LAZY_LOADER, &lazy_loader); - app_control_to_bundle(service, &b); - widget_service_set_sdk_util(b); - ret = unload_widget(); - ret = prepare_widget(widget_id, service); - - if (s_info.lazy_widget_loader) { - char *tmp; - tmp = ecore_timer_del(s_info.lazy_widget_loader); - free(tmp); - } + ret = pkgmgrinfo_appinfo_get_appinfo(widget_id, &app_info); + if (PMINFO_R_OK != ret) + ErrPrint("fail to get %s appinfo %d", widget_id, ret); + else + pkgmgrinfo_appinfo_get_component_type(app_info, &app_type); + } - if (lazy_loader != NULL && strcmp(lazy_loader, "true") == 0) { - DbgPrint("Load a watch after some time later (%lf)\n", s_info.lazy_watch_time); - s_info.lazy_widget_loader = ecore_timer_add(s_info.lazy_watch_time, lazy_widget_loader_cb, widget_id); - if (!s_info.lazy_widget_loader) { - ErrPrint("Unable to fire the timer\n"); - lazy_widget_loader_cb(widget_id); - } - /** - * @note - * widget_id will be deleted from lazy_widget_loader_cb. or return value of ecore_timer_del(). - */ - } else { - DbgPrint("Immediately loads the watch[%s]\n", widget_id); - lazy_widget_loader_cb(widget_id); + if (app_type != NULL && strcmp(app_type, "watchapp") == 0) { + watch_manager_init(s_info.win); + evas_object_smart_callback_add(s_info.win, WATCH_SMART_SIGNAL_ADDED, __watch_added, NULL); + evas_object_smart_callback_add(s_info.win, WATCH_SMART_SIGNAL_REMOVED, __watch_removed, NULL); + + watch_manager_get_app_control(widget_id, &watch_control); + app_control_to_bundle(watch_control, &b); + app_control_to_bundle(service, &app_control_b); + bundle_get_str(app_control_b, AUL_K_SDK, &sdk_util); + + if (sdk_util != NULL) { + if (strcmp(sdk_util, SDK_VALGRIND) == 0) { + bundle_get_str(app_control_b, DLP_K_VALGRIND_PATH, &sdk_util_path); + bundle_get_str(app_control_b, DLP_K_VALGRIND_ARG, &sdk_util_arg); + bundle_add_str(b, AUL_K_SDK, SDK_VALGRIND); + if (sdk_util_path) + bundle_add_str(b, DLP_K_VALGRIND_PATH, sdk_util_path); + if (sdk_util_arg) + bundle_add_str(b, DLP_K_VALGRIND_ARG, sdk_util_arg); + } else if (strcmp(sdk_util, SDK_DEBUG) == 0) { + bundle_get_str(app_control_b, DLP_K_GDBSERVER_PATH, &sdk_util_path); + bundle_get_str(app_control_b, DLP_K_DEBUG_ARG, &sdk_util_arg); + bundle_add_str(b, AUL_K_SDK, SDK_DEBUG); + if (sdk_util_path) + bundle_add_str(b, DLP_K_GDBSERVER_PATH, sdk_util_path); + if (sdk_util_arg) + bundle_add_str(b, DLP_K_DEBUG_ARG, sdk_util_arg); } + DbgPrint("util %s arg %s path %s", sdk_util, sdk_util_arg, sdk_util_path); } - + appsvc_run_service(b, 0, NULL, NULL); + DbgPrint("appsvc_run_service returns [%d]", widget_id); + app_control_destroy(watch_control); } else { - /** - * @note - * Just raise up the window and notify to resumed state - */ - widget_viewer_evas_notify_resumed_status_of_viewer(); - elm_win_activate(s_info.win); + ret = app_control_get_extra_data(service, LAZY_LOADER, &lazy_loader); + app_control_to_bundle(service, &b); + widget_service_set_sdk_util(b); + ret = unload_widget(); + ret = app_control_is_extra_data_array(service, WIDGET_APPID, &is_array); + if (is_array) { + app_control_get_extra_data_array(service, WIDGET_APPID, &widget_id_arr, &array_len); + for (i = 0; i < array_len; ++i) + _run_widget(widget_id_arr[i], service, lazy_loader); + + } else if (widget_id != NULL) { + _run_widget(widget_id, service, lazy_loader); + } else { + widget_viewer_evas_notify_resumed_status_of_viewer(); + elm_win_activate(s_info.win); + } } } -- 2.7.4 From 8a50ec7e03ef3c599f0ac88396ff0f8f53d9da56 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Fri, 6 Jan 2017 19:17:22 +0900 Subject: [PATCH 06/16] Set the bundle data for watch app Change-Id: I6c61e4065e36db4904e1fedb81faa31571b3d58a Signed-off-by: Hwankyu Jhun --- widget_viewer_sdk/src/main.c | 90 ++++++++++++++++++++++++++++++-------------- 1 file changed, 62 insertions(+), 28 deletions(-) diff --git a/widget_viewer_sdk/src/main.c b/widget_viewer_sdk/src/main.c index cedae44..52dec5a 100644 --- a/widget_viewer_sdk/src/main.c +++ b/widget_viewer_sdk/src/main.c @@ -51,9 +51,7 @@ int errno; #endif #define DLP_K_DEBUG_ARG "__DLP_DEBUG_ARG__" -#define DLP_K_GDBSERVER_PATH "__DLP_GDBSERVER_PATH__" #define DLP_K_VALGRIND_ARG "__DLP_VALGRIND_ARG__" -#define DLP_K_VALGRIND_PATH "__DLP_VALGRIND_PATH__" #define SDK_DEBUG "DEBUG" #define SDK_VALGRIND "VALGRIND" #define LAZY_LOADER "__LAZY_LOADER__" @@ -718,6 +716,56 @@ static void _run_widget(char *widget_id, app_control_h service, char *lazy_loade } } +static void __set_bundle_for_watchapp(bundle *app_control_b, bundle *b) +{ + char *sdk_util = NULL; + char *sdk_util_arg = NULL; + char *value = NULL; + char buf[32]; + + bundle_get_str(app_control_b, AUL_K_DEBUG, &value); + if (value) { + bundle_add_str(b, AUL_K_DEBUG, value); + value = NULL; + } + + bundle_get_str(app_control_b, AUL_K_SEQ_NUM, &value); + if (value) { + bundle_add_str(b, AUL_K_SEQ_NUM, value); + value = NULL; + } + + bundle_get_str(app_control_b, AUL_K_WAIT_RESULT, &value); + if (value) { + bundle_add_str(b, AUL_K_WAIT_RESULT, value); + value = NULL; + } + + bundle_get_str(app_control_b, AUL_K_CALLER_PID, &value); + if (value) { + bundle_add_str(b, AUL_K_CALLER_PID, value); + value = NULL; + } else { + snprintf(buf, sizeof(buf), "%d", getpid()); + bundle_add_str(b, AUL_K_CALLER_PID, buf); + } + + bundle_get_str(app_control_b, AUL_K_SDK, &sdk_util); + if (sdk_util != NULL) { + bundle_add_str(b, AUL_K_SDK, sdk_util); + if (strcmp(sdk_util, SDK_VALGRIND) == 0) { + bundle_get_str(app_control_b, DLP_K_VALGRIND_ARG, &sdk_util_arg); + if (sdk_util_arg) + bundle_add_str(b, DLP_K_VALGRIND_ARG, sdk_util_arg); + } else if (strcmp(sdk_util, SDK_DEBUG) == 0) { + bundle_get_str(app_control_b, DLP_K_DEBUG_ARG, &sdk_util_arg); + if (sdk_util_arg) + bundle_add_str(b, DLP_K_DEBUG_ARG, sdk_util_arg); + } + DbgPrint("util %s arg %s", sdk_util, sdk_util_arg); + } +} + static void _app_control(app_control_h service, void *data) { char *widget_id = NULL; @@ -727,13 +775,11 @@ static void _app_control(app_control_h service, void *data) app_control_h watch_control = NULL; bundle *b; bundle *app_control_b; - char *sdk_util = NULL; - char *sdk_util_path = NULL; - char *sdk_util_arg = NULL; char *lazy_loader = NULL; bool is_array; int array_len; char **widget_id_arr; + char *operation = NULL; int i; app_control_get_extra_data(service, WIDGET_APPID, &widget_id); @@ -752,31 +798,19 @@ static void _app_control(app_control_h service, void *data) evas_object_smart_callback_add(s_info.win, WATCH_SMART_SIGNAL_REMOVED, __watch_removed, NULL); watch_manager_get_app_control(widget_id, &watch_control); + + app_control_get_operation(service, &operation); + if (operation) { + app_control_set_operation(watch_control, operation); + free(operation); + } + app_control_to_bundle(watch_control, &b); app_control_to_bundle(service, &app_control_b); - bundle_get_str(app_control_b, AUL_K_SDK, &sdk_util); - - if (sdk_util != NULL) { - if (strcmp(sdk_util, SDK_VALGRIND) == 0) { - bundle_get_str(app_control_b, DLP_K_VALGRIND_PATH, &sdk_util_path); - bundle_get_str(app_control_b, DLP_K_VALGRIND_ARG, &sdk_util_arg); - bundle_add_str(b, AUL_K_SDK, SDK_VALGRIND); - if (sdk_util_path) - bundle_add_str(b, DLP_K_VALGRIND_PATH, sdk_util_path); - if (sdk_util_arg) - bundle_add_str(b, DLP_K_VALGRIND_ARG, sdk_util_arg); - } else if (strcmp(sdk_util, SDK_DEBUG) == 0) { - bundle_get_str(app_control_b, DLP_K_GDBSERVER_PATH, &sdk_util_path); - bundle_get_str(app_control_b, DLP_K_DEBUG_ARG, &sdk_util_arg); - bundle_add_str(b, AUL_K_SDK, SDK_DEBUG); - if (sdk_util_path) - bundle_add_str(b, DLP_K_GDBSERVER_PATH, sdk_util_path); - if (sdk_util_arg) - bundle_add_str(b, DLP_K_DEBUG_ARG, sdk_util_arg); - } - DbgPrint("util %s arg %s path %s", sdk_util, sdk_util_arg, sdk_util_path); - } - appsvc_run_service(b, 0, NULL, NULL); + + __set_bundle_for_watchapp(app_control_b, b); + + aul_forward_app(widget_id, b); DbgPrint("appsvc_run_service returns [%d]", widget_id); app_control_destroy(watch_control); } else { -- 2.7.4 From ff0cfbf9e7df7f07653c7fd7a337bdc6a2f12a2d Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Mon, 9 Jan 2017 17:33:05 +0900 Subject: [PATCH 07/16] Remove compile warning messages Change-Id: Ie79b43620d5b53cd513563656024c74814a911ce Signed-off-by: Hwankyu Jhun --- widget_viewer_sdk/src/main.c | 101 +++++++++---------------------------------- 1 file changed, 20 insertions(+), 81 deletions(-) diff --git a/widget_viewer_sdk/src/main.c b/widget_viewer_sdk/src/main.c index 52dec5a..2602029 100644 --- a/widget_viewer_sdk/src/main.c +++ b/widget_viewer_sdk/src/main.c @@ -57,6 +57,7 @@ int errno; #define LAZY_LOADER "__LAZY_LOADER__" typedef struct _widget_info { + char *widget_id; char *content_info; char *title; double period; @@ -100,74 +101,6 @@ static struct info { #define LONG_PRESS 1.0f #define CONF_FNAME "/etc/widget_viewer_sdk.conf" -static const char *__to_appid(const char *widget_id) -{ - const char *appid; - - appid = g_strstr_len(widget_id, strlen(widget_id), "@"); - if (appid != NULL) { - if (strlen(appid) == 1) - return widget_id; - - /* skip @ */ - appid++; - } else { - appid = (char *)widget_id; - } - return appid; -} - -static void watch_category_handler(char *buffer) -{ - char *old_category; - - old_category = s_info.watch_category; - - s_info.watch_category = strdup(buffer); - if (!s_info.watch_category) { - ErrPrint("strdup: %d\n", errno); - s_info.watch_category = old_category; - } else if ((long)old_category != (long)WATCH_CATEGORY) { /** Forcely compare the address */ - free(old_category); - } - - DbgPrint("Watch category: [%s]\n", s_info.watch_category); -} - -static void default_watch_handler(char *buffer) -{ - char *old_watch; - - old_watch = s_info.default_watch; - - s_info.default_watch = strdup(buffer); - if (!s_info.default_watch) { - ErrPrint("strdup: %d\n", errno); - s_info.default_watch = old_watch; - } else if ((long)old_watch != (long)DEFAULT_WATCH) { /** Forcely compare the address */ - free(old_watch); - } - - DbgPrint("Default watch: [%s]\n", s_info.default_watch); -} - -static void lazy_load_time_handler(char *buffer) -{ - double val; - if (sscanf(buffer, "%lf", &val) != 1) { - ErrPrint("Unable to parse data: [%s]\n", buffer); - return; - } - - if (val < 0.0f) { - ErrPrint("Invalid value: %lf\n", val); - val = LAZY_WATCH_TIME; - } - - s_info.lazy_watch_time = val; - DbgPrint("Lazy watch time: %lf\n", s_info.lazy_watch_time); -} - static void back_key_cb(void *data, Evas_Object *obj, void *event_info) { ui_app_exit(); @@ -265,7 +198,7 @@ static Eina_Bool show_widget_info_cb(void *data) if (info->count_of_size_type <= 1) { elm_object_signal_emit(s_info.layout, "hide", "size,list"); - return WIDGET_ERROR_NONE; + return ECORE_CALLBACK_CANCEL; } else { elm_object_signal_emit(s_info.layout, "show", "size,list"); } @@ -277,7 +210,7 @@ static Eina_Bool show_widget_info_cb(void *data) size_list = elm_genlist_add(s_info.win); if (!size_list) { ErrPrint("Failed to create a genlist\n"); - return WIDGET_ERROR_FAULT; + return ECORE_CALLBACK_RENEW; } elm_object_part_content_set(s_info.layout, "widget,size,list", size_list); @@ -428,7 +361,7 @@ static bool app_create(void *data) return true; } -static void free_widget_info(gpointer data, gpointer user_data) +static void free_widget_info(gpointer data) { const char *tmp; widget_info *info = (widget_info *)data; @@ -448,6 +381,8 @@ static void free_widget_info(gpointer data, gpointer user_data) free(info->content_info); if (info->size_types) free(info->size_types); + if (info->widget_id) + free(info->widget_id); info->widget = NULL; info->widget_layout = NULL; @@ -653,7 +588,7 @@ static int prepare_widget(const char *widget_id, app_control_h control, widget_i int len; if (bundle_encode(b, &r, &len) == BUNDLE_ERROR_NONE) { - info->content_info = strdup(r); + info->content_info = strdup((const char *)r); if (!info->content_info) { ErrPrint("strdup: %d\n", errno); } else { @@ -677,18 +612,22 @@ static int prepare_widget(const char *widget_id, app_control_h control, widget_i return ret; } -static Eina_Bool lazy_widget_loader_cb(void *widget_id, widget_info *info) +static Eina_Bool lazy_widget_loader_cb(void *data) { - DbgPrint("Lazy loader expired. load widget [%s]\n", widget_id); - (void)load_widget(widget_id, info); - free(widget_id); + widget_info *info = (widget_info *)data; + + DbgPrint("Lazy loader expired. load widget [%s]\n", info->widget_id); + (void)load_widget(info->widget_id, info); s_info.lazy_widget_loader = NULL; + return ECORE_CALLBACK_CANCEL; } static void _run_widget(char *widget_id, app_control_h service, char *lazy_loader) { widget_info *info = (widget_info *)calloc(1, sizeof(widget_info)); + + info->widget_id = strdup(widget_id); info->period = WIDGET_VIEWER_EVAS_DEFAULT_PERIOD; info->count_of_size_type = 20; @@ -701,10 +640,10 @@ static void _run_widget(char *widget_id, app_control_h service, char *lazy_loade if (lazy_loader != NULL && strcmp(lazy_loader, "true") == 0) { DbgPrint("Load a watch after some time later (%lf)\n", s_info.lazy_watch_time); - s_info.lazy_widget_loader = ecore_timer_add(s_info.lazy_watch_time, lazy_widget_loader_cb, widget_id); + s_info.lazy_widget_loader = ecore_timer_add(s_info.lazy_watch_time, lazy_widget_loader_cb, info); if (!s_info.lazy_widget_loader) { ErrPrint("Unable to fire the timer\n"); - lazy_widget_loader_cb(widget_id, info); + lazy_widget_loader_cb(info); } /** * @note @@ -712,7 +651,7 @@ static void _run_widget(char *widget_id, app_control_h service, char *lazy_loade */ } else { DbgPrint("Immediately loads the watch[%s]\n", widget_id); - lazy_widget_loader_cb(widget_id, info); + lazy_widget_loader_cb(info); } } @@ -810,8 +749,8 @@ static void _app_control(app_control_h service, void *data) __set_bundle_for_watchapp(app_control_b, b); - aul_forward_app(widget_id, b); - DbgPrint("appsvc_run_service returns [%d]", widget_id); + ret = aul_forward_app(widget_id, b); + DbgPrint("aul_forward_app returns [%d]", ret); app_control_destroy(watch_control); } else { ret = app_control_get_extra_data(service, LAZY_LOADER, &lazy_loader); -- 2.7.4 From 549ffaa39c844bc00d45d80fa499920a8e1c57eb Mon Sep 17 00:00:00 2001 From: "taeyoon0.lee" Date: Wed, 25 Jan 2017 19:25:33 +0900 Subject: [PATCH 08/16] Modified relation between preview and loading-text for disable mode Change-Id: I955a3d7546754b968119417e2c79082bd94d2e85 --- .../internal/widget_view/widget_view_impl.cpp | 25 ++++++++++++++-------- .../internal/widget_view/widget_view_impl.h | 2 ++ 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp b/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp index 6013c30..f20b65a 100644 --- a/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp +++ b/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp @@ -734,31 +734,38 @@ void WidgetView::OnInitialize() DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::OnInitialize: preview image path = %s\n", previewImage.c_str() ); - mPreviewImage = Toolkit::ImageView::New( previewImage ); + mPreviewActor = Dali::Actor::New(); + mPreviewActor.SetParentOrigin( ParentOrigin::CENTER ); + mPreviewActor.SetAnchorPoint( AnchorPoint::CENTER ); + mPreviewActor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); + + mPreviewImage = Toolkit::ImageView::New( previewImage ); mPreviewImage.SetParentOrigin( ParentOrigin::CENTER ); mPreviewImage.SetAnchorPoint( AnchorPoint::CENTER ); - - if( !previewPath ) - { - mPreviewImage.SetSize( mWidth, mHeight ); - } + mPreviewImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); Self().SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); Self().SetSize( mWidth, mHeight ); - Self().Add( mPreviewImage ); + Self().Add( mPreviewActor ); + mPreviewActor.Add( mPreviewImage ); + + mStateTextActor = Dali::Actor::New(); + mStateTextActor.SetParentOrigin( ParentOrigin::CENTER ); + mStateTextActor.SetAnchorPoint( AnchorPoint::CENTER ); + mStateTextActor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); // State text // TODO: use po files mStateText = Toolkit::TextLabel::New( "Loading..." ); - mStateText.SetParentOrigin( ParentOrigin::CENTER ); mStateText.SetAnchorPoint( AnchorPoint::CENTER ); mStateText.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); mStateText.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); - mPreviewImage.Add( mStateText ); + mPreviewActor.Add( mStateTextActor ); + mStateTextActor.Add( mStateText ); // launch widget mPid = widget_instance_launch( instanceId, (char *)mContentInfo.c_str(), mWidth, mHeight ); diff --git a/widget_viewer_dali/internal/widget_view/widget_view_impl.h b/widget_viewer_dali/internal/widget_view/widget_view_impl.h index a9eaf7c..7f1eccd 100644 --- a/widget_viewer_dali/internal/widget_view/widget_view_impl.h +++ b/widget_viewer_dali/internal/widget_view/widget_view_impl.h @@ -242,6 +242,8 @@ private: Toolkit::ImageView mWidgetImageView; ///< Widget content Toolkit::ImageView mPreviewImage; ///< Preview image Toolkit::TextLabel mStateText; ///< State text + Dali::Actor mPreviewActor; + Dali::Actor mStateTextActor; Dali::NativeImageSourcePtr mImageSource; std::string mWidgetId; -- 2.7.4 From 97d7284219588a0ac1c10687e28a19f79452b970 Mon Sep 17 00:00:00 2001 From: taeyoon Date: Tue, 20 Dec 2016 20:31:48 +0900 Subject: [PATCH 09/16] Added property map for loading text and changed default color and style Added property map for changing loading text size, font style and color Changed text color, and font style Change-Id: Ib7bbb2890daf0c931f91e8a8441fd3382eec5c5c --- .../internal/widget_view/widget_view_impl.cpp | 43 ++++++++++++++++++++++ .../internal/widget_view/widget_view_impl.h | 2 + 2 files changed, 45 insertions(+) diff --git a/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp b/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp index 6013c30..2fefd16 100644 --- a/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp +++ b/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp @@ -91,6 +91,10 @@ DALI_TYPE_REGISTRATION_END() struct wl_buffer* preBuffer; +const char* const FONT_STYLE( "fontStyle" ); +const char* const TEXT_POINT_SIZE( "textPointSize" ); +const char* const TEXT_COLOR( "textColor" ); + static void OnBufferChanged( struct tizen_remote_surface *surface, uint32_t type, struct wl_buffer *buffer, int32_t img_file_fd, uint32_t img_file_size, uint32_t time, struct wl_array *keys, void *data) { @@ -577,6 +581,7 @@ void WidgetView::SetProperty( BaseObject* object, Property::Index index, const P case Dali::WidgetView::WidgetView::Property::PREVIEW: { bool previewEnabled; + if( value.Get( previewEnabled ) ) { impl.ShowPreview( previewEnabled ); @@ -586,10 +591,16 @@ void WidgetView::SetProperty( BaseObject* object, Property::Index index, const P case Dali::WidgetView::WidgetView::Property::LOADING_TEXT: { bool textEnabled; + Property::Map map; + if( value.Get( textEnabled ) ) { impl.ShowStateText( textEnabled ); } + else if( value.Get( map ) ) + { + impl.SetLoadingTextPropertyMap( map ); + } break; } case Dali::WidgetView::WidgetView::Property::PERMANENT_DELETE: @@ -757,6 +768,8 @@ void WidgetView::OnInitialize() mStateText.SetAnchorPoint( AnchorPoint::CENTER ); mStateText.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); mStateText.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); + mStateText.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Dali::Color::WHITE ); + mStateText.SetProperty( Toolkit::TextLabel::Property::FONT_STYLE, "Bold" ); mPreviewImage.Add( mStateText ); @@ -946,6 +959,36 @@ void WidgetView::CloseRemoteSurface() mRemoteSurface = NULL; } +void WidgetView::SetLoadingTextPropertyMap( Property::Map map ) +{ + if( mStateText ) + { + Property::Value* fontStyle = map.Find( FONT_STYLE ); + std::string style; + + if( fontStyle && fontStyle->Get( style ) ) + { + mStateText.SetProperty( Toolkit::TextLabel::Property::FONT_STYLE, style ); + } + + Property::Value* textPointSize = map.Find( TEXT_POINT_SIZE ); + float size = 0.f; + + if( textPointSize && textPointSize->Get( size ) ) + { + mStateText.SetProperty( Toolkit::TextLabel::Property::POINT_SIZE, size ); + } + + Property::Value* textColor = map.Find( TEXT_COLOR ); + Vector4 color; + + if( textColor && textColor->Get( color ) ) + { + mStateText.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, color ); + } + } +} + } // namespace Internal } // namespace WidgetView diff --git a/widget_viewer_dali/internal/widget_view/widget_view_impl.h b/widget_viewer_dali/internal/widget_view/widget_view_impl.h index a9eaf7c..b45ffb3 100644 --- a/widget_viewer_dali/internal/widget_view/widget_view_impl.h +++ b/widget_viewer_dali/internal/widget_view/widget_view_impl.h @@ -143,6 +143,8 @@ public: // Internal API void CloseRemoteSurface(); + void SetLoadingTextPropertyMap( Dali::Property::Map map ); + public: //Signals /** -- 2.7.4 From 27c6c724b4a66ce90bc789de50560273d2161ae3 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Wed, 1 Feb 2017 14:15:47 +0900 Subject: [PATCH 10/16] Fix bug about launching the watch app Setting the caller uid is needed for using the aul_forward_app() API. Change-Id: I0835f6e26d8e52c3163e3106084b2b1af05c1ba1 Signed-off-by: Hwankyu Jhun --- widget_viewer_sdk/src/main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/widget_viewer_sdk/src/main.c b/widget_viewer_sdk/src/main.c index 2602029..d46cd85 100644 --- a/widget_viewer_sdk/src/main.c +++ b/widget_viewer_sdk/src/main.c @@ -689,6 +689,15 @@ static void __set_bundle_for_watchapp(bundle *app_control_b, bundle *b) bundle_add_str(b, AUL_K_CALLER_PID, buf); } + bundle_get_str(app_control_b, AUL_K_CALLER_UID, &value); + if (value) { + bundle_add_str(b, AUL_K_CALLER_UID, value); + value = NULL; + } else { + snprintf(buf, sizeof(buf), "%d", getuid()); + bundle_add_str(b, AUL_K_CALLER_UID, buf); + } + bundle_get_str(app_control_b, AUL_K_SDK, &sdk_util); if (sdk_util != NULL) { bundle_add_str(b, AUL_K_SDK, sdk_util); -- 2.7.4 From 551f927983f2183f0d3e6932d0c9e1a53542c81d Mon Sep 17 00:00:00 2001 From: taeyoon Date: Wed, 4 Jan 2017 17:11:57 +0900 Subject: [PATCH 11/16] Added internal api for emitting delete signal When missing cb is called, emit delete signal Change-Id: Id2ae2903ac716dac1ee11b4024ff49639e61ce19 --- .../internal/widget_view/widget_view_impl.cpp | 18 ++++-------------- .../internal/widget_view/widget_view_impl.h | 3 +-- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp b/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp index 73df20f..8e2b475 100644 --- a/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp +++ b/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp @@ -159,6 +159,7 @@ static void OnSurfaceMissing( struct tizen_remote_surface* surface, void* data ) if( widgetView ) { widgetView->CloseRemoteSurface(); + widgetView->RemoveWidgetImage(); } } @@ -433,29 +434,18 @@ void WidgetView::CreateWidgetImageView() Dali::WidgetView::WidgetView handle( GetOwner() ); mWidgetAddedSignal.Emit( handle ); - DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::AddObjectView: ObjectView is added.\n" ); + DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::CreateWidgetImageView: Widget image is added.\n" ); } -void WidgetView::RemoveObjectView() +void WidgetView::RemoveWidgetImage() { - // Enable preview and text - if( mPreviewVisible ) - { - mPreviewImage.SetVisible( true ); - } - - if( mStateTextVisible ) - { - mStateText.SetVisible( true ); - } - // Emit signal Dali::WidgetView::WidgetView handle( GetOwner() ); mWidgetDeletedSignal.Emit( handle ); mWidgetImageView.Reset(); - DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::RemoveObjectView: ObjectView is removed.\n" ); + DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::RemoveWidgetImage: Widget image is removed.\n" ); } void WidgetView::SendWidgetEvent( int event ) diff --git a/widget_viewer_dali/internal/widget_view/widget_view_impl.h b/widget_viewer_dali/internal/widget_view/widget_view_impl.h index 9f0e970..9a74847 100644 --- a/widget_viewer_dali/internal/widget_view/widget_view_impl.h +++ b/widget_viewer_dali/internal/widget_view/widget_view_impl.h @@ -124,8 +124,7 @@ public: // Internal API void SetPermanentDelete( bool permanentDelete ); -// ToDo: This funstion will be used for widgetDeletedSignal - void RemoveObjectView(); + void RemoveWidgetImage(); bool IsPermanentDelete(); -- 2.7.4 From 2b526e4b6c67e48d6c9314b388c0e79686b96f98 Mon Sep 17 00:00:00 2001 From: "taeyoon0.lee" Date: Thu, 2 Feb 2017 17:04:35 +0900 Subject: [PATCH 12/16] Added state message - Cases for aborted widget creation or deletion Change-Id: If371f9fd16e91b05c90f05f275ae5d5bed650a85 --- .../internal/widget_view/widget_view_impl.cpp | 103 ++++++++++++++------- .../internal/widget_view/widget_view_impl.h | 13 ++- 2 files changed, 77 insertions(+), 39 deletions(-) diff --git a/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp b/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp index 8e2b475..4aaddca 100644 --- a/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp +++ b/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp @@ -50,6 +50,9 @@ namespace Internal namespace { +const char* const STATE_MESSAGE_LOADING = "loading"; +const char* const STATE_MESSAGE_RETRY = "Unable to load data. Tap to retry"; + #define WIDGET_VIEW_RESOURCE_DEFAULT_IMG "/widget_viewer_dali/images/unknown.png" #if defined(DEBUG_ENABLED) @@ -191,7 +194,8 @@ WidgetView::WidgetView() mPid( 0 ), mUpdatePeriod( 0.0 ), mPreviewVisible( true ), - mStateTextVisible( true ), + mLoadingTextVisible( true ), + mTapTextVisible( true ), mPermanentDelete( false ), mWatcherHandle( NULL ), mRemoteSurface( NULL ) @@ -209,7 +213,8 @@ WidgetView::WidgetView( const std::string& widgetId, const std::string& contentI mPid( 0 ), mUpdatePeriod( updatePeriod ), mPreviewVisible( true ), - mStateTextVisible( true ), + mLoadingTextVisible( true ), + mTapTextVisible( true ), mPermanentDelete( false ), mWatcherHandle( NULL ), mRemoteSurface( NULL ) @@ -327,12 +332,12 @@ bool WidgetView::CancelTouchEvent() return false; } -void WidgetView::ShowPreview( bool show ) +void WidgetView::SetPreviewVisible( bool visible ) { - if( mPreviewImage && show != mPreviewVisible ) + if( mPreviewImage && mPreviewVisible != visible ) { - mPreviewVisible = show; - mPreviewImage.SetVisible( show ); + mPreviewVisible = visible; + mPreviewImage.SetVisible( visible ); } } @@ -341,34 +346,32 @@ bool WidgetView::IsPreviewVisible() return mPreviewVisible; } -void WidgetView::ShowStateText( bool show ) +void WidgetView::SetLoadingTextVisible( bool visible ) { - if( mStateText && mStateTextVisible != show ) + if( mStateText && mLoadingTextVisible != visible ) { - mStateTextVisible = show; - mStateText.SetVisible( show ); + mLoadingTextVisible = visible; + + if( visible ) + { + mStateText.SetProperty( Toolkit::TextLabel::Property::TEXT, STATE_MESSAGE_LOADING ); + } + mStateText.SetVisible( visible ); } } -bool WidgetView::IsStateTextVisible() +bool WidgetView::IsLoadingTextVisible() { - return mStateTextVisible; + return mLoadingTextVisible; } void WidgetView::ActivateFaultedWidget() { if( mPid < 0 ) { - // Esable preview and text - if( mPreviewVisible ) - { - mPreviewImage.SetVisible( true ); - } - - if( mStateTextVisible ) - { - mStateText.SetVisible( true ); - } + // Enable preview and loading text + ShowTapWidgetState( false ); + ShowLoadingState( true ); // launch widget again mPid = widget_instance_launch( mInstanceId.c_str(), (char *)mContentInfo.c_str(), mWidth, mHeight ); @@ -376,10 +379,14 @@ void WidgetView::ActivateFaultedWidget() { DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::ActivateFaultedWidget: widget_instance_launch is failed. [%s]\n", mWidgetId.c_str() ); + ShowLoadingState( false ); + ShowTapWidgetState( true ); + // Emit signal Dali::WidgetView::WidgetView handle( GetOwner() ); mWidgetCreationAbortedSignal.Emit( handle ); + return; } @@ -420,15 +427,7 @@ void WidgetView::CreateWidgetImageView() mWidgetImageView.SetProperty( Toolkit::ImageView::Property::PRE_MULTIPLIED_ALPHA, true ); // Disable preview and text - if( mPreviewVisible ) - { - mPreviewImage.SetVisible( false ); - } - - if( mStateTextVisible ) - { - mStateText.SetVisible( false ); - } + ShowLoadingState( false ); // Emit signal Dali::WidgetView::WidgetView handle( GetOwner() ); @@ -439,10 +438,13 @@ void WidgetView::CreateWidgetImageView() void WidgetView::RemoveWidgetImage() { + ShowTapWidgetState( true ); + // Emit signal Dali::WidgetView::WidgetView handle( GetOwner() ); mWidgetDeletedSignal.Emit( handle ); + mWidgetImageView.SetVisible( false ); mWidgetImageView.Reset(); DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::RemoveWidgetImage: Widget image is removed.\n" ); @@ -574,7 +576,7 @@ void WidgetView::SetProperty( BaseObject* object, Property::Index index, const P if( value.Get( previewEnabled ) ) { - impl.ShowPreview( previewEnabled ); + impl.SetPreviewVisible( previewEnabled ); } break; } @@ -585,7 +587,7 @@ void WidgetView::SetProperty( BaseObject* object, Property::Index index, const P if( value.Get( textEnabled ) ) { - impl.ShowStateText( textEnabled ); + impl.SetLoadingTextVisible( textEnabled ); } else if( value.Get( map ) ) { @@ -649,7 +651,7 @@ Property::Value WidgetView::GetProperty( BaseObject* object, Property::Index ind } case Dali::WidgetView::WidgetView::Property::LOADING_TEXT: { - value = impl.IsStateTextVisible(); + value = impl.IsLoadingTextVisible(); break; } case Dali::WidgetView::WidgetView::Property::WIDGET_STATE_FAULTED: @@ -759,7 +761,7 @@ void WidgetView::OnInitialize() // State text // TODO: use po files - mStateText = Toolkit::TextLabel::New( "Loading..." ); + mStateText = Toolkit::TextLabel::New( STATE_MESSAGE_LOADING ); mStateText.SetParentOrigin( ParentOrigin::CENTER ); mStateText.SetAnchorPoint( AnchorPoint::CENTER ); mStateText.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); @@ -774,6 +776,9 @@ void WidgetView::OnInitialize() mPid = widget_instance_launch( instanceId, (char *)mContentInfo.c_str(), mWidth, mHeight ); if( mPid < 0) { + + ShowTapWidgetState( true ); + DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::OnInitialize: widget_instance_launch is failed. [%s]\n", mWidgetId.c_str() ); // Emit signal @@ -956,6 +961,34 @@ void WidgetView::CloseRemoteSurface() mRemoteSurface = NULL; } +void WidgetView::ShowLoadingState( bool show ) +{ + if( mPreviewImage && mPreviewVisible ) + { + mPreviewImage.SetVisible( show ); + } + + if( mStateText && mLoadingTextVisible ) + { + mStateText.SetProperty( Toolkit::TextLabel::Property::TEXT, STATE_MESSAGE_LOADING ); + mStateText.SetVisible( show ); + } +} + +void WidgetView::ShowTapWidgetState( bool show ) +{ + if( mPreviewImage && mPreviewVisible ) + { + mPreviewImage.SetVisible( false ); + } + + if( mStateText && mTapTextVisible ) + { + mStateText.SetProperty( Toolkit::TextLabel::Property::TEXT, STATE_MESSAGE_RETRY ); + mStateText.SetVisible( show ); + } +} + void WidgetView::SetLoadingTextPropertyMap( Property::Map map ) { if( mStateText ) diff --git a/widget_viewer_dali/internal/widget_view/widget_view_impl.h b/widget_viewer_dali/internal/widget_view/widget_view_impl.h index 9a74847..a23732b 100644 --- a/widget_viewer_dali/internal/widget_view/widget_view_impl.h +++ b/widget_viewer_dali/internal/widget_view/widget_view_impl.h @@ -112,13 +112,13 @@ public: // Internal API float GetUpdatePeriod() const; - void ShowPreview( bool show ); + void SetPreviewVisible( bool visible ); bool IsPreviewVisible(); - void ShowStateText( bool show ); + void SetLoadingTextVisible( bool visible ); - bool IsStateTextVisible(); + bool IsLoadingTextVisible(); bool IsWidgetFaulted(); @@ -144,6 +144,10 @@ public: // Internal API void SetLoadingTextPropertyMap( Dali::Property::Map map ); + void ShowLoadingState( bool show ); + + void ShowTapWidgetState( bool show ); + public: //Signals /** @@ -258,7 +262,8 @@ private: float mUpdatePeriod; bool mPreviewVisible; - bool mStateTextVisible; + bool mLoadingTextVisible; + bool mTapTextVisible; bool mPermanentDelete; screen_connector_watcher_h mWatcherHandle; tizen_remote_surface* mRemoteSurface; -- 2.7.4 From bd87a5ab9bc8ac822171701a5052de6b1fdfcfce Mon Sep 17 00:00:00 2001 From: "taeyoon0.lee" Date: Wed, 25 Jan 2017 16:42:22 +0900 Subject: [PATCH 13/16] Added po files and codes for language change - Supported language change for messages Change-Id: Ib935b088779217c7c20300a8fcce1d68829d7ec1 --- packaging/libwidget_viewer.spec | 1 + widget_viewer_dali/CMakeLists.txt | 6 +- .../internal/widget_view/widget_view_impl.cpp | 13 ++-- .../widget_view_manager_impl.cpp | 6 ++ widget_viewer_dali/po/CMakeLists.txt | 77 ++++++++++++++++++++++ widget_viewer_dali/po/ar.po | 9 +++ widget_viewer_dali/po/as.po | 9 +++ widget_viewer_dali/po/az.po | 9 +++ widget_viewer_dali/po/be_BY.po | 9 +++ widget_viewer_dali/po/bn.po | 9 +++ widget_viewer_dali/po/bn_BD.po | 9 +++ widget_viewer_dali/po/de.po | 9 +++ widget_viewer_dali/po/en.po | 9 +++ widget_viewer_dali/po/en_PH.po | 9 +++ widget_viewer_dali/po/en_US.po | 9 +++ widget_viewer_dali/po/es_ES.po | 9 +++ widget_viewer_dali/po/es_US.po | 9 +++ widget_viewer_dali/po/fa.po | 9 +++ widget_viewer_dali/po/fr.po | 9 +++ widget_viewer_dali/po/gu.po | 9 +++ widget_viewer_dali/po/hi.po | 9 +++ widget_viewer_dali/po/hy.po | 9 +++ widget_viewer_dali/po/id.po | 9 +++ widget_viewer_dali/po/it_IT.po | 9 +++ widget_viewer_dali/po/jv.po | 9 +++ widget_viewer_dali/po/ka.po | 9 +++ widget_viewer_dali/po/kk.po | 9 +++ widget_viewer_dali/po/km.po | 9 +++ widget_viewer_dali/po/kn.po | 9 +++ widget_viewer_dali/po/ko_KR.po | 9 +++ widget_viewer_dali/po/ky_KG.po | 9 +++ widget_viewer_dali/po/lo.po | 9 +++ widget_viewer_dali/po/ml.po | 9 +++ widget_viewer_dali/po/mn_MN.po | 9 +++ widget_viewer_dali/po/mr.po | 9 +++ widget_viewer_dali/po/ms.po | 9 +++ widget_viewer_dali/po/my_ZG.po | 9 +++ widget_viewer_dali/po/ne.po | 9 +++ widget_viewer_dali/po/or.po | 9 +++ widget_viewer_dali/po/pa.po | 9 +++ widget_viewer_dali/po/pt_BR.po | 9 +++ widget_viewer_dali/po/pt_PT.po | 9 +++ widget_viewer_dali/po/ru_RU.po | 9 +++ widget_viewer_dali/po/si.po | 9 +++ widget_viewer_dali/po/su_ID.po | 9 +++ widget_viewer_dali/po/ta.po | 9 +++ widget_viewer_dali/po/te.po | 9 +++ widget_viewer_dali/po/tg_TJ.po | 9 +++ widget_viewer_dali/po/th.po | 9 +++ widget_viewer_dali/po/tk_TM.po | 9 +++ widget_viewer_dali/po/tl.po | 9 +++ widget_viewer_dali/po/tr_TR.po | 9 +++ widget_viewer_dali/po/uk.po | 9 +++ widget_viewer_dali/po/ur.po | 9 +++ widget_viewer_dali/po/uz.po | 9 +++ widget_viewer_dali/po/vi.po | 9 +++ widget_viewer_dali/po/xh.po | 9 +++ widget_viewer_dali/po/zh_CN.po | 9 +++ widget_viewer_dali/po/zu.po | 9 +++ 59 files changed, 581 insertions(+), 8 deletions(-) create mode 100644 widget_viewer_dali/po/CMakeLists.txt create mode 100755 widget_viewer_dali/po/ar.po create mode 100755 widget_viewer_dali/po/as.po create mode 100755 widget_viewer_dali/po/az.po create mode 100755 widget_viewer_dali/po/be_BY.po create mode 100755 widget_viewer_dali/po/bn.po create mode 100755 widget_viewer_dali/po/bn_BD.po create mode 100755 widget_viewer_dali/po/de.po create mode 100755 widget_viewer_dali/po/en.po create mode 100755 widget_viewer_dali/po/en_PH.po create mode 100755 widget_viewer_dali/po/en_US.po create mode 100755 widget_viewer_dali/po/es_ES.po create mode 100755 widget_viewer_dali/po/es_US.po create mode 100755 widget_viewer_dali/po/fa.po create mode 100755 widget_viewer_dali/po/fr.po create mode 100755 widget_viewer_dali/po/gu.po create mode 100755 widget_viewer_dali/po/hi.po create mode 100755 widget_viewer_dali/po/hy.po create mode 100755 widget_viewer_dali/po/id.po create mode 100755 widget_viewer_dali/po/it_IT.po create mode 100755 widget_viewer_dali/po/jv.po create mode 100755 widget_viewer_dali/po/ka.po create mode 100755 widget_viewer_dali/po/kk.po create mode 100755 widget_viewer_dali/po/km.po create mode 100755 widget_viewer_dali/po/kn.po create mode 100755 widget_viewer_dali/po/ko_KR.po create mode 100755 widget_viewer_dali/po/ky_KG.po create mode 100755 widget_viewer_dali/po/lo.po create mode 100755 widget_viewer_dali/po/ml.po create mode 100755 widget_viewer_dali/po/mn_MN.po create mode 100755 widget_viewer_dali/po/mr.po create mode 100755 widget_viewer_dali/po/ms.po create mode 100755 widget_viewer_dali/po/my_ZG.po create mode 100755 widget_viewer_dali/po/ne.po create mode 100755 widget_viewer_dali/po/or.po create mode 100755 widget_viewer_dali/po/pa.po create mode 100755 widget_viewer_dali/po/pt_BR.po create mode 100755 widget_viewer_dali/po/pt_PT.po create mode 100755 widget_viewer_dali/po/ru_RU.po create mode 100755 widget_viewer_dali/po/si.po create mode 100755 widget_viewer_dali/po/su_ID.po create mode 100755 widget_viewer_dali/po/ta.po create mode 100755 widget_viewer_dali/po/te.po create mode 100755 widget_viewer_dali/po/tg_TJ.po create mode 100755 widget_viewer_dali/po/th.po create mode 100755 widget_viewer_dali/po/tk_TM.po create mode 100755 widget_viewer_dali/po/tl.po create mode 100755 widget_viewer_dali/po/tr_TR.po create mode 100755 widget_viewer_dali/po/uk.po create mode 100755 widget_viewer_dali/po/ur.po create mode 100755 widget_viewer_dali/po/uz.po create mode 100755 widget_viewer_dali/po/vi.po create mode 100755 widget_viewer_dali/po/xh.po create mode 100755 widget_viewer_dali/po/zh_CN.po create mode 100755 widget_viewer_dali/po/zu.po diff --git a/packaging/libwidget_viewer.spec b/packaging/libwidget_viewer.spec index a0f5fe3..7a4f1c3 100644 --- a/packaging/libwidget_viewer.spec +++ b/packaging/libwidget_viewer.spec @@ -172,6 +172,7 @@ Header & package configuration of watch-control %attr(0644,root,root) %{_libdir}/%{name}_dali.so* %{_datarootdir}/license/%{name}_dali /usr/share/widget_viewer_dali/images/*.png +/usr/share/widget_viewer_dali/locale/*/LC_MESSAGES/* %files -n %{name}_dali-devel %{_includedir}/widget_viewer_dali/widget_viewer_dali.h diff --git a/widget_viewer_dali/CMakeLists.txt b/widget_viewer_dali/CMakeLists.txt index 82ea842..c0f10a4 100644 --- a/widget_viewer_dali/CMakeLists.txt +++ b/widget_viewer_dali/CMakeLists.txt @@ -9,6 +9,9 @@ SET(INCLUDEDIR "\${prefix}/include/${PROJECT_NAME}") SET(VERSION_MAJOR 1) SET(VERSION "${VERSION_MAJOR}.0.0") +SET(IMAGE_DIR "${TZ_SYS_SHARE}/${PROJECT_NAME}/images") +SET(LOCALE_DIR "${TZ_SYS_SHARE}/${PROJECT_NAME}/locale") + INCLUDE(FindPkgConfig) pkg_check_modules(viewer_dali REQUIRED dlog @@ -41,8 +44,8 @@ SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") SET(CMAKE_C_FLAGS_RELEASE "-O2") SET(LOCAL_PUBLIC_HEADER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/public_api) -SET(IMAGE_DIR "${TZ_SYS_SHARE}/${PROJECT_NAME}/images") +ADD_DEFINITIONS("-DWIDGET_VIEWER_DALI_LOCALE=\"${LOCALE_DIR}\"") ADD_DEFINITIONS("-DPKGNAME=\"${PROJECT_NAME}\"") INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) @@ -73,3 +76,4 @@ ENDFOREACH(flag) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION /usr/share/license RENAME "lib${PROJECT_NAME}") INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/images/unknown.png DESTINATION ${IMAGE_DIR}) +ADD_SUBDIRECTORY(po) diff --git a/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp b/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp index 4aaddca..5f2c594 100644 --- a/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp +++ b/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp @@ -37,6 +37,7 @@ #include #include #include +#include namespace Dali { @@ -50,8 +51,7 @@ namespace Internal namespace { -const char* const STATE_MESSAGE_LOADING = "loading"; -const char* const STATE_MESSAGE_RETRY = "Unable to load data. Tap to retry"; +#define GET_LOCALE_TEXT(string) dgettext(PKGNAME, string) #define WIDGET_VIEW_RESOURCE_DEFAULT_IMG "/widget_viewer_dali/images/unknown.png" @@ -354,7 +354,7 @@ void WidgetView::SetLoadingTextVisible( bool visible ) if( visible ) { - mStateText.SetProperty( Toolkit::TextLabel::Property::TEXT, STATE_MESSAGE_LOADING ); + mStateText.SetProperty( Toolkit::TextLabel::Property::TEXT, GET_LOCALE_TEXT( "IDS_ST_POP_LOADING_ING" ) ); } mStateText.SetVisible( visible ); } @@ -760,8 +760,7 @@ void WidgetView::OnInitialize() mStateTextActor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); // State text - // TODO: use po files - mStateText = Toolkit::TextLabel::New( STATE_MESSAGE_LOADING ); + mStateText = Toolkit::TextLabel::New( GET_LOCALE_TEXT( "IDS_ST_POP_LOADING_ING" ) ); mStateText.SetParentOrigin( ParentOrigin::CENTER ); mStateText.SetAnchorPoint( AnchorPoint::CENTER ); mStateText.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); @@ -970,7 +969,7 @@ void WidgetView::ShowLoadingState( bool show ) if( mStateText && mLoadingTextVisible ) { - mStateText.SetProperty( Toolkit::TextLabel::Property::TEXT, STATE_MESSAGE_LOADING ); + mStateText.SetProperty( Toolkit::TextLabel::Property::TEXT, GET_LOCALE_TEXT( "IDS_ST_POP_LOADING_ING" ) ); mStateText.SetVisible( show ); } } @@ -984,7 +983,7 @@ void WidgetView::ShowTapWidgetState( bool show ) if( mStateText && mTapTextVisible ) { - mStateText.SetProperty( Toolkit::TextLabel::Property::TEXT, STATE_MESSAGE_RETRY ); + mStateText.SetProperty( Toolkit::TextLabel::Property::TEXT, GET_LOCALE_TEXT( "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" ) ); mStateText.SetVisible( show ); } } diff --git a/widget_viewer_dali/internal/widget_view_manager/widget_view_manager_impl.cpp b/widget_viewer_dali/internal/widget_view_manager/widget_view_manager_impl.cpp index 714bdb6..1224d8e 100644 --- a/widget_viewer_dali/internal/widget_view_manager/widget_view_manager_impl.cpp +++ b/widget_viewer_dali/internal/widget_view_manager/widget_view_manager_impl.cpp @@ -33,6 +33,7 @@ #include #include #include +#include namespace Dali { @@ -166,6 +167,11 @@ int WidgetViewManager::Initialize( Application application, const std::string& n return WIDGET_ERROR_PERMISSION_DENIED; } + if( !bindtextdomain( PKGNAME, WIDGET_VIEWER_DALI_LOCALE ) ) + { + DALI_LOG_INFO( gWidgetViewManagerLogging, Debug::Verbose, "WidgetViewManager::Initialize: bindtextdomain error.\n" ); + } + // Binds tizen remote surface manager & connects callback if( screen_connector_watcher_init() < 0 ) { diff --git a/widget_viewer_dali/po/CMakeLists.txt b/widget_viewer_dali/po/CMakeLists.txt new file mode 100644 index 0000000..3e1f684 --- /dev/null +++ b/widget_viewer_dali/po/CMakeLists.txt @@ -0,0 +1,77 @@ +# for i18n + +SET(POFILES + ar.po + as.po + az.po + be_BY.po + bn_BD.po + bn.po + de.po + en_PH.po + en_US.po + es_ES.po + es_US.po + en.po + fa.po + fr.po + gu.po + hi.po + hy.po + id.po + it_IT.po + jv.po + ka.po + kk.po + km.po + kn.po + ko_KR.po + ky_KG.po + lo.po + ml.po + mn_MN.po + mr.po + ms.po + my_ZG.po + ne.po + or.po + pa.po + pt_BR.po + pt_PT.po + ru_RU.po + si.po + su_ID.po + ta.po + te.po + tg_TJ.po + th.po + tk_TM.po + tl.po + tr_TR.po + uk.po + ur.po + uz.po + vi.po + xh.po + zh_CN.po + zu.po +) + +SET(MSGFMT "/usr/bin/msgfmt") +FOREACH(pofile ${POFILES}) + SET(pofile ${CMAKE_CURRENT_SOURCE_DIR}/${pofile}) + MESSAGE(STATUS " ${pofile}") + GET_FILENAME_COMPONENT(absPofile ${pofile} ABSOLUTE) + GET_FILENAME_COMPONENT(lang ${absPofile} NAME_WE) + SET(moFile ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo) + ADD_CUSTOM_COMMAND( + OUTPUT ${moFile} + COMMAND ${MSGFMT} -o ${moFile} ${absPofile} + DEPENDS ${absPofile} + ) + INSTALL(FILES ${moFile} + DESTINATION ${LOCALE_DIR}/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo) + SET(moFiles ${moFiles} ${moFile}) +ENDFOREACH(pofile) + +ADD_CUSTOM_TARGET(locale ALL DEPENDS ${moFiles}) diff --git a/widget_viewer_dali/po/ar.po b/widget_viewer_dali/po/ar.po new file mode 100755 index 0000000..62bcd4c --- /dev/null +++ b/widget_viewer_dali/po/ar.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "جارٍ التحميل..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "يتعذر تحميل البيانات. انقر لإعادة المحاولة." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "انقر هنا لتحميل بيانات التطبيق المصغر" + diff --git a/widget_viewer_dali/po/as.po b/widget_viewer_dali/po/as.po new file mode 100755 index 0000000..4f14965 --- /dev/null +++ b/widget_viewer_dali/po/as.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "লোড হৈ আছে..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "ডাটা লোড কৰিবলৈ অক্ষম৷ পুনঃচেষ্টা কৰিবৰ বাবে টিপক।" + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "ৱিজেট ডাটা লোড কৰিবলৈ ইয়াত টিপক" + diff --git a/widget_viewer_dali/po/az.po b/widget_viewer_dali/po/az.po new file mode 100755 index 0000000..ae47346 --- /dev/null +++ b/widget_viewer_dali/po/az.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "Yüklənir..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "Məlumatları yükləmək mümkün deyil. Yenidən cəhd etmək üçün vurun" + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "Piktoq məl yükl üçün vur" + diff --git a/widget_viewer_dali/po/be_BY.po b/widget_viewer_dali/po/be_BY.po new file mode 100755 index 0000000..dc565b9 --- /dev/null +++ b/widget_viewer_dali/po/be_BY.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "Загрузка..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "Unable to load data. Tap to retry." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "Націс.тут для загр.дан.відж." + diff --git a/widget_viewer_dali/po/bn.po b/widget_viewer_dali/po/bn.po new file mode 100755 index 0000000..09d105d --- /dev/null +++ b/widget_viewer_dali/po/bn.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "লোড হচ্ছে..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "তথ্য লোড করতে অক্ষম৷ পুনরায় চেষ্টা করতে ট্যাপ করুন৷" + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "উইজেট তথ্য লোড করতে এখানে ট্যাপ করুন" + diff --git a/widget_viewer_dali/po/bn_BD.po b/widget_viewer_dali/po/bn_BD.po new file mode 100755 index 0000000..cdea8b3 --- /dev/null +++ b/widget_viewer_dali/po/bn_BD.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "লোড হচ্ছে..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "তথ্য লোড করতে অক্ষম। পুনরায় চেষ্টা করতে ট্যাপ করুন।" + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "উইজেটের তথ্য লোড করতে এখানে ট্যাপ করুন" + diff --git a/widget_viewer_dali/po/de.po b/widget_viewer_dali/po/de.po new file mode 100755 index 0000000..882b394 --- /dev/null +++ b/widget_viewer_dali/po/de.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "Lädt..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "Daten konnten nicht geladen werden. Für erneuten Versuch tippen" + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "Tippen und Widget-Daten laden." + diff --git a/widget_viewer_dali/po/en.po b/widget_viewer_dali/po/en.po new file mode 100755 index 0000000..3030f61 --- /dev/null +++ b/widget_viewer_dali/po/en.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "Loading..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "Unable to load data. Tap to retry." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "Tap here to load widget data" + diff --git a/widget_viewer_dali/po/en_PH.po b/widget_viewer_dali/po/en_PH.po new file mode 100755 index 0000000..3030f61 --- /dev/null +++ b/widget_viewer_dali/po/en_PH.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "Loading..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "Unable to load data. Tap to retry." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "Tap here to load widget data" + diff --git a/widget_viewer_dali/po/en_US.po b/widget_viewer_dali/po/en_US.po new file mode 100755 index 0000000..3030f61 --- /dev/null +++ b/widget_viewer_dali/po/en_US.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "Loading..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "Unable to load data. Tap to retry." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "Tap here to load widget data" + diff --git a/widget_viewer_dali/po/es_ES.po b/widget_viewer_dali/po/es_ES.po new file mode 100755 index 0000000..9a1f90f --- /dev/null +++ b/widget_viewer_dali/po/es_ES.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "Cargando..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "No se pueden cargar datos. Pulse para volver a intentarlo." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "Cargue aquí datos de widgets" + diff --git a/widget_viewer_dali/po/es_US.po b/widget_viewer_dali/po/es_US.po new file mode 100755 index 0000000..4877ea8 --- /dev/null +++ b/widget_viewer_dali/po/es_US.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "Cargando..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "No es posible cargar los datos. Pulse para intentarlo de nuevo." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "Pulse para cargar datos widget" + diff --git a/widget_viewer_dali/po/fa.po b/widget_viewer_dali/po/fa.po new file mode 100755 index 0000000..23d685e --- /dev/null +++ b/widget_viewer_dali/po/fa.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "در حال دانلود..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "بارگیری داده ممکن نیست. برای امتحان مجدد ضربه بزنید." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "برای بارگیری داده ویجت ضربه بزنید" + diff --git a/widget_viewer_dali/po/fr.po b/widget_viewer_dali/po/fr.po new file mode 100755 index 0000000..5a2b7e2 --- /dev/null +++ b/widget_viewer_dali/po/fr.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "Chargement en cours." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "Impossible de charger les données. Appuyez pour réessayer." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "App. pr charger donn. widget" + diff --git a/widget_viewer_dali/po/gu.po b/widget_viewer_dali/po/gu.po new file mode 100755 index 0000000..6aca674 --- /dev/null +++ b/widget_viewer_dali/po/gu.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "લોડિંગ..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "ડેટા લોડ કરવામાં અસમર્થ. ફરીથી પ્રયાસ કરવા માટે ટેપ કરો." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "વિજેટ ડેટા લોડ કરવા માટે અહીં ટેપ કરો" + diff --git a/widget_viewer_dali/po/hi.po b/widget_viewer_dali/po/hi.po new file mode 100755 index 0000000..3dc0197 --- /dev/null +++ b/widget_viewer_dali/po/hi.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "लोड हो रहा है..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "डाटा लोड करने में अक्षम। फिर से प्रयास करने हेतु टैप करें।" + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "विजेट डाटा लोड करने हेतु यहां टैप करें" + diff --git a/widget_viewer_dali/po/hy.po b/widget_viewer_dali/po/hy.po new file mode 100755 index 0000000..fe15a4b --- /dev/null +++ b/widget_viewer_dali/po/hy.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "Բեռնում է..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "Անհնար է տվյալներ բեռնել: Թակեք՝ նորից փորձելու համար" + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "Թակ այստեղ՝ պտկրգրի տվ. բեռ." + diff --git a/widget_viewer_dali/po/id.po b/widget_viewer_dali/po/id.po new file mode 100755 index 0000000..62f3708 --- /dev/null +++ b/widget_viewer_dali/po/id.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "Meloading…" + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "Tidak dapat memuat data. Ketuk untuk mencoba lagi." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "Ktuk sini utk muat dta wdgt" + diff --git a/widget_viewer_dali/po/it_IT.po b/widget_viewer_dali/po/it_IT.po new file mode 100755 index 0000000..910a09f --- /dev/null +++ b/widget_viewer_dali/po/it_IT.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "Caricamento..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "Impossibile caricare i dati. Toccate per riprovare." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "Toc. qui per caric. dati widget" + diff --git a/widget_viewer_dali/po/jv.po b/widget_viewer_dali/po/jv.po new file mode 100755 index 0000000..03d9b69 --- /dev/null +++ b/widget_viewer_dali/po/jv.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "Lagi muat..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "Ora bisa ngamot data. Tutul kanggo nyoba maneh." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "Ttl iki nggo amot dt widget" + diff --git a/widget_viewer_dali/po/ka.po b/widget_viewer_dali/po/ka.po new file mode 100755 index 0000000..c69f879 --- /dev/null +++ b/widget_viewer_dali/po/ka.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "იტვირთება..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "მონაცემთა ჩატვირთვა შეუძლებელია. შეეხეთ და გაიმეორეთ მცდელობა" + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "შეეხეთ აქ, ვიჯეტის მონაცემ." + diff --git a/widget_viewer_dali/po/kk.po b/widget_viewer_dali/po/kk.po new file mode 100755 index 0000000..08c0a8f --- /dev/null +++ b/widget_viewer_dali/po/kk.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "Жазылуда..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "Деректерді жүктеу мүмкін емес. Қайталау үшін түртіңіз" + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "Виджет дер. жүк-у үшін түрту" + diff --git a/widget_viewer_dali/po/km.po b/widget_viewer_dali/po/km.po new file mode 100755 index 0000000..2050a75 --- /dev/null +++ b/widget_viewer_dali/po/km.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "កំពុង​ផ្ទុក..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "មិន​អាច​ផ្ទុក​ទិន្នន័យ។ ប៉ះ​ដើម្បី​សាកល្បង​ម្ដងទៀត។" + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "ប៉ះ​ទីនេះ ដើម្បី​ផ្ទុក​ទិន្នន័យ​វីដជីត" + diff --git a/widget_viewer_dali/po/kn.po b/widget_viewer_dali/po/kn.po new file mode 100755 index 0000000..5a8a768 --- /dev/null +++ b/widget_viewer_dali/po/kn.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "ಲೋಡಿಂಗ್..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "ಡೇಟಾ ಲೋಡ್ ಮಾಡಲು ಅಸಮರ್ಥ. ಮರುಪ್ರಯತ್ನಿಸಲು ಒತ್ತಿ." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "ವಿಜೆಟ್ ಡೇಟಾ ಲೋಡ್‌ಗೆ ಇಲ್ಲಿ ತಟ್ಟಿ" + diff --git a/widget_viewer_dali/po/ko_KR.po b/widget_viewer_dali/po/ko_KR.po new file mode 100755 index 0000000..ea79661 --- /dev/null +++ b/widget_viewer_dali/po/ko_KR.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "불러오는 중..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "데이터를 불러올 수 없습니다. 다시 시도하려면 누르세요." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "위젯 데이터를 불러오려면 여기를 누르세요" + diff --git a/widget_viewer_dali/po/ky_KG.po b/widget_viewer_dali/po/ky_KG.po new file mode 100755 index 0000000..21a7b60 --- /dev/null +++ b/widget_viewer_dali/po/ky_KG.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "Жүктөлүүдө..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "Unable to load data. Tap to retry." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "Видж. маал. жүкт. муну бас" + diff --git a/widget_viewer_dali/po/lo.po b/widget_viewer_dali/po/lo.po new file mode 100755 index 0000000..05943b1 --- /dev/null +++ b/widget_viewer_dali/po/lo.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "ກຳລັງໂຫຼດ..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "ບໍ່ສາມາດໂຫຼດຂໍ້ມູນໄດ້. ເຄາະເພື່ອລອງໃໝ່." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "ແຕະທີ່ນີ້ເພື່ອໂຫຼດຂໍ້ມູນວິດເຈັດ" + diff --git a/widget_viewer_dali/po/ml.po b/widget_viewer_dali/po/ml.po new file mode 100755 index 0000000..e65be75 --- /dev/null +++ b/widget_viewer_dali/po/ml.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "ലോഡ്‌ ചെയ്യുന്നു..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "ഡാറ്റ ലോഡുചെയ്യാന്‍ കഴിയുന്നില്ല. വീണ്ടും ശ്രമിക്കുന്നതിന് ടാപ്പുചെയ്യുക" + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "വിജറ്റ് ഡാറ്റ ലോഡ് ചെയ്യാൻ ഇവിടെ സ്പർശിക്കുക" + diff --git a/widget_viewer_dali/po/mn_MN.po b/widget_viewer_dali/po/mn_MN.po new file mode 100755 index 0000000..0d515f7 --- /dev/null +++ b/widget_viewer_dali/po/mn_MN.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "Ачаалж байна..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "Өгөгдөл ачаалах боломжгүй. Товшиж дахин оролд" + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "Тоног. өгөг. ачаал. энд товш" + diff --git a/widget_viewer_dali/po/mr.po b/widget_viewer_dali/po/mr.po new file mode 100755 index 0000000..3bcf03b --- /dev/null +++ b/widget_viewer_dali/po/mr.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "लोड होत आहे..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "डेटा लोड करण्यामध्‍ये अक्षम. पुनर्प्रयत्न करण्‍यासाठी टॅप करा." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "विजेट डेटा लोड करण्‍यास येथे टॅप करा" + diff --git a/widget_viewer_dali/po/ms.po b/widget_viewer_dali/po/ms.po new file mode 100755 index 0000000..413d227 --- /dev/null +++ b/widget_viewer_dali/po/ms.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "Memuat…" + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "Tidak dapat memuatkan data. Ketik untuk mencuba semula." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "Ketik utk muat data widget" + diff --git a/widget_viewer_dali/po/my_ZG.po b/widget_viewer_dali/po/my_ZG.po new file mode 100755 index 0000000..c2f558d --- /dev/null +++ b/widget_viewer_dali/po/my_ZG.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "အခ်က္အလက္ျဖည့္သြင္းေနပါသည္…" + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "ေဒတာ တင္ရန္ မရႏိုင္ပါ။ ျပန္ၾကိဳးစားရန္ ႏွိပ္ပါ။" + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "ဝဒ္ဂ်က္ေဒတာကုိ ရယူရန္ ဤေနရာကုိ ႏွိပ္ပါ" + diff --git a/widget_viewer_dali/po/ne.po b/widget_viewer_dali/po/ne.po new file mode 100755 index 0000000..dd751d8 --- /dev/null +++ b/widget_viewer_dali/po/ne.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "लोड हुँदै छ..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "डाटा लोड गर्न सकेन। पुन: प्रयास गर्नुहोस् मा ट्याप गर्नुहोस्।" + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "विजेट डाटा लोड गर्न यहाँ ट्याप गर्नु" + diff --git a/widget_viewer_dali/po/or.po b/widget_viewer_dali/po/or.po new file mode 100755 index 0000000..95e255a --- /dev/null +++ b/widget_viewer_dali/po/or.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "ଲୋଡ୍ ହେଉଛି..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "ଡାଟା ଲୋଡ୍ କରିବାକୁ ଅସମର୍ଥ। ପୁନଃଚେଷ୍ଟା କରିବାକୁ ଟ୍ୟାପ୍ କରନ୍ତୁ।" + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "ୱିଜେ. ଡାଟା ଲୋଡ୍‍ କରି. ଏଠା. ଟ୍ୟାପ୍" + diff --git a/widget_viewer_dali/po/pa.po b/widget_viewer_dali/po/pa.po new file mode 100755 index 0000000..dde5618 --- /dev/null +++ b/widget_viewer_dali/po/pa.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "ਲੋਡ ਹੋ ਰਿਹਾ ਹੈ..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "ਡੈਟਾ ਨੂੰ ਲੋਡ ਕਰਨ ਵਿੱਚ ਅਸਮਰੱਥ। ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰਨ ਲਈ ਟੈਪ ਕਰੋ।" + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "ਵਿੱਜੇਟ ਡੈਟਾ ਲੋਡ ਕਰਨ ਲਈ ਇੱਥੇ ਟੈਪ ਕਰੋ" + diff --git a/widget_viewer_dali/po/pt_BR.po b/widget_viewer_dali/po/pt_BR.po new file mode 100755 index 0000000..f2fb3b5 --- /dev/null +++ b/widget_viewer_dali/po/pt_BR.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "Carregando..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "Não é possível carregar os dados. Toque para tentar novamente." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "Tocar carreg. dados widget" + diff --git a/widget_viewer_dali/po/pt_PT.po b/widget_viewer_dali/po/pt_PT.po new file mode 100755 index 0000000..b953672 --- /dev/null +++ b/widget_viewer_dali/po/pt_PT.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "A carregar..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "Impossível carregar dados. Toque para tentar novamente." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "Toque p/ carregar dados widget" + diff --git a/widget_viewer_dali/po/ru_RU.po b/widget_viewer_dali/po/ru_RU.po new file mode 100755 index 0000000..e69de9b --- /dev/null +++ b/widget_viewer_dali/po/ru_RU.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "Загрузка..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "Не удалось загрузить данные. Коснитесь для повтора" + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "Нажм. для загрузки данных" + diff --git a/widget_viewer_dali/po/si.po b/widget_viewer_dali/po/si.po new file mode 100755 index 0000000..8a85b10 --- /dev/null +++ b/widget_viewer_dali/po/si.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "ප්‍රෙව්ශනය කරමින්..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "දත්ත ප්‍රවේශනය කිරීමට නොහැකිය. යළි උත්සාහ කිරීමට තට්ටු කරන්න" + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "විජෙ. දත්ත පූරණයට මෙතැන ත. ක." + diff --git a/widget_viewer_dali/po/su_ID.po b/widget_viewer_dali/po/su_ID.po new file mode 100755 index 0000000..623411e --- /dev/null +++ b/widget_viewer_dali/po/su_ID.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "Ngamuat..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "Teu tiasa ngamuat data. Ketok pikeun nyobi deui." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "Ketok di dieu pikeun muka data widget" + diff --git a/widget_viewer_dali/po/ta.po b/widget_viewer_dali/po/ta.po new file mode 100755 index 0000000..2770de9 --- /dev/null +++ b/widget_viewer_dali/po/ta.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "லோடிங்..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "தரவை ஏற்ற இயலவில்லை. மீண்டும் முயலவென டேப் செய்க." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "விட்ஜெட் தரவை ஏற்ற, டேப் செய்." + diff --git a/widget_viewer_dali/po/te.po b/widget_viewer_dali/po/te.po new file mode 100755 index 0000000..0998bb6 --- /dev/null +++ b/widget_viewer_dali/po/te.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "లోడ్ అవుతోంది..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "డేటాను లోడ్ చేయడం సాధ్యం కాదు. మళ్లీ ప్రయత్నించడానికి ట్యాప్ చేయండి." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "విడ్జెట్ డేటాను లోడ్ చేయడానికి ఇక్కడ ట్యాప్ చేయండి" + diff --git a/widget_viewer_dali/po/tg_TJ.po b/widget_viewer_dali/po/tg_TJ.po new file mode 100755 index 0000000..ff4285d --- /dev/null +++ b/widget_viewer_dali/po/tg_TJ.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "Боркунӣ..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "Unable to load data. Tap to retry." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "Инҷо зарб з., итт.виҷ.бор к." + diff --git a/widget_viewer_dali/po/th.po b/widget_viewer_dali/po/th.po new file mode 100755 index 0000000..dc80e32 --- /dev/null +++ b/widget_viewer_dali/po/th.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "กำลังประมวลผล..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "ไม่สามารถโหลดข้อมูลได้ แตะเพื่อลองอีกครั้ง" + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "แตะที่นี่เพื่อโหลดข้อมูล Widget" + diff --git a/widget_viewer_dali/po/tk_TM.po b/widget_viewer_dali/po/tk_TM.po new file mode 100755 index 0000000..e9946e6 --- /dev/null +++ b/widget_viewer_dali/po/tk_TM.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "Ýükleýär..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "Unable to load data. Tap to retry." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "Wijet magl ýükl üçn şuňa bas" + diff --git a/widget_viewer_dali/po/tl.po b/widget_viewer_dali/po/tl.po new file mode 100755 index 0000000..846ba71 --- /dev/null +++ b/widget_viewer_dali/po/tl.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "Naglo-load..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "Hindi ma-load ang data. I-tap upang subukang muli." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "I-tap dito para i-load ang data ng widget" + diff --git a/widget_viewer_dali/po/tr_TR.po b/widget_viewer_dali/po/tr_TR.po new file mode 100755 index 0000000..eac167c --- /dev/null +++ b/widget_viewer_dali/po/tr_TR.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "Yükleniyor..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "Veri yüklenemiyor. Tekrar denemek için dokunun." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "Widget vrlrni yklmk içn dknn" + diff --git a/widget_viewer_dali/po/uk.po b/widget_viewer_dali/po/uk.po new file mode 100755 index 0000000..b4f1910 --- /dev/null +++ b/widget_viewer_dali/po/uk.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "Завантаження..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "Неможливо завантажити дані. Натисніть, щоб спробувати ще раз" + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "Торкн. для зав. дан. відж." + diff --git a/widget_viewer_dali/po/ur.po b/widget_viewer_dali/po/ur.po new file mode 100755 index 0000000..9b90a3c --- /dev/null +++ b/widget_viewer_dali/po/ur.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "لوڈنگ..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "ڈیٹا لوڈ کرنے سے قاصر۔ پھرکوشش کرنے کے لئے تھپتھپائیں۔" + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "ویجیٹ کا ڈیٹا لوڈ کرنے کے لیے یہاں تھپکی دیں" + diff --git a/widget_viewer_dali/po/uz.po b/widget_viewer_dali/po/uz.po new file mode 100755 index 0000000..4413533 --- /dev/null +++ b/widget_viewer_dali/po/uz.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "Yuklanmoqda..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "Ma’lumotni yuklab bo‘lmaydi. Qayta urinib ko‘rish uchun cherting" + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "Vidjet ma’l. yuklash u-n teg" + diff --git a/widget_viewer_dali/po/vi.po b/widget_viewer_dali/po/vi.po new file mode 100755 index 0000000..080962c --- /dev/null +++ b/widget_viewer_dali/po/vi.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "Đang tải…" + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "Không thể tải dữ liệu. Hãy chạm để thử lại." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "Chạm để tải dữ liệu widget" + diff --git a/widget_viewer_dali/po/xh.po b/widget_viewer_dali/po/xh.po new file mode 100755 index 0000000..73194f4 --- /dev/null +++ b/widget_viewer_dali/po/xh.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "Kufakwa iinkcukacha..." + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "Ayikwazi kulayisha ingcombolo. Thepa ukuze uzame kwakhona." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "Betha apha ukongeza idatha ye-widget" + diff --git a/widget_viewer_dali/po/zh_CN.po b/widget_viewer_dali/po/zh_CN.po new file mode 100755 index 0000000..fe8d886 --- /dev/null +++ b/widget_viewer_dali/po/zh_CN.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "载入中…" + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "无法载入数据。轻敲以重试。" + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "点击此处以载入小组件数据" + diff --git a/widget_viewer_dali/po/zu.po b/widget_viewer_dali/po/zu.po new file mode 100755 index 0000000..9cbbc5c --- /dev/null +++ b/widget_viewer_dali/po/zu.po @@ -0,0 +1,9 @@ +msgid "IDS_ST_POP_LOADING_ING" +msgstr "Iyalayisha…" + +msgid "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" +msgstr "Ayikwazi ukulayisha idatha. Thepha ukuze uzame futhi." + +msgid "IDS_HS_NPBODY_TAP_HERE_TO_LOAD_WIDGET_DATA_ABB" +msgstr "Thepha lapha ukuze ulayishe ulwazi lwewijethi" + -- 2.7.4 From 7197f3a0911d3349d2d5d0eeb7accc4f0ba77218 Mon Sep 17 00:00:00 2001 From: "taeyoon0.lee" Date: Wed, 8 Feb 2017 16:55:43 +0900 Subject: [PATCH 14/16] Changed default state text size Default size: 30 (pixel) Pixel to Point for TextLabel Change-Id: I83f93c636eddb0c95f4e609196951c3ee006f5b5 --- widget_viewer_dali/internal/widget_view/widget_view_impl.cpp | 11 +++++++++++ widget_viewer_dali/internal/widget_view/widget_view_impl.h | 2 ++ 2 files changed, 13 insertions(+) diff --git a/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp b/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp index 5f2c594..06f7b99 100644 --- a/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp +++ b/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp @@ -51,6 +51,8 @@ namespace Internal namespace { +const int DEFAULT_FONT_PIXEL_SIZE = 30; // Referred platform widget viewer evas + #define GET_LOCALE_TEXT(string) dgettext(PKGNAME, string) #define WIDGET_VIEW_RESOURCE_DEFAULT_IMG "/widget_viewer_dali/images/unknown.png" @@ -767,6 +769,7 @@ void WidgetView::OnInitialize() mStateText.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); mStateText.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Dali::Color::WHITE ); mStateText.SetProperty( Toolkit::TextLabel::Property::FONT_STYLE, "Bold" ); + mStateText.SetProperty( Toolkit::TextLabel::Property::POINT_SIZE, TextPixelToPointSize( DEFAULT_FONT_PIXEL_SIZE ) ); mPreviewActor.Add( mStateTextActor ); mStateTextActor.Add( mStateText ); @@ -1018,6 +1021,14 @@ void WidgetView::SetLoadingTextPropertyMap( Property::Map map ) } } +float WidgetView::TextPixelToPointSize( int pixelSize ) +{ + Dali::Vector2 dpi = Dali::Stage::GetCurrent().GetDpi(); + float meanDpi = (dpi.height + dpi.width) / 2.0f; + + return (pixelSize * 72.0f) / meanDpi; +} + } // namespace Internal } // namespace WidgetView diff --git a/widget_viewer_dali/internal/widget_view/widget_view_impl.h b/widget_viewer_dali/internal/widget_view/widget_view_impl.h index a23732b..7f1d66d 100644 --- a/widget_viewer_dali/internal/widget_view/widget_view_impl.h +++ b/widget_viewer_dali/internal/widget_view/widget_view_impl.h @@ -197,6 +197,8 @@ protected: */ virtual ~WidgetView(); + float TextPixelToPointSize( int pixelSize ); + private: // From Control /** -- 2.7.4 From badf36a078d9f974200c650148ed90b228e5c803 Mon Sep 17 00:00:00 2001 From: Hyunho Kang Date: Mon, 13 Feb 2017 13:44:26 +0900 Subject: [PATCH 15/16] Fix build break screen_connector_watcher_evas_add_by_rid return value is changed Change-Id: I843ea61cee7f395df8b98caa10e64fe880d704bf Signed-off-by: Hyunho Kang (cherry picked from commit f46d59fdb1c1c9b467921ccf5b57f942cfe72e8a) --- watch-control/src/control.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/watch-control/src/control.c b/watch-control/src/control.c index 4d0f1fd..32eea0e 100644 --- a/watch-control/src/control.c +++ b/watch-control/src/control.c @@ -134,11 +134,18 @@ static void __screen_connector_watcher_evas_updated_cb(const char *appid, Evas_O API int watch_manager_set_resource_id(int resource_id) { screen_connector_watcher_evas_ops ops; + screen_connector_watcher_evas_h handle; ops.added = __screen_connector_watcher_evas_added_cb; ops.removed = __screen_connector_watcher_evas_removed_cb; ops.updated = __screen_connector_watcher_evas_updated_cb; - return screen_connector_watcher_evas_add_by_rid(&ops, resource_id, NULL); + handle = screen_connector_watcher_evas_add_by_rid(&ops, resource_id, NULL); + if (handle == NULL) { + _E("Fail screen_connector_watcher_evas_add_by_rid"); + return -1; + } + + return 0; } API int watch_manager_get_resource_id(Evas_Object *watch, int *resource_id) -- 2.7.4 From 642c0a6f7833a54edbd383df945f231110ece3d3 Mon Sep 17 00:00:00 2001 From: Hyunho Kang Date: Mon, 13 Feb 2017 17:10:08 +0900 Subject: [PATCH 16/16] Add WATCH_SMART_SIGNAL_UPDATED signal Ambient watch viewer needs buffer information when watch app buffer is updated. Change-Id: Ia2a0700cd75fbbeadb858e0f13c6253ebb7fa17a Signed-off-by: Hyunho Kang (cherry picked from commit 0be67a8dd9924163041920b53bfa74fbecd34ca6) --- watch-control/include/watch_control.h | 1 + watch-control/src/control.c | 1 + 2 files changed, 2 insertions(+) diff --git a/watch-control/include/watch_control.h b/watch-control/include/watch_control.h index 0f28bf4..4469f16 100644 --- a/watch-control/include/watch_control.h +++ b/watch-control/include/watch_control.h @@ -32,6 +32,7 @@ typedef enum { #define WATCH_SMART_SIGNAL_ADDED "watch,added" #define WATCH_SMART_SIGNAL_REMOVED "watch,removed" +#define WATCH_SMART_SIGNAL_UPDATED "watch,updated" extern int watch_manager_init(Evas_Object *win); extern int watch_manager_fini(); diff --git a/watch-control/src/control.c b/watch-control/src/control.c index 32eea0e..ad1f064 100644 --- a/watch-control/src/control.c +++ b/watch-control/src/control.c @@ -129,6 +129,7 @@ static void __screen_connector_watcher_evas_removed_cb(const char *appid, Evas_O static void __screen_connector_watcher_evas_updated_cb(const char *appid, Evas_Object *image, void *data) { + evas_object_smart_callback_call(__win, WATCH_SMART_SIGNAL_UPDATED, image); } API int watch_manager_set_resource_id(int resource_id) -- 2.7.4