Icons related fixes and refactor. 85/93285/3
authorRadoslaw Czerski <r.czerski@samsung.com>
Fri, 21 Oct 2016 11:53:17 +0000 (13:53 +0200)
committerRadoslaw Czerski <r.czerski@samsung.com>
Fri, 21 Oct 2016 11:53:17 +0000 (13:53 +0200)
Typos fixed.
Unused files removed.
BT icons changed.

Change-Id: Idfec29b90c598236c02949761bf1bf5129f49d03
Signed-off-by: Radoslaw Czerski <r.czerski@samsung.com>
20 files changed:
res/resource/icons/Bluetooth, NFC, GPS/b03_bt_on_notconnected.png [moved from res/resource/icons/Bluetooth, NFC, GPS/b03_bt_activated_on.png with 55% similarity]
res/resource/icons/quickpanel_icon_default.png [new file with mode: 0644]
res/resource/icons_edc/B03_OrangeF.png [deleted file]
res/resource/icons_edc/B03_indicator_bg.png [deleted file]
res/resource/icons_edc/B03_not_conection_UPdownload.png [deleted file]
res/resource/icons_edc/B03_notify_more.png [deleted file]
res/resource/icons_edc/B03_search_divider.png [deleted file]
res/resource/icons_edc/b03_connection_download.png [moved from res/resource/icons_edc/B03_connection_UPload.png with 54% similarity, mode: 0644]
res/resource/icons_edc/b03_connection_not_updownload.png [moved from res/resource/icons_edc/B03_connection_download.png with 55% similarity, mode: 0644]
res/resource/icons_edc/b03_connection_updownload.png [moved from res/resource/icons_edc/B03_conection_UPdownload.png with 54% similarity, mode: 0644]
res/resource/icons_edc/b03_connection_upload.png [moved from res/resource/icons_edc/B03_conection_not_UPdownload.png with 54% similarity, mode: 0644]
res/resource/indicator_port.edc
src/modules/connection/connection.c
src/modules/connection/mobile_hotspot.c
src/modules/connection/wifi.c
src/modules/processing/call_divert.c
src/modules/processing/transfer.c
src/modules/setting/bluetooth.c
src/modules/setting/gps.c
src/util.c

similarity index 55%
rename from res/resource/icons/Bluetooth, NFC, GPS/b03_bt_activated_on.png
rename to res/resource/icons/Bluetooth, NFC, GPS/b03_bt_on_notconnected.png
index 14e078a..9da7771 100644 (file)
Binary files a/res/resource/icons/Bluetooth, NFC, GPS/b03_bt_activated_on.png 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 (file)
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 (file)
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_indicator_bg.png b/res/resource/icons_edc/B03_indicator_bg.png
deleted file mode 100644 (file)
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 (executable)
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 (executable)
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 (file)
index d90ad78..0000000
Binary files a/res/resource/icons_edc/B03_search_divider.png and /dev/null differ
old mode 100755 (executable)
new mode 100644 (file)
similarity index 54%
rename from res/resource/icons_edc/B03_connection_UPload.png
rename to res/resource/icons_edc/b03_connection_download.png
index 48f4806..959e5d0
Binary files a/res/resource/icons_edc/B03_connection_UPload.png and b/res/resource/icons_edc/b03_connection_download.png differ
old mode 100755 (executable)
new mode 100644 (file)
similarity index 55%
rename from res/resource/icons_edc/B03_connection_download.png
rename to res/resource/icons_edc/b03_connection_not_updownload.png
index 25802b0..f221e33
Binary files a/res/resource/icons_edc/B03_connection_download.png and b/res/resource/icons_edc/b03_connection_not_updownload.png differ
old mode 100755 (executable)
new mode 100644 (file)
similarity index 54%
rename from res/resource/icons_edc/B03_conection_UPdownload.png
rename to res/resource/icons_edc/b03_connection_updownload.png
index d59226c..ec8c210
Binary files a/res/resource/icons_edc/B03_conection_UPdownload.png and b/res/resource/icons_edc/b03_connection_updownload.png differ
old mode 100755 (executable)
new mode 100644 (file)
similarity index 54%
rename from res/resource/icons_edc/B03_conection_not_UPdownload.png
rename to res/resource/icons_edc/b03_connection_upload.png
index bbb6e47..4920840
Binary files a/res/resource/icons_edc/B03_conection_not_UPdownload.png and b/res/resource/icons_edc/b03_connection_upload.png differ
index 29dd527..3c1a7f0 100644 (file)
 #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;
                                }
index 7d904c0..ea9bc26 100644 (file)
@@ -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)
index 4d5cb66..0c91b6b 100644 (file)
@@ -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;
index 22ad4b7..cbfd1ae 100644 (file)
@@ -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;
index 0f32df1..0490f01 100644 (file)
@@ -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);
 }
 
index 3e3d8f3..b78abfd 100644 (file)
@@ -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 = {
index 63d9c38..85aa532 100644 (file)
@@ -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",
 };
 
index 9cee556..743b607 100644 (file)
@@ -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;
index 82d27cc..899b67c 100644 (file)
@@ -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;
                }