Commit Graph
72 Commits
Author SHA1 Message Date
Michał Janiszewski c2ed2bd854 Update process execution flow for Linux (#25206)
Previously zenity/kdialog were launched in a way that would prevent
events from getting pumped to the new application in some scenarios.

This new approach, mimicked from
https://github.com/libsdl-org/SDL/blob/9859c051781771015356e31f941bab40a763bea9/src/video/wayland/SDL_waylandmessagebox.c#L40-L75
fixes this problem for compositors where it used to be a problem.

In particular, this fixes the system dialog not launching on the Steam
Deck.
2025-10-29 07:50:49 +00:00
Matt 42df41efdb Remove the use of shared_ptr for the Context (#24404)
* Replace shared_ptr with unique_ptr for Context systems, return refs

* Fix all the users

* clang-format fix

* Fix linux builds
2025-05-15 22:46:06 +03:00
Gymnasiast 0437329690 Rename DIALOG_TYPE and its members 2025-03-25 22:47:08 +01:00
Ethan O'Brien 8dfe1f91a9 Resolve merge conflicts 2025-01-10 12:16:03 -06:00
Aaron van Geffen fa06a49302 Update copyright year to 2025 (#23514) 2024-12-31 20:30:04 +01:00
Ethan O'Brien 63b0106de8 Fix emscripten support 2024-12-31 09:31:33 -06:00
Aaron van Geffen 35e117aca2 Rename String methods to use lowerCamelCase 2024-12-11 22:49:37 +01:00
Aaron van Geffen 3685d1a24b clang-format: change IndentPPDirectives to BeforeHash (#23287) 2024-11-29 12:04:56 +09:00
Aaron van Geffen b5ef2693b0 Remove common.h include from all units 2024-07-09 16:45:19 +02:00
Aaron van Geffen 51873dc0f6 Include Diagnostic.h at unit level 2024-07-09 16:23:31 +02:00
Aaron van Geffen ef4cad5ee3 Move UI exclusive string ids to UiStringIds.h 2024-05-10 23:24:46 +02:00
Aaron van Geffen 9e206d5528 Remove dependency on StringIds.h from Localisation.h (#22011)
* Remove dependency on StringIds.h from Localisation.h

* Include Language.h in UTF8.cpp for function declarations

* Rename tests/Localisation.cpp to tests/LocalisationTest.cpp
2024-05-10 19:14:05 +00:00
Michał Janiszewski 7b12667ddb Reduce <algorithm> include (#21947) 2024-05-01 13:47:27 +02:00
James103 1d8dc111f1 Replace 2023 with 2024 in copyright headers (#21139)
Replace all instances of the year 2023 with 2024 in all copyright headers
2024-01-01 12:52:28 +01:00
Matthias Moninger 379287ed0f Remove legacy stuff in common.h (#20523)
* Remove old interop macro

* Remove legacy string macro things

* Unbreak the posix/linux/unix builds

* Add String::IEquals and use it for case insensitive compare

* Add missing include for posix

* Replace _strnicmp with String::StartsWith

* Add LoByte and HiByte into Util.h, swap macros

* Fix android build

* Hopefully last of the string things

* Replace STUB directly with the warning
2023-07-02 12:59:20 +03:00
Hielke Morsinkandduncanspumpkin 6b7dc8fcdb Rename snake_case functions in openrct2/src folder
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-01-17 13:24:51 +01:00
Michael Steenbeek b4480b344e Rename snake_case functions from localisation folder 2023-01-16 23:12:35 +00:00
James103 73738bbdc8 Replace 2022 with 2023 in copyright headers
Replace all instances of the year 2022 with 2023 in all copyright headers
2023-01-01 11:58:01 +01:00
73 b9e677945d Replace 20XX with 2022 (#18158)
* Replace 2020 with 2022

Replace all 2020 headers with 2022

* replace other years with 2022

add missing years
2022-10-01 08:42:14 +01:00
Raymond Zhao 7399163a3c Use more smart ptrs and u8strings (#17611)
* Use smart ptr for PlatformUiContext and WindowManager

* Remove more delete calls

* Apply PR feedback
2022-07-28 18:19:38 +01:00
jazzysoggy c0853b56ad Fix Format_VA. Rename Format to StdFormat.
author jazzysoggy <39224097+jazzysoggy@users.noreply.github.com> 1655955994 -0400
committer jazzysoggy <39224097+jazzysoggy@users.noreply.github.com> 1656516326 -0400

Fixed Format_VA and renamed Format to StdFormat. Both now output to Std::String, while taking the same input as before. Changed functions that use these two to account for this output difference
2022-07-24 19:30:57 +02:00
Gymnasiast 3890aa50b7 Fix filters KDialog
They were case sensitive and did not display correctly.
2022-04-16 18:41:20 +02:00
Gymnasiast b27c48f035 Fix Zenity/Kdialog not opening in paths with single quotes 2022-04-16 18:41:20 +02:00
Michael Steenbeek 5edc561715 Close #11437: Migrate old platform methods 2022-02-18 21:57:00 +01:00
Gymnasiast 55591b1b2f Merge old and new FileDialogDesc 2022-01-29 13:55:10 +01:00
Gymnasiast 919c73d030 C++-ify most path handling 2022-01-08 16:58:57 +01:00
Hielke Morsink 76b5479bbb Fix undefined use of cctype functions 2021-11-06 16:27:54 +01:00
Hielke Morsink 4b4b3333d6 Remove unnecessary else blocks 2021-09-16 18:31:12 +02:00
Michael Steenbeek 430711a33b Cache HasFilePicker() value in UiContext 2021-03-20 14:51:15 +01:00
Keith Stellyes 268e39d12a GOG installer extraction for POSIX 2021-01-03 17:53:14 +01:00
Gymnasiast d963438c4f Check if platform has a file picker 2020-11-08 14:06:42 +01:00
Keith Stellyes 171132fb6d Add Execute and FindApp to Platform class 2020-10-22 21:17:28 +02:00
Michał Janiszewski 352870b503 Add OpenURL method, with implementation for Linux and Windows 2020-07-26 22:09:29 +02:00
Aaron van Geffen 7b5087f057 Update copyright year to 2020 2020-07-21 15:04:34 +02:00
Tulio Leao b948d65c33 Use named casts on openrct2-ui root folder (#11137) 2020-04-18 12:15:07 +02:00
niaandMichael Steenbeek addd27d4dc Support NetBSD and simplify platform ifdefs. (#10271)
For files intended to support unixy freedesktopy systems,
reduce the ifdef down to __unix__ && !__APPLE__ && !__ANDROID__,
rather than naming linux and all the BSDs and so on by hand.

Should simplify adding support for systems like illumos in the
future.

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2019-12-22 17:07:39 +01:00
Ted John 15cb3e1889 Remove unnecessary new line characters from log calls (#9237) 2019-05-12 13:48:56 +02:00
Aaron van Geffen 2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
Aaron van Geffen e1d6585423 Simplify EscapePathForShell by using std functions. 2018-09-13 23:20:17 +02:00
Gymnasiast e84348309c Add function to shell-escape path 2018-09-13 22:20:45 +02:00
Gymnasiast 40cd64c916 Add Linux support 2018-09-13 22:20:45 +02:00
Christian Schubert 6e6753aaf1 Added MacOS OpenFolder support. 2018-09-13 22:19:51 +02:00
clang-format d787872cbe Indent preprocessor directives 2018-07-23 16:00:23 +02:00
clang-formatandHielke Morsink b02dfdbc93 Binpack function arguments together
Previously when the arguments of a function wouldn't fit on a single line, clang-format would put each argument on its own line instead. By enabling the binpack parameter setting, it tried to fit as many on one line as possible instead.

Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:22 +02:00
clang-formatandHielke Morsink 95ce592579 Enforce not breaking before assignments and function names
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:19 +02:00
clang-format 9c022606f1 clang-format UI root 2018-07-23 16:00:14 +02:00
Brian Callahan 66bfd42551 Do not print which(1) errors to the console
On first launch of the game, OpenRCT2 tries to find Gnome or KDE eyecandy dialog programs zenity and kdialog to inform the user to set the `game_path`. It will fall back to an SDL popup with manual instructions if neither is found, which looks fine. However, if OpenRCT2 is launched from the command line, which will print "file not found" errors if you don't have zenity and/or kdialog installed, which might potentially confuse the user.

This patch routes the error messages to `/dev/null`, as we don't really care if those programs are not found.

See this thread on the OpenBSD mailing list: https://marc.info/?l=openbsd-ports&m=153020454402268&w=2
2018-07-07 20:53:50 +02:00
Michael Steenbeek 1b08fb4e69 Replace our own integer types with standard ones 2018-06-20 17:30:40 +02:00
Hielke Morsink 0cf256ac9e Ready copyright notice for clang-format
Clang-format sees the text behind `#pragma region` as code and formats it. Instead of stating the copyright and date there, it's now in the comment block right below it. The text "Copyright" is left in the `#pragma region` line, as clang-format sees it as a single identifier.

I took the opportunity to normalize the dates, and add the copyright notice to the source files where it was missing them (except for third-party and the generated resources.h file).
2018-06-15 14:07:34 +02:00
Ted John 7b610fd3c0 Use shared_ptr more for UiContext in relation to DrawingEngine 2018-05-11 20:37:48 +01:00