mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-06 22:37:27 +01:00
revert gtkcallback, commit right file
git-svn-id: trunk@13960 -
This commit is contained in:
parent
8d3ee2378e
commit
56c31a9c00
@ -161,22 +161,6 @@ begin
|
||||
TCustomNoteBook(APage.Parent).DoCloseTabClicked(APage);
|
||||
end;
|
||||
|
||||
function FilterFuc(xevent: PGdkXEvent; event: PGdkEvent; data: gpointer): TGdkFilterReturn; cdecl;
|
||||
var
|
||||
AForm: TCustomForm absolute data;
|
||||
begin
|
||||
Result := GDK_FILTER_CONTINUE;
|
||||
{$ifdef windows}
|
||||
if (PMSG(xevent)^.message = WM_NCLBUTTONDOWN) and
|
||||
(PMSG(xevent)^.wParam = HTCAPTION) and
|
||||
(TWinControlAccess(AForm).DragKind = dkDock) then
|
||||
begin
|
||||
AForm.BeginDrag(True);
|
||||
Result := GDK_FILTER_REMOVE;
|
||||
end;
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
{-------------------------------------------------------------------------------
|
||||
function GTKRealizeCB
|
||||
Params: Widget: PGtkWidget; Data: Pointer
|
||||
@ -213,7 +197,6 @@ begin
|
||||
|
||||
gdk_window_set_decorations(TheWindow, decor);
|
||||
gdk_window_set_functions(TheWindow, func);
|
||||
gdk_window_add_filter(TheWindow, @FilterFuc, TheForm)
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
@ -112,7 +112,7 @@ var
|
||||
Year, Month, Day: guint; //used for csCalendar
|
||||
begin
|
||||
Result := 0;
|
||||
if WSCheckHandleAllocated(ACalendar, 'GetDateTime') then
|
||||
if not WSCheckHandleAllocated(ACalendar, 'GetDateTime') then
|
||||
Exit;
|
||||
gtk_calendar_get_date(GetCalendar(ACalendar), @Year, @Month, @Day);
|
||||
//For some reason, the month is zero based.
|
||||
@ -124,7 +124,7 @@ var
|
||||
Year, Month, Day: string;
|
||||
GtkCalendar: PGtkCalendar;
|
||||
begin
|
||||
if WSCheckHandleAllocated(ACalendar, 'SetDateTime') then
|
||||
if not WSCheckHandleAllocated(ACalendar, 'SetDateTime') then
|
||||
Exit;
|
||||
GtkCalendar := GetCalendar(ACalendar);
|
||||
Year := FormatDateTime('yyyy', ADateTime);
|
||||
@ -140,7 +140,7 @@ var
|
||||
num: dword;
|
||||
gtkcalendardisplayoptions : TGtkCalendarDisplayOptions;
|
||||
begin
|
||||
if WSCheckHandleAllocated(ACalendar, 'SetDisplaySettings') then
|
||||
if not WSCheckHandleAllocated(ACalendar, 'SetDisplaySettings') then
|
||||
Exit;
|
||||
num := 0;
|
||||
if (dsShowHeadings in ADisplaySettings) then
|
||||
@ -165,7 +165,7 @@ end;
|
||||
class procedure TGtkWSCustomCalendar.SetReadOnly(const ACalendar: TCustomCalendar;
|
||||
const AReadOnly: boolean);
|
||||
begin
|
||||
if WSCheckHandleAllocated(ACalendar, 'SetReadOnly') then
|
||||
if not WSCheckHandleAllocated(ACalendar, 'SetReadOnly') then
|
||||
Exit;
|
||||
if AReadOnly then
|
||||
gtk_calendar_freeze(GetCalendar(ACalendar))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user