forked from enlightenment/enlightenment
Only fetch current manager once and reuse.
Always keep key input window on top of keybinding dialog. Some formatting. SVN revision: 26652
This commit is contained in:
parent
7fb5f04a86
commit
8fd1941ea5
|
@ -71,6 +71,8 @@ struct _E_Config_Dialog_Data
|
||||||
Evas_Object *o_binding_list, *o_action_list;
|
Evas_Object *o_binding_list, *o_action_list;
|
||||||
Evas_Object *o_params;
|
Evas_Object *o_params;
|
||||||
} gui;
|
} gui;
|
||||||
|
|
||||||
|
E_Config_Dialog *cfd;
|
||||||
};
|
};
|
||||||
|
|
||||||
EAPI E_Config_Dialog *
|
EAPI E_Config_Dialog *
|
||||||
|
@ -132,7 +134,7 @@ _create_data(E_Config_Dialog *cfd)
|
||||||
E_Config_Dialog_Data *cfdata;
|
E_Config_Dialog_Data *cfdata;
|
||||||
|
|
||||||
cfdata = E_NEW(E_Config_Dialog_Data, 1);
|
cfdata = E_NEW(E_Config_Dialog_Data, 1);
|
||||||
|
cfdata->cfd = cfd;
|
||||||
_fill_data(cfdata);
|
_fill_data(cfdata);
|
||||||
|
|
||||||
return cfdata;
|
return cfdata;
|
||||||
|
@ -871,9 +873,13 @@ _key_binding_sort_cb(void *d1, void *d2)
|
||||||
static void
|
static void
|
||||||
_grab_wnd_show(E_Config_Dialog_Data *cfdata)
|
_grab_wnd_show(E_Config_Dialog_Data *cfdata)
|
||||||
{
|
{
|
||||||
|
E_Manager *man;
|
||||||
|
|
||||||
if (cfdata->locals.bind_win != 0) return;
|
if (cfdata->locals.bind_win != 0) return;
|
||||||
|
|
||||||
cfdata->locals.dia = e_dialog_new(e_container_current_get(e_manager_current_get()),
|
man = e_manager_current_get();
|
||||||
|
|
||||||
|
cfdata->locals.dia = e_dialog_new(e_container_current_get(man),
|
||||||
"E", "_keybind_getkey_dialog");
|
"E", "_keybind_getkey_dialog");
|
||||||
if (!cfdata->locals.dia) return;
|
if (!cfdata->locals.dia) return;
|
||||||
e_dialog_title_set(cfdata->locals.dia, _("Key Binding Sequence"));
|
e_dialog_title_set(cfdata->locals.dia, _("Key Binding Sequence"));
|
||||||
|
@ -882,7 +888,7 @@ _grab_wnd_show(E_Config_Dialog_Data *cfdata)
|
||||||
e_win_centered_set(cfdata->locals.dia->win, 1);
|
e_win_centered_set(cfdata->locals.dia->win, 1);
|
||||||
e_win_borderless_set(cfdata->locals.dia->win, 1);
|
e_win_borderless_set(cfdata->locals.dia->win, 1);
|
||||||
|
|
||||||
cfdata->locals.bind_win = ecore_x_window_input_new(e_manager_current_get()->root, 0, 0, 1, 1);
|
cfdata->locals.bind_win = ecore_x_window_input_new(man->root, 0, 0, 1, 1);
|
||||||
ecore_x_window_show(cfdata->locals.bind_win);
|
ecore_x_window_show(cfdata->locals.bind_win);
|
||||||
e_grabinput_get(cfdata->locals.bind_win, 0, cfdata->locals.bind_win);
|
e_grabinput_get(cfdata->locals.bind_win, 0, cfdata->locals.bind_win);
|
||||||
|
|
||||||
|
@ -903,6 +909,7 @@ _grab_wnd_show(E_Config_Dialog_Data *cfdata)
|
||||||
_grab_mouse_dumb_cb, NULL));
|
_grab_mouse_dumb_cb, NULL));
|
||||||
|
|
||||||
e_dialog_show(cfdata->locals.dia);
|
e_dialog_show(cfdata->locals.dia);
|
||||||
|
ecore_x_icccm_transient_for_set(cfdata->locals.dia->win->evas_win, cfdata->cfd->dia->win->evas_win);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue