From: Radoslaw Czerski Date: Fri, 21 Oct 2016 11:53:17 +0000 (+0200) Subject: Icons related fixes and refactor. X-Git-Tag: submit/tizen/20161021.145810~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F85%2F93285%2F3;p=profile%2Fmobile%2Fapps%2Fnative%2Findicator.git Icons related fixes and refactor. Typos fixed. Unused files removed. BT icons changed. Change-Id: Idfec29b90c598236c02949761bf1bf5129f49d03 Signed-off-by: Radoslaw Czerski --- diff --git a/res/resource/icons/Bluetooth, NFC, GPS/b03_bt_activated_on.png b/res/resource/icons/Bluetooth, NFC, GPS/b03_bt_activated_on.png deleted file mode 100644 index 14e078a..0000000 Binary files a/res/resource/icons/Bluetooth, NFC, GPS/b03_bt_activated_on.png and /dev/null differ diff --git a/res/resource/icons/Bluetooth, NFC, GPS/b03_bt_on_notconnected.png b/res/resource/icons/Bluetooth, NFC, GPS/b03_bt_on_notconnected.png new file mode 100644 index 0000000..9da7771 Binary files /dev/null and b/res/resource/icons/Bluetooth, NFC, GPS/b03_bt_on_notconnected.png differ diff --git a/res/resource/icons/quickpanel_icon_default.png b/res/resource/icons/quickpanel_icon_default.png new file mode 100644 index 0000000..ef74fd1 Binary files /dev/null and b/res/resource/icons/quickpanel_icon_default.png differ diff --git a/res/resource/icons_edc/B03_OrangeF.png b/res/resource/icons_edc/B03_OrangeF.png deleted file mode 100644 index 5cbc939..0000000 Binary files a/res/resource/icons_edc/B03_OrangeF.png and /dev/null differ diff --git a/res/resource/icons_edc/B03_conection_UPdownload.png b/res/resource/icons_edc/B03_conection_UPdownload.png deleted file mode 100755 index d59226c..0000000 Binary files a/res/resource/icons_edc/B03_conection_UPdownload.png and /dev/null differ diff --git a/res/resource/icons_edc/B03_conection_not_UPdownload.png b/res/resource/icons_edc/B03_conection_not_UPdownload.png deleted file mode 100755 index bbb6e47..0000000 Binary files a/res/resource/icons_edc/B03_conection_not_UPdownload.png and /dev/null differ diff --git a/res/resource/icons_edc/B03_connection_UPload.png b/res/resource/icons_edc/B03_connection_UPload.png deleted file mode 100755 index 48f4806..0000000 Binary files a/res/resource/icons_edc/B03_connection_UPload.png and /dev/null differ diff --git a/res/resource/icons_edc/B03_connection_download.png b/res/resource/icons_edc/B03_connection_download.png deleted file mode 100755 index 25802b0..0000000 Binary files a/res/resource/icons_edc/B03_connection_download.png and /dev/null differ diff --git a/res/resource/icons_edc/B03_indicator_bg.png b/res/resource/icons_edc/B03_indicator_bg.png deleted file mode 100644 index c27b619..0000000 Binary files a/res/resource/icons_edc/B03_indicator_bg.png and /dev/null differ diff --git a/res/resource/icons_edc/B03_not_conection_UPdownload.png b/res/resource/icons_edc/B03_not_conection_UPdownload.png deleted file mode 100755 index 6181191..0000000 Binary files a/res/resource/icons_edc/B03_not_conection_UPdownload.png and /dev/null differ diff --git a/res/resource/icons_edc/B03_notify_more.png b/res/resource/icons_edc/B03_notify_more.png deleted file mode 100755 index 19527b9..0000000 Binary files a/res/resource/icons_edc/B03_notify_more.png and /dev/null differ diff --git a/res/resource/icons_edc/B03_search_divider.png b/res/resource/icons_edc/B03_search_divider.png deleted file mode 100644 index d90ad78..0000000 Binary files a/res/resource/icons_edc/B03_search_divider.png and /dev/null differ diff --git a/res/resource/icons_edc/b03_connection_download.png b/res/resource/icons_edc/b03_connection_download.png new file mode 100644 index 0000000..959e5d0 Binary files /dev/null and b/res/resource/icons_edc/b03_connection_download.png differ diff --git a/res/resource/icons_edc/b03_connection_not_updownload.png b/res/resource/icons_edc/b03_connection_not_updownload.png new file mode 100644 index 0000000..f221e33 Binary files /dev/null and b/res/resource/icons_edc/b03_connection_not_updownload.png differ diff --git a/res/resource/icons_edc/b03_connection_updownload.png b/res/resource/icons_edc/b03_connection_updownload.png new file mode 100644 index 0000000..ec8c210 Binary files /dev/null and b/res/resource/icons_edc/b03_connection_updownload.png differ diff --git a/res/resource/icons_edc/b03_connection_upload.png b/res/resource/icons_edc/b03_connection_upload.png new file mode 100644 index 0000000..4920840 Binary files /dev/null and b/res/resource/icons_edc/b03_connection_upload.png differ diff --git a/res/resource/indicator_port.edc b/res/resource/indicator_port.edc index 29dd527..3c1a7f0 100644 --- a/res/resource/indicator_port.edc +++ b/res/resource/indicator_port.edc @@ -22,10 +22,6 @@ #include "indicator_common.edc" -images { - image: "icons/Power/battery_text/B03_stat_sys_battery_num_100.png" COMP; -} - collections { base_scale: 2.6; @@ -66,16 +62,10 @@ collections { } images { - image: "B03_indicator_bg.png" COMP; - image: "B03_OrangeF.png" COMP; - image: "B03_conection_not_UPdownload.png" COMP; - image: "B03_connection_UPload.png" COMP; - image: "B03_connection_download.png" COMP; - image: "B03_conection_UPdownload.png" COMP; - image: "B03_search_divider.png" COMP; - image: "B03_notification.png" COMP; - image: "B03_notification_press.png" COMP; - image: "B03_notify_more.png" COMP; + image: "b03_connection_not_updownload.png" COMP; + image: "b03_connection_upload.png" COMP; + image: "b03_connection_download.png" COMP; + image: "b03_connection_updownload.png" COMP; } parts { @@ -299,7 +289,7 @@ collections { state: "default" 0.0; rel1 { relative: 0.5 0.5; to_x: elm.swallow.fixed4; to_y: elm.rect.bg; } rel2 { relative: 0.5 0.5; to_x: elm.swallow.fixed4; to_y: elm.rect.bg; } - min: 25 25; + min: DEFAULT_ICON_WIDTH DEFAULT_ICON_WIDTH; fixed: 1 1; align: 0.5 0.5; color_class:"AO004"; @@ -309,7 +299,7 @@ collections { state: "none" 0.0; inherit: "default" 0.0; image { - normal:"B03_conection_not_UPdownload.png"; + normal:"b03_connection_not_updownload.png"; } visible: 1; } @@ -317,7 +307,7 @@ collections { state: "upload" 0.0; inherit: "default" 0.0; image { - normal:"B03_connection_UPload.png"; + normal:"b03_connection_upload.png"; } visible: 1; } @@ -325,7 +315,7 @@ collections { state: "download" 0.0; inherit: "default" 0.0; image { - normal:"B03_connection_download.png"; + normal:"b03_connection_download.png"; } visible: 1; } @@ -333,7 +323,7 @@ collections { state: "updownload" 0.0; inherit: "default" 0.0; image { - normal:"B03_conection_UPdownload.png"; + normal:"b03_connection_updownload.png"; } visible: 1; } @@ -357,7 +347,7 @@ collections { state: "default" 0.0; rel1 { relative: 0.5 0.5; to_x: elm.swallow.fixed5; to_y: elm.rect.bg; } rel2 { relative: 0.5 0.5; to_x: elm.swallow.fixed5; to_y: elm.rect.bg; } - min: 25 25; + min: DEFAULT_ICON_WIDTH DEFAULT_ICON_HEIGHT; fixed: 1 1; align: 0.5 0.5; color_class:"AO004"; @@ -367,7 +357,7 @@ collections { state: "none" 0.0; inherit: "default" 0.0; image { - normal:"B03_conection_not_UPdownload.png"; + normal:"b03_connection_not_updownload.png"; } visible: 1; } @@ -375,7 +365,7 @@ collections { state: "upload" 0.0; inherit: "default" 0.0; image { - normal:"B03_connection_UPload.png"; + normal:"b03_connection_upload.png"; } visible: 1; } @@ -383,7 +373,7 @@ collections { state: "download" 0.0; inherit: "default" 0.0; image { - normal:"B03_connection_download.png"; + normal:"b03_connection_download.png"; } visible: 1; } @@ -391,7 +381,7 @@ collections { state: "updownload" 0.0; inherit: "default" 0.0; image { - normal:"B03_conection_UPdownload.png"; + normal:"b03_connection_updownload.png"; } visible: 1; } diff --git a/src/modules/connection/connection.c b/src/modules/connection/connection.c index 7d904c0..ea9bc26 100644 --- a/src/modules/connection/connection.c +++ b/src/modules/connection/connection.c @@ -88,7 +88,7 @@ static const char *icon_path[LEVEL_LAST] = { [LEVEL_3G_PLUS] = "Connection/b03_connection_3g+.png", [LEVEL_LTE] = "Connection/b03_connection_lte.png", [LEVEL_4G] = "Connection/b03_connection_4g.png", - [LEVEL_BT_TETHERING] = "Bluetooth, NFC, GPS/b03_BT_tethering_network.png" + [LEVEL_BT_TETHERING] = "Bluetooth, NFC, GPS/b03_bt_tethering_network.png" }; static void set_app_state(void *data) diff --git a/src/modules/connection/mobile_hotspot.c b/src/modules/connection/mobile_hotspot.c index 4d5cb66..0c91b6b 100644 --- a/src/modules/connection/mobile_hotspot.c +++ b/src/modules/connection/mobile_hotspot.c @@ -73,14 +73,14 @@ enum { }; static const char *icon_path[TETHERING_MAX] = { - [TETHERING_MULTI_ON_CONNECTED] = "Tethering/b03_All_connected.png", - [TETHERING_MULTI_ON_NOT_CONNECTED] = "Tethering/b03_All_no_connected.png", - [TETHERING_BT_ON_CONNECTED] = "Tethering/b03_BT_connected.png", - [TETHERING_BT_ON_NOT_CONNECTED] = "Tethering/b03_BT_no_connected.png", - [TETHERING_USB_ON_CONNECTED] = "Tethering/b03_USB_connected.png", - [TETHERING_USB_ON_NOT_CONNECTED] = "Tethering/b03_USB_no_connected.png", - [TETHERING_WIFI_ON_CONNECTED] = "Tethering/b03_Wi_Fi_connected.png", - [TETHERING_WIFI_ON_NOT_CONNECTED] = "Tethering/b03_Wi_Fi_no_connected.png", + [TETHERING_MULTI_ON_CONNECTED] = "Tethering/b03_all_connected.png", + [TETHERING_MULTI_ON_NOT_CONNECTED] = "Tethering/b03_all_no_connected.png", + [TETHERING_BT_ON_CONNECTED] = "Tethering/b03_bt_connected.png", + [TETHERING_BT_ON_NOT_CONNECTED] = "Tethering/b03_bt_no_connected.png", + [TETHERING_USB_ON_CONNECTED] = "Tethering/b03_usb_connected.png", + [TETHERING_USB_ON_NOT_CONNECTED] = "Tethering/b03_usb_no_connected.png", + [TETHERING_WIFI_ON_CONNECTED] = "Tethering/b03_wi_fi_connected.png", + [TETHERING_WIFI_ON_NOT_CONNECTED] = "Tethering/b03_wi_fi_no_connected.png", }; static int updated_while_lcd_off = 0; diff --git a/src/modules/connection/wifi.c b/src/modules/connection/wifi.c index 22ad4b7..cbfd1ae 100644 --- a/src/modules/connection/wifi.c +++ b/src/modules/connection/wifi.c @@ -62,10 +62,10 @@ enum { }; static const char *icon_path[LEVEL_WIFI_MAX] = { - [LEVEL_WIFI_01] = "Connection/b03_data_downloading_Wifi_01.png", - [LEVEL_WIFI_02] = "Connection/b03_data_downloading_Wifi_02.png", - [LEVEL_WIFI_03] = "Connection/b03_data_downloading_Wifi_03.png", - [LEVEL_WIFI_04] = "Connection/b03_data_downloading_Wifi_04.png", + [LEVEL_WIFI_01] = "Connection/b03_data_downloading_wifi_01.png", + [LEVEL_WIFI_02] = "Connection/b03_data_downloading_wifi_02.png", + [LEVEL_WIFI_03] = "Connection/b03_data_downloading_wifi_03.png", + [LEVEL_WIFI_04] = "Connection/b03_data_downloading_wifi_04.png", }; static int transfer_state = -1; diff --git a/src/modules/processing/call_divert.c b/src/modules/processing/call_divert.c index 0f32df1..0490f01 100644 --- a/src/modules/processing/call_divert.c +++ b/src/modules/processing/call_divert.c @@ -47,7 +47,7 @@ icon_s call_divert = { .priority = ICON_PRIORITY, .always_top = EINA_FALSE, .exist_in_view = EINA_FALSE, - .img_obj = {0,}, + .img_obj.data = "Call divert/b03_call_divert_default.png", .obj_exist = EINA_FALSE, .init = register_call_divert_module, .fini = unregister_call_divert_module, @@ -59,8 +59,6 @@ icon_s call_divert = { }; static telephony_handle_list_s list; -static const char *icon_path = "Call divert/b03_call_divert_default.png"; - static void set_app_state(void *data) { @@ -69,7 +67,6 @@ static void set_app_state(void *data) static void _show_image_icon() { - call_divert.img_obj.data = icon_path; icon_show(&call_divert); } diff --git a/src/modules/processing/transfer.c b/src/modules/processing/transfer.c index 3e3d8f3..b78abfd 100644 --- a/src/modules/processing/transfer.c +++ b/src/modules/processing/transfer.c @@ -43,10 +43,10 @@ static char *access_info_cb(void *data, Evas_Object *obj); static int transfer_type = -1; static const char *icon_path[TRANSFER_MAX] = { - [TRANSFER_NONE] = "Connection/b03_conection_not_updownload.png", + [TRANSFER_NONE] = "Connection/b03_connection_not_updownload.png", [TRANSFER_UP] = "Connection/b03_connection_upload.png", [TRANSFER_DOWN] = "Connection/b03_connection_download.png", - [TRANSFER_UPDOWN] = "Connection/b03_conection_updownload.png" + [TRANSFER_UPDOWN] = "Connection/b03_connection_updownload.png" }; icon_s transfer = { diff --git a/src/modules/setting/bluetooth.c b/src/modules/setting/bluetooth.c index 63d9c38..85aa532 100644 --- a/src/modules/setting/bluetooth.c +++ b/src/modules/setting/bluetooth.c @@ -72,8 +72,8 @@ enum { }; static const char *icon_path[LEVEL_MAX] = { - [LEVEL_BT_NOT_CONNECTED] = "Bluetooth, NFC, GPS/b03_bt_on_connected.png", - [LEVEL_BT_CONNECTED] = "Bluetooth, NFC, GPS/b03_bt_activated_on.png", + [LEVEL_BT_NOT_CONNECTED] = "Bluetooth, NFC, GPS/b03_bt_on_notconnected.png", + [LEVEL_BT_CONNECTED] = "Bluetooth, NFC, GPS/b03_bt_on_connected.png", [LEVEL_BT_HEADSET] = "Bluetooth, NFC, GPS/b03_bt_on_connected&headset.png", }; diff --git a/src/modules/setting/gps.c b/src/modules/setting/gps.c index 9cee556..743b607 100644 --- a/src/modules/setting/gps.c +++ b/src/modules/setting/gps.c @@ -44,7 +44,6 @@ icon_s gps = { .priority = ICON_PRIORITY, .always_top = EINA_FALSE, .exist_in_view = EINA_FALSE, - .img_obj = {0,}, .img_obj.data = "Bluetooth, NFC, GPS/b03_gps_on.png", .obj_exist = EINA_FALSE, .area = INDICATOR_ICON_AREA_SYSTEM, @@ -86,7 +85,6 @@ static void show_image_icon(void *data, int index) if(prevIndex == index) return; - gps.img_obj.data = "Bluetooth, NFC, GPS/b03_gps_on.png"; icon_show(&gps); prevIndex = index; diff --git a/src/util.c b/src/util.c index 82d27cc..899b67c 100644 --- a/src/util.c +++ b/src/util.c @@ -83,12 +83,12 @@ static Eina_List *ri_callbacks; static int wifi_init_cnt = 0; const reserved_t reserved_paths[] = { - {MSG_NORMAL_STATUS_ICON, "/Notify/b03_notify_message.png"}, - {MSG_FAILED_STATUS_ICON, "/Notify/b03_notify_message_failed.png"}, - {MSG_DELIVER_REPORT_STATUS_ICON, "/Event/b03_event_delivery_report_message.png"}, - {MSG_READ_REPORT_STATUS_ICON, "/Event/b03_event_read_report_message.png"}, - {MSG_VOICE_MSG_STATUS_ICON, "/Event/b03_Event_voicemail.png"}, - {MSG_SIM_FULL_STATUS_ICON, "/SIM/b03_sim_card_full.png"} + {MSG_NORMAL_STATUS_ICON, "Notify/b03_notify_message.png"}, + {MSG_FAILED_STATUS_ICON, "Notify/b03_notify_message_failed.png"}, + {MSG_DELIVER_REPORT_STATUS_ICON, "Event/b03_event_delivery_report_message.png"}, + {MSG_READ_REPORT_STATUS_ICON, "Event/b03_event_read_report_message.png"}, + {MSG_VOICE_MSG_STATUS_ICON, "Event/b03_event_voicemail.png"}, + {MSG_SIM_FULL_STATUS_ICON, "SIM/b03_sim_card_full.png"} }; @@ -463,23 +463,20 @@ char *util_get_real_path(char *special_path) retvm_if(!special_path, 0, "path:%s", special_path); char *real_path = NULL; - + int size; int i; + for (i = 0; i < ARRAY_SIZE(reserved_paths); ++i) { + if (!strcmp(special_path, reserved_paths[i].path)) { - real_path = calloc( - strlen(util_get_icon_dir()) - + strlen(reserved_paths[i].icon) - + 1, - sizeof(char)); + size = strlen(util_get_icon_dir()) + strlen(reserved_paths[i].icon) + 2; /* +2 is for '/' and NULL*/ + real_path = calloc(size, sizeof(char)); if (!real_path) return NULL; - snprintf(real_path, - strlen(util_get_icon_dir()) + strlen(reserved_paths[i].icon) + 1, - "%s%s", util_get_icon_dir(), reserved_paths[i].icon); + snprintf(real_path, size, "%s/%s", util_get_icon_dir(), reserved_paths[i].icon); return real_path; }