in a move which will make me tremendously unpopular, config versioning has been changed from hex to dec across the whole tree, including helper functions and modules

PS. HAHAHAHAHAHAHAHA


SVN revision: 81624
This commit is contained in:
Mike Blumenkrantz 2012-12-21 23:57:05 +00:00
parent 66a749c2ce
commit 0f01a6b279
23 changed files with 158 additions and 494 deletions

View File

@ -1,5 +1,5 @@
group "E_Config" struct {
value "config_version" int: 65865;
value "config_version" int: 1000000;
value "show_splash" int: 0;
value "init_default_theme" string: "default.edj";
value "desktop_default_name" string: "%i-%i";

View File

@ -1,5 +1,5 @@
group "E_Config" struct {
value "config_version" int: 65865;
value "config_version" int: 1000000;
value "show_splash" int: 1;
value "init_default_theme" string: "default.edj";
value "desktop_default_name" string: "%i-%i";

View File

@ -1,4 +1,4 @@
group "Config" struct {
value "version" int: 65677;
value "config_version" int: 1000000;
value "menu_augmentation" int: 0;
}

View File

@ -1,5 +1,5 @@
group "E_Config" struct {
value "config_version" int: 65865;
value "config_version" int: 1000000;
value "show_splash" int: 1;
value "init_default_theme" string: "default.edj";
value "desktop_default_name" string: "%i-%i";
@ -214,7 +214,7 @@ group "E_Config" struct {
value "powersave.extreme" double: 1200.0;
value "powersave.min" int: 0;
value "powersave.max" int: 5;
value "no_module_delay" int: 1;
value "no_module_delay" int: 0;
group "syscon.actions" list {
group "E_Config_Syscon_Action" struct {
value "action" string: "halt";

View File

@ -1,4 +1,4 @@
group "Config" struct {
value "version" int: 65677;
value "menu_augmentation" int: 0;
value "config_version" int: 1000000;
value "menu_augmentation" int: 1;
}

View File

@ -1,7 +1,7 @@
group "Fileman_Config" struct {
value "config_version" int: 65793;
value "config_version" int: 1000000;
value "view.mode" int: 1;
value "view.open_dirs_in_place" uchar: 0;
value "view.open_dirs_in_place" uchar: 1;
value "view.selector" uchar: 0;
value "view.single_click" uchar: 0;
value "view.no_subdir_jump" uchar: 0;
@ -12,6 +12,7 @@ group "Fileman_Config" struct {
value "view.show_full_path" uchar: 0;
value "view.show_desktop_icons" uchar: 1;
value "view.show_toolbar" uchar: 0;
value "view.show_sidebar" uchar: 0;
value "icon.icon.w" int: 48;
value "icon.icon.h" int: 48;
value "icon.list.w" int: 16;
@ -25,4 +26,10 @@ group "Fileman_Config" struct {
value "selection.single" uchar: 0;
value "selection.windows_modifiers" uchar: 0;
value "theme.fixed" uchar: 0;
value "tooltip.enable" uchar: 1;
value "tooltip.delay" double: 1.0;
value "tooltip.size" double: 30.0;
value "view.spring_delay" int: 1;
value "icon.max_thumb_size" uint: 0;
value "view.toolbar_orient" uint: 5;
}

View File

@ -19,7 +19,6 @@ static void _e_config_save_cb(void *data);
static void _e_config_free(E_Config *cfg);
static Eina_Bool _e_config_cb_timer(void *data);
static int _e_config_eet_close_handle(Eet_File *ef, char *file);
static void _e_config_acpi_bindings_add(void);
/* local subsystem globals */
static int _e_config_save_block = 0;
@ -1005,14 +1004,13 @@ EAPI void
e_config_load(void)
{
E_Config *tcfg = NULL;
int reload = 0;
e_config = e_config_domain_load("e", _e_config_edd);
if (e_config)
{
int reload = 0;
/* major version change - that means wipe and restart */
if ((e_config->config_version >> 16) < E_CONFIG_FILE_EPOCH)
if ((e_config->config_version) < E_CONFIG_FILE_EPOCH * 1000000)
{
/* your config is too old - need new defaults */
_e_config_free(e_config);
@ -1043,51 +1041,19 @@ e_config_load(void)
"as a precaution your settings have been now restored to<br>"
"defaults. Sorry for the inconvenience.<br>"));
}
/* oldest minor version supported */
else if ((e_config->config_version & 0xffff) < 0x0124)
{
/* your config is so old - we don't even bother supporting an
* upgrade path - brand new config for you! */
_e_config_free(e_config);
e_config = NULL;
reload = 1;
ecore_timer_add(1.0, _e_config_cb_timer,
_("Settings data needed upgrading. Your old settings have<br>"
"been wiped and a new set of defaults initialized. This<br>"
"will happen regularly during development, so don't report a<br>"
"bug. This simply means Enlightenment needs new settings<br>"
"data by default for usable functionality that your old<br>"
"settings simply lack. This new set of defaults will fix<br>"
"that by adding it in. You can re-configure things now to your<br>"
"liking. Sorry for the hiccup in your settings.<br>"));
}
if (reload)
{
e_config_profile_del(e_config_profile_get());
e_config_profile_set("default");
e_config = e_config_domain_load("e", _e_config_edd);
}
}
if (!e_config)
{
E_Action *a;
e_config_profile_set("default");
e_config_profile_del(e_config_profile_get());
if (!reload) e_config_profile_del(e_config_profile_get());
e_config_save_block_set(1);
a = e_action_find("restart");
if ((a) && (a->func.go)) a->func.go(NULL, NULL);
else
{
ERR("EEEK! no config of any sort! abort abort abort!");
e_error_message_show("Enlightenment was started without any configuration\n"
"files available for the given profile (normally\n"
"default or the last profile used or provided on the\n"
"command-line with -profile etc.)\n\n"
"Cannot contiue without configuration to work with.\n"
"Please ensure you have system or user configuration\n"
"for the profile you are using before proceeeding.");
abort();
}
e_sys_action_do(E_SYS_RESTART, NULL);
}
if (e_config->config_version < E_CONFIG_FILE_VERSION)
{
@ -1108,192 +1074,14 @@ e_config_load(void)
* a wipe */
if (!tcfg)
{
E_Action *a;
e_config_profile_set("default");
e_config_profile_del(e_config_profile_get());
e_config_save_block_set(1);
a = e_action_find("restart");
if ((a) && (a->func.go)) a->func.go(NULL, NULL);
e_sys_action_do(E_SYS_RESTART, NULL);
}
}
#define IFCFG(v) if ((e_config->config_version & 0xffff) < (v)) {
#define IFCFGELSE } else {
#define IFCFGEND }
#define COPYVAL(x) do {e_config->x = tcfg->x; } while (0)
#define COPYPTR(x) do {e_config->x = tcfg->x; tcfg->x = NULL; } while (0)
#define COPYSTR(x) COPYPTR(x)
if (tcfg)
{
/* some sort of upgrade is needed */
IFCFG(0x0124);
COPYVAL(thumbscroll_enable);
COPYVAL(thumbscroll_threshhold);
COPYVAL(thumbscroll_momentum_threshhold);
COPYVAL(thumbscroll_friction);
IFCFGEND;
IFCFG(0x0125);
COPYVAL(mouse_hand);
IFCFGEND;
IFCFG(0x0126);
COPYVAL(border_keyboard.timeout);
COPYVAL(border_keyboard.move.dx);
COPYVAL(border_keyboard.move.dy);
COPYVAL(border_keyboard.resize.dx);
COPYVAL(border_keyboard.resize.dy);
IFCFGEND;
IFCFG(0x0127);
COPYVAL(scale.min);
COPYVAL(scale.max);
COPYVAL(scale.factor);
COPYVAL(scale.base_dpi);
COPYVAL(scale.use_dpi);
COPYVAL(scale.use_custom);
IFCFGEND;
IFCFG(0x0128);
COPYVAL(show_cursor);
COPYVAL(idle_cursor);
IFCFGEND;
IFCFG(0x0129);
COPYSTR(default_system_menu);
IFCFGEND;
IFCFG(0x012a);
COPYVAL(desklock_start_locked);
IFCFGEND;
IFCFG(0x012b);
COPYVAL(cfgdlg_normal_wins);
IFCFGEND;
IFCFG(0x012c);
COPYVAL(syscon.main.icon_size);
COPYVAL(syscon.secondary.icon_size);
COPYVAL(syscon.extra.icon_size);
COPYVAL(syscon.timeout);
COPYVAL(syscon.do_input);
COPYPTR(syscon.actions);
IFCFGEND;
IFCFG(0x012d);
COPYVAL(priority);
IFCFGEND;
IFCFG(0x012e);
COPYVAL(fullscreen_flip);
IFCFGEND;
IFCFG(0x012f);
COPYVAL(icon_theme_overrides);
IFCFGEND;
IFCFG(0x0130);
COPYVAL(mode.presentation);
COPYVAL(mode.offline);
IFCFGEND;
IFCFG(0x0131);
COPYVAL(desklock_post_screensaver_time);
IFCFGEND;
IFCFG(0x0132);
COPYVAL(desklock_ask_presentation);
COPYVAL(desklock_ask_presentation_timeout);
COPYVAL(screensaver_ask_presentation);
COPYVAL(screensaver_ask_presentation_timeout);
IFCFGEND;
IFCFG(0x0134);
COPYVAL(exec.expire_timeout);
COPYVAL(exec.show_run_dialog);
COPYVAL(exec.show_exit_dialog);
IFCFGEND;
IFCFG(0x0136);
_e_config_acpi_bindings_add();
IFCFGEND;
IFCFG(0x0137);
COPYVAL(desklock_on_suspend);
IFCFGEND;
IFCFG(0x0138);
COPYVAL(geometry_auto_resize_limit);
COPYVAL(geometry_auto_move);
IFCFGEND;
IFCFG(0x0142);
COPYVAL(backlight.normal);
COPYVAL(backlight.dim);
COPYVAL(backlight.transition);
COPYVAL(backlight.idle_dim);
COPYVAL(backlight.timer);
IFCFGEND;
IFCFG(0x0145);
COPYVAL(xsettings.enabled);
COPYVAL(xsettings.match_e17_theme);
COPYVAL(xsettings.match_e17_icon_theme);
IFCFGEND;
IFCFG(0x0147);
COPYVAL(update.check);
COPYVAL(update.later);
IFCFGEND;
IFCFG(0x0149);
COPYVAL(powersave.none);
COPYVAL(powersave.low);
COPYVAL(powersave.medium);
COPYVAL(powersave.high);
COPYVAL(powersave.extreme);
COPYVAL(powersave.min);
COPYVAL(powersave.max);
IFCFGEND;
IFCFG(0x0150);
COPYVAL(multiscreen_flip);
IFCFGEND;
IFCFG(0x0151);
if (tcfg->desklock_background)
{
E_Config_Desklock_Background *cbg;
cbg = E_NEW(E_Config_Desklock_Background, 1);
cbg->file = tcfg->desklock_background;
e_config->desklock_backgrounds = eina_list_append(e_config->desklock_backgrounds, cbg);
}
if (e_config->desklock_backgrounds && (!e_config->desklock_backgrounds->data))
e_config->desklock_backgrounds = eina_list_free(e_config->desklock_backgrounds);
tcfg->desklock_background = NULL;
IFCFGEND;
IFCFG(0x0152);
COPYVAL(window_grouping);
IFCFGEND;
IFCFG(0x0157);
e_config->xkb.selected_layout = NULL;
e_config->xkb.cur_layout = NULL;
e_config->xkb.desklock_layout = NULL;
IFCFGEND;
IFCFG(0x0160);
e_config->window_activehint_policy = 2;
IFCFGEND;
IFCFG(0x0162);
COPYSTR(desktop_default_window_profile);
COPYVAL(use_desktop_window_profile);
IFCFGEND;
e_config->config_version = E_CONFIG_FILE_VERSION;
_e_config_free(tcfg);
}
/* limit values so they are sane */
E_CONFIG_LIMIT(e_config->menus_scroll_speed, 1.0, 20000.0);
@ -2376,50 +2164,3 @@ _e_config_eet_close_handle(Eet_File *ef, char *file)
}
return 1;
}
static void
_e_config_acpi_bindings_add(void)
{
E_Config_Binding_Acpi *binding;
binding = E_NEW(E_Config_Binding_Acpi, 1);
binding->context = E_BINDING_CONTEXT_NONE;
binding->type = E_ACPI_TYPE_AC_ADAPTER;
binding->status = 0;
binding->action = eina_stringshare_add("dim_screen");
binding->params = NULL;
e_config->acpi_bindings = eina_list_append(e_config->acpi_bindings, binding);
binding = E_NEW(E_Config_Binding_Acpi, 1);
binding->context = E_BINDING_CONTEXT_NONE;
binding->type = E_ACPI_TYPE_AC_ADAPTER;
binding->status = 1;
binding->action = eina_stringshare_add("undim_screen");
binding->params = NULL;
e_config->acpi_bindings = eina_list_append(e_config->acpi_bindings, binding);
binding = E_NEW(E_Config_Binding_Acpi, 1);
binding->context = E_BINDING_CONTEXT_NONE;
binding->type = E_ACPI_TYPE_LID;
binding->status = 0;
binding->action = eina_stringshare_add("suspend");
binding->params = eina_stringshare_add("now");
e_config->acpi_bindings = eina_list_append(e_config->acpi_bindings, binding);
binding = E_NEW(E_Config_Binding_Acpi, 1);
binding->context = E_BINDING_CONTEXT_NONE;
binding->type = E_ACPI_TYPE_POWER;
binding->status = -1;
binding->action = eina_stringshare_add("halt_now");
binding->params = eina_stringshare_add("now");
e_config->acpi_bindings = eina_list_append(e_config->acpi_bindings, binding);
binding = E_NEW(E_Config_Binding_Acpi, 1);
binding->context = E_BINDING_CONTEXT_NONE;
binding->type = E_ACPI_TYPE_SLEEP;
binding->status = -1;
binding->action = eina_stringshare_add("suspend");
binding->params = eina_stringshare_add("now");
e_config->acpi_bindings = eina_list_append(e_config->acpi_bindings, binding);
}

View File

@ -34,12 +34,12 @@ typedef struct _E_Event_Config_Icon_Theme E_Event_Config_Icon_Theme;
/* increment this whenever we change config enough that you need new
* defaults for e to work.
*/
#define E_CONFIG_FILE_EPOCH 0x0001
#define E_CONFIG_FILE_EPOCH 1
/* 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 0x0162
#define E_CONFIG_FILE_VERSION ((E_CONFIG_FILE_EPOCH << 16) | E_CONFIG_FILE_GENERATION)
#define E_CONFIG_FILE_GENERATION 0
#define E_CONFIG_FILE_VERSION ((E_CONFIG_FILE_EPOCH * 1000000) + E_CONFIG_FILE_GENERATION)
struct _E_Config
{

View File

@ -1212,16 +1212,18 @@ _e_util_conf_timer_new(void *data)
EAPI Eina_Bool
e_util_module_config_check(const char *module_name, int loaded, int current)
{
if ((loaded >> 16) < (current >> 16))
{
ecore_timer_add(1.0, _e_util_conf_timer_old, strdup(module_name));
return EINA_FALSE;
}
else if (loaded > current)
int rem;
if (loaded > current)
{
ecore_timer_add(1.0, _e_util_conf_timer_new, strdup(module_name));
return EINA_FALSE;
}
loaded -= loaded % 1000000, current -= current % 1000000;
if (loaded < current)
{
ecore_timer_add(1.0, _e_util_conf_timer_old, strdup(module_name));
return EINA_FALSE;
}
return EINA_TRUE;
}

View File

@ -464,14 +464,7 @@ static void
_conf_new(void)
{
conf = E_NEW(Config, 1);
conf->version = (MOD_CONFIG_FILE_EPOCH << 16);
#define IFMODCFG(v) if ((conf->version & 0xffff) < v) {
#define IFMODCFGEND }
IFMODCFG(0x008d);
conf->menu_augmentation = 1;
IFMODCFGEND;
conf->version = MOD_CONFIG_FILE_VERSION;
e_config_save_queue();

View File

@ -1,10 +1,11 @@
#ifndef E_MOD_MAIN_H
#define E_MOD_MAIN_H
#define MOD_CONFIG_FILE_EPOCH 0x0001
#define MOD_CONFIG_FILE_GENERATION 0x008d
#define MOD_CONFIG_FILE_VERSION \
((MOD_CONFIG_FILE_EPOCH << 16) | MOD_CONFIG_FILE_GENERATION)
/* Increment for Major Changes */
#define MOD_CONFIG_FILE_EPOCH 1
/* Increment for Minor Changes (ie: user doesn't need a new config) */
#define MOD_CONFIG_FILE_GENERATION 0
#define MOD_CONFIG_FILE_VERSION ((MOD_CONFIG_FILE_EPOCH * 1000000) + MOD_CONFIG_FILE_GENERATION)
typedef struct _Config Config;
struct _Config

View File

@ -413,14 +413,8 @@ _config_init()
if (!evry_conf)
{
evry_conf = E_NEW(Evry_Config, 1);
evry_conf->version = (MOD_CONFIG_FILE_EPOCH << 16);
}
#define IFMODCFG(v) if ((evry_conf->version & 0xffff) < v) {
#define IFMODCFGEND }
/* setup defaults */
IFMODCFG(0x0001);
evry_conf->rel_x = 0.5;
evry_conf->rel_y = 0.43;
evry_conf->width = 455;
@ -469,12 +463,9 @@ _config_init()
pc->enabled = EINA_TRUE;
pc->view_mode = VIEW_MODE_NONE;
pcc->plugins = eina_list_append(pcc->plugins, pc);
IFMODCFGEND;
IFMODCFG(0x0003);
evry_conf->width = 464;
evry_conf->height = 366;
IFMODCFGEND;
}
evry_conf->version = MOD_CONFIG_FILE_VERSION;
}

View File

@ -4,10 +4,11 @@
#include "e.h"
#include "evry_api.h"
#define MOD_CONFIG_FILE_EPOCH 0x0005
#define MOD_CONFIG_FILE_GENERATION 0x0002
#define MOD_CONFIG_FILE_VERSION \
((MOD_CONFIG_FILE_EPOCH << 16) | MOD_CONFIG_FILE_GENERATION)
/* Increment for Major Changes */
#define MOD_CONFIG_FILE_EPOCH 1
/* Increment for Minor Changes (ie: user doesn't need a new config) */
#define MOD_CONFIG_FILE_GENERATION 0
#define MOD_CONFIG_FILE_VERSION ((MOD_CONFIG_FILE_EPOCH * 1000000) + MOD_CONFIG_FILE_GENERATION)
#define SLIDE_LEFT 1
#define SLIDE_RIGHT -1

View File

@ -1,10 +1,11 @@
#include "e.h"
#include "evry_api.h"
#define MOD_CONFIG_FILE_EPOCH 0x0001
#define MOD_CONFIG_FILE_GENERATION 0x009d
#define MOD_CONFIG_FILE_VERSION \
((MOD_CONFIG_FILE_EPOCH << 16) | MOD_CONFIG_FILE_GENERATION)
/* Increment for Major Changes */
#define MOD_CONFIG_FILE_EPOCH 1
/* Increment for Minor Changes (ie: user doesn't need a new config) */
#define MOD_CONFIG_FILE_GENERATION 0
#define MOD_CONFIG_FILE_VERSION ((MOD_CONFIG_FILE_EPOCH * 1000000) + MOD_CONFIG_FILE_GENERATION)
// FIXME clear cache on .desktop chage event
@ -1380,17 +1381,10 @@ _conf_new(void)
if (!_conf)
{
_conf = E_NEW(Module_Config, 1);
_conf->version = (MOD_CONFIG_FILE_EPOCH << 16);
}
#define IFMODCFG(v) if ((_conf->version & 0xffff) < v) {
#define IFMODCFGEND }
/* setup defaults */
IFMODCFG(0x009d);
_conf->cmd_terminal = eina_stringshare_add("/usr/bin/xterm -hold -e");
_conf->cmd_sudo = eina_stringshare_add("/usr/bin/gksudo --preserve-env");
IFMODCFGEND;
}
_conf->version = MOD_CONFIG_FILE_VERSION;

View File

@ -8,10 +8,11 @@
#include "evry_api.h"
#include <Efreet_Trash.h>
#define MOD_CONFIG_FILE_EPOCH 0x0001
#define MOD_CONFIG_FILE_GENERATION 0x008d
#define MOD_CONFIG_FILE_VERSION \
((MOD_CONFIG_FILE_EPOCH << 16) | MOD_CONFIG_FILE_GENERATION)
/* Increment for Major Changes */
#define MOD_CONFIG_FILE_EPOCH 1
/* Increment for Minor Changes (ie: user doesn't need a new config) */
#define MOD_CONFIG_FILE_GENERATION 0
#define MOD_CONFIG_FILE_VERSION ((MOD_CONFIG_FILE_EPOCH * 1000000) + MOD_CONFIG_FILE_GENERATION)
#define MAX_ITEMS 10
#define MAX_SHOWN 300
@ -1554,19 +1555,11 @@ static void
_conf_new(void)
{
_conf = E_NEW(Module_Config, 1);
_conf->version = (MOD_CONFIG_FILE_EPOCH << 16);
#define IFMODCFG(v) if ((_conf->version & 0xffff) < v) {
#define IFMODCFGEND }
/* setup defaults */
IFMODCFG(0x008d);
_conf->show_recent = 0;
_conf->show_homedir = 1;
_conf->search_recent = 1;
_conf->cache_dirs = 0;
_conf->search_cache = 0;
IFMODCFGEND;
_conf->version = MOD_CONFIG_FILE_VERSION;
}

View File

@ -279,77 +279,24 @@ _e_mod_fileman_config_load(void)
if (!fileman_config)
{
fileman_config = E_NEW(Config, 1);
fileman_config->config_version = (MOD_CONFIG_FILE_EPOCH << 16);
}
#define IFMODCFG(v) \
if ((fileman_config->config_version & 0xffff) < (v)) {
#define IFMODCFGEND }
IFMODCFG(0x008d);
fileman_config->view.mode = E_FM2_VIEW_MODE_GRID_ICONS;
fileman_config->view.open_dirs_in_place = 0;
fileman_config->view.selector = 0;
fileman_config->view.single_click = 0;
fileman_config->view.no_subdir_jump = 0;
fileman_config->view.show_full_path = 0;
fileman_config->view.show_desktop_icons = 1;
fileman_config->icon.icon.w = 48;
fileman_config->icon.icon.h = 48;
fileman_config->icon.fixed.w = 0;
fileman_config->icon.fixed.h = 0;
fileman_config->icon.extension.show = 1;
fileman_config->list.sort.no_case = 1;
fileman_config->list.sort.dirs.first = 1;
fileman_config->list.sort.dirs.last = 0;
fileman_config->selection.single = 0;
fileman_config->selection.windows_modifiers = 0;
IFMODCFGEND;
IFMODCFG(0x0101);
fileman_config->view.show_toolbar = 1;
fileman_config->view.open_dirs_in_place = 1;
IFMODCFGEND;
IFMODCFG(0x0104);
fileman_config->tooltip.delay = 1.0;
fileman_config->tooltip.size = 30.0;
IFMODCFGEND;
IFMODCFG(0x0105);
e_config->filemanager_single_click = fileman_config->view.single_click;
IFMODCFGEND;
IFMODCFG(0x0107);
fileman_config->view.show_sidebar = 1;
IFMODCFGEND;
IFMODCFG(0x0108);
fileman_config->view.menu_shows_files = 0;
IFMODCFGEND;
IFMODCFG(0x0109);
fileman_config->view.desktop_navigation = 0;
IFMODCFGEND;
IFMODCFG(0x0110);
fileman_config->tooltip.enable = 1;
IFMODCFGEND;
IFMODCFG(0x0114);
fileman_config->view.spring_delay = 1;
IFMODCFGEND;
IFMODCFG(0x0115);
fileman_config->icon.max_thumb_size = 5;
IFMODCFGEND;
IFMODCFG(0x0116);
fileman_config->icon.max_thumb_size = 0;
IFMODCFGEND;
IFMODCFG(0x0118);
fileman_config->view.toolbar_orient = E_GADCON_ORIENT_TOP;
IFMODCFGEND;
}
fileman_config->config_version = MOD_CONFIG_FILE_VERSION;

View File

@ -4,10 +4,10 @@
#include "e.h"
/* Increment for Major Changes */
#define MOD_CONFIG_FILE_EPOCH 0x0001
#define MOD_CONFIG_FILE_EPOCH 1
/* Increment for Minor Changes (ie: user doesn't need a new config) */
#define MOD_CONFIG_FILE_GENERATION 0x0118
#define MOD_CONFIG_FILE_VERSION ((MOD_CONFIG_FILE_EPOCH << 16) | MOD_CONFIG_FILE_GENERATION)
#define MOD_CONFIG_FILE_GENERATION 0
#define MOD_CONFIG_FILE_VERSION ((MOD_CONFIG_FILE_EPOCH * 1000000) + MOD_CONFIG_FILE_GENERATION)
typedef struct _Config Config;

View File

@ -197,8 +197,7 @@ _mixer_module_configuration_new(void)
E_Mixer_Module_Config *conf;
conf = E_NEW(E_Mixer_Module_Config, 1);
if (!conf)
return NULL;
conf->desktop_notification = 1;
return conf;
}
@ -1376,13 +1375,6 @@ _mixer_module_configuration_setup(E_Mixer_Module_Context *ctxt)
ctxt->module_conf_edd = module_edd;
ctxt->conf = _mixer_module_configuration_load(module_edd);
#define IFMODCFG(v) if ((ctxt->conf->version & 0xffff) < v) {
#define IFMODCFGEND }
IFMODCFG(0x0003);
ctxt->conf->desktop_notification = 1;
IFMODCFGEND;
ctxt->conf->version = MOD_CONFIG_FILE_VERSION;
ctxt->desktop_notification = ctxt->conf->desktop_notification;
}

View File

@ -4,10 +4,11 @@
#include "e.h"
#include "e_mod_system.h"
#define MOD_CONFIG_FILE_EPOCH 0x0000
#define MOD_CONFIG_FILE_GENERATION 0x0004
#define MOD_CONFIG_FILE_VERSION \
((MOD_CONFIG_FILE_EPOCH << 16) | MOD_CONFIG_FILE_GENERATION)
/* Increment for Major Changes */
#define MOD_CONFIG_FILE_EPOCH 1
/* Increment for Minor Changes (ie: user doesn't need a new config) */
#define MOD_CONFIG_FILE_GENERATION 0
#define MOD_CONFIG_FILE_VERSION ((MOD_CONFIG_FILE_EPOCH * 1000000) + MOD_CONFIG_FILE_GENERATION)
typedef struct E_Mixer_Gadget_Config
{

View File

@ -171,7 +171,7 @@ e_modapi_init(E_Module *m)
if (notification_cfg &&
!(e_util_module_config_check(_("Notification Module"),
notification_cfg->version,
MOD_CFG_FILE_VERSION)))
MOD_CONFIG_FILE_VERSION)))
{
_notification_cfg_free(notification_cfg);
notification_cfg = NULL;
@ -263,7 +263,7 @@ _notification_cfg_new(void)
cfg = E_NEW(Config, 1);
cfg->cfd = NULL;
cfg->version = MOD_CFG_FILE_VERSION;
cfg->version = MOD_CONFIG_FILE_VERSION;
cfg->show_low = 0;
cfg->show_normal = 1;
cfg->show_critical = 1;

View File

@ -4,10 +4,11 @@
#include "e.h"
#include <E_Notification_Daemon.h>
#define MOD_CFG_FILE_EPOCH 0x0002
#define MOD_CFG_FILE_GENERATION 0x0007
#define MOD_CFG_FILE_VERSION \
((MOD_CFG_FILE_EPOCH << 16) | MOD_CFG_FILE_GENERATION)
/* Increment for Major Changes */
#define MOD_CONFIG_FILE_EPOCH 1
/* Increment for Minor Changes (ie: user doesn't need a new config) */
#define MOD_CONFIG_FILE_GENERATION 0
#define MOD_CONFIG_FILE_VERSION ((MOD_CONFIG_FILE_EPOCH * 1000000) + MOD_CONFIG_FILE_GENERATION)
typedef enum _Popup_Corner Popup_Corner;
typedef struct _Config Config;

View File

@ -4,10 +4,10 @@
typedef struct _Config Config;
/* Increment for Major Changes */
#define MOD_CONFIG_FILE_EPOCH 0x0001
#define MOD_CONFIG_FILE_EPOCH 1
/* Increment for Minor Changes (ie: user doesn't need a new config) */
#define MOD_CONFIG_FILE_GENERATION 0x0001
#define MOD_CONFIG_FILE_VERSION ((MOD_CONFIG_FILE_EPOCH << 16) | MOD_CONFIG_FILE_GENERATION)
#define MOD_CONFIG_FILE_GENERATION 0
#define MOD_CONFIG_FILE_VERSION ((MOD_CONFIG_FILE_EPOCH * 1000000) + MOD_CONFIG_FILE_GENERATION)
struct _Config
{

View File

@ -8,10 +8,10 @@
#include "e.h"
/* Increment for Major Changes */
#define MOD_CONFIG_FILE_EPOCH 0x0001
#define MOD_CONFIG_FILE_EPOCH 1
/* Increment for Minor Changes (ie: user doesn't need a new config) */
#define MOD_CONFIG_FILE_GENERATION 0x0001
#define MOD_CONFIG_FILE_VERSION ((MOD_CONFIG_FILE_EPOCH << 16) | MOD_CONFIG_FILE_GENERATION)
#define MOD_CONFIG_FILE_GENERATION 0
#define MOD_CONFIG_FILE_VERSION ((MOD_CONFIG_FILE_EPOCH * 1000000) + MOD_CONFIG_FILE_GENERATION)
typedef struct E_Quick_Access_Entry
{