move a chunk of stuff to use evas_smart_class_new() - evas_smart_new() will

probably die as it's already got legacy funcion methods for layer etc. stuff.


SVN revision: 31161
This commit is contained in:
Carsten Haitzler 2007-08-04 13:12:43 +00:00
parent ffa9faff45
commit a960cd070b
19 changed files with 313 additions and 201 deletions

View File

@ -649,18 +649,24 @@ static void
_e_box_smart_init(void) _e_box_smart_init(void)
{ {
if (_e_smart) return; if (_e_smart) return;
_e_smart = evas_smart_new("e_box", {
_e_box_smart_add, static const Evas_Smart_Class sc =
_e_box_smart_del, {
NULL, NULL, NULL, NULL, NULL, "e_box",
_e_box_smart_move, EVAS_SMART_CLASS_VERSION,
_e_box_smart_resize, _e_box_smart_add,
_e_box_smart_show, _e_box_smart_del,
_e_box_smart_hide, _e_box_smart_move,
_e_box_smart_color_set, _e_box_smart_resize,
_e_box_smart_clip_set, _e_box_smart_show,
_e_box_smart_clip_unset, _e_box_smart_hide,
NULL); _e_box_smart_color_set,
_e_box_smart_clip_set,
_e_box_smart_clip_unset,
NULL
};
_e_smart = evas_smart_class_new(&sc);
}
} }
static void static void

View File

