BuildRequires: pkgconfig(tv-service)
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(vconf)
+BuildRequires: pkgconfig(alarm-service)
Requires(post): /usr/bin/vconftool
%define _appdir /usr/apps/%{name}
#include <app.h>
#include <Elementary.h>
+#include <time.h>
+#include <alarm.h>
#include "viewmgr.h"
#include "inputmgr.h"
int *setup_type;
Evas_Object *setup_type_popup;
enum setup_type cur_type;
+ Evas_Object *year;
};
enum input_handler_type {
static void _key_down_cb(int id, void *data, Evas *e, Evas_Object *obj,
Evas_Event_Key_Down *ev)
{
+ struct _priv *priv;
+ priv = data;
+
if (!obj || !ev) {
_ERR("Invalid argument.");
return;
}
+ struct tm _tm_year;
+ elm_datetime_value_get(priv->year, &_tm_year);
+ time_t the_time = mktime(&_tm_year);
+
if (!strcmp(ev->keyname, KEY_ENTER)) {
switch (id) {
case INPUT_HANDLER_TYPE_BTN_CANCEL:
break;
case INPUT_HANDLER_TYPE_BTN_DONE:
- elm_object_signal_emit(data, "picker,action,value,set", "");
+ alarmmgr_set_systime(the_time);
viewmgr_pop_view();
break;
priv->clock_setup_btn = setup_btn;
// item - year
- Evas_Object *year;
+ Evas_Object *year = priv->year;
year = elm_datetime_add(priv->base);
elm_datetime_field_visible_set(year, ELM_DATETIME_HOUR, EINA_FALSE);
elm_datetime_field_visible_set(year, ELM_DATETIME_MINUTE, EINA_FALSE);
elm_datetime_field_visible_set(year, ELM_DATETIME_MONTH, EINA_FALSE);
elm_datetime_field_visible_set(year, ELM_DATETIME_DATE, EINA_FALSE);
elm_object_part_content_set(priv->base, PART_MAIN_ITEM_DATE_YEAR, year);
+ priv->year = year;
// item - month
Evas_Object *month;