Commit Graph

23068 Commits

Author SHA1 Message Date
Bart
fc8abb150c LCL: TOpenDialog: fix language in a comment. 2023-08-31 22:20:41 +02:00
Bart
a5b48a084d LCL: TOpenDialog: do not set ofExtensionDifferent if multiple files are selected.
(Also don't bother setting it the result of Execute is False.)
Reason:
The behavour of ofExtensionDifferent is based upon the workings of Windows LPOPENFILENAME behaviour
This behaviour is completely irratic when multiple files are selected, it can be on or off given the same input
Delphi 7 seems to not include the ofExtensionDifferent flag if multiple files are selected, regardless of their extensions
(And nobody seems to bother anyway about this flag)
2023-08-31 18:59:09 +02:00
Bart
7d4a36a290 LCL: TOpenDialog: set ofExtensionDifferent if (DefaultExt <> '') and (Extension <> DefExt) for all WS.
Our docs about ofExtensionDifferent wrongfully states: "Allows a file name with an extension which does not match the filters or default extension in a file dialog."
This is not how Delphi defines it, and also not how it's implemented in pre-Vista dialogs (using OPENFILE structure, the OS sets the corresponding flag).
(Since there have been no bugreports about this, it's doubtfull anybody cares, but nevertheless...)
2023-08-30 23:23:17 +02:00
Bart
33484eab0b LCL: Start implemention TOpenOptionsEx: widget set specific options for TOpen/SaveDialog that do not fit into TOpenOptions. 2023-08-30 23:01:50 +02:00
Željan Rikalo
e27bb2eef2 Qt5: use QTimer::singleShot() with QObject context from Qt 5.9.0 2023-08-29 23:42:38 +02:00
Željan Rikalo
e73c702be2 Qt5,Qt6: fix possible wrong result of TQtWidgetSet.GetTextExtentPoint(). 2023-08-29 23:41:13 +02:00
Željan Rikalo
e554d21707 Qt5: cleanup of TQtWidgetSet.GetTextMetrics(). 2023-08-29 15:36:22 +02:00
Željan Rikalo
88afd66312 Qt5,Qt6: significant improvenment of TQtWidgetSet.GetTextExtentExPoint(), also corrected Size.cx in some cases. Returned results are now equal to win32 on windows, but also gtk2 on linux. 2023-08-29 15:11:15 +02:00
Željan Rikalo
269b3d0007 Qt5: fixed Qt documentation inconsistency about QTimer::singleShot() overload. 2023-08-28 18:05:01 +02:00
Bad Sector
5ecce8dc19 LCL-GTK2: Fix double free due to wrong refcount during SaveDC/RestoreDC
CopyDataFrom copies the FPixmap field directly without updating
reference counts for the objects, which in some cases ends up attempting
to unref (in the TGtkDeviceContext destructor) an already freed object
(this can happen when, e.g., SaveDC/RestoreDC is called twice with the
same DC - in the first SaveDC/RestoreDC "pass", RestoreDC deletes the
FPixmap object during the saved context destruction and in the second
"pass" the object is already destroyed and the program crashes).

This patch fixes this by adding calls to ref/unref during CopyDataFrom
for the FPixmap.
2023-08-28 15:35:44 +00:00
Bart
ca9f504a0d LCLIntf: small optimizations to LParamExtractLoHiWord and LParamHiWord as suggested by Maxim. 2023-08-27 22:23:12 +02:00
Bart
b7d3481248 TaskDialog: TLCLTaskDialog:start implementing message TDM_UPDATE_ELEMENT_TEXT.
For now the new text must not bi higher than the old text, otherwise the text will be cut off.
2023-08-27 13:43:23 +02:00
Bart
39c979d5b9 TaskDialog: TLCLTaskDialog: implement message handlers for:
- TDM_CLICK_BUTTON
- TDM_CLICK_RADIO_BUTTON
- TDM_CLICK_VERIFICATION
- TDM_ENABLE_BUTTON
- TDM_ENABLE_RADIO_BUTTON
2023-08-27 12:43:38 +02:00
Željan Rikalo
36a99bdd26 Qt6: reduced string conversions. 2023-08-27 11:30:15 +02:00
Željan Rikalo
c630749f27 Qt6: reduced num of string conversions, cleanup 2023-08-27 11:29:15 +02:00
Bart
c70e6b3297 LCLIntf: add helper functions to extract Lo and Hi words of LPARAM type. 2023-08-27 10:26:24 +02:00
rich2014
935e7edaff Merge branch 'lcl/cocoa/leak' 2023-08-27 01:20:57 +08:00
Bart
42bcacac19 TTaskDialog: fix compilation on non-Windows 64-bit targets (lParamlo and lParamhi not defined there). 2023-08-26 18:58:49 +02:00
rich2014
762c5a45f0 Cocoa: set Window Level to normal in DestroyHandle
avoid still appearing on the screen before the top window is actually destroyed
2023-08-27 00:01:49 +08:00
rich2014
b65ca17223 Cocoa: MainPool is divided into two stages, covering the whole cycle, fix resources leak 2023-08-26 23:56:18 +08:00
rich2014
7f00662152 Cocoa: BeginMessageProcess/EndMessageProcess implemented, fix resources leak 2023-08-26 23:55:51 +08:00
rich2014
2d1027253f LCL: WidgetSet.BeginMessageProcess/EndMessageProcess added 2023-08-26 23:48:04 +08:00
Bart
5aab1a7b18 TTaskDialog: Start implement TTaskDialog.ProgressBar for emulated dialog: Range, Position and Style. 2023-08-26 13:20:42 +02:00
Željan Rikalo
12e313d41b Qt5: Fixed compiling qt56.pas with -Sy option. 2023-08-26 10:35:06 +02:00
Maxim Ganetsky
895c80c4ea LCL: optimized TApplication.GetControlAtMouse (no functional changes), patch by Rika, issue #40465 2023-08-26 02:50:48 +03:00
Željan Rikalo
f27a50f74e Qt5: improve string conversions by removing unneeded GetUtf8Str internal function. 2023-08-25 19:49:26 +02:00
Bart
a397741a99 TTaskDialog: Start implementing TTaskDialog.ProgressBar for emulated dialog. 2023-08-25 19:12:26 +02:00
Bart
f8ee1f55bb TTaskDialog: remove commented out code. 2023-08-25 18:49:11 +02:00
Bart
9e2aabba9d TTaskDialog: TTaskDialog.ProgressBar:
- FMin and FMax must be in range 0.High(Word).
- Adjust FPosition when setting range.
- Define const for default min/max instead of using magic numbers.
- Simplify SetMin/SetMax.
2023-08-25 18:47:43 +02:00
Željan Rikalo
d06d98e830 Gtk3: fixed TGtk3WidgetSet.GetWindowRect() bounds, patch by Anton Kavalenka.Part of issue #40461 2023-08-25 17:21:44 +02:00
mattias
53db93de09 lcl: gtk2: simplified unit dependencies 2023-08-25 12:30:53 +02:00
mattias
58ed236c84 lcl: gtk2: simplified unit dependencies 2023-08-25 12:20:35 +02:00
mattias
4cd036d871 lcl: gtk2: simplified unit dependencies 2023-08-25 12:09:09 +02:00
Bart
f596f54321 TTaskDialog: progress on TTaskDialog.ProgressBar: setting type, range, position, range and marqueespeed, now work for native Vista+ dialog. 2023-08-24 23:41:26 +02:00
Bart
679e55e191 TTaskDialog: fix unintentionally left over writelln() statements. 2023-08-24 20:01:58 +02:00
Juha
dfbe6ad23d LCL-GTK3: Support TFrame as a MenuItem's owner. Issue #40446, patch by haword. 2023-08-24 11:00:19 +03:00
zeljan1
805a8817ed Qt6: fixed crash while processing wheelscroll event inside mdiarea window. 2023-08-23 19:51:33 +02:00
Bart
8a60ec04de TTaskDialog: partially implemented TTaskDialogProgressBar.Initialize. 2023-08-23 15:23:43 +02:00
Ondrej Pokorny
d556038c01 TaskDialog: do not write to console (fix) 2023-08-23 14:55:05 +02:00
Ondrej Pokorny
e6fc6dca77 TaskDialog: do not write to console 2023-08-23 14:49:10 +02:00
Bart
fe0ed266ce TTaskDialog: start implementing TTaskDialogProgressBar: skeleton only, does not communicate with the dialog yet. 2023-08-23 13:10:52 +02:00
Željan Rikalo
2885935b2d Qt,Qt5,Qt6: do not create dummy widget if wm name is empty or we are running under wayland. issue #40413 2023-08-23 09:18:10 +02:00
Željan Rikalo
e2f0b349f4 Gtk2: do not create dummy widget if WM name is empty, also reduce looping on slow systems. issue #40413 2023-08-23 09:09:06 +02:00
Bart
7c055798ef Revert "Win32: Vista dialogs: reverse the logic of applying FOS_STRICTFILETYPES to IFileDialog."
It causes a regression in the IDE.
The old logic is still wrong, but must be fixed in a different way, yet to be discussed.
This reverts commit ed3e261065.
2023-08-22 23:51:06 +02:00
Željan Rikalo
853461fed6 LCL: fixed TWinControl.SetChildZPosition, WS must be informed about change of order in any case. issue #40450 2023-08-22 19:50:19 +02:00
Željan Rikalo
2a339f8cb1 Qt,Qt5,Qt6: fixed borderless popup over parent form with FormStyle = fsStayOnTop. issue #40440 2023-08-22 19:28:56 +02:00
mattias
b59196e223 ide: fixed search ancestor lfm for lfm with unitnames 2023-08-22 16:25:59 +02:00
Bart
cf5777a164 TTaskDialog: implement property Handle. Makes it possible to send messages to the dialog.
This is needed to implement e.g. progressbar and can be used to update on-the-fly the contents of the dialog.
2023-08-21 22:11:25 +02:00
ACTom
dde185549b Translations: Chinese translation update, merge request !229 2023-08-21 01:45:06 +03:00
Bart
7bf0a50a7b TTaskDialog: remove outdated comments. 2023-08-20 15:15:10 +02:00