{
elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
+ char *app_id = (char*)data;
+ if (app_id == NULL) {
+ ERR("app_id is null!!");
+ return;
+ }
+
DBG("_edit_clicked_cb in");
app_control_h service;
app_control_create(&service);
- app_control_set_app_id(service, "org.tizen.watch-face-editor");
+ app_control_set_app_id(service, app_id);
app_control_set_launch_mode(service, APP_CONTROL_LAUNCH_MODE_GROUP);
app_control_send_launch_request(service, NULL, NULL);
app_control_destroy(service);
evas_object_size_hint_align_set(obj, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_table_pack(table, obj, 0, 2, 1, 1);
- btn = elm_button_add(parent);
- evas_object_smart_callback_add(btn, "clicked", _edit_clicked_cb, NULL);
- evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_object_text_set(btn, "EDITOR");
- evas_object_show(btn);
- elm_table_pack(table, btn, 0, 3, 1, 1);
+ if (pitem->editor) {
+ btn = elm_button_add(parent);
+ evas_object_smart_callback_add(btn, "clicked", _edit_clicked_cb, (void*)pitem->editor);
+ evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_object_text_set(btn, "CUSTOMIZE");
+ evas_object_show(btn);
+ elm_table_pack(table, btn, 0, 3, 1, 1);
+ } else {
+ rect = evas_object_rectangle_add(evas_object_evas_get(table));
+ evas_object_size_hint_min_set(rect, w, h/7);
+ evas_object_size_hint_weight_set(rect, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(rect, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_table_pack(table, rect, 0, 3, 1, 1);
+ }
return table;
char *name = NULL;
char *pkgid = NULL;
char *icon = NULL;
+ char *editor = NULL;
int ret = 0;
_Bool preload = 0;
char *m_value = NULL;
ERR("pkgmgrinfo_appinfo_get_metadata_value NOT error or 3rd party ret=%d", ret);
}
+ ret = watch_manager_get_setup_appid(appid, &editor);
+ if (ret != 0) {
+ ERR("watch_manager_get_setup_appid error %d or there is no editor", ret);
+ }
+
Clock_Type_Item *pitem = NULL;
pitem = (Clock_Type_Item *)calloc(1, sizeof(Clock_Type_Item));
setting_retvm_if(NULL == pitem, SETTING_RETURN_FAIL, "pitem is NULL");
ret = pkgmgrinfo_appinfo_foreach_metadata(tmp_handle, watch_metadata_func, (void *)(&clock_metadata));
pitem->appid = strdup(appid);
- if (pkgid != NULL)
+ if (pkgid != NULL) {
pitem->pkgid = strdup(pkgid);
+ free(pkgid);
+ }
if (name != NULL)
pitem->name = strdup(name);
if (icon != NULL)
pitem->icon = strdup(icon);
+ if (editor != NULL) {
+ pitem->editor = strdup(editor);
+ free(editor);
+ }
if (m_value && clock_metadata.value && strlen(m_value) > 0) {
if (!strcmp(m_value, "function")) {
FREE(pitem->pkgid);
FREE(pitem->name);
FREE(pitem->icon);
+ FREE(pitem->editor);
}
}
g_clock_list[0] = eina_list_free(g_clock_list[0]);