mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-12 09:59:17 +02:00
LCL: Improve Gtk2CellRenderer. Issue #26439, patch from TK.
git-svn-id: trunk@45764 -
This commit is contained in:
parent
4f4a01b473
commit
eb6869d6c3
@ -390,12 +390,20 @@ const
|
||||
reserved_2: nil;
|
||||
base_class_init_func: nil;
|
||||
);
|
||||
var
|
||||
IID: TGUID;
|
||||
S: AnsiString;
|
||||
begin
|
||||
if (crType = 0)
|
||||
then begin
|
||||
crType := gtk_type_from_name(CR_NAME);
|
||||
if crType = 0
|
||||
then crType := gtk_type_unique(gtk_cell_renderer_text_get_type, @crInfo);
|
||||
// patch by tk: in case of shared library we must create unique name
|
||||
if CreateGUID(IID) = 0 then
|
||||
S := Format('LCL%d%d%d', [Word(IID.time_low), Word(IID.time_low shr 16), IID.time_mid]);
|
||||
crType := gtk_type_from_name(PAnsiChar(S));
|
||||
if crType = 0 then begin
|
||||
crInfo.type_name:=PAnsiChar(S);
|
||||
crType := gtk_type_unique(gtk_cell_renderer_text_get_type, @crInfo);
|
||||
end;
|
||||
end;
|
||||
Result := crType;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user