Tim Ledbetter
0d7b13edac
Userland: Make GUI::Window
construction non-fallible
2023-09-17 16:47:28 -06:00
Tim Ledbetter
ccab5ddf9b
LibGUI+Applications: Use String in make_about_action()
2023-09-16 11:05:49 +02:00
Tim Ledbetter
c74f7e5f2a
Userland: Don't use String::from_utf8()
for literal strings
2023-09-15 08:44:52 +02:00
Andreas Kling
545d8336b8
LibGfx: Convert Font APIs to return String instead of DeprecatedString
2023-09-06 11:29:03 -04:00
thankyouverycool
57f3b18109
LibGUI+Userland: Remove Toolbar::try_add_{action,separator}()
...
These calls largely occur during initialization before there's
unsaved state worth preserving
2023-08-15 15:56:34 +02:00
Andreas Kling
bd61e75e0b
LibGUI: Remove Window::try_add_menu()
...
And fall back to the infallible add_menu().
2023-08-14 14:57:54 +02:00
Andreas Kling
676ef0cc3d
LibGUI: Make Menu::add_recent_files_list() infallible
2023-08-14 14:57:54 +02:00
Andreas Kling
f2faf2767f
LibGUI: Remove Menu::try_add_action()
...
And fall back to the infallible add_action().
2023-08-14 14:57:54 +02:00
Andreas Kling
eec328e2ab
LibGUI: Remove Menu::try_add_submenu()
...
And fall back to the infallible add_submenu().
2023-08-14 14:57:54 +02:00
Andreas Kling
1525fa3b8f
LibGUI: Remove Menu::try_add_separator()
...
And fall back to the infallible add_separator().
2023-08-14 14:57:54 +02:00
Lucas CHOLLET
3f35ffb648
Userland: Prefer _string
over _short_string
...
As `_string` can't fail anymore (since 3434412
), there are no real
benefits to use the short variant in most cases.
2023-08-08 07:37:21 +02:00
Andreas Kling
34344120f2
AK: Make "foo"_string infallible
...
Stop worrying about tiny OOMs.
Work towards #20405 .
2023-08-07 16:03:27 +02:00
Karol Kosek
5234a30731
LibGUI+Userland: Port Action status tips to String
2023-06-15 13:53:22 +01:00
Karol Kosek
4b169cf25f
LibGUI+Userland: Use action text as a fallback in Action::status_tip()
...
Many applications already do this in their code. This change will simply
move the logic to a single function to stop repeating ourselves!
2023-06-15 13:53:22 +01:00
Karol Kosek
2029750519
LibGUI+Userland: Port StatusBar::text() and set_text functions to String
2023-06-15 13:53:22 +01:00
Karol Kosek
27011cf55d
LibFSAC+Userland: Pass options for FSAC::open_file() using a struct
...
It was rather inconvenient having to specify all arguments if you wanted
to modify only the last one.
2023-06-11 09:40:17 +01:00
thankyouverycool
caa8f43dbe
Applications+Demos+LibGUI: Migrate to fallible WizardDialogs and Pages
...
And port page text to String. Also removes WizardDialog::show() helper
as all current implementations prefer to derive their own Dialog.
2023-06-09 17:21:43 +02:00
thankyouverycool
96e60c98cf
FontEditor: Propagate errors in update_statusbar()
...
Errors are sent only to stderr as they can be spammy
2023-06-09 17:21:43 +02:00
thankyouverycool
fe6b36507f
FontEditor: Check complete mime type on paste_glyphs()
2023-06-09 17:21:43 +02:00
thankyouverycool
02d94a303c
Base+Userland: Apply Human Interface Guidelines to Object text
...
Corrects a slew of titles, buttons, labels, menu items and status bars
for capitalization, ellipses and punctuation.
Rewords a few actions and dialogs to use uniform language and
punctuation.
2023-05-23 05:59:49 +02:00
thankyouverycool
587c44cfbb
FontEditor: Filter files by BitmapFont in FilePicker
2023-05-17 06:47:57 +02:00
thankyouverycool
a62f204b25
FontEditor: Show complete filename in error messages
...
And clean up Save and Open action code style.
2023-05-17 06:47:57 +02:00
thankyouverycool
19b8b9d187
FontEditor: Show recently opened files in File menu
...
And update GlyphEditorWidget on initialize(). Fixes Editor not showing
the new active glyph when loading recent fonts from a menu.
2023-05-17 06:47:57 +02:00
thankyouverycool
c10b1e3aea
FontEditor: Add action text to Undo and Redo
2023-05-17 06:47:57 +02:00
thankyouverycool
7fa8fae786
FontEditor: Allow application to launch without a font
...
Since LibFSAC requires a reified window before loading a font, it
makes sense to have a safe null state for the app.
This lets us stay alive after a failed file request on startup,
handle failure at any point during initialization, and claw back
memory from all our font RefPtrs.
A default startup font or none at all can now be set in FontEditor.ini
2023-05-13 12:53:49 +02:00
thankyouverycool
24046f9adf
FontEditor: Let GlyphEditorWidget initialize a null BitmapFont
...
And remove public reference getters as there is no guarantee they are
nonnull.
2023-05-13 12:53:49 +02:00
thankyouverycool
0ad5e85163
LibGUI+Applications: Let GlyphMapWidget initialize a null Font
...
FontEditor will need to clear references to its mutable font in
the future while CharacterMap has no use for the highlights clone,
so let's convert GlyphMapWidget's set_font wrapper into a separate
initialize function for the editor and stop hiding the base function
for others. Setting font null in either ultimately points the map to
the system's default font.
2023-05-13 12:53:49 +02:00
thankyouverycool
cf4ddd1dcf
FontEditor: Move common restoration work into restore_state()
2023-05-13 12:53:49 +02:00
thankyouverycool
c7eee16292
FontEditor: Use resultant FSAC filename when Saving-as
...
Fixes desync between file and title.
2023-05-13 12:53:49 +02:00
thankyouverycool
a0f160bfc4
FontEditor: Use fallible {Input,Message}Boxes
...
And replace DeprecatedString and fix misnamed argument in show_error()
2023-05-13 12:53:49 +02:00
thankyouverycool
6212e5b1f0
FontEditor: Don't crash on missing icons
...
Instead of crashing on failed icon loading with TRY(), let's report
missing but non-critical resources in detail and gracefully move on.
2023-05-13 12:53:49 +02:00
thankyouverycool
ea8bcb2f30
FontEditor: Rename m_edited_font => m_font and remove getter
...
Pithier and it matches the naming convention used in FontEditor's
child widgets. Since it was never used outside MainWidget and there
will soon be no guarantee that m_font is nonnull, the public
BitmapFont& getter has also been removed.
2023-05-13 12:53:49 +02:00
thankyouverycool
1ee78c40ae
FontEditor: Remove unnecessary call to hide() NewFontDialog
...
This workaround has not been needed since 5c92397
2023-05-13 12:53:49 +02:00
thankyouverycool
e2762d8956
FontEditor: Remove unnecessary setters and getters
...
As these were only used internally, let's simplify things and prevent
potential desync between widget state and saved settings by moving the
logic into their respective actions.
2023-05-13 12:53:49 +02:00
thankyouverycool
e8f2192aca
FontEditor: Remove unnecessary deferred invokes
...
Since moving initialization out of the constructor and recalculating
GlyphMap's content size on range and font changes, these deferrals are
no longer needed.
2023-05-13 12:53:49 +02:00
thankyouverycool
ed3f9347f3
FontEditor: Tighten lambda captures
2023-05-13 12:53:49 +02:00
thankyouverycool
36641187d1
FontEditor: Propagate errors formatting preview text
2023-05-13 12:53:49 +02:00
thankyouverycool
5ec9654477
FontEditor: Propagate errors when loading GML
2023-05-13 12:53:49 +02:00
thankyouverycool
1a30439b11
FontEditor: Port some instances of DeprecatedString
2023-05-13 12:53:49 +02:00
thankyouverycool
0e276e0458
FontEditor: Iterate slope and weight lists by size()
2023-05-13 12:53:49 +02:00
thankyouverycool
2d2133b229
FontEditor: Convert Model lists to Vector<String>
...
And propagate errors while building them.
2023-05-13 12:53:49 +02:00
Caoimhe
5e4d835caf
FontEditor: Use LibFileSystemAccessClient
2023-05-05 16:25:55 +01:00
thankyouverycool
91bafc2653
LibGUI+Userland: Port Labels to String
2023-04-30 05:48:14 +02:00
Tim Ledbetter
05c8aa71f2
Applications: Update man page links for applications
...
This commit updates all application man page links to point to the
Applications subdirectory.
2023-04-25 02:16:48 -06:00
Karol Kosek
51bd9ca037
LibGUI+Userland: Make Menu::*add_submmenu take name using new string
2023-04-19 07:59:54 +02:00
Karol Kosek
969543a847
LibGUI+Userland: Make Window::*add_menu take name using new string
2023-04-19 07:59:54 +02:00
thankyouverycool
bc8b409a3c
FontEditor: Use compact InputBox for Go to Glyph action
2023-04-18 10:05:21 +02:00
thankyouverycool
02a9e5d3f6
LibGUI+Userland: Improve error and font handling for InputBox
...
Adds fallible factories, ports DeprecatedString, and rebuilds the
layout to accomodate system font changes.
2023-04-18 10:05:21 +02:00
MacDue
35612c6a7f
AK+Everywhere: Change URL::path() to serialize_path()
...
This now defaults to serializing the path with percent decoded segments
(which is what all callers expect), but has an option not to. This fixes
`file://` URLs with spaces in their paths.
The name has been changed to serialize_path() path to make it more clear
that this method will generate a new string each call (except for the
cannot_be_a_base_url() case). A few callers have then been updated to
avoid repeatedly calling this function.
2023-04-15 06:37:04 +02:00
Timothy Flynn
4a916cd379
Everywhere: Remove needless copies of Error / ErrorOr instances
...
Either take the underlying objects with release_* methods or move() the
instances around.
2023-02-10 09:08:52 +00:00