forked from enlightenment/enlightenment
giant commit that wipes all bindi^W^W^Wsplits out binding configs into a separate config domain so they can be more easily copied and so they won't be wiped in the event that primary config is wiped
also splits all binding lists out of e_config: they are now conveniently located in the global "e_bindings" struct SVN revision: 83544
This commit is contained in:
parent
abe45b31c1
commit
c48fd0b06d
|
@ -1,3 +1,7 @@
|
||||||
|
2013-02-01 Mike Blumenkrantz
|
||||||
|
|
||||||
|
* split out binding configs into separate config domain
|
||||||
|
|
||||||
2013-01-31 Mike Blumenkrantz
|
2013-01-31 Mike Blumenkrantz
|
||||||
|
|
||||||
* fixed window autoraise triggering from pointer slide
|
* fixed window autoraise triggering from pointer slide
|
||||||
|
|
1
NEWS
1
NEWS
|
@ -76,6 +76,7 @@ Improvements:
|
||||||
* improve module config dialog load speed
|
* improve module config dialog load speed
|
||||||
* No longer build illume edj files
|
* No longer build illume edj files
|
||||||
* add support for AltGr in illume2's E_Kbd_Buf_Key, fix related leak
|
* add support for AltGr in illume2's E_Kbd_Buf_Key, fix related leak
|
||||||
|
* split out binding configs into separate config domain
|
||||||
|
|
||||||
Fixes:
|
Fixes:
|
||||||
* IBar menu didn't allow to configure different icon sources, show contents menu even on empty IBar.
|
* IBar menu didn't allow to configure different icon sources, show contents menu even on empty IBar.
|
||||||
|
|
|
@ -5,13 +5,15 @@ EET_EET = @eet_eet@
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
profile.desktop \
|
profile.desktop \
|
||||||
enlightenment-default.png \
|
enlightenment-default.png \
|
||||||
e.src
|
e.src \
|
||||||
|
e_bindings.src
|
||||||
|
|
||||||
filesdir = $(datadir)/enlightenment/data/config/default
|
filesdir = $(datadir)/enlightenment/data/config/default
|
||||||
files_DATA = \
|
files_DATA = \
|
||||||
profile.desktop \
|
profile.desktop \
|
||||||
enlightenment-default.png \
|
enlightenment-default.png \
|
||||||
e.cfg
|
e.cfg \
|
||||||
|
e_bindings.cfg
|
||||||
|
|
||||||
SUFFIXES = .cfg
|
SUFFIXES = .cfg
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ EXTRA_DIST = \
|
||||||
profile.desktop \
|
profile.desktop \
|
||||||
enlightenment-mobile.png \
|
enlightenment-mobile.png \
|
||||||
e.src \
|
e.src \
|
||||||
|
e_bindings.src \
|
||||||
module.battery.src \
|
module.battery.src \
|
||||||
module.illume-home.src \
|
module.illume-home.src \
|
||||||
module.illume-keyboard.src \
|
module.illume-keyboard.src \
|
||||||
|
@ -19,6 +20,7 @@ files_DATA = \
|
||||||
profile.desktop \
|
profile.desktop \
|
||||||
enlightenment-mobile.png \
|
enlightenment-mobile.png \
|
||||||
e.cfg \
|
e.cfg \
|
||||||
|
e_bindings.cfg \
|
||||||
module.battery.cfg \
|
module.battery.cfg \
|
||||||
module.illume-home.cfg \
|
module.illume-home.cfg \
|
||||||
module.illume-keyboard.cfg \
|
module.illume-keyboard.cfg \
|
||||||
|
|
|
@ -6,6 +6,7 @@ EXTRA_DIST = \
|
||||||
profile.desktop \
|
profile.desktop \
|
||||||
enlightenment-standard.png \
|
enlightenment-standard.png \
|
||||||
e.src \
|
e.src \
|
||||||
|
e_bindings.src \
|
||||||
module.battery.src \
|
module.battery.src \
|
||||||
module.cpufreq.src \
|
module.cpufreq.src \
|
||||||
module.fileman.src \
|
module.fileman.src \
|
||||||
|
@ -20,6 +21,7 @@ files_DATA = \
|
||||||
profile.desktop \
|
profile.desktop \
|
||||||
enlightenment-standard.png \
|
enlightenment-standard.png \
|
||||||
e.cfg \
|
e.cfg \
|
||||||
|
e_bindings.cfg \
|
||||||
module.battery.cfg \
|
module.battery.cfg \
|
||||||
module.cpufreq.cfg \
|
module.cpufreq.cfg \
|
||||||
module.fileman.cfg \
|
module.fileman.cfg \
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -52,19 +52,19 @@ e_bindings_init(void)
|
||||||
mapping_handler = ecore_event_handler_add
|
mapping_handler = ecore_event_handler_add
|
||||||
(ECORE_X_EVENT_MAPPING_CHANGE, _e_bindings_mapping_change_event_cb, NULL);
|
(ECORE_X_EVENT_MAPPING_CHANGE, _e_bindings_mapping_change_event_cb, NULL);
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->mouse_bindings, l, ebm)
|
EINA_LIST_FOREACH(e_bindings->mouse_bindings, l, ebm)
|
||||||
e_bindings_mouse_add(ebm->context, ebm->button, ebm->modifiers,
|
e_bindings_mouse_add(ebm->context, ebm->button, ebm->modifiers,
|
||||||
ebm->any_mod, ebm->action, ebm->params);
|
ebm->any_mod, ebm->action, ebm->params);
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->key_bindings, l, ebk)
|
EINA_LIST_FOREACH(e_bindings->key_bindings, l, ebk)
|
||||||
e_bindings_key_add(ebk->context, ebk->key, ebk->modifiers,
|
e_bindings_key_add(ebk->context, ebk->key, ebk->modifiers,
|
||||||
ebk->any_mod, ebk->action, ebk->params);
|
ebk->any_mod, ebk->action, ebk->params);
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->edge_bindings, l, ebe)
|
EINA_LIST_FOREACH(e_bindings->edge_bindings, l, ebe)
|
||||||
e_bindings_edge_add(ebe->context, ebe->edge, ebe->modifiers,
|
e_bindings_edge_add(ebe->context, ebe->edge, ebe->modifiers,
|
||||||
ebe->any_mod, ebe->action, ebe->params, ebe->delay);
|
ebe->any_mod, ebe->action, ebe->params, ebe->delay);
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->signal_bindings, l, ebs)
|
EINA_LIST_FOREACH(e_bindings->signal_bindings, l, ebs)
|
||||||
{
|
{
|
||||||
e_bindings_signal_add(ebs->context, ebs->signal, ebs->source, ebs->modifiers,
|
e_bindings_signal_add(ebs->context, ebs->signal, ebs->source, ebs->modifiers,
|
||||||
ebs->any_mod, ebs->action, ebs->params);
|
ebs->any_mod, ebs->action, ebs->params);
|
||||||
|
@ -85,11 +85,11 @@ e_bindings_init(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->wheel_bindings, l, ebw)
|
EINA_LIST_FOREACH(e_bindings->wheel_bindings, l, ebw)
|
||||||
e_bindings_wheel_add(ebw->context, ebw->direction, ebw->z, ebw->modifiers,
|
e_bindings_wheel_add(ebw->context, ebw->direction, ebw->z, ebw->modifiers,
|
||||||
ebw->any_mod, ebw->action, ebw->params);
|
ebw->any_mod, ebw->action, ebw->params);
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->acpi_bindings, l, eba)
|
EINA_LIST_FOREACH(e_bindings->acpi_bindings, l, eba)
|
||||||
e_bindings_acpi_add(eba->context, eba->type, eba->status,
|
e_bindings_acpi_add(eba->context, eba->type, eba->status,
|
||||||
eba->action, eba->params);
|
eba->action, eba->params);
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ e_bindings_signal_reset(void)
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
E_FREE_LIST(signal_bindings, _e_bindings_signal_free);
|
E_FREE_LIST(signal_bindings, _e_bindings_signal_free);
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->signal_bindings, l, ebs)
|
EINA_LIST_FOREACH(e_bindings->signal_bindings, l, ebs)
|
||||||
{
|
{
|
||||||
e_bindings_signal_add(ebs->context, ebs->signal, ebs->source, ebs->modifiers,
|
e_bindings_signal_add(ebs->context, ebs->signal, ebs->source, ebs->modifiers,
|
||||||
ebs->any_mod, ebs->action, ebs->params);
|
ebs->any_mod, ebs->action, ebs->params);
|
||||||
|
@ -152,7 +152,7 @@ e_bindings_acpi_reset(void)
|
||||||
|
|
||||||
E_FREE_LIST(acpi_bindings, _e_bindings_acpi_free);
|
E_FREE_LIST(acpi_bindings, _e_bindings_acpi_free);
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->acpi_bindings, l, eba)
|
EINA_LIST_FOREACH(e_bindings->acpi_bindings, l, eba)
|
||||||
e_bindings_acpi_add(eba->context, eba->type, eba->status,
|
e_bindings_acpi_add(eba->context, eba->type, eba->status,
|
||||||
eba->action, eba->params);
|
eba->action, eba->params);
|
||||||
}
|
}
|
||||||
|
@ -165,7 +165,7 @@ e_bindings_wheel_reset(void)
|
||||||
|
|
||||||
E_FREE_LIST(wheel_bindings, _e_bindings_wheel_free);
|
E_FREE_LIST(wheel_bindings, _e_bindings_wheel_free);
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->wheel_bindings, l, ebw)
|
EINA_LIST_FOREACH(e_bindings->wheel_bindings, l, ebw)
|
||||||
e_bindings_wheel_add(ebw->context, ebw->direction, ebw->z, ebw->modifiers,
|
e_bindings_wheel_add(ebw->context, ebw->direction, ebw->z, ebw->modifiers,
|
||||||
ebw->any_mod, ebw->action, ebw->params);
|
ebw->any_mod, ebw->action, ebw->params);
|
||||||
}
|
}
|
||||||
|
@ -178,7 +178,7 @@ e_bindings_edge_reset(void)
|
||||||
|
|
||||||
E_FREE_LIST(edge_bindings, _e_bindings_edge_free);
|
E_FREE_LIST(edge_bindings, _e_bindings_edge_free);
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->edge_bindings, l, ebe)
|
EINA_LIST_FOREACH(e_bindings->edge_bindings, l, ebe)
|
||||||
e_bindings_edge_add(ebe->context, ebe->edge, ebe->modifiers,
|
e_bindings_edge_add(ebe->context, ebe->edge, ebe->modifiers,
|
||||||
ebe->any_mod, ebe->action, ebe->params, ebe->delay);
|
ebe->any_mod, ebe->action, ebe->params, ebe->delay);
|
||||||
}
|
}
|
||||||
|
@ -191,7 +191,7 @@ e_bindings_mouse_reset(void)
|
||||||
|
|
||||||
E_FREE_LIST(mouse_bindings, _e_bindings_mouse_free);
|
E_FREE_LIST(mouse_bindings, _e_bindings_mouse_free);
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->mouse_bindings, l, ebm)
|
EINA_LIST_FOREACH(e_bindings->mouse_bindings, l, ebm)
|
||||||
e_bindings_mouse_add(ebm->context, ebm->button, ebm->modifiers,
|
e_bindings_mouse_add(ebm->context, ebm->button, ebm->modifiers,
|
||||||
ebm->any_mod, ebm->action, ebm->params);
|
ebm->any_mod, ebm->action, ebm->params);
|
||||||
}
|
}
|
||||||
|
@ -205,7 +205,7 @@ e_bindings_key_reset(void)
|
||||||
e_managers_keys_ungrab();
|
e_managers_keys_ungrab();
|
||||||
E_FREE_LIST(key_bindings, _e_bindings_key_free);
|
E_FREE_LIST(key_bindings, _e_bindings_key_free);
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->key_bindings, l, ebk)
|
EINA_LIST_FOREACH(e_bindings->key_bindings, l, ebk)
|
||||||
e_bindings_key_add(ebk->context, ebk->key, ebk->modifiers,
|
e_bindings_key_add(ebk->context, ebk->key, ebk->modifiers,
|
||||||
ebk->any_mod, ebk->action, ebk->params);
|
ebk->any_mod, ebk->action, ebk->params);
|
||||||
e_managers_keys_grab();
|
e_managers_keys_grab();
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
#define RANDR_SERIALIZED_SETUP_12 ((int)((1 << 16) | 2))
|
#define RANDR_SERIALIZED_SETUP_12 ((int)((1 << 16) | 2))
|
||||||
#define RANDR_SERIALIZED_SETUP_13 ((int)((1 << 16) | 3))
|
#define RANDR_SERIALIZED_SETUP_13 ((int)((1 << 16) | 3))
|
||||||
|
|
||||||
EAPI E_Config * e_config = NULL;
|
EAPI E_Config *e_config = NULL;
|
||||||
|
EAPI E_Config_Bindings *e_bindings = NULL;
|
||||||
|
|
||||||
static int _e_config_revisions = 9;
|
static int _e_config_revisions = 9;
|
||||||
|
|
||||||
|
@ -26,6 +27,7 @@ static E_Powersave_Deferred_Action *_e_config_save_defer = NULL;
|
||||||
static const char *_e_config_profile = NULL;
|
static const char *_e_config_profile = NULL;
|
||||||
|
|
||||||
static E_Config_DD *_e_config_edd = NULL;
|
static E_Config_DD *_e_config_edd = NULL;
|
||||||
|
static E_Config_DD *_e_config_binding_edd = NULL;
|
||||||
static E_Config_DD *_e_config_module_edd = NULL;
|
static E_Config_DD *_e_config_module_edd = NULL;
|
||||||
static E_Config_DD *_e_config_font_fallback_edd = NULL;
|
static E_Config_DD *_e_config_font_fallback_edd = NULL;
|
||||||
static E_Config_DD *_e_config_font_default_edd = NULL;
|
static E_Config_DD *_e_config_font_default_edd = NULL;
|
||||||
|
@ -107,6 +109,58 @@ _e_config_profile_name_get(Eet_File *ef)
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_e_config_bindings_free(E_Config_Bindings *ecb)
|
||||||
|
{
|
||||||
|
E_Config_Binding_Signal *ebs;
|
||||||
|
E_Config_Binding_Mouse *ebm;
|
||||||
|
E_Config_Binding_Wheel *ebw;
|
||||||
|
E_Config_Binding_Key *ebk;
|
||||||
|
E_Config_Binding_Edge *ebe;
|
||||||
|
E_Config_Binding_Acpi *eba;
|
||||||
|
|
||||||
|
EINA_LIST_FREE(ecb->mouse_bindings, ebm)
|
||||||
|
{
|
||||||
|
eina_stringshare_del(ebm->action);
|
||||||
|
eina_stringshare_del(ebm->params);
|
||||||
|
free(ebm);
|
||||||
|
}
|
||||||
|
EINA_LIST_FREE(ecb->key_bindings, ebk)
|
||||||
|
{
|
||||||
|
eina_stringshare_del(ebk->key);
|
||||||
|
eina_stringshare_del(ebk->action);
|
||||||
|
eina_stringshare_del(ebk->params);
|
||||||
|
free(ebk);
|
||||||
|
}
|
||||||
|
EINA_LIST_FREE(ecb->edge_bindings, ebe)
|
||||||
|
{
|
||||||
|
eina_stringshare_del(ebe->action);
|
||||||
|
eina_stringshare_del(ebe->params);
|
||||||
|
free(ebe);
|
||||||
|
}
|
||||||
|
EINA_LIST_FREE(ecb->signal_bindings, ebs)
|
||||||
|
{
|
||||||
|
eina_stringshare_del(ebs->signal);
|
||||||
|
eina_stringshare_del(ebs->source);
|
||||||
|
eina_stringshare_del(ebs->action);
|
||||||
|
eina_stringshare_del(ebs->params);
|
||||||
|
free(ebs);
|
||||||
|
}
|
||||||
|
EINA_LIST_FREE(ecb->wheel_bindings, ebw)
|
||||||
|
{
|
||||||
|
eina_stringshare_del(ebw->action);
|
||||||
|
eina_stringshare_del(ebw->params);
|
||||||
|
free(ebw);
|
||||||
|
}
|
||||||
|
EINA_LIST_FREE(ecb->acpi_bindings, eba)
|
||||||
|
{
|
||||||
|
eina_stringshare_del(eba->action);
|
||||||
|
eina_stringshare_del(eba->params);
|
||||||
|
free(eba);
|
||||||
|
}
|
||||||
|
free(ecb);
|
||||||
|
}
|
||||||
|
|
||||||
/* externally accessible functions */
|
/* externally accessible functions */
|
||||||
EINTERN int
|
EINTERN int
|
||||||
e_config_init(void)
|
e_config_init(void)
|
||||||
|
@ -967,6 +1021,20 @@ e_config_init(void)
|
||||||
E_CONFIG_VAL(D, T, exe_always_single_instance, UCHAR);
|
E_CONFIG_VAL(D, T, exe_always_single_instance, UCHAR);
|
||||||
|
|
||||||
E_CONFIG_VAL(D, T, use_desktop_window_profile, INT);
|
E_CONFIG_VAL(D, T, use_desktop_window_profile, INT);
|
||||||
|
|
||||||
|
_e_config_binding_edd = E_CONFIG_DD_NEW("E_Config_Bindings", E_Config_Bindings);
|
||||||
|
#undef T
|
||||||
|
#undef D
|
||||||
|
#define T E_Config_Bindings
|
||||||
|
#define D _e_config_binding_edd
|
||||||
|
E_CONFIG_VAL(D, T, config_version, UINT); /**/
|
||||||
|
E_CONFIG_LIST(D, T, mouse_bindings, _e_config_bindings_mouse_edd); /**/
|
||||||
|
E_CONFIG_LIST(D, T, key_bindings, _e_config_bindings_key_edd); /**/
|
||||||
|
E_CONFIG_LIST(D, T, edge_bindings, _e_config_bindings_edge_edd); /**/
|
||||||
|
E_CONFIG_LIST(D, T, signal_bindings, _e_config_bindings_signal_edd); /**/
|
||||||
|
E_CONFIG_LIST(D, T, wheel_bindings, _e_config_bindings_wheel_edd); /**/
|
||||||
|
E_CONFIG_LIST(D, T, acpi_bindings, _e_config_bindings_acpi_edd); /**/
|
||||||
|
|
||||||
e_config_load();
|
e_config_load();
|
||||||
|
|
||||||
e_config_save_queue();
|
e_config_save_queue();
|
||||||
|
@ -978,6 +1046,7 @@ e_config_shutdown(void)
|
||||||
{
|
{
|
||||||
eina_stringshare_del(_e_config_profile);
|
eina_stringshare_del(_e_config_profile);
|
||||||
E_CONFIG_DD_FREE(_e_config_edd);
|
E_CONFIG_DD_FREE(_e_config_edd);
|
||||||
|
E_CONFIG_DD_FREE(_e_config_binding_edd);
|
||||||
E_CONFIG_DD_FREE(_e_config_module_edd);
|
E_CONFIG_DD_FREE(_e_config_module_edd);
|
||||||
E_CONFIG_DD_FREE(_e_config_font_default_edd);
|
E_CONFIG_DD_FREE(_e_config_font_default_edd);
|
||||||
E_CONFIG_DD_FREE(_e_config_font_fallback_edd);
|
E_CONFIG_DD_FREE(_e_config_font_fallback_edd);
|
||||||
|
@ -1063,9 +1132,30 @@ e_config_load(void)
|
||||||
//e_sys_action_do(E_SYS_RESTART, NULL);
|
//e_sys_action_do(E_SYS_RESTART, NULL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
e_bindings = e_config_domain_load("e_bindings", _e_config_binding_edd);
|
||||||
|
if (e_bindings && (e_bindings->config_version != E_CONFIG_BINDINGS_VERSION))
|
||||||
|
{
|
||||||
|
Eina_Stringshare *prof;
|
||||||
|
|
||||||
|
_e_config_bindings_free(e_bindings);
|
||||||
|
prof = eina_stringshare_ref(e_config_profile_get());
|
||||||
|
e_config_profile_set("default");
|
||||||
|
e_bindings = e_config_domain_load("e_bindings", _e_config_binding_edd);
|
||||||
|
e_config_profile_set(prof);
|
||||||
|
eina_stringshare_del(prof);
|
||||||
|
ecore_timer_add(1.0, _e_config_cb_timer,
|
||||||
|
_("Your bindings settings version does not match the current settings version.<br>"
|
||||||
|
"As a result, all bindings have been reloaded from defaults.<br>"
|
||||||
|
"Sorry for the inconvenience.<br>"));
|
||||||
|
}
|
||||||
|
|
||||||
if (e_config->config_version < E_CONFIG_FILE_VERSION)
|
if (e_config->config_version < E_CONFIG_FILE_VERSION)
|
||||||
{
|
{
|
||||||
if (e_config->config_version - (E_CONFIG_FILE_EPOCH * 1000000) == 4)
|
#define CONFIG_VERSION_CHECK(VERSION) \
|
||||||
|
if (e_config->config_version - (E_CONFIG_FILE_EPOCH * 1000000) < (VERSION))
|
||||||
|
|
||||||
|
CONFIG_VERSION_CHECK(5)
|
||||||
{
|
{
|
||||||
E_Config_XKB_Layout *cl;
|
E_Config_XKB_Layout *cl;
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
|
@ -1087,10 +1177,25 @@ e_config_load(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
CONFIG_VERSION_CHECK(6)
|
||||||
|
{
|
||||||
|
e_bindings = E_NEW(E_Config_Bindings, 1);
|
||||||
|
#undef SET
|
||||||
|
#define SET(X) e_bindings->X = e_config->X, e_config->X = NULL
|
||||||
|
|
||||||
|
SET(mouse_bindings);
|
||||||
|
SET(key_bindings);
|
||||||
|
SET(edge_bindings);
|
||||||
|
SET(signal_bindings);
|
||||||
|
SET(wheel_bindings);
|
||||||
|
SET(acpi_bindings);
|
||||||
|
#undef SET
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!e_config->remember_internal_fm_windows)
|
if (!e_config->remember_internal_fm_windows)
|
||||||
e_config->remember_internal_fm_windows = !!(e_config->remember_internal_windows & E_REMEMBER_INTERNAL_FM_WINS);
|
e_config->remember_internal_fm_windows = !!(e_config->remember_internal_windows & E_REMEMBER_INTERNAL_FM_WINS);
|
||||||
|
|
||||||
|
e_bindings->config_version = E_CONFIG_BINDINGS_VERSION;
|
||||||
e_config->config_version = E_CONFIG_FILE_VERSION;
|
e_config->config_version = E_CONFIG_FILE_VERSION;
|
||||||
|
|
||||||
/* limit values so they are sane */
|
/* limit values so they are sane */
|
||||||
|
@ -1275,11 +1380,7 @@ e_config_load(void)
|
||||||
EAPI int
|
EAPI int
|
||||||
e_config_save(void)
|
e_config_save(void)
|
||||||
{
|
{
|
||||||
if (_e_config_save_defer)
|
E_FN_DEL(e_powersave_deferred_action_del, _e_config_save_defer);
|
||||||
{
|
|
||||||
e_powersave_deferred_action_del(_e_config_save_defer);
|
|
||||||
_e_config_save_defer = NULL;
|
|
||||||
}
|
|
||||||
_e_config_save_cb(NULL);
|
_e_config_save_cb(NULL);
|
||||||
return e_config_domain_save("e", _e_config_edd, e_config);
|
return e_config_domain_save("e", _e_config_edd, e_config);
|
||||||
}
|
}
|
||||||
|
@ -1677,7 +1778,7 @@ e_config_binding_mouse_match(E_Config_Binding_Mouse *eb_in)
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
E_Config_Binding_Mouse *eb;
|
E_Config_Binding_Mouse *eb;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->mouse_bindings, l, eb)
|
EINA_LIST_FOREACH(e_bindings->mouse_bindings, l, eb)
|
||||||
{
|
{
|
||||||
if ((eb->context == eb_in->context) &&
|
if ((eb->context == eb_in->context) &&
|
||||||
(eb->button == eb_in->button) &&
|
(eb->button == eb_in->button) &&
|
||||||
|
@ -1698,7 +1799,7 @@ e_config_binding_key_match(E_Config_Binding_Key *eb_in)
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
E_Config_Binding_Key *eb;
|
E_Config_Binding_Key *eb;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->mouse_bindings, l, eb)
|
EINA_LIST_FOREACH(e_bindings->mouse_bindings, l, eb)
|
||||||
{
|
{
|
||||||
if ((eb->context == eb_in->context) &&
|
if ((eb->context == eb_in->context) &&
|
||||||
(eb->modifiers == eb_in->modifiers) &&
|
(eb->modifiers == eb_in->modifiers) &&
|
||||||
|
@ -1720,7 +1821,7 @@ e_config_binding_edge_match(E_Config_Binding_Edge *eb_in)
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
E_Config_Binding_Edge *eb;
|
E_Config_Binding_Edge *eb;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->edge_bindings, l, eb)
|
EINA_LIST_FOREACH(e_bindings->edge_bindings, l, eb)
|
||||||
{
|
{
|
||||||
if ((eb->context == eb_in->context) &&
|
if ((eb->context == eb_in->context) &&
|
||||||
(eb->modifiers == eb_in->modifiers) &&
|
(eb->modifiers == eb_in->modifiers) &&
|
||||||
|
@ -1742,7 +1843,7 @@ e_config_binding_signal_match(E_Config_Binding_Signal *eb_in)
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
E_Config_Binding_Signal *eb;
|
E_Config_Binding_Signal *eb;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->signal_bindings, l, eb)
|
EINA_LIST_FOREACH(e_bindings->signal_bindings, l, eb)
|
||||||
{
|
{
|
||||||
if ((eb->context == eb_in->context) &&
|
if ((eb->context == eb_in->context) &&
|
||||||
(eb->modifiers == eb_in->modifiers) &&
|
(eb->modifiers == eb_in->modifiers) &&
|
||||||
|
@ -1766,7 +1867,7 @@ e_config_binding_wheel_match(E_Config_Binding_Wheel *eb_in)
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
E_Config_Binding_Wheel *eb;
|
E_Config_Binding_Wheel *eb;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->wheel_bindings, l, eb)
|
EINA_LIST_FOREACH(e_bindings->wheel_bindings, l, eb)
|
||||||
{
|
{
|
||||||
if ((eb->context == eb_in->context) &&
|
if ((eb->context == eb_in->context) &&
|
||||||
(eb->direction == eb_in->direction) &&
|
(eb->direction == eb_in->direction) &&
|
||||||
|
@ -1788,7 +1889,7 @@ e_config_binding_acpi_match(E_Config_Binding_Acpi *eb_in)
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
E_Config_Binding_Acpi *eb;
|
E_Config_Binding_Acpi *eb;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->acpi_bindings, l, eb)
|
EINA_LIST_FOREACH(e_bindings->acpi_bindings, l, eb)
|
||||||
{
|
{
|
||||||
if ((eb->context == eb_in->context) &&
|
if ((eb->context == eb_in->context) &&
|
||||||
(eb->type == eb_in->type) &&
|
(eb->type == eb_in->type) &&
|
||||||
|
@ -1817,19 +1918,14 @@ _e_config_save_cb(void *data __UNUSED__)
|
||||||
e_config_profile_save();
|
e_config_profile_save();
|
||||||
e_module_save_all();
|
e_module_save_all();
|
||||||
e_config_domain_save("e", _e_config_edd, e_config);
|
e_config_domain_save("e", _e_config_edd, e_config);
|
||||||
|
e_config_domain_save("e_bindings", _e_config_binding_edd, e_bindings);
|
||||||
_e_config_save_defer = NULL;
|
_e_config_save_defer = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_config_free(E_Config *ecf)
|
_e_config_free(E_Config *ecf)
|
||||||
{
|
{
|
||||||
E_Config_Binding_Signal *ebs;
|
|
||||||
E_Config_Binding_Mouse *ebm;
|
|
||||||
E_Config_Binding_Wheel *ebw;
|
|
||||||
E_Config_Syscon_Action *sca;
|
E_Config_Syscon_Action *sca;
|
||||||
E_Config_Binding_Key *ebk;
|
|
||||||
E_Config_Binding_Edge *ebe;
|
|
||||||
E_Config_Binding_Acpi *eba;
|
|
||||||
E_Font_Fallback *eff;
|
E_Font_Fallback *eff;
|
||||||
E_Config_Module *em;
|
E_Config_Module *em;
|
||||||
E_Font_Default *efd;
|
E_Font_Default *efd;
|
||||||
|
@ -1880,45 +1976,6 @@ _e_config_free(E_Config *ecf)
|
||||||
if (et->file) eina_stringshare_del(et->file);
|
if (et->file) eina_stringshare_del(et->file);
|
||||||
E_FREE(et);
|
E_FREE(et);
|
||||||
}
|
}
|
||||||
EINA_LIST_FREE(ecf->mouse_bindings, ebm)
|
|
||||||
{
|
|
||||||
if (ebm->action) eina_stringshare_del(ebm->action);
|
|
||||||
if (ebm->params) eina_stringshare_del(ebm->params);
|
|
||||||
E_FREE(ebm);
|
|
||||||
}
|
|
||||||
EINA_LIST_FREE(ecf->key_bindings, ebk)
|
|
||||||
{
|
|
||||||
if (ebk->key) eina_stringshare_del(ebk->key);
|
|
||||||
if (ebk->action) eina_stringshare_del(ebk->action);
|
|
||||||
if (ebk->params) eina_stringshare_del(ebk->params);
|
|
||||||
E_FREE(ebk);
|
|
||||||
}
|
|
||||||
EINA_LIST_FREE(ecf->edge_bindings, ebe)
|
|
||||||
{
|
|
||||||
if (ebe->action) eina_stringshare_del(ebe->action);
|
|
||||||
if (ebe->params) eina_stringshare_del(ebe->params);
|
|
||||||
E_FREE(ebe);
|
|
||||||
}
|
|
||||||
EINA_LIST_FREE(ecf->signal_bindings, ebs)
|
|
||||||
{
|
|
||||||
if (ebs->signal) eina_stringshare_del(ebs->signal);
|
|
||||||
if (ebs->source) eina_stringshare_del(ebs->source);
|
|
||||||
if (ebs->action) eina_stringshare_del(ebs->action);
|
|
||||||
if (ebs->params) eina_stringshare_del(ebs->params);
|
|
||||||
E_FREE(ebs);
|
|
||||||
}
|
|
||||||
EINA_LIST_FREE(ecf->wheel_bindings, ebw)
|
|
||||||
{
|
|
||||||
if (ebw->action) eina_stringshare_del(ebw->action);
|
|
||||||
if (ebw->params) eina_stringshare_del(ebw->params);
|
|
||||||
E_FREE(ebw);
|
|
||||||
}
|
|
||||||
EINA_LIST_FREE(ecf->acpi_bindings, eba)
|
|
||||||
{
|
|
||||||
if (eba->action) eina_stringshare_del(eba->action);
|
|
||||||
if (eba->params) eina_stringshare_del(eba->params);
|
|
||||||
E_FREE(eba);
|
|
||||||
}
|
|
||||||
EINA_LIST_FREE(ecf->path_append_data, epd)
|
EINA_LIST_FREE(ecf->path_append_data, epd)
|
||||||
{
|
{
|
||||||
if (epd->dir) eina_stringshare_del(epd->dir);
|
if (epd->dir) eina_stringshare_del(epd->dir);
|
||||||
|
|
|
@ -27,6 +27,8 @@ typedef struct _E_Config_XKB_Option E_Config_XKB_Option;
|
||||||
|
|
||||||
typedef struct _E_Event_Config_Icon_Theme E_Event_Config_Icon_Theme;
|
typedef struct _E_Event_Config_Icon_Theme E_Event_Config_Icon_Theme;
|
||||||
|
|
||||||
|
typedef struct E_Config_Bindings E_Config_Bindings;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#ifndef E_CONFIG_H
|
#ifndef E_CONFIG_H
|
||||||
#define E_CONFIG_H
|
#define E_CONFIG_H
|
||||||
|
@ -38,9 +40,11 @@ typedef struct _E_Event_Config_Icon_Theme E_Event_Config_Icon_Theme;
|
||||||
/* increment this whenever a new set of config values are added but the users
|
/* increment this whenever a new set of config values are added but the users
|
||||||
* config doesn't need to be wiped - simply new values need to be put in
|
* config doesn't need to be wiped - simply new values need to be put in
|
||||||
*/
|
*/
|
||||||
#define E_CONFIG_FILE_GENERATION 5
|
#define E_CONFIG_FILE_GENERATION 6
|
||||||
#define E_CONFIG_FILE_VERSION ((E_CONFIG_FILE_EPOCH * 1000000) + E_CONFIG_FILE_GENERATION)
|
#define E_CONFIG_FILE_VERSION ((E_CONFIG_FILE_EPOCH * 1000000) + E_CONFIG_FILE_GENERATION)
|
||||||
|
|
||||||
|
#define E_CONFIG_BINDINGS_VERSION 0 // DO NOT INCREMENT UNLESS YOU WANT TO WIPE ALL BINDINGS!!!!!
|
||||||
|
|
||||||
struct _E_Config
|
struct _E_Config
|
||||||
{
|
{
|
||||||
int config_version; // INTERNAL
|
int config_version; // INTERNAL
|
||||||
|
@ -77,12 +81,15 @@ struct _E_Config
|
||||||
Eina_List *font_fallbacks; // GUI
|
Eina_List *font_fallbacks; // GUI
|
||||||
Eina_List *font_defaults; // GUI
|
Eina_List *font_defaults; // GUI
|
||||||
Eina_List *themes; // GUI
|
Eina_List *themes; // GUI
|
||||||
|
|
||||||
|
/* NO LONGER SAVED WITH THIS STRUCT */
|
||||||
Eina_List *mouse_bindings; // GUI
|
Eina_List *mouse_bindings; // GUI
|
||||||
Eina_List *key_bindings; // GUI
|
Eina_List *key_bindings; // GUI
|
||||||
Eina_List *edge_bindings; // GUI
|
Eina_List *edge_bindings; // GUI
|
||||||
Eina_List *signal_bindings;
|
Eina_List *signal_bindings; // GUI
|
||||||
Eina_List *wheel_bindings; // GUI
|
Eina_List *wheel_bindings; // GUI
|
||||||
Eina_List *acpi_bindings; // GUI
|
Eina_List *acpi_bindings; // GUI
|
||||||
|
|
||||||
Eina_List *path_append_data; // GUI
|
Eina_List *path_append_data; // GUI
|
||||||
Eina_List *path_append_images; // GUI
|
Eina_List *path_append_images; // GUI
|
||||||
Eina_List *path_append_fonts; // GUI
|
Eina_List *path_append_fonts; // GUI
|
||||||
|
@ -414,6 +421,17 @@ struct _E_Config
|
||||||
int use_desktop_window_profile; // GUI
|
int use_desktop_window_profile; // GUI
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct E_Config_Bindings
|
||||||
|
{
|
||||||
|
unsigned int config_version;
|
||||||
|
Eina_List *mouse_bindings; // GUI
|
||||||
|
Eina_List *key_bindings; // GUI
|
||||||
|
Eina_List *edge_bindings; // GUI
|
||||||
|
Eina_List *signal_bindings; // GUI
|
||||||
|
Eina_List *wheel_bindings; // GUI
|
||||||
|
Eina_List *acpi_bindings; // GUI
|
||||||
|
};
|
||||||
|
|
||||||
struct _E_Config_Desklock_Background
|
struct _E_Config_Desklock_Background
|
||||||
{
|
{
|
||||||
const char *file;
|
const char *file;
|
||||||
|
@ -644,7 +662,8 @@ EAPI E_Config_Binding_Wheel *e_config_binding_wheel_match(E_Config_Binding_Whee
|
||||||
EAPI E_Config_Binding_Acpi *e_config_binding_acpi_match(E_Config_Binding_Acpi *eb_in);
|
EAPI E_Config_Binding_Acpi *e_config_binding_acpi_match(E_Config_Binding_Acpi *eb_in);
|
||||||
EAPI void e_config_mode_changed(void);
|
EAPI void e_config_mode_changed(void);
|
||||||
|
|
||||||
extern EAPI E_Config * e_config;
|
extern EAPI E_Config *e_config;
|
||||||
|
extern EAPI E_Config_Bindings *e_bindings;
|
||||||
|
|
||||||
extern EAPI int E_EVENT_CONFIG_ICON_THEME;
|
extern EAPI int E_EVENT_CONFIG_ICON_THEME;
|
||||||
extern EAPI int E_EVENT_CONFIG_MODE_CHANGED;
|
extern EAPI int E_EVENT_CONFIG_MODE_CHANGED;
|
||||||
|
|
|
@ -1446,7 +1446,7 @@ e_util_binding_match(const Eina_List *bindlist, Ecore_Event_Key *ev, unsigned in
|
||||||
if (ev->modifiers & ECORE_X_LOCK_NUM)
|
if (ev->modifiers & ECORE_X_LOCK_NUM)
|
||||||
mod |= ECORE_X_LOCK_NUM;
|
mod |= ECORE_X_LOCK_NUM;
|
||||||
*/
|
*/
|
||||||
EINA_LIST_FOREACH(bindlist ? : e_config->key_bindings, l, bi)
|
EINA_LIST_FOREACH(bindlist ? : e_bindings->key_bindings, l, bi)
|
||||||
{
|
{
|
||||||
if (bi != skip)
|
if (bi != skip)
|
||||||
{
|
{
|
||||||
|
|
|
@ -157,7 +157,7 @@ _backlight_input_win_key_down_cb(void *data, int type __UNUSED__, void *event)
|
||||||
E_Config_Binding_Key *binding;
|
E_Config_Binding_Key *binding;
|
||||||
E_Binding_Modifier mod;
|
E_Binding_Modifier mod;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->key_bindings, l, binding)
|
EINA_LIST_FOREACH(e_bindings->key_bindings, l, binding)
|
||||||
{
|
{
|
||||||
if (binding->action && strcmp(binding->action, "backlight")) continue;
|
if (binding->action && strcmp(binding->action, "backlight")) continue;
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
||||||
cfdata->locals.click = 0;
|
cfdata->locals.click = 0;
|
||||||
cfdata->binding.edge = NULL;
|
cfdata->binding.edge = NULL;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->edge_bindings, l, bi)
|
EINA_LIST_FOREACH(e_bindings->edge_bindings, l, bi)
|
||||||
{
|
{
|
||||||
if (!bi) continue;
|
if (!bi) continue;
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
||||||
|
|
||||||
_auto_apply_changes(cfdata);
|
_auto_apply_changes(cfdata);
|
||||||
|
|
||||||
EINA_LIST_FREE(e_config->edge_bindings, bi)
|
EINA_LIST_FREE(e_bindings->edge_bindings, bi)
|
||||||
{
|
{
|
||||||
e_bindings_edge_del(bi->context, bi->edge, bi->modifiers, bi->any_mod,
|
e_bindings_edge_del(bi->context, bi->edge, bi->modifiers, bi->any_mod,
|
||||||
bi->action, bi->params, bi->delay);
|
bi->action, bi->params, bi->delay);
|
||||||
|
@ -217,7 +217,7 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
||||||
bi->params =
|
bi->params =
|
||||||
((!bi2->params) || (!bi2->params[0])) ? NULL : eina_stringshare_add(bi2->params);
|
((!bi2->params) || (!bi2->params[0])) ? NULL : eina_stringshare_add(bi2->params);
|
||||||
|
|
||||||
e_config->edge_bindings = eina_list_append(e_config->edge_bindings, bi);
|
e_bindings->edge_bindings = eina_list_append(e_bindings->edge_bindings, bi);
|
||||||
e_bindings_edge_add(bi->context, bi->edge, bi->modifiers, bi->any_mod,
|
e_bindings_edge_add(bi->context, bi->edge, bi->modifiers, bi->any_mod,
|
||||||
bi->action, bi->params, bi->delay);
|
bi->action, bi->params, bi->delay);
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,7 +150,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
||||||
cfdata->locals.dia = NULL;
|
cfdata->locals.dia = NULL;
|
||||||
cfdata->binding.signal = NULL;
|
cfdata->binding.signal = NULL;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->signal_bindings, l, bi)
|
EINA_LIST_FOREACH(e_bindings->signal_bindings, l, bi)
|
||||||
{
|
{
|
||||||
if (!bi) continue;
|
if (!bi) continue;
|
||||||
bi2 = _signal_binding_copy(bi);
|
bi2 = _signal_binding_copy(bi);
|
||||||
|
@ -467,11 +467,11 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
||||||
E_Config_Binding_Signal *bi, *bi2;
|
E_Config_Binding_Signal *bi, *bi2;
|
||||||
|
|
||||||
_auto_apply_changes(cfdata);
|
_auto_apply_changes(cfdata);
|
||||||
E_FREE_LIST(e_config->signal_bindings, _signal_binding_free);
|
E_FREE_LIST(e_bindings->signal_bindings, _signal_binding_free);
|
||||||
EINA_LIST_FOREACH(cfdata->binding.signal, l, bi2)
|
EINA_LIST_FOREACH(cfdata->binding.signal, l, bi2)
|
||||||
{
|
{
|
||||||
bi = _signal_binding_copy(bi2);
|
bi = _signal_binding_copy(bi2);
|
||||||
e_config->signal_bindings = eina_list_append(e_config->signal_bindings, bi);
|
e_bindings->signal_bindings = eina_list_append(e_bindings->signal_bindings, bi);
|
||||||
}
|
}
|
||||||
e_bindings_signal_reset();
|
e_bindings_signal_reset();
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
E_Config_Binding_Acpi *binding;
|
E_Config_Binding_Acpi *binding;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->acpi_bindings, l, binding)
|
EINA_LIST_FOREACH(e_bindings->acpi_bindings, l, binding)
|
||||||
{
|
{
|
||||||
E_Config_Binding_Acpi *b2;
|
E_Config_Binding_Acpi *b2;
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ _basic_apply(E_Config_Dialog *cfd __UNUSED__,
|
||||||
E_Config_Binding_Acpi *binding, *b2;
|
E_Config_Binding_Acpi *binding, *b2;
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
|
|
||||||
EINA_LIST_FREE(e_config->acpi_bindings, binding)
|
EINA_LIST_FREE(e_bindings->acpi_bindings, binding)
|
||||||
{
|
{
|
||||||
e_bindings_acpi_del(binding->context, binding->type, binding->status,
|
e_bindings_acpi_del(binding->context, binding->type, binding->status,
|
||||||
binding->action, binding->params);
|
binding->action, binding->params);
|
||||||
|
@ -167,8 +167,8 @@ _basic_apply(E_Config_Dialog *cfd __UNUSED__,
|
||||||
b2->status = binding->status;
|
b2->status = binding->status;
|
||||||
b2->action = eina_stringshare_ref(binding->action);
|
b2->action = eina_stringshare_ref(binding->action);
|
||||||
b2->params = eina_stringshare_ref(binding->params);
|
b2->params = eina_stringshare_ref(binding->params);
|
||||||
e_config->acpi_bindings =
|
e_bindings->acpi_bindings =
|
||||||
eina_list_append(e_config->acpi_bindings, b2);
|
eina_list_append(e_bindings->acpi_bindings, b2);
|
||||||
|
|
||||||
e_bindings_acpi_add(b2->context, b2->type, b2->status,
|
e_bindings_acpi_add(b2->context, b2->type, b2->status,
|
||||||
b2->action, b2->params);
|
b2->action, b2->params);
|
||||||
|
@ -535,7 +535,7 @@ _cb_del_binding(void *data,
|
||||||
if (!(binding = _selected_binding_get(cfdata))) return;
|
if (!(binding = _selected_binding_get(cfdata))) return;
|
||||||
|
|
||||||
/* delete from e_config */
|
/* delete from e_config */
|
||||||
EINA_LIST_FOREACH(e_config->acpi_bindings, l, bind2)
|
EINA_LIST_FOREACH(e_bindings->acpi_bindings, l, bind2)
|
||||||
{
|
{
|
||||||
if ((binding->context == bind2->context) && (binding->type == bind2->type) &&
|
if ((binding->context == bind2->context) && (binding->type == bind2->type) &&
|
||||||
(((binding->action) && (bind2->action) &&
|
(((binding->action) && (bind2->action) &&
|
||||||
|
@ -548,8 +548,8 @@ _cb_del_binding(void *data,
|
||||||
if (bind2->action) eina_stringshare_del(bind2->action);
|
if (bind2->action) eina_stringshare_del(bind2->action);
|
||||||
if (bind2->params) eina_stringshare_del(bind2->params);
|
if (bind2->params) eina_stringshare_del(bind2->params);
|
||||||
E_FREE(bind2);
|
E_FREE(bind2);
|
||||||
e_config->acpi_bindings =
|
e_bindings->acpi_bindings =
|
||||||
eina_list_remove_list(e_config->acpi_bindings, l);
|
eina_list_remove_list(e_bindings->acpi_bindings, l);
|
||||||
e_config_save_queue();
|
e_config_save_queue();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,7 +128,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
||||||
cfdata->binding.key = NULL;
|
cfdata->binding.key = NULL;
|
||||||
cfdata->locals.eg = NULL;
|
cfdata->locals.eg = NULL;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->key_bindings, l, bi)
|
EINA_LIST_FOREACH(e_bindings->key_bindings, l, bi)
|
||||||
{
|
{
|
||||||
if (!bi) continue;
|
if (!bi) continue;
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__,
|
||||||
_auto_apply_changes(cfdata);
|
_auto_apply_changes(cfdata);
|
||||||
|
|
||||||
e_managers_keys_ungrab();
|
e_managers_keys_ungrab();
|
||||||
EINA_LIST_FREE(e_config->key_bindings, bi)
|
EINA_LIST_FREE(e_bindings->key_bindings, bi)
|
||||||
{
|
{
|
||||||
e_bindings_key_del(bi->context, bi->key, bi->modifiers, bi->any_mod,
|
e_bindings_key_del(bi->context, bi->key, bi->modifiers, bi->any_mod,
|
||||||
bi->action, bi->params);
|
bi->action, bi->params);
|
||||||
|
@ -216,7 +216,7 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__,
|
||||||
bi->params =
|
bi->params =
|
||||||
((!bi2->params) || (!bi2->params[0])) ? NULL : eina_stringshare_ref(bi2->params);
|
((!bi2->params) || (!bi2->params[0])) ? NULL : eina_stringshare_ref(bi2->params);
|
||||||
|
|
||||||
e_config->key_bindings = eina_list_append(e_config->key_bindings, bi);
|
e_bindings->key_bindings = eina_list_append(e_bindings->key_bindings, bi);
|
||||||
e_bindings_key_add(bi->context, bi->key, bi->modifiers, bi->any_mod,
|
e_bindings_key_add(bi->context, bi->key, bi->modifiers, bi->any_mod,
|
||||||
bi->action, bi->params);
|
bi->action, bi->params);
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,7 +127,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
||||||
cfdata->binding.wheel = NULL;
|
cfdata->binding.wheel = NULL;
|
||||||
cfdata->locals.eg = NULL;
|
cfdata->locals.eg = NULL;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->mouse_bindings, l, eb)
|
EINA_LIST_FOREACH(e_bindings->mouse_bindings, l, eb)
|
||||||
{
|
{
|
||||||
eb2 = E_NEW(E_Config_Binding_Mouse, 1);
|
eb2 = E_NEW(E_Config_Binding_Mouse, 1);
|
||||||
eb2->context = eb->context;
|
eb2->context = eb->context;
|
||||||
|
@ -140,7 +140,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
||||||
cfdata->binding.mouse = eina_list_append(cfdata->binding.mouse, eb2);
|
cfdata->binding.mouse = eina_list_append(cfdata->binding.mouse, eb2);
|
||||||
}
|
}
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->wheel_bindings, l, bw)
|
EINA_LIST_FOREACH(e_bindings->wheel_bindings, l, bw)
|
||||||
{
|
{
|
||||||
bw2 = E_NEW(E_Config_Binding_Wheel, 1);
|
bw2 = E_NEW(E_Config_Binding_Wheel, 1);
|
||||||
bw2->context = bw->context;
|
bw2->context = bw->context;
|
||||||
|
@ -207,7 +207,7 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
||||||
e_border_button_bindings_ungrab_all();
|
e_border_button_bindings_ungrab_all();
|
||||||
e_managers_keys_ungrab();
|
e_managers_keys_ungrab();
|
||||||
|
|
||||||
EINA_LIST_FREE(e_config->mouse_bindings, eb)
|
EINA_LIST_FREE(e_bindings->mouse_bindings, eb)
|
||||||
{
|
{
|
||||||
e_bindings_mouse_del(eb->context, eb->button, eb->modifiers, eb->any_mod,
|
e_bindings_mouse_del(eb->context, eb->button, eb->modifiers, eb->any_mod,
|
||||||
eb->action, eb->params);
|
eb->action, eb->params);
|
||||||
|
@ -226,12 +226,12 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
||||||
eb2->action = !eb->action ? NULL : eina_stringshare_add(eb->action);
|
eb2->action = !eb->action ? NULL : eina_stringshare_add(eb->action);
|
||||||
eb2->params = !eb->params ? NULL : eina_stringshare_add(eb->params);
|
eb2->params = !eb->params ? NULL : eina_stringshare_add(eb->params);
|
||||||
|
|
||||||
e_config->mouse_bindings = eina_list_append(e_config->mouse_bindings, eb2);
|
e_bindings->mouse_bindings = eina_list_append(e_bindings->mouse_bindings, eb2);
|
||||||
e_bindings_mouse_add(eb2->context, eb2->button, eb2->modifiers, eb2->any_mod,
|
e_bindings_mouse_add(eb2->context, eb2->button, eb2->modifiers, eb2->any_mod,
|
||||||
eb2->action, eb2->params);
|
eb2->action, eb2->params);
|
||||||
}
|
}
|
||||||
|
|
||||||
EINA_LIST_FREE(e_config->wheel_bindings, bw)
|
EINA_LIST_FREE(e_bindings->wheel_bindings, bw)
|
||||||
{
|
{
|
||||||
e_bindings_wheel_del(bw->context, bw->direction, bw->z, bw->modifiers, bw->any_mod,
|
e_bindings_wheel_del(bw->context, bw->direction, bw->z, bw->modifiers, bw->any_mod,
|
||||||
bw->action, bw->params);
|
bw->action, bw->params);
|
||||||
|
@ -264,7 +264,7 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
||||||
bw2->action = !bw->action ? NULL : eina_stringshare_add(bw->action);
|
bw2->action = !bw->action ? NULL : eina_stringshare_add(bw->action);
|
||||||
bw2->params = !bw->params ? NULL : eina_stringshare_add(bw->params);
|
bw2->params = !bw->params ? NULL : eina_stringshare_add(bw->params);
|
||||||
|
|
||||||
e_config->wheel_bindings = eina_list_append(e_config->wheel_bindings, bw2);
|
e_bindings->wheel_bindings = eina_list_append(e_bindings->wheel_bindings, bw2);
|
||||||
e_bindings_wheel_add(bw2->context, bw2->direction, bw2->z, bw2->modifiers,
|
e_bindings_wheel_add(bw2->context, bw2->direction, bw2->z, bw2->modifiers,
|
||||||
bw2->any_mod, bw2->action, bw2->params);
|
bw2->any_mod, bw2->action, bw2->params);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1982,7 +1982,7 @@ _evry_cb_key_down(void *data, int type __UNUSED__, void *event)
|
||||||
E_Config_Binding_Key *binding;
|
E_Config_Binding_Key *binding;
|
||||||
E_Binding_Modifier mod;
|
E_Binding_Modifier mod;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->key_bindings, l, binding)
|
EINA_LIST_FOREACH(e_bindings->key_bindings, l, binding)
|
||||||
{
|
{
|
||||||
if (binding->action && strcmp(binding->action, "everything")) continue;
|
if (binding->action && strcmp(binding->action, "everything")) continue;
|
||||||
|
|
||||||
|
|
|
@ -525,7 +525,7 @@ _mixer_popup_input_window_key_down_cb(void *data, int type __UNUSED__, void *eve
|
||||||
E_Binding_Modifier mod;
|
E_Binding_Modifier mod;
|
||||||
Eina_Bool handled = EINA_FALSE;
|
Eina_Bool handled = EINA_FALSE;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->key_bindings, l, binding)
|
EINA_LIST_FOREACH(e_bindings->key_bindings, l, binding)
|
||||||
{
|
{
|
||||||
if (binding->action &&
|
if (binding->action &&
|
||||||
(strcmp(binding->action, "volume_increase") &&
|
(strcmp(binding->action, "volume_increase") &&
|
||||||
|
|
|
@ -2684,7 +2684,7 @@ _pager_popup_cb_key_down(void *data __UNUSED__, int type __UNUSED__, void *event
|
||||||
E_Config_Binding_Key *binding;
|
E_Config_Binding_Key *binding;
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->key_bindings, l, binding)
|
EINA_LIST_FOREACH(e_bindings->key_bindings, l, binding)
|
||||||
{
|
{
|
||||||
E_Binding_Modifier mod = 0;
|
E_Binding_Modifier mod = 0;
|
||||||
|
|
||||||
|
|
|
@ -666,7 +666,7 @@ _grab_key_down_cb(void *data, int type __UNUSED__, void *event)
|
||||||
bi->params = eina_stringshare_ref(entry->id);
|
bi->params = eina_stringshare_ref(entry->id);
|
||||||
|
|
||||||
e_managers_keys_ungrab();
|
e_managers_keys_ungrab();
|
||||||
e_config->key_bindings = eina_list_append(e_config->key_bindings, bi);
|
e_bindings->key_bindings = eina_list_append(e_bindings->key_bindings, bi);
|
||||||
e_bindings_key_add(bi->context, bi->key, bi->modifiers, bi->any_mod, bi->action, bi->params);
|
e_bindings_key_add(bi->context, bi->key, bi->modifiers, bi->any_mod, bi->action, bi->params);
|
||||||
e_managers_keys_grab();
|
e_managers_keys_grab();
|
||||||
e_config_save_queue();
|
e_config_save_queue();
|
||||||
|
|
|
@ -12,68 +12,68 @@ e_qa_entry_bindings_cleanup(E_Quick_Access_Entry *entry)
|
||||||
E_Config_Binding_Acpi *abi;
|
E_Config_Binding_Acpi *abi;
|
||||||
E_Config_Binding_Signal *sbi;
|
E_Config_Binding_Signal *sbi;
|
||||||
|
|
||||||
EINA_LIST_FOREACH_SAFE(e_config->key_bindings, l, ll, kbi)
|
EINA_LIST_FOREACH_SAFE(e_bindings->key_bindings, l, ll, kbi)
|
||||||
{
|
{
|
||||||
if ((kbi->action == _act_toggle) && (kbi->params == entry->id))
|
if ((kbi->action == _act_toggle) && (kbi->params == entry->id))
|
||||||
{
|
{
|
||||||
DBG("removed keybind for %s", entry->id);
|
DBG("removed keybind for %s", entry->id);
|
||||||
e_config->key_bindings = eina_list_remove_list(e_config->key_bindings, l);
|
e_bindings->key_bindings = eina_list_remove_list(e_bindings->key_bindings, l);
|
||||||
eina_stringshare_del(kbi->key);
|
eina_stringshare_del(kbi->key);
|
||||||
eina_stringshare_del(kbi->action);
|
eina_stringshare_del(kbi->action);
|
||||||
eina_stringshare_del(kbi->params);
|
eina_stringshare_del(kbi->params);
|
||||||
free(kbi);
|
free(kbi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EINA_LIST_FOREACH_SAFE(e_config->mouse_bindings, l, ll, mbi)
|
EINA_LIST_FOREACH_SAFE(e_bindings->mouse_bindings, l, ll, mbi)
|
||||||
{
|
{
|
||||||
if ((mbi->action == _act_toggle) && (mbi->params == entry->id))
|
if ((mbi->action == _act_toggle) && (mbi->params == entry->id))
|
||||||
{
|
{
|
||||||
DBG("removed mousebind for %s", entry->id);
|
DBG("removed mousebind for %s", entry->id);
|
||||||
e_config->mouse_bindings = eina_list_remove_list(e_config->mouse_bindings, l);
|
e_bindings->mouse_bindings = eina_list_remove_list(e_bindings->mouse_bindings, l);
|
||||||
eina_stringshare_del(mbi->action);
|
eina_stringshare_del(mbi->action);
|
||||||
eina_stringshare_del(mbi->params);
|
eina_stringshare_del(mbi->params);
|
||||||
free(mbi);
|
free(mbi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EINA_LIST_FOREACH_SAFE(e_config->edge_bindings, l, ll, ebi)
|
EINA_LIST_FOREACH_SAFE(e_bindings->edge_bindings, l, ll, ebi)
|
||||||
{
|
{
|
||||||
if ((ebi->action == _act_toggle) && (ebi->params == entry->id))
|
if ((ebi->action == _act_toggle) && (ebi->params == entry->id))
|
||||||
{
|
{
|
||||||
DBG("removed edgebind for %s", entry->id);
|
DBG("removed edgebind for %s", entry->id);
|
||||||
e_config->edge_bindings = eina_list_remove_list(e_config->edge_bindings, l);
|
e_bindings->edge_bindings = eina_list_remove_list(e_bindings->edge_bindings, l);
|
||||||
eina_stringshare_del(ebi->action);
|
eina_stringshare_del(ebi->action);
|
||||||
eina_stringshare_del(ebi->params);
|
eina_stringshare_del(ebi->params);
|
||||||
free(ebi);
|
free(ebi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EINA_LIST_FOREACH_SAFE(e_config->wheel_bindings, l, ll, wbi)
|
EINA_LIST_FOREACH_SAFE(e_bindings->wheel_bindings, l, ll, wbi)
|
||||||
{
|
{
|
||||||
if ((wbi->action == _act_toggle) && (wbi->params == entry->id))
|
if ((wbi->action == _act_toggle) && (wbi->params == entry->id))
|
||||||
{
|
{
|
||||||
DBG("removed wheelbind for %s", entry->id);
|
DBG("removed wheelbind for %s", entry->id);
|
||||||
e_config->wheel_bindings = eina_list_remove_list(e_config->wheel_bindings, l);
|
e_bindings->wheel_bindings = eina_list_remove_list(e_bindings->wheel_bindings, l);
|
||||||
eina_stringshare_del(wbi->action);
|
eina_stringshare_del(wbi->action);
|
||||||
eina_stringshare_del(wbi->params);
|
eina_stringshare_del(wbi->params);
|
||||||
free(wbi);
|
free(wbi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EINA_LIST_FOREACH_SAFE(e_config->acpi_bindings, l, ll, abi)
|
EINA_LIST_FOREACH_SAFE(e_bindings->acpi_bindings, l, ll, abi)
|
||||||
{
|
{
|
||||||
if ((abi->action == _act_toggle) && (abi->params == entry->id))
|
if ((abi->action == _act_toggle) && (abi->params == entry->id))
|
||||||
{
|
{
|
||||||
DBG("removed acpibind for %s", entry->id);
|
DBG("removed acpibind for %s", entry->id);
|
||||||
e_config->acpi_bindings = eina_list_remove_list(e_config->acpi_bindings, l);
|
e_bindings->acpi_bindings = eina_list_remove_list(e_bindings->acpi_bindings, l);
|
||||||
eina_stringshare_del(abi->action);
|
eina_stringshare_del(abi->action);
|
||||||
eina_stringshare_del(abi->params);
|
eina_stringshare_del(abi->params);
|
||||||
free(abi);
|
free(abi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EINA_LIST_FOREACH_SAFE(e_config->signal_bindings, l, ll, sbi)
|
EINA_LIST_FOREACH_SAFE(e_bindings->signal_bindings, l, ll, sbi)
|
||||||
{
|
{
|
||||||
if ((sbi->action == _act_toggle) && (sbi->params == entry->id))
|
if ((sbi->action == _act_toggle) && (sbi->params == entry->id))
|
||||||
{
|
{
|
||||||
DBG("removed signalbind for %s", entry->id);
|
DBG("removed signalbind for %s", entry->id);
|
||||||
e_config->signal_bindings = eina_list_remove_list(e_config->signal_bindings, l);
|
e_bindings->signal_bindings = eina_list_remove_list(e_bindings->signal_bindings, l);
|
||||||
eina_stringshare_del(sbi->action);
|
eina_stringshare_del(sbi->action);
|
||||||
eina_stringshare_del(sbi->params);
|
eina_stringshare_del(sbi->params);
|
||||||
free(sbi);
|
free(sbi);
|
||||||
|
@ -93,7 +93,7 @@ e_qa_entry_bindings_rename(E_Quick_Access_Entry *entry, const char *name)
|
||||||
E_Config_Binding_Signal *sbi;
|
E_Config_Binding_Signal *sbi;
|
||||||
|
|
||||||
#define RENAME(TYPE, VAR) do {\
|
#define RENAME(TYPE, VAR) do {\
|
||||||
EINA_LIST_FOREACH(e_config->TYPE##_bindings, l, VAR) \
|
EINA_LIST_FOREACH(e_bindings->TYPE##_bindings, l, VAR) \
|
||||||
{ \
|
{ \
|
||||||
if ((VAR->action == _act_toggle) && (VAR->params == entry->id)) \
|
if ((VAR->action == _act_toggle) && (VAR->params == entry->id)) \
|
||||||
{ \
|
{ \
|
||||||
|
|
|
@ -1348,7 +1348,7 @@ _e_winlist_cb_key_down(void *data __UNUSED__, int type __UNUSED__, void *event)
|
||||||
E_Config_Binding_Key *binding;
|
E_Config_Binding_Key *binding;
|
||||||
E_Binding_Modifier mod;
|
E_Binding_Modifier mod;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->key_bindings, l, binding)
|
EINA_LIST_FOREACH(e_bindings->key_bindings, l, binding)
|
||||||
{
|
{
|
||||||
if (binding->action != _winlist_act) continue;
|
if (binding->action != _winlist_act) continue;
|
||||||
|
|
||||||
|
@ -1415,7 +1415,7 @@ _e_winlist_cb_key_up(void *data __UNUSED__, int type __UNUSED__, void *event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->key_bindings, l, binding)
|
EINA_LIST_FOREACH(e_bindings->key_bindings, l, binding)
|
||||||
{
|
{
|
||||||
if (binding->action != _winlist_act) continue;
|
if (binding->action != _winlist_act) continue;
|
||||||
mod = 0;
|
mod = 0;
|
||||||
|
|
Loading…
Reference in New Issue