3 * Copyright 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://www.tizenopensource.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.
19 #include "clock_util.h"
22 * Creat new popup window, and show it
24 * @param[in] data Data used in this function
25 * @param[in] info String displayed on popup
29 void clock_util_show_popup(void *data, char *info, Evas_Smart_Cb response_cb)
36 struct appdata *ad = (struct appdata *)data;
37 Evas_Object *popup = NULL;
39 EVAS_OBJECT_DELIF(ad->popup);
41 popup = elm_popup_add(NULL);
42 evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND,
44 elm_popup_orient_set(popup, ELM_POPUP_ORIENT_CENTER);
45 elm_object_part_text_set(popup, "title", S_("IDS_COM_POP_WARNING"));
46 elm_object_text_set(popup, _(info));
48 Evas_Object *btn = elm_button_add(popup);
49 elm_object_text_set(btn, S_("IDS_COM_SK_OK"));
50 elm_object_part_content_set(popup, "button1", btn);
51 evas_object_smart_callback_add(btn, "clicked", response_cb, data);
54 evas_object_show(popup);