mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 22:55:11 +00:00
Use new glibmm 2.78 API
This commit is contained in:
@@ -9,7 +9,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
|
||||
#include "platform/platform_integration.h"
|
||||
#include "base/platform/base_platform_info.h"
|
||||
#include "base/platform/linux/base_linux_glibmm_helper.h"
|
||||
#include "base/platform/linux/base_linux_xdp_utilities.h"
|
||||
#include "core/sandbox.h"
|
||||
#include "core/application.h"
|
||||
@@ -125,7 +124,7 @@ LinuxIntegration::LinuxIntegration()
|
||||
if (group == "org.freedesktop.appearance"
|
||||
&& key == "color-scheme") {
|
||||
try {
|
||||
const auto ivalue = base::Platform::GlibVariantCast<uint>(value);
|
||||
const auto ivalue = value.get_dynamic<uint>();
|
||||
|
||||
crl::on_main([=] {
|
||||
Core::App().settings().setSystemDarkMode(ivalue == 1);
|
||||
@@ -266,8 +265,9 @@ void LinuxIntegration::LaunchNativeApplication() {
|
||||
|
||||
const auto notificationIdVariantType = [] {
|
||||
try {
|
||||
return base::Platform::MakeGlibVariant(
|
||||
NotificationId().toTuple()).get_type();
|
||||
return Glib::create_variant(
|
||||
NotificationId().toTuple()
|
||||
).get_type();
|
||||
} catch (...) {
|
||||
return Glib::VariantType();
|
||||
}
|
||||
@@ -282,9 +282,9 @@ void LinuxIntegration::LaunchNativeApplication() {
|
||||
const auto &app = Core::App();
|
||||
app.notifications().manager().notificationActivated(
|
||||
NotificationId::FromTuple(
|
||||
base::Platform::GlibVariantCast<
|
||||
NotificationIdTuple
|
||||
>(parameter)));
|
||||
parameter.get_dynamic<NotificationIdTuple>()
|
||||
)
|
||||
);
|
||||
} catch (...) {
|
||||
}
|
||||
});
|
||||
@@ -299,10 +299,10 @@ void LinuxIntegration::LaunchNativeApplication() {
|
||||
const auto &app = Core::App();
|
||||
app.notifications().manager().notificationReplied(
|
||||
NotificationId::FromTuple(
|
||||
base::Platform::GlibVariantCast<
|
||||
NotificationIdTuple
|
||||
>(parameter)),
|
||||
{});
|
||||
parameter.get_dynamic<NotificationIdTuple>()
|
||||
),
|
||||
{}
|
||||
);
|
||||
} catch (...) {
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user