mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:38:11 +00:00
LibGUI+Userland: Improve error and font handling for InputBox
Adds fallible factories, ports DeprecatedString, and rebuilds the layout to accomodate system font changes.
This commit is contained in:
parent
9c2bcffe83
commit
02a9e5d3f6
19 changed files with 135 additions and 124 deletions
|
@ -223,7 +223,7 @@ void do_create_link(Vector<DeprecatedString> const& selected_file_paths, GUI::Wi
|
|||
|
||||
void do_create_archive(Vector<DeprecatedString> const& selected_file_paths, GUI::Window* window)
|
||||
{
|
||||
DeprecatedString archive_name;
|
||||
String archive_name;
|
||||
if (GUI::InputBox::show(window, archive_name, "Enter name:"sv, "Create Archive"sv) != GUI::InputBox::ExecResult::OK)
|
||||
return;
|
||||
|
||||
|
@ -237,7 +237,7 @@ void do_create_archive(Vector<DeprecatedString> const& selected_file_paths, GUI:
|
|||
path_builder.append(".zip"sv);
|
||||
} else {
|
||||
path_builder.append(archive_name);
|
||||
if (!archive_name.ends_with(".zip"sv))
|
||||
if (!AK::StringUtils::ends_with(archive_name, ".zip"sv, CaseSensitivity::CaseSensitive))
|
||||
path_builder.append(".zip"sv);
|
||||
}
|
||||
auto output_path = path_builder.to_deprecated_string();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue