Enlightenment CVS committal Author : tsauerbeck Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_config.c e_config.h e_ipc_handlers.h e_ipc_handlers_list.h e_moveresize.c Log Message: popups showing the current size/position on move/resize now optionally invisible =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_config.c,v retrieving revision 1.103 retrieving revision 1.104 diff -u -3 -r1.103 -r1.104 --- e_config.c 26 Sep 2005 16:14:31 -0000 1.103 +++ e_config.c 27 Sep 2005 11:22:46 -0000 1.104 @@ -327,6 +327,8 @@ E_CONFIG_LIST(D, T, remembers, _e_config_remember_edd); E_CONFIG_VAL(D, T, move_info_follows, INT); /**/ E_CONFIG_VAL(D, T, resize_info_follows, INT); /**/ + E_CONFIG_VAL(D, T, move_info_visible, INT); /**/ + E_CONFIG_VAL(D, T, resize_info_visible, INT); /**/ E_CONFIG_VAL(D, T, focus_last_focused_per_desktop, INT); /**/ E_CONFIG_VAL(D, T, focus_revert_on_hide_or_close, INT); /**/ E_CONFIG_VAL(D, T, use_e_cursor, INT); /**/ @@ -445,6 +447,8 @@ e_config->transition_change = strdup("crossfade"); e_config->move_info_follows = 1; e_config->resize_info_follows = 1; + e_config->move_info_visible = 1; + e_config->resize_info_visible = 1; e_config->focus_last_focused_per_desktop = 1; e_config->focus_revert_on_hide_or_close = 1; e_config->use_e_cursor = 1; @@ -1393,6 +1397,8 @@ E_CONFIG_LIMIT(e_config->ping_clients_wait, 0.0, 120.0); E_CONFIG_LIMIT(e_config->move_info_follows, 0, 1); E_CONFIG_LIMIT(e_config->resize_info_follows, 0, 1); + E_CONFIG_LIMIT(e_config->move_info_visible, 0, 1); + E_CONFIG_LIMIT(e_config->resize_info_visible, 0, 1); E_CONFIG_LIMIT(e_config->focus_last_focused_per_desktop, 0, 1); E_CONFIG_LIMIT(e_config->focus_revert_on_hide_or_close, 0, 1); E_CONFIG_LIMIT(e_config->use_e_cursor, 0, 1); =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_config.h,v retrieving revision 1.53 retrieving revision 1.54 diff -u -3 -r1.53 -r1.54 --- e_config.h 26 Sep 2005 16:14:31 -0000 1.53 +++ e_config.h 27 Sep 2005 11:22:46 -0000 1.54 @@ -145,6 +145,8 @@ Evas_List *remembers; int move_info_follows; int resize_info_follows; + int move_info_visible; + int resize_info_visible; int focus_last_focused_per_desktop; int focus_revert_on_hide_or_close; int use_e_cursor; =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_ipc_handlers.h,v retrieving revision 1.80 retrieving revision 1.81 diff -u -3 -r1.80 -r1.81 --- e_ipc_handlers.h 26 Sep 2005 16:14:31 -0000 1.80 +++ e_ipc_handlers.h 27 Sep 2005 11:22:46 -0000 1.81 @@ -4584,6 +4584,88 @@ /****************************************************************************/ +#define HDL E_IPC_OP_MOVE_INFO_VISIBLE_SET +#if (TYPE == E_REMOTE_OPTIONS) + OP("-move-info-visible-set", 1, "Set whether the move dialog should be visible", 0, HDL) +#elif (TYPE == E_REMOTE_OUT) + REQ_INT(atoi(params[0]), HDL); +#elif (TYPE == E_WM_IN) + START_INT(val, HDL); + e_config->move_info_visible = val; + E_CONFIG_LIMIT(e_config->move_info_visible, 0, 1); + SAVE; + END_INT; +#elif (TYPE == E_REMOTE_IN) +#endif +#undef HDL + +/****************************************************************************/ +#define HDL E_IPC_OP_MOVE_INFO_VISIBLE_GET +#if (TYPE == E_REMOTE_OPTIONS) + OP("-move-info-visible-get", 0, "Get whether the move dialog should be visible", 1, HDL) +#elif (TYPE == E_REMOTE_OUT) + REQ_NULL(HDL); +#elif (TYPE == E_WM_IN) + SEND_INT(e_config->move_info_visible, E_IPC_OP_MOVE_INFO_VISIBLE_GET_REPLY, HDL); +#elif (TYPE == E_REMOTE_IN) +#endif +#undef HDL + +/****************************************************************************/ +#define HDL E_IPC_OP_MOVE_INFO_VISIBLE_GET_REPLY +#if (TYPE == E_REMOTE_OPTIONS) +#elif (TYPE == E_REMOTE_OUT) +#elif (TYPE == E_WM_IN) +#elif (TYPE == E_REMOTE_IN) + START_INT(val, HDL); + printf("REPLY: %d\n", val); + END_INT; +#endif +#undef HDL + +/****************************************************************************/ + +#define HDL E_IPC_OP_RESIZE_INFO_VISIBLE_SET +#if (TYPE == E_REMOTE_OPTIONS) + OP("-resize-info-visible-set", 1, "Set whether the resize dialog should be visible", 0, HDL) +#elif (TYPE == E_REMOTE_OUT) + REQ_INT(atoi(params[0]), HDL); +#elif (TYPE == E_WM_IN) + START_INT(val, HDL); + e_config->resize_info_visible = val; + E_CONFIG_LIMIT(e_config->resize_info_visible, 0, 1); + SAVE; + END_INT; +#elif (TYPE == E_REMOTE_IN) +#endif +#undef HDL + +/****************************************************************************/ +#define HDL E_IPC_OP_RESIZE_INFO_VISIBLE_GET +#if (TYPE == E_REMOTE_OPTIONS) + OP("-resize-info-visible-get", 0, "Set whether the resize dialog should be visible", 1, HDL) +#elif (TYPE == E_REMOTE_OUT) + REQ_NULL(HDL); +#elif (TYPE == E_WM_IN) + SEND_INT(e_config->resize_info_visible, E_IPC_OP_RESIZE_INFO_VISIBLE_GET_REPLY, HDL); +#elif (TYPE == E_REMOTE_IN) +#endif +#undef HDL + +/****************************************************************************/ +#define HDL E_IPC_OP_RESIZE_INFO_VISIBLE_GET_REPLY +#if (TYPE == E_REMOTE_OPTIONS) +#elif (TYPE == E_REMOTE_OUT) +#elif (TYPE == E_WM_IN) +#elif (TYPE == E_REMOTE_IN) + START_INT(val, HDL); + printf("REPLY: %d\n", val); + END_INT; +#endif +#undef HDL + +/****************************************************************************/ + #define HDL E_IPC_OP_FOCUS_LAST_FOCUSED_PER_DESKTOP_SET #if (TYPE == E_REMOTE_OPTIONS) OP("-focus-last-focused-per-desktop-set", 1, "Set whether E should remember focused windows when switching desks", 0, HDL) =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_ipc_handlers_list.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -3 -r1.24 -r1.25 --- e_ipc_handlers_list.h 26 Sep 2005 16:14:31 -0000 1.24 +++ e_ipc_handlers_list.h 27 Sep 2005 11:22:46 -0000 1.25 @@ -276,3 +276,10 @@ #define E_IPC_OP_USE_E_CURSOR_SET 270 #define E_IPC_OP_USE_E_CURSOR_GET 271 #define E_IPC_OP_USE_E_CURSOR_GET_REPLY 272 + +#define E_IPC_OP_MOVE_INFO_VISIBLE_SET 273 +#define E_IPC_OP_MOVE_INFO_VISIBLE_GET 274 +#define E_IPC_OP_MOVE_INFO_VISIBLE_GET_REPLY 275 +#define E_IPC_OP_RESIZE_INFO_VISIBLE_SET 276 +#define E_IPC_OP_RESIZE_INFO_VISIBLE_GET 277 +#define E_IPC_OP_RESIZE_INFO_VISIBLE_GET_REPLY 278 =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_moveresize.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -3 -r1.12 -r1.13 --- e_moveresize.c 9 Jul 2005 15:37:28 -0000 1.12 +++ e_moveresize.c 27 Sep 2005 11:22:46 -0000 1.13 @@ -18,47 +18,60 @@ Evas_Coord ew, eh; char buf[40]; + _obj = NULL; if (_disp_pop) e_object_del(E_OBJECT(_disp_pop)); - _disp_pop = e_popup_new(zone, 0, 0, 1, 1); - if (!_disp_pop) return; - e_popup_layer_set(_disp_pop, 255); - _obj = edje_object_add(_disp_pop->evas); - e_theme_edje_object_set(_obj, "base/theme/borders", - "widgets/border/default/resize"); - snprintf(buf, sizeof(buf), "9999x9999"); - edje_object_part_text_set(_obj, "text", buf); - - edje_object_size_min_calc(_obj, &ew, &eh); - evas_object_move(_obj, 0, 0); - evas_object_resize(_obj, ew, eh); - evas_object_show(_obj); - e_popup_edje_bg_object_set(_disp_pop, _obj); + + if (e_config->resize_info_visible) + { + _disp_pop = e_popup_new(zone, 0, 0, 1, 1); + if (!_disp_pop) return; + e_popup_layer_set(_disp_pop, 255); + _obj = edje_object_add(_disp_pop->evas); + e_theme_edje_object_set(_obj, "base/theme/borders", + "widgets/border/default/resize"); + snprintf(buf, sizeof(buf), "9999x9999"); + edje_object_part_text_set(_obj, "text", buf); + + edje_object_size_min_calc(_obj, &ew, &eh); + evas_object_move(_obj, 0, 0); + evas_object_resize(_obj, ew, eh); + evas_object_show(_obj); + e_popup_edje_bg_object_set(_disp_pop, _obj); + } e_resize_update(w, h); - e_popup_move_resize(_disp_pop, - (obj_x - _disp_pop->zone->x) + - ((obj_w - ew) / 2), - (obj_y - _disp_pop->zone->y) + - ((obj_h - eh) / 2), - ew, eh); - e_popup_show(_disp_pop); + if (e_config->resize_info_visible) + { + e_popup_move_resize(_disp_pop, + (obj_x - _disp_pop->zone->x) + + ((obj_w - ew) / 2), + (obj_y - _disp_pop->zone->y) + + ((obj_h - eh) / 2), + ew, eh); + e_popup_show(_disp_pop); + } + visible = 1; } void e_resize_end(void) { - if (_obj) - { - evas_object_del(_obj); - _obj = NULL; - } - if (_disp_pop) + if (e_config->resize_info_visible) { - e_object_del(E_OBJECT(_disp_pop)); - _disp_pop = NULL; + if (_obj) + { + evas_object_del(_obj); + _obj = NULL; + } + if (_disp_pop) + { + e_object_del(E_OBJECT(_disp_pop)); + _disp_pop = NULL; + } } + visible = 0; } @@ -84,45 +97,58 @@ Evas_Coord ew, eh; char buf[40]; + _obj = NULL; if (_disp_pop) e_object_del(E_OBJECT(_disp_pop)); - _disp_pop = e_popup_new(zone, 0, 0, 1, 1); - _obj = edje_object_add(_disp_pop->evas); - e_theme_edje_object_set(_obj, "base/theme/borders", - "widgets/border/default/move"); - snprintf(buf, sizeof(buf), "9999 9999"); - edje_object_part_text_set(_obj, "text", buf); - edje_object_size_min_calc(_obj, &ew, &eh); - evas_object_move(_obj, 0, 0); - evas_object_resize(_obj, ew, eh); - evas_object_show(_obj); - e_popup_edje_bg_object_set(_disp_pop, _obj); + if (e_config->move_info_visible) + { + _disp_pop = e_popup_new(zone, 0, 0, 1, 1); + _obj = edje_object_add(_disp_pop->evas); + e_theme_edje_object_set(_obj, "base/theme/borders", + "widgets/border/default/move"); + snprintf(buf, sizeof(buf), "9999 9999"); + edje_object_part_text_set(_obj, "text", buf); + + edje_object_size_min_calc(_obj, &ew, &eh); + evas_object_move(_obj, 0, 0); + evas_object_resize(_obj, ew, eh); + evas_object_show(_obj); + e_popup_edje_bg_object_set(_disp_pop, _obj); + } // e_move_update(x, y); - e_popup_move_resize(_disp_pop, - (obj_x - _disp_pop->zone->x) + - ((obj_w - ew) / 2), - (obj_y - _disp_pop->zone->y) + - ((obj_h - eh) / 2), - ew, eh); + if (e_config->move_info_visible) + { + e_popup_move_resize(_disp_pop, + (obj_x - _disp_pop->zone->x) + + ((obj_w - ew) / 2), + (obj_y - _disp_pop->zone->y) + + ((obj_h - eh) / 2), + ew, eh); // e_popup_show(_disp_pop); + } + // visible = 1; } void e_move_end(void) { - if (_obj) + if (e_config->move_info_visible) { - evas_object_del(_obj); - _obj = NULL; - } - if (_disp_pop) - { - e_object_del(E_OBJECT(_disp_pop)); - _disp_pop = NULL; + if (_obj) + { + evas_object_del(_obj); + _obj = NULL; + } + if (_disp_pop) + { + e_object_del(E_OBJECT(_disp_pop)); + _disp_pop = NULL; + } } + visible = 0; } @@ -149,7 +175,7 @@ obj_y = y; obj_w = w; obj_h = h; - if (visible) + if (e_config->move_info_visible && visible) { e_popup_move(_disp_pop, (obj_x - _disp_pop->zone->x) + ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs