Commit Graph

42 Commits

Author SHA1 Message Date
Ali Mohammad Pur
5e1499d104 Everywhere: Rename {Deprecated => Byte}String
This commit un-deprecates DeprecatedString, and repurposes it as a byte
string.
As the null state has already been removed, there are no other
particularly hairy blockers in repurposing this type as a byte string
(what it _really_ is).

This commit is auto-generated:
  $ xs=$(ack -l \bDeprecatedString\b\|deprecated_string AK Userland \
    Meta Ports Ladybird Tests Kernel)
  $ perl -pie 's/\bDeprecatedString\b/ByteString/g;
    s/deprecated_string/byte_string/g' $xs
  $ clang-format --style=file -i \
    $(git diff --name-only | grep \.cpp\|\.h)
  $ gn format $(git ls-files '*.gn' '*.gni')
2023-12-17 18:25:10 +03:30
Tim Ledbetter
a6f6a1afd2 Userland: Prefer non-fallible construction for LibGUI objects 2023-09-18 18:00:45 +02:00
kleines Filmröllchen
1e67435ff5 Meta: Rename compile_gml to stringify_gml
This is what this function really does, it doesn't compile anything.
2023-08-11 21:33:48 +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
Karol Kosek
d8bdf26917 MailSettings: Make TLS option checked by default
The window by default showed port 993 with TLS unchecked, which was
slightly misleading as port 993 uses implicit TLS connections and
cleartext is on port 143.

This change also makes it consistent with the Mail app, as its fallback
value is also set to true.
2023-07-12 14:20:29 -04:00
Karol Kosek
b0bd1e5eb5 MailSettings: Convert MailSettingsWidget to a failable factory 2023-06-10 07:19:06 +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
Lucas CHOLLET
1a97382305 LibGUI: Make Application's construction fallible
The pattern to construct `Application` was to use the `try_create`
method from the `C_OBJECT` macro. While being safe from an OOM
perspective, this method doesn't propagate errors from the constructor.
This patch make `Application` use the `C_OBJECT_ABSTRACT` and manually
define a `create` method that can bubble up errors from the
construction stage.

This commit also removes the ability to use `argc` and `argv` to
create an `Application`, only `Main`'s `Arguments` can be used.

From a user point of view, the patch renames `try_create` => `create`,
hence the huge number of modified files.
2023-05-05 16:41:21 +01:00
thankyouverycool
4c9933bfb7 LibGUI: Remove Label icons and replace instances with ImageWidget
These icons are a relic of GLabel and were never implemented to
accomodate both image and text. This convenience can always be added
in the future, but no current instance assumes or needs it, so let's
replace them all with ImageWidget to show clearer intent.
2023-04-30 05:48:14 +02:00
Karol Kosek
446c600d09 LibGUI+Applications: Port SettingsWindow::add_tab() to the new string 2023-03-16 09:58:42 +01:00
Sam Atkins
f0395a2042 LibGUI+Userland: Rename try_load_from_gml() -> load_from_gml() :^)
It's the only one, so the `try` prefix is unnecessary now.
2023-01-07 14:39:30 +01:00
Sam Atkins
54b1326165 Userland: Replace all uses of load_from_gml with try_load_from_gml
MOAR FIXMES! ;^)
2023-01-07 14:39:30 +01:00
Linus Groh
6e19ab2bbc AK+Everywhere: Rename String to DeprecatedString
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-12-06 08:54:33 +01:00
Tim Schumacher
ce2f1b845f Everywhere: Mark dependencies of most targets as PRIVATE
Otherwise, we end up propagating those dependencies into targets that
link against that library, which creates unnecessary link-time
dependencies.

