summaryrefslogtreecommitdiff
path: root/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_freebsd_info__freebsd.cpp
blob: 4c9899137352a98fbf554e2dc11aec2e4a1c951b (plain) (blame)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
--- Telegram/SourceFiles/platform/freebsd/info_freebsd.cpp.orig	2019-09-29 04:23:33 UTC
+++ Telegram/SourceFiles/platform/freebsd/info_freebsd.cpp
@@ -0,0 +1,49 @@
+/*
+This file is part of Telegram Desktop,
+the official desktop application for the Telegram messaging service.
+
+For license and copyright information please follow this link:
+https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
+*/
+#include "platform/freebsd/info_freebsd.h"
+
+namespace Platform {
+
+QString DeviceModelPretty() {
+    return "FreeBSD";
+}
+
+QString SystemVersionPretty() {
+	const auto result = getenv("XDG_CURRENT_DESKTOP");
+	const auto value = result ? QString::fromLatin1(result) : QString();
+	const auto list = value.split(':', QString::SkipEmptyParts);
+	return list.isEmpty() ? "FreeBSD" : "FreeBSD " + list[0];
+}
+
+QString SystemCountry() {
+	return QLocale::system().name().split('_').last();
+}
+
+QString SystemLanguage() {
+	const auto system = QLocale::system();
+	const auto languages = system.uiLanguages();
+	return languages.isEmpty()
+		? system.name().split('_').first()
+		: languages.front();
+}
+
+QDate WhenSystemBecomesOutdated() {
+	return QDate();
+}
+
+int AutoUpdateVersion() {
+	return 2;
+}
+
+QString AutoUpdateKey() {
+    return "freebsd";
+}
+
+
+
+} // namespace Platform