104 lines
3.3 KiB
Diff
104 lines
3.3 KiB
Diff
--- tdesktop-0.9.32/Telegram/SourceFiles/pspecific_linux.cpp.orig 2016-03-15 20:39:00.061631172 +0100
|
|
+++ tdesktop-0.9.32/Telegram/SourceFiles/pspecific_linux.cpp 2016-03-15 20:33:31.281860615 +0100
|
|
@@ -40,7 +40,7 @@
|
|
}
|
|
#define signals public
|
|
|
|
-#include <unity/unity/unity.h>
|
|
+//#include <unity/unity/unity.h>
|
|
|
|
namespace {
|
|
QByteArray escapeShell(const QByteArray &str) {
|
|
@@ -188,7 +188,7 @@
|
|
typedef guint (*f_g_idle_add)(GSourceFunc function, gpointer data);
|
|
f_g_idle_add ps_g_idle_add = 0;
|
|
|
|
- typedef void (*f_unity_launcher_entry_set_count)(UnityLauncherEntry* self, gint64 value);
|
|
+/* typedef void (*f_unity_launcher_entry_set_count)(UnityLauncherEntry* self, gint64 value);
|
|
f_unity_launcher_entry_set_count ps_unity_launcher_entry_set_count = 0;
|
|
|
|
typedef void (*f_unity_launcher_entry_set_count_visible)(UnityLauncherEntry* self, gboolean value);
|
|
@@ -196,7 +196,7 @@
|
|
|
|
typedef UnityLauncherEntry* (*f_unity_launcher_entry_get_for_desktop_id)(const gchar* desktop_id);
|
|
f_unity_launcher_entry_get_for_desktop_id ps_unity_launcher_entry_get_for_desktop_id = 0;
|
|
-
|
|
+*/
|
|
template <typename TFunction>
|
|
bool loadFunction(QLibrary &lib, const char *name, TFunction &func) {
|
|
if (!lib.isLoaded()) return false;
|
|
@@ -469,7 +469,7 @@
|
|
DEBUG_LOG(("Status icon api loaded!"));
|
|
}
|
|
|
|
- void setupUnity() {
|
|
+/* void setupUnity() {
|
|
if (noTryUnity) return;
|
|
|
|
QLibrary lib_unity(qstr("unity"), 9, 0);
|
|
@@ -480,7 +480,7 @@
|
|
if (!loadFunction(lib_unity, "unity_launcher_entry_set_count_visible", ps_unity_launcher_entry_set_count_visible)) return;
|
|
useUnityCount = true;
|
|
DEBUG_LOG(("Unity count api loaded!"));
|
|
- }
|
|
+ }*/
|
|
|
|
class _PsEventFilter : public QAbstractNativeEventFilter {
|
|
public:
|
|
@@ -496,7 +496,7 @@
|
|
};
|
|
_PsEventFilter *_psEventFilter = 0;
|
|
|
|
- UnityLauncherEntry *_psUnityLauncherEntry = 0;
|
|
+// UnityLauncherEntry *_psUnityLauncherEntry = 0;
|
|
};
|
|
|
|
PsMainWindow::PsMainWindow(QWidget *parent) : QMainWindow(parent),
|
|
@@ -624,14 +624,14 @@
|
|
int32 counter = App::histories().unreadBadge();
|
|
|
|
setWindowTitle((counter > 0) ? qsl("Telegram (%1)").arg(counter) : qsl("Telegram"));
|
|
- if (_psUnityLauncherEntry) {
|
|
+/* if (_psUnityLauncherEntry) {
|
|
if (counter > 0) {
|
|
ps_unity_launcher_entry_set_count(_psUnityLauncherEntry, (counter > 9999) ? 9999 : counter);
|
|
ps_unity_launcher_entry_set_count_visible(_psUnityLauncherEntry, TRUE);
|
|
} else {
|
|
ps_unity_launcher_entry_set_count_visible(_psUnityLauncherEntry, FALSE);
|
|
}
|
|
- }
|
|
+ }*/
|
|
|
|
if (noQtTrayIcon) {
|
|
if (useAppIndicator) {
|
|
@@ -828,7 +828,7 @@
|
|
void PsMainWindow::psFirstShow() {
|
|
psCreateTrayIcon();
|
|
|
|
- if (useUnityCount) {
|
|
+/* if (useUnityCount) {
|
|
_psUnityLauncherEntry = ps_unity_launcher_entry_get_for_desktop_id("telegramdesktop.desktop");
|
|
if (_psUnityLauncherEntry) {
|
|
LOG(("Found Unity Launcher entry telegramdesktop.desktop!"));
|
|
@@ -840,9 +840,9 @@
|
|
LOG(("Could not get Unity Launcher entry!"));
|
|
}
|
|
}
|
|
- } else {
|
|
+ } else {*/
|
|
LOG(("Not using Unity Launcher count."));
|
|
- }
|
|
+/* }*/
|
|
|
|
finished = false;
|
|
|
|
@@ -1256,7 +1256,7 @@
|
|
|
|
DEBUG_LOG(("Loading libraries"));
|
|
setupGtk();
|
|
- setupUnity();
|
|
+ //setupUnity();
|
|
}
|
|
|
|
void finish() {
|