Also included are changes to readd now missing dependencies to tools
that actually need them.
2022-11-01 14:49:09 +00:00
Ali Mohammad Pur
166a905951 Userland: Properly populate GENERATED_SOURCES
We previously put the generated headers in SOURCES, which did not mark
them as GENERATED (and did not produce a proper dependency).
This commit moves all generated headers into GENERATED_SOURCES, and
removes useless header SOURCES.
2022-10-12 15:55:15 +01:00
FrHun
c79e3e5a8b Applications: Make settings outer margins and spacing consistent 2022-07-15 12:34:25 +02:00
sin-ack
3f3f45580a Everywhere: Add sv suffix to strings relying on StringView(char const*)
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-12 23:11:35 +02:00
Sam Atkins
c7d038cc26 MailSettings: Set window modified state 2022-05-12 13:10:49 +02:00
Sam Atkins
5702f016f0 LibGUI+Applications: Add --open-tab option to FooSettings applications
Similar to SystemMonitor's option of the same name, this allows you to
launch the given application with the specific tab open.
2022-04-21 17:24:42 +02:00
Sam Atkins
ded5ba1f87 LibGUI+Applications: Give SettingsWindow tabs a string ID
This gives us a convenient way to refer to them, which will be used in
the following commit.
2022-04-21 17:24:42 +02:00
Vitaly Dyachkov
32b8795091 LibConfig: Rename pledge_domains(String) => pledge_domain(String)
pledge_domains() that takes only one String argument was specifically
added as a shortcut for pledging a single domain. So, it makes sense to
use singular here.
2022-02-11 18:06:39 +01:00
kleines Filmröllchen
6ee597369d Meta+Userland: Run the GML formatter on CI and pre-commit
Now that the GML formatter is both perserving comments and also mostly
agrees to the existing GML style, it can be used to auto-format all the
GML files in the system. This commit does not only contain the scripts
for running the formatting on CI and the pre-commit hook, but also
initially formats all the existing GML files so that the hook is
successfull.
2022-02-07 18:39:50 +01:00
Dylan Katz
362df5b6dd MailSettings: Set icons from GML 2022-01-29 13:45:34 +01:00
Timothy Flynn
0a3b1f6bc8 MailSettings: Use standard text placement for check box text 2022-01-28 13:20:19 +01:00
Sam Atkins
3ca2aee054 Applications: Cast unused smart-pointer TRY return values to void 2021-12-05 15:31:03 +01:00
Andreas Kling
60c132d7d3 LibGUI: Move GUI::SettingsWindow setup out of the constructor
In order to propagate errors that occur during UI setup, we have to move
all that logic out of widget/window subclass constructors. This is a
first attempt at doing that, for GUI::SettingsWindow.
2021-11-28 08:54:22 +01:00
Andreas Kling
45844f9338 LibGUI: Make GUI::SettingsWindow::add_tab() return ErrorOr
This allows us to use TRY() when creating settings UI.
2021-11-28 08:10:53 +01:00
Andreas Kling
8a11e986e5 MailSettings: Port to LibMain :^) 2021-11-28 08:10:53 +01:00
Sam Atkins
fca7924437 MailSettings: Migrate to using SettingsWindow :^) 2021-11-20 21:05:20 +00:00
Andreas Kling
235f39e449 LibGfx: Use ErrorOr<T> for Bitmap::try_load_from_file()
This was used in a lot of places, so this patch makes liberal use of
ErrorOr<T>::release_value_but_fixme_should_propagate_errors().
2021-11-08 00:35:27 +01:00
FrHun
54605794f9 Applications: Remove border from GroupBox margins 2021-11-03 16:13:19 +01:00
Tim Schumacher
7af7fc8c16 Everywhere: Fix more Copyright header inconsistencies 2021-10-04 11:10:09 +01:00
Luke Wilde
ea364af965 MailSettings: Add unveil 2021-08-28 23:29:28 +02:00
Luke Wilde
9e6d8f7c25 MailSettings: Use LibConfig instead of Core::ConfigFile
This also tightens the pledges.
2021-08-28 23:29:28 +02:00
Linus Groh
95751987fb MailSettings: Remove proc and exec from pleges 2021-08-28 11:26:32 +01:00
Linus Groh
c5e5ea71d7 MailSettings: Use the app-mail icon for the window
No app-mail-settings icon exists (yet). app-mail is also what's being
embedded in the executable, so let's stick with it.
2021-08-28 11:22:50 +01:00
networkException
acde7d12b0 Everywhere: Rename get in ConfigFile::get_for_{lib,app,system} to open
This patch brings the ConfigFile helpers for opening lib, app and system
configs more inline with the regular ConfigFile::open functions.
2021-08-22 01:32:25 +02:00
networkException
938051feb8 Everywhere: Use Core::ConfigFile::AllowWriting::Yes to allow writing 2021-08-22 01:32:25 +02:00
sin-ack
e11d177618 Userland+LibGUI: Add shorthand versions of the Margins constructor
This allows for typing [8] instead of [8, 8, 8, 8] to specify the same
margin on all edges, for example. The constructors follow CSS' style of
specifying margins. The added constructors are:

- Margins(int all): Sets the same margin on all edges.
- Margins(int vertical, int horizontal): Sets the first argument to top
  and bottom margins, and the second argument to left and right margins.
- Margins(int top, int vertical, int bottom): Sets the first argument to
  the top margin, the second argument to the left and right margins,
  and the third argument to the bottom margin.
2021-08-18 10:30:50 +02:00
sin-ack
9c9a5c55cb Userland+LibGUI: Make Margins arguments match CSS ordering
Previously the argument order for Margins was (left, top, right,
bottom). To make it more familiar and closer to how CSS does it, the
argument order is now (top, right, bottom, left).
2021-08-18 10:30:50 +02:00
Andreas Kling
67c0a2c5df MailSettings: Use the same app icon as Mail
*Settings applications should use the same icon as the app they manage
the settings for.
2021-07-31 20:09:27 +02:00
Faeliore
8e3431d56d MailSettings: Add basic mail settings dialog
MailSettings: Add a GML file for Mail settings

MailSettings: Add an AF desktop file for Mail Settings

MailSettings: Unveil /res in mail settings, fix GML

MailSettings: Mail settings texteditor->textbox

MailSettings: Update mail username to correct category in settings

Modified Mail settings GML to properly represent ports >100

MailSettings: Update/fix mail settings GML

MailSettings: Adjust GML, add icons for mail settings

MailSettings: Change Okay button to OK

MailSettings: Change mail setting reset button to revert

MailSettings: Fix incorrect variable names in mail settings

MailSettings: Add newlines af EOF of all mail setting files

MailSettings: Mail settings linting issues fixed

MailSettings: Increase size of icon features
Code cleaning/styling changes as per gunnarbeutner review
Made settings descriptions more friendly per sin-ack review

MailSettings: Fixes as per PR comments

MailSettings: Fix checkbox weirdness

MailSettings: Adjust width of checkbox

MailSettings: Remove unneccessary update() call

MailSettings: Replace port SpinBox with ComboBox

MailSettings: Add colons to labels, remove port 110 option

MailSettings: Remove custom model, use ItemListModel

MailSettings: Change relative icon paths to absolute ones
2021-07-30 20:47:31 +02:00