forked from pool/telegram-desktop
Accepting request 745561 from home:nuklly:branches:server:messaging
- Remove the TDESKTOP_DISABLE_GTK_INTEGRATION macro in patch.py * Enable the native notification on all platforms. * Use GTK 2 theme by default to harmonize the libqt5-prioritise-gtk2-platformtheme.patch (boo#1149986). OBS-URL: https://build.opensuse.org/request/show/745561 OBS-URL: https://build.opensuse.org/package/show/server:messaging/telegram-desktop?expand=0&rev=112
This commit is contained in:
committed by
Git OBS Bridge
parent
546bcd7caf
commit
8743abd54f
37
default-gtk2.patch
Normal file
37
default-gtk2.patch
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
diff --git a/Telegram/SourceFiles/platform/linux/linux_libs.cpp b/Telegram/SourceFiles/platform/linux/linux_libs.cpp
|
||||||
|
index 5071d63..f8c0f20 100644
|
||||||
|
--- a/Telegram/SourceFiles/platform/linux/linux_libs.cpp
|
||||||
|
+++ b/Telegram/SourceFiles/platform/linux/linux_libs.cpp
|
||||||
|
@@ -237,15 +237,15 @@ void start() {
|
||||||
|
bool indicatorLoaded = false;
|
||||||
|
bool isWayland = QGuiApplication::platformName().startsWith(qsl("wayland"), Qt::CaseInsensitive);
|
||||||
|
QLibrary lib_gtk, lib_indicator;
|
||||||
|
- if (loadLibrary(lib_indicator, "ayatana-appindicator3", 1) || loadLibrary(lib_indicator, "appindicator3", 1)) {
|
||||||
|
- if (loadLibrary(lib_gtk, "gtk-3", 0)) {
|
||||||
|
+ if (loadLibrary(lib_indicator, "ayatana-appindicator", 1) || loadLibrary(lib_indicator, "appindicator", 1)) {
|
||||||
|
+ if (loadLibrary(lib_gtk, "gtk-x11-2.0", 0)) {
|
||||||
|
gtkLoaded = setupGtkBase(lib_gtk);
|
||||||
|
indicatorLoaded = setupAppIndicator(lib_indicator);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((!gtkLoaded || !indicatorLoaded) && !isWayland) {
|
||||||
|
- if (loadLibrary(lib_indicator, "ayatana-appindicator", 1) || loadLibrary(lib_indicator, "appindicator", 1)) {
|
||||||
|
- if (loadLibrary(lib_gtk, "gtk-x11-2.0", 0)) {
|
||||||
|
+ if (loadLibrary(lib_indicator, "ayatana-appindicator3", 1) || loadLibrary(lib_indicator, "appindicator3", 1)) {
|
||||||
|
+ if (loadLibrary(lib_gtk, "gtk-3", 0)) {
|
||||||
|
gtkLoaded = indicatorLoaded = false;
|
||||||
|
gtkLoaded = setupGtkBase(lib_gtk);
|
||||||
|
indicatorLoaded = setupAppIndicator(lib_indicator);
|
||||||
|
@@ -255,10 +255,10 @@ void start() {
|
||||||
|
|
||||||
|
// If no appindicator, try at least load gtk.
|
||||||
|
if (!gtkLoaded && !indicatorLoaded) {
|
||||||
|
- if (loadLibrary(lib_gtk, "gtk-3", 0)) {
|
||||||
|
+ if (loadLibrary(lib_gtk, "gtk-x11-2.0", 0)) {
|
||||||
|
gtkLoaded = setupGtkBase(lib_gtk);
|
||||||
|
}
|
||||||
|
- if (!gtkLoaded && !isWayland && loadLibrary(lib_gtk, "gtk-x11-2.0", 0)) {
|
||||||
|
+ if (!gtkLoaded && !isWayland && loadLibrary(lib_gtk, "gtk-3", 0)) {
|
||||||
|
gtkLoaded = setupGtkBase(lib_gtk);
|
||||||
|
}
|
||||||
|
}
|
3
patch.py
3
patch.py
@@ -93,7 +93,6 @@ def load_json(filename):
|
|||||||
return json.loads(read_file_to_proper_json(open(filename)))
|
return json.loads(read_file_to_proper_json(open(filename)))
|
||||||
|
|
||||||
def save_json(jsonobj, filename):
|
def save_json(jsonobj, filename):
|
||||||
# pass
|
|
||||||
j = transform_back(jsonobj)
|
j = transform_back(jsonobj)
|
||||||
# backup = filename + ".orig"
|
# backup = filename + ".orig"
|
||||||
# copyfile(filename, backup)
|
# copyfile(filename, backup)
|
||||||
@@ -239,7 +238,7 @@ def process_telegram(jsonobj):
|
|||||||
child.append("'TDESKTOP_DISABLE_AUTOUPDATE'")
|
child.append("'TDESKTOP_DISABLE_AUTOUPDATE'")
|
||||||
child.append("'TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME'")
|
child.append("'TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME'")
|
||||||
child.append("'TDESKTOP_DISABLE_UNITY_INTEGRATION'")
|
child.append("'TDESKTOP_DISABLE_UNITY_INTEGRATION'")
|
||||||
child.append("'TDESKTOP_DISABLE_GTK_INTEGRATION'")
|
# child.append("'TDESKTOP_DISABLE_GTK_INTEGRATION'")
|
||||||
child.append("'TDESKTOP_DISABLE_OPENAL_EFFECTS'")
|
child.append("'TDESKTOP_DISABLE_OPENAL_EFFECTS'")
|
||||||
child.remove("'AL_LIBTYPE_STATIC'")
|
child.remove("'AL_LIBTYPE_STATIC'")
|
||||||
child = jsonobj["'targets'"][0]["'include_dirs'"]
|
child = jsonobj["'targets'"][0]["'include_dirs'"]
|
||||||
|
@@ -19,7 +19,7 @@ index 3ba28309b..e280c44fa 100644
|
|||||||
|
|
||||||
+ // I don't know why path is not in QT_PLUGIN_PATH by default
|
+ // I don't know why path is not in QT_PLUGIN_PATH by default
|
||||||
+ QCoreApplication::addLibraryPath("/usr/lib64/qt5/plugins");
|
+ QCoreApplication::addLibraryPath("/usr/lib64/qt5/plugins");
|
||||||
+ // without this Telegram doesn't start on Ubuntu 17.04 due GTK errors
|
+ // without this Telegram doesn't start on Ubuntu 17.04 due to GTK errors
|
||||||
+ setenv("QT_STYLE_OVERRIDE", "qwerty", false);
|
+ setenv("QT_STYLE_OVERRIDE", "qwerty", false);
|
||||||
+ // Telegram doesn't start when extraordinary theme is set, see launchpad.net/bugs/1680943
|
+ // Telegram doesn't start when extraordinary theme is set, see launchpad.net/bugs/1680943
|
||||||
+ unsetenv("QT_QPA_PLATFORMTHEME");
|
+ unsetenv("QT_QPA_PLATFORMTHEME");
|
||||||
|
@@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Nov 5 20:51:58 UTC 2019 - Xu Zhao <i@xuzhao.net>
|
||||||
|
|
||||||
|
- Remove the TDESKTOP_DISABLE_GTK_INTEGRATION macro in patch.py
|
||||||
|
* Enable the native notification on all platforms.
|
||||||
|
* Use GTK 2 theme by default to harmonize the
|
||||||
|
libqt5-prioritise-gtk2-platformtheme.patch (boo#1149986).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Nov 2 11:54:41 UTC 2019 - Xu Zhao <i@xuzhao.net>
|
Sat Nov 2 11:54:41 UTC 2019 - Xu Zhao <i@xuzhao.net>
|
||||||
|
|
||||||
|
@@ -64,6 +64,7 @@ Source13: rlottie-master.zip
|
|||||||
Source14: qt_functions.cpp
|
Source14: qt_functions.cpp
|
||||||
|
|
||||||
Patch0: tdesktop.patch
|
Patch0: tdesktop.patch
|
||||||
|
Patch1: default-gtk2.patch
|
||||||
BuildRequires: chrpath
|
BuildRequires: chrpath
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: desktop-file-utils
|
BuildRequires: desktop-file-utils
|
||||||
@@ -145,6 +146,7 @@ BuildRequires: pkgconfig(zlib)
|
|||||||
Requires: ffmpeg
|
Requires: ffmpeg
|
||||||
Requires: hicolor-icon-theme
|
Requires: hicolor-icon-theme
|
||||||
Requires: icu
|
Requires: icu
|
||||||
|
Requires: libappindicator1
|
||||||
Requires: openssl
|
Requires: openssl
|
||||||
ExclusiveArch: x86_64
|
ExclusiveArch: x86_64
|
||||||
|
|
||||||
@@ -200,6 +202,7 @@ cp %{_sourcedir}/tdesktop.patch %{_builddir}/tdesktop-%{version}
|
|||||||
cd %{_builddir}/tdesktop-%{version}
|
cd %{_builddir}/tdesktop-%{version}
|
||||||
|
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
cp %{_sourcedir}/patch.py . && python3 ./patch.py
|
cp %{_sourcedir}/patch.py . && python3 ./patch.py
|
||||||
cp %{_sourcedir}/qt_functions.cpp Telegram/SourceFiles/
|
cp %{_sourcedir}/qt_functions.cpp Telegram/SourceFiles/
|
||||||
sed -i '1i<(src_loc)/qt_functions.cpp' Telegram/gyp/telegram/sources.txt
|
sed -i '1i<(src_loc)/qt_functions.cpp' Telegram/gyp/telegram/sources.txt
|
||||||
|
Reference in New Issue
Block a user