diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 4cb2a04..6e26465 100755 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -166,6 +166,21 @@ void MainWindow::retranslateMiningTab() { DEBUG("found start mining button"); button2->setText( QObject::tr("Start Mining") ); } + + auto combo = tab->findChild("genproclimit"); + if(combo != nullptr) { + DEBUG("found genproclimit combo"); + + int hwc = std::thread::hardware_concurrency(); + // TODO: Is there a better way than recreating this combobox? + combo->clear(); + auto threadStr = tr("thread"); + auto threadsStr = tr("threads"); + // give options from 1 to hwc/2 , which should represent physical CPUs + for(int i=0; i < hwc/2; i++) { + combo->insertItem(i, QString::number(i+1) % " " % (i+1==1 ? threadStr : threadsStr)); + } + } } // Called every time, when a menu entry of the language menu is called