@ -74,18 +74,22 @@ e_editable_add(Evas *evas)
{ {
if (!_e_editable_smart) if (!_e_editable_smart)
{ {
_e_editable_smart = evas_smart_new("e_editable", static const Evas_Smart_Class sc =
_e_editable_smart_add, /* add */ {
_e_editable_smart_del, /* del */ "e_editable",
NULL, NULL, NULL, NULL, NULL, /* stacking */ EVAS_SMART_CLASS_VERSION,
_e_editable_smart_move, /* move */ _e_editable_smart_add,
_e_editable_smart_resize, /* resize */ _e_editable_smart_del,
_e_editable_smart_show, /* show */ _e_editable_smart_move,
_e_editable_smart_hide, /* hide */ _e_editable_smart_resize,
_e_editable_color_set, /* color_set */ _e_editable_smart_show,
_e_editable_clip_set, /* clip_set */ _e_editable_smart_hide,
_e_editable_clip_unset, /* clip_unset */ _e_editable_color_set,
NULL); /* data*/ _e_editable_clip_set,
_e_editable_clip_unset,
NULL
};
_e_editable_smart = evas_smart_class_new(&sc);
_e_editable_smart_use = 0; _e_editable_smart_use = 0;
} }

View File

@ -70,18 +70,22 @@ e_entry_add(Evas *evas)
{ {
if (!_e_entry_smart) if (!_e_entry_smart)
{ {
_e_entry_smart = evas_smart_new("e_entry", static const Evas_Smart_Class sc =
_e_entry_smart_add, /* add */ {
_e_entry_smart_del, /* del */ "e_entry",
NULL, NULL, NULL, NULL, NULL, /* stacking */ EVAS_SMART_CLASS_VERSION,
_e_entry_smart_move, /* move */ _e_entry_smart_add,
_e_entry_smart_resize, /* resize */ _e_entry_smart_del,
_e_entry_smart_show, /* show */ _e_entry_smart_move,
_e_entry_smart_hide, /* hide */ _e_entry_smart_resize,
_e_entry_color_set, /* color_set */ _e_entry_smart_show,
_e_entry_clip_set, /* clip_set */ _e_entry_smart_hide,
_e_entry_clip_unset, /* clip_unset */ _e_entry_color_set,
NULL); /* data*/ _e_entry_clip_set,
_e_entry_clip_unset,
NULL
};
_e_entry_smart = evas_smart_class_new(&sc);
_e_entry_smart_use = 0; _e_entry_smart_use = 0;
} }

View File

@ -822,18 +822,23 @@ static void
_e_flowlayout_smart_init(void) _e_flowlayout_smart_init(void)
{ {
if (_e_smart) return; if (_e_smart) return;
_e_smart = evas_smart_new("e_flowlayout", {
_e_flowlayout_smart_add, static const Evas_Smart_Class sc =
_e_flowlayout_smart_del, {
NULL, NULL, NULL, NULL, NULL, "e_flowlayout",
_e_flowlayout_smart_move, _e_flowlayout_smart_add,
_e_flowlayout_smart_resize, _e_flowlayout_smart_del,
_e_flowlayout_smart_show, _e_flowlayout_smart_move,
_e_flowlayout_smart_hide, _e_flowlayout_smart_resize,
_e_flowlayout_smart_color_set, _e_flowlayout_smart_show,
_e_flowlayout_smart_clip_set, _e_flowlayout_smart_hide,
_e_flowlayout_smart_clip_unset, _e_flowlayout_smart_color_set,
NULL); _e_flowlayout_smart_clip_set,
_e_flowlayout_smart_clip_unset,
NULL
};
_e_smart = evas_smart_class_new(&sc);
}
} }
static void static void

View File

@ -369,18 +369,24 @@ e_fm2_init(void)
ecore_file_mkpath(path); ecore_file_mkpath(path);
_e_fm2_meta_path = strdup(path); _e_fm2_meta_path = strdup(path);
_e_fm2_smart = evas_smart_new("e_fm", {
_e_fm2_smart_add, /* add */ static const Evas_Smart_Class sc =
_e_fm2_smart_del, /* del */ {
NULL, NULL, NULL, NULL, NULL, "e_fm",
_e_fm2_smart_move, /* move */ EVAS_SMART_CLASS_VERSION,
_e_fm2_smart_resize, /* resize */ _e_fm2_smart_add, /* add */
_e_fm2_smart_show,/* show */ _e_fm2_smart_del, /* del */
_e_fm2_smart_hide,/* hide */ _e_fm2_smart_move, /* move */
_e_fm2_smart_color_set, /* color_set */ _e_fm2_smart_resize, /* resize */
_e_fm2_smart_clip_set, /* clip_set */ _e_fm2_smart_show,/* show */
_e_fm2_smart_clip_unset, /* clip_unset */ _e_fm2_smart_hide,/* hide */
NULL); /* data*/ _e_fm2_smart_color_set, /* color_set */
_e_fm2_smart_clip_set, /* clip_set */
_e_fm2_smart_clip_unset, /* clip_unset */
NULL
};
_e_fm2_smart = evas_smart_class_new(&sc);
}
// _e_fm2_client_spawn(); // _e_fm2_client_spawn();
e_fm2_custom_file_init(); e_fm2_custom_file_init();
efreet_mime_init(); efreet_mime_init();

View File

@ -2924,18 +2924,24 @@ static void
_e_gadcon_layout_smart_init(void) _e_gadcon_layout_smart_init(void)
{ {
if (_e_smart) return; if (_e_smart) return;
_e_smart = evas_smart_new("e_gadcon_layout", {
_e_gadcon_layout_smart_add, static const Evas_Smart_Class sc =
_e_gadcon_layout_smart_del, {
NULL, NULL, NULL, NULL, NULL, "e_gadcon_layout",
_e_gadcon_layout_smart_move, EVAS_SMART_CLASS_VERSION,
_e_gadcon_layout_smart_resize, _e_gadcon_layout_smart_add,
_e_gadcon_layout_smart_show, _e_gadcon_layout_smart_del,
_e_gadcon_layout_smart_hide, _e_gadcon_layout_smart_move,
_e_gadcon_layout_smart_color_set, _e_gadcon_layout_smart_resize,
_e_gadcon_layout_smart_clip_set, _e_gadcon_layout_smart_show,
_e_gadcon_layout_smart_clip_unset, _e_gadcon_layout_smart_hide,
NULL); _e_gadcon_layout_smart_color_set,
_e_gadcon_layout_smart_clip_set,
_e_gadcon_layout_smart_clip_unset,
NULL
};
_e_smart = evas_smart_class_new(&sc);
}
} }
static void static void

View File

@ -272,18 +272,24 @@ static void
_e_icon_smart_init(void) _e_icon_smart_init(void)
{ {
if (_e_smart) return; if (_e_smart) return;
_e_smart = evas_smart_new("e_icon", {
_e_icon_smart_add, static const Evas_Smart_Class sc =
_e_icon_smart_del, {
NULL, NULL, NULL, NULL, NULL, "e_icon",
_e_icon_smart_move, EVAS_SMART_CLASS_VERSION,
_e_icon_smart_resize, _e_icon_smart_add,
_e_icon_smart_show, _e_icon_smart_del,
_e_icon_smart_hide, _e_icon_smart_move,
_e_icon_smart_color_set, _e_icon_smart_resize,
_e_icon_smart_clip_set, _e_icon_smart_show,
_e_icon_smart_clip_unset, _e_icon_smart_hide,
NULL); _e_icon_smart_color_set,
_e_icon_smart_clip_set,
_e_icon_smart_clip_unset,
NULL
};
_e_smart = evas_smart_class_new(&sc);
}
} }
static void static void

View File

@ -712,11 +712,24 @@ static void
_e_smart_init(void) _e_smart_init(void)
{ {
if (_e_smart) return; if (_e_smart) return;
_e_smart = evas_smart_new(SMART_NAME, _e_smart_add, _e_smart_del, {
NULL, NULL, NULL, NULL, NULL, static const Evas_Smart_Class sc =
_e_smart_move, _e_smart_resize, _e_smart_show, {
_e_smart_hide, _e_smart_color_set, SMART_NAME,
_e_smart_clip_set, _e_smart_clip_unset, NULL); EVAS_SMART_CLASS_VERSION,
_e_smart_add,
_e_smart_del,
_e_smart_move,
_e_smart_resize,
_e_smart_show,
_e_smart_hide,
_e_smart_color_set,
_e_smart_clip_set,
_e_smart_clip_unset,
NULL
};
_e_smart = evas_smart_class_new(&sc);
}
} }
static void static void

View File

@ -572,7 +572,14 @@ _cb_unload(void *data, void *data2)
if (!item->selected) continue; if (!item->selected) continue;
lbl = e_widget_ilist_nth_label_get(cfdata->o_loaded, idx); lbl = e_widget_ilist_nth_label_get(cfdata->o_loaded, idx);
mod = _get_module(cfdata, lbl); mod = _get_module(cfdata, lbl);
if ((mod) && (mod->enabled)) e_module_disable(mod); if ((mod) && (mod->enabled))
{
e_module_disable(mod);
// FIXME: we need to UNLOAD modules by deleting their objects too! right now
// this is done next restart
// cfdata->modules = evas_list_remove(cfdata->modules, mod);
// e_object_del(E_OBJECT(mod));
}
} }
if (l) evas_list_free(l); if (l) evas_list_free(l);
} }

View File

@ -350,18 +350,24 @@ static void
_e_layout_smart_init(void) _e_layout_smart_init(void)
{ {
if (_e_smart) return; if (_e_smart) return;
_e_smart = evas_smart_new("e_layout", {
_e_layout_smart_add, static const Evas_Smart_Class sc =
_e_layout_smart_del, {
NULL, NULL, NULL, NULL, NULL, "e_layout",
_e_layout_smart_move, EVAS_SMART_CLASS_VERSION,
_e_layout_smart_resize, _e_layout_smart_add,
_e_layout_smart_show, _e_layout_smart_del,
_e_layout_smart_hide, _e_layout_smart_move,
_e_layout_smart_color_set, _e_layout_smart_resize,
_e_layout_smart_clip_set, _e_layout_smart_show,
_e_layout_smart_clip_unset, _e_layout_smart_hide,
NULL); _e_layout_smart_color_set,
_e_layout_smart_clip_set,
_e_layout_smart_clip_unset,
NULL
};
_e_smart = evas_smart_class_new(&sc);
}
} }
static void static void

View File

@ -196,17 +196,23 @@ static void
_e_smart_init(void) _e_smart_init(void)
{ {
if (_e_smart) return; if (_e_smart) return;
_e_smart = evas_smart_new(SMART_NAME, {
_e_smart_add, static const Evas_Smart_Class sc =
_e_smart_del, {
NULL, NULL, NULL, NULL, NULL, SMART_NAME,
_e_smart_move, EVAS_SMART_CLASS_VERSION,
_e_smart_resize, _e_smart_add,
_e_smart_show, _e_smart_del,
_e_smart_hide, _e_smart_move,
_e_smart_color_set, _e_smart_resize,
_e_smart_clip_set, _e_smart_show,
_e_smart_clip_unset, _e_smart_hide,
NULL); _e_smart_color_set,
_e_smart_clip_set,
_e_smart_clip_unset,
NULL
};
_e_smart = evas_smart_class_new(&sc);
}
} }

View File

@ -73,11 +73,11 @@ e_module_all_load(void)
evas_list_append(_e_modules_delayed, evas_list_append(_e_modules_delayed,
evas_stringshare_add(em->name)); evas_stringshare_add(em->name));
} }
else else if (em->enabled)
{ {
m = NULL; m = NULL;
if (em->name) m = e_module_new(em->name); if (em->name) m = e_module_new(em->name);
if ((m) && (em->enabled)) e_module_enable(m); if (m) e_module_enable(m);
} }
} }
} }

View File

@ -249,17 +249,23 @@ static void
_e_smart_init(void) _e_smart_init(void)
{ {
if (_e_smart) return; if (_e_smart) return;
_e_smart = evas_smart_new(SMART_NAME, {
_e_smart_add, static const Evas_Smart_Class sc =
_e_smart_del, {
NULL, NULL, NULL, NULL, NULL, SMART_NAME,
_e_smart_move, EVAS_SMART_CLASS_VERSION,
_e_smart_resize, _e_smart_add,
_e_smart_show, _e_smart_del,
_e_smart_hide, _e_smart_move,
_e_smart_color_set, _e_smart_resize,
_e_smart_clip_set, _e_smart_show,
_e_smart_clip_unset, _e_smart_hide,
NULL); _e_smart_color_set,
_e_smart_clip_set,
_e_smart_clip_unset,
NULL
};
_e_smart = evas_smart_class_new(&sc);
}
} }

View File

@ -783,17 +783,23 @@ static void
_e_smart_init(void) _e_smart_init(void)
{ {
if (_e_smart) return; if (_e_smart) return;
_e_smart = evas_smart_new(SMART_NAME, {
_e_smart_add, static const Evas_Smart_Class sc =
_e_smart_del, {
NULL, NULL, NULL, NULL, NULL, SMART_NAME,
_e_smart_move, EVAS_SMART_CLASS_VERSION,
_e_smart_resize, _e_smart_add,
_e_smart_show, _e_smart_del,
_e_smart_hide, _e_smart_move,
_e_smart_color_set, _e_smart_resize,
_e_smart_clip_set, _e_smart_show,
_e_smart_clip_unset, _e_smart_hide,
NULL); _e_smart_color_set,
_e_smart_clip_set,
_e_smart_clip_unset,
NULL
};
_e_smart = evas_smart_class_new(&sc);
}
} }

View File

@ -533,17 +533,23 @@ static void
_e_smart_init(void) _e_smart_init(void)
{ {
if (_e_smart) return; if (_e_smart) return;
_e_smart = evas_smart_new(SMART_NAME, {
_e_smart_add, static const Evas_Smart_Class sc =
_e_smart_del, {
NULL, NULL, NULL, NULL, NULL, SMART_NAME,
_e_smart_move, EVAS_SMART_CLASS_VERSION,
_e_smart_resize, _e_smart_add,
_e_smart_show, _e_smart_del,
_e_smart_hide, _e_smart_move,
_e_smart_color_set, _e_smart_resize,
_e_smart_clip_set, _e_smart_show,
_e_smart_clip_unset, _e_smart_hide,
NULL); _e_smart_color_set,
_e_smart_clip_set,
_e_smart_clip_unset,
NULL
};
_e_smart = evas_smart_class_new(&sc);
}
} }

View File

