2010-02-02 10:28:50 -08:00
|
|
|
#include "e_mod_main.h"
|
|
|
|
|
|
|
|
extern const char _e_connman_Name[];
|
|
|
|
|
|
|
|
struct _E_Config_Dialog_Data
|
|
|
|
{
|
|
|
|
E_Connman_Module_Context *ctxt;
|
|
|
|
};
|
|
|
|
|
2012-09-03 14:57:16 -07:00
|
|
|
static Evas_Object *
|
2014-05-07 02:37:22 -07:00
|
|
|
_basic_create(E_Config_Dialog *dialog EINA_UNUSED, Evas *evas EINA_UNUSED,
|
|
|
|
E_Config_Dialog_Data *cfdata EINA_UNUSED)
|
2010-02-02 10:28:50 -08:00
|
|
|
{
|
2012-09-03 14:57:16 -07:00
|
|
|
return NULL;
|
|
|
|
}
|
2010-02-02 10:28:50 -08:00
|
|
|
|
2012-09-03 14:57:16 -07:00
|
|
|
static int
|
2014-05-07 02:37:22 -07:00
|
|
|
_basic_apply(E_Config_Dialog *dialog EINA_UNUSED,
|
|
|
|
E_Config_Dialog_Data *cfdata EINA_UNUSED)
|
2010-02-02 10:28:50 -08:00
|
|
|
{
|
2012-09-03 14:57:16 -07:00
|
|
|
return 1;
|
2010-02-02 10:28:50 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-09-03 14:57:16 -07:00
|
|
|
_free_data(E_Config_Dialog *dialog,
|
|
|
|
E_Config_Dialog_Data *cfdata)
|
2010-02-02 10:28:50 -08:00
|
|
|
{
|
2012-09-03 14:57:16 -07:00
|
|
|
E_Connman_Module_Context *ctxt = dialog->data;
|
|
|
|
ctxt->conf_dialog = NULL;
|
|
|
|
E_FREE(cfdata);
|
2010-02-02 10:28:50 -08:00
|
|
|
}
|
|
|
|
|
2012-09-03 14:57:16 -07:00
|
|
|
static inline void
|
|
|
|
_fill_data(E_Config_Dialog_Data *cfdata,
|
|
|
|
E_Connman_Module_Context *ctxt)
|
2010-02-02 10:28:50 -08:00
|
|
|
{
|
2012-09-03 14:57:16 -07:00
|
|
|
cfdata->ctxt = ctxt;
|
2010-02-02 10:28:50 -08:00
|
|
|
}
|
|
|
|
|
2012-09-03 14:57:16 -07:00
|
|
|
static void *
|
|
|
|
_create_data(E_Config_Dialog *dialog)
|
2010-02-02 10:28:50 -08:00
|
|
|
{
|
2012-09-03 14:57:16 -07:00
|
|
|
E_Config_Dialog_Data *cfdata;
|
2010-02-02 10:28:50 -08:00
|
|
|
|
2012-09-03 14:57:16 -07:00
|
|
|
cfdata = E_NEW(E_Config_Dialog_Data, 1);
|
|
|
|
if (!cfdata)
|
|
|
|
return NULL;
|
|
|
|
_fill_data(cfdata, dialog->data);
|
|
|
|
return cfdata;
|
2010-03-04 13:58:23 -08:00
|
|
|
}
|
2010-02-02 10:28:50 -08:00
|
|
|
|
|
|
|
E_Config_Dialog *
|
2014-11-02 18:35:13 -08:00
|
|
|
e_connman_config_dialog_new(Evas_Object *parent,
|
2011-03-21 13:32:57 -07:00
|
|
|
E_Connman_Module_Context *ctxt)
|
2010-02-02 10:28:50 -08:00
|
|
|
{
|
|
|
|
E_Config_Dialog *dialog;
|
|
|
|
E_Config_Dialog_View *view;
|
|
|
|
|
2010-08-21 06:52:25 -07:00
|
|
|
EINA_SAFETY_ON_TRUE_RETURN_VAL(!!ctxt->conf_dialog, ctxt->conf_dialog);
|
2010-02-02 10:28:50 -08:00
|
|
|
|
|
|
|
view = E_NEW(E_Config_Dialog_View, 1);
|
|
|
|
if (!view)
|
2010-03-11 16:16:21 -08:00
|
|
|
return NULL;
|
2010-02-02 10:28:50 -08:00
|
|
|
|
|
|
|
view->create_cfdata = _create_data;
|
|
|
|
view->free_cfdata = _free_data;
|
|
|
|
view->basic.create_widgets = _basic_create;
|
|
|
|
view->basic.apply_cfdata = _basic_apply;
|
|
|
|
|
2014-11-02 18:35:13 -08:00
|
|
|
dialog = e_config_dialog_new(NULL, _("Connection Manager"),
|
2011-03-21 13:32:57 -07:00
|
|
|
_e_connman_Name, "e_connman_config_dialog_new",
|
|
|
|
e_connman_theme_path(), 0, view, ctxt);
|
2010-02-02 10:28:50 -08:00
|
|
|
|
|
|
|
return dialog;
|
|
|
|
}
|