forked from enlightenment/enlightenment
remove wizards from time module gadgets
these were added mostly for the purpose of testing the wizard functionality, but a wizard should only be used when a gadget cannot function without being configured ref T5796
This commit is contained in:
parent
6d5bb4ac5c
commit
0ada5a03bb
|
@ -455,53 +455,6 @@ analog_clock_create(Evas_Object *parent, int *id, E_Gadget_Site_Orient orient)
|
|||
return clock_create(parent, inst, orient);
|
||||
}
|
||||
|
||||
typedef struct Wizard_Item
|
||||
{
|
||||
E_Gadget_Wizard_End_Cb cb;
|
||||
void *data;
|
||||
int id;
|
||||
} Wizard_Item;
|
||||
|
||||
static void
|
||||
_wizard_end(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
Wizard_Item *wi = data;
|
||||
|
||||
wi->cb(wi->data, wi->id);
|
||||
free(wi);
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
clock_wizard(E_Gadget_Wizard_End_Cb cb, void *data, Eina_Bool digital)
|
||||
{
|
||||
int id = 0;
|
||||
Config_Item *ci;
|
||||
Wizard_Item *wi;
|
||||
Evas_Object *obj;
|
||||
|
||||
wi = E_NEW(Wizard_Item, 1);
|
||||
wi->cb = cb;
|
||||
wi->data = data;
|
||||
|
||||
ci = _conf_item_get(&id, digital);
|
||||
wi->id = ci->id;
|
||||
obj = config_clock(ci, NULL);
|
||||
evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, _wizard_end, wi);
|
||||
return obj;
|
||||
}
|
||||
|
||||
EINTERN Evas_Object *
|
||||
digital_clock_wizard(E_Gadget_Wizard_End_Cb cb, void *data)
|
||||
{
|
||||
return clock_wizard(cb, data, 1);
|
||||
}
|
||||
|
||||
EINTERN Evas_Object *
|
||||
analog_clock_wizard(E_Gadget_Wizard_End_Cb cb, void *data)
|
||||
{
|
||||
return clock_wizard(cb, data, 0);
|
||||
}
|
||||
|
||||
EINTERN void
|
||||
time_config_update(Config_Item *ci)
|
||||
{
|
||||
|
|
|
@ -82,8 +82,6 @@ EINTERN void time_zoneinfo_scan(Evas_Object *obj);
|
|||
|
||||
EINTERN Evas_Object *digital_clock_create(Evas_Object *parent, int *id, E_Gadget_Site_Orient orient);
|
||||
EINTERN Evas_Object *analog_clock_create(Evas_Object *parent, int *id, E_Gadget_Site_Orient orient);
|
||||
EINTERN Evas_Object *digital_clock_wizard(E_Gadget_Wizard_End_Cb cb, void *data);
|
||||
EINTERN Evas_Object *analog_clock_wizard(E_Gadget_Wizard_End_Cb cb, void *data);
|
||||
EINTERN void clock_popup_new(Instance *inst);
|
||||
EINTERN void time_config_update(Config_Item *ci);
|
||||
EINTERN void clock_timer_set(Eina_Bool set);
|
||||
|
|
|
@ -67,8 +67,8 @@ clock_init(void)
|
|||
e_action_predef_name_set(N_("Clock"), N_("Toggle calendar"), "clock", "show_calendar", NULL, 0);
|
||||
}
|
||||
|
||||
e_gadget_type_add("Digital Clock", digital_clock_create, digital_clock_wizard);
|
||||
e_gadget_type_add("Analog Clock", analog_clock_create, analog_clock_wizard);
|
||||
e_gadget_type_add("Digital Clock", digital_clock_create, NULL);
|
||||
e_gadget_type_add("Analog Clock", analog_clock_create, NULL);
|
||||
time_init();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue