forked from enlightenment/enlightenment
Leaks-be-gone. Thanks metrics, rephorm :)
SVN revision: 26664
This commit is contained in:
parent
811e934e8f
commit
56e0793198
|
@ -49,6 +49,7 @@ static void _e_int_menus_clients_icon_cb (void *data, E_Menu *m, E_Menu_Item
|
|||
static void _e_int_menus_clients_cleanup_cb (void *data, E_Menu *m, E_Menu_Item *mi);
|
||||
static void _e_int_menus_virtuals_pre_cb (void *data, E_Menu *m);
|
||||
static void _e_int_menus_virtuals_item_cb (void *data, E_Menu *m, E_Menu_Item *mi);
|
||||
static void _e_int_menus_virtuals_free_hook (void *obj);
|
||||
static void _e_int_menus_themes_about (void *data, E_Menu *m, E_Menu_Item *mi);
|
||||
static void _e_int_menus_lost_clients_pre_cb (void *data, E_Menu *m);
|
||||
static void _e_int_menus_lost_clients_free_hook (void *obj);
|
||||
|
@ -61,8 +62,10 @@ static void _e_int_menus_shelves_pre_cb (void *data, E_Menu *m);
|
|||
static void _e_int_menus_shelves_item_cb (void *data, E_Menu *m, E_Menu_Item *mi);
|
||||
static void _e_int_menus_shelves_add_cb (void *data, E_Menu *m, E_Menu_Item *mi);
|
||||
static void _e_int_menus_shelves_del_cb (void *data, E_Menu *m, E_Menu_Item *mi);
|
||||
static void _e_int_menus_shelves_free_hook (void *obj);
|
||||
static void _e_int_menus_main_showhide (void *data, E_Menu *m, E_Menu_Item *mi);
|
||||
static void _e_int_menus_desk_item_cb (void *data, E_Menu *m, E_Menu_Item *mi);
|
||||
static void _e_int_menus_desks_free_hook (void *obj);
|
||||
|
||||
/* local subsystem globals */
|
||||
static Evas_Hash *_e_int_menus_augmentation = NULL;
|
||||
|
@ -187,13 +190,15 @@ e_int_menus_desktops_new(void)
|
|||
e_menu_item_label_set(mi, _("Virtual"));
|
||||
e_util_menu_item_edje_icon_set(mi, "enlightenment/desktops");
|
||||
e_menu_pre_activate_callback_set(subm, _e_int_menus_virtuals_pre_cb, NULL);
|
||||
e_object_free_attach_func_set(E_OBJECT(subm), _e_int_menus_virtuals_free_hook);
|
||||
e_menu_item_submenu_set(mi, subm);
|
||||
|
||||
subm = e_int_menus_shelves_new();
|
||||
subm = e_menu_new();
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_label_set(mi, _("Shelves"));
|
||||
e_util_menu_item_edje_icon_set(mi, "enlightenment/shelf");
|
||||
e_menu_pre_activate_callback_set(subm, _e_int_menus_shelves_pre_cb, NULL);
|
||||
e_object_free_attach_func_set(E_OBJECT(subm), _e_int_menus_shelves_free_hook);
|
||||
e_menu_item_submenu_set(mi, subm);
|
||||
|
||||
mi = e_menu_item_new(m);
|
||||
|
@ -203,7 +208,8 @@ e_int_menus_desktops_new(void)
|
|||
e_menu_item_label_set(mi, _("Show/Hide All Windows"));
|
||||
e_util_menu_item_edje_icon_set(mi, "enlightenment/showhide");
|
||||
e_menu_item_callback_set(mi, _e_int_menus_main_showhide, NULL);
|
||||
|
||||
|
||||
e_object_free_attach_func_set(E_OBJECT(m), _e_int_menus_desks_free_hook);
|
||||
return m;
|
||||
}
|
||||
|
||||
|
@ -264,16 +270,6 @@ e_int_menus_lost_clients_new(void)
|
|||
return m;
|
||||
}
|
||||
|
||||
EAPI E_Menu *
|
||||
e_int_menus_shelves_new(void)
|
||||
{
|
||||
E_Menu *m;
|
||||
|
||||
m = e_menu_new();
|
||||
e_menu_pre_activate_callback_set(m, _e_int_menus_shelves_pre_cb, NULL);
|
||||
return m;
|
||||
}
|
||||
|
||||
EAPI E_Menu *
|
||||
e_int_menus_sys_new(void)
|
||||
{
|
||||
|
@ -333,6 +329,54 @@ e_int_menus_menu_augmentation_del(const char *menu, E_Int_Menu_Augmentation *mau
|
|||
}
|
||||
|
||||
/* local subsystem functions */
|
||||
static void
|
||||
_e_int_menus_desks_free_hook(void *obj)
|
||||
{
|
||||
E_Menu *m;
|
||||
Evas_List *l;
|
||||
|
||||
m = obj;
|
||||
for (l = m->items; l; l = l->next)
|
||||
{
|
||||
E_Menu_Item *mi;
|
||||
|
||||
mi = l->data;
|
||||
if (mi->submenu) e_object_del(E_OBJECT(mi->submenu));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_e_int_menus_virtuals_free_hook(void *obj)
|
||||
{
|
||||
E_Menu *m;
|
||||
Evas_List *l;
|
||||
|
||||
m = obj;
|
||||
for (l = m->items; l; l = l->next)
|
||||
{
|
||||
E_Menu_Item *mi;
|
||||
|
||||
mi = l->data;
|
||||
if (mi->submenu) e_object_del(E_OBJECT(mi->submenu));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_e_int_menus_shelves_free_hook(void *obj)
|
||||
{
|
||||
E_Menu *m;
|
||||
Evas_List *l;
|
||||
|
||||
m = obj;
|
||||
for (l = m->items; l; l = l->next)
|
||||
{
|
||||
E_Menu_Item *mi;
|
||||
|
||||
mi = l->data;
|
||||
if (mi->submenu) e_object_del(E_OBJECT(mi->submenu));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_e_int_menus_main_del_hook(void *obj)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue