Commit Graph

11366 Commits

Author SHA1 Message Date
Pedro Pereira
45e29d58e2 Chess: TRY() all the things in serenity_main() :^) 2021-11-27 17:18:44 +01:00
Pedro Pereira
5caa9311d7 Breakout: TRY() all the things in serenity_main() :^) 2021-11-27 17:18:44 +01:00
Pedro Pereira
d56e4d5145 2048: TRY() all the things in serenity_main() :^) 2021-11-27 17:18:44 +01:00
kleines Filmröllchen
1ff48a3ca4 Terminal: Modernize terminal settings as a standalone application
The settings for Terminal are extracted into their own application,
TerminalSettings, which is reachable over the normal Settings menu as
well as the same place in the Terminal menu. The font settings are moved
into these settings as well, which are now split up into the "Terminal"
and "View" tabs. The font settings themselves receive an option to
override the selected font with the system default on the user side.
The live update behavior of all of the terminal settings is retained.

The layout of the new TerminalSettings is based around the other
Settings applications, but pixel-perfectness is missing in some places.
It's a bit fiddly and I'd like to have some better GUI::Label auto-size
behavior, but oh well :^)
2021-11-27 12:45:44 +01:00
kleines Filmröllchen
1e9554145e LibGUI: Add a cancel button callback to settings window tabs
Some settings tabs, like the ones on the upcoming terminal settings,
need to know when the cancel button is pressed to clean up things like
temporary live updates. Therefore, the SettingsWindow::Tab now features
a cancel_settings callback which does not need to be implemented.
2021-11-27 12:45:44 +01:00
Brian Gianforcaro
72e9d024b9 Settings: Fix launch of settings dialog
There was a bug report on discord where someone mentioned that
launching the keyboard settings always crashed. When looking
at the backtrace it became clear we were calling down the
`AppFile::executable()` path on uninitialized memory.

We can fix this by using the "official" API for obtaining data
from the GUI ModelIndex, instead of casting random memory to
the object type we expect it to be. :^)

Validated this fixes the issue for me locally.
2021-11-27 11:24:31 +01:00
Kenneth Myhra
f25466ae08 bt: Port to LibMain :^) 2021-11-27 11:14:16 +01:00
Kenneth Myhra
951d8a06d8 LibCore: Add syscall wrapper for gethostname() 2021-11-27 11:14:16 +01:00
Kenneth Myhra
8c4625e3b1 asctl: Port to LibMain :^) 2021-11-27 11:14:16 +01:00
Kenneth Myhra
880888fcc7 aplay: Port to LibMain 2021-11-27 11:14:16 +01:00
Kenneth Myhra
494f177d22 allocate: Port to LibMain :^) 2021-11-27 11:14:16 +01:00
Marcus Nilsson
67f349be46 PixelPaint: Keep a RefPtr to offset_text_box in EditGuideDialog
Keep a RefPtr to offset_text_box in EditGuideDialog instead of using
a local pointer. Previously the lambda in ok_button.on_click() would
outlive the local variable causing a crash.
2021-11-27 11:04:48 +01:00
Brian Gianforcaro
f807796380 UserspaceEmulator: Fix after add_positional_argument API change :^)
Get UE compiling again after the Vector<String> API was changed to
Vector<StringView>.
2021-11-26 16:47:39 -08:00
Idan Horowitz
957f54d96f LibJS: Throw InternalErrors instead of Errors on CallStackSizeExceeded
These seem more appropriate.
2021-11-27 01:58:05 +02:00
Andreas Kling
7341faceeb cat: Remove accidentally-committed unused macro 2021-11-27 00:48:44 +01:00
Andreas Kling
1ded1ed963 Run: Port to LibMain :^) 2021-11-26 23:27:57 +01:00
Andreas Kling
0b8fb8358e cp: Port to LibMain :^) 2021-11-26 23:27:57 +01:00
Andreas Kling
f1cc3d0fc4 Userland: Use Core::ArgsParser's Vector<StringView> API everywhere
...and remove the Vector<String> variant since there are no remaining
users of this API.
2021-11-26 23:27:57 +01:00
Andreas Kling
395ba619d8 LibCore: Add Vector<StringView> variant of add_positional_argument() 2021-11-26 23:27:57 +01:00
Andreas Kling
5bf6503ed1 cat: Use TRY() and LibCore syscall wrappers a lot more :^) 2021-11-26 23:27:57 +01:00
Sam Atkins
377a984905 Settings: Make sure settings are listed in alphabetical order
DirectoryIterator, and so `Desktop::AppFile::for_each()`, doesn't
guarantee anything about the order, so we manually sort afterwards.
Which means using a manual version of NonnullRefPtrVector, since that
doesn't support `quick_sort()`.
2021-11-26 22:14:56 +01:00
Sam Atkins
705b7fc407 Browser: Allow custom search engine URLs that don't start http[s]:// 2021-11-26 22:14:56 +01:00
Sam Atkins
a1e1405f26 BrowserSettings: Add some icons for it :^) 2021-11-26 22:14:56 +01:00
Sam Atkins
c22b0bb8b2 Browser+Base: Delete provided Browser.ini file
Having files in Base's user `.config` folder means that every time the
Serenity image is built, all user settings in that file are thrown away.
So, let's not do that! :^)

