merge all bindings dialogs into single module: conf_bindings

configs have been updated to load correct module and modapi version has been bumped to invalidate old modules


SVN revision: 83632
This commit is contained in:
Mike Blumenkrantz 2013-02-05 14:03:11 +00:00
parent ec87e69908
commit d7c52deb98
24 changed files with 96 additions and 180 deletions

View File

@ -3,6 +3,7 @@
* improve load time of apps dialogs
* fix bug where edge flips would stop functioning after dragging to an invalid edge containing a shelf
* edge bindings can now be set to "drag only"
* merged all binding config dialogs into conf_bindings module
2013-02-04 Mike Blumenkrantz

1
NEWS
View File

@ -35,6 +35,7 @@ Additions:
Changes:
Modules:
* modules no longer require shutdown or save functions
* merged all binding config dialogs into conf_bindings module
API:
* e_menu_category_callback create callback parameter order has been changed

View File

@ -845,12 +845,6 @@ group "E_Config" struct {
value "delayed" uchar: 1;
value "priority" int: 0;
}
group "E_Config_Module" struct {
value "name" string: "conf_edgebindings";
value "enabled" uchar: 1;
value "delayed" uchar: 1;
value "priority" int: 0;
}
group "E_Config_Module" struct {
value "name" string: "conf_paths";
value "enabled" uchar: 1;
@ -864,7 +858,7 @@ group "E_Config" struct {
value "priority" int: 0;
}
group "E_Config_Module" struct {
value "name" string: "conf_keybindings";
value "name" string: "conf_bindings";
value "enabled" uchar: 1;
value "delayed" uchar: 1;
value "priority" int: 0;

View File

@ -850,8 +850,7 @@ AC_E_OPTIONAL_MODULE([msgbus], true)
AC_E_OPTIONAL_MODULE([conf_applications], true)
AC_E_OPTIONAL_MODULE([conf_display], true)
AC_E_OPTIONAL_MODULE([conf_shelves], true)
AC_E_OPTIONAL_MODULE([conf_keybindings], true)
AC_E_OPTIONAL_MODULE([conf_edgebindings], true)
AC_E_OPTIONAL_MODULE([conf_bindings], true)
AC_E_OPTIONAL_MODULE([conf_window_remembers], true)
AC_E_OPTIONAL_MODULE([conf_window_manipulation], true)
AC_E_OPTIONAL_MODULE([conf_menus], true)
@ -947,8 +946,7 @@ src/modules/conf_intl/module.desktop
src/modules/conf_applications/module.desktop
src/modules/conf_display/module.desktop
src/modules/conf_shelves/module.desktop
src/modules/conf_keybindings/module.desktop
src/modules/conf_edgebindings/module.desktop
src/modules/conf_bindings/module.desktop
src/modules/conf_window_remembers/module.desktop
src/modules/conf_window_manipulation/module.desktop
src/modules/conf_menus/module.desktop

View File

@ -1251,6 +1251,45 @@ e_config_load(void)
e_config->config_type = E_CONFIG_PROFILE_TYPE_TABLET;
}
}
CONFIG_VERSION_CHECK(10)
{
int do_conf = 0;
Eina_List *l, *ll;
E_Config_Module *em;
int enabled = 0, delayed = 0, priority = 0;
CONFIG_VERSION_UPDATE_INFO(10);
EINA_LIST_FOREACH_SAFE(e_config->modules, l, ll, em)
{
Eina_Bool do_free = EINA_FALSE;
if (!e_util_strcmp(em->name, "comp"))
do_free = EINA_TRUE;
else if ((!e_util_strcmp(em->name, "conf_keybindings")) || (!e_util_strcmp(em->name, "conf_edgebindings")))
{
do_conf += do_free = EINA_TRUE;
enabled |= em->enabled;
delayed |= em->delayed;
priority = MIN(priority, em->priority);
}
if (do_free)
{
e_config->modules = eina_list_remove_list(e_config->modules, l);
eina_stringshare_del(em->name);
free(em);
}
if (do_conf == 2) break;
}
if (do_conf)
{
em = E_NEW(E_Config_Module, 1);
em->name = eina_stringshare_add("conf_bindings");
em->enabled = !!enabled;
em->delayed = !!delayed;
em->priority = priority;
e_config->modules = eina_list_append(e_config->modules, em);
}
}
}
if (!e_config->remember_internal_fm_windows)
e_config->remember_internal_fm_windows = !!(e_config->remember_internal_windows & E_REMEMBER_INTERNAL_FM_WINS);

View File

@ -48,7 +48,7 @@ typedef enum
/* 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
*/
#define E_CONFIG_FILE_GENERATION 9
#define E_CONFIG_FILE_GENERATION 10
#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!!!!!

View File

@ -217,13 +217,6 @@ e_module_all_load(void)
EINA_LIST_FOREACH_SAFE(e_config->modules, l, ll, em)
{
if (!em) continue;
if (!e_util_strcasecmp(em->name, "comp"))
{
e_config->modules = eina_list_remove_list(e_config->modules, l);
eina_stringshare_del(em->name);
free(em);
continue;
}
if ((em->delayed) && (em->enabled) & (!e_config->no_module_delay))
{
if (!_e_module_idler)
@ -847,10 +840,9 @@ _e_module_whitelist_check(void)
"conf_comp",
"conf_dialogs",
"conf_display",
"conf_edgebindings",
"conf_interaction",
"conf_intl",
"conf_keybindings",
"conf_bindings",
"conf_menus",
"conf_paths",
"conf_performance",

View File

@ -1,6 +1,6 @@
#ifdef E_TYPEDEFS
#define E_MODULE_API_VERSION 12
#define E_MODULE_API_VERSION 13
typedef struct _E_Module E_Module;
typedef struct _E_Module_Api E_Module_Api;

View File

@ -126,12 +126,8 @@ if USE_MODULE_CONF_SHELVES
include Makefile_conf_shelves.am
endif
if USE_MODULE_CONF_KEYBINDINGS
include Makefile_conf_keybindings.am
endif
if USE_MODULE_CONF_EDGEBINDINGS
include Makefile_conf_edgebindings.am
if USE_MODULE_CONF_BINDINGS
include Makefile_conf_bindings.am
endif
if USE_MODULE_CONF_WINDOW_REMEMBERS

View File

@ -0,0 +1,19 @@
conf_bindingsdir = $(MDIR)/conf_bindings
conf_bindings_DATA = conf_bindings/module.desktop
EXTRA_DIST += $(conf_bindings_DATA)
conf_bindingspkgdir = $(MDIR)/conf_bindings/$(MODULE_ARCH)
conf_bindingspkg_LTLIBRARIES = conf_bindings/module.la
conf_bindings_module_la_SOURCES = conf_bindings/e_mod_main.c \
conf_bindings/e_mod_main.h \
conf_bindings/e_int_config_keybindings.c \
conf_bindings/e_int_config_mousebindings.c \
conf_bindings/e_int_config_edgebindings.c \
conf_bindings/e_int_config_signalbindings.c \
conf_bindings/e_int_config_acpibindings.c
.PHONY: conf_bindings install-conf_bindings
conf_bindings: $(conf_bindingspkg_LTLIBRARIES) $(conf_bindings_DATA)
install-conf_bindings: install-conf_bindingsDATA install-conf_bindingspkgLTLIBRARIES

View File

@ -1,17 +0,0 @@
conf_edgebindingsdir = $(MDIR)/conf_edgebindings
conf_edgebindings_DATA = conf_edgebindings/e-module-conf_edgebindings.edj \
conf_edgebindings/module.desktop
EXTRA_DIST += $(conf_edgebindings_DATA)
conf_edgebindingspkgdir = $(MDIR)/conf_edgebindings/$(MODULE_ARCH)
conf_edgebindingspkg_LTLIBRARIES = conf_edgebindings/module.la
conf_edgebindings_module_la_SOURCES = conf_edgebindings/e_mod_main.c \
conf_edgebindings/e_mod_main.h \
conf_edgebindings/e_int_config_edgebindings.c \
conf_edgebindings/e_int_config_signalbindings.c
.PHONY: conf_edgebindings install-conf_edgebindings
conf_edgebindings: $(conf_edgebindingspkg_LTLIBRARIES) $(conf_edgebindings_DATA)
install-conf_edgebindings: install-conf_edgebindingsDATA install-conf_edgebindingspkgLTLIBRARIES

View File

@ -1,17 +0,0 @@
conf_keybindingsdir = $(MDIR)/conf_keybindings
conf_keybindings_DATA = conf_keybindings/module.desktop
EXTRA_DIST += $(conf_keybindings_DATA)
conf_keybindingspkgdir = $(MDIR)/conf_keybindings/$(MODULE_ARCH)
conf_keybindingspkg_LTLIBRARIES = conf_keybindings/module.la
conf_keybindings_module_la_SOURCES = conf_keybindings/e_mod_main.c \
conf_keybindings/e_mod_main.h \
conf_keybindings/e_int_config_keybindings.c \
conf_keybindings/e_int_config_mousebindings.c \
conf_keybindings/e_int_config_acpibindings.c
.PHONY: conf_keybindings install-conf_keybindings
conf_keybindings: $(conf_keybindingspkg_LTLIBRARIES) $(conf_keybindings_DATA)
install-conf_keybindings: install-conf_keybindingsDATA install-conf_keybindingspkgLTLIBRARIES

View File

@ -29,13 +29,23 @@ e_modapi_init(E_Module *m)
_("ACPI Bindings"), NULL,
"preferences-system-power-management",
e_int_config_acpibindings);
e_configure_registry_item_add("keyboard_and_mouse/edge_bindings", 10,
_("Edge Bindings"), NULL,
"preferences-desktop-edge-bindings",
e_int_config_edgebindings);
e_configure_registry_category_add("advanced", 80, _("Advanced"), NULL, "preferences-advanced");
e_configure_registry_item_add("advanced/signal_bindings", 10,
_("Signal Bindings"), NULL,
"preferences-desktop-signal-bindings",
e_int_config_signalbindings);
conf_module = m;
e_module_delayed_set(m, 1);
{
E_Configure_Option *co;
e_configure_option_domain_current_set("conf_keybindings");
e_configure_option_domain_current_set("conf_bindings");
E_CONFIGURE_OPTION_ADD_CUSTOM(co, _("key bindings"), _("Key binding settings"), _("input"), _("key"), _("binding"));
co->info = eina_stringshare_add("keyboard_and_mouse/key_bindings");
@ -46,6 +56,13 @@ e_modapi_init(E_Module *m)
E_CONFIGURE_OPTION_ADD_CUSTOM(co, _("ACPI bindings"), _("ACPI binding settings"), _("input"), _("acpi"), _("binding"));
co->info = eina_stringshare_add("keyboard_and_mouse/acpi_bindings");
E_CONFIGURE_OPTION_ICON(co, "preferences-system-power-management");
E_CONFIGURE_OPTION_ADD_CUSTOM(co, _("edge bindings"), _("Screen edge binding settings"), _("input"), _("edge"), _("screen"), _("binding"));
co->info = eina_stringshare_add("keyboard_and_mouse/edge_bindings");
E_CONFIGURE_OPTION_ICON(co, "preferences-desktop-edge-bindings");
E_CONFIGURE_OPTION_ADD_CUSTOM(co, _("signal bindings"), _("Edje signal binding settings"), _("input"), _("edje"), _("mouse"), _("binding"));
co->info = eina_stringshare_add("advanced/signal_bindings");
E_CONFIGURE_OPTION_ICON(co, "preferences-desktop-signal-bindings");
}
@ -63,14 +80,20 @@ e_modapi_shutdown(E_Module *m __UNUSED__)
e_object_del(E_OBJECT(cfd));
while ((cfd = e_config_dialog_get("E", "keyboard_and_mouse/key_bindings")))
e_object_del(E_OBJECT(cfd));
while ((cfd = e_config_dialog_get("E", "keyboard_and_mouse/edge_bindings")))
e_object_del(E_OBJECT(cfd));
while ((cfd = e_config_dialog_get("E", "advanced/signal_bindings")))
e_object_del(E_OBJECT(cfd));
e_configure_registry_item_del("keyboard_and_mouse/acpi_bindings");
e_configure_registry_item_del("keyboard_and_mouse/mouse_bindings");
e_configure_registry_item_del("keyboard_and_mouse/key_bindings");
e_configure_registry_item_del("keyboard_and_mouse/edge_bindings");
e_configure_registry_item_del("advanced/signal_bindings");
e_configure_registry_category_del("keyboard_and_mouse");
e_configure_registry_category_del("advanced");
e_configure_option_domain_clear("conf_keybindings");
e_configure_option_domain_clear("conf_bindings");
conf_module = NULL;
return 1;

View File

@ -4,6 +4,8 @@
E_Config_Dialog *e_int_config_acpibindings(E_Container *con, const char *params __UNUSED__);
E_Config_Dialog *e_int_config_keybindings(E_Container *con, const char *params __UNUSED__);
E_Config_Dialog *e_int_config_mousebindings(E_Container *con, const char *params __UNUSED__);
E_Config_Dialog *e_int_config_edgebindings(E_Container *con, const char *params __UNUSED__);
E_Config_Dialog *e_int_config_signalbindings(E_Container *con, const char *params);
/**
* @addtogroup Optional_Conf

View File

@ -1,71 +0,0 @@
#include "e.h"
#include "e_mod_main.h"
/* actual module specifics */
static E_Module *conf_module = NULL;
/* module setup */
EAPI E_Module_Api e_modapi =
{
E_MODULE_API_VERSION,
"Settings - Edge Bindings"
};
EAPI void *
e_modapi_init(E_Module *m)
{
e_configure_registry_category_add("keyboard_and_mouse", 40, _("Input"),
NULL, "preferences-behavior");
e_configure_registry_category_add("advanced", 80, _("Advanced"), NULL, "preferences-advanced");
e_configure_registry_item_add("keyboard_and_mouse/edge_bindings", 10,
_("Edge Bindings"), NULL,
"preferences-desktop-edge-bindings",
e_int_config_edgebindings);
e_configure_registry_item_add("advanced/signal_bindings", 10,
_("Signal Bindings"), NULL,
"preferences-desktop-signal-bindings",
e_int_config_signalbindings);
conf_module = m;
e_module_delayed_set(m, 1);
{
E_Configure_Option *co;
e_configure_option_domain_current_set("conf_edgebindings");
E_CONFIGURE_OPTION_ADD_CUSTOM(co, _("edge bindings"), _("Screen edge binding settings"), _("input"), _("edge"), _("screen"), _("binding"));
co->info = eina_stringshare_add("keyboard_and_mouse/edge_bindings");
E_CONFIGURE_OPTION_ICON(co, "preferences-desktop-edge-bindings");
E_CONFIGURE_OPTION_ADD_CUSTOM(co, _("signal bindings"), _("Edje signal binding settings"), _("input"), _("edje"), _("mouse"), _("binding"));
co->info = eina_stringshare_add("advanced/signal_bindings");
E_CONFIGURE_OPTION_ICON(co, "preferences-desktop-signal-bindings");
}
return m;
}
EAPI int
e_modapi_shutdown(E_Module *m __UNUSED__)
{
E_Config_Dialog *cfd;
while ((cfd = e_config_dialog_get("E", "keyboard_and_mouse/edge_bindings")))
e_object_del(E_OBJECT(cfd));
while ((cfd = e_config_dialog_get("E", "advanced/signal_bindings")))
e_object_del(E_OBJECT(cfd));
e_configure_registry_item_del("keyboard_and_mouse/edge_bindings");
e_configure_registry_item_del("advanced/signal_bindings");
e_configure_registry_category_del("keyboard_and_mouse");
e_configure_registry_category_del("advanced");
e_configure_option_domain_clear("conf_edgebindings");
conf_module = NULL;
return 1;
}
EAPI int
e_modapi_save(E_Module *m __UNUSED__)
{
return 1;
}

View File

@ -1,20 +0,0 @@
#ifndef E_MOD_MAIN_H
#define E_MOD_MAIN_H
E_Config_Dialog *e_int_config_edgebindings(E_Container *con, const char *params __UNUSED__);
E_Config_Dialog *e_int_config_signalbindings(E_Container *con, const char *params);
/**
* @addtogroup Optional_Conf
* @{
*
* @defgroup Module_Conf_EdgeBindings Edge Bindings Configuration
*
* Controls action on screen edges and corners.
*
* @see Module_Conf_MouseBindings
* @see Module_Conf_KeyBindings
* @}
*/
#endif

View File

@ -1,24 +0,0 @@
[Desktop Entry]
Type=Link
Name=Edge Bindings
Name[ru]=Привязки по краям
Name[cs]=Zkratky okrajù
Name[eo]=Fulmklavoj de ekranrandoj
Name[es]=Asociaciones del margen de pantalla
Name[fr]=Raccourcis des bords de l'écran
Name[gl]=Asociacións dos marxes da pantalla
Name[it]=Associazioni a bordi dello schermo e segnali
Name[tr]=Kenar Bağlayıcıları
Name[pt]=Associação das margens do ecrã
Icon=e-module-conf_edgebindings
Comment=Configure your edge bindings here.
Comment[ru]=Здесь можно настроить привязки по краям экрана.
Comment[cs]=Zde mùžete nastavit zkratky pro okraje a rohy obrazovky.
Comment[eo]=Agordas la fulmklavoj de ekranrandoj.
Comment[es]=Configure las asociaciones de los bordes de la pantalla aquí.
Comment[fr]=Configure les raccourcis des bords de l'écran.
Comment[gl]=Configure as asociacións dos bordes da pantalla aquí.
Comment[it]=Configurate qui le azioni da eseguire quando il puntatore raggiunge<br>i bordi dello schermo o per alcuni segnali.
Comment[pt]=Configurar as associações aos limites do ecrã
Comment[tr]=Kenar bağlayıcılarınızı yapılandırın.
X-Enlightenment-ModuleType=settings