3 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * Licensed under the Flora License, Version 1.0 (the License);
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://floralicense.org/license/
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an AS IS BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 #include <setting-connectivity-usb-help.h>
20 static int setting_connectivity_usb_help_create(void *cb);
21 static int setting_connectivity_usb_help_destroy(void *cb);
22 static int setting_connectivity_usb_help_update(void *cb);
23 static int setting_connectivity_usb_help_cleanup(void *cb);
25 setting_view setting_view_connectivity_usb_help = {
26 .create = setting_connectivity_usb_help_create,
27 .destroy = setting_connectivity_usb_help_destroy,
28 .update = setting_connectivity_usb_help_update,
29 .cleanup = setting_connectivity_usb_help_cleanup,
32 /* ***************************************************
36 ***************************************************/
38 static int setting_connectivity_usb_help_create(void *cb)
40 retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
42 SettingConnectivityUG *ad = (SettingConnectivityUG *) cb;
44 char samsung_kies_help[HELP_LEN];
45 char mass_storage_help[HELP_LEN];
46 char debugging_mode_help[HELP_LEN];
48 snprintf(samsung_kies_help, HELP_LEN,
49 "%s%s%s%s", "<b>", _("IDS_ST_HEADER_SAMSUNG_KIES"), "</b><br>",
50 evas_textblock_text_utf8_to_markup(NULL, _("IDS_ST_BODY_SAMSUNG_KIES_CONNECTION_CONNECTING_USB_HELP_MSG")));
51 snprintf(mass_storage_help, HELP_LEN,
52 "%s%s%s%s", "<b>", _("IDS_ST_OPT_MASS_STORAGE_ABB"), "</b><br>",
53 evas_textblock_text_utf8_to_markup(NULL, _("IDS_ST_BODY_MASS_STORAGE_HELP_MSG")));
54 snprintf(debugging_mode_help, HELP_LEN,
55 "%s%s%s%s", "<b>", _("IDS_ST_BODY_USB_DEBUGGING"), "</b><br>",
56 evas_textblock_text_utf8_to_markup(NULL, _("IDS_ST_BODY_USB_DEBUGGING_IS_INTENDED_FOR_DEVELOPMENT_PURPOSES_ONLY_MSG")));
60 setting_push_layout_navi_bar_genlist(ad->win_main_layout,
62 _("IDS_COM_BODY_HELP"),
63 _("IDS_COM_BODY_BACK"),
65 setting_connectivity_usb_help_click_back_cb,
69 setting_create_Gendial_field_def(genlist, &(ad->itc_help_style),
71 ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, NULL, NULL,
72 0, samsung_kies_help, NULL,
75 setting_create_Gendial_field_def(genlist, &(ad->itc_help_style),
77 ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, NULL, NULL,
78 0, mass_storage_help, NULL,
81 setting_create_Gendial_field_def(genlist, &(ad->itc_help_style),
83 ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, NULL, NULL,
84 0, debugging_mode_help, NULL,
87 setting_view_connectivity_usb_help.is_create = 1;
89 return SETTING_RETURN_SUCCESS;
92 static int setting_connectivity_usb_help_destroy(void *cb)
95 retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
97 SettingConnectivityUG *ad = (SettingConnectivityUG *) cb;
99 elm_naviframe_item_pop(ad->navi_bar);
100 setting_view_connectivity_usb_help.is_create = 0;
102 return SETTING_RETURN_SUCCESS;
105 static int setting_connectivity_usb_help_update(void *cb)
107 return SETTING_RETURN_SUCCESS;
110 static int setting_connectivity_usb_help_cleanup(void *cb)
112 return setting_connectivity_usb_help_destroy(cb);
115 /* ***************************************************
119 ***************************************************/
122 setting_connectivity_usb_help_click_back_cb(void *data, Evas_Object *obj,
126 setting_retm_if(data == NULL, " Data parameter is NULL");
128 SettingConnectivityUG *ad = (SettingConnectivityUG *) data;
129 setting_view_change(&setting_view_connectivity_usb_help,
130 &setting_view_connectivity_usb, ad);