4 * Copyright 2012 Samsung Electronics Co., Ltd
6 * Licensed under the Flora License, Version 1.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.tizenopensource.org/license
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
23 #include "common_utils.h"
24 #include "wifi-syspopup.h"
25 #include "view-alerts.h"
26 #include "i18nmanager.h"
28 extern wifi_object* syspopup_app_state;
30 int view_alerts_powering_on_show(void)
32 __COMMON_FUNC_ENTER__;
33 if(WIFI_SYSPOPUP_SUPPORT_QUICKPANEL == syspopup_app_state->wifi_syspopup_support){
37 if(NULL != syspopup_app_state->alertpopup) {
38 evas_object_del(syspopup_app_state->alertpopup);
39 syspopup_app_state->alertpopup = NULL;
42 Evas_Object *conformant = NULL;
43 conformant = elm_conformant_add(syspopup_app_state->win_main);
44 elm_win_conformant_set(syspopup_app_state->win_main, EINA_TRUE);
45 elm_win_resize_object_add(syspopup_app_state->win_main, conformant);
46 evas_object_size_hint_weight_set(conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
47 evas_object_size_hint_align_set(conformant, EVAS_HINT_FILL, EVAS_HINT_FILL);
48 evas_object_show(conformant);
50 Evas_Object *content = elm_layout_add(conformant);
51 elm_object_content_set(conformant, content);
52 syspopup_app_state->alertpopup = elm_popup_add(content);
54 Evas_Object *box = elm_box_add(syspopup_app_state->alertpopup);
55 evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
56 evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
57 evas_object_show(box);
59 Evas_Object *progressbar = elm_progressbar_add(box);
60 elm_object_style_set(progressbar, "list_process");
61 evas_object_size_hint_weight_set(progressbar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
62 evas_object_size_hint_align_set(progressbar, EVAS_HINT_FILL, EVAS_HINT_FILL);
63 elm_progressbar_pulse(progressbar, EINA_TRUE);
64 evas_object_show(progressbar);
65 elm_box_pack_end(box, progressbar);
67 Evas_Object *label = elm_label_add(box);
68 elm_object_style_set(label, "popup/default");
69 evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
70 evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
71 elm_object_text_set(label, sc(PACKAGE, I18N_TYPE_Activating));
72 evas_object_show(label);
73 elm_box_pack_end(box, label);
75 elm_object_content_set(syspopup_app_state->alertpopup, box);
76 evas_object_size_hint_weight_set(syspopup_app_state->alertpopup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
77 evas_object_show(syspopup_app_state->alertpopup);
84 void view_alerts_popup_show(const char *err_msg)
86 __COMMON_FUNC_ENTER__;
88 if (WIFI_SYSPOPUP_SUPPORT_QUICKPANEL == syspopup_app_state->wifi_syspopup_support) {
93 if (NULL != syspopup_app_state->alertpopup) {
94 evas_object_del(syspopup_app_state->alertpopup);
95 syspopup_app_state->alertpopup = NULL;
98 syspopup_app_state->alertpopup = common_utils_show_info_timeout_popup(syspopup_app_state->win_main, err_msg, 2.0f);
100 __COMMON_FUNC_EXIT__;
105 void view_alerts_popup_ok_show(const char *err_msg)
107 __COMMON_FUNC_ENTER__;
109 if (WIFI_SYSPOPUP_SUPPORT_QUICKPANEL == syspopup_app_state->wifi_syspopup_support) {
110 __COMMON_FUNC_EXIT__;
114 if (NULL != syspopup_app_state->alertpopup) {
115 evas_object_del(syspopup_app_state->alertpopup);
116 syspopup_app_state->alertpopup = NULL;
119 syspopup_app_state->alertpopup = common_utils_show_info_ok_popup(syspopup_app_state->win_main, PACKAGE, err_msg);
121 __COMMON_FUNC_EXIT__;