diff --git a/TODO b/TODO index 04629bbb3..67567d457 100644 --- a/TODO +++ b/TODO @@ -96,11 +96,12 @@ Some of the things (in very short form) that need to be done to E17... * gui config dialogs for all config * make it possible to disable border buttons/actions (tell theme what is disabled) -* shelves need to handle container resize (res change) * shelves need to support gadcon "contents" config * shelf gui config is ugly and badly arranged * pager should be able to be configured to control more than the current zone (select which zone they control) +* ibar maybe should move bar dirs to subdirectories in "bar" to limit scope +* ibar should support creating and deleting bar dirs ]]] [[[ diff --git a/src/bin/e_container.c b/src/bin/e_container.c index d83d119ca..e43bddce0 100644 --- a/src/bin/e_container.c +++ b/src/bin/e_container.c @@ -1164,13 +1164,11 @@ _e_container_resize_handle(E_Container *con) zone = e_container_zone_number_get(con, scr->screen); if (zone) { - e_zone_move(zone, scr->x, scr->y); - e_zone_resize(zone, scr->w, scr->h); + e_zone_move_resize(zone, scr->x, scr->y, scr->w, scr->h); + e_shelf_zone_move_resize_handle(zone); } else - { - zone = e_zone_new(con, scr->screen, scr->x, scr->y, scr->w, scr->h); - } + zone = e_zone_new(con, scr->screen, scr->x, scr->y, scr->w, scr->h); /* FIXME: what if a zone exists for a screen that doesn't exist? * not sure this will ever happen... */ @@ -1181,8 +1179,8 @@ _e_container_resize_handle(E_Container *con) E_Zone *zone; zone = e_container_zone_number_get(con, 0); - e_zone_move(zone, 0, 0); - e_zone_resize(zone, con->w, con->h); + e_zone_move_resize(zone, 0, 0, con->w, con->h); + e_shelf_zone_move_resize_handle(zone); } e_gadman_container_resize(con->gadman); diff --git a/src/bin/e_shelf.c b/src/bin/e_shelf.c index 3e4e4717b..7b45c9ad9 100644 --- a/src/bin/e_shelf.c +++ b/src/bin/e_shelf.c @@ -154,6 +154,19 @@ e_shelf_zone_new(E_Zone *zone, const char *name, const char *style, int popup, i return es; } +EAPI void +e_shelf_zone_move_resize_handle(E_Zone *zone) +{ + Evas_List *l; + E_Shelf *es; + + for (l = shelves; l; l = l->next) + { + es = l->data; + if (es->zone == zone) e_shelf_position_calc(es); + } +} + EAPI void e_shelf_populate(E_Shelf *es) { diff --git a/src/bin/e_shelf.h b/src/bin/e_shelf.h index 5f20b4939..bf256783c 100644 --- a/src/bin/e_shelf.h +++ b/src/bin/e_shelf.h @@ -39,6 +39,7 @@ EAPI int e_shelf_shutdown(void); EAPI void e_shelf_config_init(void); EAPI Evas_List *e_shelf_list(void); EAPI E_Shelf *e_shelf_zone_new(E_Zone *zone, const char *name, const char *style, int popup, int layer, int id); +EAPI void e_shelf_zone_move_resize_handle(E_Zone *zone); EAPI void e_shelf_populate(E_Shelf *es); EAPI void e_shelf_show(E_Shelf *es); EAPI void e_shelf_hide(E_Shelf *es); diff --git a/src/modules/pager/e_mod_main.c b/src/modules/pager/e_mod_main.c index d2c105665..37ef37a49 100644 --- a/src/modules/pager/e_mod_main.c +++ b/src/modules/pager/e_mod_main.c @@ -111,6 +111,7 @@ static int _pager_cb_event_border_icon_change(void *data, int type, void *event) static int _pager_cb_event_zone_desk_count_set(void *data, int type, void *event); static int _pager_cb_event_desk_show(void *data, int type, void *event); static int _pager_cb_event_desk_name_change(void *data, int type, void *event); +static int _pager_cb_event_container_resize(void *data, int type, void *event); static void _pager_window_cb_mouse_in(void *data, Evas *e, Evas_Object *obj, void *event_info); static void _pager_window_cb_mouse_out(void *data, Evas *e, Evas_Object *obj, void *event_info); static void _pager_window_cb_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info); @@ -1205,6 +1206,33 @@ _pager_cb_event_desk_name_change(void *data, int type, void *event) return 1; } +static int +_pager_cb_event_container_resize(void *data, int type, void *event) +{ + E_Event_Container_Resize *ev; + Evas_List *l, *l2; + + ev = event; + for (l = pager_config->instances; l; l = l->next) + { + Instance *inst; + + inst = l->data; + if (inst->pager->zone->container != ev->container) continue; + for (l2 = inst->pager->desks; l2; l2 = l2->next) + { + Pager_Desk *pd; + + pd = l2->data; + e_layout_virtual_size_set(pd->o_layout, + pd->desk->zone->w, + pd->desk->zone->h); + } + _gc_orient(inst->gcc); + } + return 1; +} + static void _pager_window_cb_mouse_in(void *data, Evas *e, Evas_Object *obj, void *event_info) { @@ -1728,6 +1756,9 @@ e_modapi_init(E_Module *module) pager_config->handlers = evas_list_append (pager_config->handlers, ecore_event_handler_add (E_EVENT_DESK_NAME_CHANGE, _pager_cb_event_desk_name_change, NULL)); + pager_config->handlers = evas_list_append + (pager_config->handlers, ecore_event_handler_add + (E_EVENT_CONTAINER_RESIZE, _pager_cb_event_container_resize, NULL)); e_gadcon_provider_register(&_gadcon_class); return 1;