Changeset 96 in tspsg-svn for trunk/src/mainwindow.cpp
- Timestamp:
- Mar 1, 2010, 2:13:23 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mainwindow.cpp
r95 r96 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 }
Note: See TracChangeset
for help on using the changeset viewer.