1. more TODO

2. fix gadman resize with aspect from going off screen
3. add handy exit edit mdoe in gadget right menu


SVN revision: 13084
This commit is contained in:
Carsten Haitzler 2005-01-24 15:22:47 +00:00
parent f4f54fc103
commit 4bb0338026
3 changed files with 95 additions and 11 deletions

8
TODO
View File

@ -29,12 +29,17 @@ Current freeze issues are:
ISSUES:
* clock module needs fixing to have right click menu per face
* clock module should only make 1 clock per container and allow u to enable/disable that clock on that container
* same for ibar, temperature and battery modules ad for clock
* pager needs 1 pager face per zone by default (optionally able to be turned off)
* pager needs to be able to split off each desk in a zone it a different gadget
* initial placement of pager and clock seems wrong (overlap deny code?)
* gadman resize if dear an edge may allow the gadget to go partially off screen
* gadman overlay deny doesnt work for edge only gadgets
* gadman gadget menu needs icons :)
* add a menu item to each gadman client menu to edge editing mode
* pager needs an overhaul
* virtual desktops need an overhaul. hacked int waay too quickly.
* virtual desktops need fixing to work with zones properly
* all modules need to respect zones
* dropshadow is not optimal and has extreme edge-case bugs
@ -43,7 +48,6 @@ ISSUES:
* border show/hide needs to show from top down and hide from bottom up
* restart loses window properties (stickyness)
* restart loses zone and container info
* virtual desktops need an overhaul. hacked int waay too quickly.
<add more issues as they are found>

View File

@ -65,6 +65,8 @@ static void _e_gadman_cb_full_height(void *data, E_Menu *m, E_Menu_Item *mi);
static void _e_gadman_cb_auto_height(void *data, E_Menu *m, E_Menu_Item *mi);
static void _e_gadman_cb_center_vert(void *data, E_Menu *m, E_Menu_Item *mi);
static void _e_gadman_cb_end_edit_mode(void *data, E_Menu *m, E_Menu_Item *mi);
static E_Config_DD *gadman_config_edd = NULL;
/* externally accessible functions */
@ -530,6 +532,11 @@ e_gadman_client_menu_new(E_Gadman_Client *gmc)
"center_vert");
e_menu_item_callback_set(mi, _e_gadman_cb_center_vert, gmc);
}
mi = e_menu_item_new(m);
e_menu_item_separator_set(mi, 1);
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, "End Edit Mode");
e_menu_item_callback_set(mi, _e_gadman_cb_end_edit_mode, gmc);
return m;
}
@ -1132,6 +1139,14 @@ _e_gadman_cb_signal_resize_left_go(void *data, Evas_Object *obj, const char *emi
}
}
_e_gadman_client_aspect_enforce(gmc, 1.0, 0.5, 1);
if (gmc->x < gmc->zone->x)
gmc->x = gmc->zone->x;
else if ((gmc->x + gmc->w) > (gmc->zone->x + gmc->zone->w))
gmc->x = gmc->zone->x + gmc->zone->w - gmc->w;
if (gmc->y < gmc->zone->y)
gmc->y = gmc->zone->y;
else if ((gmc->y + gmc->h) > (gmc->zone->y + gmc->zone->h))
gmc->y = gmc->zone->y + gmc->zone->h - gmc->h;
_e_gadman_client_geometry_to_align(gmc);
_e_gadman_client_geometry_apply(gmc);
_e_gadman_client_callback_call(gmc, E_GADMAN_CHANGE_MOVE_RESIZE);
@ -1197,6 +1212,14 @@ _e_gadman_cb_signal_resize_right_go(void *data, Evas_Object *obj, const char *em
}
}
_e_gadman_client_aspect_enforce(gmc, 0.0, 0.5, 1);
if (gmc->x < gmc->zone->x)
gmc->x = gmc->zone->x;
else if ((gmc->x + gmc->w) > (gmc->zone->x + gmc->zone->w))
gmc->x = gmc->zone->x + gmc->zone->w - gmc->w;
if (gmc->y < gmc->zone->y)
gmc->y = gmc->zone->y;
else if ((gmc->y + gmc->h) > (gmc->zone->y + gmc->zone->h))
gmc->y = gmc->zone->y + gmc->zone->h - gmc->h;
_e_gadman_client_geometry_to_align(gmc);
_e_gadman_client_geometry_apply(gmc);
_e_gadman_client_callback_call(gmc, E_GADMAN_CHANGE_MOVE_RESIZE);
@ -1266,6 +1289,14 @@ _e_gadman_cb_signal_resize_up_go(void *data, Evas_Object *obj, const char *emiss
}
}
_e_gadman_client_aspect_enforce(gmc, 0.5, 1.0, 0);
if (gmc->x < gmc->zone->x)
gmc->x = gmc->zone->x;
else if ((gmc->x + gmc->w) > (gmc->zone->x + gmc->zone->w))
gmc->x = gmc->zone->x + gmc->zone->w - gmc->w;
if (gmc->y < gmc->zone->y)
gmc->y = gmc->zone->y;
else if ((gmc->y + gmc->h) > (gmc->zone->y + gmc->zone->h))
gmc->y = gmc->zone->y + gmc->zone->h - gmc->h;
_e_gadman_client_geometry_to_align(gmc);
_e_gadman_client_geometry_apply(gmc);
_e_gadman_client_callback_call(gmc, E_GADMAN_CHANGE_MOVE_RESIZE);
@ -1331,6 +1362,14 @@ _e_gadman_cb_signal_resize_down_go(void *data, Evas_Object *obj, const char *emi
}
}
_e_gadman_client_aspect_enforce(gmc, 0.5, 0.0, 0);
if (gmc->x < gmc->zone->x)
gmc->x = gmc->zone->x;
else if ((gmc->x + gmc->w) > (gmc->zone->x + gmc->zone->w))
gmc->x = gmc->zone->x + gmc->zone->w - gmc->w;
if (gmc->y < gmc->zone->y)
gmc->y = gmc->zone->y;
else if ((gmc->y + gmc->h) > (gmc->zone->y + gmc->zone->h))
gmc->y = gmc->zone->y + gmc->zone->h - gmc->h;
_e_gadman_client_geometry_to_align(gmc);
_e_gadman_client_geometry_apply(gmc);
_e_gadman_client_callback_call(gmc, E_GADMAN_CHANGE_MOVE_RESIZE);
@ -1360,6 +1399,14 @@ _e_gadman_cb_half_width(void *data, E_Menu *m, E_Menu_Item *mi)
}
gmc->use_autow = 0;
_e_gadman_client_aspect_enforce(gmc, 0.0, 0.5, 1);
if (gmc->x < gmc->zone->x)
gmc->x = gmc->zone->x;
else if ((gmc->x + gmc->w) > (gmc->zone->x + gmc->zone->w))
gmc->x = gmc->zone->x + gmc->zone->w - gmc->w;
if (gmc->y < gmc->zone->y)
gmc->y = gmc->zone->y;
else if ((gmc->y + gmc->h) > (gmc->zone->y + gmc->zone->h))
gmc->y = gmc->zone->y + gmc->zone->h - gmc->h;
_e_gadman_client_geometry_apply(gmc);
_e_gadman_client_geometry_to_align(gmc);
e_gadman_client_save(gmc);
@ -1381,6 +1428,14 @@ _e_gadman_cb_full_width(void *data, E_Menu *m, E_Menu_Item *mi)
gmc->x = gmc->zone->x + ((gmc->zone->w - gmc->w) / 2);
gmc->use_autow = 0;
_e_gadman_client_aspect_enforce(gmc, 0.0, 0.5, 1);
if (gmc->x < gmc->zone->x)
gmc->x = gmc->zone->x;
else if ((gmc->x + gmc->w) > (gmc->zone->x + gmc->zone->w))
gmc->x = gmc->zone->x + gmc->zone->w - gmc->w;
if (gmc->y < gmc->zone->y)
gmc->y = gmc->zone->y;
else if ((gmc->y + gmc->h) > (gmc->zone->y + gmc->zone->h))
gmc->y = gmc->zone->y + gmc->zone->h - gmc->h;
_e_gadman_client_geometry_apply(gmc);
_e_gadman_client_geometry_to_align(gmc);
e_gadman_client_save(gmc);
@ -1437,6 +1492,14 @@ _e_gadman_cb_half_height(void *data, E_Menu *m, E_Menu_Item *mi)
}
gmc->use_autoh = 0;
_e_gadman_client_aspect_enforce(gmc, 0.5, 0.0, 0);
if (gmc->x < gmc->zone->x)
gmc->x = gmc->zone->x;
else if ((gmc->x + gmc->w) > (gmc->zone->x + gmc->zone->w))
gmc->x = gmc->zone->x + gmc->zone->w - gmc->w;
if (gmc->y < gmc->zone->y)
gmc->y = gmc->zone->y;
else if ((gmc->y + gmc->h) > (gmc->zone->y + gmc->zone->h))
gmc->y = gmc->zone->y + gmc->zone->h - gmc->h;
_e_gadman_client_geometry_apply(gmc);
_e_gadman_client_geometry_to_align(gmc);
e_gadman_client_save(gmc);
@ -1458,6 +1521,14 @@ _e_gadman_cb_full_height(void *data, E_Menu *m, E_Menu_Item *mi)
gmc->y = gmc->zone->y + ((gmc->zone->h - gmc->h) / 2);
gmc->use_autoh = 0;
_e_gadman_client_aspect_enforce(gmc, 0.5, 0.0, 0);
if (gmc->x < gmc->zone->x)
gmc->x = gmc->zone->x;
else if ((gmc->x + gmc->w) > (gmc->zone->x + gmc->zone->w))
gmc->x = gmc->zone->x + gmc->zone->w - gmc->w;
if (gmc->y < gmc->zone->y)
gmc->y = gmc->zone->y;
else if ((gmc->y + gmc->h) > (gmc->zone->y + gmc->zone->h))
gmc->y = gmc->zone->y + gmc->zone->h - gmc->h;
_e_gadman_client_geometry_apply(gmc);
_e_gadman_client_geometry_to_align(gmc);
e_gadman_client_save(gmc);
@ -1501,3 +1572,11 @@ _e_gadman_cb_center_vert(void *data, E_Menu *m, E_Menu_Item *mi)
_e_gadman_client_callback_call(gmc, E_GADMAN_CHANGE_MOVE_RESIZE);
}
static void
_e_gadman_cb_end_edit_mode(void *data, E_Menu *m, E_Menu_Item *mi)
{
E_Gadman_Client *gmc;
gmc = data;
e_gadman_mode_set(gmc->gadman, E_GADMAN_MODE_NORMAL);
}

