From e0b53e79cb640bbfb8d281238af9f0e02d17403b Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Fri, 4 Apr 2025 07:18:13 +0200 Subject: adw: rename namespace to Adwaita --- .vscode/settings.json | 1 + adw/include/adwaitamm/actionrow.hpp | 10 +++++----- adw/include/adwaitamm/application.hpp | 6 +++--- adw/include/adwaitamm/applicationwindow.hpp | 6 +++--- adw/include/adwaitamm/breakpoint.hpp | 6 +++--- adw/include/adwaitamm/dialog.hpp | 6 +++--- adw/include/adwaitamm/helpers/gobj_mixin.hpp | 4 ++-- adw/include/adwaitamm/helpers/properties.hpp | 4 ++-- adw/include/adwaitamm/preferencesdialog.hpp | 12 ++++++------ adw/include/adwaitamm/preferencespage.hpp | 6 +++--- adw/include/adwaitamm/preferencesrow.hpp | 6 +++--- adw/include/adwaitamm/switchrow.hpp | 10 +++++----- adw/include/adwaitamm/toast.hpp | 6 +++--- adw/include/adwaitamm/toastoverlay.hpp | 6 +++--- adw/include/adwaitamm/wrap_init.hpp | 4 ++-- adw/src/actionrow.cpp | 14 +++++++------- adw/src/application.cpp | 10 +++++----- adw/src/applicationwindow.cpp | 8 ++++---- adw/src/breakpoint.cpp | 12 ++++++------ adw/src/dialog.cpp | 8 ++++---- adw/src/preferencesdialog.cpp | 16 ++++++++-------- adw/src/preferencespage.cpp | 8 ++++---- adw/src/preferencesrow.cpp | 8 ++++---- adw/src/switchrow.cpp | 14 +++++++------- adw/src/toast.cpp | 8 ++++---- adw/src/toastoverlay.cpp | 8 ++++---- adw/src/wrap_init.cpp | 4 ++-- app/src/main.cpp | 4 ++-- ui/include/turns/ui/widgets/preferences.hpp | 4 ++-- ui/include/turns/ui/windows/participant_editor.hpp | 2 +- ui/include/turns/ui/windows/tracker.hpp | 4 ++-- ui/src/widgets/preferences.cpp | 2 +- ui/src/windows/participant_editor.cpp | 2 +- ui/src/windows/tracker.cpp | 6 +++--- ui/src/windows/tracker/actions.cpp | 2 +- ui/tests/gtk_test_init.cpp | 2 +- 36 files changed, 120 insertions(+), 119 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index bce475b..7d2f134 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,6 +6,7 @@ "cSpell.words": [ "activatable", + "Adwaita", "arknet", "gclass", "gobj", diff --git a/adw/include/adwaitamm/actionrow.hpp b/adw/include/adwaitamm/actionrow.hpp index 1859048..c7ff6c2 100644 --- a/adw/include/adwaitamm/actionrow.hpp +++ b/adw/include/adwaitamm/actionrow.hpp @@ -19,9 +19,9 @@ using AdwActionRow = struct _AdwActionRow; using AdwActionRowClass = struct _AdwActionRowClass; -namespace turns::adw +namespace Adwaita { - struct ActionRow : adw::PreferencesRow, + struct ActionRow : PreferencesRow, helpers::gobj_mixin { struct Class : Glib::Class @@ -29,7 +29,7 @@ namespace turns::adw using BaseClassParent = AdwPreferencesRowClass; using BaseClassType = AdwActionRowClass; using BaseObjectType = AdwActionRow; - using CppClassParent = adw::PreferencesRow::Class; + using CppClassParent = PreferencesRow::Class; using CppObjectType = ActionRow; auto init() -> Glib::Class const &; @@ -85,11 +85,11 @@ namespace turns::adw explicit ActionRow(BaseObjectType * gobj); }; -} // namespace turns::adw +} // namespace Adwaita namespace Glib { - auto wrap(AdwActionRow * object, bool copy = false) -> turns::adw::ActionRow *; + auto wrap(AdwActionRow * object, bool copy = false) -> Adwaita::ActionRow *; } // namespace Glib #endif \ No newline at end of file diff --git a/adw/include/adwaitamm/application.hpp b/adw/include/adwaitamm/application.hpp index 18f703d..5242d50 100644 --- a/adw/include/adwaitamm/application.hpp +++ b/adw/include/adwaitamm/application.hpp @@ -14,7 +14,7 @@ using AdwApplication = struct _AdwApplication; using AdwApplicationClass = struct _AdwApplicationClass; -namespace turns::adw +namespace Adwaita { struct Application : Gtk::Application, helpers::gobj_mixin @@ -60,11 +60,11 @@ namespace turns::adw private: Glib::Class const & custom_class_init(); }; -} // namespace turns::adw +} // namespace Adwaita namespace Glib { - auto wrap(AdwApplication * object, bool copy = false) -> Glib::RefPtr; + auto wrap(AdwApplication * object, bool copy = false) -> Glib::RefPtr; } // namespace Glib #endif \ No newline at end of file diff --git a/adw/include/adwaitamm/applicationwindow.hpp b/adw/include/adwaitamm/applicationwindow.hpp index a8175df..310795e 100644 --- a/adw/include/adwaitamm/applicationwindow.hpp +++ b/adw/include/adwaitamm/applicationwindow.hpp @@ -14,7 +14,7 @@ using AdwApplicationWindow = struct _AdwApplicationWindow; using AdwApplicationWindowClass = struct _AdwApplicationWindowClass; -namespace turns::adw +namespace Adwaita { struct ApplicationWindow : Gtk::ApplicationWindow, helpers::gobj_mixin @@ -54,11 +54,11 @@ namespace turns::adw explicit ApplicationWindow(Glib::ConstructParams const & params); explicit ApplicationWindow(BaseObjectType * gobj); }; -} // namespace turns::adw +} // namespace Adwaita namespace Glib { - auto wrap(AdwApplicationWindow * object, bool copy = false) -> turns::adw::ApplicationWindow *; + auto wrap(AdwApplicationWindow * object, bool copy = false) -> Adwaita::ApplicationWindow *; } // namespace Glib #endif \ No newline at end of file diff --git a/adw/include/adwaitamm/breakpoint.hpp b/adw/include/adwaitamm/breakpoint.hpp index 8a78abb..db17d27 100644 --- a/adw/include/adwaitamm/breakpoint.hpp +++ b/adw/include/adwaitamm/breakpoint.hpp @@ -19,7 +19,7 @@ #include #undef _ADWAITA_INSIDE -namespace turns::adw +namespace Adwaita { struct BreakpointCondition { @@ -102,11 +102,11 @@ namespace turns::adw explicit Breakpoint(BaseObjectType * gobj); }; -} // namespace turns::adw +} // namespace Adwaita namespace Glib { - auto wrap(AdwBreakpoint * object, bool copy = false) -> Glib::RefPtr; + auto wrap(AdwBreakpoint * object, bool copy = false) -> Glib::RefPtr; } // namespace Glib diff --git a/adw/include/adwaitamm/dialog.hpp b/adw/include/adwaitamm/dialog.hpp index 5be01b9..23a864c 100644 --- a/adw/include/adwaitamm/dialog.hpp +++ b/adw/include/adwaitamm/dialog.hpp @@ -17,7 +17,7 @@ using AdwDialog = struct _AdwDialog; using AdwDialogClass = struct _AdwDialogClass; -namespace turns::adw +namespace Adwaita { struct Dialog_Class; @@ -72,11 +72,11 @@ namespace turns::adw explicit Dialog(Glib::ConstructParams const & params); explicit Dialog(BaseObjectType * gobj); }; -} // namespace turns::adw +} // namespace Adwaita namespace Glib { - auto wrap(AdwDialog * object, bool copy = false) -> turns::adw::Dialog *; + auto wrap(AdwDialog * object, bool copy = false) -> Adwaita::Dialog *; } // namespace Glib #endif \ No newline at end of file diff --git a/adw/include/adwaitamm/helpers/gobj_mixin.hpp b/adw/include/adwaitamm/helpers/gobj_mixin.hpp index 2a6aa37..fbdaa4e 100644 --- a/adw/include/adwaitamm/helpers/gobj_mixin.hpp +++ b/adw/include/adwaitamm/helpers/gobj_mixin.hpp @@ -5,7 +5,7 @@ #include -namespace turns::adw::helpers +namespace Adwaita::helpers { template @@ -32,6 +32,6 @@ namespace turns::adw::helpers } }; -} // namespace turns::adw::helpers +} // namespace Adwaita::helpers #endif \ No newline at end of file diff --git a/adw/include/adwaitamm/helpers/properties.hpp b/adw/include/adwaitamm/helpers/properties.hpp index 6a7f7aa..fad99d6 100644 --- a/adw/include/adwaitamm/helpers/properties.hpp +++ b/adw/include/adwaitamm/helpers/properties.hpp @@ -6,7 +6,7 @@ #include -namespace turns::adw::helpers +namespace Adwaita::helpers { template @@ -30,6 +30,6 @@ namespace turns::adw::helpers return deduced_property_proxy_t>{&object, property}; } -} // namespace turns::adw::helpers +} // namespace Adwaita::helpers #endif \ No newline at end of file diff --git a/adw/include/adwaitamm/preferencesdialog.hpp b/adw/include/adwaitamm/preferencesdialog.hpp index d57e015..824a683 100644 --- a/adw/include/adwaitamm/preferencesdialog.hpp +++ b/adw/include/adwaitamm/preferencesdialog.hpp @@ -18,11 +18,11 @@ using AdwPreferencesDialog = struct _AdwPreferencesDialog; using AdwPreferencesDialogClass = struct _AdwPreferencesDialogClass; -namespace turns::adw +namespace Adwaita { struct PreferencesDialog_Class; - struct PreferencesDialog : adw::Dialog, + struct PreferencesDialog : Dialog, helpers::gobj_mixin { struct Class : Glib::Class @@ -30,7 +30,7 @@ namespace turns::adw using BaseClassParent = AdwDialogClass; using BaseClassType = AdwPreferencesDialogClass; using BaseObjectType = AdwPreferencesDialog; - using CppClassParent = adw::Dialog::Class; + using CppClassParent = Dialog::Class; using CppObjectType = PreferencesDialog; auto init() -> Glib::Class const &; @@ -56,17 +56,17 @@ namespace turns::adw auto static get_type() -> GType; auto static get_base_type() -> GType; - auto add(adw::PreferencesPage & page) -> void; + auto add(PreferencesPage & page) -> void; protected: explicit PreferencesDialog(Glib::ConstructParams const & params); explicit PreferencesDialog(BaseObjectType * gobj); }; -} // namespace turns::adw +} // namespace Adwaita namespace Glib { - auto wrap(AdwPreferencesDialog * object, bool copy = false) -> turns::adw::PreferencesDialog *; + auto wrap(AdwPreferencesDialog * object, bool copy = false) -> Adwaita::PreferencesDialog *; } // namespace Glib #endif \ No newline at end of file diff --git a/adw/include/adwaitamm/preferencespage.hpp b/adw/include/adwaitamm/preferencespage.hpp index d6c4ca4..7e7e9ed 100644 --- a/adw/include/adwaitamm/preferencespage.hpp +++ b/adw/include/adwaitamm/preferencespage.hpp @@ -16,7 +16,7 @@ using AdwPreferencesPage = struct _AdwPreferencesPage; using AdwPreferencesPageClass = struct _AdwPreferencesPageClass; -namespace turns::adw +namespace Adwaita { struct PreferencesPage : Gtk::Widget, helpers::gobj_mixin @@ -56,11 +56,11 @@ namespace turns::adw explicit PreferencesPage(Glib::ConstructParams const & params); explicit PreferencesPage(BaseObjectType * gobj); }; -} // namespace turns::adw +} // namespace Adwaita namespace Glib { - auto wrap(AdwPreferencesPage * object, bool copy = false) -> turns::adw::PreferencesPage *; + auto wrap(AdwPreferencesPage * object, bool copy = false) -> Adwaita::PreferencesPage *; } // namespace Glib #endif \ No newline at end of file diff --git a/adw/include/adwaitamm/preferencesrow.hpp b/adw/include/adwaitamm/preferencesrow.hpp index f98e125..b4fde1e 100644 --- a/adw/include/adwaitamm/preferencesrow.hpp +++ b/adw/include/adwaitamm/preferencesrow.hpp @@ -17,7 +17,7 @@ using AdwPreferencesRow = struct _AdwPreferencesRow; using AdwPreferencesRowClass = struct _AdwPreferencesRowClass; -namespace turns::adw +namespace Adwaita { struct PreferencesRow : Gtk::ListBoxRow, helpers::gobj_mixin @@ -113,11 +113,11 @@ namespace turns::adw return helpers::make_property_proxy(self, "use-underline"); } -} // namespace turns::adw +} // namespace Adwaita namespace Glib { - auto wrap(AdwPreferencesRow * object, bool copy = false) -> turns::adw::PreferencesRow *; + auto wrap(AdwPreferencesRow * object, bool copy = false) -> Adwaita::PreferencesRow *; } // namespace Glib #endif \ No newline at end of file diff --git a/adw/include/adwaitamm/switchrow.hpp b/adw/include/adwaitamm/switchrow.hpp index c13d534..37e2e05 100644 --- a/adw/include/adwaitamm/switchrow.hpp +++ b/adw/include/adwaitamm/switchrow.hpp @@ -21,9 +21,9 @@ using AdwSwitchRow = struct _AdwSwitchRow; -namespace turns::adw +namespace Adwaita { - struct SwitchRow final : adw::ActionRow, + struct SwitchRow final : ActionRow, helpers::gobj_mixin { struct Class : Glib::Class @@ -31,7 +31,7 @@ namespace turns::adw using BaseClassParent = AdwActionRowClass; using BaseClassType = AdwSwitchRowClass; using BaseObjectType = AdwSwitchRow; - using CppClassParent = adw::ActionRow::Class; + using CppClassParent = ActionRow::Class; using CppObjectType = SwitchRow; auto init() -> Glib::Class const &; @@ -78,11 +78,11 @@ namespace turns::adw return helpers::make_property_proxy(self, "active"); } -} // namespace turns::adw +} // namespace Adwaita namespace Glib { - auto wrap(AdwSwitchRow * object, bool copy = false) -> turns::adw::SwitchRow *; + auto wrap(AdwSwitchRow * object, bool copy = false) -> Adwaita::SwitchRow *; } // namespace Glib #endif \ No newline at end of file diff --git a/adw/include/adwaitamm/toast.hpp b/adw/include/adwaitamm/toast.hpp index 88460f9..4f69c1e 100644 --- a/adw/include/adwaitamm/toast.hpp +++ b/adw/include/adwaitamm/toast.hpp @@ -22,7 +22,7 @@ using AdwToast = struct _AdwToast; -namespace turns::adw +namespace Adwaita { struct Toast final : Glib::Object, helpers::gobj_mixin @@ -101,11 +101,11 @@ namespace turns::adw explicit Toast(BaseObjectType * gobj); }; -} // namespace turns::adw +} // namespace Adwaita namespace Glib { - auto wrap(AdwToast * object, bool copy = false) -> Glib::RefPtr; + auto wrap(AdwToast * object, bool copy = false) -> Glib::RefPtr; } // namespace Glib #endif \ No newline at end of file diff --git a/adw/include/adwaitamm/toastoverlay.hpp b/adw/include/adwaitamm/toastoverlay.hpp index 0ae8bcb..f4d54cb 100644 --- a/adw/include/adwaitamm/toastoverlay.hpp +++ b/adw/include/adwaitamm/toastoverlay.hpp @@ -17,7 +17,7 @@ #include #undef _ADWAITA_INSIDE -namespace turns::adw +namespace Adwaita { struct ToastOverlay final : Gtk::Widget, helpers::gobj_mixin @@ -67,11 +67,11 @@ namespace turns::adw return helpers::make_property_proxy(self, "child"); } -} // namespace turns::adw +} // namespace Adwaita namespace Glib { - auto wrap(AdwToastOverlay * object, bool copy = false) -> turns::adw::ToastOverlay *; + auto wrap(AdwToastOverlay * object, bool copy = false) -> Adwaita::ToastOverlay *; } // namespace Glib #endif \ No newline at end of file diff --git a/adw/include/adwaitamm/wrap_init.hpp b/adw/include/adwaitamm/wrap_init.hpp index 0e22a9b..98e40c3 100644 --- a/adw/include/adwaitamm/wrap_init.hpp +++ b/adw/include/adwaitamm/wrap_init.hpp @@ -1,9 +1,9 @@ #ifndef LIBADWAITAMM_WRAP_INIT_HPP #define LIBADWAITAMM_WRAP_INIT_HPP -namespace turns::adw +namespace Adwaita { auto wrap_init() -> void; -} // namespace turns::adw +} // namespace Adwaita #endif \ No newline at end of file diff --git a/adw/src/actionrow.cpp b/adw/src/actionrow.cpp index 48cee23..186cff8 100644 --- a/adw/src/actionrow.cpp +++ b/adw/src/actionrow.cpp @@ -23,7 +23,7 @@ #include #include -namespace turns::adw +namespace Adwaita { namespace { @@ -63,17 +63,17 @@ namespace turns::adw ActionRow::ActionRow() : Glib::ObjectBase{nullptr} - , adw::PreferencesRow{Glib::ConstructParams{_class.init()}} + , PreferencesRow{Glib::ConstructParams{_class.init()}} { } ActionRow::ActionRow(Glib::ConstructParams const & params) - : adw::PreferencesRow{params} + : PreferencesRow{params} { } ActionRow::ActionRow(BaseObjectType * gobj) - : adw::PreferencesRow(ADW_PREFERENCES_ROW(gobj)) + : PreferencesRow(ADW_PREFERENCES_ROW(gobj)) { } @@ -197,12 +197,12 @@ namespace turns::adw return *this; } -} // namespace turns::adw +} // namespace Adwaita namespace Glib { - auto wrap(AdwActionRow * object, bool copy) -> turns::adw::ActionRow * + auto wrap(AdwActionRow * object, bool copy) -> Adwaita::ActionRow * { - return dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy)); + return dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy)); } } // namespace Glib \ No newline at end of file diff --git a/adw/src/application.cpp b/adw/src/application.cpp index 5da1a5c..57a0aaa 100644 --- a/adw/src/application.cpp +++ b/adw/src/application.cpp @@ -19,7 +19,7 @@ #include #include -namespace turns::adw +namespace Adwaita { namespace { @@ -69,7 +69,7 @@ namespace turns::adw if (!did_init) { Gtk::init_gtkmm_internals(); - adw::wrap_init(); + wrap_init(); } return _class.init(); @@ -92,12 +92,12 @@ namespace turns::adw adw_init(); } -} // namespace turns::adw +} // namespace Adwaita namespace Glib { - auto wrap(AdwApplication * object, bool copy) -> Glib::RefPtr + auto wrap(AdwApplication * object, bool copy) -> Glib::RefPtr { - return Glib::make_refptr_for_instance(dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy))); + return Glib::make_refptr_for_instance(dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy))); } } // namespace Glib \ No newline at end of file diff --git a/adw/src/applicationwindow.cpp b/adw/src/applicationwindow.cpp index 4e1aff1..f4de581 100644 --- a/adw/src/applicationwindow.cpp +++ b/adw/src/applicationwindow.cpp @@ -18,7 +18,7 @@ #include #include -namespace turns::adw +namespace Adwaita { namespace { @@ -72,12 +72,12 @@ namespace turns::adw { } -} // namespace turns::adw +} // namespace Adwaita namespace Glib { - auto wrap(AdwApplicationWindow * object, bool copy) -> turns::adw::ApplicationWindow * + auto wrap(AdwApplicationWindow * object, bool copy) -> Adwaita::ApplicationWindow * { - return dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy)); + return dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy)); } } // namespace Glib \ No newline at end of file diff --git a/adw/src/breakpoint.cpp b/adw/src/breakpoint.cpp index 4a9c4d5..a34fcf7 100644 --- a/adw/src/breakpoint.cpp +++ b/adw/src/breakpoint.cpp @@ -17,7 +17,7 @@ #include #include -namespace turns::adw +namespace Adwaita { static_assert(static_cast(BreakpointCondition::LengthType::min_width) == ADW_BREAKPOINT_CONDITION_MIN_WIDTH); @@ -89,9 +89,9 @@ namespace turns::adw return std::nullopt; } -} // namespace turns::adw +} // namespace Adwaita -namespace turns::adw +namespace Adwaita { namespace { @@ -156,12 +156,12 @@ namespace turns::adw return helpers::make_property_proxy(*this, "condition"); } -} // namespace turns::adw +} // namespace Adwaita namespace Glib { - auto wrap(AdwBreakpoint * object, bool copy) -> Glib::RefPtr + auto wrap(AdwBreakpoint * object, bool copy) -> Glib::RefPtr { - return Glib::make_refptr_for_instance(dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy))); + return Glib::make_refptr_for_instance(dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy))); } } // namespace Glib diff --git a/adw/src/dialog.cpp b/adw/src/dialog.cpp index f9fe48f..2634002 100644 --- a/adw/src/dialog.cpp +++ b/adw/src/dialog.cpp @@ -19,7 +19,7 @@ #include #include -namespace turns::adw +namespace Adwaita { namespace @@ -135,12 +135,12 @@ namespace turns::adw adw_dialog_set_title(Glib::unwrap(this), Glib::c_str_or_nullptr(str)); } -} // namespace turns::adw +} // namespace Adwaita namespace Glib { - auto wrap(AdwDialog * object, bool copy) -> turns::adw::Dialog * + auto wrap(AdwDialog * object, bool copy) -> Adwaita::Dialog * { - return dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy)); + return dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy)); } } // namespace Glib \ No newline at end of file diff --git a/adw/src/preferencesdialog.cpp b/adw/src/preferencesdialog.cpp index 701b253..2282419 100644 --- a/adw/src/preferencesdialog.cpp +++ b/adw/src/preferencesdialog.cpp @@ -20,7 +20,7 @@ #include #include -namespace turns::adw +namespace Adwaita { namespace { @@ -59,32 +59,32 @@ namespace turns::adw } PreferencesDialog::PreferencesDialog(Glib::ConstructParams const & params) - : adw::Dialog{params} + : Dialog{params} { } PreferencesDialog::PreferencesDialog(AdwPreferencesDialog * gobj) - : adw::Dialog(ADW_DIALOG(gobj)) + : Dialog(ADW_DIALOG(gobj)) { } PreferencesDialog::PreferencesDialog() : Glib::ObjectBase{nullptr} - , adw::Dialog{Glib::ConstructParams{_class.init()}} + , Dialog{Glib::ConstructParams{_class.init()}} { } - auto PreferencesDialog::add(adw::PreferencesPage & page) -> void + auto PreferencesDialog::add(PreferencesPage & page) -> void { adw_preferences_dialog_add(Glib::unwrap(this), Glib::unwrap(&page)); } -} // namespace turns::adw +} // namespace Adwaita namespace Glib { - auto wrap(AdwPreferencesDialog * object, bool copy) -> turns::adw::PreferencesDialog * + auto wrap(AdwPreferencesDialog * object, bool copy) -> Adwaita::PreferencesDialog * { - return dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy)); + return dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy)); } } // namespace Glib \ No newline at end of file diff --git a/adw/src/preferencespage.cpp b/adw/src/preferencespage.cpp index 22ab639..e2b3e80 100644 --- a/adw/src/preferencespage.cpp +++ b/adw/src/preferencespage.cpp @@ -17,7 +17,7 @@ #include #include -namespace turns::adw +namespace Adwaita { namespace { @@ -71,12 +71,12 @@ namespace turns::adw { } -} // namespace turns::adw +} // namespace Adwaita namespace Glib { - auto wrap(AdwPreferencesPage * object, bool copy) -> turns::adw::PreferencesPage * + auto wrap(AdwPreferencesPage * object, bool copy) -> Adwaita::PreferencesPage * { - return dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy)); + return dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy)); } } // namespace Glib \ No newline at end of file diff --git a/adw/src/preferencesrow.cpp b/adw/src/preferencesrow.cpp index 7bc330a..a586027 100644 --- a/adw/src/preferencesrow.cpp +++ b/adw/src/preferencesrow.cpp @@ -17,7 +17,7 @@ #include #include -namespace turns::adw +namespace Adwaita { namespace { @@ -95,12 +95,12 @@ namespace turns::adw { } -} // namespace turns::adw +} // namespace Adwaita namespace Glib { - auto wrap(AdwPreferencesRow * object, bool copy) -> turns::adw::PreferencesRow * + auto wrap(AdwPreferencesRow * object, bool copy) -> Adwaita::PreferencesRow * { - return dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy)); + return dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy)); } } // namespace Glib \ No newline at end of file diff --git a/adw/src/switchrow.cpp b/adw/src/switchrow.cpp index 6596748..0aab454 100644 --- a/adw/src/switchrow.cpp +++ b/adw/src/switchrow.cpp @@ -14,7 +14,7 @@ #include #include -namespace turns::adw +namespace Adwaita { namespace { @@ -44,7 +44,7 @@ namespace turns::adw SwitchRow::SwitchRow() : Glib::ObjectBase{nullptr} - , adw::ActionRow{Glib::ConstructParams{_class.init()}} + , ActionRow{Glib::ConstructParams{_class.init()}} { } @@ -59,21 +59,21 @@ namespace turns::adw } SwitchRow::SwitchRow(Glib::ConstructParams const & params) - : adw::ActionRow{params} + : ActionRow{params} { } SwitchRow::SwitchRow(BaseObjectType * gobj) - : adw::ActionRow(ADW_ACTION_ROW(gobj)) + : ActionRow(ADW_ACTION_ROW(gobj)) { } -} // namespace turns::adw +} // namespace Adwaita namespace Glib { - auto wrap(AdwSwitchRow * object, bool copy) -> turns::adw::SwitchRow * + auto wrap(AdwSwitchRow * object, bool copy) -> Adwaita::SwitchRow * { - return dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy)); + return dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy)); } } // namespace Glib \ No newline at end of file diff --git a/adw/src/toast.cpp b/adw/src/toast.cpp index 31b089e..9ec0a5b 100644 --- a/adw/src/toast.cpp +++ b/adw/src/toast.cpp @@ -21,7 +21,7 @@ #include #include -namespace turns::adw +namespace Adwaita { static_assert(static_cast(Toast::Priority::NORMAL) == ADW_TOAST_PRIORITY_NORMAL); static_assert(static_cast(Toast::Priority::HIGH) == ADW_TOAST_PRIORITY_HIGH); @@ -233,12 +233,12 @@ namespace turns::adw return Glib::SignalProxy{this, &Toast_signal_dismissed_info}; } -} // namespace turns::adw +} // namespace Adwaita namespace Glib { - auto wrap(AdwToast * object, bool copy) -> Glib::RefPtr + auto wrap(AdwToast * object, bool copy) -> Glib::RefPtr { - return Glib::make_refptr_for_instance(dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy))); + return Glib::make_refptr_for_instance(dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy))); } } // namespace Glib \ No newline at end of file diff --git a/adw/src/toastoverlay.cpp b/adw/src/toastoverlay.cpp index 4d7e9db..af24649 100644 --- a/adw/src/toastoverlay.cpp +++ b/adw/src/toastoverlay.cpp @@ -20,7 +20,7 @@ #include #include -namespace turns::adw +namespace Adwaita { namespace { @@ -80,12 +80,12 @@ namespace turns::adw { } -} // namespace turns::adw +} // namespace Adwaita namespace Glib { - auto wrap(AdwToastOverlay * object, bool copy) -> turns::adw::ToastOverlay * + auto wrap(AdwToastOverlay * object, bool copy) -> Adwaita::ToastOverlay * { - return dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy)); + return dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy)); } } // namespace Glib \ No newline at end of file diff --git a/adw/src/wrap_init.cpp b/adw/src/wrap_init.cpp index 038d369..b48ecd0 100644 --- a/adw/src/wrap_init.cpp +++ b/adw/src/wrap_init.cpp @@ -20,7 +20,7 @@ #define WRAP_CLASS(Name, name) Glib::wrap_register(adw_##name##_get_type(), &Name::Class::wrap_new) #define ENSURE_TYPE(Name) g_type_ensure(Name::get_type()) -namespace turns::adw +namespace Adwaita { auto wrap_init() -> void { @@ -48,4 +48,4 @@ namespace turns::adw ENSURE_TYPE(Toast); ENSURE_TYPE(ToastOverlay); } -} // namespace turns::adw \ No newline at end of file +} // namespace Adwaita \ No newline at end of file diff --git a/app/src/main.cpp b/app/src/main.cpp index 3189900..f86eee3 100644 --- a/app/src/main.cpp +++ b/app/src/main.cpp @@ -37,7 +37,7 @@ auto main(int argc, char * argv[]) -> int bind_textdomain_codeset("turns", "UTF-8"); textdomain("turns"); - auto app = turns::adw::Application::create("ch.arknet.Turns", Gio::Application::Flags::HANDLES_OPEN); + auto app = Adwaita::Application::create("ch.arknet.Turns", Gio::Application::Flags::HANDLES_OPEN); auto builder = Gtk::Builder::create_from_resource("/windows/tracker.ui"); auto settings = turns::core::get_settings(); @@ -48,7 +48,7 @@ auto main(int argc, char * argv[]) -> int auto style_manager = adw_style_manager_get_default(); adw_style_manager_set_color_scheme(style_manager, ADW_COLOR_SCHEME_PREFER_LIGHT); - app->add_action("quit", sigc::mem_fun(*app, &turns::adw::Application::quit)); + app->add_action("quit", sigc::mem_fun(*app, &Adwaita::Application::quit)); app->set_accel_for_action("app.quit", "q"); app->set_accel_for_action("win.clear", "x"); app->set_accel_for_action("win.next", "space"); diff --git a/ui/include/turns/ui/widgets/preferences.hpp b/ui/include/turns/ui/widgets/preferences.hpp index 1768d30..2a56f0b 100644 --- a/ui/include/turns/ui/widgets/preferences.hpp +++ b/ui/include/turns/ui/widgets/preferences.hpp @@ -18,7 +18,7 @@ namespace turns::ui::widgets { - struct preferences : template_widget + struct preferences : template_widget { auto constexpr inline static children = std::array{ @@ -46,7 +46,7 @@ namespace turns::ui::widgets Gtk::ColorDialogButton * m_friendly_color_button{}; Gtk::ColorDialogButton * m_hostile_color_button{}; Gtk::ColorDialogButton * m_secret_color_button{}; - adw::SwitchRow * m_skip_defeated{}; + Adwaita::SwitchRow * m_skip_defeated{}; }; } // namespace turns::ui::widgets diff --git a/ui/include/turns/ui/windows/participant_editor.hpp b/ui/include/turns/ui/windows/participant_editor.hpp index a62e58a..fb80594 100644 --- a/ui/include/turns/ui/windows/participant_editor.hpp +++ b/ui/include/turns/ui/windows/participant_editor.hpp @@ -22,7 +22,7 @@ namespace turns::ui::windows { - struct participant_editor : adw::Dialog + struct participant_editor : Adwaita::Dialog { using signal_finished_type = sigc::signal; diff --git a/ui/include/turns/ui/windows/tracker.hpp b/ui/include/turns/ui/windows/tracker.hpp index bce7a22..be4019e 100644 --- a/ui/include/turns/ui/windows/tracker.hpp +++ b/ui/include/turns/ui/windows/tracker.hpp @@ -33,7 +33,7 @@ namespace turns::ui::windows { - struct tracker : adw::ApplicationWindow + struct tracker : Adwaita::ApplicationWindow { tracker(BaseObjectType * base, Glib::RefPtr const builder, Glib::RefPtr settings); @@ -69,7 +69,7 @@ namespace turns::ui::windows Gtk::Revealer * m_controls; Gtk::Widget * m_empty; - adw::ToastOverlay * m_overlay; + Adwaita::ToastOverlay * m_overlay; Gtk::Stack * m_stack; Gtk::Button * m_start; Gtk::Widget * m_title; diff --git a/ui/src/widgets/preferences.cpp b/ui/src/widgets/preferences.cpp index 7032423..e9dde1e 100644 --- a/ui/src/widgets/preferences.cpp +++ b/ui/src/widgets/preferences.cpp @@ -41,7 +41,7 @@ namespace turns::ui::widgets , m_friendly_color_button{get_widget("friendly_color_button")} , m_hostile_color_button{get_widget("hostile_color_button")} , m_secret_color_button{get_widget("secret_color_button")} - , m_skip_defeated{get_widget("skip_defeated")} + , m_skip_defeated{get_widget("skip_defeated")} { if (!m_settings) { diff --git a/ui/src/windows/participant_editor.cpp b/ui/src/windows/participant_editor.cpp index 9afb15c..7cfe766 100644 --- a/ui/src/windows/participant_editor.cpp +++ b/ui/src/windows/participant_editor.cpp @@ -36,7 +36,7 @@ namespace turns::ui::windows { participant_editor::participant_editor(BaseObjectType * base, Glib::RefPtr const builder, Glib::RefPtr obj) - : adw::Dialog{base} + : Dialog{base} , m_disposition{ADW_COMBO_ROW(Glib::unwrap(builder->get_widget("disposition")))} , m_finish{builder->get_widget("finish")} , m_name{ADW_ENTRY_ROW(Glib::unwrap(builder->get_widget("name")))} diff --git a/ui/src/windows/tracker.cpp b/ui/src/windows/tracker.cpp index cf7ea44..71ad630 100644 --- a/ui/src/windows/tracker.cpp +++ b/ui/src/windows/tracker.cpp @@ -48,10 +48,10 @@ namespace turns::ui::windows { tracker::tracker(BaseObjectType * base, Glib::RefPtr const builder, Glib::RefPtr settings) - : adw::ApplicationWindow{base} + : ApplicationWindow{base} , m_controls{builder->get_widget("controls")} , m_empty{builder->get_widget("empty")} - , m_overlay{builder->get_widget("overlay")} + , m_overlay{builder->get_widget("overlay")} , m_stack{builder->get_widget("stack")} , m_start{builder->get_widget("start")} , m_title{builder->get_widget("title")} @@ -197,7 +197,7 @@ namespace turns::ui::windows auto tracker::show_toast(std::string const & message) -> void { - m_overlay->add(adw::Toast::create(message)); + m_overlay->add(Adwaita::Toast::create(message)); } auto tracker::update_colors() -> void diff --git a/ui/src/windows/tracker/actions.cpp b/ui/src/windows/tracker/actions.cpp index 80a7ea7..3fcf448 100644 --- a/ui/src/windows/tracker/actions.cpp +++ b/ui/src/windows/tracker/actions.cpp @@ -97,7 +97,7 @@ namespace turns::ui::windows auto tracker::preferences() -> void { auto preferences = Gtk::make_managed(m_settings); - auto dialog = Gtk::make_managed(); + auto dialog = Gtk::make_managed(); dialog->add(*preferences); adw_preferences_dialog_set_visible_page(Glib::unwrap(dialog), Glib::unwrap(preferences)); dialog->present(this); diff --git a/ui/tests/gtk_test_init.cpp b/ui/tests/gtk_test_init.cpp index bed2ca5..d6cbb4e 100644 --- a/ui/tests/gtk_test_init.cpp +++ b/ui/tests/gtk_test_init.cpp @@ -30,7 +30,7 @@ namespace turns::ui::tests textdomain("turns"); Gtk::init_gtkmm_internals(); - turns::adw::wrap_init(); + Adwaita::wrap_init(); core::register_types(); ui::register_types(); -- cgit v1.2.3