2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-10-03 13:26:03 +00:00

Get rid of DESKTOP_APP_DISABLE_DBUS_INTEGRATION

Desktop App Toolkit uses GLib as the D-Bus library for quite long time, but GLib is not only a D-Bus library, it's more a basic library providing native Linux APIs implementing various specs. The situation right now is that DESKTOP_APP_DISABLE_DBUS_INTEGRATION disables not only D-Bus code but all the native API integration such as MIME handling or .desktop file parsing. In other words, the option disables native Linux APIs on Linux what is absurd and doesn't have any sense.
This commit is contained in:
Ilya Fedin
2023-05-06 02:34:14 +04:00
committed by John Preston
parent 37f5576c38
commit 0a011db483
11 changed files with 17 additions and 129 deletions

View File

@@ -26,15 +26,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "window/window_controller.h"
#include "window/window_session_controller.h"
#include "base/platform/base_platform_info.h"
#include "base/platform/linux/base_linux_glibmm_helper.h"
#include "base/event_filter.h"
#include "ui/widgets/popup_menu.h"
#include "ui/widgets/input_fields.h"
#include "ui/ui_utility.h"
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
#include "base/platform/linux/base_linux_glibmm_helper.h"
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
#ifndef DESKTOP_APP_DISABLE_X11_INTEGRATION
#include "base/platform/linux/base_linux_xcb_utilities.h"
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
@@ -44,10 +41,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <QtGui/QWindow>
#include <QtWidgets/QMenuBar>
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
#include <glibmm.h>
#include <giomm.h>
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
namespace Platform {
namespace {
@@ -177,7 +172,6 @@ void ForceDisabled(QAction *action, bool disabled) {
}
}
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
uint djbStringHash(const std::string &string) {
uint hash = 5381;
for (const auto &curChar : string) {
@@ -185,7 +179,6 @@ uint djbStringHash(const std::string &string) {
}
return hash;
}
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
} // namespace
@@ -245,7 +238,6 @@ void MainWindow::updateWindowIcon() {
}
void MainWindow::updateUnityCounter() {
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
const auto launcherUrl = Glib::ustring(
"application://"
+ QGuiApplication::desktopFileName().toStdString());
@@ -281,7 +273,6 @@ void MainWindow::updateUnityCounter() {
}));
} catch (...) {
}
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
}
void MainWindow::createGlobalMenu() {