On Fri, Jul 9, 2010 at 7:34 AM, Enlightenment SVN
<[email protected]> wrote:
> Log:
> WinList: add a new functionality so that we can switch between windows of
> the same class.
>
> This is a major (and interesting) killer-feature of Gnome3, so let's
> shamelessly steal it.
Maybe now an alternative/complement to that: change to the next window
of a different class (ie: change to the next app).
And this is not gnome3, this is macos-x for almost 10 years :-)
>
> Author: illogict
> Date: 2010-07-09 03:34:20 -0700 (Fri, 09 Jul 2010)
> New Revision: 50154
>
> Modified:
> trunk/e/src/modules/winlist/e_mod_main.c
> trunk/e/src/modules/winlist/e_winlist.c
> trunk/e/src/modules/winlist/e_winlist.h
>
> Modified: trunk/e/src/modules/winlist/e_mod_main.c
> ===================================================================
> --- trunk/e/src/modules/winlist/e_mod_main.c 2010-07-09 10:27:56 UTC (rev
> 50153)
> +++ trunk/e/src/modules/winlist/e_mod_main.c 2010-07-09 10:34:20 UTC (rev
> 50154)
> @@ -35,6 +35,10 @@
> "next", NULL, 0);
> e_action_predef_name_set(_("Window : List"), _("Previous Window"),
> "winlist", "prev", NULL, 0);
> + e_action_predef_name_set(_("Window : List"), _("Next window of same
> class"), "winlist",
> + "class-next", NULL, 0);
> + e_action_predef_name_set(_("Window : List"), _("Previous window of
> same class"),
> + "winlist", "class-prev", NULL, 0);
> e_action_predef_name_set(_("Window : List"), _("Window on the Left"),
> "winlist", "left", NULL, 0);
> e_action_predef_name_set(_("Window : List"), _("Window Down"),
> @@ -56,6 +60,8 @@
> {
> e_action_predef_name_del(_("Window : List"), _("Previous Window"));
> e_action_predef_name_del(_("Window : List"), _("Next Window"));
> + e_action_predef_name_del(_("Window : List"), _("Previous window of
> same class"));
> + e_action_predef_name_del(_("Window : List"), _("Next window of same
> class"));
> e_action_predef_name_del(_("Window : List"), _("Window on the Left"));
> e_action_predef_name_del(_("Window : List"), _("Window Down"));
> e_action_predef_name_del(_("Window : List"), _("Window Up"));
> @@ -98,14 +104,24 @@
> {
> if (!strcmp(params, "next"))
> {
> - if (!e_winlist_show(zone))
> + if (!e_winlist_show(zone, EINA_FALSE))
> e_winlist_next();
> }
> else if (!strcmp(params, "prev"))
> {
> - if (!e_winlist_show(zone))
> + if (!e_winlist_show(zone, EINA_FALSE))
> e_winlist_prev();
> }
> + else if (!strcmp(params, "class-next"))
> + {
> + if (!e_winlist_show(zone, EINA_TRUE))
> + e_winlist_next();
> + }
> + else if (!strcmp(params, "class-prev"))
> + {
> + if (!e_winlist_show(zone, EINA_TRUE))
> + e_winlist_prev();
> + }
> else if (!strcmp(params, "left"))
> {
> e_winlist_left(zone);
> @@ -125,7 +141,7 @@
> }
> else
> {
> - if (!e_winlist_show(zone))
> + if (!e_winlist_show(zone, EINA_FALSE))
> e_winlist_next();
> }
> }
> @@ -154,18 +170,32 @@
> {
> if (!strcmp(params, "next"))
> {
> - if (e_winlist_show(zone))
> + if (e_winlist_show(zone, EINA_FALSE))
> e_winlist_modifiers_set(ev->modifiers);
> else
> e_winlist_next();
> }
> else if (!strcmp(params, "prev"))
> {
> - if (e_winlist_show(zone))
> + if (e_winlist_show(zone, EINA_FALSE))
> e_winlist_modifiers_set(ev->modifiers);
> else
> e_winlist_prev();
> }
> + else if (!strcmp(params, "class-next"))
> + {
> + if (e_winlist_show(zone, EINA_TRUE))
> + e_winlist_modifiers_set(ev->modifiers);
> + else
> + e_winlist_next();
> + }
> + else if (!strcmp(params, "class-prev"))
> + {
> + if (e_winlist_show(zone, EINA_TRUE))
> + e_winlist_modifiers_set(ev->modifiers);
> + else
> + e_winlist_prev();
> + }
> else if (!strcmp(params, "left"))
> {
> e_winlist_left(zone);
> @@ -185,7 +215,7 @@
> }
> else
> {
> - if (e_winlist_show(zone))
> + if (e_winlist_show(zone, EINA_FALSE))
> e_winlist_modifiers_set(ev->modifiers);
> else
> e_winlist_next();
> @@ -216,18 +246,32 @@
> {
> if (!strcmp(params, "next"))
> {
> - if (e_winlist_show(zone))
> + if (e_winlist_show(zone, EINA_FALSE))
> e_winlist_modifiers_set(ev->modifiers);
> else
> e_winlist_next();
> }
> else if (!strcmp(params, "prev"))
> {
> - if (e_winlist_show(zone))
> + if (e_winlist_show(zone, EINA_FALSE))
> e_winlist_modifiers_set(ev->modifiers);
> else
> e_winlist_prev();
> }
> + else if (!strcmp(params, "class-next"))
> + {
> + if (e_winlist_show(zone, EINA_TRUE))
> + e_winlist_modifiers_set(ev->modifiers);
> + else
> + e_winlist_next();
> + }
> + else if (!strcmp(params, "class-prev"))
> + {
> + if (e_winlist_show(zone, EINA_TRUE))
> + e_winlist_modifiers_set(ev->modifiers);
> + else
> + e_winlist_prev();
> + }
> else if (!strcmp(params, "left"))
> {
> e_winlist_left(zone);
> @@ -247,7 +291,7 @@
> }
> else
> {
> - if (e_winlist_show(zone))
> + if (e_winlist_show(zone, EINA_FALSE))
> e_winlist_modifiers_set(ev->modifiers);
> else
> e_winlist_next();
>
> Modified: trunk/e/src/modules/winlist/e_winlist.c
> ===================================================================
> --- trunk/e/src/modules/winlist/e_winlist.c 2010-07-09 10:27:56 UTC (rev
> 50153)
> +++ trunk/e/src/modules/winlist/e_winlist.c 2010-07-09 10:34:20 UTC (rev
> 50154)
> @@ -83,7 +83,7 @@
> }
>
> int
> -e_winlist_show(E_Zone *zone)
> +e_winlist_show(E_Zone *zone, Eina_Bool same_class)
> {
> int x, y, w, h;
> Evas_Object *o;
> @@ -149,6 +149,8 @@
> edje_object_part_text_set(bg_object, "e.text.title", _("Select a window"));
> evas_object_show(o);
>
> + last_border = e_border_focused_get();
> +
> desk = e_desk_current_get(winlist->zone);
> e_box_freeze(list_object);
> for (l = e_border_focus_stack_get(); l; l = l->next)
> @@ -156,7 +158,10 @@
> E_Border *bd;
>
> bd = l->data;
> - _e_winlist_border_add(bd, winlist->zone, desk);
> + if ((!same_class) ||
> + (!strcmp((const char*) last_border->client.icccm.class,
> + (const char*) bd->client.icccm.class)))
> + _e_winlist_border_add(bd, winlist->zone, desk);
> }
> e_box_thaw(list_object);
>
> @@ -172,7 +177,6 @@
> if (e_config->winlist_warp_while_selecting)
> ecore_x_pointer_xy_get(winlist->zone->container->win,
> &last_pointer_x, &last_pointer_y);
> - last_border = e_border_focused_get();
> if (last_border)
> {
> if (!last_border->lock_focus_out)
>
> Modified: trunk/e/src/modules/winlist/e_winlist.h
> ===================================================================
> --- trunk/e/src/modules/winlist/e_winlist.h 2010-07-09 10:27:56 UTC (rev
> 50153)
> +++ trunk/e/src/modules/winlist/e_winlist.h 2010-07-09 10:34:20 UTC (rev
> 50154)
> @@ -10,7 +10,7 @@
> int e_winlist_init(void);
> int e_winlist_shutdown(void);
>
> -int e_winlist_show(E_Zone *zone);
> +int e_winlist_show(E_Zone *zone, Eina_Bool same_class);
> void e_winlist_hide(void);
> void e_winlist_next(void);
> void e_winlist_prev(void);
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> enlightenment-svn mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
>
--
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: [email protected]
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel