Tizen 2.0 Release
[apps/home/mobileprint.git] / usb-printer-detector / src / upd-view.c
1 /*
2 *  USB-Printer-Detector
3 *
4 * Copyright 2012  Samsung Electronics Co., Ltd
5
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
9
10 * http://floralicense.org/license/
11
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.
17 *
18 */
19
20 #include <libintl.h>
21 #include <glib.h>
22
23 #include "upd.h"
24 #include "upd-strings.h"
25 #include "upd-util.h"
26
27 #include <app_service.h>
28
29 void upd_prepare_popup(int type, void *userdata)
30 {
31         __UPD_FUNC_ENTER__;
32         upd_appdata_t *ad = upd_get_appdata();
33         upd_popup_t *pop = ad->popup_data;
34
35         //upd_destroy_popup();
36
37         memset(pop, 0, sizeof(upd_popup_t));
38
39         pop->type = type;
40
41         switch (pop->type) {
42 #if 0
43         case UPD_BROWSE_FILES_REQ: {
44                 snprintf(pop->text, sizeof(pop->text), _("IDS_UPD_BROWSE_Q")); // WFD_STR_POP_APRV_CONNECT4
45                 snprintf(pop->label1, sizeof(pop->label1), "%s", dgettext("sys_string", "IDS_COM_SK_YES")); // WFD_STR_BUTN_YES
46                 snprintf(pop->label2, sizeof(pop->label2), "%s", dgettext("sys_string", "IDS_COM_SK_NO")); // WFD_STR_BUTN_NO
47                 pop->resp_data1 = UPD_BROWSE_FILES_YES;
48                 pop->resp_data2 = UPD_BROWSE_FILES_NO;
49
50                 ad->popup = upd_draw_pop_type_c(ad->win, pop); // normal popup
51         }
52         break;
53 #endif
54         case UPD_NOTI_CONNECTED:
55                 upd_draw_connected_syspopup();
56                 break;
57         default:
58                 break;
59         }
60
61         __UPD_FUNC_EXIT__;
62         return;
63 }