View File

@ -18,6 +18,7 @@ e_resist_container_border_position(E_Container *con, Evas_List *skiplist,
int resist = 1;
int desk_resist = 32;
int win_resist = 12;
int gad_resist = 32;
int dx, dy, d, pd;
int resist_x = 0, resist_y = 0;
Evas_List *l, *ll, *rects = NULL;
@ -63,7 +64,7 @@ e_resist_container_border_position(E_Container *con, Evas_List *skiplist,
for (l = con->clients; l; l = l->next)
{
E_Border *bd;
E_Border *bd;
bd = l->data;
if (bd->visible)
@ -81,17 +82,17 @@ e_resist_container_border_position(E_Container *con, Evas_List *skiplist,
}
if (ok)
{
r = E_NEW(E_Resist_Rect, 1);
r->x = bd->x;
r->y = bd->y;
r->w = bd->w;
r->h = bd->h;
r->v1 = win_resist;
rects = evas_list_append(rects, r);
OBSTACLE(bd->x, bd->y, bd->w, bd->h, win_resist);
}
}
}
for (l = con->gadman->clients; l; l = l->next)
{
E_Gadman_Client *gmc;
gmc = l->data;
OBSTACLE(gmc->x, gmc->y, gmc->w, gmc->h, gad_resist);
}
for (l = rects; l; l = l->next)
{