Enlightenment CVS committal
Author : devilhorns
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_actions.c e_border.c e_border.h e_int_border_menu.c
Log Message:
Ravenlock's pin-cleanup and pin-action patches to address concerns about a
new border property versus reusing what exists. This now eliminates using a
new border property in favor of re-using the 3 properties that exist and
also adds a key/mouse binding.
Some formatting issues I found in e_border and e_action while
looking/testing this.
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_actions.c,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -3 -r1.90 -r1.91
--- e_actions.c 10 Feb 2007 17:23:05 -0000 1.90
+++ e_actions.c 27 Feb 2007 16:16:03 -0000 1.91
@@ -580,17 +580,25 @@
{
if (v == 1)
{
- if (!strcmp(buf, "up")) e_border_shade(bd,
E_DIRECTION_UP);
- else if (!strcmp(buf, "down")) e_border_shade(bd,
E_DIRECTION_DOWN);
- else if (!strcmp(buf, "left")) e_border_shade(bd,
E_DIRECTION_LEFT);
- else if (!strcmp(buf, "right")) e_border_shade(bd,
E_DIRECTION_RIGHT);
+ if (!strcmp(buf, "up"))
+ e_border_shade(bd, E_DIRECTION_UP);
+ else if (!strcmp(buf, "down"))
+ e_border_shade(bd, E_DIRECTION_DOWN);
+ else if (!strcmp(buf, "left"))
+ e_border_shade(bd, E_DIRECTION_LEFT);
+ else if (!strcmp(buf, "right"))
+ e_border_shade(bd, E_DIRECTION_RIGHT);
}
else if (v == 0)
{
- if (!strcmp(buf, "up")) e_border_unshade(bd,
E_DIRECTION_UP);
- else if (!strcmp(buf, "down")) e_border_unshade(bd,
E_DIRECTION_DOWN);
- else if (!strcmp(buf, "left")) e_border_unshade(bd,
E_DIRECTION_LEFT);
- else if (!strcmp(buf, "right")) e_border_unshade(bd,
E_DIRECTION_RIGHT);
+ if (!strcmp(buf, "up"))
+ e_border_unshade(bd, E_DIRECTION_UP);
+ else if (!strcmp(buf, "down"))
+ e_border_unshade(bd, E_DIRECTION_DOWN);
+ else if (!strcmp(buf, "left"))
+ e_border_unshade(bd, E_DIRECTION_LEFT);
+ else if (!strcmp(buf, "right"))
+ e_border_unshade(bd, E_DIRECTION_RIGHT);
}
}
}
@@ -600,7 +608,8 @@
/***************************************************************************/
ACT_FN_GO(window_borderless_toggle)
{
- if ((!obj) || (obj->type != E_BORDER_TYPE)) obj =
E_OBJECT(e_border_focused_get());
+ if ((!obj) || (obj->type != E_BORDER_TYPE))
+ obj = E_OBJECT(e_border_focused_get());
if (!obj) return;
if (!((E_Border *)obj)->lock_border)
{
@@ -617,6 +626,26 @@
}
}
+ /***************************************************************************/
+ACT_FN_GO(window_pinned_toggle)
+{
+ if ((!obj) || (obj->type != E_BORDER_TYPE))
+ obj = E_OBJECT(e_border_focused_get());
+ if (!obj) return;
+ if (!((E_Border *)obj)->lock_border)
+ {
+ E_Border *bd;
+
+ bd = (E_Border *)obj;
+
+ if ((bd->client.netwm.state.stacking == E_STACKING_BELOW) &&
+ (bd->user_skip_winlist) && (bd->borderless))
+ e_border_pinned_set(bd, 0);
+ else
+ e_border_pinned_set(bd, 1);
+ }
+}
+
/***************************************************************************/
ACT_FN_GO(window_move_by)
{
@@ -630,22 +659,23 @@
if (params)
{
int dx, dy;
-
+
if (sscanf(params, "%i %i", &dx, &dy) == 2)
{
E_Border *bd;
-
+
bd = (E_Border *)obj;
-
+
e_border_move(bd, bd->x + dx, bd->y + dy);
-
+
if (e_config->focus_policy != E_FOCUS_CLICK)
ecore_x_pointer_warp(bd->zone->container->win,
bd->x + (bd->w / 2),
bd->y + (bd->h / 2));
- }
+ }
}
}
+
/***************************************************************************/
ACT_FN_GO(window_move_to)
{
@@ -721,8 +751,7 @@
if (e_config->focus_policy != E_FOCUS_CLICK)
ecore_x_pointer_warp(bd->zone->container->win,
- bd->x + (dw / 2),
- bd->y + (dh / 2));
+ bd->x + (dw / 2), bd->y + (dh / 2));
}
}
}
@@ -805,8 +834,7 @@
if (e_config->focus_policy != E_FOCUS_CLICK)
ecore_x_pointer_warp(bd->zone->container->win,
- bd->x + (bd->w / 2),
- bd->y + (bd->h / 2));
+ bd->x + (bd->w / 2), bd->y + (bd->h / 2));
}
}
}
@@ -873,13 +901,9 @@
}
while (to_y >= bd->zone->desk_y_count)
- {
- to_y -= bd->zone->desk_y_count;
- }
+ to_y -= bd->zone->desk_y_count;
while (to_y < 0)
- {
- to_y += bd->zone->desk_y_count;
- }
+ to_y += bd->zone->desk_y_count;
}
if (desk)
@@ -1851,7 +1875,8 @@
E_Action *act;
ACT_GO(window_move);
- e_action_predef_name_set(_("Window : Actions"), _("Move"), "window_move",
NULL, NULL, 0);
+ e_action_predef_name_set(_("Window : Actions"), _("Move"),
+ "window_move", NULL, NULL, 0);
ACT_GO_MOUSE(window_move);
ACT_GO_SIGNAL(window_move);
@@ -1860,7 +1885,8 @@
/* window_resize */
ACT_GO(window_resize);
- e_action_predef_name_set(_("Window : Actions"), _("Resize"),
"window_resize", NULL, NULL, 0);
+ e_action_predef_name_set(_("Window : Actions"), _("Resize"),
+ "window_resize", NULL, NULL, 0);
ACT_GO_MOUSE(window_resize);
ACT_GO_SIGNAL(window_resize);
@@ -1869,263 +1895,308 @@
/* window_menu */
ACT_GO(window_menu);
- e_action_predef_name_set(_("Menu"), _("Window Menu"), "window_menu", NULL,
NULL, 0);
+ e_action_predef_name_set(_("Menu"), _("Window Menu"),
+ "window_menu", NULL, NULL, 0);
ACT_GO_MOUSE(window_menu);
ACT_GO_KEY(window_menu);
/* window_raise */
ACT_GO(window_raise);
- e_action_predef_name_set(_("Window : Actions"), _("Raise"), "window_raise",
NULL, NULL, 0);
+ e_action_predef_name_set(_("Window : Actions"), _("Raise"),
+ "window_raise", NULL, NULL, 0);
/* window_lower */
ACT_GO(window_lower);
- e_action_predef_name_set(_("Window : Actions"), _("Lower"), "window_lower",
NULL, NULL, 0);
+ e_action_predef_name_set(_("Window : Actions"), _("Lower"),
+ "window_lower", NULL, NULL, 0);
/* window_close */
ACT_GO(window_close);
- e_action_predef_name_set(_("Window : Actions"), _("Close"), "window_close",
NULL, NULL, 0);
+ e_action_predef_name_set(_("Window : Actions"), _("Close"),
+ "window_close", NULL, NULL, 0);
/* window_kill */
ACT_GO(window_kill);
- e_action_predef_name_set(_("Window : Actions"), _("Kill"), "window_kill",
NULL, NULL, 0);
+ e_action_predef_name_set(_("Window : Actions"), _("Kill"),
+ "window_kill", NULL, NULL, 0);
/* window_sticky_toggle */
ACT_GO(window_sticky_toggle);
- e_action_predef_name_set(_("Window : State"), _("Sticky Mode Toggle"),
"window_sticky_toggle",
- NULL, NULL, 0);
+ e_action_predef_name_set(_("Window : State"), _("Sticky Mode Toggle"),
+ "window_sticky_toggle", NULL, NULL, 0);
ACT_GO(window_sticky);
/* window_iconic_toggle */
ACT_GO(window_iconic_toggle);
- e_action_predef_name_set(_("Window : State"), _("Iconic Mode Toggle"),
"window_iconic_toggle",
- NULL, NULL, 0);
+ e_action_predef_name_set(_("Window : State"), _("Iconic Mode Toggle"),
+ "window_iconic_toggle", NULL, NULL, 0);
ACT_GO(window_iconic);
/* window_fullscreen_toggle */
ACT_GO(window_fullscreen_toggle);
e_action_predef_name_set(_("Window : State"), _("Fullscreen Mode Toggle"),
- "window_fullscreen_toggle", NULL, NULL, 0);
+ "window_fullscreen_toggle", NULL, NULL, 0);
ACT_GO(window_fullscreen);
/* window_maximized_toggle */
ACT_GO(window_maximized_toggle);
- e_action_predef_name_set(_("Window : State"), _("Maximize"),
"window_maximized_toggle",
- NULL, NULL, 0);
+ e_action_predef_name_set(_("Window : State"), _("Maximize"),
+ "window_maximized_toggle", NULL, NULL, 0);
e_action_predef_name_set(_("Window : State"), _("Maximize Vertically"),
- "window_maximized_toggle", "default vertical", NULL, 0);
+ "window_maximized_toggle", "default vertical",
+ NULL, 0);
e_action_predef_name_set(_("Window : State"), _("Maximize Horizontally"),
- "window_maximized_toggle", "default horizontal", NULL, 0);
+ "window_maximized_toggle", "default horizontal",
+ NULL, 0);
e_action_predef_name_set(_("Window : State"), _("Maximize Fullscreen"),
- "window_maximized_toggle", "fullscreen", NULL, 0);
+ "window_maximized_toggle", "fullscreen", NULL, 0);
e_action_predef_name_set(_("Window : State"), _("Maximize Mode \"Smart\""),
- "window_maximized_toggle", "smart", NULL, 0);
+ "window_maximized_toggle", "smart", NULL, 0);
e_action_predef_name_set(_("Window : State"), _("Maximize Mode \"Expand\""),
- "window_maximized_toggle", "expand", NULL, 0);
+ "window_maximized_toggle", "expand", NULL, 0);
e_action_predef_name_set(_("Window : State"), _("Maximize Mode \"Fill\""),
- "window_maximized_toggle", "fill", NULL, 0);
+ "window_maximized_toggle", "fill", NULL, 0);
ACT_GO(window_maximized);
/* window_shaded_toggle */
ACT_GO(window_shaded_toggle);
- e_action_predef_name_set(_("Window : State"), _("Shade Up Mode Toggle"),
"window_shaded_toggle",
- "up", NULL, 0);
+ e_action_predef_name_set(_("Window : State"), _("Shade Up Mode Toggle"),
+ "window_shaded_toggle", "up", NULL, 0);
e_action_predef_name_set(_("Window : State"), _("Shade Down Mode Toggle"),
- "window_shaded_toggle", "down", NULL, 0);
+ "window_shaded_toggle", "down", NULL, 0);
e_action_predef_name_set(_("Window : State"), _("Shade Left Mode Toggle"),
- "window_shaded_toggle", "left", NULL, 0);
+ "window_shaded_toggle", "left", NULL, 0);
e_action_predef_name_set(_("Window : State"), _("Shade Right Mode Toggle"),
- "window_shaded_toggle", "right", NULL, 0);
- e_action_predef_name_set(_("Window : State"), _("Shade Mode Toggle"),
"window_shaded_toggle",
- NULL, NULL, 0);
+ "window_shaded_toggle", "right", NULL, 0);
+ e_action_predef_name_set(_("Window : State"), _("Shade Mode Toggle"),
+ "window_shaded_toggle", NULL, NULL, 0);
ACT_GO(window_shaded);
/* window_borderless_toggle */
ACT_GO(window_borderless_toggle);
e_action_predef_name_set(_("Window : State"), _("Toggle Borderless State"),
- "window_borderless_toggle", NULL, NULL, 0);
-
+ "window_borderless_toggle", NULL, NULL, 0);
+
+ /* window_pinned_toggle */
+ ACT_GO(window_pinned_toggle);
+ e_action_predef_name_set(_("Window : State"), _("Toggle Pinned State"),
+ "window_pinned_toggle", NULL, NULL, 0);
+
/* desk_flip_by */
ACT_GO(desk_flip_by);
- e_action_predef_name_set(_("Desktop"), _("Flip Desktop Left"),
"desk_flip_by", "-1 0", NULL, 0);
- e_action_predef_name_set(_("Desktop"), _("Flip Desktop Right"),
"desk_flip_by", "1 0", NULL, 0);
- e_action_predef_name_set(_("Desktop"), _("Flip Desktop Up"),
"desk_flip_by", "0 -1", NULL, 0);
- e_action_predef_name_set(_("Desktop"), _("Flip Desktop Down"),
"desk_flip_by", "0 1", NULL, 0);
- e_action_predef_name_set(_("Desktop"), _("Flip Desktop By..."),
"desk_flip_by", NULL,
- "syntax: X-offset Y-offset, example: -1 0", 1);
+ e_action_predef_name_set(_("Desktop"), _("Flip Desktop Left"),
+ "desk_flip_by", "-1 0", NULL, 0);
+ e_action_predef_name_set(_("Desktop"), _("Flip Desktop Right"),
+ "desk_flip_by", "1 0", NULL, 0);
+ e_action_predef_name_set(_("Desktop"), _("Flip Desktop Up"),
+ "desk_flip_by", "0 -1", NULL, 0);
+ e_action_predef_name_set(_("Desktop"), _("Flip Desktop Down"),
+ "desk_flip_by", "0 1", NULL, 0);
+ e_action_predef_name_set(_("Desktop"), _("Flip Desktop By..."),
+ "desk_flip_by", NULL,
+ "syntax: X-offset Y-offset, example: -1 0", 1);
/* desk_deskshow_toggle */
ACT_GO(desk_deskshow_toggle);
- e_action_predef_name_set(_("Desktop"), _("Show The Desktop"),
"desk_deskshow_toggle",
- NULL, NULL, 0);
+ e_action_predef_name_set(_("Desktop"), _("Show The Desktop"),
+ "desk_deskshow_toggle", NULL, NULL, 0);
/* desk_linear_flip_to */
ACT_GO(desk_flip_to);
- e_action_predef_name_set(_("Desktop"), _("Flip Desktop To..."),
"desk_flip_to", NULL,
- "syntax: X Y, example: 1 2", 1);
+ e_action_predef_name_set(_("Desktop"), _("Flip Desktop To..."),
+ "desk_flip_to", NULL,
+ "syntax: X Y, example: 1 2", 1);
/* desk_linear_flip_by */
ACT_GO(desk_linear_flip_by);
- e_action_predef_name_set(_("Desktop"), _("Flip Desktop Linearly..."),
"desk_linear_flip_by",
- NULL, "syntax: N-offset, example: -2", 1);
+ e_action_predef_name_set(_("Desktop"), _("Flip Desktop Linearly..."),
+ "desk_linear_flip_by",
+ NULL, "syntax: N-offset, example: -2", 1);
/* desk_linear_flip_to */
ACT_GO(desk_linear_flip_to);
- e_action_predef_name_set(_("Desktop"), _("Switch To Desktop 0"),
"desk_linear_flip_to", "0",
- NULL, 0);
- e_action_predef_name_set(_("Desktop"), _("Switch To Desktop 1"),
"desk_linear_flip_to", "1",
- NULL, 0);
- e_action_predef_name_set(_("Desktop"), _("Switch To Desktop 2"),
"desk_linear_flip_to", "2",
- NULL, 0);
- e_action_predef_name_set(_("Desktop"), _("Switch To Desktop 3"),
"desk_linear_flip_to", "3",
- NULL, 0);
- e_action_predef_name_set(_("Desktop"), _("Switch To Desktop 4"),
"desk_linear_flip_to", "4",
- NULL, 0);
- e_action_predef_name_set(_("Desktop"), _("Switch To Desktop 5"),
"desk_linear_flip_to", "5",
- NULL, 0);
- e_action_predef_name_set(_("Desktop"), _("Switch To Desktop 6"),
"desk_linear_flip_to", "6",
- NULL, 0);
- e_action_predef_name_set(_("Desktop"), _("Switch To Desktop 7"),
"desk_linear_flip_to", "7",
- NULL, 0);
- e_action_predef_name_set(_("Desktop"), _("Switch To Desktop 8"),
"desk_linear_flip_to", "8",
- NULL, 0);
- e_action_predef_name_set(_("Desktop"), _("Switch To Desktop 9"),
"desk_linear_flip_to", "9",
- NULL, 0);
- e_action_predef_name_set(_("Desktop"), _("Switch To Desktop 10"),
"desk_linear_flip_to", "10",
- NULL, 0);
- e_action_predef_name_set(_("Desktop"), _("Switch To Desktop 11"),
"desk_linear_flip_to", "11",
- NULL, 0);
- e_action_predef_name_set(_("Desktop"), _("Switch To Desktop..."),
"desk_linear_flip_to", NULL,
- "syntax: N, example: 1", 1);
+ e_action_predef_name_set(_("Desktop"), _("Switch To Desktop 0"),
+ "desk_linear_flip_to", "0", NULL, 0);
+ e_action_predef_name_set(_("Desktop"), _("Switch To Desktop 1"),
+ "desk_linear_flip_to", "1", NULL, 0);
+ e_action_predef_name_set(_("Desktop"), _("Switch To Desktop 2"),
+ "desk_linear_flip_to", "2", NULL, 0);
+ e_action_predef_name_set(_("Desktop"), _("Switch To Desktop 3"),
+ "desk_linear_flip_to", "3", NULL, 0);
+ e_action_predef_name_set(_("Desktop"), _("Switch To Desktop 4"),
+ "desk_linear_flip_to", "4", NULL, 0);
+ e_action_predef_name_set(_("Desktop"), _("Switch To Desktop 5"),
+ "desk_linear_flip_to", "5", NULL, 0);
+ e_action_predef_name_set(_("Desktop"), _("Switch To Desktop 6"),
+ "desk_linear_flip_to", "6", NULL, 0);
+ e_action_predef_name_set(_("Desktop"), _("Switch To Desktop 7"),
+ "desk_linear_flip_to", "7", NULL, 0);
+ e_action_predef_name_set(_("Desktop"), _("Switch To Desktop 8"),
+ "desk_linear_flip_to", "8", NULL, 0);
+ e_action_predef_name_set(_("Desktop"), _("Switch To Desktop 9"),
+ "desk_linear_flip_to", "9", NULL, 0);
+ e_action_predef_name_set(_("Desktop"), _("Switch To Desktop 10"),
+ "desk_linear_flip_to", "10", NULL, 0);
+ e_action_predef_name_set(_("Desktop"), _("Switch To Desktop 11"),
+ "desk_linear_flip_to", "11", NULL, 0);
+ e_action_predef_name_set(_("Desktop"), _("Switch To Desktop..."),
+ "desk_linear_flip_to", NULL,
+ "syntax: N, example: 1", 1);
/* screen_send_to */
ACT_GO(screen_send_to);
- e_action_predef_name_set(_("Screen"), _("Send Mouse To Screen 0"),
"screen_send_to", "0",
- NULL, 0);
- e_action_predef_name_set(_("Screen"), _("Send Mouse To Screen 1"),
"screen_send_to", "1",
- NULL, 0);
- e_action_predef_name_set(_("Screen"), _("Send Mouse To Screen..."),
"screen_send_to", NULL,
- "syntax: N, example: 0", 1);
+ e_action_predef_name_set(_("Screen"), _("Send Mouse To Screen 0"),
+ "screen_send_to", "0", NULL, 0);
+ e_action_predef_name_set(_("Screen"), _("Send Mouse To Screen 1"),
+ "screen_send_to", "1", NULL, 0);
+ e_action_predef_name_set(_("Screen"), _("Send Mouse To Screen..."),
+ "screen_send_to", NULL,
+ "syntax: N, example: 0", 1);
/* screen_send_by */
ACT_GO(screen_send_by);
- e_action_predef_name_set(_("Screen"), _("Send Mouse Forward 1 Screen"),
"screen_send_by", "1",
- NULL, 0);
- e_action_predef_name_set(_("Screen"), _("Send Mouse Back 1 Screen"),
"screen_send_by", "-1",
- NULL, 0);
- e_action_predef_name_set(_("Screen"), _("Send Mouse Forward/Back
Screens..."), "screen_send_by",
- NULL, "syntax: N-offset, example: -2", 1);
+ e_action_predef_name_set(_("Screen"), _("Send Mouse Forward 1 Screen"),
+ "screen_send_by", "1", NULL, 0);
+ e_action_predef_name_set(_("Screen"), _("Send Mouse Back 1 Screen"),
+ "screen_send_by", "-1", NULL, 0);
+ e_action_predef_name_set(_("Screen"), _("Send Mouse Forward/Back
Screens..."),
+ "screen_send_by", NULL,
+ "syntax: N-offset, example: -2", 1);
/* window_move_to */
ACT_GO(window_move_to);
- e_action_predef_name_set(_("Window : Actions"), "Move To...",
"window_move_to", NULL,
- "syntax: [ ,-]X [ ,-]Y or * [ ,-]Y or [ , -]X *, example: -1 1", 1);
+ e_action_predef_name_set(_("Window : Actions"), "Move To...",
+ "window_move_to", NULL,
+ "syntax: [ ,-]X [ ,-]Y or * [ ,-]Y or [ , -]X *,
example: -1 1", 1);
/* window_move_by */
ACT_GO(window_move_by);
- e_action_predef_name_set(_("Window : Actions"), "Move By...",
"window_move_by", NULL,
- "syntax: X-offset Y-offset, example: -1 0", 1);
+ e_action_predef_name_set(_("Window : Actions"), "Move By...",
+ "window_move_by", NULL,
+ "syntax: X-offset Y-offset, example: -1 0", 1);
/* window_resize_by */
ACT_GO(window_resize_by);
- e_action_predef_name_set(_("Window : Actions"), "Resize By...",
"window_resize_by", NULL,
- "syntax: W H, example: 100 150", 1);
+ e_action_predef_name_set(_("Window : Actions"), "Resize By...",
+ "window_resize_by", NULL,
+ "syntax: W H, example: 100 150", 1);
/* window_push */
ACT_GO(window_push);
- e_action_predef_name_set(_("Window : Actions"), "Push in Direction...",
"window_push", NULL,
- "syntax: direction, example: up, down, left, right", 1);
+ e_action_predef_name_set(_("Window : Actions"), "Push in Direction...",
+ "window_push", NULL,
+ "syntax: direction, example: up, down, left,
right", 1);
/* window_drag_icon */
ACT_GO(window_drag_icon);
- e_action_predef_name_set(_("Window : Actions"), "Drag Icon...",
"window_drag_icon", NULL,
- NULL, 0);
+ e_action_predef_name_set(_("Window : Actions"), "Drag Icon...",
+ "window_drag_icon", NULL, NULL, 0);
/* window_desk_move_by */
ACT_GO(window_desk_move_by);
- e_action_predef_name_set(_("Window : Moving"), _("To Next Desktop"),
"window_desk_move_by",
- "1 0", NULL, 0);
- e_action_predef_name_set(_("Window : Moving"), _("To Previous Desktop"),
"window_desk_move_by",
- "-1 0", NULL, 0);
- e_action_predef_name_set(_("Window : Moving"), _("By Desktop #..."),
"window_desk_move_by", NULL,
- "syntax: X-offset Y-offset, example: -2 2", 1);
+ e_action_predef_name_set(_("Window : Moving"), _("To Next Desktop"),
+ "window_desk_move_by", "1 0", NULL, 0);
+ e_action_predef_name_set(_("Window : Moving"), _("To Previous Desktop"),
+ "window_desk_move_by", "-1 0", NULL, 0);
+ e_action_predef_name_set(_("Window : Moving"), _("By Desktop #..."),
+ "window_desk_move_by", NULL,
+ "syntax: X-offset Y-offset, example: -2 2", 1);
/* window_desk_move_to */
ACT_GO(window_desk_move_to);
- e_action_predef_name_set(_("Window : Moving"), _("To Desktop..."),
"window_desk_move_to", NULL,
- "syntax: X Y, example: 0 1", 1);
+ e_action_predef_name_set(_("Window : Moving"), _("To Desktop..."),
+ "window_desk_move_to", NULL,
+ "syntax: X Y, example: 0 1", 1);
/* menu_show */
ACT_GO(menu_show);
- e_action_predef_name_set(_("Menu"), _("Show Main Menu"), "menu_show",
"main", NULL, 0);
+ e_action_predef_name_set(_("Menu"), _("Show Main Menu"),
+ "menu_show", "main", NULL, 0);
#ifdef ENABLE_FAVORITES
- e_action_predef_name_set(_("Menu"), _("Show Favorites Menu"), "menu_show",
"favorites", NULL, 0);
+ e_action_predef_name_set(_("Menu"), _("Show Favorites Menu"), "menu_show",
+ "favorites", NULL, 0);
#endif
- e_action_predef_name_set(_("Menu"), _("Show All Applications Menu"),
"menu_show", "all", NULL, 0);
- e_action_predef_name_set(_("Menu"), _("Show Clients Menu"), "menu_show",
"clients", NULL, 0);
+ e_action_predef_name_set(_("Menu"), _("Show All Applications Menu"),
+ "menu_show", "all", NULL, 0);
+ e_action_predef_name_set(_("Menu"), _("Show Clients Menu"), "menu_show",
+ "clients", NULL, 0);
e_action_predef_name_set(_("Menu"), _("Show Menu..."), "menu_show", NULL,
- "syntax: MenuName, example: MyMenu", 1);
+ "syntax: MenuName, example: MyMenu", 1);
ACT_GO_MOUSE(menu_show);
ACT_GO_KEY(menu_show);
/* exec */
ACT_GO(exec);
e_action_predef_name_set(_("Launch"), _("Defined Command"), "exec", NULL,
- "syntax: CommandName, example: /usr/bin/xmms", 1);
+ "syntax: CommandName, example: /usr/bin/xmms", 1);
/* app */
ACT_GO(app);
- e_action_predef_name_set(_("Launch"), _("Application"), "app", NULL,
"syntax: , example:",
- 1);
+ e_action_predef_name_set(_("Launch"), _("Application"), "app", NULL,
+ "syntax: , example:", 1);
/* winlist */
ACT_GO(winlist);
- e_action_predef_name_set(_("Window : List"), _("Next Window"), "winlist",
"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"), "winlist",
+ "next", NULL, 0);
+ e_action_predef_name_set(_("Window : List"), _("Previous Window"),
+ "winlist", "prev", NULL, 0);
ACT_GO_MOUSE(winlist);
ACT_GO_KEY(winlist);
ACT_GO(restart);
- e_action_predef_name_set(_("Enlightenment"), _("Restart"), "restart", NULL,
NULL, 0);
+ e_action_predef_name_set(_("Enlightenment"), _("Restart"), "restart",
+ NULL, NULL, 0);
ACT_GO(exit);
- e_action_predef_name_set(_("Enlightenment"), _("Exit"), "exit", NULL, NULL,
0);
+ e_action_predef_name_set(_("Enlightenment"), _("Exit"), "exit",
+ NULL, NULL, 0);
ACT_GO(logout);
- e_action_predef_name_set(_("Enlightenment"), _("Log Out"), "logout", NULL,
NULL, 0);
+ e_action_predef_name_set(_("Enlightenment"), _("Log Out"), "logout",
+ NULL, NULL, 0);
ACT_GO(exit_now);
- e_action_predef_name_set(_("Enlightenment"), _("Exit Immediately"),
"exit_now", NULL, NULL, 0);
+ e_action_predef_name_set(_("Enlightenment"), _("Exit Immediately"),
+ "exit_now", NULL, NULL, 0);
ACT_GO(halt);
- e_action_predef_name_set(_("System"), _("Shut Down"), "halt", NULL, NULL,
0);
+ e_action_predef_name_set(_("System"), _("Shut Down"), "halt",
+ NULL, NULL, 0);
ACT_GO(reboot);
- e_action_predef_name_set(_("System"), _("Reboot"), "reboot", NULL, NULL, 0);
+ e_action_predef_name_set(_("System"), _("Reboot"), "reboot",
+ NULL, NULL, 0);
ACT_GO(suspend);
- e_action_predef_name_set(_("System"), _("Suspend"), "suspend", NULL, NULL,
0);
+ e_action_predef_name_set(_("System"), _("Suspend"), "suspend",
+ NULL, NULL, 0);
ACT_GO(hibernate);
- e_action_predef_name_set(_("System"), _("Suspend to Disk"), "hibernate",
NULL, NULL, 0);
+ e_action_predef_name_set(_("System"), _("Suspend to Disk"), "hibernate",
+ NULL, NULL, 0);
ACT_GO(pointer_resize_push);
ACT_GO(pointer_resize_pop);
/* exebuf */
ACT_GO(exebuf);
- e_action_predef_name_set(_("Launch"), _("Run Command Dialog"), "exebuf",
NULL, NULL, 0);
+ e_action_predef_name_set(_("Launch"), _("Run Command Dialog"), "exebuf",
+ NULL, NULL, 0);
/* desk_lock */
ACT_GO(desk_lock);
- e_action_predef_name_set(_("Desktop"), _("Desktop Lock"), "desk_lock",
NULL, NULL, 0);
+ e_action_predef_name_set(_("Desktop"), _("Desktop Lock"), "desk_lock",
+ NULL, NULL, 0);
/* cleanup_windows */
ACT_GO(cleanup_windows);
- e_action_predef_name_set(_("Desktop"), _("Cleanup Windows"),
"cleanup_windows", NULL, NULL, 0);
+ e_action_predef_name_set(_("Desktop"), _("Cleanup Windows"),
+ "cleanup_windows", NULL, NULL, 0);
return 1;
}
@@ -2136,9 +2207,7 @@
e_action_predef_name_all_del();
action_names = evas_list_free(action_names);
while (actions)
- {
- evas_hash_foreach(actions, _e_actions_cb_free, NULL);
- }
+ evas_hash_foreach(actions, _e_actions_cb_free, NULL);
return 1;
}
@@ -2212,7 +2281,8 @@
action_groups = evas_list_append(action_groups, actg);
action_groups =
- evas_list_sort(action_groups, evas_list_count(action_groups),
_action_groups_sort_cb);
+ evas_list_sort(action_groups, evas_list_count(action_groups),
+ _action_groups_sort_cb);
}
for (l = actg->acts; l; l = l->next)
@@ -2277,7 +2347,6 @@
break;
}
}
-
}
EAPI void
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_border.c,v
retrieving revision 1.571
retrieving revision 1.572
diff -u -3 -r1.571 -r1.572
--- e_border.c 14 Feb 2007 02:43:34 -0000 1.571
+++ e_border.c 27 Feb 2007 16:16:03 -0000 1.572
@@ -2239,6 +2239,35 @@
e_remember_update(bd->remember, bd);
}
+EAPI void
+e_border_pinned_set(E_Border *bd, int set)
+{
+ int layer;
+ int stacking;
+
+ if (bd)
+ {
+ bd->borderless = set;
+ bd->user_skip_winlist = set;
+ if (set)
+ {
+ layer = 50;
+ stacking = E_STACKING_BELOW;
+ }
+ else
+ {
+ layer = 100;
+ stacking = E_STACKING_NONE;
+ }
+
+ e_border_layer_set(bd, layer);
+ e_hints_window_stacking_set(bd, stacking);
+
+ bd->client.border.changed = 1;
+ bd->changed = 1;
+ }
+}
+
EAPI E_Border *
e_border_find_by_client_window(Ecore_X_Window win)
{
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_border.h,v
retrieving revision 1.154
retrieving revision 1.155
diff -u -3 -r1.154 -r1.155
--- e_border.h 22 Feb 2007 05:17:44 -0000 1.154
+++ e_border.h 27 Feb 2007 16:16:03 -0000 1.155
@@ -351,7 +351,6 @@
unsigned int need_maximize : 1;
E_Maximize maximized;
unsigned int borderless : 1;
- unsigned int pinned_to_desktop : 1;
const char *bordername;
unsigned int lock_user_location : 1; /*DONE*/
@@ -594,6 +593,7 @@
EAPI void e_border_uniconify(E_Border *bd);
EAPI void e_border_stick(E_Border *bd);
EAPI void e_border_unstick(E_Border *bd);
+EAPI void e_border_pinned_set(E_Border *bd, int set);
EAPI E_Border *e_border_find_by_client_window(Ecore_X_Window win);
EAPI E_Border *e_border_find_by_frame_window(Ecore_X_Window win);
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_int_border_menu.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -3 -r1.56 -r1.57
--- e_int_border_menu.c 22 Feb 2007 05:17:44 -0000 1.56
+++ e_int_border_menu.c 27 Feb 2007 16:16:03 -0000 1.57
@@ -102,7 +102,7 @@
e_menu_item_icon_edje_set(mi,
e_theme_edje_file_get("base/theme/borders",
"e/widgets/border/default/maximize"),
- "e/widgets/border/default/maximize");
+ "e/widgets/border/default/maximize");
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Maximize vertically"));
@@ -112,8 +112,8 @@
e_menu_item_callback_set(mi, _e_border_menu_cb_maximize_vertically, bd);
e_menu_item_icon_edje_set(mi,
e_theme_edje_file_get("base/theme/borders",
-
"e/widgets/border/default/maximize"),
- "e/widgets/border/default/maximize");
+
"e/widgets/border/default/maximize"),
+ "e/widgets/border/default/maximize");
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Maximize horizontally"));
@@ -124,7 +124,7 @@
e_menu_item_icon_edje_set(mi,
e_theme_edje_file_get("base/theme/borders",
"e/widgets/border/default/maximize"),
- "e/widgets/border/default/maximize");
+ "e/widgets/border/default/maximize");
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Unmaximize"));
@@ -135,7 +135,7 @@
e_menu_item_icon_edje_set(mi,
e_theme_edje_file_get("base/theme/borders",
"e/widgets/border/default/maximize"),
- "e/widgets/border/default/maximize");
+ "e/widgets/border/default/maximize");
}
m = e_menu_new();
@@ -184,7 +184,8 @@
"e/widgets/border/default/sendto");
}
- if (!bd->pinned_to_desktop)
+ if ((bd->client.netwm.state.stacking != E_STACKING_BELOW) ||
+ (!bd->user_skip_winlist) || (!bd->borderless))
{
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Pin to Desktop"));
@@ -195,7 +196,8 @@
"e/widgets/border/default/stick");
}
- if (bd->pinned_to_desktop)
+ if ((bd->client.netwm.state.stacking == E_STACKING_BELOW) &&
+ (bd->user_skip_winlist) && (bd->borderless))
{
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Unpin from Desktop"));
@@ -285,7 +287,7 @@
e_menu_item_icon_edje_set(mi,
e_theme_edje_file_get("base/theme/borders",
"e/widgets/border/default/properties"),
- "e/widgets/border/default/properties");
+ "e/widgets/border/default/properties");
mi = e_menu_item_new(m);
e_menu_item_separator_set(mi, 1);
@@ -352,8 +354,7 @@
if (key)
- e_menu_activate_key(m, bd->zone, x, y, 1, 1,
- E_MENU_POP_DIRECTION_DOWN);
+ e_menu_activate_key(m, bd->zone, x, y, 1, 1, E_MENU_POP_DIRECTION_DOWN);
else
e_menu_activate_mouse(m, bd->zone, x, y, 1, 1,
E_MENU_POP_DIRECTION_DOWN, timestamp);
@@ -371,11 +372,11 @@
was_menu = 1;
}
if( bd->border_maximize_menu )
- {
- e_object_del(E_OBJECT(bd->border_maximize_menu));
- bd->border_maximize_menu = NULL;
- was_menu = 1;
- }
+ {
+ e_object_del(E_OBJECT(bd->border_maximize_menu));
+ bd->border_maximize_menu = NULL;
+ was_menu = 1;
+ }
if (bd->border_menu)
{
e_object_del(E_OBJECT(bd->border_menu));
@@ -448,8 +449,10 @@
bd = data;
if (!bd->lock_user_iconify)
{
- if (bd->iconic) e_border_uniconify(bd);
- else e_border_iconify(bd);
+ if (bd->iconic)
+ e_border_uniconify(bd);
+ else
+ e_border_iconify(bd);
}
}
@@ -470,7 +473,8 @@
bd = data;
if (!bd->lock_user_maximize)
- e_border_maximize(bd, (e_config->maximize_policy & E_MAXIMIZE_TYPE) |
E_MAXIMIZE_BOTH);
+ e_border_maximize(bd, (e_config->maximize_policy & E_MAXIMIZE_TYPE) |
+ E_MAXIMIZE_BOTH);
}
static void
@@ -483,7 +487,8 @@
{
if ((bd->maximized & E_MAXIMIZE_HORIZONTAL))
e_border_unmaximize(bd, E_MAXIMIZE_HORIZONTAL);
- e_border_maximize(bd, (e_config->maximize_policy & E_MAXIMIZE_TYPE) |
E_MAXIMIZE_VERTICAL);
+ e_border_maximize(bd, (e_config->maximize_policy & E_MAXIMIZE_TYPE) |
+ E_MAXIMIZE_VERTICAL);
}
}
@@ -497,7 +502,8 @@
{
if ((bd->maximized & E_MAXIMIZE_VERTICAL))
e_border_unmaximize(bd, E_MAXIMIZE_VERTICAL);
- e_border_maximize(bd, (e_config->maximize_policy & E_MAXIMIZE_TYPE) |
E_MAXIMIZE_HORIZONTAL);
+ e_border_maximize(bd, (e_config->maximize_policy & E_MAXIMIZE_TYPE) |
+ E_MAXIMIZE_HORIZONTAL);
}
}
@@ -519,8 +525,10 @@
bd = data;
if (!bd->lock_user_shade)
{
- if (bd->shaded) e_border_unshade(bd, E_DIRECTION_UP);
- else e_border_shade(bd, E_DIRECTION_UP);
+ if (bd->shaded)
+ e_border_unshade(bd, E_DIRECTION_UP);
+ else
+ e_border_shade(bd, E_DIRECTION_UP);
}
}
@@ -547,7 +555,8 @@
const char *homedir;
homedir = e_user_homedir_get();
- snprintf(path, sizeof(path),
"%s/.e/e/applications/all/%s.desktop", homedir, bname);
+ snprintf(path, sizeof(path),
"%s/.e/e/applications/all/%s.desktop",
+ homedir, bname);
a = e_app_empty_new(path);
}
else
@@ -584,9 +593,7 @@
a->tmpfile = 1;
}
else
- {
- fprintf(stderr, "Could not save file from ARGB: %s\n",
path);
- }
+ fprintf(stderr, "Could not save file from ARGB: %s\n",
path);
}
bd->app = a;
e_object_ref(E_OBJECT(bd->app));
@@ -666,7 +673,8 @@
while ((file = ecore_list_next(dirs)))
{
if (file[0] == '.') continue;
- snprintf(buf, sizeof(buf), "%s/.e/e/applications/bar/%s",
e_user_homedir_get(), file);
+ snprintf(buf, sizeof(buf), "%s/.e/e/applications/bar/%s",
+ e_user_homedir_get(), file);
if (ecore_file_is_dir(buf))
{
submi = e_menu_item_new(subm);
@@ -696,8 +704,10 @@
bd = data;
if (!bd->lock_user_sticky)
{
- if (bd->sticky) e_border_unstick(bd);
- else e_border_stick(bd);
+ if (bd->sticky)
+ e_border_unstick(bd);
+ else
+ e_border_stick(bd);
}
}
@@ -814,9 +824,7 @@
desk = data;
bd = e_object_data_get(E_OBJECT(m));
if ((bd) && (desk))
- {
- e_border_desk_set(bd, desk);
- }
+ e_border_desk_set(bd, desk);
}
static void
@@ -826,21 +834,7 @@
bd = e_object_data_get(E_OBJECT(m));
if (bd)
- {
- bd->pinned_to_desktop = 1;
- bd->borderless = 1;
- bd->user_skip_winlist = 1;
- bd->client.netwm.state.stacking = E_STACKING_BELOW;
-
- if (bd->layer != 50)
- {
- e_border_layer_set(bd, 50);
- e_hints_window_stacking_set(bd, E_STACKING_BELOW);
- }
-
- bd->client.border.changed = 1;
- bd->changed = 1;
- }
+ e_border_pinned_set(bd, 1);
}
static void
@@ -850,21 +844,7 @@
bd = e_object_data_get(E_OBJECT(m));
if (bd)
- {
- bd->pinned_to_desktop = 0;
- bd->borderless = 0;
- bd->user_skip_winlist = 0;
- bd->client.netwm.state.stacking = E_STACKING_NONE;
-
- if (bd->layer != 100)
- {
- e_border_layer_set(bd, 100);
- e_hints_window_stacking_set(bd, E_STACKING_NONE);
- }
-
- bd->client.border.changed = 1;
- bd->changed = 1;
- }
+ e_border_pinned_set(bd, 0);
}
static void
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs