forked from enlightenment/enlightenment
Add Change Wallpaper item in Desktop menu.
Also re-arrange Desktop menu to be more frequently used order
This commit is contained in:
parent
d81818b309
commit
3c7c797e14
|
@ -86,6 +86,12 @@ _e_int_menus_augmentation_find(const char *key)
|
|||
return eina_hash_find(_e_int_menus_augmentation, key);
|
||||
}
|
||||
|
||||
static void
|
||||
_e_int_menus_wallpaper_cb()
|
||||
{
|
||||
e_configure_registry_call("appearance/wallpaper", NULL, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
_e_int_menus_bryce_cb()
|
||||
{
|
||||
|
@ -344,6 +350,11 @@ e_int_menus_desktops_new(void)
|
|||
e_menu_pre_activate_callback_set(subm, _e_int_menus_shelves_pre_cb, NULL);
|
||||
e_menu_item_submenu_set(mi, subm);
|
||||
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_label_set(mi, _("Change Wallpaper"));
|
||||
e_util_menu_item_theme_icon_set(mi, "preferences-desktop-wallpaper");
|
||||
e_menu_item_callback_set(mi, _e_int_menus_wallpaper_cb, NULL);
|
||||
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_label_set(mi, _("Add Bryce"));
|
||||
e_util_menu_item_theme_icon_set(mi, "list-add");
|
||||
|
|
|
@ -170,22 +170,35 @@ _gadman_desktop_menu_cb(void *data EINA_UNUSED, E_Menu *m, E_Menu_Item *mi EINA_
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_gadman_desktop_menu(void *d EINA_UNUSED, E_Menu *m, void *icon)
|
||||
static E_Menu_Item *
|
||||
_gadman_menu_insert_get(E_Menu *menu)
|
||||
{
|
||||
E_Menu_Item *mi;
|
||||
E_Menu_Item *mi, *prev_mi = NULL;
|
||||
Eina_List *l;
|
||||
|
||||
mi = eina_list_data_get(m->items);
|
||||
EINA_LIST_FOREACH(menu->items, l, mi)
|
||||
{
|
||||
if (!strcmp(mi->label, _("Change Wallpaper")))
|
||||
return prev_mi;
|
||||
prev_mi = mi;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
_gadman_desktop_menu(void *d EINA_UNUSED, E_Menu *m, void *icon EINA_UNUSED)
|
||||
{
|
||||
E_Menu_Item *mi, *pos;
|
||||
|
||||
pos = _gadman_menu_insert_get(m);
|
||||
/* don't add twice */
|
||||
if (mi->cb.func == _gadman_desktop_menu_cb) return;
|
||||
if (pos->cb.func == _gadman_desktop_menu_cb) return;
|
||||
|
||||
mi = e_menu_item_new_relative(m, NULL);
|
||||
mi = e_menu_item_new_relative(m, pos);
|
||||
e_menu_item_label_set(mi, _("Change Gadgets"));
|
||||
e_menu_item_icon_edje_set(mi, icon, "icon");
|
||||
e_util_menu_item_theme_icon_set(mi, "preferences-desktop-shelf");
|
||||
e_menu_item_callback_set(mi, _gadman_desktop_menu_cb, NULL);
|
||||
|
||||
mi = e_menu_item_new_relative(m, mi);
|
||||
e_menu_item_separator_set(mi, 1);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue