Prepare for theme version bump.

SVN revision: 13788
This commit is contained in:
Kim Woelders 2005-03-19 11:10:12 +00:00
parent 87dace52d7
commit 14cbf4d5b6
5 changed files with 20 additions and 24 deletions

View File

@ -1304,7 +1304,8 @@ BackgroundsSighan(int sig, void *prm __UNUSED__)
break; break;
case ESIGNAL_EXIT: case ESIGNAL_EXIT:
BackgroundsConfigSave(); if (Mode.wm.save_ok)
BackgroundsConfigSave();
break; break;
} }
} }

View File

@ -1129,7 +1129,8 @@ ButtonsSighan(int sig, void *prm __UNUSED__)
break; break;
case ESIGNAL_EXIT: case ESIGNAL_EXIT:
ButtonsConfigSave(); if (Mode.wm.save_ok)
ButtonsConfigSave();
break; break;
} }
} }

View File

@ -241,7 +241,7 @@ ConfigFileRead(FILE * fs)
int i1, i2, fields; int i1, i2, fields;
char s[FILEPATH_LEN_MAX]; char s[FILEPATH_LEN_MAX];
int e_cfg_ver = 0; int e_cfg_ver = 0;
int min_e_cfg_ver = 0; int max_e_cfg_ver = 1;
while (GetLine(s, sizeof(s), fs)) while (GetLine(s, sizeof(s), fs))
{ {
@ -276,32 +276,26 @@ ConfigFileRead(FILE * fs)
} }
if (i2 == CONFIG_OPEN) if (i2 == CONFIG_OPEN)
{ {
if (e_cfg_ver != min_e_cfg_ver) if (e_cfg_ver > max_e_cfg_ver)
{ {
AlertX(_("Theme versioning ERROR"), AlertX(_("Theme versioning ERROR"),
_("Restart with Defaults"), " ", _("Restart with Defaults"), " ",
_("Abort and Exit"), _("Abort and Exit"),
_("ERROR:\n" "\n" _("ERROR:\n" "\n"
"The configuration for the theme you are " "The configuration for the theme you are running is\n"
"running is\n" "incompatible. It's config revision is %i.\n"
"incompatible. It's config revision is %i. " "It needs to be marked as being revision <= %i\n"
"It needs to\n" "\n"
"be marked as being revision %i\n" "\n" "Please contact the theme author or maintainer and\n"
"Please contact the theme author or " "inform them that in order for their theme to function\n"
"maintainer and\n" "with this version of Enlightenment, they have to\n"
"inform them that in order for their theme " "update it to the current settings, and then match\n"
"to function\n" "the revision number.\n" "\n"
"with this version of Enlightenment, they " "If the theme revision is higher than Enlightenment's\n"
"have to\n" "it may be that you haven't upgraded Enlightenment for\n"
"update it to the current settings, and "
"then match\n" "the revision number.\n" "\n"
"If the theme revision is higher than "
"Enlightenment's\n"
"it may be that you haven't upgraded "
"Enlightenment for\n"
"a while and this theme takes advantages of new\n" "a while and this theme takes advantages of new\n"
"features in Enlightenment in new versions.\n"), "features in Enlightenment in new versions.\n"),
e_cfg_ver, min_e_cfg_ver); e_cfg_ver, max_e_cfg_ver);
SessionExit(EEXIT_THEME, "DEFAULT"); SessionExit(EEXIT_THEME, "DEFAULT");
} }
else else

View File

@ -284,7 +284,7 @@ main(int argc, char **argv)
StartupWindowsOpen(); StartupWindowsOpen();
Conf.startup.firsttime = 0; Conf.startup.firsttime = 0;
Mode.wm.save_ok = 1; Mode.wm.save_ok = Conf.autosave;
Mode.wm.startup = 0; Mode.wm.startup = 0;
autosave(); autosave();

View File

@ -296,7 +296,7 @@ MatchEwinToSM(EWin * ewin)
void void
autosave(void) autosave(void)
{ {
if (!Mode.wm.save_ok || !Conf.autosave) if (!Mode.wm.save_ok)
return; return;
if (EventDebug(EDBUG_TYPE_SESSION)) if (EventDebug(EDBUG_TYPE_SESSION))