pg_item_data_s *id = (pg_item_data_s*)data;
LOGD("current policy: [%d]", id->status);
-
int res = privacy_guard_client_update_monitor_policy(id->user_id, id->pkg_id, id->privacy_id, !id->status);
log_if(res != PRIV_GUARD_ERROR_SUCCESS, 1, "privacy_guard_client_update_monitor_policy() is failed. [%d]", res);
id->status = !id->status;
evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
- // TOBE /////////////////////////////////////////////////////////////////////////////////
- //elm_object_part_text_set(genlist, "elm.text", dgettext("privacy-setting", "IDS_ST_NPBODY_NO_APPS"));
- //char* no_app_string_format = dgettext("privacy-setting", "IDS_ST_BODY_AFTER_YOU_DOWNLOAD_APPS_THAT_USE_PS_THEY_WILL_BE_SHOWN_HERE");
- //char no_app_string[256];
- //snprintf(no_app_string, sizeof(no_app_string), no_app_string_format, privacy_display);
- /////////////////////////////////////////////////////////////////////////////////////////
-
- // temp - SHOULD BE REPLACED TO ABOVE ONE ///////////////////////////////////////////////
- elm_object_part_text_set(genlist, "elm.text", "No apps");
+ elm_object_part_text_set(genlist, "elm.text", dgettext("privacy-setting", "IDS_ST_NPBODY_NO_APPS"));
+ char* no_app_string_format = dgettext("privacy-setting", "IDS_ST_BODY_AFTER_YOU_DOWNLOAD_APPS_THAT_USE_PS_THEY_WILL_BE_SHOWN_HERE");
char no_app_string[256];
- snprintf(no_app_string, sizeof(no_app_string), "After you download apps that use %s, they will be shown here.", privacy_display);
- /////////////////////////////////////////////////////////////////////////////////////////
+ snprintf(no_app_string, sizeof(no_app_string), no_app_string_format, privacy_display);
elm_object_part_text_set(genlist, "elm.help.text", no_app_string);
elm_layout_signal_emit(genlist, "align.center", "elm");
pg_item_data_s *description_item = calloc(sizeof(pg_item_data_s), 1);
description_item->index = 0;
- char tmp[256] = {'\0',};
- snprintf(tmp, sizeof(tmp), "<wrap=word><ellipsis=-1.0><font_size=35><color=#A9A9A9FF>The selected apps will be monitored for any attempts to violate your privacy.</color></font_size></ellipsis></wrap>");
- //snprintf(tmp, sizeof(tmp), "<wrap=word><ellipsis=-1.0><font_size=35><color=#A9A9A9FF>%s</color></font_size></ellipsis></wrap>", dgettext("privacy-setting", "IDS_ST_BODY_THE_SELECTED_APPS_WILL_BE_MONITORED_FOR_ANY_ATTEMPTS_TO_VIOLATE_YOUR_PRIVACY"));
- description_item->label = strdup(tmp);
+ // first line of the genlist will be filled with a description
+ char str_label[256] = {'\0',};
+ snprintf(str_label, sizeof(str_label), "<wrap=word><ellipsis=-1.0><font_size=35><color=#A9A9A9FF>%s</color></font_size></ellipsis></wrap>", dgettext("privacy-setting", "IDS_ST_BODY_THE_SELECTED_APPS_WILL_BE_MONITORED_FOR_ANY_ATTEMPTS_TO_VIOLATE_YOUR_PRIVACY"));
+ description_item->label = strdup(str_label);
it = elm_genlist_item_append(genlist, itc, description_item, NULL, ELM_GENLIST_ITEM_NONE, _privacy_package_selected_cb, description_item);
elm_genlist_item_select_mode_set(it, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
for (l = pg_data_list; l != NULL; l = l->next) {
pg_item_data_s *item = calloc(sizeof(pg_item_data_s), 1);
pg_data_s* data = (pg_data_s*)l->data;
- char temp[256] = {'\0',};
+ char str_temp[256] = {'\0',};
char str_time[32] = {'\0',};
struct tm *timeinfo = NULL;
char *label = NULL;
}
// title.. (package label)
- snprintf(temp, sizeof(temp), "%s", label);
- item->label = strdup(temp);
+ snprintf(str_temp, sizeof(str_temp), "%s", label);
+ item->label = strdup(str_temp);
- // description - 13/08/2010 01:30 AM 21 time(s)
+ // description - e.g.) 25/08/2010 01:30 PM 21 time(s)
if (data->time > 0) {
- LOGD("time : %d", data->time);
timeinfo = localtime(&data->time);
LOGD("time : %s", asctime(timeinfo));
strftime (str_time, 32, "%d/%m/%Y %I:%M %p", timeinfo);
- snprintf(temp, sizeof(temp), "<font_size=27>%s <font color=#3DB9CCFF>%d</font> time(s)</font_size>", str_time, data->count);
- //snprintf(temp, sizeof(temp), "<font_size=27>%s <font color=#3DB9CCFF>%d</font> %s</font_size>", str_time, data->count, dgettext("privacy-setting", "IDS_CLD_BODY_PD_TIMES"));
- item->description = strdup(temp);
+ char *str_count = dgettext("privacy-setting", "IDS_CLD_BODY_PD_TIMES");
+ snprintf(str_temp, sizeof(str_temp), str_count, data->count);
+ snprintf(str_label, sizeof(str_label), "<font_size=27>%s <font color=#3DB9CCFF>%s</font></font_size>", str_time, str_temp);
+ item->description = strdup(str_label);
} else {
item->description = NULL;
}