Two fixes:

- Added versioning for reading old files with logic saved
- Added two more 'alt backspace' options, for copyright and registered trademark.
  (also 'tm' but it's not in our default font)
This commit is contained in:
Ton Roosendaal 2012-10-30 17:36:00 +00:00
parent ec1f69ffce
commit 21eb1735d6
2 changed files with 49 additions and 8 deletions

@ -7137,6 +7137,29 @@ static void do_version_node_fix_internal_links_264(void *UNUSED(data), ID *UNUSE
}
}
}
static void do_version_logic_264(ListBase *regionbase)
{
ARegion *ar;
/* view settings for logic changed */
for (ar = regionbase->first; ar; ar = ar->next) {
if(ar->regiontype == RGN_TYPE_WINDOW) {
if (ar->v2d.keeptot==0) {
ar->v2d.maxzoom = 1.5f;
ar->v2d.keepzoom = V2D_KEEPZOOM | V2D_LIMITZOOM | V2D_KEEPASPECT;
ar->v2d.keeptot = V2D_KEEPTOT_BOUNDS;
ar->v2d.align = V2D_ALIGN_NO_POS_Y | V2D_ALIGN_NO_NEG_X;
ar->v2d.keepofs = V2D_KEEPOFS_Y;
}
}
}
}
static void do_versions(FileData *fd, Library *lib, Main *main)
{
@ -8246,15 +8269,24 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
do_version_node_fix_internal_links_264(NULL, NULL, ntree);
}
{
Object *ob;
for (ob = main->object.first; ob; ob = ob->id.next) {
if (ob->col_group == 0) {
ob->col_group = 0x01;
ob->col_mask = 0xff;
if (main->versionfile < 264 || (main->versionfile == 264 && main->subversionfile < 6)) {
bScreen *sc;
for (sc = main->screen.first; sc; sc = sc->id.next) {
ScrArea *sa;
for (sa = sc->areabase.first; sa; sa = sa->next) {
SpaceLink *sl;
if ( sa->spacetype == SPACE_LOGIC)
do_version_logic_264(&sa->regionbase);
for (sl = sa->spacedata.first; sl; sl = sl->next) {
if (sl->spacetype == SPACE_LOGIC)
do_version_logic_264(&sl->regionbase);
}
}
}
}
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */

@ -94,7 +94,8 @@ static char findaccent(char char1, unsigned int code)
}
else if (char1 == 'c') {
if (code == ',') new = 231;
if (code == '|') new = 162;
else if (code == '|') new = 162;
else if (code == 'o') new = 169;
}
else if (char1 == 'e') {
if (code == '`') new = 232;
@ -120,10 +121,18 @@ static char findaccent(char char1, unsigned int code)
else if (code == '/') new = 248;
else if (code == '-') new = 186;
else if (code == 'e') new = 143;
else if (code == 'c') new = 169;
else if (code == 'r') new = 174;
}
else if (char1 == 'r') {
if (code == 'o') new = 174;
}
else if (char1 == 's') {
if (code == 's') new = 167;
}
else if (char1 == 't') {
if (code == 'm') new = 153;
}
else if (char1 == 'u') {
if (code == '`') new = 249;
else if (code == 39) new = 250;