4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
6 * Contact: MyoungJune Park <mj2004.park@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
21 #include <setting-connectivity-usb-help.h>
24 static int setting_connectivity_usb_help_create(void *cb);
25 static int setting_connectivity_usb_help_destroy(void *cb);
26 static int setting_connectivity_usb_help_update(void *cb);
27 static int setting_connectivity_usb_help_cleanup(void *cb);
29 setting_view setting_view_connectivity_usb_help = {
30 .create = setting_connectivity_usb_help_create,
31 .destroy = setting_connectivity_usb_help_destroy,
32 .update = setting_connectivity_usb_help_update,
33 .cleanup = setting_connectivity_usb_help_cleanup,
36 /* ***************************************************
40 ***************************************************/
42 static int setting_connectivity_usb_help_create(void *cb)
44 retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
46 SettingConnectivityUG *ad = (SettingConnectivityUG *) cb;
48 char samsung_kies_help[HELP_LEN];
49 char mass_storage_help[HELP_LEN];
50 char debugging_mode_help[HELP_LEN];
52 snprintf(samsung_kies_help, HELP_LEN,
53 "%s%s%s%s", "<b>", _("IDS_ST_HEADER_SAMSUNG_KIES"), "</b><br>",
54 evas_textblock_text_utf8_to_markup(NULL, _("IDS_ST_BODY_SAMSUNG_KIES_CONNECTION_CONNECTING_USB_HELP_MSG")));
55 snprintf(mass_storage_help, HELP_LEN,
56 "%s%s%s%s", "<b>", _("IDS_ST_OPT_MASS_STORAGE_ABB"), "</b><br>",
57 evas_textblock_text_utf8_to_markup(NULL, _("IDS_ST_BODY_MASS_STORAGE_HELP_MSG")));
58 snprintf(debugging_mode_help, HELP_LEN,
59 "%s%s%s%s", "<b>", _("IDS_ST_BODY_USB_DEBUGGING"), "</b><br>",
60 evas_textblock_text_utf8_to_markup(NULL, _("IDS_ST_BODY_USB_DEBUGGING_IS_INTENDED_FOR_DEVELOPMENT_PURPOSES_ONLY_MSG")));
64 setting_push_layout_navi_bar_genlist(ad->win_main_layout,
66 _("IDS_COM_BODY_HELP"),
67 _("IDS_COM_BODY_BACK"),
69 setting_connectivity_usb_help_click_back_cb,
73 setting_create_Gendial_field_def(genlist, &(ad->itc_help_style),
75 ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, NULL, NULL,
76 0, samsung_kies_help, NULL,
79 setting_create_Gendial_field_def(genlist, &(ad->itc_help_style),
81 ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, NULL, NULL,
82 0, mass_storage_help, NULL,
85 setting_create_Gendial_field_def(genlist, &(ad->itc_help_style),
87 ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, NULL, NULL,
88 0, debugging_mode_help, NULL,
91 setting_view_connectivity_usb_help.is_create = 1;
93 return SETTING_RETURN_SUCCESS;
96 static int setting_connectivity_usb_help_destroy(void *cb)
99 retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
101 SettingConnectivityUG *ad = (SettingConnectivityUG *) cb;
103 elm_naviframe_item_pop(ad->navi_bar);
104 setting_view_connectivity_usb_help.is_create = 0;
106 return SETTING_RETURN_SUCCESS;
109 static int setting_connectivity_usb_help_update(void *cb)
111 return SETTING_RETURN_SUCCESS;
114 static int setting_connectivity_usb_help_cleanup(void *cb)
116 return setting_connectivity_usb_help_destroy(cb);
119 /* ***************************************************
123 ***************************************************/
126 setting_connectivity_usb_help_click_back_cb(void *data, Evas_Object *obj,
130 setting_retm_if(data == NULL, " Data parameter is NULL");
132 SettingConnectivityUG *ad = (SettingConnectivityUG *) data;
133 setting_view_change(&setting_view_connectivity_usb_help,
134 &setting_view_connectivity_usb, ad);