From 207c0aed10b33bf004c1033b7bd020b4bbaec25c Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 8 Jun 2012 10:10:16 +0000 Subject: [PATCH] rename E_BINDING_CONTEXT_BORDER to E_BINDING_CONTEXT_WINDOW: technically this is in reference to an E_Border, but it gets confusing when looking at code that deals with both windows (E_Borders) and window borders/frames themselves. this name change will clarify the difference SVN revision: 71841 --- src/bin/e_bindings.h | 2 +- src/bin/e_border.c | 38 +++++++++---------- src/bin/e_focus.c | 16 ++++---- .../e_int_config_mousebindings.c | 18 ++++----- 4 files changed, 37 insertions(+), 37 deletions(-) diff --git a/src/bin/e_bindings.h b/src/bin/e_bindings.h index afc649bc6..83f18a785 100644 --- a/src/bin/e_bindings.h +++ b/src/bin/e_bindings.h @@ -4,7 +4,7 @@ typedef enum _E_Binding_Context { E_BINDING_CONTEXT_NONE, E_BINDING_CONTEXT_UNKNOWN, - E_BINDING_CONTEXT_BORDER, + E_BINDING_CONTEXT_WINDOW, E_BINDING_CONTEXT_ZONE, E_BINDING_CONTEXT_CONTAINER, E_BINDING_CONTEXT_MANAGER, diff --git a/src/bin/e_border.c b/src/bin/e_border.c index 68902094c..0845ac3b8 100644 --- a/src/bin/e_border.c +++ b/src/bin/e_border.c @@ -393,8 +393,8 @@ e_border_new(E_Container *con, bd->win = ecore_x_window_override_new(con->win, 0, 0, bd->w, bd->h); ecore_x_window_shape_events_select(bd->win, 1); } - e_bindings_mouse_grab(E_BINDING_CONTEXT_BORDER, bd->win); - e_bindings_wheel_grab(E_BINDING_CONTEXT_BORDER, bd->win); + e_bindings_mouse_grab(E_BINDING_CONTEXT_WINDOW, bd->win); + e_bindings_wheel_grab(E_BINDING_CONTEXT_WINDOW, bd->win); e_focus_setup(bd); bd->bg_ecore_evas = e_canvas_new(bd->win, 0, 0, bd->w, bd->h, 1, 0, @@ -421,8 +421,8 @@ e_border_new(E_Container *con, e_canvas_del(bd->bg_ecore_evas); ecore_evas_free(bd->bg_ecore_evas); ecore_x_window_free(bd->client.shell_win); - e_bindings_mouse_ungrab(E_BINDING_CONTEXT_BORDER, bd->win); - e_bindings_wheel_ungrab(E_BINDING_CONTEXT_BORDER, bd->win); + e_bindings_mouse_ungrab(E_BINDING_CONTEXT_WINDOW, bd->win); + e_bindings_wheel_ungrab(E_BINDING_CONTEXT_WINDOW, bd->win); ecore_x_window_free(bd->win); free(bd); return NULL; @@ -1129,8 +1129,8 @@ _e_border_frame_replace(E_Border *bd, Eina_Bool argb) eina_hash_del(borders_hash, e_util_winid_str_get(bd->win), bd); e_focus_setdown(bd); - e_bindings_mouse_ungrab(E_BINDING_CONTEXT_BORDER, bd->win); - e_bindings_wheel_ungrab(E_BINDING_CONTEXT_BORDER, bd->win); + e_bindings_mouse_ungrab(E_BINDING_CONTEXT_WINDOW, bd->win); + e_bindings_wheel_ungrab(E_BINDING_CONTEXT_WINDOW, bd->win); if (bd->icon_object) evas_object_del(bd->icon_object); @@ -1159,8 +1159,8 @@ _e_border_frame_replace(E_Border *bd, Eina_Bool argb) 0, 0, 0, 0, 0, win, ECORE_X_WINDOW_STACK_BELOW); - e_bindings_mouse_grab(E_BINDING_CONTEXT_BORDER, bd->win); - e_bindings_wheel_grab(E_BINDING_CONTEXT_BORDER, bd->win); + e_bindings_mouse_grab(E_BINDING_CONTEXT_WINDOW, bd->win); + e_bindings_wheel_grab(E_BINDING_CONTEXT_WINDOW, bd->win); e_focus_setup(bd); bd->bg_ecore_evas = e_canvas_new(bd->win, @@ -3962,8 +3962,8 @@ e_border_button_bindings_ungrab_all(void) EINA_LIST_FOREACH(borders, l, bd) { e_focus_setdown(bd); - e_bindings_mouse_ungrab(E_BINDING_CONTEXT_BORDER, bd->win); - e_bindings_wheel_ungrab(E_BINDING_CONTEXT_BORDER, bd->win); + e_bindings_mouse_ungrab(E_BINDING_CONTEXT_WINDOW, bd->win); + e_bindings_wheel_ungrab(E_BINDING_CONTEXT_WINDOW, bd->win); } } @@ -3975,8 +3975,8 @@ e_border_button_bindings_grab_all(void) EINA_LIST_FOREACH(borders, l, bd) { - e_bindings_mouse_grab(E_BINDING_CONTEXT_BORDER, bd->win); - e_bindings_wheel_grab(E_BINDING_CONTEXT_BORDER, bd->win); + e_bindings_mouse_grab(E_BINDING_CONTEXT_WINDOW, bd->win); + e_bindings_wheel_grab(E_BINDING_CONTEXT_WINDOW, bd->win); e_focus_setup(bd); } } @@ -4570,8 +4570,8 @@ _e_border_free(E_Border *bd) ecore_evas_free(bd->bg_ecore_evas); ecore_x_window_free(bd->client.shell_win); e_focus_setdown(bd); - e_bindings_mouse_ungrab(E_BINDING_CONTEXT_BORDER, bd->win); - e_bindings_wheel_ungrab(E_BINDING_CONTEXT_BORDER, bd->win); + e_bindings_mouse_ungrab(E_BINDING_CONTEXT_WINDOW, bd->win); + e_bindings_wheel_ungrab(E_BINDING_CONTEXT_WINDOW, bd->win); ecore_x_window_free(bd->win); eina_hash_del(borders_hash, e_util_winid_str_get(bd->client.win), bd); @@ -5931,7 +5931,7 @@ _e_border_cb_signal_bind(void *data, bd = data; if (e_dnd_active()) return; - e_bindings_signal_handle(E_BINDING_CONTEXT_BORDER, E_OBJECT(bd), + e_bindings_signal_handle(E_BINDING_CONTEXT_WINDOW, E_OBJECT(bd), emission, source); } @@ -6100,7 +6100,7 @@ _e_border_cb_mouse_wheel(void *data, bd->mouse.current.mx = ev->root.x; bd->mouse.current.my = ev->root.y; if (!bd->cur_mouse_action) - e_bindings_wheel_event_handle(E_BINDING_CONTEXT_BORDER, + e_bindings_wheel_event_handle(E_BINDING_CONTEXT_WINDOW, E_OBJECT(bd), ev); } evas_event_feed_mouse_wheel(bd->bg_evas, ev->direction, ev->z, ev->timestamp, NULL); @@ -6141,7 +6141,7 @@ _e_border_cb_mouse_down(void *data, if (!bd->cur_mouse_action) { bd->cur_mouse_action = - e_bindings_mouse_down_event_handle(E_BINDING_CONTEXT_BORDER, + e_bindings_mouse_down_event_handle(E_BINDING_CONTEXT_WINDOW, E_OBJECT(bd), ev); if (bd->cur_mouse_action) { @@ -6234,7 +6234,7 @@ _e_border_cb_mouse_up(void *data, } else { - if (!e_bindings_mouse_up_event_handle(E_BINDING_CONTEXT_BORDER, E_OBJECT(bd), ev)) + if (!e_bindings_mouse_up_event_handle(E_BINDING_CONTEXT_WINDOW, E_OBJECT(bd), ev)) e_focus_event_mouse_up(bd); } } @@ -6418,7 +6418,7 @@ _e_border_cb_grab_replay(void *data __UNUSED__, return ECORE_CALLBACK_DONE; if (ev->event_window == bd->win) { - if (!e_bindings_mouse_down_find(E_BINDING_CONTEXT_BORDER, + if (!e_bindings_mouse_down_find(E_BINDING_CONTEXT_WINDOW, E_OBJECT(bd), ev, NULL)) return ECORE_CALLBACK_PASS_ON; } diff --git a/src/bin/e_focus.c b/src/bin/e_focus.c index 82aef948f..1bb8a7619 100644 --- a/src/bin/e_focus.c +++ b/src/bin/e_focus.c @@ -116,13 +116,13 @@ e_focus_event_focus_in(E_Border *bd) (!e_config->always_click_to_focus)) { if (!bd->button_grabbed) return; - e_bindings_mouse_ungrab(E_BINDING_CONTEXT_BORDER, bd->win); - e_bindings_wheel_ungrab(E_BINDING_CONTEXT_BORDER, bd->win); + e_bindings_mouse_ungrab(E_BINDING_CONTEXT_WINDOW, bd->win); + e_bindings_wheel_ungrab(E_BINDING_CONTEXT_WINDOW, bd->win); ecore_x_window_button_ungrab(bd->win, 1, 0, 1); ecore_x_window_button_ungrab(bd->win, 2, 0, 1); ecore_x_window_button_ungrab(bd->win, 3, 0, 1); - e_bindings_mouse_grab(E_BINDING_CONTEXT_BORDER, bd->win); - e_bindings_wheel_grab(E_BINDING_CONTEXT_BORDER, bd->win); + e_bindings_mouse_grab(E_BINDING_CONTEXT_WINDOW, bd->win); + e_bindings_wheel_grab(E_BINDING_CONTEXT_WINDOW, bd->win); bd->button_grabbed = 0; } } @@ -179,13 +179,13 @@ EAPI void e_focus_setdown(E_Border *bd) { if (!bd->button_grabbed) return; - e_bindings_mouse_ungrab(E_BINDING_CONTEXT_BORDER, bd->win); - e_bindings_wheel_ungrab(E_BINDING_CONTEXT_BORDER, bd->win); + e_bindings_mouse_ungrab(E_BINDING_CONTEXT_WINDOW, bd->win); + e_bindings_wheel_ungrab(E_BINDING_CONTEXT_WINDOW, bd->win); ecore_x_window_button_ungrab(bd->win, 1, 0, 1); ecore_x_window_button_ungrab(bd->win, 2, 0, 1); ecore_x_window_button_ungrab(bd->win, 3, 0, 1); - e_bindings_mouse_grab(E_BINDING_CONTEXT_BORDER, bd->win); - e_bindings_wheel_grab(E_BINDING_CONTEXT_BORDER, bd->win); + e_bindings_mouse_grab(E_BINDING_CONTEXT_WINDOW, bd->win); + e_bindings_wheel_grab(E_BINDING_CONTEXT_WINDOW, bd->win); bd->button_grabbed = 0; } diff --git a/src/modules/conf_keybindings/e_int_config_mousebindings.c b/src/modules/conf_keybindings/e_int_config_mousebindings.c index 6b4e08e80..c267a26c2 100644 --- a/src/modules/conf_keybindings/e_int_config_mousebindings.c +++ b/src/modules/conf_keybindings/e_int_config_mousebindings.c @@ -319,7 +319,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf cfdata->gui.context.o_any = ob; e_widget_disabled_set(ob, 1); e_widget_frametable_object_append(of, ob, 0, 0, 1, 1, 1, 1, 1, 1); - ob = e_widget_radio_add(evas, _("Window"), E_BINDING_CONTEXT_BORDER, rg); + ob = e_widget_radio_add(evas, _("Window"), E_BINDING_CONTEXT_WINDOW, rg); cfdata->gui.context.o_window = ob; e_widget_disabled_set(ob, 1); e_widget_frametable_object_append(of, ob, 0, 1, 1, 1, 1, 1, 1, 1); @@ -588,9 +588,9 @@ _restore_mouse_binding_defaults_cb(void *data, void *data2 __UNUSED__) eb->params = _params == NULL ? NULL : eina_stringshare_add(_params); \ cfdata->binding.mouse = eina_list_append(cfdata->binding.mouse, eb) - CFG_MOUSEBIND_DFLT(E_BINDING_CONTEXT_BORDER, 1, E_BINDING_MODIFIER_ALT, 0, "window_move", NULL); - CFG_MOUSEBIND_DFLT(E_BINDING_CONTEXT_BORDER, 2, E_BINDING_MODIFIER_ALT, 0, "window_resize", NULL); - CFG_MOUSEBIND_DFLT(E_BINDING_CONTEXT_BORDER, 3, E_BINDING_MODIFIER_ALT, 0, "window_menu", NULL); + CFG_MOUSEBIND_DFLT(E_BINDING_CONTEXT_WINDOW, 1, E_BINDING_MODIFIER_ALT, 0, "window_move", NULL); + CFG_MOUSEBIND_DFLT(E_BINDING_CONTEXT_WINDOW, 2, E_BINDING_MODIFIER_ALT, 0, "window_resize", NULL); + CFG_MOUSEBIND_DFLT(E_BINDING_CONTEXT_WINDOW, 3, E_BINDING_MODIFIER_ALT, 0, "window_menu", NULL); CFG_MOUSEBIND_DFLT(E_BINDING_CONTEXT_ZONE, 1, 0, 0, "menu_show", "main"); CFG_MOUSEBIND_DFLT(E_BINDING_CONTEXT_ZONE, 2, 0, 0, "menu_show", "clients"); CFG_MOUSEBIND_DFLT(E_BINDING_CONTEXT_ZONE, 3, 0, 0, "menu_show", "favorites"); @@ -614,13 +614,13 @@ _restore_mouse_binding_defaults_cb(void *data, void *data2 __UNUSED__) "desk_linear_flip_by", "1"); CFG_WHEELBIND_DFLT(E_BINDING_CONTEXT_CONTAINER, 1, 1, E_BINDING_MODIFIER_ALT, 0, "desk_linear_flip_by", "1"); - CFG_WHEELBIND_DFLT(E_BINDING_CONTEXT_BORDER, 0, -1, E_BINDING_MODIFIER_ALT, 0, + CFG_WHEELBIND_DFLT(E_BINDING_CONTEXT_WINDOW, 0, -1, E_BINDING_MODIFIER_ALT, 0, "desk_linear_flip_by", "-1"); - CFG_WHEELBIND_DFLT(E_BINDING_CONTEXT_BORDER, 1, -1, E_BINDING_MODIFIER_ALT, 0, + CFG_WHEELBIND_DFLT(E_BINDING_CONTEXT_WINDOW, 1, -1, E_BINDING_MODIFIER_ALT, 0, "desk_linear_flip_by", "-1"); - CFG_WHEELBIND_DFLT(E_BINDING_CONTEXT_BORDER, 0, 1, E_BINDING_MODIFIER_ALT, 0, + CFG_WHEELBIND_DFLT(E_BINDING_CONTEXT_WINDOW, 0, 1, E_BINDING_MODIFIER_ALT, 0, "desk_linear_flip_by", "1"); - CFG_WHEELBIND_DFLT(E_BINDING_CONTEXT_BORDER, 1, 1, E_BINDING_MODIFIER_ALT, 0, + CFG_WHEELBIND_DFLT(E_BINDING_CONTEXT_WINDOW, 1, 1, E_BINDING_MODIFIER_ALT, 0, "desk_linear_flip_by", "1"); eina_stringshare_del(cfdata->locals.cur); @@ -979,7 +979,7 @@ _update_binding_context(E_Config_Dialog_Data *cfdata) if (ctxt == E_BINDING_CONTEXT_ANY) e_widget_radio_toggle_set(cfdata->gui.context.o_any, 1); - else if (ctxt == E_BINDING_CONTEXT_BORDER) + else if (ctxt == E_BINDING_CONTEXT_WINDOW) e_widget_radio_toggle_set(cfdata->gui.context.o_window, 1); else if (ctxt == E_BINDING_CONTEXT_MENU) e_widget_radio_toggle_set(cfdata->gui.context.o_menu, 1);