Skip to content

Commit

Permalink
More filter options + QString texts
Browse files Browse the repository at this point in the history
1) converted source texts to translatable QStrings
2) added radial distance option for some filters
3) added structure exclusion filter option
4) added filter for the first stronghold approximation
5) raised version to 2
  • Loading branch information
Cubitect committed Feb 5, 2022
1 parent 0d5685b commit e660980
Show file tree
Hide file tree
Showing 21 changed files with 818 additions and 545 deletions.
Binary file removed rc/DejaVuSansMono.ttf
Binary file not shown.
6 changes: 3 additions & 3 deletions src/aboutdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

#include <QDialog>

#define VERS_MAJOR 1
#define VERS_MINOR 12
#define VERS_PATCH 1 // negative patch number designates a development version
#define VERS_MAJOR 2
#define VERS_MINOR 0
#define VERS_PATCH -1 // negative patch number designates a development version

// returns +1 if newer, -1 if older and 0 if equal
inline int cmpVers(int major, int minor, int patch)
Expand Down
2 changes: 1 addition & 1 deletion src/collapsible.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ void Collapsible::setInfo(const QString& title, const QString& text)
QPushButton *button = new QPushButton(pixmap, "", this);
button->setStyleSheet("border: none;");
button->setIconSize(pixmap.rect().size());
button->setToolTip("Show help");
button->setToolTip(tr("Show help"));
button->setMaximumSize(14, 14);

connect(button, SIGNAL(clicked()), this, SLOT(showInfo()));
Expand Down
12 changes: 7 additions & 5 deletions src/configdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void ConfigDialog::setBiomeColorPath(QString path)

if (n >= 0)
{
QString txt = QString::asprintf("[%d biomes] ", n) + finfo.baseName();
QString txt = tr("[%n biome(s)] %1", "", n).arg(finfo.baseName());
ui->buttonBiomeColor->setText(txt);
}
else
Expand All @@ -124,7 +124,8 @@ void ConfigDialog::on_buttonBox_clicked(QAbstractButton *button)
void ConfigDialog::on_buttonBiomeColor_clicked()
{
QFileInfo finfo(conf.biomeColorPath);
QString fnam = QFileDialog::getOpenFileName(this, "Load biome color map", finfo.absolutePath(), "Text files (*.txt);;Any files (*)");
QString fnam = QFileDialog::getOpenFileName(
this, tr("Load biome color map"), finfo.absolutePath(), tr("Text files (*.txt);;Any files (*)"));
if (!fnam.isNull())
{
conf.biomeColorPath = fnam;
Expand All @@ -140,7 +141,7 @@ void ConfigDialog::on_buttonClear_clicked()

void ConfigDialog::on_buttonColorHelp_clicked()
{
const char* msg =
QString msg = tr(
"<html><head/><body><p>"
"<b>Custom biome colors</b> should be defined in an ASCII text file, "
"with one biome-color mapping per line. Each mapping should consist "
Expand All @@ -154,6 +155,7 @@ void ConfigDialog::on_buttonColorHelp_clicked()
"</p><p>"
"128&nbsp;[255&nbsp;255&nbsp;0]"
"</p></body></html>"
;
QMessageBox::information(this, "Help: custom biome colors", msg, QMessageBox::Ok);
);
QMessageBox::information(this, tr("Help: custom biome colors"), msg, QMessageBox::Ok);
}

Loading

0 comments on commit e660980

Please sign in to comment.