You've already forked lazarus-ccr
Win32 and GTK2 widgetset endless loop eliminated
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1033 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -275,7 +275,11 @@ if (I <= 2) or (J > 0) then
|
||||
ShellExecute(Handle, nil, StrPCopy(PC, S), StrPCopy(PC2, Params),
|
||||
nil, SW_SHOWNORMAL);
|
||||
{$ELSE}
|
||||
Shell('Open ' + S);
|
||||
{$IFDEF LCLCarbon}
|
||||
Shell('Open "' + S + '.app"');
|
||||
{$ELSE}
|
||||
Shell('"' + S + '" "' + Params + '"');
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
end
|
||||
@ -304,7 +308,11 @@ if (I > 0) or (J > 0) then
|
||||
{$IFDEF MSWINDOWS}
|
||||
ShellExecute(Handle, nil, StrPCopy(PC, URL), nil, nil, SW_SHOWNORMAL);
|
||||
{$ELSE}
|
||||
Shell('Open ' + URL);
|
||||
{$IFDEF LCLCarbon}
|
||||
Shell('Open "' + URL + '.app"');
|
||||
{$ELSE}
|
||||
Shell('"' + URL + '"');
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
Handled := True;
|
||||
Exit;
|
||||
@ -355,7 +363,7 @@ var
|
||||
S: string;
|
||||
I: integer;
|
||||
begin
|
||||
{$IFNDEF DARWIN} //Launched file name not passed via command line with OS X.
|
||||
{$IFNDEF LCLCarbon} //Launched file name not passed via command line with app bundle.
|
||||
if (ParamCount >= 1) then
|
||||
begin {Parameter is file to load}
|
||||
{$IFNDEF LCL}
|
||||
@ -605,7 +613,11 @@ if FileExists(S) then
|
||||
ShellExecute(Handle, nil, StrPCopy(PC, ParamStr(0)),
|
||||
StrPCopy(PC2, S+Dest), nil, SW_SHOWNORMAL);
|
||||
{$ELSE}
|
||||
Shell('Open ' + ParamStr(0));
|
||||
{$IFDEF LCLCarbon}
|
||||
Shell('Open "' + ParamStr(0) + '.app"');
|
||||
{$ELSE}
|
||||
Shell('"' + ParamStr(0) + '" "' + S+Dest + '"');
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
end;
|
||||
@ -838,7 +850,11 @@ begin
|
||||
ShellExecute(Handle, nil, StrPCopy(PC, ParamStr(0)),
|
||||
StrPCopy(PC2, NewWindowFile), nil, SW_SHOWNORMAL);
|
||||
{$ELSE}
|
||||
Shell('Open ' + ParamStr(0));
|
||||
{$IFDEF LCLCarbon}
|
||||
Shell('Open "' + ParamStr(0) + '.app"');
|
||||
{$ELSE}
|
||||
Shell('"' + ParamStr(0) + '" "' + NewWindowFile + '"');
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
@ -101,6 +101,13 @@ end;
|
||||
|
||||
function TFontForm.GetFontName: TFontName;
|
||||
begin
|
||||
{$IFNDEF MSWINDOWS}
|
||||
if Screen.Fonts.Count = 0 then //GTK2 without HasX defined (empty list)?
|
||||
begin
|
||||
Result := FontViewer.DefFontName;
|
||||
Exit;
|
||||
end;
|
||||
{$ENDIF}
|
||||
try
|
||||
Result := FontListBox.Items[FontListBox.ItemIndex];
|
||||
except
|
||||
@ -118,6 +125,7 @@ if I < 0 then
|
||||
{$IFNDEF MSWINDOWS} //System font only makes sense on Windows, so just select first font
|
||||
if I < 0 then
|
||||
I := 0;
|
||||
if Screen.Fonts.Count > 0 then //Check in case GTK2 without HasX defined
|
||||
{$ENDIF}
|
||||
FontListBox.ItemIndex := I;
|
||||
FontViewer.DefFontName := Value;
|
||||
@ -212,6 +220,9 @@ end;
|
||||
procedure TFontForm.ListBoxClicks(Sender: TObject);
|
||||
begin
|
||||
if Sender = FontListBox then
|
||||
{$IFNDEF MSWINDOWS}
|
||||
if Screen.Fonts.Count = 0 then else //Check in case GTK2 without HasX defined
|
||||
{$ENDIF}
|
||||
FontName := FontListBox.Items[FontListBox.ItemIndex]
|
||||
else if Sender = BackListBox then
|
||||
Background := StringToColor(BackListBox.Items[BackListBox.ItemIndex])
|
||||
|
@ -26,7 +26,7 @@
|
||||
</CompilerOptions>
|
||||
<Description Value="HTML Components for Lazarus"/>
|
||||
<License Value="MPL 1.1"/>
|
||||
<Version Release="2"/>
|
||||
<Version Release="3"/>
|
||||
<Files Count="1">
|
||||
<Item1>
|
||||
<Filename Value="htmlcompreg.pas"/>
|
||||
|
@ -4333,7 +4333,7 @@ end;
|
||||
procedure ThtmlViewer.PaintWindow(DC: HDC);
|
||||
begin
|
||||
PaintPanel.RePaint;
|
||||
BorderPanel.RePaint;
|
||||
BorderPanel.RePaint;
|
||||
VScrollbar.RePaint;
|
||||
HScrollbar.RePaint;
|
||||
end;
|
||||
@ -5049,7 +5049,9 @@ var
|
||||
begin
|
||||
if FViewer.DontDraw or (Canvas2 <> Nil) then
|
||||
Exit;
|
||||
FViewer.DrawBorder;
|
||||
{$IFNDEF LCL}
|
||||
FViewer.DrawBorder; //Causes endless loop for some reason on win32 and gtk2.
|
||||
{$ENDIF}
|
||||
OldPal := 0;
|
||||
Canvas.Font := Font;
|
||||
Canvas.Brush.Color := Color;
|
||||
|
@ -1650,6 +1650,11 @@ Done := False;
|
||||
S1 := NextFontName;
|
||||
while (S1 <> '') and not Done do
|
||||
begin
|
||||
{$IFDEF LCL} //Generic2 fonts won't be in Screen.Fonts with GTK2, so make
|
||||
// sure first font for family is selected.
|
||||
if Result = '' then
|
||||
Result := S1;
|
||||
{$ENDIF}
|
||||
Done := Screen.Fonts.IndexOf(S1) >= 0;
|
||||
if Done then
|
||||
Result := S1
|
||||
@ -1725,6 +1730,11 @@ S := Props[FontFamily];
|
||||
S1 := NextFontName;
|
||||
while (S1 <> '') and not Done do
|
||||
begin
|
||||
{$IFDEF LCL} //Generic2 fonts won't be in Screen.Fonts with GTK2, so make
|
||||
// sure first font for family is selected.
|
||||
if Font.iName = '' then
|
||||
Font.iName := S1;
|
||||
{$ENDIF}
|
||||
Done := Screen.Fonts.IndexOf(S1) >= 0;
|
||||
if Done then
|
||||
begin
|
||||
|
Reference in New Issue
Block a user