@ -152,19 +152,25 @@ _e_spectrum_smart_clip_unset(Evas_Object *o)
static void static void
_e_spectrum_smart_init() _e_spectrum_smart_init()
{ {
if ( _e_spectrum_smart ) return; if (_e_spectrum_smart) return;
_e_spectrum_smart = evas_smart_new("e_spectrum", {
_e_spectrum_smart_add, static const Evas_Smart_Class sc =
_e_spectrum_smart_del, {
NULL, NULL, NULL, NULL, NULL, "e_spectrum",
_e_spectrum_smart_move, EVAS_SMART_CLASS_VERSION,
_e_spectrum_smart_resize, _e_spectrum_smart_add,
_e_spectrum_smart_show, _e_spectrum_smart_del,
_e_spectrum_smart_hide, _e_spectrum_smart_move,
_e_spectrum_smart_color_set, _e_spectrum_smart_resize,
_e_spectrum_smart_clip_set, _e_spectrum_smart_show,
_e_spectrum_smart_clip_unset, _e_spectrum_smart_hide,
NULL); _e_spectrum_smart_color_set,
_e_spectrum_smart_clip_set,
_e_spectrum_smart_clip_unset,
NULL
};
_e_spectrum_smart = evas_smart_class_new(&sc);
}
} }
void void

View File

@ -825,18 +825,24 @@ static void
_e_table_smart_init(void) _e_table_smart_init(void)
{ {
if (_e_smart) return; if (_e_smart) return;
_e_smart = evas_smart_new("e_table", {
_e_table_smart_add, static const Evas_Smart_Class sc =
_e_table_smart_del, {
NULL, NULL, NULL, NULL, NULL, "e_table",
_e_table_smart_move, EVAS_SMART_CLASS_VERSION,
_e_table_smart_resize, _e_table_smart_add,
_e_table_smart_show, _e_table_smart_del,
_e_table_smart_hide, _e_table_smart_move,
_e_table_smart_color_set, _e_table_smart_resize,
_e_table_smart_clip_set, _e_table_smart_show,
_e_table_smart_clip_unset, _e_table_smart_hide,
NULL); _e_table_smart_color_set,
_e_table_smart_clip_set,
_e_table_smart_clip_unset,
NULL
};
_e_smart = evas_smart_class_new(&sc);
}
} }
static void static void

View File

@ -549,16 +549,23 @@ _e_smart_clip_unset(Evas_Object * obj)
static void static void
_e_smart_init(void) _e_smart_init(void)
{ {
if (_e_smart) if (_e_smart) return;
return; {
_e_smart = evas_smart_new(SMART_NAME, static const Evas_Smart_Class sc =
_e_smart_add, {
_e_smart_del, SMART_NAME,
NULL, NULL, NULL, NULL, NULL, EVAS_SMART_CLASS_VERSION,
_e_smart_move, _e_smart_add,
_e_smart_resize, _e_smart_del,
_e_smart_show, _e_smart_move,
_e_smart_hide, _e_smart_resize,
_e_smart_color_set, _e_smart_show,
_e_smart_clip_set, _e_smart_clip_unset, NULL); _e_smart_hide,
_e_smart_color_set,
_e_smart_clip_set,
_e_smart_clip_unset,
NULL
};
_e_smart = evas_smart_class_new(&sc);
}
} }

View File

@ -563,16 +563,22 @@ static void
_e_smart_init(void) _e_smart_init(void)
{ {
if (_e_smart) return; if (_e_smart) return;
_e_smart = evas_smart_new(SMART_NAME, {
_e_smart_add, static const Evas_Smart_Class sc =
_e_smart_del, {
NULL, NULL, NULL, NULL, NULL, SMART_NAME,
_e_smart_move, EVAS_SMART_CLASS_VERSION,
_e_smart_resize, _e_smart_add,
_e_smart_show, _e_smart_del,
_e_smart_hide, _e_smart_move,
_e_smart_color_set, _e_smart_resize,
_e_smart_clip_set, _e_smart_show,
_e_smart_clip_unset, _e_smart_hide,
NULL); _e_smart_color_set,
_e_smart_clip_set,
_e_smart_clip_unset,
NULL
};
_e_smart = evas_smart_class_new(&sc);
}
} }