summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-11-12 10:49:28 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-11-12 10:49:28 +0000
commit31b2e6dcf99c582eb9fcb9cd7910d90ad1476d7a (patch)
tree4f272c515d494347cf7d6de2d7e52da132d66d52
parent5231b6c6aa919cd631b33944185da08ba1e36fd3 (diff)
add "Flip To Previous Desktop" action
ticket #1717, patch originally by Robert David <robert.david.public@gmail.com> SVN revision: 79148
-rw-r--r--AUTHORS1
-rw-r--r--src/bin/e_actions.c15
-rw-r--r--src/bin/e_desk.c2
-rw-r--r--src/bin/e_zone.h1
4 files changed, 19 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
index 429e2283d..c1c23934a 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -38,3 +38,4 @@ Maxime Villard <rustyBSD@gmx.fr>
38Jeremy Zurcher <jeremy@asynk.ch> 38Jeremy Zurcher <jeremy@asynk.ch>
39Shinwoo Kim <kimcinoo@gmail.com> 39Shinwoo Kim <kimcinoo@gmail.com>
40Daniel Juyung Seo (SeoZ) <seojuyung2@gmail.com> 40Daniel Juyung Seo (SeoZ) <seojuyung2@gmail.com>
41Robert David <robert.david.public@gmail.com>
diff --git a/src/bin/e_actions.c b/src/bin/e_actions.c
index 369c447a8..b157f23ff 100644
--- a/src/bin/e_actions.c
+++ b/src/bin/e_actions.c
@@ -1439,6 +1439,16 @@ ACT_FN_GO(desk_flip_to, )
1439} 1439}
1440 1440
1441/***************************************************************************/ 1441/***************************************************************************/
1442ACT_FN_GO(desk_flip_prev, __UNUSED__)
1443{
1444 E_Zone *zone;
1445
1446 zone = _e_actions_zone_get(obj);
1447 if (!zone) return;
1448 e_zone_desk_flip_to(zone, zone->desk_x_prev, zone->desk_y_prev);
1449}
1450
1451/***************************************************************************/
1442#define ACT_FLIP_LEFT(zone) ((e_config->desk_flip_wrap && ((zone)->desk_x_count > 1)) || ((zone)->desk_x_current > 0)) 1452#define ACT_FLIP_LEFT(zone) ((e_config->desk_flip_wrap && ((zone)->desk_x_count > 1)) || ((zone)->desk_x_current > 0))
1443#define ACT_FLIP_RIGHT(zone) ((e_config->desk_flip_wrap && ((zone)->desk_x_count > 1)) || (((zone)->desk_x_current + 1) < (zone)->desk_x_count)) 1453#define ACT_FLIP_RIGHT(zone) ((e_config->desk_flip_wrap && ((zone)->desk_x_count > 1)) || (((zone)->desk_x_current + 1) < (zone)->desk_x_count))
1444#define ACT_FLIP_UP(zone) ((e_config->desk_flip_wrap && ((zone)->desk_y_count > 1)) || ((zone)->desk_y_current > 0)) 1454#define ACT_FLIP_UP(zone) ((e_config->desk_flip_wrap && ((zone)->desk_y_count > 1)) || ((zone)->desk_y_current > 0))
@@ -3107,6 +3117,11 @@ e_actions_init(void)
3107 "desk_flip_by", NULL, 3117 "desk_flip_by", NULL,
3108 "syntax: X-offset Y-offset, example: -1 0", 1); 3118 "syntax: X-offset Y-offset, example: -1 0", 1);
3109 3119
3120 /* desk_flip_prev */
3121 ACT_GO(desk_flip_prev);
3122 e_action_predef_name_set(N_("Desktop"), N_("Flip To Previous Desktop"),
3123 "desk_flip_prev", NULL, NULL, 0);
3124
3110 /* desk_deskshow_toggle */ 3125 /* desk_deskshow_toggle */
3111 ACT_GO(desk_deskshow_toggle); 3126 ACT_GO(desk_deskshow_toggle);
3112 e_action_predef_name_set(N_("Desktop"), N_("Show The Desktop"), 3127 e_action_predef_name_set(N_("Desktop"), N_("Show The Desktop"),
diff --git a/src/bin/e_desk.c b/src/bin/e_desk.c
index a5948457b..6b91f1bcd 100644
--- a/src/bin/e_desk.c
+++ b/src/bin/e_desk.c
@@ -251,6 +251,8 @@ e_desk_show(E_Desk *desk)
251 } 251 }
252 } 252 }
253 253
254 desk->zone->desk_x_prev = desk->zone->desk_x_current;
255 desk->zone->desk_y_prev = desk->zone->desk_y_current;
254 desk->zone->desk_x_current = desk->x; 256 desk->zone->desk_x_current = desk->x;
255 desk->zone->desk_y_current = desk->y; 257 desk->zone->desk_y_current = desk->y;
256 desk->visible = 1; 258 desk->visible = 1;
diff --git a/src/bin/e_zone.h b/src/bin/e_zone.h
index 70da4d3c8..e56121e9b 100644
--- a/src/bin/e_zone.h
+++ b/src/bin/e_zone.h
@@ -49,6 +49,7 @@ struct _E_Zone
49 49
50 int desk_x_count, desk_y_count; 50 int desk_x_count, desk_y_count;
51 int desk_x_current, desk_y_current; 51 int desk_x_current, desk_y_current;
52 int desk_x_prev, desk_y_prev;
52 E_Desk **desks; 53 E_Desk **desks;
53 54
54 Eina_List *handlers; 55 Eina_List *handlers;