Modified the default value for the homepage url to match what was in
Browser.ini, so there is no visible change.
2021-11-26 22:14:56 +01:00
Sam Atkins
e84b3e7110 BrowserSettings: Implement restoring default values 2021-11-26 22:14:56 +01:00
Sam Atkins
f2b8ae7d86 BrowserSettings: Add preferred-color-scheme setting 2021-11-26 22:14:56 +01:00
Sam Atkins
11466c5316 BrowserSettings: Add setting for search engine 2021-11-26 22:14:56 +01:00
Sam Atkins
e927048754 Browser: Move search engine definitions to a json file
This both makes them configurable, and means that we can read them from
other applications, such as BrowserSettings. :^)
2021-11-26 22:14:56 +01:00
Sam Atkins
1933076143 Browser+BrowserSettings: Persist the "show bookmarks bar" setting
Previously this setting was only temporary, but we now save/load it from
the config file.
2021-11-26 22:14:56 +01:00
Sam Atkins
8a284be5c7 BrowserSettings: Create a BrowserSettings application :^)
Browser has a bunch of settings, but most are non-trivial to add here.
So far, these are implemented:

- Homepage URL
- Whether to close download windows when they complete

The others will be added in subsequent commits.
2021-11-26 22:14:56 +01:00
Karol Kosek
20191b58e2 DisplaySettings: Update wallpaper config path only on success
The Window Server is ignoring incorrect files since 235f39e449, so let's
not update the config when that happens and an error message instead!
2021-11-26 11:30:55 -08:00
Karol Kosek
e56ffd11ce DisplaySettings: Always save the background color to the config
Previously, you could notice that the background color isn't being
updated when you picked a small bitmap image with the 'center' mode.
2021-11-26 11:30:55 -08:00
Karol Kosek
65f3a259d2 WindowServer: Clear wallpaper if the requested path is empty
235f39e449 secretly added an if check that ignores all the files that
couldn't be loaded into bitmaps.  Unfortunately, we send an empty path
as a way to unset the wallpaper, which meant that we couldn't go back
to the default background color anymore.
2021-11-26 11:30:55 -08:00
Federico Guerinoni
4a90729a3e HackStudio: Port to LibMain :^) 2021-11-26 11:13:59 -08:00
Kenneth Myhra
98e65f71da echo: Port to LibMain :^) 2021-11-25 21:41:46 +01:00
Kenneth Myhra
d7336879d1 basename: Port to LibMain 2021-11-25 21:41:12 +01:00
Kenneth Myhra
430e231f5e copy: Port to LibMain :^) 2021-11-25 21:41:02 +01:00
Kenneth Myhra
507de4bc1d cat: Port to LibMain :^) 2021-11-25 21:40:52 +01:00
Ralf Donau
1c59cfa28c SystemMonitor: Remove unveiling /tmp/portal/config 2021-11-25 08:50:31 +01:00
pbrw
4d03852190 WidgetGallery: Use TRY() a lot more :^) 2021-11-25 08:49:31 +01:00
pbrw
bd61558ed8 Starfield: Use TRY() a lot more :^) 2021-11-25 08:49:31 +01:00
pbrw
9e3bc3f930 Screensaver: Use TRY() a lot more :^) 2021-11-25 08:49:31 +01:00
pbrw
14081b8a92 Mouse: Use TRY() a lot more :^) 2021-11-25 08:49:31 +01:00
pbrw
162c271eb6 ModelGallery: Use TRY() a lot more :^) 2021-11-25 08:49:31 +01:00
pbrw
601de466cb Mandelbrot: Use TRY() a lot more :^) 2021-11-25 08:49:31 +01:00
pbrw
8293ad33ee LibGfxScaleDemo: Use TRY() a lot more :^) 2021-11-25 08:49:31 +01:00
pbrw
dee90b2dc3 LibGfxDemo: Use TRY() a lot more :^) 2021-11-25 08:49:31 +01:00
pbrw
abf86b7501 Fire: Use TRY() a lot more :^) 2021-11-25 08:49:31 +01:00
pbrw
2642abb773 Eyes: Use TRY() a lot more :^) 2021-11-25 08:49:31 +01:00
pbrw
79bc587d03 Cube: Use TRY() a lot more :^) 2021-11-25 08:49:31 +01:00