diff --git a/data/themes/default.edc b/data/themes/default.edc index 4f2d082ff..6f04d133b 100644 --- a/data/themes/default.edc +++ b/data/themes/default.edc @@ -7871,12 +7871,65 @@ collections { ///////////////////////////////////////////////////////////////////////////// /*** MOD: CONNMAN ***/ +#define MSG_ID_STRENGTH 1 + +#define CONNMAN_STATE_PART_ADD() \ + part { \ + name: "state"; \ + type: IMAGE; \ + mouse_events: 0; \ + description { \ + state: "default" 0.0; \ + aspect: 1 1; \ + aspect_preference: BOTH; \ + color: 255 255 255 0; \ + image.normal: "connman_status_ready"; \ + rel1.relative: 1 0; \ + align: 1 1; \ + min: 8 8; \ + } \ + description { \ + state: "ready" 0.0; \ + inherit: "default" 0.0; \ + color: 255 255 255 255; \ + } \ + description { \ + state: "online" 0.0; \ + inherit: "default" 0.0; \ + color: 255 255 255 255; \ + image.normal: "connman_status_online"; \ + } \ + } + #define CONNMAN_ICON(_icon) \ group { \ name: "e/modules/connman/icon/"##_icon; \ + script { \ + public message(Msg_Type:type, id, ...) { \ + if ((type == MSG_INT_SET) && (id == MSG_ID_STRENGTH)) { \ + new state = getarg(2); \ + /* Connecting if in association or configuration */ \ + if ((state == 2)) \ + { \ + set_state(PART:"state", "default", 0.0); \ + run_program(PROGRAM:"connecting"); \ + return; \ + } \ + if ((state == 3)) \ + return; \ + if ((state == 4)) \ + set_state(PART:"state", "ready", 0.0); \ + else if ((state == 5)) \ + set_state(PART:"state", "online", 0.0); \ + else \ + set_state(PART:"state", "default", 0.0); \ + set_state(PART:"icon", "default", 0.0); \ + } \ + } \ + } \ parts { \ part { \ - name: #_icon; \ + name: "icon"; \ type: IMAGE; \ mouse_events: 0; \ description { \ @@ -7886,6 +7939,28 @@ collections { image.image: "connman_"##_icon##".png" COMP; \ image.normal: "connman_"##_icon##".png"; \ } \ + description { \ + state: "hidden" 0.0; \ + inherit: "default" 0.0; \ + color: 255 255 255 0; \ + } \ + } \ + CONNMAN_STATE_PART_ADD() \ + } \ + programs { \ + program { \ + name: "connecting"; \ + action: STATE_SET "hidden" 0.0; \ + transition: ACCEL 0.3; \ + target: "icon"; \ + after: "connecting,2"; \ + } \ + program { \ + name: "connecting,2"; \ + action: STATE_SET "default" 0.0; \ + transition: DECEL 0.3; \ + target: "icon"; \ + after: "connecting"; \ } \ } \ } @@ -7914,8 +7989,6 @@ CONNMAN_ICON(ethernet) group { name: "e/modules/connman/icon/wifi"; -#define MSG_ID_STRENGTH 1 - #define CONNMAN_BAR_IMAGES_SET(_name) \ images { \ set { \ @@ -7984,12 +8057,20 @@ CONNMAN_ICON(ethernet) /* Connecting if in association or configuration */ if ((state == 2)) { + set_state(PART:"state", "default", 0.0); run_program(PROGRAM:"connecting"); return; } if ((state == 3)) return; + if ((state == 4)) + set_state(PART:"state", "ready", 0.0); + else if ((state == 5)) + set_state(PART:"state", "online", 0.0); + else + set_state(PART:"state", "default", 0.0); + set_state(PART:"bar_0_on", "visible", 0.0); set_tween_state(PART:"bar_1_on", (str - (100/3) * 0) / (100/3), "default", 0.0, "visible", 0.0); @@ -8066,6 +8147,9 @@ CONNMAN_ICON(ethernet) color: 255 255 255 255; } } + CONNMAN_IMAGES_SET(status_ready) + CONNMAN_IMAGES_SET(status_online) + CONNMAN_STATE_PART_ADD() } programs { program { @@ -8081,6 +8165,7 @@ CONNMAN_ICON(ethernet) signal: "e,unavailable"; source: "e"; action: STATE_SET "default" 0.0; + target: "bar_0_on"; target: "bar_1_on"; target: "bar_2_on"; target: "bar_3_on"; @@ -8112,6 +8197,12 @@ CONNMAN_ICON(ethernet) target: "bar_1_on"; target: "bar_2_on"; target: "bar_3_on"; + after: "connecting,2"; + } + program { + name: "connecting,2"; + action: STATE_SET "visible" 0.0; + target: "bar_0_on"; after: "connecting,1,on"; } CONNMAN_CONNECTING_ON(1, 2) @@ -8162,32 +8253,6 @@ CONNMAN_ICON(ethernet) CONNMAN_IMAGES_SET(security2) parts { - part { - name: "state"; - type: IMAGE; - mouse_events: 0; - description { - state: "default" 0.0; - aspect: 1 1; - aspect_preference: BOTH; - color: 255 255 255 0; - image.image: "connman_ready.png" COMP; - image.normal: "connman_ready.png"; - rel2.relative: 0.3 1; - } - description { - state: "ready" 0.0; - inherit: "default" 0.0; - color: 255 255 255 255; - } - description { - state: "online" 0.0; - inherit: "default" 0.0; - color: 255 255 255 255; - image.image: "connman_online.png" COMP; - image.normal: "connman_online.png"; - } - } part { name: "security"; type: IMAGE; @@ -8197,7 +8262,6 @@ CONNMAN_ICON(ethernet) aspect: 1 1; aspect_preference: BOTH; color: 255 255 255 0; - rel1.relative: 0.3 0; image.normal: "connman_security1"; } description { @@ -8214,27 +8278,6 @@ CONNMAN_ICON(ethernet) } } programs { - program { - name: "state,idle"; - signal: "e,state,idle"; - source: "e"; - action: STATE_SET "default" 0.0; - target: "state"; - } - program { - name: "state,ready"; - signal: "e,state,ready"; - source: "e"; - action: STATE_SET "ready" 0.0; - target: "state"; - } - program { - name: "state,online"; - signal: "e,state,online"; - source: "e"; - action: STATE_SET "online" 0.0; - target: "state"; - } program { name: "security,off"; signal: "e,security,off"; @@ -8266,6 +8309,7 @@ CONNMAN_ICON(ethernet) } } +#undef CONNMAN_STATE_PART_ADD #undef CONNMAN_IMAGES_SET ///////////////////////////////////////////////////////////////////////////// diff --git a/data/themes/images/Makefile.am b/data/themes/images/Makefile.am index 30bb8a00c..0b91ee188 100644 --- a/data/themes/images/Makefile.am +++ b/data/themes/images/Makefile.am @@ -77,12 +77,14 @@ clock_base.png \ connman_bluetooth.png \ connman_cellular.png \ connman_ethernet.png \ -connman_online.png \ -connman_ready.png \ connman_security1_128.png \ connman_security1_32.png \ connman_security2_128.png \ connman_security2_32.png \ +connman_status_online_128.png \ +connman_status_online_32.png \ +connman_status_ready_128.png \ +connman_status_ready_32.png \ connman_wifi_0_on_128.png \ connman_wifi_0_on_32.png \ connman_wifi_1_on_128.png \ diff --git a/data/themes/images/connman_online.png b/data/themes/images/connman_online.png deleted file mode 100644 index fb485c5ca..000000000 Binary files a/data/themes/images/connman_online.png and /dev/null differ diff --git a/data/themes/images/connman_ready.png b/data/themes/images/connman_ready.png deleted file mode 100644 index 137aa05ed..000000000 Binary files a/data/themes/images/connman_ready.png and /dev/null differ diff --git a/data/themes/images/connman_status_online_128.png b/data/themes/images/connman_status_online_128.png new file mode 100644 index 000000000..a331e98a8 Binary files /dev/null and b/data/themes/images/connman_status_online_128.png differ diff --git a/data/themes/images/connman_status_online_32.png b/data/themes/images/connman_status_online_32.png new file mode 100644 index 000000000..df687841a Binary files /dev/null and b/data/themes/images/connman_status_online_32.png differ diff --git a/data/themes/images/connman_status_ready_128.png b/data/themes/images/connman_status_ready_128.png new file mode 100644 index 000000000..5bc5d5c52 Binary files /dev/null and b/data/themes/images/connman_status_ready_128.png differ diff --git a/data/themes/images/connman_status_ready_32.png b/data/themes/images/connman_status_ready_32.png new file mode 100644 index 000000000..e69c17621 Binary files /dev/null and b/data/themes/images/connman_status_ready_32.png differ diff --git a/src/modules/connman/e_mod_main.c b/src/modules/connman/e_mod_main.c index 1c3702a80..e21badcf1 100644 --- a/src/modules/connman/e_mod_main.c +++ b/src/modules/connman/e_mod_main.c @@ -53,7 +53,6 @@ static Evas_Object * _econnman_service_new_icon(struct Connman_Service *cs, static Evas_Object * _econnman_service_new_end(struct Connman_Service *cs, Evas *evas) { - const char *state = econnman_state_to_str(cs->state); Eina_Iterator *iter; Evas_Object *end; void *security; @@ -63,12 +62,6 @@ static Evas_Object * _econnman_service_new_end(struct Connman_Service *cs, e_theme_edje_object_set(end, "base/theme/modules/connman", "e/modules/connman/end"); - if (state) - { - snprintf(buf, sizeof(buf), "e,state,%s", state); - edje_object_signal_emit(end, buf, "e"); - } - if (!cs->security) return end;