summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO3
-rw-r--r--src/bin/e_container.c12
-rw-r--r--src/bin/e_shelf.c13
-rw-r--r--src/bin/e_shelf.h1
-rw-r--r--src/modules/pager/e_mod_main.c31
5 files changed, 52 insertions, 8 deletions
diff --git a/TODO b/TODO
index 04629bb..67567d4 100644
--- a/TODO
+++ b/TODO
@@ -96,11 +96,12 @@ Some of the things (in very short form) that need to be done to E17...
96* gui config dialogs for all config 96* gui config dialogs for all config
97* make it possible to disable border buttons/actions (tell theme what is 97* make it possible to disable border buttons/actions (tell theme what is
98 disabled) 98 disabled)
99* shelves need to handle container resize (res change)
100* shelves need to support gadcon "contents" config 99* shelves need to support gadcon "contents" config
101* shelf gui config is ugly and badly arranged 100* shelf gui config is ugly and badly arranged
102* pager should be able to be configured to control more than the current zone 101* pager should be able to be configured to control more than the current zone
103 (select which zone they control) 102 (select which zone they control)
103* ibar maybe should move bar dirs to subdirectories in "bar" to limit scope
104* ibar should support creating and deleting bar dirs
104]]] 105]]]
105 106
106[[[ 107[[[
diff --git a/src/bin/e_container.c b/src/bin/e_container.c
index d83d119..e43bddc 100644
--- a/src/bin/e_container.c
+++ b/src/bin/e_container.c
@@ -1164,13 +1164,11 @@ _e_container_resize_handle(E_Container *con)
1164 zone = e_container_zone_number_get(con, scr->screen); 1164 zone = e_container_zone_number_get(con, scr->screen);
1165 if (zone) 1165 if (zone)
1166 { 1166 {
1167 e_zone_move(zone, scr->x, scr->y); 1167 e_zone_move_resize(zone, scr->x, scr->y, scr->w, scr->h);
1168 e_zone_resize(zone, scr->w, scr->h); 1168 e_shelf_zone_move_resize_handle(zone);
1169 } 1169 }
1170 else 1170 else
1171 { 1171 zone = e_zone_new(con, scr->screen, scr->x, scr->y, scr->w, scr->h);
1172 zone = e_zone_new(con, scr->screen, scr->x, scr->y, scr->w, scr->h);
1173 }
1174 /* FIXME: what if a zone exists for a screen that doesn't exist? 1172 /* FIXME: what if a zone exists for a screen that doesn't exist?
1175 * not sure this will ever happen... 1173 * not sure this will ever happen...
1176 */ 1174 */
@@ -1181,8 +1179,8 @@ _e_container_resize_handle(E_Container *con)
1181 E_Zone *zone; 1179 E_Zone *zone;
1182 1180
1183 zone = e_container_zone_number_get(con, 0); 1181 zone = e_container_zone_number_get(con, 0);
1184 e_zone_move(zone, 0, 0); 1182 e_zone_move_resize(zone, 0, 0, con->w, con->h);
1185 e_zone_resize(zone, con->w, con->h); 1183 e_shelf_zone_move_resize_handle(zone);
1186 } 1184 }
1187 1185
1188 e_gadman_container_resize(con->gadman); 1186 e_gadman_container_resize(con->gadman);
diff --git a/src/bin/e_shelf.c b/src/bin/e_shelf.c
index 3e4e471..7b45c9a 100644
--- a/src/bin/e_shelf.c
+++ b/src/bin/e_shelf.c
@@ -155,6 +155,19 @@ e_shelf_zone_new(E_Zone *zone, const char *name, const char *style, int popup, i
155} 155}
156 156
157EAPI void 157EAPI void
158e_shelf_zone_move_resize_handle(E_Zone *zone)
159{
160 Evas_List *l;
161 E_Shelf *es;
162
163 for (l = shelves; l; l = l->next)
164 {
165 es = l->data;
166 if (es->zone == zone) e_shelf_position_calc(es);
167 }
168}
169
170EAPI void
158e_shelf_populate(E_Shelf *es) 171e_shelf_populate(E_Shelf *es)
159{ 172{
160 E_OBJECT_CHECK(es); 173 E_OBJECT_CHECK(es);
diff --git a/src/bin/e_shelf.h b/src/bin/e_shelf.h
index 5f20b49..bf25678 100644
--- a/src/bin/e_shelf.h
+++ b/src/bin/e_shelf.h
@@ -39,6 +39,7 @@ EAPI int e_shelf_shutdown(void);
39EAPI void e_shelf_config_init(void); 39EAPI void e_shelf_config_init(void);
40EAPI Evas_List *e_shelf_list(void); 40EAPI Evas_List *e_shelf_list(void);
41EAPI E_Shelf *e_shelf_zone_new(E_Zone *zone, const char *name, const char *style, int popup, int layer, int id); 41EAPI E_Shelf *e_shelf_zone_new(E_Zone *zone, const char *name, const char *style, int popup, int layer, int id);
42EAPI void e_shelf_zone_move_resize_handle(E_Zone *zone);
42EAPI void e_shelf_populate(E_Shelf *es); 43EAPI void e_shelf_populate(E_Shelf *es);
43EAPI void e_shelf_show(E_Shelf *es); 44EAPI void e_shelf_show(E_Shelf *es);
44EAPI void e_shelf_hide(E_Shelf *es); 45EAPI 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 d2c1056..37ef37a 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)
111static int _pager_cb_event_zone_desk_count_set(void *data, int type, void *event); 111static int _pager_cb_event_zone_desk_count_set(void *data, int type, void *event);
112static int _pager_cb_event_desk_show(void *data, int type, void *event); 112static int _pager_cb_event_desk_show(void *data, int type, void *event);
113static int _pager_cb_event_desk_name_change(void *data, int type, void *event); 113static int _pager_cb_event_desk_name_change(void *data, int type, void *event);
114static int _pager_cb_event_container_resize(void *data, int type, void *event);
114static void _pager_window_cb_mouse_in(void *data, Evas *e, Evas_Object *obj, void *event_info); 115static void _pager_window_cb_mouse_in(void *data, Evas *e, Evas_Object *obj, void *event_info);
115static void _pager_window_cb_mouse_out(void *data, Evas *e, Evas_Object *obj, void *event_info); 116static void _pager_window_cb_mouse_out(void *data, Evas *e, Evas_Object *obj, void *event_info);
116static void _pager_window_cb_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info); 117static 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)
1205 return 1; 1206 return 1;
1206} 1207}
1207 1208
1209static int
1210_pager_cb_event_container_resize(void *data, int type, void *event)
1211{
1212 E_Event_Container_Resize *ev;
1213 Evas_List *l, *l2;
1214
1215 ev = event;
1216 for (l = pager_config->instances; l; l = l->next)
1217 {
1218 Instance *inst;
1219
1220 inst = l->data;
1221 if (inst->pager->zone->container != ev->container) continue;
1222 for (l2 = inst->pager->desks; l2; l2 = l2->next)
1223 {
1224 Pager_Desk *pd;
1225
1226 pd = l2->data;
1227 e_layout_virtual_size_set(pd->o_layout,
1228 pd->desk->zone->w,
1229 pd->desk->zone->h);
1230 }
1231 _gc_orient(inst->gcc);
1232 }
1233 return 1;
1234}
1235
1208static void 1236static void
1209_pager_window_cb_mouse_in(void *data, Evas *e, Evas_Object *obj, void *event_info) 1237_pager_window_cb_mouse_in(void *data, Evas *e, Evas_Object *obj, void *event_info)
1210{ 1238{
@@ -1728,6 +1756,9 @@ e_modapi_init(E_Module *module)
1728 pager_config->handlers = evas_list_append 1756 pager_config->handlers = evas_list_append
1729 (pager_config->handlers, ecore_event_handler_add 1757 (pager_config->handlers, ecore_event_handler_add
1730 (E_EVENT_DESK_NAME_CHANGE, _pager_cb_event_desk_name_change, NULL)); 1758 (E_EVENT_DESK_NAME_CHANGE, _pager_cb_event_desk_name_change, NULL));
1759 pager_config->handlers = evas_list_append
1760 (pager_config->handlers, ecore_event_handler_add
1761 (E_EVENT_CONTAINER_RESIZE, _pager_cb_event_container_resize, NULL));
1731 1762
1732 e_gadcon_provider_register(&_gadcon_class); 1763 e_gadcon_provider_register(&_gadcon_class);
1733 return 1; 1764 return 1;