Changeset 162d5c5f94 in tspsg for src
- Timestamp:
- Mar 1, 2010, 2:13:23 PM (15 years ago)
- Branches:
- 0.1.3.145-beta1-symbian, 0.1.4.170-beta2-bb10, appveyor, imgbot, master, readme
- Children:
- f19df0a3e5
- Parents:
- 278bc7818f
- Location:
- src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/globals.h
r278bc7818f r162d5c5f94 39 39 // TSPSG Defaults 40 40 #include "defaults.h" 41 // Vista/7 Eyecandy 42 #include "qtwin.h" 41 #ifdef Q_OS_WIN32 42 // Vista/7 Eyecandy 43 #include "qtwin.h" 44 #endif // Q_OS_WIN32 43 45 44 46 // DEFINES … … 50 52 // Paths 51 53 /*! 52 * \def PATH_ I18N54 * \def PATH_L10N 53 55 * \brief Bath to internationalization files. 54 56 */ 57 #ifndef PATH_L10N 58 #define PATH_L10N "l10n" 59 #endif // PATH_L10N 55 60 /*! 56 61 * \def PATH_DOCS 57 62 * \brief Bath to documentation files. 58 63 */ 59 #if defined(Q_OS_LINUX) || (defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)) 60 #define PATH_I18N "/usr/share/tspsg/i18n" 61 #define PATH_DOCS "/usr/share/doc/tspsg" 62 #else 63 #define PATH_I18N "i18n" 64 #ifndef PATH_DOCS 64 65 #define PATH_DOCS "help" 65 #endif // Q_OS_LINUX66 #endif // PATH_DOCS 66 67 67 68 //! TSPSG Task file signature - letters \c TSPT -
src/main.cpp
r278bc7818f r162d5c5f94 54 54 55 55 QTranslator en; 56 if (en.load("tspsg_en", PATH_ I18N))56 if (en.load("tspsg_en", PATH_L10N)) 57 57 app.installTranslator(&en); 58 58 -
src/mainwindow.cpp
r278bc7818f r162d5c5f94 149 149 void MainWindow::actionFileSaveTriggered() 150 150 { 151 if ((fileName == tr("Untitled") + ".tspt") || (!fileName.endsWith(".tspt",Qt::CaseInsensitive))) 151 qDebug() << tr("Untitled"); 152 if ((fileName == tr("Untitled") + ".tspt") || (!fileName.endsWith(".tspt", Qt::CaseInsensitive))) 152 153 saveTask(); 153 154 else … … 311 312 title += QString::fromUtf8("<b><a href=\"http://tspsg.sourceforge.net/\">http://tspsg.sf.net/</a></b><br>"); 312 313 QString about; 313 about += QString::fromUtf8("Target OS : <b>%1</b><br>").arg(OS);314 about += QString::fromUtf8("Target OS (ARCH): <b>%1</b><br>").arg(OS); 314 315 #ifndef STATIC_BUILD 315 316 about += "Qt library (shared):<br>"; … … 320 321 #endif // STATIC_BUILD 321 322 about += QString::fromUtf8("Built on <b>%1</b> at <b>%2</b><br>").arg(__DATE__).arg(__TIME__); 322 about += "<br>";323 about += QString::fromUtf8("Id: <b>"VERSIONID"</b><br>");323 // about += "<br>"; 324 // about += QString::fromUtf8("Id: <b>"VERSIONID"</b><br>"); 324 325 about += QString::fromUtf8("Algorithm: <b>%1</b><br>").arg(CTSPSolver::getVersionId()); 325 326 about += "<br>"; … … 372 373 connect(bb, SIGNAL(accepted()), dlg, SLOT(accept())); 373 374 375 #ifdef Q_OS_WIN32 374 376 // Adding some eyecandy in Vista and 7 :-) 375 377 if (QtWin::isCompositionEnabled()) { 376 378 QtWin::enableBlurBehindWindow(dlg, true); 377 379 } 378 379 dlg->resize(410, 300); 380 #endif // Q_OS_WIN32 381 382 dlg->resize(480, 400); 380 383 dlg->exec(); 381 384 … … 599 602 void MainWindow::loadLangList() 600 603 { 601 QDir dir(PATH_ I18N, "tspsg_*.qm", QDir::Name | QDir::IgnoreCase, QDir::Files);604 QDir dir(PATH_L10N, "tspsg_*.qm", QDir::Name | QDir::IgnoreCase, QDir::Files); 602 605 if (!dir.exists()) 603 606 return; … … 610 613 for (int k = 0; k < langs.size(); k++) { 611 614 QFileInfo lang = langs.at(k); 612 if (lang.completeBaseName().compare("tspsg_en", Qt::CaseInsensitive) && t.load(lang.completeBaseName(), PATH_ I18N)) {615 if (lang.completeBaseName().compare("tspsg_en", Qt::CaseInsensitive) && t.load(lang.completeBaseName(), PATH_L10N)) { 613 616 name = t.translate("--------", "LANGNAME", "Please, provide a native name of your translation language here."); 614 617 a = menuSettingsLanguage->addAction(name); … … 654 657 else { 655 658 // No luck. Let's try to load a bundled one. 656 if (qtTranslator->load("qt_" + lng, PATH_ I18N))659 if (qtTranslator->load("qt_" + lng, PATH_L10N)) 657 660 qApp->installTranslator(qtTranslator); 658 661 else { … … 665 668 // Now let's load application translation. 666 669 translator = new QTranslator(this); 667 if (translator->load("tspsg_" + lng, PATH_ I18N))670 if (translator->load("tspsg_" + lng, PATH_L10N)) 668 671 qApp->installTranslator(translator); 669 672 else { … … 863 866 retranslateUi(false); 864 867 868 #ifdef Q_OS_WIN32 865 869 // Adding some eyecandy in Vista and 7 :-) 866 870 if (QtWin::isCompositionEnabled() && settings->value("UseTranslucency", DEF_USE_TRANSLUCENCY).toBool()) { 867 871 toggleTranclucency(true); 868 872 } 873 #endif // Q_OS_WIN32 869 874 } 870 875 … … 884 889 void MainWindow::toggleTranclucency(bool enable) 885 890 { 891 #ifdef Q_OS_WIN32 886 892 QtWin::enableBlurBehindWindow(this, enable); 887 893 QtWin::enableBlurBehindWindow(tabWidget, enable); … … 891 897 if (QtWin::enableBlurBehindWindow(tabSolution, enable)) 892 898 tabSolution->setAutoFillBackground(enable); 893 } 899 #else 900 Q_UNUSED(enable); 901 #endif // Q_OS_WIN32 902 } -
src/qtwin.cpp
r278bc7818f r162d5c5f94 115 115 { 116 116 Q_ASSERT(widget); 117 Q_UNUSED(widget); 118 Q_UNUSED(enable); 117 119 bool result = false; 118 120 #ifdef Q_WS_WIN … … 151 153 152 154 Q_ASSERT(widget); 155 Q_UNUSED(widget); 153 156 Q_UNUSED(left); 154 157 Q_UNUSED(top); -
src/settingsdialog.cpp
r278bc7818f r162d5c5f94 76 76 QHBoxLayout *hbox1; 77 77 78 #ifdef Q_OS_WIN32 78 79 if (QtWin::isCompositionEnabled()) { 79 80 cbUseTranslucency = new QCheckBox(bgWhite); … … 85 86 cbUseTranslucency->setCursor(QCursor(Qt::PointingHandCursor)); 86 87 } 88 #endif // Q_OS_WIN32 87 89 88 90 cbSaveState = new QCheckBox(bgWhite); -
src/version.h
r278bc7818f r162d5c5f94 52 52 53 53 //! TSPSG version ID 54 #define VERSIONID "$Id$"54 //#define VERSIONID "$Id$" 55 55 //! Major version of current TSPSG build 56 #define BUILD_VERSION_MAJOR 056 //#define BUILD_VERSION_MAJOR 0 57 57 //! Minor version of current TSPSG build 58 #define BUILD_VERSION_MINOR 158 //#define BUILD_VERSION_MINOR 1 59 59 /*! 60 60 * \brief TSPSG release number … … 66 66 * - 11 -- x: <b>release</b> 1 to x-10 67 67 */ 68 #define BUILD_RELEASE 268 //#define BUILD_RELEASE 2 69 69 70 70 /*! … … 73 73 * This will only change on releases and will be the same as revision number. 74 74 */ 75 #define BUILD_NUMBER 6553575 //#define BUILD_NUMBER 65535 76 76 77 77 /*! … … 81 81 * Determined based on BUILD_NUMBER and BUILD_RELEASE. 82 82 */ 83 #if BUILD_NUMBER == 6553583 #ifndef TSPSG_RELEASE_BUILD 84 84 #define BUILD_STATUS (dev build) 85 85 #else … … 90 90 #elif BUILD_RELEASE < 11 91 91 #define BUILD_STATUS (rc) 92 #else93 #define BUILD_STATUS92 // #else 93 // #define BUILD_STATUS 94 94 #endif 95 #endif // BUILD_NUMBER == 6553595 #endif // TSPSG_RELEASE_BUILD 96 96 97 97 //! \internal \brief A helper for QUOTE(x). … … 102 102 /*! 103 103 * \def BUILD_VERSION 104 * \brief Full version of TSPSG in the form: \c major.\c minor.\c release [ \c status].104 * \brief Full version of TSPSG in the form: \c major.\c minor.\c release.\c build [ \c status]. 105 105 */ 106 106 #ifndef BUILD_STATUS 107 #define BUILD_VERSION QUOTE(BUILD_VERSION_MAJOR.BUILD_VERSION_MINOR.BUILD_RELEASE )107 #define BUILD_VERSION QUOTE(BUILD_VERSION_MAJOR.BUILD_VERSION_MINOR.BUILD_RELEASE.BUILD_NUMBER) 108 108 #else 109 #define BUILD_VERSION QUOTE(BUILD_VERSION_MAJOR.BUILD_VERSION_MINOR.BUILD_RELEASE BUILD_STATUS)109 #define BUILD_VERSION QUOTE(BUILD_VERSION_MAJOR.BUILD_VERSION_MINOR.BUILD_RELEASE.BUILD_NUMBER BUILD_STATUS) 110 110 #endif 111 111
Note: See TracChangeset
for help on using the changeset viewer.