433 editNetNick = new QLineEdit(groupMisc); |
433 editNetNick = new QLineEdit(groupMisc); |
434 editNetNick->setMaxLength(20); |
434 editNetNick->setMaxLength(20); |
435 editNetNick->setText(QLineEdit::tr("unnamed")); |
435 editNetNick->setText(QLineEdit::tr("unnamed")); |
436 MiscLayout->addWidget(editNetNick, 0, 1); |
436 MiscLayout->addWidget(editNetNick, 0, 1); |
437 |
437 |
|
438 QLabel *labelLanguage = new QLabel(groupMisc); |
|
439 labelLanguage->setText(QLabel::tr("Locale") + " *"); |
|
440 MiscLayout->addWidget(labelLanguage, 1, 0); |
|
441 |
|
442 CBLanguage = new QComboBox(groupMisc); |
|
443 QDir tmpdir; |
|
444 tmpdir.cd(datadir->absolutePath()); |
|
445 tmpdir.cd("Locale"); |
|
446 tmpdir.setFilter(QDir::Files); |
|
447 QStringList locs = tmpdir.entryList(QStringList("hedgewars_*.qm")); |
|
448 for(int i = 0; i < locs.count(); i++) |
|
449 { |
|
450 QLocale loc(locs[i].replace(QRegExp("hedgewars_(.*)\\.qm"), "\\1")); |
|
451 CBLanguage->addItem(QLocale::languageToString(loc.language()) + " (" + QLocale::countryToString(loc.country()) + ")", loc.name()); |
|
452 } |
|
453 |
|
454 MiscLayout->addWidget(CBLanguage, 1, 1); |
|
455 |
438 CBAltDamage = new QCheckBox(groupMisc); |
456 CBAltDamage = new QCheckBox(groupMisc); |
439 CBAltDamage->setText(QCheckBox::tr("Alternative damage show")); |
457 CBAltDamage->setText(QCheckBox::tr("Alternative damage show")); |
440 MiscLayout->addWidget(CBAltDamage, 1, 0, 1, 2); |
458 MiscLayout->addWidget(CBAltDamage, 2, 0, 1, 2); |
441 |
459 |
442 CBNameWithDate = new QCheckBox(groupMisc); |
460 CBNameWithDate = new QCheckBox(groupMisc); |
443 CBNameWithDate->setText(QCheckBox::tr("Append date and time to record file name")); |
461 CBNameWithDate->setText(QCheckBox::tr("Append date and time to record file name")); |
444 MiscLayout->addWidget(CBNameWithDate, 2, 0, 1, 2); |
462 MiscLayout->addWidget(CBNameWithDate, 3, 0, 1, 2); |
445 |
463 |
446 #ifdef SPARKLE_ENABLED |
464 #ifdef SPARKLE_ENABLED |
447 CBAutoUpdate = new QCheckBox(groupMisc); |
465 CBAutoUpdate = new QCheckBox(groupMisc); |
448 CBAutoUpdate->setText(QCheckBox::tr("Check for updates at startup")); |
466 CBAutoUpdate->setText(QCheckBox::tr("Check for updates at startup")); |
449 MiscLayout->addWidget(CBAutoUpdate, 3, 0, 1, 2); |
467 MiscLayout->addWidget(CBAutoUpdate, 4, 0, 1, 2); |
450 #endif |
468 #endif |
451 |
469 |
452 gbTBLayout->addWidget(groupMisc, 2, 0); |
470 gbTBLayout->addWidget(groupMisc, 2, 0); |
453 } |
471 } |
454 |
472 |
465 CBFrontendFullscreen = new QCheckBox(AGGroupBox); |
483 CBFrontendFullscreen = new QCheckBox(AGGroupBox); |
466 CBFrontendFullscreen->setText(QCheckBox::tr("Frontend fullscreen")); |
484 CBFrontendFullscreen->setText(QCheckBox::tr("Frontend fullscreen")); |
467 GBAlayout->addWidget(CBFrontendFullscreen); |
485 GBAlayout->addWidget(CBFrontendFullscreen); |
468 |
486 |
469 CBFrontendEffects = new QCheckBox(AGGroupBox); |
487 CBFrontendEffects = new QCheckBox(AGGroupBox); |
470 CBFrontendEffects->setText(QCheckBox::tr("Frontend effects (requires restart)")); |
488 CBFrontendEffects->setText(QCheckBox::tr("Frontend effects") + " *"); |
471 GBAlayout->addWidget(CBFrontendEffects); |
489 GBAlayout->addWidget(CBFrontendEffects); |
472 |
490 |
473 CBEnableFrontendSound = new QCheckBox(AGGroupBox); |
491 CBEnableFrontendSound = new QCheckBox(AGGroupBox); |
474 CBEnableFrontendSound->setText(QCheckBox::tr("Enable frontend sounds")); |
492 CBEnableFrontendSound->setText(QCheckBox::tr("Enable frontend sounds")); |
475 GBAlayout->addWidget(CBEnableFrontendSound); |
493 GBAlayout->addWidget(CBEnableFrontendSound); |
539 GBAfpslayout->addWidget(fpsedit); |
557 GBAfpslayout->addWidget(fpsedit); |
540 |
558 |
541 CBShowFPS = new QCheckBox(AGGroupBox); |
559 CBShowFPS = new QCheckBox(AGGroupBox); |
542 CBShowFPS->setText(QCheckBox::tr("Show FPS")); |
560 CBShowFPS->setText(QCheckBox::tr("Show FPS")); |
543 GBAlayout->addWidget(CBShowFPS); |
561 GBAlayout->addWidget(CBShowFPS); |
|
562 |
|
563 hr = new QFrame(AGGroupBox); |
|
564 hr->setFrameStyle(QFrame::HLine); |
|
565 hr->setLineWidth(3); |
|
566 hr->setFixedHeight(12); |
|
567 GBAlayout->addWidget(hr); |
|
568 |
|
569 QLabel *restartNote = new QLabel(this); |
|
570 restartNote->setText(QString("* ") + QLabel::tr("Restart game to apply")); |
|
571 GBAlayout->addWidget(restartNote); |
544 |
572 |
545 gbTBLayout->addWidget(AGGroupBox, 0, 1, 3, 1); |
573 gbTBLayout->addWidget(AGGroupBox, 0, 1, 3, 1); |
546 } |
574 } |
547 |
575 |
548 BtnSaveOptions = addButton(":/res/Save.png", pageLayout, 2, 2, true); |
576 BtnSaveOptions = addButton(":/res/Save.png", pageLayout, 2, 2, true); |