Get rid of glibmm

This commit is contained in:
Ilya Fedin 2024-03-13 12:46:12 +04:00 committed by John Preston
parent 6bce493029
commit a1a6676eab

View file

@ -14,8 +14,6 @@
#include "base/platform/linux/base_linux_xsettings.h" #include "base/platform/linux/base_linux_xsettings.h"
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION #endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
#include <glibmm.h>
namespace Ui { namespace Ui {
namespace Platform { namespace Platform {
namespace internal { namespace internal {
@ -108,9 +106,7 @@ TitleControls::Layout TitleControlsLayout() {
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION #endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
const auto portalResult = []() -> std::optional<TitleControls::Layout> { const auto portalResult = []() -> std::optional<TitleControls::Layout> {
namespace XDP = base::Platform::XDP; auto decorationLayout = base::Platform::XDP::ReadSetting(
const auto decorationLayout = XDP::ReadSetting<Glib::ustring>(
"org.gnome.desktop.wm.preferences", "org.gnome.desktop.wm.preferences",
"button-layout"); "button-layout");
@ -119,7 +115,7 @@ TitleControls::Layout TitleControlsLayout() {
} }
return GtkKeywordsToTitleControlsLayout( return GtkKeywordsToTitleControlsLayout(
QString::fromStdString(*decorationLayout)); QString::fromStdString(decorationLayout->get_string(nullptr)));
}(); }();
if (portalResult.has_value()) { if (portalResult.has_value()) {