summarylogtreecommitdiffstats
path: root/use_xdg-open.patch
blob: 9f888e5fbd6a81ce7bf210af337df6f4888cae8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Description: use xdg-open to open things in external applications
Credits: novie

diff --git a/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp b/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp
index 0489ece0d..71d8836b9 100644
--- a/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp
+++ b/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp
@@ -27,6 +27,7 @@ namespace Platform {
 namespace File {
 
 void UnsafeOpenUrl(const QString &url) {
+#if 0
 	try {
 		if (Gio::AppInfo::launch_default_for_uri(url.toStdString())) {
 			return;
@@ -38,6 +39,7 @@ void UnsafeOpenUrl(const QString &url) {
 	if (QDesktopServices::openUrl(url)) {
 		return;
 	}
+#endif
 
 	QProcess::startDetached(qsl("xdg-open"), { url });
 }
@@ -65,6 +67,7 @@ bool UnsafeShowOpenWith(const QString &filepath) {
 }
 
 void UnsafeLaunch(const QString &filepath) {
+#if 0
 	try {
 		if (Gio::AppInfo::launch_default_for_uri(
 			Glib::filename_to_uri(filepath.toStdString()))) {
@@ -77,6 +80,7 @@ void UnsafeLaunch(const QString &filepath) {
 	if (UnsafeShowOpenWith(filepath)) {
 		return;
 	}
+#endif
 
 	const auto qUrlPath = QUrl::fromLocalFile(filepath);
 	if (QDesktopServices::openUrl(qUrlPath)) {