summaryrefslogtreecommitdiff
path: root/Userland/Applications/KeyboardSettings/KeyboardSettingsWidget.cpp
AgeCommit message (Collapse)Author
2023-04-09KeyboardSettings: Port to `Core::File`Cameron Youell
2023-03-31KeyboardSettings: Add checkbox to enable Caps Lock mapping to Ctrlsbcohen2000
This patch adds an additional control to KeyboardSettings allowing the user to map Caps Lock to Ctrl. Previously, this was only possible by writing to /sys/kernel/variables/caps_lock_to_ctrl. Writing to /sys/kernel/variables/caps_lock_to_ctrl requires root privileges, but KeyboardSettings will not attempt to elevate the privilege of the user if they are not root. Instead, the checkbox is rendered as un-editable.
2023-03-05KeyboardSettings: Migrate to Directory::for_each_entry()Sam Atkins
2023-03-05LibCore+Everywhere: Return an Error from DirIterator::error()Sam Atkins
This also removes DirIterator::error_string(), since the same strerror() string will be included when you print the Error itself. Except in `ls` which is still using fprintf() for now.
2023-02-13LibCore: Rename `File` to `DeprecatedFile`Tim Schumacher
As usual, this removes many unused includes and moves used includes further down the chain.
2023-01-27KeyboardSettings: Replace uses of JsonObject::get_deprecated()/get_ptr()Sam Atkins
2023-01-17AK+Everywhere: Rename JsonObject::get() to ::get_deprecated()Sam Atkins
This is a preparatory step to making `get()` return `ErrorOr`.
2023-01-07LibGUI+Userland: Rename `try_load_from_gml()` -> `load_from_gml()` :^)Sam Atkins
It's the only one, so the `try` prefix is unnecessary now.
2023-01-07Userland: Replace all uses of `load_from_gml` with `try_load_from_gml`Sam Atkins
MOAR FIXMES! ;^)
2023-01-06LibGUI+Everywhere: Use fallible Window::set_main_widget() everywhere :^)Sam Atkins
Rip that bandaid off! This does the following, in one big, awkward jump: - Replace all uses of `set_main_widget<Foo>()` with the `try` version. - Remove `set_main_widget<Foo>()`. - Rename the `try` version to just be `set_main_widget` because it's now the only one. The majority of places that call `set_main_widget<Foo>()` are inside constructors, so this unfortunately gives us a big batch of new `release_value_but_fixme_should_propagate_errors()` calls.
2022-12-10KeyboardSettings: Disable "activate keymap" button if keymap is activeArda Cinar
2022-12-06Everywhere: Rename to_{string => deprecated_string}() where applicableLinus Groh
This will make it easier to support both string types at the same time while we convert code, and tracking down remaining uses. One big exception is Value::to_string() in LibJS, where the name is dictated by the ToString AO.
2022-12-06AK+Everywhere: Rename String to DeprecatedStringLinus Groh
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
2022-10-25Applications: Use new global variables at /sys/kernel/ directoryLiav A
2022-07-12Everywhere: Add sv suffix to strings relying on StringView(char const*)sin-ack
Each of these strings would previously rely on StringView's char const* constructor overload, which would call __builtin_strlen on the string. Since we now have operator ""sv, we can replace these with much simpler versions. This opens the door to being able to remove StringView(char const*). No functional changes.
2022-07-06AK: Use an enum instead of a bool for String::replace(all_occurences)DexesTTP
This commit has no behavior changes. In particular, this does not fix any of the wrong uses of the previous default parameter (which used to be 'false', meaning "only replace the first occurence in the string"). It simply replaces the default uses by String::replace(..., ReplaceMode::FirstOnly), leaving them incorrect.
2022-06-03Applications: Use spawn_or_show_error() for common spawn patternMacDue
2022-05-13LibGUI+Userland: Make Dialog::ExecResult an enum classSam Atkins
2022-05-12KeyboardSettings: Set window modified stateSam Atkins
2022-05-08KeyboardSettings: Also activate keymap via ListView's on_activationRomain Chardiny
2022-04-09LibGfx: Move other font-related files to LibGfx/Font/Simon Wanner
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-03-22KeyboardSettings: Allow changing and applying active keymapNícolas F. R. A. Prado
Previously only the list of allowed keymaps could be modified and applied to the system. Add a new button to activate the selected keymap from the list. When applying the changes to the system, also apply the active keymap.
2022-03-22KeyboardSettings: Rename m_current_applied_keymapNícolas F. R. A. Prado
Rename it to m_initial_active_keymap to denote that it's the keymap that was active when the application started up.
2022-03-02KeyboardSettings: Highlight default keymap in Keyboard Settings dialogThomas
2022-03-02KeyboardSettings: Fix adding empty keymapsThomas
In the Keymap Settings dialog, a check was missing when the Keymap selection dialog was cancelled. Not checking the return value causes an empty string to be added to the keymap list.
2022-02-16LibCore+Everywhere: Return ErrorOr from ConfigFile factory methodsSam Atkins
I've attempted to handle the errors gracefully where it was clear how to do so, and simple, but a lot of this was just adding `release_value_but_fixme_should_propagate_errors()` in places.
2022-02-14Applications: Use default constructors/destructorsLenny Maiorani
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules "The compiler is more likely to get the default semantics right and you cannot implement these functions better than the compiler."
2022-02-03Base+WindowsServer+keymap: Store multiple keymaps in a configTimur Sultanov
2022-01-29KeyboardSettings: Set icons from GMLDylan Katz
2021-11-20KeyboardSettings: Add iconsSam Atkins
A calculator isn't the ideal icon for the Num-lock section, so hopefully someone will produce a better one later.
2021-11-20KeyboardSettings: Add text area to test the currently selected keymapSam Atkins
Right now, this is a bit of a hack. We can't set a keymap to only apply to the test area, so we set the system keymap instead, while also keeping track of the "real" current keymap. Whenever the settings are applied, we update what that "real" keymap is, and when we exit, we revert to that keymap. Basically, it behaves as you would expect, apart from it also affecting other applications you are typing in while the KeyboardSettings window is open with a different keymap selected.
2021-11-20KeyboardSettings: Migrate to using SettingsWindow :^)Sam Atkins