diff options
author | thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> | 2022-02-16 10:15:19 -0500 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2022-02-18 07:38:29 -0500 |
commit | cd4c11ebaf370ea15b394c084a87e121d45eb1ae (patch) | |
tree | b1508ecd80d3d1d2e63db23481b9752883baddbb /Userland/Applications | |
parent | 0d29419ed4428ef4866d4c098a327e87c09d7ca2 (diff) | |
download | serenity-cd4c11ebaf370ea15b394c084a87e121d45eb1ae.zip |
FontEditor: Remove listener client
FontEditor was relying on a hack to get notified about i32 config
changes, and scale is not a setting we want updated across all
editor instances, nor do we have any settings that make sense to
monitor universally, so let's remove listener privileges for now.
Diffstat (limited to 'Userland/Applications')
-rw-r--r-- | Userland/Applications/FontEditor/FontEditor.cpp | 12 | ||||
-rw-r--r-- | Userland/Applications/FontEditor/FontEditor.h | 7 | ||||
-rw-r--r-- | Userland/Applications/FontEditor/main.cpp | 1 |
3 files changed, 1 insertions, 19 deletions
diff --git a/Userland/Applications/FontEditor/FontEditor.cpp b/Userland/Applications/FontEditor/FontEditor.cpp index b37352d8c0..1821a2395c 100644 --- a/Userland/Applications/FontEditor/FontEditor.cpp +++ b/Userland/Applications/FontEditor/FontEditor.cpp @@ -803,18 +803,6 @@ void FontEditorWidget::did_resize_glyph_editor() m_left_column_container->set_fixed_width(max(m_glyph_editor_widget->preferred_width(), glyph_toolbars_width)); } -void FontEditorWidget::config_i32_did_change(String const& domain, String const& group, String const& key, i32 value) -{ - if (domain == "FontEditor"sv && group == "GlyphEditor"sv && key == "Scale"sv) { - set_scale(value); - } -} - -void FontEditorWidget::config_string_did_change(String const& domain, String const& group, String const& key, String const& value) -{ - config_i32_did_change(domain, group, key, value.to_int().value_or(10)); -} - void FontEditorWidget::set_scale(i32 scale) { m_glyph_editor_widget->set_scale(scale); diff --git a/Userland/Applications/FontEditor/FontEditor.h b/Userland/Applications/FontEditor/FontEditor.h index 1d013190cb..6bc93599dd 100644 --- a/Userland/Applications/FontEditor/FontEditor.h +++ b/Userland/Applications/FontEditor/FontEditor.h @@ -8,7 +8,6 @@ #pragma once #include "UndoGlyph.h" -#include <LibConfig/Listener.h> #include <LibGUI/ActionGroup.h> #include <LibGUI/FilteringProxyModel.h> #include <LibGUI/GlyphMapWidget.h> @@ -19,8 +18,7 @@ class GlyphEditorWidget; class FontEditorWidget final - : public GUI::Widget - , public Config::Listener { + : public GUI::Widget { C_OBJECT(FontEditorWidget) public: virtual ~FontEditorWidget() override = default; @@ -48,9 +46,6 @@ private: virtual void drop_event(GUI::DropEvent&) override; - virtual void config_i32_did_change(String const& domain, String const& group, String const& key, i32 value) override; - virtual void config_string_did_change(String const& domain, String const& group, String const& key, String const& value) override; - void undo(); void redo(); void did_modify_font(); diff --git a/Userland/Applications/FontEditor/main.cpp b/Userland/Applications/FontEditor/main.cpp index b7a5486dbf..4398dd9ee4 100644 --- a/Userland/Applications/FontEditor/main.cpp +++ b/Userland/Applications/FontEditor/main.cpp @@ -29,7 +29,6 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) TRY(Desktop::Launcher::seal_allowlist()); Config::pledge_domain("FontEditor"); - Config::monitor_domain("FontEditor"); TRY(Core::System::pledge("stdio recvfd sendfd thread rpath cpath wpath")); char const* path = nullptr; |