mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 18:08:35 +02:00
gtk2 intf: fixed GetPreferredSize, codetools: added targets i386-darwin-*
git-svn-id: trunk@9504 -
This commit is contained in:
parent
c5534be14d
commit
b9bf6c4b20
@ -100,7 +100,7 @@ const
|
||||
'i386', 'powerpc', 'm68k', 'x86_64', 'sparc', 'arm'
|
||||
);
|
||||
|
||||
Lazarus_CPU_OS_Widget_Combinations: array[1..27] of string = (
|
||||
Lazarus_CPU_OS_Widget_Combinations: array[1..31] of string = (
|
||||
'i386-linux-gtk',
|
||||
'i386-linux-gnome',
|
||||
'i386-linux-gtk2',
|
||||
@ -120,6 +120,10 @@ const
|
||||
'i386-win32-win32',
|
||||
'i386-win32-wince',
|
||||
'i386-win32-gtk',
|
||||
'i386-darwin-gtk',
|
||||
'i386-darwin-gtk2',
|
||||
'i386-darwin-carbon',
|
||||
'i386-darwin-qt',
|
||||
'powerpc-darwin-gtk',
|
||||
'powerpc-darwin-gtk2',
|
||||
'powerpc-darwin-carbon',
|
||||
|
@ -8,11 +8,11 @@
|
||||
<SaveClosedFiles Value="False"/>
|
||||
<SaveOnlyProjectUnits Value="True"/>
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<IconPath Value="./"/>
|
||||
<TargetFileExt Value=""/>
|
||||
<Title Value="createmacapplication"/>
|
||||
<ActiveEditorIndexAtStart Value="0"/>
|
||||
</General>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
@ -36,11 +36,6 @@
|
||||
<Filename Value="createmacapplication.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="CreateMacApplication"/>
|
||||
<CursorPos X="30" Y="21"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<UsageCount Value="20"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit0>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
|
@ -30,7 +30,7 @@ interface
|
||||
{$IFNDEF DisableAsyncProcess}
|
||||
{$IFDEF Linux}
|
||||
{$IFDEF CPUI386}
|
||||
{$DEFINE UseAsyncProcess}
|
||||
{off $DEFINE UseAsyncProcess}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
@ -1,2 +1,2 @@
|
||||
// Created by Svn2RevisionInc
|
||||
const RevisionStr = '9489M';
|
||||
const RevisionStr = '9500M';
|
||||
|
@ -44,7 +44,7 @@ interface
|
||||
{$IFNDEF DisableAsyncProcess}
|
||||
{$IFDEF Linux}
|
||||
{$IFDEF CPUI386}
|
||||
{$DEFINE UseAsyncProcess}
|
||||
{off $DEFINE UseAsyncProcess}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
@ -54,7 +54,7 @@ begin
|
||||
lEventHandler^.OnEvent := AEventHandler;
|
||||
lEventHandler^.GSourceID := g_io_add_watch(giochannel,
|
||||
AFlags, @waithandle_iocallback, lEventHandler);
|
||||
//debugln('TGtkWidgetSet.AddEventHandler lEventHandler=',HexStr(Cardinal(lEventHandler),8));
|
||||
//debugln('TGtkWidgetSet.AddEventHandler lEventHandler=',HexStr(Cardinal(lEventHandler),8),' AHandle=',dbgs(lEventHandler^.Handle));
|
||||
lEventHandler^.PrevHandler := nil;
|
||||
lEventHandler^.NextHandler := FWaitHandles;
|
||||
if FWaitHandles <> nil then
|
||||
@ -69,13 +69,15 @@ var
|
||||
begin
|
||||
if AHandler = nil then exit;
|
||||
g_source_remove(lEventHandler^.GSourceID);
|
||||
g_io_channel_unref(lEventHandler^.GIOChannel);
|
||||
g_io_channel_close(lEventHandler^.GIOChannel);
|
||||
if lEventHandler^.PrevHandler = nil then
|
||||
FWaitHandles := lEventHandler^.NextHandler
|
||||
else
|
||||
lEventHandler^.PrevHandler^.NextHandler := lEventHandler^.NextHandler;
|
||||
if lEventHandler^.NextHandler <> nil then
|
||||
lEventHandler^.NextHandler^.PrevHandler := lEventHandler^.PrevHandler;
|
||||
//debugln('TGtkWidgetSet.RemoveEventHandler lEventHandler=',HexStr(Cardinal(lEventHandler),8));
|
||||
//debugln('TGtkWidgetSet.RemoveEventHandler lEventHandler=',HexStr(Cardinal(lEventHandler),8),' AHandle=',dbgs(lEventHandler^.Handle));
|
||||
Dispose(lEventHandler);
|
||||
AHandler := nil;
|
||||
end;
|
||||
@ -88,7 +90,7 @@ begin
|
||||
g_source_remove(lEventHandler^.GSourceID);
|
||||
lEventHandler^.GSourceID := g_io_add_watch(lEventHandler^.GIOChannel,
|
||||
NewFlags, @waithandle_iocallback, lEventHandler);
|
||||
//debugln('TGtkWidgetSet.SetEventHandlerFlags lEventHandler=',HexStr(Cardinal(lEventHandler),8));
|
||||
//debugln('TGtkWidgetSet.SetEventHandlerFlags lEventHandler=',HexStr(Cardinal(lEventHandler),8),' AHandle=',dbgs(lEventHandler^.Handle));
|
||||
end;
|
||||
|
||||
type
|
||||
|
@ -6220,8 +6220,14 @@ begin
|
||||
if not WithThemeSpace then begin
|
||||
//DebugLn('GetGTKDefaultWidgetSize ',DbgSName(AWinControl),' ',dbgs(gtk_widget_get_xthickness(Widget)),' ',dbgs(gtk_widget_get_ythickness(Widget)));
|
||||
//dec(PreferredWidth,gtk_widget_get_xthickness(Widget));
|
||||
{$IFDEF Gtk1}
|
||||
dec(PreferredHeight,2*gtk_widget_get_ythickness(Widget));
|
||||
{$ENDIF}
|
||||
end;
|
||||
//DebugLn(['GetGTKDefaultWidgetSize Allocation=',Widget^.allocation.x,',',Widget^.allocation.y,',',Widget^.allocation.width,',',Widget^.allocation.height,
|
||||
// ' requisition=',Widget^.requisition.width,',',Widget^.requisition.height,
|
||||
// ' PreferredWidth=',PreferredWidth,' PreferredHeight=',PreferredHeight,
|
||||
// ' WithThemeSpace=',WithThemeSpace]);
|
||||
// set new size
|
||||
gtk_widget_set_usize(Widget,AWinControl.Width,AWinControl.Height);
|
||||
//debugln('GetGTKDefaultSize PreferredWidth=',dbgs(PreferredWidth),' PreferredHeight=',dbgs(PreferredHeight));
|
||||
|
@ -236,7 +236,8 @@ type
|
||||
): TCheckBoxState; override;
|
||||
class procedure SetShortCut(const ACustomCheckBox: TCustomCheckBox;
|
||||
const OldShortCut, NewShortCut: TShortCut); override;
|
||||
class procedure SetState(const ACB: TCustomCheckBox; const ANewState: TCheckBoxState); override;
|
||||
class procedure SetState(const ACB: TCustomCheckBox;
|
||||
const ANewState: TCheckBoxState); override;
|
||||
class procedure GetPreferredSize(const AWinControl: TWinControl;
|
||||
var PreferredWidth, PreferredHeight: integer;
|
||||
WithThemeSpace: Boolean); override;
|
||||
@ -903,7 +904,8 @@ begin
|
||||
'activate_item');
|
||||
end;
|
||||
|
||||
class procedure TGtkWSCustomCheckBox.SetState(const ACB: TCustomCheckBox; const ANewState: TCheckBoxState);
|
||||
class procedure TGtkWSCustomCheckBox.SetState(const ACB: TCustomCheckBox;
|
||||
const ANewState: TCheckBoxState);
|
||||
var
|
||||
GtkObject: PGtkObject;
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user