add "Flip To Previous Desktop" action

ticket #1717, patch originally by Robert David <robert.david.public@gmail.com>


SVN revision: 79148
devs/princeamd/enlightenment-0.17-elive
Mike Blumenkrantz 10 years ago
parent 5231b6c6aa
commit 31b2e6dcf9
  1. 1
      AUTHORS
  2. 15
      src/bin/e_actions.c
  3. 2
      src/bin/e_desk.c
  4. 1
      src/bin/e_zone.h

@ -38,3 +38,4 @@ Maxime Villard <rustyBSD@gmx.fr>
Jeremy Zurcher <jeremy@asynk.ch>
Shinwoo Kim <kimcinoo@gmail.com>
Daniel Juyung Seo (SeoZ) <seojuyung2@gmail.com>
Robert David <robert.david.public@gmail.com>

@ -1438,6 +1438,16 @@ ACT_FN_GO(desk_flip_to, )
}
}
/***************************************************************************/
ACT_FN_GO(desk_flip_prev, __UNUSED__)
{
E_Zone *zone;
zone = _e_actions_zone_get(obj);
if (!zone) return;
e_zone_desk_flip_to(zone, zone->desk_x_prev, zone->desk_y_prev);
}
/***************************************************************************/
#define ACT_FLIP_LEFT(zone) ((e_config->desk_flip_wrap && ((zone)->desk_x_count > 1)) || ((zone)->desk_x_current > 0))
#define ACT_FLIP_RIGHT(zone) ((e_config->desk_flip_wrap && ((zone)->desk_x_count > 1)) || (((zone)->desk_x_current + 1) < (zone)->desk_x_count))
@ -3107,6 +3117,11 @@ e_actions_init(void)
"desk_flip_by", NULL,
"syntax: X-offset Y-offset, example: -1 0", 1);
/* desk_flip_prev */
ACT_GO(desk_flip_prev);
e_action_predef_name_set(N_("Desktop"), N_("Flip To Previous Desktop"),
"desk_flip_prev", NULL, NULL, 0);
/* desk_deskshow_toggle */
ACT_GO(desk_deskshow_toggle);
e_action_predef_name_set(N_("Desktop"), N_("Show The Desktop"),

@ -251,6 +251,8 @@ e_desk_show(E_Desk *desk)
}
}
desk->zone->desk_x_prev = desk->zone->desk_x_current;
desk->zone->desk_y_prev = desk->zone->desk_y_current;
desk->zone->desk_x_current = desk->x;
desk->zone->desk_y_current = desk->y;
desk->visible = 1;

@ -49,6 +49,7 @@ struct _E_Zone
int desk_x_count, desk_y_count;
int desk_x_current, desk_y_current;
int desk_x_prev, desk_y_prev;
E_Desk **desks;
Eina_List *handlers;

Loading…
Cancel
Save