diff --git a/src/modules/conf_bindings/e_int_config_edgebindings.c b/src/modules/conf_bindings/e_int_config_edgebindings.c index b594a6387..cb4ba639a 100644 --- a/src/modules/conf_bindings/e_int_config_edgebindings.c +++ b/src/modules/conf_bindings/e_int_config_edgebindings.c @@ -512,9 +512,23 @@ _restore_edge_binding_defaults_cb(void *data, void *data2 __UNUSED__) ecb = e_config_domain_system_load("e_bindings", e_config_descriptor_find("E_Config_Bindings")); if (!ecb) { + const char *type; + prof = eina_stringshare_ref(e_config_profile_get()); - /* FIXME: need some type of parenting/typing system for profiles */ - e_config_profile_set("standard"); + switch (e_config->config_type) + { + case E_CONFIG_PROFILE_TYPE_DESKTOP: + type = "standard"; + break; + case E_CONFIG_PROFILE_TYPE_MOBILE: + type = "mobile"; + break; + //case E_CONFIG_PROFILE_TYPE_TABLET: FIXME - not used + default: + type = "default"; + break; + } + e_config_profile_set(type); ecb = e_config_domain_system_load("e_bindings", e_config_descriptor_find("E_Config_Bindings")); e_config_profile_set(prof); eina_stringshare_del(prof); diff --git a/src/modules/conf_bindings/e_int_config_keybindings.c b/src/modules/conf_bindings/e_int_config_keybindings.c index c0e1fa3a3..213dcfc94 100644 --- a/src/modules/conf_bindings/e_int_config_keybindings.c +++ b/src/modules/conf_bindings/e_int_config_keybindings.c @@ -476,9 +476,23 @@ _restore_key_binding_defaults_cb(void *data, ecb = e_config_domain_system_load("e_bindings", e_config_descriptor_find("E_Config_Bindings")); if (!ecb) { + const char *type; + prof = eina_stringshare_ref(e_config_profile_get()); - /* FIXME: need some type of parenting/typing system for profiles */ - e_config_profile_set("standard"); + switch (e_config->config_type) + { + case E_CONFIG_PROFILE_TYPE_DESKTOP: + type = "standard"; + break; + case E_CONFIG_PROFILE_TYPE_MOBILE: + type = "mobile"; + break; + //case E_CONFIG_PROFILE_TYPE_TABLET: FIXME - not used + default: + type = "default"; + break; + } + e_config_profile_set(type); ecb = e_config_domain_system_load("e_bindings", e_config_descriptor_find("E_Config_Bindings")); e_config_profile_set(prof); eina_stringshare_del(prof); diff --git a/src/modules/conf_bindings/e_int_config_mousebindings.c b/src/modules/conf_bindings/e_int_config_mousebindings.c index ef234466a..859ba271a 100644 --- a/src/modules/conf_bindings/e_int_config_mousebindings.c +++ b/src/modules/conf_bindings/e_int_config_mousebindings.c @@ -576,9 +576,23 @@ _restore_mouse_binding_defaults_cb(void *data, void *data2 __UNUSED__) ecb = e_config_domain_system_load("e_bindings", e_config_descriptor_find("E_Config_Bindings")); if (!ecb) { + const char *type; + prof = eina_stringshare_ref(e_config_profile_get()); - /* FIXME: need some type of parenting/typing system for profiles */ - e_config_profile_set("standard"); + switch (e_config->config_type) + { + case E_CONFIG_PROFILE_TYPE_DESKTOP: + type = "standard"; + break; + case E_CONFIG_PROFILE_TYPE_MOBILE: + type = "mobile"; + break; + //case E_CONFIG_PROFILE_TYPE_TABLET: FIXME - not used + default: + type = "default"; + break; + } + e_config_profile_set(type); ecb = e_config_domain_system_load("e_bindings", e_config_descriptor_find("E_Config_Bindings")); e_config_profile_set(prof); eina_stringshare_del(prof); diff --git a/src/modules/conf_bindings/e_int_config_signalbindings.c b/src/modules/conf_bindings/e_int_config_signalbindings.c index e98043762..af0174ed0 100644 --- a/src/modules/conf_bindings/e_int_config_signalbindings.c +++ b/src/modules/conf_bindings/e_int_config_signalbindings.c @@ -733,9 +733,23 @@ _restore_signal_binding_defaults_cb(void *data, void *data2 __UNUSED__) ecb = e_config_domain_system_load("e_bindings", e_config_descriptor_find("E_Config_Bindings")); if (!ecb) { + const char *type; + prof = eina_stringshare_ref(e_config_profile_get()); - /* FIXME: need some type of parenting/typing system for profiles */ - e_config_profile_set("standard"); + switch (e_config->config_type) + { + case E_CONFIG_PROFILE_TYPE_DESKTOP: + type = "standard"; + break; + case E_CONFIG_PROFILE_TYPE_MOBILE: + type = "mobile"; + break; + //case E_CONFIG_PROFILE_TYPE_TABLET: FIXME - not used + default: + type = "default"; + break; + } + e_config_profile_set(type); ecb = e_config_domain_system_load("e_bindings", e_config_descriptor_find("E_Config_Bindings")); e_config_profile_set(prof); eina_stringshare_del(prof);