2 * Copyright 2012 Samsung Electronics Co., Ltd
\r
4 * Licensed under the Flora License, Version 1.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.tizenopensource.org/license
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
19 #include "sg-keys.h"
\r
20 #include "sg-debug.h"
\r
21 #include "ug-setting-gallery.h"
\r
23 #define POPUP_TIMEOUT 3
\r
26 _gallery_key_text_popupresponse_cb( void *data, Evas_Object *obj, void *event_info )
\r
28 gallery_retm_if(!data, "data is NULL");
\r
30 struct ug_data * ugd = (struct ug_data *)data;
\r
34 evas_object_del(ugd->popup);
\r
40 gallery_key_text_popup(void *data, char *msg)
\r
42 gallery_retm_if(!data, "data is NULL");
\r
44 struct ug_data * ugd = (struct ug_data *)data;
\r
46 Evas_Object *popup = elm_popup_add(ugd->main_layout);
\r
51 evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
\r
53 elm_object_text_set(popup, msg);
\r
54 // elm_popup_mode_set(popup, ELM_POPUP_TYPE_ALERT);
\r
55 elm_popup_timeout_set(popup, POPUP_TIMEOUT);
\r
56 evas_object_smart_callback_add(popup, "response", _gallery_key_text_popupresponse_cb, data);
\r
57 evas_object_show(popup);
\r
62 gallery_key_init_current_time(double *val)
\r
64 if(vconf_get_dbl(VCONFKEY_GALLERY_INTERVAL_TIME, val))
\r
66 if(vconf_set_dbl(VCONFKEY_GALLERY_INTERVAL_TIME, DEFAULT_TIMER))
\r
74 gallery_key_init_repeat_state(int *b_val)
\r
76 if(vconf_get_bool(VCONFKEY_GALLERY_REPEAT_STATE, b_val))
\r
78 if(vconf_set_bool(VCONFKEY_GALLERY_REPEAT_STATE, DEFAULT_REPEAT))
\r
86 gallery_key_init_shuffle_state(int *b_val)
\r
88 if(vconf_get_bool(VCONFKEY_GALLERY_SHUFFLE_STATE, b_val))
\r
90 if(vconf_set_bool(VCONFKEY_GALLERY_SHUFFLE_STATE, DEFAULT_SHUFFLE))
\r
98 gallery_key_get_time_vconf_value(int index)
\r
100 double value = 0.0;
\r
105 value = VCONFKEY_GALLERY_ITV_TIME_2S;
\r
109 value = VCONFKEY_GALLERY_ITV_TIME_3S;
\r
113 value = VCONFKEY_GALLERY_ITV_TIME_5S;
\r
117 value = VCONFKEY_GALLERY_ITV_TIME_10S;
\r
121 value = VCONFKEY_GALLERY_ITV_TIME_20S;
\r
132 gallery_key_time_menu_get(int index)
\r
151 text = SGUG_TR_10s;
\r
155 text = SGUG_TR_20s;
\r
169 gallery_key_set_current_time(double value)
\r
171 if(vconf_set_dbl(VCONFKEY_GALLERY_INTERVAL_TIME, value))
\r
173 gallery_error("vconf_set_dbl:interval time failed");
\r
181 gallery_key_set_repeat_state(bool value)
\r
183 if(vconf_set_bool(VCONFKEY_GALLERY_REPEAT_STATE, value))
\r
185 gallery_error("vconf_set_bool:repeat state failed");
\r
193 gallery_key_set_shuffle_state(bool value)
\r
195 if(vconf_set_bool(VCONFKEY_GALLERY_SHUFFLE_STATE, value))
\r
197 gallery_error("vconf_set_bool:shuffle state failed");
\r