From f07ce72c1517b0da59a8e50ed5aef908578e237e Mon Sep 17 00:00:00 2001 From: Abhishek Sansanwal Date: Tue, 2 May 2017 09:49:05 +0530 Subject: [PATCH] Added fixes for wired and wireless network UI Signed-off-by: Abhishek Sansanwal Change-Id: I80e49a0872c36085129658941477781f75857f77 Signed-off-by: Saurav Babu --- CMakeLists.txt | 1 + include/common/datamgr.h | 1 + include/common/listmgr.h | 7 +- include/common/viewmgr.h | 8 + include/define.h | 2 + include/layout.h | 7 + include/layout/network.h | 16 + include/view/network/view_wireless_scanning.h | 28 + res/images/img_settings_network_Failed.png | Bin 0 -> 1330 bytes res/images/img_settings_network_completed.png | Bin 0 -> 1346 bytes res/images/img_settings_network_dot.png | Bin 0 -> 967 bytes res/images/img_settings_network_dot10.png | Bin 0 -> 292 bytes res/images/img_settings_network_tv.png | Bin 0 -> 1625 bytes res/images/img_settings_network_web.png | Bin 0 -> 3224 bytes res/layout/network.edc | 3052 ++++++++++++++++++++++++- res/widget/gengrid_network.edc | 54 +- res/widget/popup.edc | 10 +- src/common/datamgr.c | 1 + src/common/listmgr.c | 2 - src/common/utils.c | 2 +- src/data/system/data_wireless.c | 4 + src/grid/grid_wireless.c | 2 +- src/layout/layout_network.c | 466 +++- src/view/network/view_wired.c | 0 src/view/network/view_wireless.c | 1 + src/view/network/view_wireless_list.c | 95 +- src/view/network/view_wireless_scanning.c | 355 +++ src/view/system/view_language.c | 1 - src/view/view_new_network.c | 501 +++- 29 files changed, 4317 insertions(+), 299 deletions(-) create mode 100644 include/view/network/view_wireless_scanning.h create mode 100644 res/images/img_settings_network_Failed.png create mode 100644 res/images/img_settings_network_completed.png create mode 100644 res/images/img_settings_network_dot.png create mode 100644 res/images/img_settings_network_dot10.png create mode 100644 res/images/img_settings_network_tv.png create mode 100644 res/images/img_settings_network_web.png create mode 100644 src/view/network/view_wired.c create mode 100644 src/view/network/view_wireless_scanning.c diff --git a/CMakeLists.txt b/CMakeLists.txt index d466d91..8f9aaf0 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -99,6 +99,7 @@ SET(SRCS src/view/system/view_reset.c src/view/network/view_wireless.c src/view/network/view_wireless_list.c + src/view/network/view_wireless_scanning.c src/view/view_base.c src/view/view_new_network.c ) diff --git a/include/common/datamgr.h b/include/common/datamgr.h index 9e326e1..6824699 100644 --- a/include/common/datamgr.h +++ b/include/common/datamgr.h @@ -30,6 +30,7 @@ enum event_type { EVENT_DATA_CHANGED, EVENT_DATA_SELECT_DONE, EVENT_DATA_SELECT_FAIL, + EVENT_DATA_CONNECTED, EVENT_DATA_UPDATE_WIRED, EVENT_DATA_RETRY_WIRED, }; diff --git a/include/common/listmgr.h b/include/common/listmgr.h index f034219..7051440 100644 --- a/include/common/listmgr.h +++ b/include/common/listmgr.h @@ -41,12 +41,12 @@ struct listmgr *listmgr_create(Evas_Object *parent); bool listmgr_destroy(struct listmgr *listmgr); /** -* @brief Gets the gengrid to managed by list manager and return it. +* @brief Gets the gengrid managed by list manager and return it. * * @param[in] listmgr A list manager pointer. * @param[in] list_id Unique new list identifier. * -* @return True on success, false otherwise. +* @return Evas_Object pointer, NULL on failure. */ Evas_Object *listmgr_get_list(struct listmgr *listmgr, const char *list_id); /** @@ -59,9 +59,8 @@ Evas_Object *listmgr_get_list(struct listmgr *listmgr, const char *list_id); * @param[in] selected_cb Callback called every time a gengrid item is selected. * @param[in] cb_data A data to be passed to selected_cb callback * -* @return Evas_Object pointer, NULL on failure. +* @return True on success, false otherwise. */ - bool listmgr_add_list(struct listmgr *listmgr, const char *list_id, struct grid_class *gclass, void (*selected_cb)(Elm_Object_Item *it, void *data), diff --git a/include/common/viewmgr.h b/include/common/viewmgr.h index d6035fd..2bcad6c 100644 --- a/include/common/viewmgr.h +++ b/include/common/viewmgr.h @@ -40,6 +40,14 @@ typedef struct _view_class { void (*resume)(void *view_data); } view_class; +enum list_type { + GRID_UPDATE = 0, + GRID_FILL, + GRID_HIDE, + GRID_FOREACH, + GRID_SHOW +}; + enum update_type { UPDATE_FOCUS = 0, UPDATE_SUB_ITEM_SELECTED, diff --git a/include/define.h b/include/define.h index 051a135..0ca77dc 100644 --- a/include/define.h +++ b/include/define.h @@ -29,6 +29,7 @@ /* View ID - System */ #define VIEW_WIRELESS "VIEW_WIRELESS" #define VIEW_WIRELESS_LIST "VIEW_WIRELESS_LIST" +#define VIEW_WIRELESS_SCANNING "VIEW_WIRELESS_SCANNING" #define VIEW_WIRED "VIEW_WIRED" /* View ID - System */ @@ -128,6 +129,7 @@ #define STYLE_DISABLE_BTN "style.disable.button" #define STYLE_DATETIME "style.datetime" #define STYLE_POPUP "style.popup" +#define STYLE_DATETIME "style.datetime" /* Signals */ #define SIG_FOCUSED "elm,action,focus" diff --git a/include/layout.h b/include/layout.h index ae501c9..b2c2ae1 100644 --- a/include/layout.h +++ b/include/layout.h @@ -37,6 +37,13 @@ enum layout_type { }; +Evas_Object *connecting_wired_popup; +Evas_Object *connected_wired_popup; +Evas_Object *failed_wired_popup; +Evas_Object *connecting_wireless_popup; +Evas_Object *connected_wireless_popup; +Evas_Object *failed_wireless_popup; + /** * @brief Get the pointer to the layout_class object of picture layout. * diff --git a/include/layout/network.h b/include/layout/network.h index 2e16adc..ba0e148 100644 --- a/include/layout/network.h +++ b/include/layout/network.h @@ -26,6 +26,9 @@ #define GRP_CONTENT_NETWORK_POPUP "grp.content.network.popup" #define GRP_CONTENT_NETWORK_POPUP_LIST "grp.content.network.popup.list" +#define GRP_CONNECTING_IMAGE_NETWORK_POPUP "grp.connecting.image.network.popup" +#define GRP_CONNECTED_IMAGE_NETWORK_POPUP "grp.connected.image.network.popup" +#define GRP_FAILED_IMAGE_NETWORK_POPUP "grp.failed.image.network.popup" /* Style */ #define STYLE_GRID_WIRELESS "style.grid.wireless" @@ -65,11 +68,18 @@ #define STR_NO_NETWORK "No network connection.
Please check your network." #define STR_ENTER_PASSCODE "Enter password" #define STR_WIRED_PROGRESS "Checking wired network connection..." +#define STR_WIRELESS_PROGRESS "Checking wireless network connection..." #define STR_WIRED_COMPLETED "Wired network connection." +#define STR_WIRELESS_COMPLETED "Wireless network connection." #define STR_WIRED_FAILED "Wired network connection failed.
Press retry button or plug a network cable into the back of your TV." #define STR_OK "OK" #define STR_CANCEL "Cancel" #define STR_WIRELESS_WRONG_PWD "Wrong password" +#define STR_AUTOMATICALLY "Obtain Automatically" +#define STR_MAUALLY "Enter Manually" +#define STR_CONNECT "Connect" +#define STR_DISCONNECT "Disconnect" +#define STR_DELETE "Delete" /* Count */ #define COUNT_NETWORK_TYPE 3 @@ -123,4 +133,10 @@ #define IC_NETWORK_WIRED_COMPLETE_PNG "ic_wired_complete.png" #define IC_NETWORK_WIRED_FAIL_PNG "ic_wired_fail.png" +#define IC_SETTINGS_NETWORK_COMPLETED_PNG "img_settings_network_completed.png" +#define IC_SETTINGS_NETWORK_DOT_PNG "img_settings_network_dot.png" +#define IC_SETTINGS_NETWORK_DOT10_PNG "img_settings_network_dot10.png" +#define IC_SETTINGS_NETWORK_FAILED_PNG "img_settings_network_Failed.png" +#define IC_SETTINGS_NETWORK_TV_PNG "img_settings_network_tv.png" +#define IC_SETTINGS_NETWORK_WEB_PNG "img_settings_network_web.png" #endif /* __AIR_SETTINGS_LAYOUT_NETWORK_H__ */ diff --git a/include/view/network/view_wireless_scanning.h b/include/view/network/view_wireless_scanning.h new file mode 100644 index 0000000..d78f445 --- /dev/null +++ b/include/view/network/view_wireless_scanning.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __AIR_SETTINGS_VIEW_WIRELESS_SCANNING_H__ +#define __AIR_SETTINGS_VIEW_WIRELESS_SCANNING_H__ + +/** +* @brief Get the pointer to the view_class object of language view. +* +* @return The pointer to language view_class object. +*/ +view_class *view_wireless_scanning_get_vclass(void); + +#endif /* __AIR_SETTINGS_VIEW_WIRELESS_SCANNING_H__ */ + diff --git a/res/images/img_settings_network_Failed.png b/res/images/img_settings_network_Failed.png new file mode 100644 index 0000000000000000000000000000000000000000..9ac6956cee90635beb74d76eb60f860c16ebc3e2 GIT binary patch literal 1330 zcmeAS@N?(olHy`uVBq!ia0vp^Mj*_=1|;R|J2nC-$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@%u1Od5hW46K32*3xq68pHF_1f1wh>l3^w)^1&PVosU-?Y zsp*+{wo31J?^jaDOtDo8H}y5}EpSfF$n>ZxN)4{^3rViZPPR-@vbR&PsjvbXkegbP zs8ErclUHn2VXFi-*9yo63F|81#=KlDb#X~hD#E>34K5C;EJ)Q4 zN-fSWElLJPT$(b-ssbzLqSVBa{GyQj{2W*)24v)yG;=mGGH^0BG;}q$aJ6)CG;(t@Fm^LF zaxrj)>2=9ZF3nBND}m`vLFhHcsTY(KatnYqyQCInmZhe+73JqDfW2&$iQ6p(IL(9V zO~LIJL!5f`fsWA!MJ!T8!-RmT2gHOYTObFX@Kf`Esl5o8tfS9GHZd?TF7tG845_$v z=azTYVFLlSgy;5+;+Zj|nr{_iZ!p^zY16pOAmk(j!LYp7kM%Bc6|3A02m`#$I*s z&eofbVg3@w?rbf!ng5*OCF|y{0`(0$GQRch|H1A5&uw$ZQ~uuB-D{KP^@**ylfo-( z`sCyJvtb4oKa25mW%hbj{dnM+xYppLe}Icfl=S4UQVuB(w;J4hZ=@1(=$Odf2@@kE zxr6tta&TLEOJeF$K_l(!hgPh8AMn9@T2hGkN)4IYJ0-qOH4{9G+%)g}0;WY?cFkTKR&1hzAv{{j84@NA0R|Z@0mm08I*B$P z<1ppnQ3x?GXwo=#KwuFEb8<%x50BC&1A{J)V+RbBIGG=JWbjxyxFni=c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxSU1_g&``n5OwZ87 z)XdCKN5ROz&`93^h|F{iO{`4Ktc=VRpg;*|TTx1yRgjAt)Gi>;Rw<*Tq`*pFzr4I$ zuiRKKzbIYb(9+TpWQLKEE>MMTab;dfVufyAu`f(~1RD^r68eAMwS&*t9 zlvv ztM~P_^2{qPNz6-5^>ndS0-B(gnVDkcWNL0;>SpF1OC?=HlpT zVq|Iv)9aF-T$-DjR|3$>UAvdg z5wY_h_hbXk$#-wgeLc^X*O|}8z$G`BpM*NiQ#gODw>;&B%umg# zH033qs!fF6@a)WF-dS{5Kq6ZK@KhmKXZORr%#E*G(JNki_B(;+s?z<(-%M^x9xiXD%Ct){an^LB{Ts5 D1N+&i literal 0 HcmV?d00001 diff --git a/res/images/img_settings_network_dot.png b/res/images/img_settings_network_dot.png new file mode 100644 index 0000000000000000000000000000000000000000..9c6457931c5f9f780b2910dd39c663aac011e546 GIT binary patch literal 967 zcmaJ=zi-n(6n0gqf{KiQKth~c1}YK%YVFo0rb+CCMAT7~1~p?H`;wT{KG(irCt^Sy z5FPj@5E5cx=t?ETz<|Ub04yLRSo;rT;GD)O1L0)fy*qv1_ujqt?xuhZwYB*YQ;P^xbjr)eSyV`I~2d4@}_lmZRo z|4`SRp+nq&=kfkiIBX7m$Tnbz27yHi*I7wi`HB`m6QiJs(0-c5dJka~_K**>9SPjt zbvzqI;pzl$7)sR(vFTZ`s;e|nU>wI*I7t@yl2#D7BFTDbV^h=0x*$rjE|iF^rCc3Z z0~dNY<=W@m;#_Xh3a(E)>o9O0L%SRx7fi0KIP+uKoU1qG+Vf+P=Wcr!3V_LKnzm^at#9$5W`f0_%Of)lE4Z;5+F0t!8ec{ lzknEIJ_`{42jXu){H0|Ehs1^_k)c2~gQu&X%Q~loCIBtFCl~+# literal 0 HcmV?d00001 diff --git a/res/images/img_settings_network_tv.png b/res/images/img_settings_network_tv.png new file mode 100644 index 0000000000000000000000000000000000000000..ca6b12b0ee0b7892ec923bd9b88cd6180fff1311 GIT binary patch literal 1625 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGok|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+n3Xa^B1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxSU1_g&``n5OwZ87 z)XdCKN5ROz&`93^h|F{iO{`4Ktc=VRpg;*|TTx1yRgjAt)Gi>;Rw<*Tq`*pFzr4I$ zuiRKKzbIYb(9+TpWQLKEE>MMTab;dfVufyAu`f(~1RD^r68eAMwS&*t9 zlvv ztM~P_^2{qPNz6-5^>ndS0-B(gnVDkcWM<-K=4k0?WZ>v(Xy|J0Xzps_?Cj!ZX6a&J zZsKeK)9aF-T$-DjR|3v4~Pj*wm=R%;iu*SQ+p9GSvULUB{MKEo%M8a45_&F zX71@M5l4}>-DfMDAGz&m&~tHhaSRBYqtW!hX;Xl_0&AO|Y??ZvIoGAxmD}Heq7XlXFQHEV04UR(j^?RG;Mg_1iL#eBP;uf1LC(mVN6J)5TVIEUJHtF8Gtue0kMV+?DdWEaS33tmhuh`hbs z-%@sK{NKdei%$hiuYFT%;XkEy#b2`tt(){r!n5L)7-vtN>}7kR@Bf#(@2CD$;Gd%3 zte21ipfZEd?Mvso#Eq>!w$+rLXr|s6k-xh2?Wjp;+ zfSjx3{dp&Y4#?@3-Q8YRw*GzL{Q{o+ii`0}bB_O8z`OUHBIo_R(^Yaeyq#^tbz{LC zjy56d8+U8p+~?`K`{CoyVmI}>V)N78m^5$yx>0}f_6(j_{;Bz{92U!CJ~eMxn3~-G z`)0Ms{HpNz-sFuN@>jd8%wO~I zDb~~-Ow*qozIUxKzk2iWkanpoA&|CAFdUi)r-c&GoV*z>2NJT13mb=ba{ zU%uKijoVP#JYMU2Gv}$Ue}xWW8={#d)t-f1`B(2{d{u_w4!09HMKQ2A?E52@z_9Vw V6|0r@OaFlidrwzCmvv4FO#s9bPuBnd literal 0 HcmV?d00001 diff --git a/res/images/img_settings_network_web.png b/res/images/img_settings_network_web.png new file mode 100644 index 0000000000000000000000000000000000000000..625b50ee25a251961facdc281c8533760b420f21 GIT binary patch literal 3224 zcmaJ^c{r47AAZmvS+Xa^7(1B_gNb265yMz2*_tskn3x&NU^p$Z6h%2%(m|$DDT+|p zvZQc^l9G}{<~Wu_vAvkc0?(S}5Hq zK8ofQ@8(U352IL7VYWD^H5V%sV9+>ZD3=k=WMjEDuy49p;eN%8fI+`OIAJ!he}eKM z5TW+0C>qopZfZh7qEJu_297c_$6!#KplBotjX(--j0wsNYmUL9Euh~on9y4kH5lvZ zu=Tqy;mHOT%Hc#{5s28>Sa_@{oD~&JC4aAb4{3R?H>vbG&UuQ z9>Jlrn9vnPau6$;V*?XL`cDdsh@Y}d_V+Rg3x?p5BM>M!awVl7Kmy_aLm7;pXg0@_ z_HVrZQ<&`?7ePaK(%7u%D2lLg!P+aXBCz&RG%|-3<;`M+|EMA{l*M7OLs=0}doK*s zU>BW9WyP`$zu^f4tTU6%Au}m7X9pXYPytS-Q?U*hjJ+uyZ-z$Vx1vyv7I;Tc3p`UvgJQfe|6}>_Cg6$Iz%-qgV{+x0JE;U&n&} zrQUZg_1CeO{*sFj27_2>?0+@-heT_Y?NP$9ezL~t2mq_4ogMJr z+~-pP?x8B%lnxH5<_|ZOnS(1_P%&v#`@z^M%B=C*YttK_PDpt zX1X6d_-)2w^ShV%{rv?3OOhdu@2BVkHi6uc^J;T)wf=DDx%gnaC8bSMhkF=d@EjG|=ds$#D*)DCTEZEtm{`Of{4XilK9gSjR0d!iH_{Yi{lVp!|kn`5RI|)%9r` zgJYY94ESfMJ$trMXVG#pn+yI%e%;w~ zv=J}ocyWL6(0;!vxEBDg6}~Lv?kz*IcVB2PC>E`dzAbI^meIBmKE~1;+fO3ySu4aS zjat+fJU)aa7K#&}I*3%P|3Wt!zpQ}6x$D1ZebeGY z(?AvlD-e}^1x+54$HkZGO7Nh=a7h3!k~(mFtVqtVK~6ovn*TSi>_CZ&yuO1}b4r*3r_8ZxfK z!oi$p&>PHrzLUIJ>L_kC>XI@9B%rYdReOA4j$I)x(N%h2DwA0yd*26Noj$1qh=gg* zM$IPs%AVsDU|3P{e4Uug*)K>Nc~L{*2Qxk>v?F&C; zD#Z1vr)zPJs{yY|c9NGreBLxn!c}D0W!v~<3PXIme@kV)r)0BU!$;+$$^jnthU3-M zV325i=-R-7x^rI@HU)UMa&oJChT%NLFN1Z!+e!5qg=eSl>VCjpN@V!GabVM9-jv2= zkzE}io8Mlhe@KM|xh*bQ)m5B;)frkvO%&@OXtS?#nweNd zA8$(Xxf|{Ah#!73v1Z6c-`7=~`0^m`-du`OEFRME)vGl!Tv5sWh4*JQu|E8)FCi-} z%i{Xd2T8vWD*$?1@P!<@o>IAEz*vYh&(zO0DA3_lV4J|v$u=OH^XP13^;!PSYoPjM zx4uk@%EU7lH86a#I166Lxqejv;Isx^8;dYy@0G0s9{_Mlw~&+eyh5#`xJfEOZ=`&# zwr9=ZoW|t#7HNPqm?(BpeV7Yt+&d>~_b_h57ec7K28#+3)K9wAy;ov#qLb9xR#gXF_ZXkKbkla!+>KAI^D_>4aR9 z?_sHm#rg0- zkACi9m+?&{kC1l}Yfl;Tm0GM%b$bvYJ@*|hZO_TrA-8uxCYg^av2?rUZFI-;bVui< zQIRBPOjbF}GQE)%b~oVR+Q>KOHn6!^va;*wd%_&$#k+}5V$GHl=jTrz{Y^Y)5Ej{d z8*P5^dg|*xbm~s`dS!-BO+p5Bi&WQ3E!Mb-QLN}^gprtd_gn5c_aW+vdD)bRMk#ug zU5?QD>c_Op6r=n7RWb;#D3D+w~q^}D+ z@3B%Sj#Ok0ndZ*3Ov-}*ht~VW))Jp;H+M`mDAV`nrBpTQSH1`#4^TSan79hFP z+@d)k!klE0tFt$ogQkCBr)~CA0FB8b8$L7FJ3$J!5fmVWLl-gD64b@6eQ6~pw%*Xw zS*RUV1EkuZeZBXkOTxocgFhE{s08<4Nc-w3`MU{$^Ez>Us@r4k%l@RJpV^*4crTZu z^_p6Xy1mY)O5Pk#G;{Ic-?MhbHAw_#^@Io;qLx&7>|u;ie!S>gG1oWXPMUk`ekwG9 z3nvl80Wz-btm4H>$Rj-$heOt?P&GY{&dTe$ebl<0r};?GyXGV6$ukYFQL1L|@y~dM zTTH3w?HaA#t5TNz_pwV}I{DENl><+>Uetjnsd+8TXMedJJIigoh?9(K)pLvKM1Mlh z<Q-)_R?@cq6#GOR{6&@c_g4*v4%CY>?U)Zo$l;3wGkW7yIt1L))$%gY@68 zr@Uy$Uzm?sj3-ngA`ILLE-XM~t2gr}ja^mj@9ZIOkqBN?C|W177Jg-a#*TE5N-`-$ zM6IFK-rk>c_GPK`VnftsXNX<$C+CBw$Cw@Coz{l^Py5@Xfw_3m_$>tIX1UpN(V5a+ ze{|lp$&6`}Q10PmTOW?TX+K|T?indjl3I=nz2~ZJi#Zay0XIK)M0mISTS$rj0TD}Br2qf` literal 0 HcmV?d00001 diff --git a/res/layout/network.edc b/res/layout/network.edc index ba43498..52f73e8 100644 --- a/res/layout/network.edc +++ b/res/layout/network.edc @@ -153,7 +153,7 @@ group { part { name, "padding.content2"; - type, SPACER; + type, SPACER; scale, 1; description { state, "default" 0.0; @@ -389,9 +389,15 @@ group { } } - group { - name, GRP_POPUP_PASSCODE; + name, GRP_CONNECTING_IMAGE_NETWORK_POPUP; + images { + image, IC_SETTINGS_NETWORK_DOT10_PNG COMP; + image, IC_SETTINGS_NETWORK_DOT_PNG COMP; + image, IC_SETTINGS_NETWORK_TV_PNG COMP; + image, IC_SETTINGS_NETWORK_WEB_PNG COMP; + } + parts { part { name, "area"; @@ -404,12 +410,30 @@ group { } part { - name, "padding.title"; + name, "part.line"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + color, 0 0 0 255; + min: 2 2; + max: -1 2; + rel1.to, "area"; + rel2 { + to, "area"; + relative, 1.0 0.0; + } + + } + } + + part { + name, "padding.text.content"; type, SPACER; scale, 1; description { state, "default" 0.0; - min, 0 20; + min, 0 15; rel1.to, "area"; rel2 { to, "area"; @@ -421,21 +445,22 @@ group { } part { - name, PART_WIFI_NAME; + name, "part.text.content"; type, TEXT; scale, 1; description { state, "default" 0.0; min, 0 24; rel1 { - to, "padding.title"; + to, "padding.text.content"; relative, 0.0 1.0; } - rel2.to, "padding.title"; - align, 0.5 0.0; + rel2.to, "padding.text.content"; + align, 0 0.0; fixed, 0 1; color, COLOR_TEXT_POPUP; text { + align, 0.5 0.0; font, FONT_LIGHT; size, 24; } @@ -443,53 +468,540 @@ group { } part { - name, "padding.passcode"; + name, "padding.image.tv"; type, SPACER; scale, 1; + description { + state, "default" 0.0; + min, 0 94; + rel1 { + to, "part.text.content"; + relative, 0.35 1.0;//0.0 1.0; + } + rel2 { + to, "part.text.content"; + relative, 0.35 1.0; + } + align, 0.5 0.0; + fixed, 1 1; + } + } + + part { + name, "part.image.tv"; + type, IMAGE; + scale, 1; + description { + state, "default" 0.0; + min, 96 96; + max, 96 96; + rel1 { + to, "padding.image.tv"; + relative, 0.0 1.0; + } + rel2.to, "padding.image.tv"; + rel2.relative, 0.0 1.0; + fixed, 1 1; + visible, 1; + image.normal, IC_SETTINGS_NETWORK_TV_PNG; + } + } + + part { + name, "padding.dot1"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 32 0; + rel1 { + to, "part.image.tv"; + relative, 1.0 0.0; + } + rel2.to, "part.image.tv"; + align, 0.0 0.5; + fixed, 1 0; + } + } + + part { + name, "part.dot1"; + type, IMAGE; + scale, 1; + description { + state, "default" 0.0; + min, 6 6; + max, 6 6; + rel1 { + to, "padding.dot1"; + relative, 1.0 0.0; + } + rel2.to, "padding.dot1"; + fixed, 1 1; + visible, 0; + image.normal, IC_SETTINGS_NETWORK_DOT10_PNG; + } description { - state, "default" 0.0; - min, 0 20; - rel1 { - to, PART_WIFI_NAME; - relative, 0.0 1.0; + state, "visible" 0.0; + inherit, "default" 0.0; + image { + normal, IC_SETTINGS_NETWORK_DOT_PNG; + tween, IC_SETTINGS_NETWORK_DOT10_PNG; + tween, IC_SETTINGS_NETWORK_DOT10_PNG; + tween, IC_SETTINGS_NETWORK_DOT10_PNG; + tween, IC_SETTINGS_NETWORK_DOT10_PNG; + tween, IC_SETTINGS_NETWORK_DOT10_PNG; } - rel2.to, PART_WIFI_NAME; - align, 0.5 0.0; - fixed, 0 1; + visible, 1; + } + + + } + + + part { + name, "padding.dot2"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 12 0; + rel1 { + to, "part.dot1"; + relative, 1.0 0.0; + } + rel2.to, "part.dot1"; + align, 0.0 0.5; + fixed, 1 0; + } + } + + part { + name, "part.dot2"; + type, IMAGE; + scale, 1; + description { + state, "default" 0.0; + min, 6 6; + max, 6 6; + rel1 { + to, "padding.dot2"; + relative, 1.0 0.0; + } + rel2.to, "padding.dot2"; + fixed, 1 1; + visible, 1; + image.normal, IC_SETTINGS_NETWORK_DOT10_PNG; + } + description { + state, "visible" 0.0; + inherit, "default" 0.0; + image { + normal, IC_SETTINGS_NETWORK_DOT10_PNG; + tween, IC_SETTINGS_NETWORK_DOT_PNG; + tween, IC_SETTINGS_NETWORK_DOT10_PNG; + tween, IC_SETTINGS_NETWORK_DOT10_PNG; + tween, IC_SETTINGS_NETWORK_DOT10_PNG; + tween, IC_SETTINGS_NETWORK_DOT10_PNG; + } + visible, 1; + } + + description { + state, "focused" 0.0; + inherit, "default" 0.0; + color, 0 0 0 255; + } + + } + + part { + name, "padding.dot3"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 12 0; + rel1 { + to, "part.dot2"; + relative, 1.0 0.0; + } + rel2.to, "part.dot2"; + align, 0.0 0.5; + fixed, 1 0; + } + } + + part { + name, "part.dot3"; + type, IMAGE; + scale, 1; + description { + state, "default" 0.0; + min, 6 6; + max, 6 6; + rel1 { + to, "padding.dot3"; + relative, 1.0 0.0; + } + rel2.to, "padding.dot3"; + fixed, 1 1; + visible, 1; + image.normal, IC_SETTINGS_NETWORK_DOT10_PNG; + } + description { + state, "visible" 0.0; + inherit, "default" 0.0; + image { + normal, IC_SETTINGS_NETWORK_DOT10_PNG; + tween, IC_SETTINGS_NETWORK_DOT10_PNG; + tween, IC_SETTINGS_NETWORK_DOT_PNG; + tween, IC_SETTINGS_NETWORK_DOT10_PNG; + tween, IC_SETTINGS_NETWORK_DOT10_PNG; + tween, IC_SETTINGS_NETWORK_DOT10_PNG; + } + visible, 1; + } + + description { + state, "focused" 0.0; + inherit, "default" 0.0; + color, 0 0 0 255; + } + + } + + part { + name, "padding.dot4"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 12 0; + rel1 { + to, "part.dot3"; + relative, 1.0 0.0; + } + rel2.to, "part.dot3"; + align, 0.0 0.5; + fixed, 1 0; + } + } + + part { + name, "part.dot4"; + type, IMAGE; + scale, 1; + description { + state, "default" 0.0; + min, 6 6; + max, 6 6; + rel1 { + to, "padding.dot4"; + relative, 1.0 0.0; + } + rel2.to, "padding.dot4"; + fixed, 1 1; + visible, 1; + image.normal, IC_SETTINGS_NETWORK_DOT10_PNG; + } + description { + state, "visible" 0.0; + inherit, "default" 0.0; + image { + normal, IC_SETTINGS_NETWORK_DOT10_PNG; + tween, IC_SETTINGS_NETWORK_DOT10_PNG; + tween, IC_SETTINGS_NETWORK_DOT10_PNG; + tween, IC_SETTINGS_NETWORK_DOT_PNG; + tween, IC_SETTINGS_NETWORK_DOT10_PNG; + tween, IC_SETTINGS_NETWORK_DOT10_PNG; + } + visible, 1; + } + + description { + state, "focused" 0.0; + inherit, "default" 0.0; + color, 0 0 0 255; + } + } + + + part { + name, "padding.dot5"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 12 0; + rel1 { + to, "part.dot4"; + relative, 1.0 0.0; + } + rel2.to, "part.dot4"; + align, 0.0 0.5; + fixed, 1 0; + } + } + + part { + name, "part.dot5"; + type, IMAGE; + scale, 1; + description { + state, "default" 0.0; + min, 6 6; + max, 6 6; + rel1 { + to, "padding.dot5"; + relative, 1.0 0.0; + } + rel2.to, "padding.dot5"; + fixed, 1 1; + visible, 1; + image.normal, IC_SETTINGS_NETWORK_DOT10_PNG; + } + description { + state, "visible" 0.0; + inherit, "default" 0.0; + image { + normal, IC_SETTINGS_NETWORK_DOT10_PNG; + tween, IC_SETTINGS_NETWORK_DOT10_PNG; + tween, IC_SETTINGS_NETWORK_DOT10_PNG; + tween, IC_SETTINGS_NETWORK_DOT10_PNG; + tween, IC_SETTINGS_NETWORK_DOT_PNG; + tween, IC_SETTINGS_NETWORK_DOT10_PNG; + } + visible, 1; + } + + description { + state, "focused" 0.0; + inherit, "default" 0.0; + color, 0 0 0 255; + } + + } + + part { + name, "padding.dot6"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 12 0; + rel1 { + to, "part.dot5"; + relative, 1.0 0.0; + } + rel2.to, "part.dot5"; + align, 0.0 0.5; + fixed, 1 0; + } + } + + part { + name, "part.dot6"; + type, IMAGE; + scale, 1; + description { + state, "default" 0.0; + min, 6 6; + max, 6 6; + rel1 { + to, "padding.dot6"; + relative, 1.0 0.0; + } + rel2.to, "padding.dot6"; + fixed, 1 1; + visible, 1; + image.normal, IC_SETTINGS_NETWORK_DOT10_PNG; + } + description { + state, "visible" 0.0; + inherit, "default" 0.0; + image { + normal, IC_SETTINGS_NETWORK_DOT10_PNG; + tween, IC_SETTINGS_NETWORK_DOT10_PNG; + tween, IC_SETTINGS_NETWORK_DOT10_PNG; + tween, IC_SETTINGS_NETWORK_DOT10_PNG; + tween, IC_SETTINGS_NETWORK_DOT10_PNG; + tween, IC_SETTINGS_NETWORK_DOT_PNG; + } + visible, 1; + } + + description { + state, "focused" 0.0; + inherit, "default" 0.0; + color, 0 0 0 255; + } + + } + + part { + name, "padding.image.web"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 60 0; + rel1 { + to, "part.dot6"; + relative, 1.0 0.0; + } + rel2.to, "part.dot6"; + align, 0.0 0.5; + fixed, 1 0; + } + } + + part { + name, "part.image.web"; + type, IMAGE; + scale, 1; + description { + state, "default" 0.0; + min, 96 96; + max, 96 96; + rel1 { + to, "padding.image.web"; + relative, 1.0 0.0; + } + rel2.to, "padding.image.web"; + fixed, 1 1; + visible, 1; + image.normal, IC_SETTINGS_NETWORK_WEB_PNG; + } + } + + part { + name, "padding.stop.btn"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 0 200; + rel1 { + to, "part.text.content"; + relative, 0.5 1.0; + } + rel2 { + to, "part.text.content"; + relative, 0.5 1.0; + } + align, 0.5 0.0; + fixed, 1 1; + } + } + + part { + name, "part.stop.btn"; + type, SWALLOW; + scale, 1; + description { + state, "default" 0.0; + min, 120 40; + max, 120 40; + rel1 { + to, "padding.stop.btn"; + relative, 0.0 1.0; + } + rel2 { + to, "padding.stop.btn"; + relative, 0.0 1.0; + } + align, 0.5 0.0; + visible, 1; + } + } + } + programs { + program { + name, "loading_state_loop"; + signal, "load"; + source, ""; + action, STATE_SET "visible" 0.0; + target, "part.dot1"; + transition, LINEAR 3.0; + action, STATE_SET "visible" 0.0; + target, "part.dot2"; + transition, LINEAR 3.0; + action, STATE_SET "visible" 0.0; + target, "part.dot3"; + transition, LINEAR 3.0; + action, STATE_SET "visible" 0.0; + target, "part.dot4"; + transition, LINEAR 3.0; + action, STATE_SET "visible" 0.0; + target, "part.dot5"; + transition, LINEAR 3.0; + action, STATE_SET "visible" 0.0; + target, "part.dot6"; + transition, LINEAR 3.0; + after, "after_loading_started"; + } + + program { + name, "after_loading_started"; + script { + run_program(PROGRAM:"loading_state_loop"); } } + + } + +} + +group { + name, GRP_CONNECTED_IMAGE_NETWORK_POPUP; + images { + image, IC_SETTINGS_NETWORK_COMPLETED_PNG COMP; + image, IC_SETTINGS_NETWORK_DOT10_PNG COMP; + image, IC_SETTINGS_NETWORK_TV_PNG COMP; + image, IC_SETTINGS_NETWORK_WEB_PNG COMP; + } + + parts { part { - name, "padding.passcode.area"; - type, SPACER; + name, "area"; + type, RECT; scale, 1; description { state, "default" 0.0; - min, 460 58; - rel1 { - to, "padding.passcode"; - relative, 0.5 1.0; - } - rel2 { - to, "padding.passcode"; - relative, 0.5 1.0; - } - align, 0.5 0.0; - fixed, 1 1; + visible, 0; } } part { - name, "part.inside.line.up"; + name, "part.line"; type, RECT; scale, 1; description { state, "default" 0.0; - min, 0 1; - color, COLOR_LINE_INSIDE; - rel1.to, "padding.passcode.area"; + color, 0 0 0 255; + min: 2 2; + max: -1 2; + rel1.to, "area"; + rel2 { + to, "area"; + relative, 1.0 0.0; + } + + } + } + + part { + name, "padding.text.content"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 0 15; + rel1.to, "area"; rel2 { - to, "padding.passcode.area"; + to, "area"; relative, 1.0 0.0; } align, 0.5 0.0; @@ -498,23 +1010,990 @@ group { } part { - name, "part.inside.line.left"; - type, RECT; + name, "part.text.content"; + type, TEXT; scale, 1; description { state, "default" 0.0; - min, 1 0; - color, COLOR_LINE_INSIDE; + min, 0 24; rel1 { - to, "part.inside.line.up"; + to, "padding.text.content"; relative, 0.0 1.0; } - rel2 { - to, "padding.passcode.area"; - relative, 0.0 1.0; + rel2.to, "padding.text.content"; + align, 0 0.0; + fixed, 0 1; + color, COLOR_TEXT_POPUP; + text { + align, 0.5 0.0; + font, FONT_LIGHT; + size, 24; } - align, 0.0 0.5; - fixed, 1 0; + } + } + + part { + name, "padding.image.tv"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 0 94; + rel1 { + to, "part.text.content"; + relative, 0.35 1.0;//0.0 1.0; + } + rel2 { + to, "part.text.content"; + relative, 0.35 1.0; + } + align, 0.5 0.0; + fixed, 1 1; + } + } + + part { + name, "part.image.tv"; + type, IMAGE; + scale, 1; + description { + state, "default" 0.0; + min, 96 96; + max, 96 96; + rel1 { + to, "padding.image.tv"; + relative, 0.5 1.0; + } + rel2.to, "padding.image.tv"; + rel2.relative, 0.5 1.0; + fixed, 1 1; + visible, 1; + image.normal, IC_SETTINGS_NETWORK_TV_PNG; + } + } + + part { + name, "padding.dot1"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 32 0; + rel1 { + to, "part.image.tv"; + relative, 1.0 0.0; + } + rel2.to, "part.image.tv"; + align, 0.0 0.5; + fixed, 1 0; + } + } + + part { + name, "part.dot1"; + type, IMAGE; + scale, 1; + description { + state, "default" 0.0; + min, 6 6; + max, 6 6; + rel1 { + to, "padding.dot1"; + relative, 1.0 0.0; + } + rel2.to, "padding.dot1"; + fixed, 1 1; + visible, 1; + image.normal, IC_SETTINGS_NETWORK_DOT10_PNG; + } + } + + part { + name, "padding.dot2"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 12 0; + rel1 { + to, "part.dot1"; + relative, 1.0 0.0; + } + rel2.to, "part.dot1"; + align, 0.0 0.5; + fixed, 1 0; + } + } + + part { + name, "part.dot2"; + type, IMAGE; + scale, 1; + description { + state, "default" 0.0; + min, 6 6; + max, 6 6; + rel1 { + to, "padding.dot2"; + relative, 1.0 0.0; + } + rel2.to, "padding.dot2"; + fixed, 1 1; + visible, 1; + image.normal, IC_SETTINGS_NETWORK_DOT10_PNG; + } + } + + part { + name, "padding.image.completed"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 24 0; + rel1 { + to, "part.dot2"; + relative, 1.0 0.0; + } + rel2.to, "part.dot2"; + align, 0.0 1.0; + fixed, 1 0; + } + } + + part { + name, "part.image.completed"; + type, IMAGE; + scale, 1; + description { + state, "default" 0.0; + min, 58 58; + max, 58 58; + rel1 { + to, "padding.image.completed"; + relative, 1.0 0.0; + } + rel2.to, "padding.image.completed"; + rel2.relative, 1.0 0.0; + align: 0.5 1.0; + fixed, 1 1; + visible, 1; + image.normal, IC_SETTINGS_NETWORK_COMPLETED_PNG; + } + } + + part { + name, "padding.dot5"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 58 0; + rel1 { + to, "part.dot2"; + relative, 1.0 0.0; + } + rel2.to, "part.dot2"; + align, 0.0 0.5; + fixed, 1 0; + } + } + + + part { + name, "part.dot5"; + type, IMAGE; + scale, 1; + description { + state, "default" 0.0; + min, 6 6; + max, 6 6; + rel1 { + to, "padding.dot5"; + relative, 1.0 0.0; + } + rel2 { + to, "padding.dot5"; + relative, 1.0 0.0; + } + fixed, 1 1; + visible, 1; + image.normal, IC_SETTINGS_NETWORK_DOT10_PNG; + } + } + + part { + name, "padding.dot6"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 12 0; + rel1 { + to, "part.dot5"; + relative, 1.0 0.0; + } + rel2.to, "part.dot5"; + align, 0.0 0.5; + fixed, 1 0; + } + } + + part { + name, "part.dot6"; + type, IMAGE; + scale, 1; + description { + state, "default" 0.0; + min, 6 6; + max, 6 6; + rel1 { + to, "padding.dot6"; + relative, 1.0 0.0; + } + rel2.to, "padding.dot6"; + fixed, 1 1; + visible, 1; + image.normal, IC_SETTINGS_NETWORK_DOT10_PNG; + } + } + part { + name, "padding.image.web"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 60 0; + rel1 { + to, "part.dot6"; + relative, 1.0 0.0; + } + rel2.to, "part.dot6"; + align, 0.0 0.5; + fixed, 1 0; + } + } + + part { + name, "part.image.web"; + type, IMAGE; + scale, 1; + description { + state, "default" 0.0; + min, 96 96; + max, 96 96; + rel1 { + to, "padding.image.web"; + relative, 1.0 0.0; + } + rel2.to, "padding.image.web"; + fixed, 1 1; + visible, 1; + image.normal, IC_SETTINGS_NETWORK_WEB_PNG; + } + } + part { + name, "padding.done.btn"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 0 50; + rel1 { + to, "part.image.tv"; + relative, 0.0 1.0; + } + rel2 { + to, "part.image.tv"; + relative, 0.0 1.0; + } + align, 0.0 0.0; + fixed, 1 1; + } + } + + part { + name, "part.done.btn"; + type, SWALLOW; + scale, 1; + description { + state, "default" 0.0; + min, 270 40; + max, 270 40; + rel1 { + to, "padding.done.btn"; + relative, 0.0 1.0; + } + rel2 { + to, "padding.done.btn"; + relative, 0.0 1.0; + } + align, 0.5 0.0; + visible, 1; + } + } + + part { + name, "padding.new.network.btn"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 170 0; + rel1 { + to, "part.done.btn"; + relative, 1.0 0.0; + } + rel2 { + to, "part.done.btn"; + relative, 1.0 0.0; + } + align, 0.0 0.0; + fixed, 1 1; + } + } + + + part { + name, "part.new.network.btn"; + type, SWALLOW; + scale, 1; + description { + state, "default" 0.0; + min, 270 40; + max, 270 40; + rel1 { + to, "padding.new.network.btn"; + relative, 1.0 0.0; + } + rel2 { + to, "padding.new.network.btn"; + relative, 1.0 0.0; + } + align, 0.5 0.0; + visible, 1; + } + } + + + } +} + +group { + name, GRP_FAILED_IMAGE_NETWORK_POPUP; + images { + image, IC_SETTINGS_NETWORK_FAILED_PNG COMP; + image, IC_SETTINGS_NETWORK_DOT10_PNG COMP; + image, IC_SETTINGS_NETWORK_TV_PNG COMP; + image, IC_SETTINGS_NETWORK_WEB_PNG COMP; + } + + parts { + part { + name, "area"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + visible, 0; + } + } + + part { + name, "part.line"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + color, 0 0 0 255; + min: 2 2; + max: -1 2; + rel1.to, "area"; + rel2 { + to, "area"; + relative, 1.0 0.0; + } + + } + } + + part { + name, "padding.text.content"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 0 15; + rel1.to, "area"; + rel2 { + to, "area"; + relative, 1.0 0.0; + } + align, 0.5 0.0; + fixed, 0 1; + } + } + + part { + name, "part.text.content"; + type, TEXT; + scale, 1; + description { + state, "default" 0.0; + min, 0 24; + rel1 { + to, "padding.text.content"; + relative, 0.0 1.0; + } + rel2.to, "padding.text.content"; + align, 0 0.0; + fixed, 0 1; + color, COLOR_TEXT_POPUP; + text { + text, "Wired network connection failed"; + align, 0.5 0.0; + font, FONT_LIGHT; + size, 22; + } + } + } + + part { + name, "part.text.content1"; + type, TEXT; + scale, 1; + description { + state, "default" 0.0; + min, 0 24; + rel1 { + to, "part.text.content"; + relative, 0.0 1.0; + } + rel2.to, "part.text.content"; + align, 0 0.1; + fixed, 0 1; + color, COLOR_TEXT_POPUP; + text { + text, "Press retry button or plug a network cable into the back of your TV."; + align, 0.5 0.0; + font, FONT_LIGHT; + size, 22; + } + } + } + + part { + name, "padding.image.tv"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 0 94; + rel1 { + to, "part.text.content"; + relative, 0.35 1.0;//0.0 1.0; + } + rel2 { + to, "part.text.content"; + relative, 0.35 1.0; + } + align, 0.5 0.0; + fixed, 1 1; + } + } + + part { + name, "part.image.tv"; + type, IMAGE; + scale, 1; + description { + state, "default" 0.0; + min, 96 96; + max, 96 96; + rel1 { + to, "padding.image.tv"; + relative, 0.5 1.0; + } + rel2.to, "padding.image.tv"; + rel2.relative, 0.5 1.0; + fixed, 1 1; + visible, 1; + image.normal, IC_SETTINGS_NETWORK_TV_PNG; + } + } + + part { + name, "padding.dot1"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 32 0; + rel1 { + to, "part.image.tv"; + relative, 1.0 0.0; + } + rel2.to, "part.image.tv"; + align, 0.0 0.5; + fixed, 1 0; + } + } + + part { + name, "part.dot1"; + type, IMAGE; + scale, 1; + description { + state, "default" 0.0; + min, 6 6; + max, 6 6; + rel1 { + to, "padding.dot1"; + relative, 1.0 0.0; + } + rel2.to, "padding.dot1"; + fixed, 1 1; + visible, 1; + image.normal, IC_SETTINGS_NETWORK_DOT10_PNG; + } + } + + part { + name, "padding.dot2"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 12 0; + rel1 { + to, "part.dot1"; + relative, 1.0 0.0; + } + rel2.to, "part.dot1"; + align, 0.0 0.5; + fixed, 1 0; + } + } + + part { + name, "part.dot2"; + type, IMAGE; + scale, 1; + description { + state, "default" 0.0; + min, 6 6; + max, 6 6; + rel1 { + to, "padding.dot2"; + relative, 1.0 0.0; + } + rel2.to, "padding.dot2"; + fixed, 1 1; + visible, 1; + image.normal, IC_SETTINGS_NETWORK_DOT10_PNG; + } + } + + part { + name, "padding.image.completed"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 24 0; + rel1 { + to, "part.dot2"; + relative, 1.0 0.0; + } + rel2.to, "part.dot2"; + align, 0.0 0.5; + fixed, 1 0; + } + } + + part { + name, "part.image.completed"; + type, IMAGE; + scale, 1; + description { + state, "default" 0.0; + min, 50 50; + max, 50 50; + rel1 { + to, "padding.image.completed"; + relative, 1.0 0.0; + } + rel2.to, "padding.image.completed"; + fixed, 1 1; + visible, 1; + image.normal, IC_SETTINGS_NETWORK_FAILED_PNG; + } + } + + part { + name, "padding.dot5"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 58 0; + rel1 { + to, "part.dot2"; + relative, 1.0 0.0; + } + rel2.to, "part.dot2"; + align, 0.0 0.5; + fixed, 1 0; + } + } + + part { + name, "part.dot5"; + type, IMAGE; + scale, 1; + description { + state, "default" 0.0; + min, 6 6; + max, 6 6; + rel1 { + to, "padding.dot5"; + relative, 1.0 0.0; + } + rel2 { + to, "padding.dot5"; + relative, 1.0 0.0; + } + fixed, 1 1; + visible, 1; + image.normal, IC_SETTINGS_NETWORK_DOT10_PNG; + } + } + + part { + name, "padding.dot6"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 12 0; + rel1 { + to, "part.dot5"; + relative, 1.0 0.0; + } + rel2.to, "part.dot5"; + align, 0.0 0.5; + fixed, 1 0; + } + } + + part { + name, "part.dot6"; + type, IMAGE; + scale, 1; + description { + state, "default" 0.0; + min, 6 6; + max, 6 6; + rel1 { + to, "padding.dot6"; + relative, 1.0 0.0; + } + rel2.to, "padding.dot6"; + fixed, 1 1; + visible, 1; + image.normal, IC_SETTINGS_NETWORK_DOT10_PNG; + } + } + part { + name, "padding.image.web"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 60 0; + rel1 { + to, "part.dot6"; + relative, 1.0 0.0; + } + rel2.to, "part.dot6"; + align, 0.0 0.5; + fixed, 1 0; + } + } + + part { + name, "part.image.web"; + type, IMAGE; + scale, 1; + description { + state, "default" 0.0; + min, 96 96; + max, 96 96; + rel1 { + to, "padding.image.web"; + relative, 1.0 0.0; + } + rel2.to, "padding.image.web"; + fixed, 1 1; + visible, 1; + image.normal, IC_SETTINGS_NETWORK_WEB_PNG; + } + } + + part { + name, "padding.close.btn"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 0 200; + rel1 { + to, "part.text.content"; + relative, 0.18 1.0; + } + rel2 { + to, "part.text.content"; + relative, 0.2 1.0; + } + align, 0.0 0.0; + fixed, 1 1; + } + } + + part { + name, "part.close.btn"; + type, SWALLOW; + scale, 1; + description { + state, "default" 0.0; + min, 200 40; + max, 200 40; + rel1 { + to, "padding.close.btn"; + relative, 0.0 1.0; + } + rel2 { + to, "padding.close.btn"; + relative, 0.0 1.0; + } + align, 0.5 0.0; + visible, 1; + } + } + + part { + name, "padding.retry.btn"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 105 0; + rel1 { + to, "part.close.btn"; + relative, 1.0 0.0; + } + rel2 { + to, "part.close.btn"; + relative, 1.0 0.0; + } + align, 0.0 0.0; + fixed, 1 1; + } + } + + + part { + name, "part.retry.btn"; + type, SWALLOW; + scale, 1; + description { + state, "default" 0.0; + min, 200 40; + max, 200 40; + rel1 { + to, "padding.retry.btn"; + relative, 1.0 0.0; + } + rel2 { + to, "padding.retry.btn"; + relative, 1.0 0.0; + } + align, 0.5 0.0; + visible, 1; + } + } + + part { + name, "padding.new.network.btn"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 325 0; + rel1 { + to, "part.close.btn"; + relative, 1.0 0.0; + } + rel2 { + to, "part.close.btn"; + relative, 1.0 0.0; + } + align, 0.0 0.0; + fixed, 1 1; + } + } + + + part { + name, "part.new.network.btn"; + type, SWALLOW; + scale, 1; + description { + state, "default" 0.0; + min, 225 40; + max, 225 40; + rel1 { + to, "padding.new.network.btn"; + relative, 1.0 0.0; + } + rel2 { + to, "padding.new.network.btn"; + relative, 1.0 0.0; + } + align, 0.5 0.0; + visible, 1; + } + } + + } +} + + +group { + name, GRP_POPUP_PASSCODE; + parts { + part { + name, "area"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + visible, 0; + } + } + + part { + name, "padding.title"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 0 20; + rel1.to, "area"; + rel2 { + to, "area"; + relative, 1.0 0.0; + } + align, 0.5 0.0; + fixed, 0 1; + } + } + + part { + name, PART_WIFI_NAME; + type, TEXT; + scale, 1; + description { + state, "default" 0.0; + min, 0 24; + rel1 { + to, "padding.title"; + relative, 0.0 1.0; + } + rel2.to, "padding.title"; + align, 0.5 0.0; + fixed, 0 1; + color, COLOR_TEXT_POPUP; + text { + font, FONT_LIGHT; + size, 24; + } + } + } + + part { + name, "padding.passcode"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 0 20; + rel1 { + to, PART_WIFI_NAME; + relative, 0.0 1.0; + } + rel2.to, PART_WIFI_NAME; + align, 0.5 0.0; + fixed, 0 1; + } + } + + part { + name, "padding.passcode.area"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 460 58; + rel1 { + to, "padding.passcode"; + relative, 0.5 1.0; + } + rel2 { + to, "padding.passcode"; + relative, 0.5 1.0; + } + align, 0.5 0.0; + fixed, 1 1; + } + } + + part { + name, "part.inside.line.up"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + min, 0 1; + color, COLOR_LINE_INSIDE; + rel1.to, "padding.passcode.area"; + rel2 { + to, "padding.passcode.area"; + relative, 1.0 0.0; + } + align, 0.5 0.0; + fixed, 0 1; + } + } + + part { + name, "part.inside.line.left"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + min, 1 0; + color, COLOR_LINE_INSIDE; + rel1 { + to, "part.inside.line.up"; + relative, 0.0 1.0; + } + rel2 { + to, "padding.passcode.area"; + relative, 0.0 1.0; + } + align, 0.0 0.5; + fixed, 1 0; } } @@ -524,168 +2003,1493 @@ group { scale, 1; description { state, "default" 0.0; - min, 1 0; - color, COLOR_LINE_INSIDE; - rel1 { - to, "part.inside.line.up"; - relative, 1.0 1.0; - } - rel2.to, "padding.passcode.area"; - align, 1.0 0.5; - fixed, 1 0; + min, 1 0; + color, COLOR_LINE_INSIDE; + rel1 { + to, "part.inside.line.up"; + relative, 1.0 1.0; + } + rel2.to, "padding.passcode.area"; + align, 1.0 0.5; + fixed, 1 0; + } + } + + part { + name, "part.inside.line.down"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + min, 0 1; + color, COLOR_LINE_INSIDE; + rel1 { + to, "part.inside.line.left"; + relative, 1.0 1.0; + } + rel2 { + to, "part.inside.line.right"; + relative, 0.0 1.0; + } + align, 0.5 1.0; + fixed, 0 1; + } + } + + part { + name, PART_WIFI_PASSCODE; + type, SWALLOW; + scale, 1; + description { + state, "default" 0.0; + rel1 { + to, "padding.passcode.area"; + relative, 0.0 0.0; + offset, 1 1; + } + rel2 { + to, "padding.passcode.area"; + relative, 1.0 1.0; + offset, -2 0; + } + fixed, 0 1; + } + } + + + +/* //////////////////////////////////////////////////////////// */ + part { + name, "padding.error_msg.top"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + align, 0.0 0.0; + fixed, 0 1; + min, 0 20; + rel1 { + relative, 0.0 1.0; + to, "padding.passcode.area"; + } + rel2 { + to, "padding.passcode.area"; + } + } + } + + part { + name, "part.error_msg"; + type, TEXT; + scale, 1; + description { + state, "default" 0.0; + align, 0.0 0.0; + fixed, 0 1; + min, 0 24; + color, 240 62 62 255; + rel1 { + relative, 0.0 1.0; + to, "padding.error_msg.top"; + } + rel2 { + to, "padding.error_msg.top"; + } + text { + text, ""; + font, FONT_LIGHT; + size, 24; + } + } + } + + part { + name, "padding.error_msg.bottom"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + align, 0.0 0.0; + fixed, 0 1; + min, 0 20; + rel1 { + relative, 0.0 1.0; + to, "part.error_msg"; + } + rel2 { + to, "part.error_msg"; + } + } + } + + part { + name, "part.popup.bottom.cancel"; + type, SWALLOW; + scale, 1; + description { + state, "default" 0.0; + align, 0.0 0.0; + fixed, 0 1; + min, 0 64; + color: 0 255 0 255; + rel1 { + relative, 0.0 1.0; + to, "padding.error_msg.bottom"; + } + rel2 { + relative, 0.475 1.0; + to, "padding.error_msg.bottom"; + } + } + } + + part { + name, "part.popup.bottom.ok"; + type, SWALLOW; + scale, 1; + repeat_events, 1; + description { + state, "default" 0.0; + align, 0.0 0.0; + fixed, 0 1; + color: 255 0 0 255; + min, 0 64; + visible: 1; + rel1 { + relative, 0.525 1.0; + to, "padding.error_msg.bottom"; + } + rel2 { + to, "padding.error_msg.bottom"; + } + } + } +/*//////////////////////////////////////////////////////////// */ + } +} + +group { + name, "grp.view.new_network"; + styles { + style { + name, "style.new_network.nocontents"; + base, "font=BreezeSans:style=Light color=#000000B2 font_size=32 align=center"; + tag, "br" "\n"; + } + style { + name, "style.new_network.title"; + base, "font=BreezeSans:style=Regular color=#333333FF font_size=46 align=center"; + tag, "br" "\n"; + } + } + + parts { + part { + name, "area"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + rel1.relative, 0.0 0.0; + rel2.relative, 1.0 1.0; + visible, 0; + } + } + + part { + name, "bg"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + color, 244 244 244 255; + rel1 { + relative, 0.0510 0.0667;//0.0 0.0; + to, "area"; + } + rel2 { + relative, 0.9490 0.9111;//1.0 1.0; + to, "area"; + } + } + } + + part { + name, "bg.title"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + color, 255 255 255 255; + min, 0 104; + rel1 { + relative, 0.0 0.0; + to, "bg"; + } + rel2 { + relative, 1.0 0.0; + to, "bg"; + } + fixed, 0 1; + align, 0.0 0.0; + } + } + + part { + name, "part.title"; + type, TEXT; + scale, 1; + description { + state, "default" 0.0; + rel1 { + to, "bg.title"; + relative, 0.0 0.0; + } + rel2 { + to, "bg.title"; + relative, 1.0 1.0; + } + align, 0.5 0.5; + color, 51 51 51 255; + text { + text, "Network"; + font, FONT_REGULAR; + size, 46; + /*style, "style.new_network.title";*/ + } + } + } + + part { + name, "part.text.make_new_network"; + type, TEXT; + scale, 1; + description { + state, "default" 0.0; + min, 0 36; + max, -1 36; + rel1 { + relative, 0.0 0.1; + } + align, 0.5 0.1; + fixed, 0 1; + text { + text, "You can make new network."; + font, "BreezeSans"; + size, 36; + align, 0.5 0.1; + } + color, 77 77 77 255; + } + } + + part { + name, "padding.button.area1"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 0 58; + rel1 { + relative, 0.0 1.0; + to, "part.title"; + } + rel2 { + to, "part.title"; + } + align, 0.5 0.0; + fixed, 0 1; + } + } + + part { + name, "padding.button.area2"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 0 64; + rel1 { + to, "padding.button.area1"; + relative, 0.0 1.0; + } + rel2.to, "padding.button.area1"; + align, 0.5 0.0; + fixed, 0 1; + } + } + + part { + name, "padding.new_network.btn.space"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 26 0; + rel1 { + to, "padding.button.area1"; + relative, 0.5 1.0; + } + rel2 { + to, "padding.button.area2"; + relative, 0.5 1.0; + } + fixed, 1 0; + } + } + + part { + name, "part.new_network.btn.dnsconfig"; + type, SWALLOW; + scale, 1; + description { + state, "default" 0.0; + min, 308 0; + rel1 { + to, "padding.new_network.btn.space"; + relative, 1.0 0.0; + } + rel2.to, "padding.new_network.btn.space"; + align, 0.0 0.5; + fixed, 1 0; + } + } + + part { + name, "part.content.area"; + type, SWALLOW; + scale, 1; + description { + state, "default" 0.0; + min, 0 72; + rel1 { + to, "padding.button.area2"; + relative, 0.0 1.0; + } + rel2 { + to, "part.new_network.action"; + relative, 1.0 0.0; + } + align, 0.5 0.0; + fixed, 0 1; + } + } + + /*part { + name, "part.new_network.action"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + min, 0 148; + rel1 { + to, "area"; + relative, 0.0 1.0; + } + rel2.to, "area"; + align, 0.5 1.0; + fixed, 0 1; + color, 255 255 255 255; + } + }*/ + + part { + name, "part.new_network.action"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + min, 0 148; + rel1 { + to, "area"; + relative, 0.0510 0.8444; + } + rel2 { + to, "area"; + relative, 0.9490 0.9111; + } + align, 0.0 1.0; + fixed, 0 1; + color, 255 255 255 255; + } + } + + + part { + name, "padding.new_network.btn.action_space"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 26 0; + rel1 { + to, "part.new_network.action"; + relative, 0.5 0.0; + } + rel2 { + to, "part.new_network.action"; + relative, 0.5 1.0; + } + fixed, 1 0; + } + } + + part { + name, "part.new_network.btn.cancel"; + type, SWALLOW; + scale, 1; + description { + state, "default" 0.0; + min, 308 64; + rel1 { + to, "padding.new_network.btn.action_space"; + relative, 0.0 0.5; + } + rel2 { + to, "padding.new_network.btn.action_space"; + relative, 0.0 0.5; + } + fixed, 1 1; + align, 1.0 0.5; + } + } + + part { + name, "bg.entry"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + color, 202 202 202 255; + min, 308 64; + rel1 { + to, "padding.new_network.btn.action_space"; + relative, 1.0 0.5; + } + rel2 { + to, "padding.new_network.btn.action_space"; + relative, 1.0 0.5; + } + fixed, 1 1; + align, 0.0 0.5; + } + } + + part { + name, "part.new_network.btn.done"; + type, SWALLOW; + scale, 1; + description { + state, "default" 0.0; + rel1.to, "bg.entry"; + rel2 { + to, "bg.entry"; + relative, 1.0 1.0; + } + } + } + } +} + +group { name: "grp.layout.new_network"; + parts { + part { + name, "area"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + rel1.relative, 0.0 0.0; + rel2.relative, 1.0 1.0; + visible, 0; + } + } + + part { + name, "bg"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + color, 244 244 244 255; + rel1 { + relative, 0.0510 0.0667; + to, "area"; + } + rel2 { + relative, 0.9490 0.9111; + to, "area"; + } + } + } + + part { + name, "padding.area1"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 0 72; + rel1 { + to, "bg"; + relative, 0.0 0.0; + } + rel2 { + to, "bg"; + relative, 1.0 0.0; + } + align, 0.5 0.0; + fixed, 0 1; + } + } + + part { + name, "padding.area2"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + rel1 { + to, "padding.area1"; + relative, 0.0 1.0; + } + rel2 { + to, "padding.area3"; + relative, 1.0 0.0; + } + align, 0.5 0.0; + } + } + + part { + name, "padding.area3"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 0 80;//124; + rel1 { + to, "bg"; + relative, 0.0 1.0; + } + rel2 { + to, "bg"; + relative, 1.0 1.0; + } + align, 0.5 1.0; + fixed, 0 1; + } + } + + part { + name, "padding.content.space"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 88 0; + rel1 { + to, "padding.area2"; + relative, 0.5 0.0; + } + rel2 { + to, "padding.area2"; + relative, 0.5 1.0; + } + fixed, 1 0; + } + } + + part { + name, "part.content.left"; + type, SWALLOW; + scale, 1; + description { + state, "default" 0.0; + min, 246 0; + rel1.to, "bg";//"padding.content.space"; + rel2 { + to, "bg";//"padding.content.space"; + relative, 0.15 1.0; + } + align, 0.0 0.5;//1.0 0.5; + fixed, 1 0; + } + } + + part { + name, "part.content.right"; + type, SWALLOW; + scale, 1; + description { + state, "default" 0.0; + min, 246 0; + rel1 { + to_x, "padding.content.space"; + to_y, "part.content.left"; + relative, 1.0 0.0; + } + rel2.to, "padding.content.space"; + align, 0.0 0.5; + fixed, 1 0; + } + } + } +} + +group { name: "grp.content.ip_setting"; + parts { + part { + name, "area"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + rel1.relative, 0.0 0.0; + rel2.relative, 1.0 1.0; + visible, 0; + } + } + + part { + name, "bg"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + color, 244 244 244 255; + rel1 { + relative, 0.0510 0.0667;//0.0 0.0; + to, "area"; + } + rel2 { + relative, 0.9490 0.9111;//1.0 1.0; + to, "area"; + } + } + } + + part { + name, "part.text.ip_setting"; + type, TEXT; + scale, 1; + description { + state, "default" 0.0; + min, 200 36; + rel1 { + to, "bg"; + relative, 0.0 0.0; + } + rel2 { + to, "bg"; + relative, 1.0 0.0; + } + align, 0.0 0.0; + fixed, 0 1; + text { + text, "IP Setting"; + font, "BreezeSans"; + size, 36; + align, 0 0; + } + color, 77 77 77 255; + } + } + + part { + name, "padding.ip_dropdown"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 16 0; + rel1 { + to, "part.text.ip_setting"; + relative, 1.0 0.0; + } + rel2.to, "part.text.ip_setting"; + rel2.relative, 1.0 1.0; + fixed, 1 1; + align, 0.0 0.0; + } + } + + part { + name, "part.ip.type"; + type, SWALLOW; + scale, 1; + description { + state, "default" 0.0; + min, 400 0; + rel1 { + to, "padding.ip_dropdown"; + relative, 1.0 0.0; + } + rel2.to, "padding.ip_dropdown"; + fixed, 1 0; + align, 0.0 0.0; + } + } + + part { + name, "padding.ip_setting"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 0 75; + rel1 { + to, "part.text.ip_setting"; + relative, 0.0 1.0; + } + rel2.to, "part.text.ip_setting"; + fixed, 0 1; + align, 0.0 0.0; + } + } + + part { + name, "part.text.ip_address"; + type, TEXT; + scale, 1; + description { + state, "default" 0.0; + min, 0 32; + rel1 { + to, "padding.ip_setting"; + relative, 0.0 1.0;//0.5 1.0; + } + rel2.to, "padding.ip_setting"; + align, 0.0 0.0; + fixed, 0 1; + text { + text, "IP Address"; + font, "BreezeSans"; + size, 32; + align, 0 0; + } + color, 116 116 116 255; + } + } + + part { + name, "padding.ip_address"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 6 0; + rel1 { + to, "part.text.ip_address"; + relative, 1.0 0.0; + } + rel2.to, "part.text.ip_address"; + fixed, 1 0; + align, 0.0 0.5; + } + } + + part { + name, "part.swallow.ip_address"; + type, SWALLOW; + scale, 1; + description { + state, "default" 0.0; + min, 446 0; + rel1 { + to, "padding.ip_address"; + relative, 1.0 0.0; + } + rel2.to, "padding.ip_address"; + + fixed, 1 1; + align, 0.0 0.0; + } + } + + part { + name, "padding.ip_address_entry"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 0 75; + rel1 { + to, "part.text.ip_address";//"part.swallow.ip_address"; + relative, 0.0 1.0; + } + rel2.to, "part.text.ip_address";//"part.swallow.ip_address"; + fixed, 0 1; + align, 0.0 0.0; + } + } + + part { + name, "part.text.subnet"; + type, TEXT; + scale, 1; + description { + state, "default" 0.0; + min, 0 32; + rel1 { + to, "padding.ip_address_entry"; + relative, 0.0 1.0; + } + rel2.to, "padding.ip_address_entry"; + align, 0.0 0.0; + fixed, 0 1; + text { + text, "Subnet Mask"; + font, "BreezeSans"; + size, 32; + align, 0 0; + } + color, 116 116 116 255; + } + } + + part { + name, "padding.subnet_title"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 6 0; + rel1 { + to, "part.text.subnet"; + relative, 1.0 0.0;//0.0 1.0; + } + rel2.to, "part.text.subnet"; + fixed, 1 0;//0 1; + align, 0.0 0.5;//0.0 0.0; + } + } + + part { + name, "part.swallow.subnet"; + type, SWALLOW; + scale, 1; + description { + state, "default" 0.0; + min, 446 0; + rel1 { + to, "padding.subnet_title"; + relative, 1.0 0.0;//0.0 1.0; + } + rel2.to, "padding.subnet_title"; + fixed, 1 1;//1 1; + align, 0.0 0.0; + } + } + + part { + name, "padding.subnet_entry"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 0 75; + rel1 { + to, "part.text.subnet";//"part.swallow.subnet"; + relative, 0.0 1.0; + } + rel2.to,"part.text.subnet";// "part.swallow.subnet"; + fixed, 0 1; + align, 0.0 0.0; + } + } + + part { + name, "part.text.gateway"; + type, TEXT; + scale, 1; + description { + state, "default" 0.0; + min, 0 32; + rel1 { + to, "padding.subnet_entry"; + relative, 0.0 1.0; + } + rel2.to, "padding.subnet_entry"; + align, 0.0 0.0; + fixed, 0 1; + text { + text, "Gateway"; + font, "BreezeSans"; + size, 32; + align, 0 0; + } + color, 116 116 116 255; + } + } + + part { + name, "padding.gateway_title"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 6 0;//0 26; + rel1 { + to, "part.text.gateway"; + relative, 1.0 0.0;//0.0 1.0; + } + rel2.to, "part.text.gateway"; + fixed, 1 0;//0 1; + align, 0.0 0.5; + } + } + + part { + name, "part.swallow.gateway"; + type, SWALLOW; + scale, 1; + description { + state, "default" 0.0; + min, 446 0;//0 64; + rel1 { + to, "padding.gateway_title"; + relative, 1.0 0.0;//0.0 1.0; + } + rel2.to, "padding.gateway_title"; + fixed, 1 0;//0 1; + align, 0.0 0.0; + } + } + } +} + +group { name: "grp.content.dns_setting"; + parts { + part { + name, "area"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + rel1.relative, 0.0 0.0; + rel2.relative, 1.0 1.0; + visible, 0; } } part { - name, "part.inside.line.down"; + name, "bg"; type, RECT; scale, 1; description { state, "default" 0.0; - min, 0 1; - color, COLOR_LINE_INSIDE; + color, 244 244 244 255; rel1 { - to, "part.inside.line.left"; - relative, 1.0 1.0; + relative, 0.0510 0.0667; + to, "area"; } rel2 { - to, "part.inside.line.right"; - relative, 0.0 1.0; + relative, 0.9490 0.9111; + to, "area"; } - align, 0.5 1.0; - fixed, 0 1; } } part { - name, PART_WIFI_PASSCODE; - type, SWALLOW; + name, "part.text.dns_setting"; + type, TEXT; scale, 1; description { state, "default" 0.0; + min, 0 36; rel1 { - to, "padding.passcode.area"; + to, "bg"; relative, 0.0 0.0; - offset, 1 1; } rel2 { - to, "padding.passcode.area"; - relative, 1.0 1.0; - offset, -2 0; + to, "bg"; + relative, 1.0 0.0; } - fixed, 0 1; + align, 0.0 0.0; + fixed, 1 0;//1 1; + text { + text, "DNS Setting"; + font, "BreezeSans"; + size, 36; + align, 0.0 0.0; + } + color, 77 77 77 255; } } + part { + name, "padding.dns_dropdown"; + type, SPACER; + scale, 1; + description { + state, "default" 0.0; + min, 16 0;//36; + rel1 { + to, "part.text.dns_setting"; + relative, 1.0 0.0; + } + rel2.to, "part.text.dns_setting"; + rel2.relative, 1.0 1.0; + fixed, 1 1; + align, 0.0 0.0; + } + } + part { + name, "part.dns.type"; + type, SWALLOW; + scale, 1; + description { + state, "default" 0.0; + min, 400 0; + rel1 { + to, "padding.dns_dropdown"; + relative, 1.0 0.0; + } + rel2.to, "padding.dns_dropdown"; + fixed, 1 0; + align, 0.0 0.0; + } + } -/* //////////////////////////////////////////////////////////// */ part { - name, "padding.error_msg.top"; + name, "padding.dns_setting"; type, SPACER; scale, 1; description { state, "default" 0.0; - align, 0.0 0.0; - fixed, 0 1; - min, 0 20; + min, 0 75; rel1 { + to, "part.text.dns_setting"; relative, 0.0 1.0; - to, "padding.passcode.area"; - } - rel2 { - to, "padding.passcode.area"; } + rel2.to, "part.text.dns_setting"; + fixed, 0 1; + align, 0.0 0.0; } } part { - name, "part.error_msg"; + name, "part.text.dns_address"; type, TEXT; scale, 1; description { state, "default" 0.0; - align, 0.0 0.0; - fixed, 0 1; - min, 0 24; - color, 240 62 62 255; + min, 0 32; rel1 { + to, "padding.dns_setting"; relative, 0.0 1.0; - to, "padding.error_msg.top"; - } - rel2 { - to, "padding.error_msg.top"; } + rel2.to, "padding.dns_setting"; + + align, 0.0 0.0; + fixed, 0 1; text { - text, ""; - font, FONT_LIGHT; - size, 24; + text, "DNS Server"; + font, "BreezeSans"; + size, 32; + align, 0 0; } + color, 116 116 116 255; } } part { - name, "padding.error_msg.bottom"; + name, "padding.dns_address"; type, SPACER; scale, 1; description { state, "default" 0.0; - align, 0.0 0.0; - fixed, 0 1; - min, 0 20; + min, 0 0;//0 26; rel1 { - relative, 0.0 1.0; - to, "part.error_msg"; - } - rel2 { - to, "part.error_msg"; + to, "part.text.dns_address"; + relative, 1.0 0.0;//0.0 1.0; } + rel2.to, "part.text.dns_address"; + fixed, 1 0;//0 1; + align, 0.0 0.0; } } part { - name, "part.popup.bottom.cancel"; + name, "part.swallow.dns_address"; type, SWALLOW; scale, 1; description { state, "default" 0.0; + min, 446 0; + rel1 { + to, "padding.dns_address"; + relative, 1.0 0.0;//0.0 1.0; + } + rel2.to, "padding.dns_address"; + fixed, 1 0;//0 1; align, 0.0 0.0; - fixed, 0 1; - min, 0 64; - color: 0 255 0 255; + } + } + } +} + +group { name: "grp.item.ip_address"; + images { + image: "img_input_dot.png" COMP; + image: "search_searchbar_small_bg_foc.png" COMP; + } + + parts { + part { name: "bg"; + type: RECT; + scale, 1; + description { state: "default" 0.0; + fixed: 1 1; + color: 194 194 194 255; + max: 446 64; + } + description { + state, "focused"; + inherit, "default" 0.0; + color, 0 119 246 255; + } + description { + state, "selected"; + inherit, "default" 0.0; + color, 64 136 211 255; + } + description { + state, "disable"; + inherit, "default" 0.0; + color, 194 194 194 127; + } + } + + part { name, "bg.inside"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; rel1 { - relative, 0.0 1.0; - to, "padding.error_msg.bottom"; + offset, 2 2; + to, "bg"; } rel2 { - relative, 0.475 1.0; - to, "padding.error_msg.bottom"; + offset, -3 -3; + to, "bg"; + } + } + description { + state, "focused"; + inherit, "default" 0.0; + rel1 { + offset, 3 3; + to, "bg"; + } + rel2 { + offset, -4 -4; + to, "bg"; } + color, 245 249 253 255; + } + description { + state, "selected"; + inherit, "default" 0.0; + } + description { + state, "disable"; + inherit, "default" 0.0; } } part { - name, "part.popup.bottom.ok"; - type, SWALLOW; - scale, 1; - repeat_events, 1; + name: "base_highlight"; + after: "bg"; + scale: 1; description { - state, "default" 0.0; - align, 0.0 0.0; - fixed, 0 1; - color: 255 0 0 255; - min, 0 64; - visible: 1; + state: "default" 0.0; + rel1.to: "bg"; + rel2.to: "bg"; + image { + normal: "search_searchbar_small_bg_foc.png"; + border: 5 5 5 5; + border_scale: 1; + } + } + } + part { name: "padding.left"; + type: SPACER; + scale, 1; + description { state: "default" 0.0; + align: 0.0 0.5; + fixed: 1 1; + min: 26 0; rel1 { - relative, 0.525 1.0; - to, "padding.error_msg.bottom"; + to: "bg"; } rel2 { - to, "padding.error_msg.bottom"; + relative: 0.0 1.0; + to: "bg"; } } } -/*//////////////////////////////////////////////////////////// */ + part { name: "padding.right"; + type: SPACER; + scale, 1; + description { state: "default" 0.0; + align: 1.0 0.5; + fixed: 1 0; + min: 26 0; + rel1 { + relative: 1.0 0.0; + to: "bg"; + } + rel2 { + to: "bg"; + } + } + } + part { name: "padding.bottom"; + type: SPACER; + scale, 1; + description { state: "default" 0.0; + align: 0.5 1.0; + fixed: 1 1; + min: 0 16; + rel1 { + relative: 1.0 1.0; + to: "padding.left"; + } + rel2 { + relative: 0.0 1.0; + to: "padding.right"; + } + } + } + + part { name: "part.swallow.ip_1"; + type: SWALLOW; + scale, 1; + description { state: "default" 0.0; + align: 0.0 0.5; + fixed: 1 0; + min: 76 0; + rel1 { + relative: 1.0 0.0; + to: "padding.left"; + } + rel2 { + to: "padding.left"; + } + } + } + + part { name: "padding.ip1"; + type: SPACER; + scale, 1; + description { state: "default" 0.0; + align: 0.0 0.5; + fixed: 1 0; + min: 30 0; + rel1 { + relative: 1.0 0.0; + to: "part.swallow.ip_1"; + } + rel2 { + to: "part.swallow.ip_1"; + } + } + } + + part { name: "part.swallow.ip_2"; + type: SWALLOW; + scale, 1; + description { state: "default" 0.0; + align: 0.0 0.5; + fixed: 1 0; + min: 76 0; + rel1 { + relative: 1.0 0.0; + to: "padding.ip1"; + } + rel2 { + to: "padding.ip1"; + } + } + } + + part { name: "padding.ip2"; + type: SPACER; + scale, 1; + description { state: "default" 0.0; + align: 0.0 0.5; + fixed: 1 0; + min: 30 0; + rel1 { + relative: 1.0 0.0; + to: "part.swallow.ip_2"; + } + rel2 { + to: "part.swallow.ip_2"; + } + } + } + + part { name: "part.swallow.ip_3"; + type: SWALLOW; + scale, 1; + description { state: "default" 0.0; + align: 0.0 0.5; + fixed: 1 0; + min: 76 0; + rel1 { + relative: 1.0 0.0; + to: "padding.ip2"; + } + rel2 { + to: "padding.ip2"; + } + } + } + + part { name: "padding.ip3"; + type: SPACER; + scale, 1; + description { state: "default" 0.0; + align: 0.0 0.5; + fixed: 1 0; + min: 30 0; + rel1 { + relative: 1.0 0.0; + to: "part.swallow.ip_3"; + } + rel2 { + to: "part.swallow.ip_3"; + } + } + } + + part { name: "part.swallow.ip_4"; + type: SWALLOW; + scale, 1; + description { state: "default" 0.0; + align: 0.0 0.5; + fixed: 1 0; + min: 76 0; + rel1 { + relative: 1.0 0.0; + to: "padding.ip3"; + } + rel2 { + to: "padding.ip3"; + } + } + } + part { name: "img.dot1"; + type: IMAGE; + scale, 1; + description { state: "default" 0.0; + align: 0.5 1.0; + fixed: 1 1; + min: 6 6; + max: 6 6; + rel1 { + to_x: "padding.ip1"; + to_y: "padding.bottom"; + } + rel2 { + relative: 1.0 0.0; + to_x: "padding.ip1"; + to_y: "padding.bottom"; + } + image { + normal: "img_input_dot.png"; + middle: DEFAULT; + } + } + } + part { name: "img.dot2"; + type: IMAGE; + scale, 1; + description { state: "default" 0.0; + align: 0.5 1.0; + fixed: 1 1; + min: 6 6; + max: 6 6; + rel1 { + to_x: "padding.ip2"; + to_y: "padding.bottom"; + } + rel2 { + relative: 1.0 0.0; + to_x: "padding.ip2"; + to_y: "padding.bottom"; + } + image { + normal: "img_input_dot.png"; + middle: DEFAULT; + } + } + } + part { name: "img.dot3"; + type: IMAGE; + scale, 1; + description { state: "default" 0.0; + align: 0.5 1.0; + fixed: 1 1; + min: 6 6; + max: 6 6; + rel1 { + to_x: "padding.ip3"; + to_y: "padding.bottom"; + } + rel2 { + relative: 1.0 0.0; + to_x: "padding.ip3"; + to_y: "padding.bottom"; + } + image { + normal: "img_input_dot.png"; + middle: DEFAULT; + } + } + } + } + + programs { + program { + name, "sig.ipaddr.focused"; + signal, "sig.ipaddr.focused"; + source, SRC_ELM; + action, STATE_SET "visible" 0.0; + target, "bg"; + target, "bg.inside"; + } + + program { + name, "sig.ipaddr.selected"; + signal, "sig.ipaddr.selected"; + source, SRC_ELM; + action, STATE_SET "selected" 0.0; + target, "bg"; + target, "bg.inside"; + } + + program { + name, "sig.ipaddr.unfocused"; + signal, "sig.ipaddr.unfocused"; + source, SRC_ELM; + action, STATE_SET "default" 0.0; + target, "bg"; + target, "bg.inside"; + } + + program { + name, "sig.ipaddr.disabled"; + signal, "sig.ipaddr.disabled"; + source, SRC_ELM; + action, STATE_SET "disabled" 0.0; + target, "bg"; + target, "bg.inside"; + } } } diff --git a/res/widget/gengrid_network.edc b/res/widget/gengrid_network.edc index 8f8dbdd..ade81d8 100644 --- a/res/widget/gengrid_network.edc +++ b/res/widget/gengrid_network.edc @@ -19,6 +19,9 @@ #define STATE_CHECKED 2 #define STATE_FOCUSED 3 +#define STATE_REMOVED_N 0 +#define STATE_REMOVED_Y 1 + #define CONNECTION_STATE_DISCONNECTED 0 #define CONNECTION_STATE_PROGRESS 1 #define CONNECTION_STATE_FAIL 2 @@ -82,6 +85,7 @@ group { public signal_level; public is_focused; public connecting_state; + public is_removed; } parts { @@ -230,7 +234,12 @@ group { } - + description { + state, "removed.focused.locked" 0.0; + visible, 0; + inherit, "focused.locked" 0.0; + image.normal, IC_LOCK_NETWORK_FOC_01_PNG; + } description { state, "focused.locked" 0.1; inherit, "focused.locked" 0.0; @@ -253,6 +262,12 @@ group { } description { + state, "removed.focused.unlocked" 0.0; + visible, 0; + inherit, "focused.unlocked" 0.0; + image.normal, IC_NETWORK_FOC_01_PNG; + } + description { state, "focused.unlocked" 0.1; inherit, "focused.unlocked" 0.0; image.normal, IC_NETWORK_FOC_01_PNG; @@ -276,6 +291,12 @@ group { description { + state, "removed.unfocused.locked" 0.0; + visible, 0; + inherit, "unfocused.locked" 0.0; + image.normal, IC_LOCK_NETWORK_NOR_01_PNG; + } + description { state, "unfocused.locked" 0.1; inherit, "unfocused.locked" 0.0; image.normal, IC_LOCK_NETWORK_NOR_01_PNG; @@ -297,6 +318,12 @@ group { } description { + state, "removed.unfocused.unlocked" 0.0; + visible, 0; + inherit, "unfocused.unlocked" 0.0; + image.normal, IC_NETWORK_NOR_01_PNG; + } + description { state, "unfocused.unlocked" 0.1; inherit, "unfocused.unlocked" 0.0; image.normal, IC_NETWORK_NOR_01_PNG; @@ -621,6 +648,7 @@ group { set_int(check_state, STATE_NORMAL); set_float(signal_level, 0.0); set_int(is_focused, STATE_NORMAL); + set_int(is_removed, STATE_REMOVED_N); set_int(connecting_state, CONNECTION_STATE_DISCONNECTED); } } @@ -632,10 +660,11 @@ group { script { new state; new Float:signal_icon; - + new removed_state; + removed_state = get_int(is_removed); state = get_int(lock_state); signal_icon = get_float(signal_level); - + if (removed_state == STATE_REMOVED_N) { if (state == STATE_LOCKED) set_state(PART:"part.wifi.icon", "focused.locked", signal_icon); else @@ -658,6 +687,25 @@ group { set_state(PART:PART_WIFI_NAME, "focused", 0.0); set_state(PART:"part.bg", "focused", 0.0); set_int(is_focused, STATE_FOCUSED); + } + } + } + + program { + name, "remove_wifi_sig_icon"; + signal, "remove_wifi_sig_icon"; + source, SRC_ELM; + script { + + set_state(PART:"part.wifi.icon", "removed.focused.locked", 0.0); +/* set_state(PART:"part.wifi.icon", "removed.focused.unlocked", 0.0); + set_state(PART:"part.wifi.icon", "removed.unfocused.unlocked", 0.0); + set_state(PART:"part.wifi.icon", "removed.unfocused.locked", 0.0); +*/ + set_int(is_removed, STATE_REMOVED_Y); + run_program(PROGRAM:"stop_state_loop"); + run_program(PROGRAM:"loading_state_loop"); + } } diff --git a/res/widget/popup.edc b/res/widget/popup.edc index 2e3d0be..a0784b0 100644 --- a/res/widget/popup.edc +++ b/res/widget/popup.edc @@ -35,6 +35,13 @@ #define POPUP_BUTTON_MIN_SIZE 196 70 #define POPUP_BUTTON_PADDING_SIZE 20 70 +#define EASY_EASE(duration) CUBIC_BEZIER (duration) 0.33 0.1 0.67 1.0 +#define EASE_IN1(duration) CUBIC_BEZIER (duration) 0.16 0.02 0.0 0.33 +#define EASE_IN2(duration) CUBIC_BEZIER (duration) 0.33 0.33 0.67 0.16 +#define GLIDE_OUT(duration) CUBIC_BEZIER (duration) 0.15 0.0 0.3 1.0 +#define GLIDE_EASE_OUT(duration) CUBIC_BEZIER (duration) 0.25 0.46 0.45 1.0 +#define POPUP_DEFAULT_VI_INC 12 + group { "elm/popup/base/settings"; nomouse; data.item: "hide_finished_signal" "on"; @@ -49,6 +56,7 @@ group { "elm/popup/base/settings"; } } } + // notify group { name: "elm/notify/center/popup/style.popup"; alias: "elm/notify/bottom/popup/style.popup"; @@ -526,4 +534,4 @@ group { name: "elm/popup/buttons3/popup/style.popup"; } } } -} + diff --git a/src/common/datamgr.c b/src/common/datamgr.c index d184e97..b9ac116 100644 --- a/src/common/datamgr.c +++ b/src/common/datamgr.c @@ -98,5 +98,6 @@ Eina_List *datamgr_get_data(struct datamgr *dmgr) if (dmgr->dclass->get_data) return dmgr->dclass->get_data(dmgr->dclass_data); + return NULL; } diff --git a/src/common/listmgr.c b/src/common/listmgr.c index 1125bf6..80aed4a 100755 --- a/src/common/listmgr.c +++ b/src/common/listmgr.c @@ -1,6 +1,4 @@ /* - - * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); diff --git a/src/common/utils.c b/src/common/utils.c index 952f817..09751cc 100755 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -287,7 +287,7 @@ Evas_Object *utils_add_gengrid(Evas_Object *parent, Eina_Bool horizontal, elm_gengrid_multi_select_set(grid, EINA_FALSE); //elm_gengrid_horizontal_set(grid, horizontal); - elm_gengrid_align_set(grid, 0.0, 0.0); + elm_gengrid_align_set(grid, 0.5, 0.0); elm_gengrid_select_mode_set(grid, ELM_OBJECT_SELECT_MODE_ALWAYS); elm_config_item_select_on_focus_disabled_set(EINA_TRUE); elm_gengrid_item_size_set(grid, diff --git a/src/data/system/data_wireless.c b/src/data/system/data_wireless.c index 60a9e57..fdc9de5 100644 --- a/src/data/system/data_wireless.c +++ b/src/data/system/data_wireless.c @@ -450,6 +450,10 @@ static void _wifi_manager_connected_cb(wifi_manager_error_e err, void *data) } return; + } else { + if (priv->event_cb) + priv->event_cb(EVENT_DATA_CONNECTED, priv->cb_data); + } } diff --git a/src/grid/grid_wireless.c b/src/grid/grid_wireless.c index e234109..8f56f4b 100644 --- a/src/grid/grid_wireless.c +++ b/src/grid/grid_wireless.c @@ -23,7 +23,7 @@ #include "grid/grid_wireless.h" #include "layout/network.h" -#define WIFI_LIST_ITEM_X 670 +#define WIFI_LIST_ITEM_X 300 #define WIFI_LIST_ITEM_Y 35 //#define WIFI_LIST_ITEM_X ((488 + 26) / 2) //#define WIFI_LIST_ITEM_Y ((134 + 26) / 2) diff --git a/src/layout/layout_network.c b/src/layout/layout_network.c index 8a1a2e1..ad658e3 100644 --- a/src/layout/layout_network.c +++ b/src/layout/layout_network.c @@ -1,5 +1,4 @@ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); @@ -37,6 +36,7 @@ //#include "view/network/view_wired.h" #include "view/network/view_wireless.h" #include "view/network/view_wireless_list.h" +#include "view/network/view_wireless_scanning.h" #define SIG_LIST_ITEM_UNFOCUS "elm,state,unfocused" #define MAX_WIRELESS_LEN 64 @@ -105,6 +105,14 @@ static bool _draw_wifi_passcode_popup(struct _priv *priv, char *wifi_name, static void _focused1(void *data, int id); static void _selected(void *data, int id); +struct _priv * current_priv = NULL; + + +struct _priv* get_priv() +{ + return current_priv; +} + static struct menumgr_info menu_info[] = { { .id = TYPE_WIRELESS, @@ -166,8 +174,13 @@ static void _selected(void *data, int id) _retry_wireless_network(priv); break; case TYPE_WIRED: - _retry_wired_network(priv); - break; + SETTING_TRACE("Wired network"); + _retry_wired_network(priv); + break; + +/* if (!viewmgr_show_view(VIEW_WIRED)) + _ERR("Show wired view failed."); + break;*/ default: _ERR("Invalid menu."); } @@ -190,7 +203,6 @@ static void _network_type_option_selected(struct _priv *priv, int id, preserve = elm_object_part_content_unset(priv->ly, "part.wired.area"); if (preserve) evas_object_hide(preserve); - _retry_wireless_network(priv); break; @@ -200,8 +212,9 @@ static void _network_type_option_selected(struct _priv *priv, int id, /* Hide wireless network list */ elm_object_signal_emit(priv->ly, SIG_WIRELESS_EXISTS, SRC_ELM); - listmgr_hide_grid(priv->listmgr, LIST_WIRELESS, - PART_WIRELESS_LIST); +/* listmgr_hide_grid(priv->listmgr, LIST_WIRELESS, + PART_WIRELESS_LIST);*/ + viewmgr_update_view(VIEW_WIRELESS_LIST, GRID_HIDE, NULL); elm_object_signal_emit(priv->ly, SIG_LOADING_STOP, SRC_ELM); /* Show wired network status */ @@ -218,8 +231,9 @@ static void _network_type_option_selected(struct _priv *priv, int id, /* Hide wireless network list */ elm_object_signal_emit(priv->ly, SIG_WIRELESS_EXISTS, SRC_ELM); - listmgr_hide_grid(priv->listmgr, LIST_WIRELESS, - PART_WIRELESS_LIST); + /*listmgr_hide_grid(priv->listmgr, LIST_WIRELESS, + PART_WIRELESS_LIST);*/ + viewmgr_update_view(VIEW_WIRELESS_LIST, GRID_UPDATE, NULL); elm_object_signal_emit(priv->ly, SIG_LOADING_STOP, SRC_ELM); elm_object_part_text_set(priv->ly, PART_NO_NETWORK_TEXT, ""); @@ -231,6 +245,7 @@ static void _network_type_option_selected(struct _priv *priv, int id, /* Set network type as wired */ elm_object_text_set(priv->network_type_btn, STR_WIRED); +// viewmgr_pop_all_views(); if (!viewmgr_add_view(view_new_network_get_vclass(), priv->wired)) { _ERR("Add new network view failed."); return; @@ -325,6 +340,23 @@ static void _network_type_clicked_cb(int id, void *data, Evas_Object *obj) _draw_network_type_popup(priv); } +void _destroy_wired_status_popup() +{ + evas_object_hide(connected_wired_popup); + evas_object_hide(connecting_wired_popup); + evas_object_hide(failed_wired_popup); + + evas_object_del(connected_wired_popup); + connected_wired_popup = NULL; + + evas_object_del(connecting_wired_popup); + connecting_wired_popup = NULL; + + evas_object_del(failed_wired_popup); + failed_wired_popup = NULL; + + return; +} static void _network_type_key_down_cb(int id, void *data, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev) @@ -340,6 +372,287 @@ static void _network_type_key_down_cb(int id, void *data, Evas *e, viewmgr_update_view(VIEW_BASE, UPDATE_FOCUS, NULL); } +void _destroy_wireless_status_popup() +{ + evas_object_hide(connected_wireless_popup); + evas_object_hide(connecting_wireless_popup); + evas_object_hide(failed_wireless_popup); + + evas_object_del(connected_wireless_popup); + connected_wireless_popup = NULL; + + evas_object_del(connecting_wireless_popup); + connecting_wireless_popup = NULL; + + evas_object_del(failed_wireless_popup); + failed_wireless_popup = NULL; + + return; +} + +/*static void _stop_wireless_dismissed_cb(void *data, Evas_Object *obj, void *ei) +{ + _destroy_wireless_status_popup(); + return; +} +*/ +static void _stop_wired_dismissed_cb(void *data, Evas_Object *obj, void *ei) +{ + _destroy_wired_status_popup(); + return; +} +static void _done_wireless_dismissed_cb(void *data, Evas_Object *obj, void *ei) +{ + _destroy_wireless_status_popup(); + return; +} + +static void _done_wired_dismissed_cb(void *data, Evas_Object *obj, void *ei) +{ + _destroy_wired_status_popup(); + return; +} +static void _close_wireless_dismissed_cb(void *data, Evas_Object *obj, void *ei) +{ + _destroy_wireless_status_popup(); + return; +} +static void _close_wired_dismissed_cb(void *data, Evas_Object *obj, void *ei) +{ + _destroy_wired_status_popup(); + return; +} +static void _wired_retry_cb(void *data, Evas_Object *obj, void *ei) +{ + struct _priv *priv;; + priv = get_priv(); + if (!priv) + return; + + _destroy_wired_status_popup(); + _retry_wired_network(priv); +} +static void _wireless_retry_cb(void *data, Evas_Object *obj, void *ei) +{ + struct _priv *priv;; + priv = get_priv(); + if (!priv) + return; + + _destroy_wireless_status_popup(); + _retry_wireless_network(priv); +} + +static void _new_network_cb(void *data, Evas_Object *obj, void *ei) +{ + SETTING_TRACE("New network"); + + struct _priv *priv; + priv = get_priv(); + + _destroy_wired_status_popup(); + _network_type_option_selected(priv, 2, obj); +} + +void _popup_connected_wired_status(struct _priv *priv) +{ + Evas_Object *ly, *done_btn, *new_network_btn; + + _destroy_wired_status_popup(); + + connected_wired_popup = utils_add_popup(priv->base, STYLE_POPUP, "Wired", NULL); + if (!connected_wired_popup) { + _ERR("Add popup failed"); + return; + } + ly = utils_add_layout(connected_wired_popup, GRP_CONNECTED_IMAGE_NETWORK_POPUP, EINA_FALSE); + if (!ly) { + _ERR("Add layout failed."); + evas_object_del(connected_wired_popup); + return; + } + elm_object_part_text_set(ly, "part.text.content", STR_WIRED_COMPLETED); + + done_btn = utils_add_button(ly, "part.done.btn", STYLE_DISABLE_BTN, "DONE"); + if (!done_btn) { + _ERR("Add button failed."); + evas_object_del(connected_wired_popup); + return; + } + evas_object_smart_callback_add(done_btn, "clicked", _done_wired_dismissed_cb, connected_wired_popup); + + new_network_btn = utils_add_button(ly, "part.new.network.btn", STYLE_DISABLE_BTN, "NEW NETWORK"); + if (!new_network_btn) { + _ERR("Add button failed."); + evas_object_del(connected_wired_popup); + return; + } + evas_object_smart_callback_add(new_network_btn, "clicked", _new_network_cb, connected_wired_popup); + + + elm_object_content_set(connected_wired_popup, ly); + evas_object_show(connected_wired_popup); +} +void _popup_connecting_wired_status(struct _priv *priv) +{ + Evas_Object *ly, *stop_btn; + + _destroy_wired_status_popup(); + + connecting_wired_popup = utils_add_popup(priv->base, STYLE_POPUP, "Wired", NULL); + if (!connecting_wired_popup) { + _ERR("Add popup failed"); + return; + } + ly = utils_add_layout(connecting_wired_popup, GRP_CONNECTING_IMAGE_NETWORK_POPUP, EINA_FALSE); + if (!ly) { + _ERR("Add layout failed."); + evas_object_del(connecting_wired_popup); + return; + } + elm_object_part_text_set(ly, "part.text.content", STR_WIRED_PROGRESS); + + + stop_btn = utils_add_button(ly, "part.stop.btn", STYLE_DISABLE_BTN, "STOP"); + if (!stop_btn) { + _ERR("Add button failed."); + evas_object_del(connecting_wired_popup); + return; + } + evas_object_smart_callback_add(stop_btn, "clicked", _stop_wired_dismissed_cb, connecting_wired_popup); + + elm_object_content_set(connecting_wired_popup, ly); + evas_object_show(connecting_wired_popup); +} + + +void _popup_connected_wireless_status(struct _priv *priv) +{ + Evas_Object *ly, *done_btn; + connected_wireless_popup = utils_add_popup(priv->base, STYLE_POPUP, "Wireless", NULL); + if (!connected_wireless_popup) { + _ERR("Add popup failed"); + return; + } + ly = utils_add_layout(connected_wireless_popup, GRP_CONNECTED_IMAGE_NETWORK_POPUP, EINA_FALSE); + if (!ly) { + _ERR("Add layout failed."); + evas_object_del(connected_wireless_popup); + return; + } + elm_object_part_text_set(ly, "part.text.content", STR_WIRELESS_COMPLETED); + + done_btn = utils_add_button(ly, "part.done.btn", STYLE_DISABLE_BTN, "DONE"); + if (!done_btn) { + _ERR("Add button failed."); + evas_object_del(connected_wireless_popup); + return; + } + evas_object_smart_callback_add(done_btn, "clicked", _done_wireless_dismissed_cb, connected_wireless_popup); + + /*new_network_btn = utils_add_button(ly, "part.new.network.btn", STYLE_DISABLE_BTN, "NEW NETWORK"); + if (!new_network_btn) { + _ERR("Add button failed."); + evas_object_del(connected_wireless_popup); + return; + } + evas_object_smart_callback_add(new_network_btn, "clicked", _new_network_cb, connected_wireless_popup); + */ + + elm_object_content_set(connected_wireless_popup, ly); + evas_object_show(connected_wireless_popup); +} + +void _popup_failed_wireless_status(struct _priv *priv) +{ + Evas_Object *ly, *close_btn, *retry_btn; + failed_wireless_popup = utils_add_popup(priv->base, STYLE_POPUP, "Wireless", NULL); + if (!failed_wireless_popup) { + _ERR("Add popup failed"); + return; + } + ly = utils_add_layout(failed_wireless_popup, GRP_FAILED_IMAGE_NETWORK_POPUP, EINA_FALSE); + if (!ly) { + _ERR("Add layout failed."); + evas_object_del(failed_wireless_popup); + return; + } + //elm_object_part_text_set(ly, "part.text.content", STR_WIRED_FAILED); + + close_btn = utils_add_button(ly, "part.close.btn", STYLE_DISABLE_BTN, "CLOSE"); + if (!close_btn) { + _ERR("Add button failed."); + evas_object_del(failed_wireless_popup); + return; + } + evas_object_smart_callback_add(close_btn, "clicked", _close_wireless_dismissed_cb, failed_wireless_popup); + + retry_btn = utils_add_button(ly, "part.retry.btn", STYLE_DISABLE_BTN, "RETRY"); + if (!retry_btn) { + _ERR("Add button failed."); + evas_object_del(failed_wireless_popup); + return; + } + evas_object_smart_callback_add(retry_btn, "clicked", _wireless_retry_cb, failed_wireless_popup); +/* + new_network_btn = utils_add_button(ly, "part.new.network.btn", STYLE_DISABLE_BTN, "NEW NETWORK"); + if (!new_network_btn) { + _ERR("Add button failed."); + evas_object_del(failed_wireless_popup); + return; + } + evas_object_smart_callback_add(new_network_btn, "clicked", _new_network_cb, failed_wireless_popup);*/ + + elm_object_content_set(failed_wireless_popup, ly); + evas_object_show(failed_wireless_popup); +} + +void _popup_failed_wired_status(struct _priv *priv) +{ + Evas_Object *ly, *close_btn, *retry_btn, *new_network_btn; + + _destroy_wired_status_popup(); + + failed_wired_popup = utils_add_popup(priv->base, STYLE_POPUP, "Wired", NULL); + if (!failed_wired_popup) { + _ERR("Add popup failed"); + return; + } + ly = utils_add_layout(failed_wired_popup, GRP_FAILED_IMAGE_NETWORK_POPUP, EINA_FALSE); + if (!ly) { + _ERR("Add layout failed."); + evas_object_del(failed_wired_popup); + return; + } + //elm_object_part_text_set(ly, "part.text.content", STR_WIRED_FAILED); + + close_btn = utils_add_button(ly, "part.close.btn", STYLE_DISABLE_BTN, "CLOSE"); + if (!close_btn) { + _ERR("Add button failed."); + evas_object_del(failed_wired_popup); + return; + } + evas_object_smart_callback_add(close_btn, "clicked", _close_wired_dismissed_cb, failed_wired_popup); + + retry_btn = utils_add_button(ly, "part.retry.btn", STYLE_DISABLE_BTN, "RETRY"); + if (!retry_btn) { + _ERR("Add button failed."); + evas_object_del(failed_wired_popup); + return; + } + evas_object_smart_callback_add(retry_btn, "clicked", _wired_retry_cb, failed_wired_popup); + + new_network_btn = utils_add_button(ly, "part.new.network.btn", STYLE_DISABLE_BTN, "NEW NETWORK"); + if (!new_network_btn) { + _ERR("Add button failed."); + evas_object_del(failed_wired_popup); + return; + } + evas_object_smart_callback_add(new_network_btn, "clicked", _new_network_cb, failed_wired_popup); + + elm_object_content_set(failed_wired_popup, ly); + evas_object_show(failed_wired_popup); +} static void _update_wired_network_status(struct _priv *priv) { int res = get_wired_network_status(priv->wired); @@ -348,22 +661,31 @@ static void _update_wired_network_status(struct _priv *priv) switch (res) { case WIRED_STATUS_COMPLETE: - elm_object_signal_emit(priv->wired_layout, SIG_WIRED_COMPLETE, SRC_ELM); - elm_object_part_text_set(priv->wired_layout, "part.wired.text", - STR_WIRED_COMPLETED); + //elm_object_signal_emit(priv->wired_layout, SIG_WIRED_COMPLETE, SRC_ELM); + //elm_object_part_text_set(priv->wired_layout, "part.wired.text", + //STR_WIRED_COMPLETED); + //evas_object_hide(connecting_wired_popup); + //evas_object_hide(failed_wired_popup); + _popup_connected_wired_status(priv); break; case WIRED_STATUS_PROGRESS: - elm_object_signal_emit(priv->wired_layout, SIG_WIRED_PROGRESS, SRC_ELM); - elm_object_part_text_set(priv->wired_layout, "part.wired.text", - STR_WIRED_PROGRESS); + //elm_object_signal_emit(priv->wired_layout, SIG_WIRED_PROGRESS, SRC_ELM); + //elm_object_part_text_set(priv->wired_layout, "part.wired.text", + // STR_WIRED_PROGRESS); + //evas_object_hide(connected_wired_popup); + //evas_object_hide(failed_wired_popup); + _popup_connecting_wired_status(priv); break; case WIRED_STATUS_FAIL: default: - elm_object_signal_emit(priv->wired_layout, SIG_WIRED_FAIL, SRC_ELM); - elm_object_part_text_set(priv->wired_layout, "part.wired.text", - STR_WIRED_FAILED); + //elm_object_signal_emit(priv->wired_layout, SIG_WIRED_FAIL, SRC_ELM); + //elm_object_part_text_set(priv->wired_layout, "part.wired.text", + // STR_WIRED_FAILED); + //evas_object_hide(connecting_wired_popup); + //evas_object_hide(connected_wired_popup); + _popup_failed_wired_status(priv); break; } } @@ -378,13 +700,17 @@ static void _retry_wired_network(struct _priv *priv) data = priv->wired; /* Set progress state */ - elm_object_signal_emit(priv->wired_layout, SIG_WIRED_PROGRESS, SRC_ELM); - elm_object_part_text_set(priv->wired_layout, "part.wired.text", - STR_WIRED_PROGRESS); + //elm_object_signal_emit(priv->wired_layout, SIG_WIRED_PROGRESS, SRC_ELM); + //elm_object_part_text_set(priv->wired_layout, "part.wired.text", + // STR_WIRED_PROGRESS); + evas_object_hide(connected_wired_popup); + evas_object_hide(failed_wired_popup); + _popup_connecting_wired_status(priv); + /* If custom option is set, update connection profile */ - _DBG("Update status : [%s]", (data->result) ? "True" : "False"); - _DBG(" type : [%d]", data->network_type); + //_DBG("Update status : [%s]", (data->result) ? "True" : "False"); + //_DBG(" type : [%d]", data->network_type); if (data->result) { if (data->network_type == WIRED_TYPE_AUTOMATIC) { _DBG("DHCP"); @@ -412,6 +738,12 @@ void _retry_wireless_network(struct _priv *priv) return; } + // viewmgr_pop_all_views(); + if(!viewmgr_add_view(view_wireless_scanning_get_vclass(), NULL)) + _ERR("Add wireless view failed."); + if (!viewmgr_show_view(VIEW_WIRELESS_SCANNING)) + _ERR("Push wireless view failed."); + /* Update wireless network state */ elm_object_signal_emit(priv->ly, SIG_LOADING_START, SRC_ELM); if (!datamgr_update(priv->wirelessmgr)) { @@ -537,7 +869,9 @@ static void _grid_focused_cb(int id, void *data, Evas_Object *obj, Elm_Object_It priv->focused_wireless_item = item; /* Unfocus other items */ - listmgr_foreach_list(priv->listmgr, LIST_WIRELESS, _grid_set_unfocus, priv); + //listmgr_foreach_list(priv->listmgr, LIST_WIRELESS, _grid_set_unfocus, priv); + viewmgr_update_view(VIEW_WIRELESS_LIST, GRID_FOREACH, + _grid_set_unfocus); } static void _grid_selected_cb(int id, void *data, Evas_Object *obj, @@ -587,16 +921,19 @@ static void _draw_no_contents_message(struct _priv *priv) elm_object_signal_emit(priv->ly, SIG_NO_WIRELESS, SRC_ELM); elm_object_signal_emit(priv->ly, SIG_LOADING_STOP, SRC_ELM); elm_object_part_text_set(priv->ly, PART_NO_NETWORK_TEXT, STR_NO_NETWORK); - listmgr_hide_grid(priv->listmgr, LIST_WIRELESS, - PART_WIRELESS_LIST); +/* listmgr_hide_grid(priv->listmgr, LIST_WIRELESS, + PART_WIRELESS_LIST);*/ + viewmgr_update_view(VIEW_WIRELESS_LIST, GRID_UPDATE, NULL); } static void _wireless_data_found_done(struct _priv *priv, Eina_List *list) { + viewmgr_update_view(VIEW_WIRELESS_LIST, GRID_FILL, list); + viewmgr_update_view(VIEW_WIRELESS_LIST, GRID_SHOW, NULL); /* if (!listmgr_fill_grid(priv->listmgr, LIST_WIRELESS, list, NULL, NULL) || !listmgr_show_grid(priv->listmgr, LIST_WIRELESS, PART_WIRELESS_LIST, NULL)) { _ERR("Listmgr show list failed."); - _draw_no_contents_message(priv); +// _draw_no_contents_message(priv); return; } */ @@ -683,6 +1020,7 @@ static void _data_event_cb(enum event_type type, void *data) case EVENT_DATA_INIT_FAIL_WIRELESS: priv->wireless_update_requested = false; /* Failed to initialize wireless */ + //viewmgr_pop_all_views(); viewmgr_add_view(view_wireless_get_vclass(), priv->wirelessmgr); _DBG("Wireless is not activated"); if (!viewmgr_show_view(VIEW_WIRELESS)) @@ -699,6 +1037,8 @@ static void _data_event_cb(enum event_type type, void *data) case EVENT_DATA_UPDATE_DONE: priv->wireless_update_requested = false; + + //viewmgr_pop_all_views(); viewmgr_add_view(view_wireless_list_get_vclass(), priv->wirelessmgr); _DBG("Wireless is not activated"); if (!viewmgr_show_view(VIEW_WIRELESS_LIST)) @@ -721,15 +1061,19 @@ static void _data_event_cb(enum event_type type, void *data) elm_object_item_signal_emit(priv->connecting_wireless_item, SIG_LOADING_STOP, SRC_ELM); - if (!listmgr_update_grid(priv->listmgr, LIST_WIRELESS)) +/* if (!listmgr_update_grid(priv->listmgr, LIST_WIRELESS)) _ERR("Listmgr update list failed."); - +*/ + viewmgr_update_view(VIEW_WIRELESS_LIST, GRID_UPDATE, NULL); break; case EVENT_DATA_SELECT_FAIL: _DBG("Failed to connect"); - listmgr_foreach_list(priv->listmgr, LIST_WIRELESS, - _grid_remove_connecting_state, priv); +/* listmgr_foreach_list(priv->listmgr, LIST_WIRELESS, + _grid_remove_connecting_state, priv);*/ + viewmgr_update_view(VIEW_WIRELESS_LIST, GRID_FOREACH, + _grid_remove_connecting_state); + elm_object_item_signal_emit(priv->connecting_wireless_item, SIG_LOADING_STOP, SRC_ELM); elm_object_item_signal_emit(priv->connecting_wireless_item, @@ -738,13 +1082,41 @@ static void _data_event_cb(enum event_type type, void *data) /* Update connection state for all items. * When profile is switched to ethernet, * 'Connected' check icon still remains.. */ - if (!listmgr_update_grid(priv->listmgr, LIST_WIRELESS)) - _ERR("Listmgr update list failed."); + /*if (!listmgr_update_grid(priv->listmgr, LIST_WIRELESS)) + _ERR("Listmgr update list failed.");*/ + viewmgr_update_view(VIEW_WIRELESS_LIST, GRID_UPDATE, NULL); + break; + + case EVENT_DATA_CONNECTED: + _DBG("Connected succesfully"); + evas_object_hide(connecting_wireless_popup); + evas_object_hide(failed_wireless_popup); + _popup_connected_wireless_status(priv); + +/* listmgr_foreach_list(priv->listmgr, LIST_WIRELESS, + _grid_remove_connecting_state, priv);*/ + viewmgr_update_view(VIEW_WIRELESS_LIST, GRID_FOREACH, + _grid_remove_connecting_state); + elm_object_item_signal_emit(priv->connecting_wireless_item, + SIG_LOADING_STOP, SRC_ELM); + elm_object_item_signal_emit(priv->connecting_wireless_item, + SIG_CONNECTION_FAIL, SRC_ELM); + + /* Update connection state for all items. + * When profile is switched to ethernet, + * 'Connected' check icon still remains.. */ + /*if (!listmgr_update_grid(priv->listmgr, LIST_WIRELESS)) + _ERR("Listmgr update list failed.");*/ + viewmgr_update_view(VIEW_WIRELESS_LIST, GRID_UPDATE, NULL); break; case EVENT_DATA_INVALID_PWD_WIRELESS: { char *wifi_name; struct wifi_manager_ap_info *ap_info; + evas_object_hide(connecting_wireless_popup); + evas_object_hide(connected_wireless_popup); + _popup_failed_wireless_status(priv); + ap_info = elm_object_item_data_get(priv->connecting_wireless_item); if (!ap_info) { _ERR("Get data failed."); @@ -754,8 +1126,10 @@ static void _data_event_cb(enum event_type type, void *data) _DBG("Invalid password"); /* Remove connection state from other items */ - listmgr_foreach_list(priv->listmgr, LIST_WIRELESS, - _grid_remove_connecting_state, priv); + /*listmgr_foreach_list(priv->listmgr, LIST_WIRELESS, + _grid_remove_connecting_state, priv);*/ + viewmgr_update_view(VIEW_WIRELESS_LIST, GRID_FOREACH, + _grid_remove_connecting_state); elm_object_item_signal_emit(priv->connecting_wireless_item, SIG_LOADING_STOP, SRC_ELM); elm_object_item_signal_emit(priv->connecting_wireless_item, @@ -764,9 +1138,10 @@ static void _data_event_cb(enum event_type type, void *data) /* Update connection state for all items. * When profile is switched to ethernet, * 'Connected' check icon still remains.. */ - if (!listmgr_update_grid(priv->listmgr, LIST_WIRELESS)) - _ERR("Listmgr update list failed."); +/* if (!listmgr_update_grid(priv->listmgr, LIST_WIRELESS)) + _ERR("Listmgr update list failed.");*/ + viewmgr_update_view(VIEW_WIRELESS_LIST, GRID_UPDATE, NULL); _draw_wifi_passcode_popup(priv, wifi_name, true); break; } @@ -810,8 +1185,10 @@ static void _connect_wifi_with_passcode(struct _priv *priv) SIG_LOADING_START, SRC_ELM); /* Remove connection state from other items */ - listmgr_foreach_list(priv->listmgr, LIST_WIRELESS, - _grid_remove_connecting_state, priv); +/* listmgr_foreach_list(priv->listmgr, LIST_WIRELESS, + _grid_remove_connecting_state, priv);*/ + viewmgr_update_view(VIEW_WIRELESS_LIST, GRID_FOREACH, + _grid_remove_connecting_state); _remove_wifi_passcode_popup(priv); } @@ -836,8 +1213,9 @@ static void _popup_clicked_cb(int id, void *data, Evas_Object *obj) _connect_wifi_with_passcode(priv); /* Update status for all items */ - if (!listmgr_update_grid(priv->listmgr, LIST_WIRELESS)) - _ERR("Listmgr update list failed."); +/* if (!listmgr_update_grid(priv->listmgr, LIST_WIRELESS)) + _ERR("Listmgr update list failed.");*/ + viewmgr_update_view(VIEW_WIRELESS_LIST, GRID_UPDATE, NULL); break; default: @@ -1145,8 +1523,10 @@ static void _wireless_selected_cb(Elm_Object_Item *it, void *data) SIG_LOADING_START, SRC_ELM); /* Remove connection state from other items */ - listmgr_foreach_list(priv->listmgr, LIST_WIRELESS, - _grid_remove_connecting_state, priv); + /*listmgr_foreach_list(priv->listmgr, LIST_WIRELESS, + _grid_remove_connecting_state, priv);*/ + viewmgr_update_view(VIEW_WIRELESS_LIST, GRID_FOREACH, + _grid_remove_connecting_state); } } @@ -1241,6 +1621,8 @@ static bool _create(layoutmgr *lmgr, void *data) priv->lmgr = lmgr; priv->base = base; priv->ly = ly; + + current_priv = priv; /* wired = utils_add_layout(ly, "grp.layout.wired.content", EINA_TRUE); if (!wired) { diff --git a/src/view/network/view_wired.c b/src/view/network/view_wired.c new file mode 100644 index 0000000..e69de29 diff --git a/src/view/network/view_wireless.c b/src/view/network/view_wireless.c index df708fc..f9b0d32 100644 --- a/src/view/network/view_wireless.c +++ b/src/view/network/view_wireless.c @@ -250,6 +250,7 @@ static void _clicked_cb(int id, void *data, Evas_Object *obj) switch (id) { case EO_NO: viewmgr_pop_view(); + viewmgr_pop_view(); break; case EO_YES: viewmgr_pop_view(); diff --git a/src/view/network/view_wireless_list.c b/src/view/network/view_wireless_list.c index da54d24..df1ae1c 100644 --- a/src/view/network/view_wireless_list.c +++ b/src/view/network/view_wireless_list.c @@ -28,6 +28,7 @@ #include "common/listmgr.h" #include "common/utils.h" #include "layout/network.h" +#include "layout.h" //#include "data/system/settings_language.h" #include "view/network/view_wireless.h" #define STR_WIRELESS "Wireless" @@ -136,6 +137,59 @@ static void _connect_wifi_with_passcode(struct _priv *priv) _remove_wifi_passcode_popup(priv); } +static void _destroy_status_popup() +{ + evas_object_hide(connected_wireless_popup); + evas_object_hide(connecting_wireless_popup); + evas_object_hide(failed_wireless_popup); + + evas_object_del(connected_wireless_popup); + connected_wireless_popup = NULL; + + evas_object_del(connecting_wireless_popup); + connecting_wireless_popup = NULL; + + evas_object_del(failed_wireless_popup); + failed_wireless_popup = NULL; + + return; +} + +static void _stop_dismissed_cb(void *data, Evas_Object *obj, void *ei) +{ + _destroy_status_popup(); + return; +} + +void _popup_connecting_wireless_status(struct _priv *priv) +{ + Evas_Object *ly, *stop_btn; + connecting_wireless_popup = utils_add_popup(priv->base, STYLE_POPUP, "Wireless", NULL); + if (!connecting_wireless_popup) { + _ERR("Add popup failed"); + return; + } + ly = utils_add_layout(connecting_wireless_popup, GRP_CONNECTING_IMAGE_NETWORK_POPUP, EINA_FALSE); + if (!ly) { + _ERR("Add layout failed."); + evas_object_del(connecting_wireless_popup); + return; + } + elm_object_part_text_set(ly, "part.text.content", STR_WIRELESS_PROGRESS); + + + stop_btn = utils_add_button(ly, "part.stop.btn", STYLE_DISABLE_BTN, "STOP"); + if (!stop_btn) { + _ERR("Add button failed."); + evas_object_del(connecting_wireless_popup); + return; + } + evas_object_smart_callback_add(stop_btn, "clicked", _stop_dismissed_cb, connecting_wireless_popup); + + elm_object_content_set(connecting_wireless_popup, ly); + evas_object_show(connecting_wireless_popup); +} + static void _popup_clicked_cb(int id, void *data, Evas_Object *obj) { struct _priv *priv; @@ -153,6 +207,9 @@ static void _popup_clicked_cb(int id, void *data, Evas_Object *obj) break; case EO_BTN_OK: + evas_object_hide(connected_wireless_popup); + evas_object_hide(failed_wireless_popup); + _popup_connecting_wireless_status(priv); _connect_wifi_with_passcode(priv); /* Update status for all items */ @@ -241,8 +298,8 @@ static void _grid_set_unfocus(Elm_Object_Item *it, void *data) return; } -// if (it != priv->focused_wireless_item) -// elm_object_item_signal_emit(it, SIG_LIST_ITEM_UNFOCUS, SRC_ELM); + if (it != priv->focused_wireless_item) + elm_object_item_signal_emit(it, SIG_LIST_ITEM_UNFOCUS, SRC_ELM); } static void _grid_realized_cb(int id, void *data, Evas_Object *obj, @@ -584,6 +641,7 @@ static void _wireless_selected_cb(Elm_Object_Item *it, void *data) evas_object_hide(priv->base); } } else { + _popup_connecting_wireless_status(priv); if (!datamgr_select(priv->wirelessmgr, it, NULL)) { _ERR("Unavailable status for selecting wifi."); return; @@ -735,6 +793,38 @@ static void _hide(void *data) evas_object_hide(priv->base); } +static void _update(void *layout_data, int update_type, void *data) +{ + struct _priv *priv = (struct _priv *)layout_data; + + if (!priv) { + _ERR("Invalid parameter."); + return; + } + switch (update_type) { + case GRID_UPDATE: + listmgr_update_grid(priv->listmgr, LIST_WIRELESS); + break; + case GRID_FILL: + listmgr_fill_grid(priv->listmgr, LIST_WIRELESS, data, NULL, NULL); + break; + case GRID_HIDE: + listmgr_hide_grid(priv->listmgr, LIST_WIRELESS, + PART_WIRELESS_LIST); + break; + case GRID_FOREACH: + listmgr_foreach_list(priv->listmgr, LIST_WIRELESS, + data , priv); + break; + case GRID_SHOW: + listmgr_show_grid(priv->listmgr, LIST_WIRELESS, PART_WIRELESS_LIST, NULL); + break; + default: + break; + } + +} + static void _destroy(void *data) { struct _priv *priv = (struct _priv *)data; @@ -754,6 +844,7 @@ static view_class _vclass = { .create = _create, .show = _show, .hide = _hide, + .update = _update, .destroy = _destroy }; diff --git a/src/view/network/view_wireless_scanning.c b/src/view/network/view_wireless_scanning.c new file mode 100644 index 0000000..6f4acdd --- /dev/null +++ b/src/view/network/view_wireless_scanning.c @@ -0,0 +1,355 @@ +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include + +#include "grid/grid_wireless.h" +#include "app_debug.h" +#include "define.h" +#include "common/viewmgr.h" +#include "data/system/data_wireless.h" +#include "data/system/settings_wireless.h" +#include "common/datamgr.h" +#include "common/inputmgr.h" +#include "common/listmgr.h" +#include "common/utils.h" +#include "layout/network.h" +#include "layout.h" +//#include "data/system/settings_language.h" +#include "view/network/view_wireless.h" +#define STR_WIRELESS "Wireless" +#define SIG_LIST_ITEM_UNFOCUS "elm,state,unfocused" +#define SIG_LIST_ITEM_REMOVE "remove_wifi_sig_icon" + +#define MAX_WIRELESS_LEN 64 +#define MIN_WIRELESS_LEN 8 +struct _priv { + Evas_Object *base; + struct listmgr *listmgr; + Evas_Object *passcode_popup; + Evas_Object *passcode_entry; + Evas_Object *popup_btn1; + Evas_Object *popup_btn2; + Elm_Object_Item *selected_wireless_item; + Elm_Object_Item *focused_wireless_item; + Elm_Object_Item *connecting_wireless_item; + + //Evas_Object *btn1; + //Evas_Object *btn2; +}; + +enum object_type { + EO_BTN_OK = 0, + EO_BTN_CANCEL, + EO_ENTRY_PASSCODE, +}; + +static void widget_min_set(Evas_Object *table, Evas_Object *obj, Evas_Coord w, Evas_Coord h) +{ + Evas_Object *rect; + + + rect = evas_object_rectangle_add(evas_object_evas_get(table)); + evas_object_size_hint_min_set(rect, w, h); + 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, 0, 1, 1); + + evas_object_size_hint_weight_set(obj , EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(obj, EVAS_HINT_FILL, EVAS_HINT_FILL); + elm_table_pack(table, obj, 0, 0, 1, 1); + +// return table; +} + + + +enum input_type { + EO_NO = 0, + EO_YES +}; + + + +static void _wireless_data_found_done(struct _priv *priv, Eina_List *list) +{ + if (!listmgr_fill_grid(priv->listmgr, LIST_WIRELESS, list, NULL, NULL) + || !listmgr_show_grid(priv->listmgr, LIST_WIRELESS, PART_WIRELESS_LIST, NULL)) { + _ERR("Listmgr show list failed."); + return; + } + +// elm_object_signal_emit(priv->ly, SIG_WIRELESS_EXISTS, SRC_ELM); +// elm_object_signal_emit(priv->ly, SIG_LOADING_STOP, SRC_ELM); +// elm_object_part_text_set(priv->ly, PART_NO_NETWORK_TEXT, ""); +} + + +static void _grid_set_unfocus(Elm_Object_Item *it, void *data) +{ + struct _priv *priv = data; + if (NULL == priv) { + _ERR("User data not found"); + return; + } + +// if (it != priv->focused_wireless_item) +// elm_object_item_signal_emit(it, SIG_LIST_ITEM_UNFOCUS, SRC_ELM); +} + +static void _grid_realized_cb(int id, void *data, Evas_Object *obj, + Elm_Object_Item *item) +{ + + if (!item) { + _ERR("Invalid argument."); + return; + } + + + /* If realized but has no focus, send updated status */ + elm_object_item_focus_get(item); + elm_object_item_signal_emit(item, SIG_LIST_ITEM_REMOVE, SRC_ELM); + +} + + + + +static void _grid_focused_cb(int id, void *data, Evas_Object *obj, Elm_Object_Item *item) +{ + struct _priv *priv = data; + if (NULL == priv) { + _ERR("User data not found"); + return; + } + + /* If popup is shown, revert focus to popup */ +/* + if (priv->passcode_popup) + elm_object_focus_set(priv->popup_btn1, EINA_TRUE); + + priv->focused_wireless_item = item; +*/ + /* Unfocus other items */ + listmgr_foreach_list(priv->listmgr, LIST_WIRELESS, _grid_set_unfocus, priv); +} + +static input_handler _grid_input_handler = { + .realized = _grid_realized_cb, + .focused = _grid_focused_cb, + .selected = NULL +}; + + +static Evas_Object *_create(Evas_Object *win, void *data) +{ + struct _priv *priv = NULL; + Evas_Object *ly = NULL; + Evas_Object *table = NULL; + Eina_List *list = NULL; + Evas_Object *grid; + if (!win) { + _ERR("Get window object failed."); + return NULL; + } + + priv = calloc(1, sizeof(struct _priv)); + if (!priv) { + _ERR("Calloc failed."); + return NULL; + } + struct wifi_manager_ap_info *ap_info; + ap_info = malloc(sizeof(struct wifi_manager_ap_info)); + memset(ap_info, '\0', sizeof(struct wifi_manager_ap_info)); + ap_info->essid = strdup("Searching Network"); + + list = eina_list_append(list, ap_info); + + //_wireless_data_found_done(priv, list); + + priv->base = utils_add_popup(win, STYLE_POPUP, STR_WIRELESS, NULL); + if (!priv->base) { + _ERR("Add popup failed"); + free(priv); + return NULL; + } + + ly = utils_add_layout(priv->base, GRP_CONTENT_NETWORK_POPUP_LIST, EINA_FALSE); + if (!ly) { + _ERR("Add layout failed."); + evas_object_del(priv->base); + free(priv); + return NULL; + } + table = elm_table_add(priv->base); + +// elm_table_homogeneous_set(table, EINA_TRUE); +// elm_table_padding_set(table, 0, 0); + evas_object_size_hint_weight_set(table, 0, + EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(table, EVAS_HINT_FILL, + EVAS_HINT_FILL); + + + elm_object_part_content_set(ly, PART_WIRELESS_LIST, table); + + if (!table) { + _ERR("Add layout failed."); + evas_object_del(priv->base); + free(priv); + return NULL; + } + priv->listmgr = listmgr_create(table); + if (!(priv->listmgr)) { + _ERR("Create gridmgr failed."); + return NULL; + } + if (!listmgr_add_list(priv->listmgr, LIST_WIRELESS, + get_wireless_grid_class(), NULL, priv)) { + _ERR("Add wireless list failed."); + listmgr_destroy(priv->listmgr); + return NULL; + } + grid = listmgr_get_list(priv->listmgr, LIST_WIRELESS); + widget_min_set(table, grid, 40.0, 45.0); + evas_object_show(table); + + listmgr_add_inner_grid_cb(priv->listmgr, LIST_WIRELESS, + &_grid_input_handler, priv); + + + if (!listmgr_update_grid(priv->listmgr, LIST_WIRELESS)) + _ERR("Listmgr update list failed."); +// list = datamgr_get_data(priv->wirelessmgr); + if (!list) { + //_draw_no_contents_message(priv); + return NULL; + } + if (!listmgr_update_grid(priv->listmgr, LIST_WIRELESS)) + _ERR("Listmgr update list failed."); + + _wireless_data_found_done(priv, list); + +// Elm_Object_Item *gg = elm_gengrid_last_item_get(grid); +// if (!gg) return NULL; +// elm_gengrid_item_bring_in(gg, ELM_GENGRID_ITEM_SCROLLTO_IN); + + elm_object_focus_allow_set(priv->base, EINA_TRUE); + //elm_object_focus_set(btn2, EINA_TRUE); + + elm_object_content_set(priv->base, table); + + + if (!viewmgr_set_view_data(VIEW_WIRELESS_SCANNING, priv)) { + _ERR("Set view data failed."); + evas_object_del(priv->base); + free(priv); + return NULL; + } + + return priv->base; +} + +static void _show(void *data) +{ + struct _priv *priv = (struct _priv *)data; + if (!priv) { + _ERR("Invalid parameter."); + return; + } + + evas_object_show(priv->base); + + +} + +static void _hide(void *data) +{ + struct _priv *priv = (struct _priv *)data; + + if (!priv) { + _ERR("Invalid parameter."); + return; + } + + evas_object_hide(priv->base); +} + +static void _destroy(void *data) +{ + struct _priv *priv = (struct _priv *)data; + + if (!priv) { + _ERR("Invalid parameter."); + return; + } + + evas_object_del(priv->base); + + free(priv); +} + +static view_class _vclass = { + .view_id = VIEW_WIRELESS_SCANNING, + .create = _create, + .show = _show, + .hide = _hide, + .destroy = _destroy +}; + +view_class *view_wireless_scanning_get_vclass(void) +{ + return &_vclass; +} +/* +static void _key_down_cb(int id, void *data, Evas *e, Evas_Object *obj, + Evas_Event_Key_Down *ev) +{ + struct _priv *priv = (struct _priv *)data; + + if (!ev || !priv) { + _ERR("Invalid argument."); + return; + } + + if (!strcmp(ev->keyname, KEY_BACK) || !strcmp(ev->keyname, KEY_BACK_WAY)) + viewmgr_pop_view(); +}*/ +/* +static void _clicked_cb(int id, void *data, Evas_Object *obj) +{ + struct _priv *priv = data; + + if (!priv || !obj) { + _ERR("Invalid argument."); + return; + } + + switch (id) { + case EO_NO: + viewmgr_pop_view(); + break; + case EO_YES: + viewmgr_pop_view(); + datamgr_update(priv->wirelessmgr); + break; + default: + _ERR("Unhandled object type."); + } +}*/ diff --git a/src/view/system/view_language.c b/src/view/system/view_language.c index 66d5f90..a979082 100644 --- a/src/view/system/view_language.c +++ b/src/view/system/view_language.c @@ -117,7 +117,6 @@ static Evas_Object *_create(Evas_Object *win, void *data) if (!viewmgr_set_view_data(VIEW_LANGUAGE, priv)) { _ERR("Set view data failed."); - evas_object_del(priv->base); free(priv); return NULL; diff --git a/src/view/view_new_network.c b/src/view/view_new_network.c index 65422d1..47be465 100644 --- a/src/view/view_new_network.c +++ b/src/view/view_new_network.c @@ -69,11 +69,28 @@ struct _content_manual { Evas_Object *dns_ip1, *dns_ip2, *dns_ip3, *dns_ip4; }; +enum config_type { + TYPE_AUTOMATICALLY = 0, + TYPE_MANUALLY, +}; + +static int id_config_type_opt[] = { + TYPE_AUTOMATICALLY, + TYPE_MANUALLY, +}; + + +const char *str_config_type_opt[] = { + STR_AUTOMATICALLY, + STR_MAUALLY, +}; + struct _priv { Evas_Object *win; Evas_Object *base; Evas_Object *menu[LAYOUT_MAX]; - int cur_menu; + int ip_menu; + int dns_menu; layoutmgr *lmgr; /* Buttons */ @@ -91,6 +108,14 @@ struct _priv { /* Result structure to return previous view */ struct _connection_data *conn; + + Evas_Object *ip_type_btn; + Evas_Object *dns_type_btn; + Evas_Object *action_btn; + Evas_Object *ip_type_popup; + Evas_Object *dns_type_popup; + Evas_Object *ly; + enum config_type config_cur_type; }; static bool _update_entry_input_state(struct _priv *priv); @@ -132,16 +157,17 @@ static void _update_profile_from_input_data(struct _priv *priv) char address_gateway[IPV4_ADDRESS_MAX_LEN] = {0, }; char address_dns[IPV4_ADDRESS_MAX_LEN] = {0, }; int val[4] = {0, }; - - if (priv->cur_menu == EO_BTN_AUTOMATIC) { - if (elm_radio_state_value_get(priv->content_automatic->radio1) == 1) { + + if (priv->ip_menu == 0) { + if (priv->dns_menu == 0) { + _ERR("2"); memset(priv->conn->wired_dns, 0, NETWORK_ADDRESS_MAX); } else { /* Get DNS Address manually */ - if (!_validate_address(priv->content_automatic->dns_ip1, &val[0]) || - !_validate_address(priv->content_automatic->dns_ip2, &val[1]) || - !_validate_address(priv->content_automatic->dns_ip3, &val[2]) || - !_validate_address(priv->content_automatic->dns_ip4, &val[3])) { + if (!_validate_address(priv->content_manual->dns_ip1, &val[0]) || + !_validate_address(priv->content_manual->dns_ip2, &val[1]) || + !_validate_address(priv->content_manual->dns_ip3, &val[2]) || + !_validate_address(priv->content_manual->dns_ip4, &val[3])) { _DBG("Invalid DNS address"); return; } @@ -217,9 +243,9 @@ static void _set_result(struct _priv *priv, int id) } /* Store updated profile info */ - if (priv->cur_menu == EO_BTN_AUTOMATIC) + if (priv->ip_menu == 0) priv->conn->network_type = WIRED_TYPE_AUTOMATIC; - else if (priv->cur_menu == EO_BTN_MANUAL) + else priv->conn->network_type = WIRED_TYPE_MANUAL; /* Handle return type */ @@ -244,50 +270,10 @@ static void _set_result(struct _priv *priv, int id) static void _button_clicked(struct _priv *priv, int id, Evas_Object *obj) { - Evas_Object *preserve; if (!priv) return; switch (id) { - case EO_BTN_AUTOMATIC: - /* Store menu type */ - priv->cur_menu = id; - - preserve = elm_object_part_content_unset(priv->base, "part.content.area"); - if (preserve) - evas_object_hide(preserve); - - elm_object_part_content_set(priv->base, "part.content.area", - priv->content_automatic->layout); - evas_object_show(priv->content_automatic->layout); - - /* Prevent losing focus issue */ - elm_object_focus_next_object_set(priv->btn_automatic, priv->content_automatic->radio1, ELM_FOCUS_DOWN); - elm_object_focus_next_object_set(priv->content_automatic->radio1, priv->btn_automatic, ELM_FOCUS_UP); - elm_object_focus_next_object_set(priv->btn_manual, priv->content_automatic->radio1, ELM_FOCUS_DOWN); - - /* Update done button state */ - _update_entry_input_state(priv); - break; - case EO_BTN_MANUAL: - /* Store menu type */ - priv->cur_menu = id; - - preserve = elm_object_part_content_unset(priv->base, "part.content.area"); - if (preserve) - evas_object_hide(preserve); - - elm_object_part_content_set(priv->base, "part.content.area", - priv->content_manual->layout); - evas_object_show(priv->content_manual->layout); - - /* Prevent losing focus issue */ - elm_object_focus_next_object_set(priv->btn_automatic, priv->content_manual->ip1, ELM_FOCUS_DOWN); - elm_object_focus_next_object_set(priv->btn_manual, priv->content_manual->ip1, ELM_FOCUS_DOWN); - - /* Update done button state */ - _update_entry_input_state(priv); - break; case EO_BTN_DONE: if (EINA_FALSE == elm_object_disabled_get(priv->btn_done)) { _set_result(priv, id); @@ -296,7 +282,7 @@ static void _button_clicked(struct _priv *priv, int id, Evas_Object *obj) break; case EO_BTN_CANCEL: default: - _set_result(priv, id); + //_set_result(priv, id);Priya : temporery Comment viewmgr_remove_view(VIEW_NEW_NETWORK); break; } @@ -397,21 +383,11 @@ static void _focused_cb(void *data, Evas_Object *obj, void *ei) if (!priv) return; - if (priv->content_manual == NULL || priv->content_automatic == NULL) + if (priv->content_manual == NULL) return; priv->focused_entry = obj; - if (obj == priv->content_automatic->dns_ip1 - || obj == priv->content_automatic->dns_ip2 - || obj == priv->content_automatic->dns_ip3 - || obj == priv->content_automatic->dns_ip4) { - elm_object_signal_emit(priv->content_automatic->layout_dns_addr, - SIG_IP_ADDRESS_SELECTED, SRC_ELM); - - /* To prevent hiding virtual keyboard - * when user input ip address in sequence */ - priv->input_panel_show = true; - } else if (obj == priv->content_manual->ip1 + if (obj == priv->content_manual->ip1 || obj == priv->content_manual->ip2 || obj == priv->content_manual->ip3 || obj == priv->content_manual->ip4) { @@ -462,16 +438,10 @@ static void _unfocused_cb(void *data, Evas_Object *obj, void *ei) if (!priv) return; - if (priv->content_manual == NULL || priv->content_automatic == NULL) + if (priv->content_manual == NULL) return; - if (obj == priv->content_automatic->dns_ip1 - || obj == priv->content_automatic->dns_ip2 - || obj == priv->content_automatic->dns_ip3 - || obj == priv->content_automatic->dns_ip4) { - elm_object_signal_emit(priv->content_automatic->layout_dns_addr, - SIG_IP_ADDRESS_UNFOCUSED, SRC_ELM); - } else if (obj == priv->content_manual->ip1 + if (obj == priv->content_manual->ip1 || obj == priv->content_manual->ip2 || obj == priv->content_manual->ip3 || obj == priv->content_manual->ip4) { @@ -505,7 +475,7 @@ static void _key_down_cb(void *data, Evas *e, Evas_Object *obj, void *ei) if (!strcmp(ev->key, KEY_ENTER)) { /* set focus to next item */ - if (priv->cur_menu == EO_BTN_AUTOMATIC) { + /*if (priv->ip_menu == 0) { if (obj == priv->content_automatic->dns_ip1) elm_object_focus_set(priv->content_automatic->dns_ip2, EINA_TRUE); if (obj == priv->content_automatic->dns_ip2) @@ -514,7 +484,7 @@ static void _key_down_cb(void *data, Evas *e, Evas_Object *obj, void *ei) elm_object_focus_set(priv->content_automatic->dns_ip4, EINA_TRUE); if (obj == priv->content_automatic->dns_ip4) elm_object_focus_set(priv->btn_done, EINA_TRUE); - } else if (priv->cur_menu == EO_BTN_MANUAL) { + } else if (priv->ip_menu == 1) */{ if (obj == priv->content_manual->ip1) elm_object_focus_set(priv->content_manual->ip2, EINA_TRUE); if (obj == priv->content_manual->ip2) @@ -560,16 +530,15 @@ static void _key_down_cb(void *data, Evas *e, Evas_Object *obj, void *ei) static bool _update_entry_input_state(struct _priv *priv) { if (priv == NULL || - priv->content_manual == NULL || - priv->content_automatic == NULL) + priv->content_manual == NULL) return false; - if (priv->cur_menu == EO_BTN_AUTOMATIC) { - if (elm_radio_value_get(priv->content_automatic->radio1) == 2) { - if (!_check_entry_filled(priv->content_automatic->dns_ip1) || - !_check_entry_filled(priv->content_automatic->dns_ip2) || - !_check_entry_filled(priv->content_automatic->dns_ip3) || - !_check_entry_filled(priv->content_automatic->dns_ip4)) { + if (priv->ip_menu == 0) { + if (priv->dns_menu == 0) { + if (!_check_entry_filled(priv->content_manual->dns_ip1) || + !_check_entry_filled(priv->content_manual->dns_ip2) || + !_check_entry_filled(priv->content_manual->dns_ip3) || + !_check_entry_filled(priv->content_manual->dns_ip4)) { elm_object_disabled_set(priv->btn_done, EINA_TRUE); return false; @@ -659,7 +628,7 @@ static void _imf_panel_event_cb(void *data, Ecore_IMF_Context *ctx, int value) } } -static void _radio_changed_cb(void *data, Evas_Object *obj, void *event_info) +/*static void _radio_changed_cb(void *data, Evas_Object *obj, void *event_info) { struct _priv *priv = data; int val = elm_radio_value_get(obj); @@ -672,7 +641,7 @@ static void _radio_changed_cb(void *data, Evas_Object *obj, void *event_info) _update_entry_input_state(priv); break; } -} +}*/ static void _markup_cb(void *data, Evas_Object *entry, char **text) { @@ -797,7 +766,7 @@ static Evas_Object *_create_ip_address_entry(Evas_Object *parent, return obj; } -static void _remove_content_automatic(struct _content_automatic *content, +/*static void _remove_content_automatic(struct _content_automatic *content, struct _priv *priv) { if (!content) @@ -828,7 +797,7 @@ static void _remove_content_automatic(struct _content_automatic *content, if (priv) priv->content_automatic = NULL; -} +}*/ static void _remove_content_manual(struct _content_manual *content, struct _priv *priv) @@ -894,7 +863,7 @@ static void _remove_content_manual(struct _content_manual *content, priv->content_manual = NULL; } -static void _create_content_automatic(struct _priv *priv) +/*static void _create_content_automatic(struct _priv *priv) { struct _content_automatic *content; @@ -933,8 +902,8 @@ static void _create_content_automatic(struct _priv *priv) return; } - /* Radio items */ - content->radio1 = utils_add_radio(content->layout_content, + Radio items */ + /*content->radio1 = utils_add_radio(content->layout_content, "part.swallow.radio_1", "style.network", "Obtain automatically"); if (!content->radio1) { _ERR("Add radio button failed."); @@ -971,13 +940,298 @@ static void _create_content_automatic(struct _priv *priv) elm_object_focus_next_object_set(content->radio2, content->radio2, ELM_FOCUS_LEFT); elm_object_focus_next_object_set(content->radio2, content->radio2, ELM_FOCUS_RIGHT); - /* Set automatic contents */ - elm_object_part_content_set(content->layout_content, + Set automatic contents */ + /*elm_object_part_content_set(content->layout_content, "part.swallow.dns_address", content->layout_dns_addr); elm_object_part_content_set(content->layout, "part.content.automatic", content->layout_content); priv->content_automatic = content; +}*/ + +static void _destroy_ip_type_popup(struct _priv *priv) +{ + evas_object_hide(priv->ip_type_popup); + evas_object_del(priv->ip_type_popup); + priv->ip_type_popup = NULL; +} + +static void _ip_type_option_selected(struct _priv *priv, int id, + Evas_Object *obj) +{ + //Evas_Object *preserve; + _destroy_ip_type_popup(priv); + + elm_object_text_set(priv->ip_type_btn, str_config_type_opt[id]); + + switch (id) { + case TYPE_AUTOMATICALLY: + SETTING_TRACE("Automatic IP"); + _update_entry_input_state(priv); + priv->ip_menu = 0; + elm_object_disabled_set(priv->content_manual->address_ip, EINA_TRUE); + elm_object_disabled_set(priv->content_manual->address_subnet, EINA_TRUE); + elm_object_disabled_set(priv->content_manual->address_gateway, EINA_TRUE); + break; + + case TYPE_MANUALLY: + SETTING_TRACE("Manual IP"); + _update_entry_input_state(priv); + priv->ip_menu = 1; + elm_object_disabled_set(priv->content_manual->address_ip, EINA_FALSE); + elm_object_disabled_set(priv->content_manual->address_subnet, EINA_FALSE); + elm_object_disabled_set(priv->content_manual->address_gateway, EINA_FALSE); + + elm_object_text_set(priv->dns_type_btn, str_config_type_opt[1]); + elm_object_disabled_set(priv->content_manual->address_dns, EINA_FALSE); + //elm_object_disabled_set(priv->dns_type_popup, EINA_TRUE); + //elm_object_disabled_set(priv->dns_type_btn, EINA_TRUE); + //inputmgr_add_callback(priv->dns_type_btn, 0, NULL, priv); + break; + default: + _ERR("Unhandled network type."); + return; + } + priv->config_cur_type = id; + + elm_win_activate(priv->base); + elm_object_focus_set(priv->base, EINA_TRUE); +} + +static void _ip_type_option_key_down_cb(int id, void *data, Evas *e, + Evas_Object *obj, Evas_Event_Key_Down *ev) +{ + struct _priv *priv; + + if (!data || !obj || !ev) { + _ERR("Invalid argument."); + return; + } + priv = data; + + if (!strcmp(ev->keyname, KEY_BACK) || !strcmp(ev->keyname, KEY_BACK_WAY) + || !strcmp(ev->keyname, KEY_ESC) || !strcmp(ev->keyname, KEY_ESC_WAY) + ) + _destroy_ip_type_popup(priv); + else if (!strcmp(ev->keyname, KEY_ENTER)) + _ip_type_option_selected(priv, id, obj); +} + +static void _ip_type_option_mouse_down_cb(int id, void *data, Evas *e, + Evas_Object *obj, Evas_Event_Mouse_Down *ev) +{ + struct _priv *priv; + + if (!data || !obj || !ev) { + _ERR("Invalid argument."); + return; + } + priv = data; + + _ip_type_option_selected(priv, id, obj); +} + +static input_handler _ip_type_option_input_handler = { + .mouse_move = _mouse_move_cb, + .key_down = _ip_type_option_key_down_cb, + .mouse_down = _ip_type_option_mouse_down_cb +}; + +static void _draw_ip_type_popup(struct _priv *priv) +{ + Evas_Object *configpopup; + Evas_Coord x, y, w, h; + + elm_object_signal_emit(priv->ip_type_btn, SIG_SELECTED, SRC_ELM); + + configpopup = utils_add_ctxpopup(priv->base, 2, + id_config_type_opt, str_config_type_opt, + &_ip_type_option_input_handler, priv, priv->config_cur_type); + if (!configpopup) { + _ERR("Add ctxpopup failed."); + return; + } + + evas_object_geometry_get(priv->ip_type_btn, &x, &y, &w, &h); + evas_object_move(configpopup, (x + w / 2), (y + h)); + evas_object_size_hint_min_set(configpopup, w, 0); + + priv->ip_type_popup = configpopup; +} + +void _destroy_dns_type_popup(struct _priv *priv) +{ + evas_object_hide(priv->ip_type_popup); + evas_object_del(priv->ip_type_popup); + priv->ip_type_popup = NULL; +} + +static void _dns_type_option_selected(struct _priv *priv, int id, + Evas_Object *obj) +{ + //Evas_Object *preserve; + _destroy_dns_type_popup(priv); + + elm_object_text_set(priv->dns_type_btn, str_config_type_opt[id]); + + switch (id) { + case TYPE_AUTOMATICALLY: + SETTING_TRACE("Automatic DNS"); + priv->dns_menu = 0; + elm_object_disabled_set(priv->content_manual->address_dns, EINA_TRUE); + _update_entry_input_state(priv); + break; + + case TYPE_MANUALLY: + SETTING_TRACE("Manual DNS"); + priv->dns_menu = 1; + elm_object_disabled_set(priv->content_manual->address_dns, EINA_FALSE); + _update_entry_input_state(priv); + break; + default: + _ERR("Unhandled dns type."); + return; + } + priv->config_cur_type = id; + + elm_win_activate(priv->base); + elm_object_focus_set(priv->base, EINA_TRUE); +} + +static void _dns_type_option_key_down_cb(int id, void *data, Evas *e, + Evas_Object *obj, Evas_Event_Key_Down *ev) +{ + struct _priv *priv; + + if (!data || !obj || !ev) { + _ERR("Invalid argument."); + return; + } + priv = data; + + if (!strcmp(ev->keyname, KEY_BACK) || !strcmp(ev->keyname, KEY_BACK_WAY) + || !strcmp(ev->keyname, KEY_ESC) || !strcmp(ev->keyname, KEY_ESC_WAY) + ) + _destroy_dns_type_popup(priv); + else if (!strcmp(ev->keyname, KEY_ENTER)) + _dns_type_option_selected(priv, id, obj); +} + +static void _dns_type_option_mouse_down_cb(int id, void *data, Evas *e, + Evas_Object *obj, Evas_Event_Mouse_Down *ev) +{ + struct _priv *priv; + + if (!data || !obj || !ev) { + _ERR("Invalid argument."); + return; + } + priv = data; + + _dns_type_option_selected(priv, id, obj); +} + +static input_handler _dns_type_option_input_handler = { + .mouse_move = _mouse_move_cb, + .key_down = _dns_type_option_key_down_cb, + .mouse_down = _dns_type_option_mouse_down_cb +}; + + +static void _draw_dns_type_popup(struct _priv *priv) +{ + Evas_Object *configpopup; + Evas_Coord x, y, w, h; + + elm_object_signal_emit(priv->dns_type_btn, SIG_SELECTED, SRC_ELM); + + configpopup = utils_add_ctxpopup(priv->base, 2, + id_config_type_opt, str_config_type_opt, + &_dns_type_option_input_handler, priv, priv->config_cur_type); + if (!configpopup) { + _ERR("Add ctxpopup failed."); + return; + } + + evas_object_geometry_get(priv->dns_type_btn, &x, &y, &w, &h); + evas_object_move(configpopup, (x + w / 2), (y + h)); + evas_object_size_hint_min_set(configpopup, w, 0); + + priv->dns_type_popup = configpopup; + + elm_object_signal_emit(priv->content_manual->address_dns, SIG_IP_ADDRESS_UNFOCUSED, SRC_ELM); + +} + +static void _ip_type_clicked_cb(int id, void *data, Evas_Object *obj) +{ + struct _priv *priv; + + if (!data) { + _ERR("Invalid argument."); + return; + } + priv = data; + + _draw_ip_type_popup(priv); +} + +static void _dns_type_clicked_cb(int id, void *data, Evas_Object *obj) +{ + struct _priv *priv; + + if (!data) { + _ERR("Invalid argument."); + return; + } + priv = data; + + _draw_dns_type_popup(priv); +} + +static input_handler _ipconfig_type_option_input_handler = { + .mouse_move = _mouse_move_cb, + .clicked = _ip_type_clicked_cb, + .key_down = _ip_type_option_key_down_cb,//To write new func Priya + .mouse_down = _ip_type_option_mouse_down_cb//To write new func Priya +}; + +static input_handler _dnsconfig_type_option_input_handler = { + .mouse_move = _mouse_move_cb, + .clicked = _dns_type_clicked_cb, + .key_down = _dns_type_option_key_down_cb,//To write new func Priya + .mouse_down = _dns_type_option_mouse_down_cb//To write new func Priya +}; + +static bool _draw_config_buttons(struct _priv *priv) +{ + Evas_Object *ip_btn, *dns_btn; + + ip_btn = utils_add_button(priv->content_manual->layout_content_ip, "part.ip.type", + STYLE_OPTION_BTN, str_config_type_opt[priv->config_cur_type]); + if (!ip_btn) { + _ERR("Add button failed."); + return false; + } + evas_object_show(ip_btn); + elm_object_focus_next_object_set(ip_btn, ip_btn, ELM_FOCUS_DOWN); + inputmgr_add_callback(ip_btn, 0, &_ipconfig_type_option_input_handler, priv); + priv->ip_type_btn = ip_btn; + + + dns_btn = utils_add_button(priv->content_manual->layout_content_dns, "part.dns.type", + STYLE_OPTION_BTN, str_config_type_opt[priv->config_cur_type]); + if (!dns_btn) { + _ERR("Add button failed."); + return false; + } + evas_object_show(dns_btn); + elm_object_focus_next_object_set(dns_btn, dns_btn, ELM_FOCUS_DOWN); + inputmgr_add_callback(dns_btn, 0, &_dnsconfig_type_option_input_handler, priv); + priv->dns_type_btn = dns_btn; + + + return true; } static void _create_content_manual(struct _priv *priv) @@ -996,7 +1250,7 @@ static void _create_content_manual(struct _priv *priv) } content->layout = utils_add_layout(priv->base, - "grp.layout.new_network.manual", EINA_TRUE); + "grp.layout.new_network", EINA_TRUE); if (!content->layout) { _ERR("Add layout failed."); _remove_content_manual(content, priv); @@ -1004,7 +1258,7 @@ static void _create_content_manual(struct _priv *priv) } content->layout_content_ip = utils_add_layout(content->layout, - "grp.content.manual.ip_setting", EINA_TRUE); + "grp.content.ip_setting", EINA_TRUE); if (!content->layout_content_ip) { _ERR("Add layout failed."); _remove_content_manual(content, priv); @@ -1012,7 +1266,7 @@ static void _create_content_manual(struct _priv *priv) } content->layout_content_dns = utils_add_layout(content->layout, - "grp.content.manual.dns_setting", EINA_TRUE); + "grp.content.dns_setting", EINA_TRUE); if (!content->layout_content_dns) { _ERR("Add layout failed."); _remove_content_manual(content, priv); @@ -1127,6 +1381,14 @@ static void _create_content_manual(struct _priv *priv) "part.content.right", content->layout_content_dns); priv->content_manual = content; + + elm_object_disabled_set(priv->content_manual->address_ip, EINA_TRUE); + elm_object_disabled_set(priv->content_manual->address_subnet, EINA_TRUE); + elm_object_disabled_set(priv->content_manual->address_gateway, EINA_TRUE); + + elm_object_disabled_set(priv->content_manual->address_dns, EINA_TRUE); + + _draw_config_buttons(priv); } static Evas_Object *_create(Evas_Object *win, void *data) @@ -1134,7 +1396,7 @@ static Evas_Object *_create(Evas_Object *win, void *data) SETTING_TRACE_BEGIN; struct _priv *priv; Evas_Object *base; - Evas_Object *btn_automatic, *btn_manual, *btn_cancel, *btn_done; + Evas_Object *btn_cancel, *btn_done; layoutmgr *lmgr; if (!win) { @@ -1160,23 +1422,25 @@ static Evas_Object *_create(Evas_Object *win, void *data) return NULL; } - btn_automatic = utils_add_button(base, "part.new_network.btn.automatic", + //_draw_config_buttons(priv); + + /*btn_automatic = utils_add_button(base, "part.new_network.btn.automatic", STYLE_DISABLE_BTN, "Automatically"); if (!btn_automatic) { _ERR("Add automatic button failed."); evas_object_del(base); free(priv); return NULL; - } + }*/ - btn_manual = utils_add_button(base, "part.new_network.btn.manual", + /*btn_manual = utils_add_button(base, "part.new_network.btn.manual", STYLE_DISABLE_BTN, "Enter manually"); if (!btn_manual) { _ERR("Add manual button failed."); evas_object_del(base); free(priv); return NULL; - } + }*/ btn_cancel = utils_add_button(base, "part.new_network.btn.cancel", STYLE_DISABLE_BTN, "Cancel"); @@ -1196,29 +1460,29 @@ static Evas_Object *_create(Evas_Object *win, void *data) return NULL; } - priv->btn_automatic = btn_automatic; - priv->btn_manual = btn_manual; + //priv->btn_automatic = btn_automatic; + //priv->btn_manual = btn_manual; priv->btn_cancel = btn_cancel; priv->btn_done = btn_done; - evas_object_smart_callback_add(btn_automatic, "focused", _focused_cb, priv); - evas_object_smart_callback_add(btn_automatic, "unfocused", _unfocused_cb, priv); - evas_object_smart_callback_add(btn_manual, "focused", _focused_cb, priv); - evas_object_smart_callback_add(btn_manual, "unfocused", _unfocused_cb, priv); + //evas_object_smart_callback_add(btn_automatic, "focused", _focused_cb, priv); + //evas_object_smart_callback_add(btn_automatic, "unfocused", _unfocused_cb, priv); + //evas_object_smart_callback_add(btn_manual, "focused", _focused_cb, priv); + //evas_object_smart_callback_add(btn_manual, "unfocused", _unfocused_cb, priv); evas_object_smart_callback_add(btn_cancel, "focused", _focused_cb, priv); evas_object_smart_callback_add(btn_cancel, "unfocused", _unfocused_cb, priv); evas_object_smart_callback_add(btn_done, "focused", _focused_cb, priv); evas_object_smart_callback_add(btn_done, "unfocused", _unfocused_cb, priv); - inputmgr_add_callback(btn_automatic, EO_BTN_AUTOMATIC, &_menu_btn_input_handler, priv); - inputmgr_add_callback(btn_manual, EO_BTN_MANUAL, &_menu_btn_input_handler, priv); + //inputmgr_add_callback(btn_automatic, EO_BTN_AUTOMATIC, &_menu_btn_input_handler, priv); + //inputmgr_add_callback(btn_manual, EO_BTN_MANUAL, &_menu_btn_input_handler, priv); inputmgr_add_callback(btn_cancel, EO_BTN_CANCEL, &_menu_btn_input_handler, priv); inputmgr_add_callback(btn_done, EO_BTN_DONE, &_menu_btn_input_handler, priv); - elm_object_focus_next_object_set(btn_automatic, btn_automatic, ELM_FOCUS_LEFT); - elm_object_focus_next_object_set(btn_automatic, btn_automatic, ELM_FOCUS_UP); - elm_object_focus_next_object_set(btn_manual, btn_manual, ELM_FOCUS_RIGHT); - elm_object_focus_next_object_set(btn_manual, btn_manual, ELM_FOCUS_UP); + //elm_object_focus_next_object_set(btn_automatic, btn_automatic, ELM_FOCUS_LEFT); + //elm_object_focus_next_object_set(btn_automatic, btn_automatic, ELM_FOCUS_UP); + //elm_object_focus_next_object_set(btn_manual, btn_manual, ELM_FOCUS_RIGHT); + //elm_object_focus_next_object_set(btn_manual, btn_manual, ELM_FOCUS_UP); elm_object_focus_next_object_set(btn_cancel, btn_cancel, ELM_FOCUS_LEFT); elm_object_focus_next_object_set(btn_cancel, btn_cancel, ELM_FOCUS_DOWN); elm_object_focus_next_object_set(btn_done, btn_done, ELM_FOCUS_RIGHT); @@ -1238,18 +1502,19 @@ static Evas_Object *_create(Evas_Object *win, void *data) priv->conn = data; priv->input_panel_show = false; - _create_content_automatic(priv); + //_create_content_automatic(priv); _create_content_manual(priv); /* Set 'Automatically' as default page */ elm_object_part_content_set(base, "part.content.area", - priv->content_automatic->layout); - priv->cur_menu = EO_BTN_AUTOMATIC; + priv->content_manual->layout);//priv->content_automatic->layout); + priv->ip_menu = 0; + priv->dns_menu = 0; /* Prevent losing focus issue */ - elm_object_focus_next_object_set(btn_automatic, priv->content_automatic->radio1, ELM_FOCUS_DOWN); + /*elm_object_focus_next_object_set(btn_automatic, priv->content_automatic->radio1, ELM_FOCUS_DOWN); elm_object_focus_next_object_set(priv->content_automatic->radio1, btn_automatic, ELM_FOCUS_UP); - elm_object_focus_next_object_set(btn_manual, priv->content_automatic->radio1, ELM_FOCUS_DOWN); + elm_object_focus_next_object_set(btn_manual, priv->content_automatic->radio1, ELM_FOCUS_DOWN);*/ if (!viewmgr_set_view_data(VIEW_NEW_NETWORK, priv)) { _ERR("Set view data failed."); @@ -1324,17 +1589,17 @@ static void _destroy(void *data) /* Remove contents */ _remove_content_manual(priv->content_manual, priv); - _remove_content_automatic(priv->content_automatic, priv); + //_remove_content_automatic(priv->content_automatic, priv); /* Remove input callback */ - if (priv->btn_automatic) { + /*if (priv->btn_automatic) { inputmgr_remove_callback(priv->btn_automatic, &_menu_btn_input_handler); evas_object_del(priv->btn_automatic); } if (priv->btn_manual) { inputmgr_remove_callback(priv->btn_manual, &_menu_btn_input_handler); evas_object_del(priv->btn_manual); - } + }*/ if (priv->btn_cancel) { inputmgr_remove_callback(priv->btn_cancel, &_menu_btn_input_handler); evas_object_del(priv->btn_cancel); -- 2.7.4