mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-21 05:39:11 -04:00
Add the ability to change OpMode in command line.
So you can change OpMode while running via ssh to get more bandwidth. Usage: RetroShare06 --opmode [full|noturtle|gaming|minimal]
This commit is contained in:
parent
1491a051dc
commit
8563957591
4 changed files with 66 additions and 25 deletions
|
@ -1492,6 +1492,23 @@ void MainWindow::processLastArgs()
|
|||
/* Now use files from the command line, because no RetroShare was running */
|
||||
openRsCollection(Rshare::files()->takeFirst());
|
||||
}
|
||||
/* Handle the -opmode options. */
|
||||
if (opModeStatus) {
|
||||
QString opmode = Rshare::opmode().toLower();
|
||||
if (opmode == "noturtle") {
|
||||
opModeStatus->setCurrentIndex(RS_OPMODE_NOTURTLE - 1);
|
||||
} else if (opmode == "gaming") {
|
||||
opModeStatus->setCurrentIndex(RS_OPMODE_GAMING - 1);
|
||||
} else if (opmode == "minimal") {
|
||||
opModeStatus->setCurrentIndex(RS_OPMODE_MINIMAL - 1);
|
||||
} else {
|
||||
opModeStatus->setCurrentIndex(RS_OPMODE_FULL - 1);
|
||||
}
|
||||
opModeStatus->setOpMode();
|
||||
} else {
|
||||
std::cerr << "ERR: MainWindow::processLastArgs opModeStatus is not initialized.";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::switchVisibilityStatus(StatusElement e,bool b)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue