mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-21 03:49:18 +02:00
fcl-res: fix LANGUAGE attribute
Reintegrate fpcres-rc branch by Martok git-svn-id: trunk@46385 -
This commit is contained in:
parent
81885c7e72
commit
8008f314b1
@ -266,7 +266,7 @@ begin
|
|||||||
yyval := yyv[yysp-1];
|
yyval := yyv[yysp-1];
|
||||||
end;
|
end;
|
||||||
63 : begin
|
63 : begin
|
||||||
aktresource.LangID:= MakeLangID(yyv[yysp-2].yyrcnumtype.v, yyv[yysp-0].yyrcnumtype.v);
|
change_lang_id(MakeLangID(yyv[yysp-2].yyrcnumtype.v, yyv[yysp-0].yyrcnumtype.v));
|
||||||
end;
|
end;
|
||||||
64 : begin
|
64 : begin
|
||||||
aktresource.Characteristics:= yyv[yysp-0].yyrcnumtype.v;
|
aktresource.Characteristics:= yyv[yysp-0].yyrcnumtype.v;
|
||||||
|
@ -145,7 +145,7 @@ suboptions
|
|||||||
;
|
;
|
||||||
|
|
||||||
suboption
|
suboption
|
||||||
: _LANGUAGE numpos ',' numpos { aktresource.LangID:= MakeLangID($2.v, $4.v); }
|
: _LANGUAGE numpos ',' numpos { change_lang_id(MakeLangID($2.v, $4.v)); }
|
||||||
| _CHARACTERISTICS numpos { aktresource.Characteristics:= $2.v; }
|
| _CHARACTERISTICS numpos { aktresource.Characteristics:= $2.v; }
|
||||||
| _VERSION numpos { aktresource.Version:= $2.v; }
|
| _VERSION numpos { aktresource.Version:= $2.v; }
|
||||||
| _MOVEABLE { aktresource.MemoryFlags:= aktresource.MemoryFlags or MF_MOVEABLE; }
|
| _MOVEABLE { aktresource.MemoryFlags:= aktresource.MemoryFlags or MF_MOVEABLE; }
|
||||||
|
@ -295,6 +295,14 @@ begin
|
|||||||
create_resource(aId, nil, cls);
|
create_resource(aId, nil, cls);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure change_lang_id(newlang: TLangID);
|
||||||
|
begin
|
||||||
|
// cannot change a language id while it is contained in a list, so remove and re-add
|
||||||
|
aktresources.Remove(aktresource);
|
||||||
|
aktresource.LangID:= newlang;
|
||||||
|
aktresources.Add(aktresource);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure raw_write_string(Stream: TMemoryStream; str: rcstrtype);
|
procedure raw_write_string(Stream: TMemoryStream; str: rcstrtype);
|
||||||
var
|
var
|
||||||
i: integer;
|
i: integer;
|
||||||
|
Loading…
Reference in New Issue
Block a user