Update upstream source from tag 'upstream/1.2.7'
Update to upstream version '1.2.7'
with Debian dir a4bf1cd2c6831a9c5886b61b5ca449ffe6e5ee15
Markus Koschany
4 years ago
36 | 36 | |
37 | 37 | Spanish: |
38 | 38 | * Edgar Carballo |
39 | * Francisco Zamorano | |
39 | 40 | |
40 | 41 | Turkish: |
41 | 42 | * Cüneyt Oktay |
0 | 1.2.7 | |
1 | ----- | |
2 | * FIXED: Was not loading KDE icon theme. | |
3 | * FIXED: Window icon didn't work in Wayland. | |
4 | * Improved loading locales. | |
5 | * Improved Windows deployment. | |
6 | * Replaced deprecated code. | |
7 | ||
0 | 8 | 1.2.6 |
1 | 9 | ----- |
2 | 10 | * FIXED: Automatic high DPI support. |
93 | 93 | </content_rating> |
94 | 94 | |
95 | 95 | <releases> |
96 | <release version="1.2.7" date="2019-08-07"> | |
97 | <description> | |
98 | <ul> | |
99 | <li>FIXED: Was not loading KDE icon theme</li> | |
100 | <li>FIXED: Window icon didn't work in Wayland</li> | |
101 | <li>Improved loading locales</li> | |
102 | <li>Improved Windows deployment</li> | |
103 | <li>Replaced deprecated code</li> | |
104 | </ul> | |
105 | </description> | |
106 | </release> | |
96 | 107 | <release version="1.2.6" date="2018-07-20"> |
97 | 108 | <description> |
98 | 109 | <ul> |
1 | 1 | |
2 | 2 | APP='Peg-E' |
3 | 3 | BUNDLE="$APP.app" |
4 | VERSION='1.2.6' | |
4 | VERSION='1.2.7' | |
5 | 5 | |
6 | 6 | # Remove any previous disk folder or DMG |
7 | 7 | echo -n 'Preparing... ' |
0 | 0 | lessThan(QT_MAJOR_VERSION, 5) { |
1 | error("Peg-E requires Qt 5.2 or greater") | |
1 | error("Peg-E requires Qt 5.9 or greater") | |
2 | 2 | } |
3 | equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 2) { | |
4 | error("Peg-E requires Qt 5.2 or greater") | |
3 | equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 9) { | |
4 | error("Peg-E requires Qt 5.9 or greater") | |
5 | 5 | } |
6 | 6 | |
7 | 7 | TEMPLATE = app |
11 | 11 | CONFIG(debug, debug|release) { |
12 | 12 | CONFIG += warn_on |
13 | 13 | DEFINES += QT_DEPRECATED_WARNINGS |
14 | DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x051100 | |
14 | DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x051300 | |
15 | 15 | DEFINES += QT_NO_NARROWING_CONVERSIONS_IN_CONNECT |
16 | 16 | } |
17 | 17 | |
23 | 23 | } |
24 | 24 | |
25 | 25 | # Set program version |
26 | VERSION = 1.2.6 | |
26 | VERSION = 1.2.7 | |
27 | 27 | DEFINES += VERSIONSTR=\\\"$${VERSION}\\\" |
28 | 28 | |
29 | 29 | # Set program name |
69 | 69 | |
70 | 70 | QMAKE_BUNDLE_DATA += ICONS |
71 | 71 | } else:win32 { |
72 | RC_FILE = icons/icon.rc | |
72 | RC_ICONS = icons/peg-e.ico | |
73 | QMAKE_TARGET_DESCRIPTION = "Peg elimination game" | |
74 | QMAKE_TARGET_COPYRIGHT = "Copyright (C) 2019 Graeme Gott" | |
73 | 75 | } else:unix { |
74 | 76 | RESOURCES = icons/icon.qrc |
75 | 77 |
0 | 0 | /*********************************************************************** |
1 | 1 | * |
2 | * Copyright (C) 2010, 2011, 2012, 2014, 2015, 2016, 2018 Graeme Gott <graeme@gottcode.org> | |
2 | * Copyright (C) 2010, 2011, 2012, 2014, 2015, 2016, 2018, 2019 Graeme Gott <graeme@gottcode.org> | |
3 | 3 | * |
4 | 4 | * This program is free software: you can redistribute it and/or modify |
5 | 5 | * it under the terms of the GNU General Public License as published by |
97 | 97 | |
98 | 98 | // Find current locale |
99 | 99 | m_current = QSettings().value("Locale/Language").toString(); |
100 | QString current = !m_current.isEmpty() ? m_current : QLocale::system().name(); | |
101 | QStringList translations = findTranslations(); | |
102 | if (!translations.contains(m_appname + current)) { | |
103 | current = current.left(2); | |
104 | if (!translations.contains(m_appname + current)) { | |
105 | current.clear(); | |
100 | if (!m_current.isEmpty()) { | |
101 | QLocale::setDefault(m_current); | |
102 | } | |
103 | const QLocale locale; | |
104 | ||
105 | // Load translators | |
106 | static QTranslator translator; | |
107 | if (translator.load(locale, m_appname, "", m_path)) { | |
108 | QCoreApplication::installTranslator(&translator); | |
109 | ||
110 | const QString path = QLibraryInfo::location(QLibraryInfo::TranslationsPath); | |
111 | ||
112 | static QTranslator qtbase_translator; | |
113 | if (qtbase_translator.load(locale, "qtbase", "_", m_path) || qtbase_translator.load(locale, "qtbase", "_", path)) { | |
114 | QCoreApplication::installTranslator(&qtbase_translator); | |
115 | } | |
116 | ||
117 | static QTranslator qt_translator; | |
118 | if (qt_translator.load(locale, "qt", "_", m_path) || qt_translator.load(locale, "qt", "_", path)) { | |
119 | QCoreApplication::installTranslator(&qt_translator); | |
106 | 120 | } |
107 | 121 | } |
108 | if (!current.isEmpty()) { | |
109 | QLocale::setDefault(current); | |
110 | } else { | |
111 | current = "en"; | |
112 | } | |
113 | ||
114 | // Load translators | |
115 | static QTranslator qt_translator; | |
116 | qt_translator.load("qt_" + current, QLibraryInfo::location(QLibraryInfo::TranslationsPath)); | |
117 | QCoreApplication::installTranslator(&qt_translator); | |
118 | ||
119 | static QTranslator qtbase_translator; | |
120 | if (translations.contains("qtbase_" + current) || translations.contains("qtbase_" + current.left(2))) { | |
121 | qtbase_translator.load("qtbase_" + current, m_path); | |
122 | } else { | |
123 | qtbase_translator.load("qtbase_" + current, QLibraryInfo::location(QLibraryInfo::TranslationsPath)); | |
124 | } | |
125 | QCoreApplication::installTranslator(&qtbase_translator); | |
126 | ||
127 | static QTranslator translator; | |
128 | translator.load(m_appname + current, m_path); | |
129 | QCoreApplication::installTranslator(&translator); | |
130 | ||
131 | // Work around bug in Qt 5 where text direction is not loaded | |
132 | QGuiApplication::setLayoutDirection(QLocale(current).textDirection()); | |
133 | 122 | } |
134 | 123 | |
135 | 124 | //----------------------------------------------------------------------------- |
136 | 125 | |
137 | 126 | QString LocaleDialog::languageName(const QString& language) |
138 | 127 | { |
139 | QString lang_code = language.left(5); | |
140 | QLocale locale(lang_code); | |
141 | 128 | QString name; |
142 | if (lang_code.length() > 2) { | |
143 | if (locale.name() == lang_code) { | |
129 | const QLocale locale(language); | |
130 | if (language.contains('_')) { | |
131 | if (locale.name() == language) { | |
144 | 132 | name = locale.nativeLanguageName() + " (" + locale.nativeCountryName() + ")"; |
145 | 133 | } else { |
146 | 134 | name = locale.nativeLanguageName() + " (" + language + ")"; |
0 | 0 | /*********************************************************************** |
1 | 1 | * |
2 | * Copyright (C) 2009, 2012, 2013, 2014, 2015, 2018 Graeme Gott <graeme@gottcode.org> | |
2 | * Copyright (C) 2009, 2012, 2013, 2014, 2015, 2018, 2019 Graeme Gott <graeme@gottcode.org> | |
3 | 3 | * |
4 | 4 | * This program is free software: you can redistribute it and/or modify |
5 | 5 | * it under the terms of the GNU General Public License as published by |
30 | 30 | */ |
31 | 31 | int main(int argc, char** argv) |
32 | 32 | { |
33 | #if !defined(Q_OS_MAC) && (QT_VERSION >= QT_VERSION_CHECK(5,6,0)) | |
33 | #if !defined(Q_OS_MAC) | |
34 | 34 | if (!qEnvironmentVariableIsSet("QT_DEVICE_PIXEL_RATIO") |
35 | 35 | && !qEnvironmentVariableIsSet("QT_AUTO_SCREEN_SCALE_FACTOR") |
36 | 36 | && !qEnvironmentVariableIsSet("QT_SCALE_FACTOR") |
46 | 46 | app.setOrganizationName("GottCode"); |
47 | 47 | #if !defined(Q_OS_WIN) && !defined(Q_OS_MAC) |
48 | 48 | app.setWindowIcon(QIcon::fromTheme("peg-e", QIcon(":/peg-e.png"))); |
49 | app.setDesktopFileName("peg-e"); | |
49 | 50 | #endif |
50 | 51 | app.setAttribute(Qt::AA_DontShowIconsInMenus, true); |
51 | 52 | app.setAttribute(Qt::AA_UseHighDpiPixmaps, true); |
70 | 71 | } |
71 | 72 | |
72 | 73 | // Set up icons |
74 | #if defined(Q_OS_MAC) || defined(Q_OS_WIN) | |
75 | QIcon::setThemeName("hicolor"); | |
76 | #elif (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) | |
77 | QIcon::setFallbackThemeName("hicolor"); | |
78 | #else | |
73 | 79 | if (QIcon::themeName().isEmpty()) { |
74 | 80 | QIcon::setThemeName("hicolor"); |
75 | 81 | } |
82 | #endif | |
76 | 83 | |
77 | 84 | Window window; |
78 | 85 | window.show(); |
0 | 0 | /*********************************************************************** |
1 | 1 | * |
2 | * Copyright (C) 2009, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Graeme Gott <graeme@gottcode.org> | |
2 | * Copyright (C) 2009, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Graeme Gott <graeme@gottcode.org> | |
3 | 3 | * |
4 | 4 | * This program is free software: you can redistribute it and/or modify |
5 | 5 | * it under the terms of the GNU General Public License as published by |
232 | 232 | "<p align='center'>%6<br/><small>%7</small></p>") |
233 | 233 | .arg(tr("Peg-E"), QCoreApplication::applicationVersion(), |
234 | 234 | tr("Peg elimination game"), |
235 | tr("Copyright © 2009-%1 Graeme Gott").arg("2018"), | |
235 | tr("Copyright © 2009-%1 Graeme Gott").arg("2019"), | |
236 | 236 | tr("Released under the <a href=%1>GPL 3</a> license").arg("\"http://www.gnu.org/licenses/gpl.html\""), |
237 | 237 | tr("Uses icons from the <a href=%1>Oxygen</a> icon theme").arg("\"http://www.oxygen-icons.org/\""), |
238 | 238 | tr("Used under the <a href=%1>LGPL 3</a> license").arg("\"http://www.gnu.org/licenses/lgpl.html\"")) |
3 | 3 | !define APPNAME "Peg-E" |
4 | 4 | !define VERSIONMAJOR 1 |
5 | 5 | !define VERSIONMINOR 2 |
6 | !define VERSIONPATCH 6 | |
6 | !define VERSIONPATCH 7 | |
7 | 7 | !define APPVERSION "${VERSIONMAJOR}.${VERSIONMINOR}.${VERSIONPATCH}" |
8 | 8 | !define ABOUTURL "https://gottcode.org/peg-e/" |
9 | 9 | |
25 | 25 | OutFile "${APPNAME}_${APPVERSION}.exe" |
26 | 26 | |
27 | 27 | ;Default installation folder |
28 | InstallDir "$PROGRAMFILES\${APPNAME}" | |
28 | InstallDir "$PROGRAMFILES64\${APPNAME}" | |
29 | 29 | InstallDirRegKey HKLM "Software\${APPNAME}" "" |
30 | 30 | |
31 | 31 | ;Request application privileges for Windows Vista |