Make use of the new XDP::SettingWatcher constructor
This commit is contained in:
parent
725339be33
commit
9bf89715b1
1 changed files with 5 additions and 11 deletions
|
|
@ -71,17 +71,11 @@ TitleControls::Layout TitleControlsLayout() {
|
||||||
}
|
}
|
||||||
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
|
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
|
||||||
|
|
||||||
using XDPSettingWatcher = base::Platform::XDP::SettingWatcher;
|
namespace XDP = base::Platform::XDP;
|
||||||
static const XDPSettingWatcher settingWatcher(
|
static const XDP::SettingWatcher settingWatcher(
|
||||||
[=](
|
"org.gnome.desktop.wm.preferences",
|
||||||
const Glib::ustring &group,
|
"button-layout",
|
||||||
const Glib::ustring &key,
|
[] { NotifyTitleControlsLayoutChanged(); });
|
||||||
const Glib::VariantBase &value) {
|
|
||||||
if (group == "org.gnome.desktop.wm.preferences"
|
|
||||||
&& key == "button-layout") {
|
|
||||||
NotifyTitleControlsLayoutChanged();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}();
|
}();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue