ok lots of things here...

1. e17 is now relocatable. the wm will determine its install prefix on the
fly when it is run. so you can use --prefix=/usr/local/e17 and just move the
base dir (/usr/local/e17) to anywhere you like at any later time and e will
adjust and find it. it still has built in fallbacks too so it will use the
compiled prefix as normal if its hunting and 2 checks dont pass.

2. edit mode for gadgets will work with alt+left click on a gadget and
instantly end when u lift the mouse. alst ctrl+alt+g will activate/deactivate
edit mode

3. borderless windows are not allowed to be shaded

4. shaded windows are not allowed to have their border changed

5. just have never seen the pager mess up bug - so until there is some way
of reproducing it or even knowing its still there - remove

6. autoraise timers should be fixed on focus changes

7. stickiness remembering works in the pager now on start of a remembered app


SVN revision: 15966
This commit is contained in:
Carsten Haitzler 2005-07-31 06:22:31 +00:00
parent 7d52c0829f
commit 9e7cd72067
18 changed files with 471 additions and 95 deletions

19
TODO
View File

@ -8,11 +8,8 @@ Some of the things (in very short form) that need to be done to E17...
BUGS / FIXES
-------------------------------------------------------------------------------
* BUG: must delete aurtais timer on focus out.
* BUG: remember stickiness does not show in the pager when applied later by
the remember code
* e_hints.c manually changes flags on a border isnetad of calling
e_border_stick() for exampe or the calls in e_border.c - add calls as needed
* e_hints.c manually changes flags on a border instead of calling
e_border_stick() for example or the calls in e_border.c - add calls as needed
to e_border.c. before calling check the lock flags too.
* BUG: in general fullscreen needs work, cleaning and testing. dont allow
desktop switches for the desk a fullscreened window is on, nor allow windows
@ -28,7 +25,6 @@ Some of the things (in very short form) that need to be done to E17...
* BUG: if you have 2 zones and you fill up zone 2 (right) mostly and then run
a big xev (xev -g 1280x1024) that wont fit it gets placed offscreen to the
right of zone 2
* BUG?: pager problems. Seems to loose or mess up windows sometimes.
* BUG?: xine's ui window/panel is under its video window when u go fullscreen
]]]
@ -37,12 +33,10 @@ Some of the things (in very short form) that need to be done to E17...
ESSENTIAL FEATURES
-------------------------------------------------------------------------------
* in addition to smart place should add manual placement and place at pointer
and maybe a few others.
* support xrandr to change res from e itself (and save it etc.)
* emit signal to submenu entries if they have a submenu shown for them or not
* add window placement options like place at pointer
* shaded windows should not allow border changes by the user
* if a border is borderless it should not be allowed to be shaded (padl/r/t/b
is 0)
* add fullscreen support (e16 xvidmode or xrandr style)
* implement thees maximise/fullscreen modes:
Which of these should be different modes, and which should be options for
@ -94,8 +88,6 @@ Some of the things (in very short form) that need to be done to E17...
specifies the locale and font) and then install the font(s) either as a user
or superuser, and the .mo in the system or a user locales dir.
* all menus need icons if they dont have them yet:)
* gadman edit mode for simple gadgets activate with a button bind (eg
alt+click on module like windows) or a pure key binding
* gadget containers (shelves?) using popups as well as in-line in a canvas
* add key input focus control for desktop modules
* finish off icccm support
@ -106,7 +98,6 @@ Some of the things (in very short form) that need to be done to E17...
* add a "taskbar" module
* add cpu load module
* add a way to access "all" apps app dir
* ibar need to handle drop from other places (xdnd, drop from window etc.)
* dnd from pager to other pagers/ to desktop/ibox etc.
* ibar should enable user to select different dirs to view per bar and allow
new bars to be created or bars to be deleted
@ -122,6 +113,7 @@ Some of the things (in very short form) that need to be done to E17...
* make xrandr support get rotation and store it
* add separate app menu bars at top of screen support
* add really nice "about" box with theme, authors credits list etc etc.
* theme about data/box
* gui config tools for bg's, keybindings, etc. etc. etc.
* "control panel" app to launch the gui config tools
* make it possible to disable border buttons/actions (tell theme what is
@ -151,7 +143,6 @@ Some of the things (in very short form) that need to be done to E17...
window - otherwise click to focus or pointer focus will chose the selected
window that may get the focus if it allows it...
* module api needs to move label and icon to data file (.eap file?), not api
* make e17 re-locatable (ie use e_prefix.c stuff instead of #defined paths)
* ibar lamp needs short timer on mouse out for hide before hiding (and del
the time on mouse in)
* allow object paranoia to be a runtime option too

View File

@ -847,6 +847,45 @@ ACT_FN_GO_KEY(winlist)
}
}
/***************************************************************************/
ACT_FN_GO(edit_mode)
{
if (!obj) obj = E_OBJECT(e_container_current_get(e_manager_current_get()));
if (!obj) return;
if (obj->type != E_CONTAINER_TYPE)
{
obj = E_OBJECT(e_container_current_get(e_manager_current_get()));
if (!obj) return;
}
e_gadman_mode_set(((E_Container *)obj)->gadman, E_GADMAN_MODE_EDIT);
}
ACT_FN_END(edit_mode)
{
if (!obj) obj = E_OBJECT(e_container_current_get(e_manager_current_get()));
if (!obj) return;
if (obj->type != E_CONTAINER_TYPE)
{
obj = E_OBJECT(e_container_current_get(e_manager_current_get()));
if (!obj) return;
}
e_gadman_mode_set(((E_Container *)obj)->gadman, E_GADMAN_MODE_NORMAL);
}
/***************************************************************************/
ACT_FN_GO(edit_mode_toggle)
{
if (!obj) obj = E_OBJECT(e_container_current_get(e_manager_current_get()));
if (!obj) return;
if (obj->type != E_CONTAINER_TYPE)
{
obj = E_OBJECT(e_container_current_get(e_manager_current_get()));
if (!obj) return;
}
if (e_gadman_mode_get(((E_Container *)obj)->gadman) == E_GADMAN_MODE_NORMAL)
e_gadman_mode_set(((E_Container *)obj)->gadman, E_GADMAN_MODE_EDIT);
else
e_gadman_mode_set(((E_Container *)obj)->gadman, E_GADMAN_MODE_NORMAL);
}
/* local subsystem globals */
static Evas_Hash *actions = NULL;
@ -914,6 +953,11 @@ e_actions_init(void)
ACT_GO_MOUSE(winlist);
ACT_GO_KEY(winlist);
ACT_GO(edit_mode);
ACT_END(edit_mode);
ACT_GO(edit_mode_toggle);
return 1;
}

View File

@ -9,6 +9,7 @@ typedef enum _E_Binding_Context
E_BINDING_CONTEXT_UNKNOWN,
E_BINDING_CONTEXT_BORDER,
E_BINDING_CONTEXT_ZONE,
E_BINDING_CONTEXT_CONTAINER,
E_BINDING_CONTEXT_MANAGER,
E_BINDING_CONTEXT_MENU,
E_BINDING_CONTEXT_WINLIST,

View File

@ -880,6 +880,11 @@ e_border_focus_set(E_Border *bd, int focus, int set)
/* FIXME: Sometimes we should leave the window fullscreen! */
if (bd->fullscreen)
e_border_unfullscreen(bd);
if (bd->raise_timer)
{
ecore_timer_del(bd->raise_timer);
bd->raise_timer = NULL;
}
}
bd->focused = focus;
if (set)
@ -947,6 +952,7 @@ e_border_shade(E_Border *bd, E_Direction dir)
E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
/* FIXME: Some types of maximized might allow this */
if ((bd->fullscreen) || (bd->maximized)) return;
if (!strcmp("borderless", bd->client.border.name)) return;
if (!bd->shaded)
{
// printf("SHADE!\n");
@ -3842,7 +3848,7 @@ _e_border_eval(E_Border *bd)
if (bd->client.netwm.fetch.type)
{
e_hints_window_type_get(bd);
if ((!bd->lock_border) || (!bd->client.border.name))
if (((!bd->lock_border) || (!bd->client.border.name)) && (!bd->shaded))
{
if (bd->client.netwm.type == ECORE_X_WINDOW_TYPE_DESKTOP)
{
@ -3999,7 +4005,8 @@ _e_border_eval(E_Border *bd)
}
if (bd->client.mwm.borderless != pb)
{
if ((!bd->lock_border) || (!bd->client.border.name))
if (((!bd->lock_border) || (!bd->client.border.name))
&& (!bd->shaded))
{
if (bd->client.border.name) free(bd->client.border.name);
if (bd->client.mwm.borderless)
@ -4111,7 +4118,14 @@ _e_border_eval(E_Border *bd)
if (bd->new_client)
{
E_Remember *rem = NULL;
E_Event_Border_Add *ev;
ev = calloc(1, sizeof(E_Event_Border_Add));
ev->border = bd;
e_object_ref(E_OBJECT(bd));
// e_object_breadcrumb_add(E_OBJECT(bd), "border_add_event");
ecore_event_add(E_EVENT_BORDER_ADD, ev, _e_border_event_border_add_free, NULL);
if (!bd->remember)
{
rem = e_remember_find(bd);
@ -4391,8 +4405,6 @@ _e_border_eval(E_Border *bd)
if (bd->new_client)
{
E_Event_Border_Add *ev;
bd->new_client = 0;
// printf("##- NEW CLIENT SETUP 0x%x\n", bd->client.win);
if (bd->re_manage)
@ -4528,12 +4540,6 @@ _e_border_eval(E_Border *bd)
bd->pending_move_resize = evas_list_remove_list(bd->pending_move_resize, bd->pending_move_resize);
}
ev = calloc(1, sizeof(E_Event_Border_Add));
ev->border = bd;
e_object_ref(E_OBJECT(bd));
// e_object_breadcrumb_add(E_OBJECT(bd), "border_add_event");
ecore_event_add(E_EVENT_BORDER_ADD, ev, _e_border_event_border_add_free, NULL);
/* Recreate state */
/* FIXME: this should be split into property fetches and state setup */
e_hints_window_init(bd);
@ -5845,7 +5851,7 @@ _e_border_menu_show(E_Border *bd, Evas_Coord x, Evas_Coord y, int key, Ecore_X_T
e_menu_item_separator_set(mi, 1);
}
if (!bd->lock_user_shade)
if ((!bd->lock_user_shade) && (!(!strcmp("borderless", bd->client.border.name))))
{
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Shaded"));
@ -5891,8 +5897,7 @@ _e_border_menu_show(E_Border *bd, Evas_Coord x, Evas_Coord y, int key, Ecore_X_T
(char *)e_theme_edje_file_get("base/theme/borders",
"widgets/border/default/stacking"),
"widgets/border/default/stacking");
if (!bd->lock_border)
if ((!bd->shaded) && (!bd->lock_border))
{
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Borderless"));
@ -5904,7 +5909,7 @@ _e_border_menu_show(E_Border *bd, Evas_Coord x, Evas_Coord y, int key, Ecore_X_T
"widgets/border/default/borderless"),
"widgets/border/default/borderless");
}
if (!bd->lock_user_fullscreen)
{
mi = e_menu_item_new(m);
@ -6159,15 +6164,17 @@ _e_border_menu_cb_borderless(void *data, E_Menu *m, E_Menu_Item *mi)
bd = data;
if (!bd) return;
toggle = e_menu_item_toggle_get(mi);
if (bd->client.border.name) free(bd->client.border.name);
if (toggle)
bd->client.border.name = strdup("borderless");
else
bd->client.border.name = strdup("default");
bd->client.border.changed = 1;
bd->changed = 1;
if ((!bd->lock_border) && (!bd->shaded))
{
if (bd->client.border.name) free(bd->client.border.name);
toggle = e_menu_item_toggle_get(mi);
if (toggle)
bd->client.border.name = strdup("borderless");
else
bd->client.border.name = strdup("default");
bd->client.border.changed = 1;
bd->changed = 1;
}
}
static void

View File

@ -527,6 +527,15 @@ e_config_init(void)
eb->action = strdup("menu_show");
eb->params = strdup("favorites");
e_config->mouse_bindings = evas_list_append(e_config->mouse_bindings, eb);
eb = E_NEW(E_Config_Binding_Mouse, 1);
eb->context = E_BINDING_CONTEXT_CONTAINER;
eb->button = 1;
eb->modifiers = E_BINDING_MODIFIER_ALT;
eb->any_mod = 0;
eb->action = strdup("edit_mode");
eb->params = strdup("");
e_config->mouse_bindings = evas_list_append(e_config->mouse_bindings, eb);
}
{
E_Config_Binding_Key *eb;
@ -846,6 +855,15 @@ e_config_init(void)
eb->params = strdup("prev");
e_config->key_bindings = evas_list_append(e_config->key_bindings, eb);
eb = E_NEW(E_Config_Binding_Key, 1);
eb->context = E_BINDING_CONTEXT_ANY;
eb->key = strdup("g");
eb->modifiers = E_BINDING_MODIFIER_CTRL | E_BINDING_MODIFIER_ALT;
eb->any_mod = 0;
eb->action = strdup("edit_mode_toggle");
eb->params = strdup("");
e_config->key_bindings = evas_list_append(e_config->key_bindings, eb);
/* should do these - can't yet due to other things missing... */
/* need a yes/no dialog for these - to stop accidental logouts. for this

View File

@ -47,7 +47,7 @@ typedef Eet_Data_Descriptor E_Config_DD;
* defaults for e to work - started at 100 when we introduced this config
* versioning feature
*/
#define E_CONFIG_FILE_VERSION 119
#define E_CONFIG_FILE_VERSION 120
#define E_EVAS_ENGINE_DEFAULT 0
#define E_EVAS_ENGINE_SOFTWARE_X11 1

View File

@ -13,15 +13,24 @@
/* local subsystem functions */
static void _e_container_free(E_Container *con);
static E_Container *_e_container_find_by_event_window(Ecore_X_Window win);
static int _e_container_cb_mouse_in(void *data, int type, void *event);
static int _e_container_cb_mouse_out(void *data, int type, void *event);
static int _e_container_cb_mouse_down(void *data, int type, void *event);
static int _e_container_cb_mouse_up(void *data, int type, void *event);
static int _e_container_cb_mouse_move(void *data, int type, void *event);
static int _e_container_cb_mouse_wheel(void *data, int type, void *event);
static void _e_container_shape_del(E_Container_Shape *es);
static void _e_container_shape_free(E_Container_Shape *es);
static void _e_container_shape_change_call(E_Container_Shape *es, E_Container_Shape_Change ch);
static void _e_container_resize_handle(E_Container *con);
static void _e_container_event_container_resize_free(void *data, void *ev);
static void _e_container_cb_mouse_in(Ecore_Evas *ee);
int E_EVENT_CONTAINER_RESIZE = 0;
static int container_count;
static Evas_List *handlers = NULL;
/* externally accessible functions */
int
@ -29,12 +38,24 @@ e_container_init(void)
{
E_EVENT_CONTAINER_RESIZE = ecore_event_type_new();
container_count = 0;
handlers = evas_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_MOUSE_IN, _e_container_cb_mouse_in, NULL));
handlers = evas_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_MOUSE_OUT, _e_container_cb_mouse_out, NULL));
handlers = evas_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_DOWN, _e_container_cb_mouse_down, NULL));
handlers = evas_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_UP, _e_container_cb_mouse_up, NULL));
handlers = evas_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_MOUSE_MOVE, _e_container_cb_mouse_move, NULL));
handlers = evas_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_MOUSE_WHEEL, _e_container_cb_mouse_wheel, NULL));
return 1;
}
int
e_container_shutdown(void)
{
while (handlers)
{
ecore_event_handler_del(handlers->data);
handlers = evas_list_remove_list(handlers, handlers);
}
return 1;
}
@ -82,7 +103,8 @@ e_container_new(E_Manager *man)
ecore_evas_override_set(con->bg_ecore_evas, 1);
con->bg_win = ecore_evas_software_x11_window_get(con->bg_ecore_evas);
}
ecore_evas_callback_mouse_in_set(con->bg_ecore_evas, _e_container_cb_mouse_in);
con->event_win = ecore_x_window_input_new(con->bg_win, 0, 0, con->w, con->h);
ecore_x_window_show(con->event_win);
e_canvas_add(con->bg_ecore_evas);
con->bg_evas = ecore_evas_get(con->bg_ecore_evas);
ecore_evas_name_class_set(con->bg_ecore_evas, "E", "Background_Window");
@ -868,6 +890,7 @@ _e_container_free(E_Container *con)
Evas_List *l, *tmp;
int i;
ecore_x_window_del(con->event_win);
if (con->gadman) e_object_del(E_OBJECT(con->gadman));
/* We can't use e_object_del here, because border adds a ref to itself
* when it is removed, and the ref is never unref'ed */
@ -897,6 +920,134 @@ _e_container_free(E_Container *con)
free(con->name);
free(con);
}
static E_Container *
_e_container_find_by_event_window(Ecore_X_Window win)
{
Evas_List *managers, *l;
managers = e_manager_list();
for (l = managers; l; l = l->next)
{
Evas_List *ll;
E_Manager *man;
man = l->data;
for (ll = man->containers; ll; ll = ll->next)
{
E_Container *con;
con = ll->data;
if (con->event_win == win) return con;
}
}
return NULL;
}
static int
_e_container_cb_mouse_in(void *data, int type, void *event)
{
Ecore_X_Event_Mouse_In *ev;
E_Border *bd;
E_Container *con;
ev = event;
con = _e_container_find_by_event_window(ev->event_win);
if (con)
{
bd = e_border_focused_get();
if (bd) e_focus_event_mouse_out(bd);
evas_event_feed_mouse_move(con->bg_evas, ev->x, ev->y, ev->time, NULL);
evas_event_feed_mouse_in(con->bg_evas, ev->time, NULL);
}
return 1;
}
static int
_e_container_cb_mouse_out(void *data, int type, void *event)
{
Ecore_X_Event_Mouse_Out *ev;
E_Container *con;
ev = event;
con = _e_container_find_by_event_window(ev->event_win);
if (con)
{
evas_event_feed_mouse_move(con->bg_evas, ev->x, ev->y, ev->time, NULL);
evas_event_feed_mouse_out(con->bg_evas, ev->time, NULL);
}
return 1;
}
static int
_e_container_cb_mouse_down(void *data, int type, void *event)
{
Ecore_X_Event_Mouse_Button_Down *ev;
E_Container *con;
ev = event;
con = _e_container_find_by_event_window(ev->event_win);
if (con)
{
Evas_Button_Flags flags = EVAS_BUTTON_NONE;
e_bindings_mouse_down_event_handle(E_BINDING_CONTEXT_CONTAINER,
E_OBJECT(con), ev);
if (ev->double_click) flags |= EVAS_BUTTON_DOUBLE_CLICK;
if (ev->triple_click) flags |= EVAS_BUTTON_TRIPLE_CLICK;
evas_event_feed_mouse_move(con->bg_evas, ev->x, ev->y, ev->time, NULL);
evas_event_feed_mouse_down(con->bg_evas, ev->button, flags, ev->time, NULL);
}
return 1;
}
static int
_e_container_cb_mouse_up(void *data, int type, void *event)
{
Ecore_X_Event_Mouse_Button_Up *ev;
E_Container *con;
ev = event;
con = _e_container_find_by_event_window(ev->event_win);
if (con)
{
evas_event_feed_mouse_move(con->bg_evas, ev->x, ev->y, ev->time, NULL);
evas_event_feed_mouse_up(con->bg_evas, ev->button, EVAS_BUTTON_NONE, ev->time, NULL);
e_bindings_mouse_up_event_handle(E_BINDING_CONTEXT_CONTAINER,
E_OBJECT(con), ev);
}
return 1;
}
static int
_e_container_cb_mouse_move(void *data, int type, void *event)
{
Ecore_X_Event_Mouse_Move *ev;
E_Container *con;
ev = event;
con = _e_container_find_by_event_window(ev->event_win);
if (con)
{
evas_event_feed_mouse_move(con->bg_evas, ev->x, ev->y, ev->time, NULL);
}
return 1;
}
static int
_e_container_cb_mouse_wheel(void *data, int type, void *event)
{
Ecore_X_Event_Mouse_Wheel *ev;
E_Container *con;
ev = event;
con = _e_container_find_by_event_window(ev->event_win);
if (con)
{
evas_event_feed_mouse_wheel(con->bg_evas, ev->direction, ev->z, ev->time, NULL);
}
return 1;
}
static void
_e_container_shape_del(E_Container_Shape *es)
@ -1013,19 +1164,3 @@ _e_container_event_container_resize_free(void *data, void *ev)
e_object_unref(E_OBJECT(e->container));
free(e);
}
static void
_e_container_cb_mouse_in(Ecore_Evas *ee)
{
Evas *evas;
Evas_Object *o;
E_Container *con;
E_Border *bd;
evas = ecore_evas_get(ee);
o = evas_object_name_find(evas, "desktop/background");
if (!o) return;
con = evas_object_data_get(o, "e_container");
bd = e_border_focused_get();
if (bd) e_focus_event_mouse_out(bd);
}

View File

@ -44,6 +44,7 @@ struct _E_Container
Evas *bg_evas;
Evas_Object *bg_blank_object;
Ecore_X_Window bg_win;
Ecore_X_Window event_win;
Evas_List *shapes;
Evas_List *shape_change_cb;
@ -135,7 +136,7 @@ EAPI void e_container_border_stack_below(E_Border *bd, E_Border *b
EAPI void e_container_all_freeze(void);
EAPI void e_container_all_thaw(void);
extern EAPI int E_EVENT_CONTAINER_RESIZE;
#endif

View File

@ -36,7 +36,6 @@ e_focus_event_mouse_in(E_Border* bd)
if (!bd->lock_focus_out)
e_border_focus_set(bd, 1, 1);
}
bd->raise_timer = NULL;
if (e_config->use_auto_raise)
{
@ -58,7 +57,6 @@ e_focus_event_mouse_out(E_Border* bd)
if (!bd->lock_focus_in)
e_border_focus_set(bd, 0, 1);
}
if (bd->raise_timer)
{
ecore_timer_del(bd->raise_timer);

View File

@ -127,12 +127,22 @@ e_gadman_mode_set(E_Gadman *gm, E_Gadman_Mode mode)
if (gm->mode == E_GADMAN_MODE_EDIT)
{
for (l = gm->clients; l; l = l->next)
_e_gadman_client_edit_begin(l->data);
{
E_Gadman_Client *gmc;
gmc = l->data;
_e_gadman_client_edit_begin(gmc);
}
}
else if (gm->mode == E_GADMAN_MODE_NORMAL)
{
for (l = gm->clients; l; l = l->next)
_e_gadman_client_edit_end(l->data);
{
E_Gadman_Client *gmc;
gmc = l->data;
_e_gadman_client_edit_end(gmc);
}
}
}
@ -282,6 +292,9 @@ e_gadman_client_load(E_Gadman_Client *gmc)
gmc->y = gmc->zone->y;
free(cf);
}
else
{
}
_e_gadman_client_overlap_deny(gmc);
e_object_ref(E_OBJECT(gmc));
if (!e_object_is_del(E_OBJECT(gmc)))
@ -717,6 +730,15 @@ _e_gadman_client_edit_begin(E_Gadman_Client *gmc)
static void
_e_gadman_client_edit_end(E_Gadman_Client *gmc)
{
if (gmc->moving) e_move_end();
if ((gmc->resizing_l) || (gmc->resizing_r) ||
(gmc->resizing_u) || (gmc->resizing_d))
e_resize_end();
gmc->moving = 0;
gmc->resizing_l = 0;
gmc->resizing_r = 0;
gmc->resizing_u = 0;
gmc->resizing_d = 0;
evas_object_del(gmc->control_object);
gmc->control_object = NULL;
evas_object_del(gmc->event_object);

View File

@ -198,8 +198,10 @@ E_Menu *
e_int_menus_config_apps_new(void)
{
E_Menu *m;
char buf[4096];
m = e_int_menus_apps_new(PACKAGE_DATA_DIR "/config-apps");
snprintf(buf, sizeof(buf), "%s/config-apps", e_prefix_data_get());
m = e_int_menus_apps_new(buf);
return m;
}

View File

@ -112,7 +112,7 @@ void
e_intl_language_set(const char *lang)
{
/* 1 list ~/.e/e/locale contents */
/* 2 list LOCALE_DIR contents */
/* 2 list e_preifx_locale_get() contents */
/* FIXME: determine if in user or system locale dir */
if (_e_intl_language) free(_e_intl_language);
@ -149,7 +149,7 @@ e_intl_language_set(const char *lang)
else
printf("An error occured trying to use the default locale\n");
}
bindtextdomain(PACKAGE, LOCALE_DIR);
bindtextdomain(PACKAGE, e_prefix_locale_get());
textdomain(PACKAGE);
// XSetLocaleModifiers("");
bind_textdomain_codeset(PACKAGE, "UTF-8");

View File

@ -2008,7 +2008,10 @@ break;
else if (v->val1 == E_BINDING_CONTEXT_UNKNOWN) context = "UNKNOWN";
else if (v->val1 == E_BINDING_CONTEXT_BORDER) context = "BORDER";
else if (v->val1 == E_BINDING_CONTEXT_ZONE) context = "ZONE";
else if (v->val1 == E_BINDING_CONTEXT_CONTAINER) context = "CONTAINER";
else if (v->val1 == E_BINDING_CONTEXT_MANAGER) context = "MANAGER";
else if (v->val1 == E_BINDING_CONTEXT_MENU) context = "MENU";
else if (v->val1 == E_BINDING_CONTEXT_WINLIST) context = "WINLIST";
else if (v->val1 == E_BINDING_CONTEXT_ANY) context = "ANY";
else context = "";
@ -2064,12 +2067,15 @@ break;
else if (!strcmp(params[0], "UNKNOWN")) eb.context = E_BINDING_CONTEXT_UNKNOWN;
else if (!strcmp(params[0], "BORDER")) eb.context = E_BINDING_CONTEXT_BORDER;
else if (!strcmp(params[0], "ZONE")) eb.context = E_BINDING_CONTEXT_ZONE;
else if (!strcmp(params[0], "CONTAINER")) eb.context = E_BINDING_CONTEXT_CONTAINER;
else if (!strcmp(params[0], "MANAGER")) eb.context = E_BINDING_CONTEXT_MANAGER;
else if (!strcmp(params[0], "MENU")) eb.context = E_BINDING_CONTEXT_MENU;
else if (!strcmp(params[0], "WINLIST")) eb.context = E_BINDING_CONTEXT_WINLIST;
else if (!strcmp(params[0], "ANY")) eb.context = E_BINDING_CONTEXT_ANY;
else
{
printf("OPT1 (CONTEXT) is not a valid context. Must be:\n"
" NONE UNKNOWN BORDER ZONE MANAGER ANY\n");
" NONE UNKNOWN BORDER ZONE CONTAINER MANAGER MENU WINLIST ANY\n");
exit(-1);
}
eb.button = atoi(params[1]);
@ -2166,12 +2172,15 @@ break;
else if (!strcmp(params[0], "UNKNOWN")) eb.context = E_BINDING_CONTEXT_UNKNOWN;
else if (!strcmp(params[0], "BORDER")) eb.context = E_BINDING_CONTEXT_BORDER;
else if (!strcmp(params[0], "ZONE")) eb.context = E_BINDING_CONTEXT_ZONE;
else if (!strcmp(params[0], "CONTAINER")) eb.context = E_BINDING_CONTEXT_CONTAINER;
else if (!strcmp(params[0], "MANAGER")) eb.context = E_BINDING_CONTEXT_MANAGER;
else if (!strcmp(params[0], "MENU")) eb.context = E_BINDING_CONTEXT_MENU;
else if (!strcmp(params[0], "WINLIST")) eb.context = E_BINDING_CONTEXT_WINLIST;
else if (!strcmp(params[0], "ANY")) eb.context = E_BINDING_CONTEXT_ANY;
else
{
printf("OPT1 (CONTEXT) is not a valid context. Must be:\n"
" NONE UNKNOWN BORDER ZONE MANAGER ANY\n");
" NONE UNKNOWN BORDER ZONE CONTAINER MANAGER MENU WINLIST ANY\n");
exit(-1);
}
eb.button = atoi(params[1]);
@ -2290,7 +2299,10 @@ break;
else if (v->val1 == E_BINDING_CONTEXT_UNKNOWN) context = "UNKNOWN";
else if (v->val1 == E_BINDING_CONTEXT_BORDER) context = "BORDER";
else if (v->val1 == E_BINDING_CONTEXT_ZONE) context = "ZONE";
else if (v->val1 == E_BINDING_CONTEXT_CONTAINER) context = "CONTAINER";
else if (v->val1 == E_BINDING_CONTEXT_MANAGER) context = "MANAGER";
else if (v->val1 == E_BINDING_CONTEXT_MENU) context = "MENU";
else if (v->val1 == E_BINDING_CONTEXT_WINLIST) context = "WINLIST";
else if (v->val1 == E_BINDING_CONTEXT_ANY) context = "ANY";
else context = "";
@ -2345,13 +2357,16 @@ break;
else if (!strcmp(params[0], "UNKNOWN")) eb.context = E_BINDING_CONTEXT_UNKNOWN;
else if (!strcmp(params[0], "BORDER")) eb.context = E_BINDING_CONTEXT_BORDER;
else if (!strcmp(params[0], "ZONE")) eb.context = E_BINDING_CONTEXT_ZONE;
else if (!strcmp(params[0], "CONTAINER")) eb.context = E_BINDING_CONTEXT_CONTAINER;
else if (!strcmp(params[0], "MANAGER")) eb.context = E_BINDING_CONTEXT_MANAGER;
else if (!strcmp(params[0], "MENU")) eb.context = E_BINDING_CONTEXT_MENU;
else if (!strcmp(params[0], "WINLIST")) eb.context = E_BINDING_CONTEXT_WINLIST;
else if (!strcmp(params[0], "ANY")) eb.context = E_BINDING_CONTEXT_ANY;
else
{
printf("OPT1 (CONTEXT) is not a valid context. Must be:\n"
" NONE UNKNOWN BORDER ZONE MANAGER ANY\n");
exit(-1);
printf("OPT1 (CONTEXT) is not a valid context. Must be:\n"
" NONE UNKNOWN BORDER ZONE CONTAINER MANAGER MENU WINLIST ANY\n");
exit(-1);
}
eb.key = params[1];
/* M1[|M2...] */
@ -2446,13 +2461,16 @@ break;
else if (!strcmp(params[0], "UNKNOWN")) eb.context = E_BINDING_CONTEXT_UNKNOWN;
else if (!strcmp(params[0], "BORDER")) eb.context = E_BINDING_CONTEXT_BORDER;
else if (!strcmp(params[0], "ZONE")) eb.context = E_BINDING_CONTEXT_ZONE;
else if (!strcmp(params[0], "CONTAINER")) eb.context = E_BINDING_CONTEXT_CONTAINER;
else if (!strcmp(params[0], "MANAGER")) eb.context = E_BINDING_CONTEXT_MANAGER;
else if (!strcmp(params[0], "MENU")) eb.context = E_BINDING_CONTEXT_MENU;
else if (!strcmp(params[0], "WINLIST")) eb.context = E_BINDING_CONTEXT_WINLIST;
else if (!strcmp(params[0], "ANY")) eb.context = E_BINDING_CONTEXT_ANY;
else
{
printf("OPT1 (CONTEXT) is not a valid context. Must be:\n"
" NONE UNKNOWN BORDER ZONE MANAGER ANY\n");
exit(-1);
printf("OPT1 (CONTEXT) is not a valid context. Must be:\n"
" NONE UNKNOWN BORDER ZONE CONTAINER MANAGER MENU WINLIST ANY\n");
exit(-1);
}
eb.key = params[1];
/* M1[|M2...] */

View File

@ -111,7 +111,38 @@ main(int argc, char **argv)
" This is because it is not on Linux AND has been\n"
" Executed strangely. This is unusual.\n"
);
exit(-1);
e_prefix_fallback();
}
else
{
/* do some extra tests to see if the prefix really is right */
char buf[4096];
snprintf(buf, sizeof(buf), "%s/data/themes/default.edj",
e_prefix_data_get());
if (!ecore_file_exists(buf))
{
printf("WARNING: Prefix guess was wrong. Guessed:\n"
" %s\n"
" Tried to find file:\n"
" %s\n",
e_prefix_get(), buf);
e_prefix_fallback();
}
else
{
snprintf(buf, sizeof(buf), "%s/enlightenment/modules",
e_prefix_data_get());
if (!ecore_file_is_dir(buf))
{
printf("WARNING: Prefix guess was wrong. Guessed:\n"
" %s\n"
" Tried to find directory:\n"
" %s\n",
e_prefix_get(), buf);
e_prefix_fallback();
}
}
}
/* for debugging by redirecting stdout of e to a log file to tail */
@ -667,7 +698,7 @@ _e_main_dirs_init(void)
snprintf(buf, sizeof(buf),
"gzip -d -c < %s/data/other/applications.tar.gz | "
"(cd %s/.e/e/ ; tar -xf -)",
PACKAGE_DATA_DIR,
e_prefix_data_get(),
homedir);
system(buf);
}
@ -766,6 +797,8 @@ _e_main_screens_shutdown(void)
static int
_e_main_path_init(void)
{
char buf[4096];
/* setup data paths */
path_data = e_path_new();
if (!path_data)
@ -773,7 +806,8 @@ _e_main_path_init(void)
e_error_message_show("Cannot allocate path for path_data\n");
return 0;
}
e_path_default_path_append(path_data, PACKAGE_DATA_DIR"/data");
snprintf(buf, sizeof(buf), "%s/data", e_prefix_data_get());
e_path_default_path_append(path_data, buf);
e_path_user_path_set(path_data, &(e_config->path_append_data));
/* setup image paths */
@ -784,7 +818,8 @@ _e_main_path_init(void)
return 0;
}
e_path_default_path_append(path_images, "~/.e/e/images");
e_path_default_path_append(path_images, PACKAGE_DATA_DIR"/data/images");
snprintf(buf, sizeof(buf), "%s/data/images", e_prefix_data_get());
e_path_default_path_append(path_images, buf);
e_path_user_path_set(path_images, &(e_config->path_append_images));
/* setup font paths */
@ -795,7 +830,8 @@ _e_main_path_init(void)
return 0;
}
e_path_default_path_append(path_fonts, "~/.e/e/fonts");
e_path_default_path_append(path_fonts, PACKAGE_DATA_DIR"/data/fonts");
snprintf(buf, sizeof(buf), "%s/data/fonts", e_prefix_data_get());
e_path_default_path_append(path_fonts, buf);
e_path_user_path_set(path_fonts, &(e_config->path_append_fonts));
/* setup theme paths */
@ -806,7 +842,8 @@ _e_main_path_init(void)
return 0;
}
e_path_default_path_append(path_themes, "~/.e/e/themes");
e_path_default_path_append(path_themes, PACKAGE_DATA_DIR"/data/themes");
snprintf(buf, sizeof(buf), "%s/data/themes", e_prefix_data_get());
e_path_default_path_append(path_themes, buf);
e_path_user_path_set(path_themes, &(e_config->path_append_themes));
/* setup icon paths */
@ -817,7 +854,8 @@ _e_main_path_init(void)
return 0;
}
e_path_default_path_append(path_icons, "~/.e/e/icons");
e_path_default_path_append(path_icons, PACKAGE_DATA_DIR"/data/icons");
snprintf(buf, sizeof(buf), "%s/data/icons", e_prefix_data_get());
e_path_default_path_append(path_icons, buf);
e_path_user_path_set(path_icons, &(e_config->path_append_icons));
/* setup init paths */
@ -828,7 +866,8 @@ _e_main_path_init(void)
return 0;
}
e_path_default_path_append(path_init, "~/.e/e/init");
e_path_default_path_append(path_init, PACKAGE_DATA_DIR"/data/init");
snprintf(buf, sizeof(buf), "%s/data/init", e_prefix_data_get());
e_path_default_path_append(path_init, buf);
e_path_user_path_set(path_init, &(e_config->path_append_init));
/* setup module paths */
@ -839,8 +878,14 @@ _e_main_path_init(void)
return 0;
}
e_path_default_path_append(path_modules, "~/.e/e/modules");
e_path_default_path_append(path_modules, PACKAGE_LIB_DIR"/enlightenment/modules");
e_path_default_path_append(path_modules, PACKAGE_LIB_DIR"/enlightenment/modules_extra");
snprintf(buf, sizeof(buf), "%s/enlightenment/modules", e_preifx_lib_get());
e_path_default_path_append(path_modules, buf);
/* FIXME: eventually this has to go - moduels shoudl have installers that
* add appropriate install paths (if not installed to user homedir) to
* e's module search dirs
*/
snprintf(buf, sizeof(buf), "%s/enlightenment/modules_extra", e_preifx_lib_get());
e_path_default_path_append(path_modules, buf);
e_path_user_path_set(path_modules, &(e_config->path_append_modules));
/* setup background paths */

View File

@ -17,7 +17,8 @@ e_place_zone_region_smart_cleanup(E_Zone *zone)
while ((border = e_container_border_list_next(bl)))
{
/* Build a list of windows on this desktop and not iconified. */
if ((border->desk == desk) && !(border->iconic))
if ((border->desk == desk) && (!border->iconic) &&
(!border->lock_user_location))
{
int area;
Evas_List *ll;
@ -27,8 +28,9 @@ e_place_zone_region_smart_cleanup(E_Zone *zone)
for (ll = borders; ll; ll = ll->next)
{
int testarea;
E_Border *bd = ll->data;
E_Border *bd;
bd = ll->data;
testarea = bd->w * bd->h;
/* Insert the border if larger than the current border */
if (area >= testarea)

View File

@ -4,28 +4,38 @@
#include "e.h"
/* local subsystem functions */
static int _e_prefix_fallbacks(void);
static int _e_prefix_try_proc(void);
static int _e_prefix_try_argv(char *argv0);
/* local subsystem globals */
static char *_exe_path = NULL;
static char *_prefix_path = NULL;
static char *_prefix_path_locale = NULL;
static char *_prefix_path_bin = NULL;
static char *_prefix_path_data = NULL;
static char *_prefix_path_lib = NULL;
/* externally accessible functions */
int
e_prefix_determine(char *argv0)
{
char *p;
if (_exe_path) free(_exe_path);
_exe_path = NULL;
if (_prefix_path) free(_prefix_path);
_prefix_path = NULL;
IF_FREE(_exe_path);
IF_FREE(_prefix_path);
IF_FREE(_prefix_path_locale);
IF_FREE(_prefix_path_bin);
IF_FREE(_prefix_path_data);
IF_FREE(_prefix_path_lib);
if (!_e_prefix_try_proc())
{
if (!_e_prefix_try_argv(argv0))
return 0;
{
_e_prefix_fallbacks();
return 0;
}
}
/* _exe_path is now a full absolute path TO this exe - figure out rest */
/* if
@ -50,6 +60,27 @@ e_prefix_determine(char *argv0)
{
strncpy(_prefix_path, _exe_path, p - _exe_path);
_prefix_path[p - _exe_path] = 0;
_prefix_path_locale = malloc(strlen(_prefix_path) + 1 +
strlen("/share/locale"));
strcpy(_prefix_path_locale, _prefix_path);
strcat(_prefix_path_locale, "/share/locale");
_prefix_path_bin = malloc(strlen(_prefix_path) + 1 +
strlen("/bin"));
strcpy(_prefix_path_bin, _prefix_path);
strcat(_prefix_path_bin, "/bin");
_prefix_path_data = malloc(strlen(_prefix_path) + 1 +
strlen("/share/enlightenment"));
strcpy(_prefix_path_data, _prefix_path);
strcat(_prefix_path_data, "/share/enlightenment");
_prefix_path_lib = malloc(strlen(_prefix_path) + 1 +
strlen("/lib"));
strcpy(_prefix_path_lib, _prefix_path);
strcat(_prefix_path_lib, "/lib");
printf("DYNAMIC DETERMINED PREFIX: %s\n", _prefix_path);
return 1;
}
@ -57,6 +88,7 @@ e_prefix_determine(char *argv0)
{
free(_exe_path);
_exe_path = NULL;
_e_prefix_fallbacks();
return 0;
}
}
@ -65,16 +97,70 @@ e_prefix_determine(char *argv0)
}
free(_exe_path);
_exe_path = NULL;
_e_prefix_fallbacks();
return 0;
}
void
e_prefix_fallback(void)
{
IF_FREE(_exe_path);
IF_FREE(_prefix_path);
IF_FREE(_prefix_path_locale);
IF_FREE(_prefix_path_bin);
IF_FREE(_prefix_path_data);
IF_FREE(_prefix_path_lib);
_e_prefix_fallbacks();
}
const char *
e_prefix_get(void)
{
return _prefix_path;
}
const char *
e_prefix_locale_get(void)
{
return _prefix_path_locale;
}
const char *
e_preifx_bin_get(void)
{
return _prefix_path_bin;
}
const char *
e_prefix_data_get(void)
{
return _prefix_path_data;
}
const char *
e_preifx_lib_get(void)
{
return _prefix_path_lib;
}
/* local subsystem functions */
static int
_e_prefix_fallbacks(void)
{
char *p;
_prefix_path = strdup(PACKAGE_BIN_DIR);
p = strrchr(_prefix_path, '/');
if (p) *p = 0;
_prefix_path_locale = strdup(LOCALE_DIR);
_prefix_path_bin = strdup(PACKAGE_BIN_DIR);
_prefix_path_data = strdup(PACKAGE_DATA_DIR);
_prefix_path_lib = strdup(PACKAGE_LIB_DIR);
printf("WARNING: Enlightenment could not determine its installed prefix\n"
" and is falling back on the compiled in default:\n"
" %s\n", _prefix_path);
}
static int
_e_prefix_try_proc(void)
{

View File

@ -8,7 +8,12 @@
#define E_PREFIX_H
EAPI int e_prefix_determine(char *argv0);
EAPI void e_prefix_fallback(void);
EAPI const char *e_prefix_get(void);
EAPI const char *e_prefix_locale_get(void);
EAPI const char *e_prefix_bin_get(void);
EAPI const char *e_prefix_data_get(void);
EAPI const char *e_prefix_lib_get(void);
#endif
#endif

View File

@ -85,7 +85,6 @@ e_zone_new(E_Container *con, int num, int x, int y, int w, int h)
evas_object_move(o, x, y);
evas_object_resize(o, w, h);
evas_object_color_set(o, 255, 255, 255, 255);
evas_object_repeat_events_set(o, 1);
evas_object_show(o);
o = evas_object_rectangle_add(con->bg_evas);
@ -94,6 +93,7 @@ e_zone_new(E_Container *con, int num, int x, int y, int w, int h)
evas_object_move(o, x, y);
evas_object_resize(o, w, h);
evas_object_color_set(o, 255, 255, 255, 0);
evas_object_repeat_events_set(o, 1);
evas_object_show(o);
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, _e_zone_cb_bg_mouse_down, zone);
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_UP, _e_zone_cb_bg_mouse_up, zone);
@ -581,8 +581,9 @@ e_zone_app_exec(E_Zone *zone, E_App *a)
e_util_env_set("E_MANAGER", buf);
snprintf(buf, sizeof(buf), "%i", launch_id);
e_util_env_set("E_LAUNCH_ID", buf);
e_util_env_set("LD_PRELOAD_PATH", PACKAGE_LIB_DIR"/enlightenment/preload");
e_util_env_set("LD_PRELOAD", PACKAGE_LIB_DIR"/enlightenment/preload/e_hack.so");
snprintf(buf, sizeof(buf), "%s/enlightenment/preload", e_prefix_lib_get());
e_util_env_set("LD_PRELOAD_PATH", buf);
snprintf(buf, sizeof(buf), "%s/enlightenment/preload/e_hack.so", e_prefix_lib_get());
*/
launch_id++;
if (launch_id == 0) launch_id = 1;