Codebase list connectagram / 19a6c9b
New upstream release Jonathan Carter 4 years ago
12 changed file(s) with 70 addition(s) and 56 deletion(s). Raw diff Collapse all Expand all
0 1.2.10
1 ------
2 * FIXED: Window icon didn't work in Wayland.
3 * Improved loading locales.
4 * Improved Windows deployment.
5 * Replaced deprecated code.
6
07 1.2.9
18 -----
29 * FIXED: Automatic high DPI support.
00 lessThan(QT_MAJOR_VERSION, 5) {
1 error("Connectagram requires Qt 5.2 or greater")
1 error("Connectagram requires Qt 5.9 or greater")
22 }
3 equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 2) {
4 error("Connectagram requires Qt 5.2 or greater")
3 equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 9) {
4 error("Connectagram requires Qt 5.9 or greater")
55 }
66
77 TEMPLATE = app
1111 CONFIG(debug, debug|release) {
1212 CONFIG += warn_on
1313 DEFINES += QT_DEPRECATED_WARNINGS
14 DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x051100
14 DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x051300
1515 DEFINES += QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
1616 }
1717
2323 }
2424
2525 # Set program version
26 VERSION = 1.2.9
26 VERSION = 1.2.10
2727 DEFINES += VERSIONSTR=\\\"$${VERSION}\\\"
2828
2929 # Set program name
8484
8585 QMAKE_BUNDLE_DATA += GAME_DATA
8686 } else:win32 {
87 RC_FILE = icons/icon.rc
87 RC_ICONS = icons/connectagram.ico
88 QMAKE_TARGET_DESCRIPTION = "Anagram game"
89 QMAKE_TARGET_COPYRIGHT = "Copyright (C) 2019 Graeme Gott"
8890 } else:unix {
8991 RESOURCES += icons/icon.qrc
9092
0 connectagram (1.2.10-1) unstable; urgency=medium
1
2 * New upstream release
3
4 -- Jonathan Carter <jcc@debian.org> Sat, 10 Aug 2019 18:33:38 +0200
5
06 connectagram (1.2.9-6) unstable; urgency=medium
17
28 * Upgrade to standards version 4.4.0
9494 </content_rating>
9595
9696 <releases>
97 <release version="1.2.10" date="2019-08-07">
98 <description>
99 <ul>
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>
97107 <release version="1.2.9" date="2018-07-20">
98108 <description>
99109 <ul>
+0
-1
icons/icon.rc less more
0 IDI_ICON1 ICON DISCARDABLE "connectagram.ico"
11
22 APP='Connectagram'
33 BUNDLE="$APP.app"
4 VERSION='1.2.9'
4 VERSION='1.2.10'
55
66 # Remove any previous disk folder or DMG
77 echo -n 'Preparing... '
00 /***********************************************************************
11 *
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>
33 *
44 * This program is free software: you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
9797
9898 // Find current locale
9999 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);
106120 }
107121 }
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());
133122 }
134123
135124 //-----------------------------------------------------------------------------
136125
137126 QString LocaleDialog::languageName(const QString& language)
138127 {
139 QString lang_code = language.left(5);
140 QLocale locale(lang_code);
141128 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) {
144132 name = locale.nativeLanguageName() + " (" + locale.nativeCountryName() + ")";
145133 } else {
146134 name = locale.nativeLanguageName() + " (" + language + ")";
00 /***********************************************************************
11 *
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>
33 *
44 * This program is free software: you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
2323 #include <QDir>
2424
2525 int main(int argc, char** argv) {
26 #if !defined(Q_OS_MAC) && (QT_VERSION >= QT_VERSION_CHECK(5,6,0))
26 #if !defined(Q_OS_MAC)
2727 if (!qEnvironmentVariableIsSet("QT_DEVICE_PIXEL_RATIO")
2828 && !qEnvironmentVariableIsSet("QT_AUTO_SCREEN_SCALE_FACTOR")
2929 && !qEnvironmentVariableIsSet("QT_SCALE_FACTOR")
3939 app.setOrganizationName("GottCode");
4040 #if !defined(Q_OS_WIN) && !defined(Q_OS_MAC)
4141 app.setWindowIcon(QIcon::fromTheme("connectagram", QIcon(":/connectagram.png")));
42 app.setDesktopFileName("connectagram");
4243 #endif
4344 app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
4445
00 /***********************************************************************
11 *
2 * Copyright (C) 2009, 2013, 2014, 2015 Graeme Gott <graeme@gottcode.org>
2 * Copyright (C) 2009, 2013, 2014, 2015, 2019 Graeme Gott <graeme@gottcode.org>
33 *
44 * This program is free software: you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
9494 contents_layout->addRow(tr("Word Length:"), m_word_length_box);
9595
9696 QVBoxLayout* layout = new QVBoxLayout(this);
97 const int margin = layout->contentsMargins().top();
9798 layout->addLayout(contents_layout);
98 layout->addSpacing(layout->margin());
99 layout->addSpacing(margin);
99100 layout->addWidget(patterns);
100 layout->addSpacing(layout->margin());
101 layout->addSpacing(margin);
101102 layout->addWidget(buttons);
102103
103104 // Load settings
00 /***********************************************************************
11 *
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>
33 *
44 * This program is free software: you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
137137 connect(m_board, &Board::loading, m_clock, &Clock::setLoading);
138138
139139 QHBoxLayout* overlay_layout = new QHBoxLayout(overlay);
140 overlay_layout->setMargin(0);
140 overlay_layout->setContentsMargins(0, 0, 0, 0);
141141 overlay_layout->setSpacing(0);
142142 overlay_layout->addSpacing(10);
143143 overlay_layout->addWidget(m_definitions_button);
149149
150150 // Lay out board
151151 QGridLayout* layout = new QGridLayout(contents);
152 layout->setMargin(0);
152 layout->setContentsMargins(0, 0, 0, 0);
153153 layout->setSpacing(0);
154154 layout->addWidget(view, 0, 0);
155155 layout->addWidget(m_success, 0, 0, Qt::AlignCenter);
261261 QMessageBox::about(this, tr("About"), QString("<p><center><big><b>%1 %2</b></big><br/>%3<br/><small>%4<br/>%5</small></center></p><p><center>%6</center></p>")
262262 .arg(tr("Connectagram"), QCoreApplication::applicationVersion(),
263263 tr("A word unscrambling game"),
264 tr("Copyright &copy; 2009-%1 by Graeme Gott").arg("2018"),
264 tr("Copyright &copy; 2009-%1 by Graeme Gott").arg("2019"),
265265 tr("Released under the <a href=\"http://www.gnu.org/licenses/gpl.html\">GPL 3</a> license"),
266266 tr("Definitions are from <a href=\"http://wiktionary.org/\">Wiktionary</a>"))
267267 );
33 !define APPNAME "Connectagram"
44 !define VERSIONMAJOR 1
55 !define VERSIONMINOR 2
6 !define VERSIONPATCH 9
6 !define VERSIONPATCH 10
77 !define APPVERSION "${VERSIONMAJOR}.${VERSIONMINOR}.${VERSIONPATCH}"
88 !define ABOUTURL "https://gottcode.org/connectagram/"
99
2525 OutFile "${APPNAME}_${APPVERSION}.exe"
2626
2727 ;Default installation folder
28 InstallDir "$PROGRAMFILES\${APPNAME}"
28 InstallDir "$PROGRAMFILES64\${APPNAME}"
2929 InstallDirRegKey HKLM "Software\${APPNAME}" ""
3030
3131 ;Request application privileges for Windows Vista
22 @ECHO OFF
33
44 SET APP=Connectagram
5 SET VERSION=1.2.9
5 SET VERSION=1.2.10
66
77 ECHO Copying executable
88 MKDIR %APP%