Am 25.11.2014 um 01:13 schrieb Leif Middelschulte <leif.middelschu...@gmail.com>: > > Hi, >> Am 24.11.2014 um 22:44 schrieb Davide Andreoli <d...@gurumeditation.it >> <mailto:d...@gurumeditation.it>>: >> >> 2014-11-24 19:33 GMT+01:00 Leif Middelschulte <leif.middelschu...@gmail.com >> <mailto:leif.middelschu...@gmail.com>> >> : >> >>> discomfitor pushed a commit to branch master. >>> >>> >>> http://git.enlightenment.org/core/enlightenment.git/commit/?id=6a92676cf805eeae0df1c90dc79530102c8d7fd2 >>> >>> <http://git.enlightenment.org/core/enlightenment.git/commit/?id=6a92676cf805eeae0df1c90dc79530102c8d7fd2> >>> >>> commit 6a92676cf805eeae0df1c90dc79530102c8d7fd2 >>> Author: Leif Middelschulte <leif.middelschu...@gmail.com> >>> Date: Mon Nov 24 13:33:02 2014 -0500 >>> >>> Implement FreeDesktop .deskop Additional Actions menu >>> >>> Summary: >>> This implements the additional actions as specified in >>> FreeDesktop.org's desktop entry specification 1.1. >>> This version is implemented by Efreet 1.12 >>> >>> The additional actions are presented as right-click >>> menu entries. >>> >> >> Fantastic feature, really, I love it!! >> Included yet in my media center :) > glad you like it too :) >> >> But I'm not sure the items are placed correctly inside the menu, see the >> shot: >> http://www.imgbin.org/index.php?page=image&id=21048 >> <http://www.imgbin.org/index.php?page=image&id=21048> >> >> are the Additionals in the right position? why a separator is on the bottom? > you’re right. The code is a bit odd. The shelf seems to shove menu items into > a module sub menu. The code works around it but, as you pointed out, still > has flaws (the separator and placement underneath the symbol entry). > Leftovers from the first attempt, when I didn’t know about the „weird“ > behavior. > Anyway, fixed and waiting for review: https://phab.enlightenment.org/D1694 > <https://phab.enlightenment.org/D1694>I updated the Differential revision to > only prepend once and append relatively subsequently so the code is easier > readable. Afaics it’s fine now. > >> >> >>> >>> @feature >>> >>> Reviewers: zmike >>> >>> Subscribers: tasn, q66, cedric >>> >>> Differential Revision: https://phab.enlightenment.org/D1657 >>> <https://phab.enlightenment.org/D1657> >>> --- >>> src/modules/ibar/e_mod_main.c | 24 ++++++++++++++++++++++++ >>> 1 file changed, 24 insertions(+) >>> >>> diff --git a/src/modules/ibar/e_mod_main.c b/src/modules/ibar/e_mod_main.c >>> index 3f7f8a0..e583658 100644 >>> --- a/src/modules/ibar/e_mod_main.c >>> +++ b/src/modules/ibar/e_mod_main.c >>> @@ -111,6 +111,7 @@ static void _ibar_sep_create(IBar *b); >>> static void _ibar_icon_signal_emit(IBar_Icon *ic, char *sig, char >>> *src); >>> static void _ibar_cb_app_change(void *data, E_Order *eo); >>> static void _ibar_cb_obj_moveresize(void *data, Evas *e, >>> Evas_Object *obj, void *event_info); >>> +static void _ibar_cb_menu_icon_action_exec(void *data, E_Menu *m, >>> E_Menu_Item *mi); >>> static void _ibar_cb_menu_icon_new(void *data, E_Menu *m, >>> E_Menu_Item *mi); >>> static void _ibar_cb_menu_icon_add(void *data, E_Menu *m, >>> E_Menu_Item *mi); >>> static void _ibar_cb_menu_icon_properties(void *data, E_Menu *m, >>> E_Menu_Item *mi); >>> @@ -1043,6 +1044,13 @@ _ibar_cb_obj_moveresize(void *data, Evas *e >>> __UNUSED__, Evas_Object *obj __UNUSE >>> } >>> >>> static void >>> +_ibar_cb_menu_icon_action_exec(void *data, E_Menu *m __UNUSED__, >>> E_Menu_Item *mi __UNUSED__) >>> +{ >>> + Efreet_Desktop_Action *action = (Efreet_Desktop_Action*)data; >>> + e_exec(NULL, NULL, action->exec, NULL, "ibar"); >>> +} >>> + >>> +static void >>> _ibar_cb_menu_icon_new(void *data __UNUSED__, E_Menu *m __UNUSED__, >>> E_Menu_Item *mi __UNUSED__) >>> { >>> if (!e_configure_registry_exists("applications/new_application")) >>> return; >>> @@ -1558,8 +1566,10 @@ _ibar_cb_icon_mouse_down(void *data, Evas *e >>> __UNUSED__, Evas_Object *obj __UNUS >>> } >>> else if (ev->button == 3) >>> { >>> + Eina_List *it; >>> E_Menu *m, *mo; >>> E_Menu_Item *mi; >>> + Efreet_Desktop_Action *action; >>> char buf[256]; >>> int cx, cy; >>> >>> @@ -1626,6 +1636,20 @@ _ibar_cb_icon_mouse_down(void *data, Evas *e >>> __UNUSED__, Evas_Object *obj __UNUS >>> mi); >>> e_menu_item_submenu_set(mi, mo); >>> e_object_unref(E_OBJECT(mo)); >>> + >>> + if (ic->app->actions) >>> + { >>> + EINA_LIST_FOREACH(ic->app->actions, it, action) >>> + { >>> + mi = e_menu_item_new_relative(m, mi); >>> + e_menu_item_label_set(mi, action->name); >>> + e_util_menu_item_theme_icon_set(mi, action->icon); >>> + e_menu_item_callback_set(mi, >>> _ibar_cb_menu_icon_action_exec, action); >>> + } >>> + mi = e_menu_item_new(m); >>> + e_menu_item_separator_set(mi, 1); >>> + } >>> + >>> e_gadcon_client_menu_set(ic->ibar->inst->gcc, m); >>> >>> e_gadcon_canvas_zone_geometry_get(ic->ibar->inst->gcc->gadcon, >>> >>> -- >>> >>> >>> >> ------------------------------------------------------------------------------ >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREE >> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk >> <http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk> >> _______________________________________________ >> enlightenment-devel mailing list >> enlightenment-devel@lists.sourceforge.net >> <mailto:enlightenment-devel@lists.sourceforge.net> >> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel >> <https://lists.sourceforge.net/lists/listinfo/enlightenment-devel>
signature.asc
Description: Message signed with OpenPGP using GPGMail
------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel