mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-14 16:18:48 -05:00
Merge pull request #386 from PhenomRetroShare/Add_AbilityToChangeOpModeInCmdLine
Add the ability to change OpMode in command line.
This commit is contained in:
commit
e56340e0a1
10 changed files with 143 additions and 44 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)
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public:
|
|||
QColor getOpMode_Minimal_Color() const;
|
||||
void setOpMode_Minimal_Color( QColor c );
|
||||
|
||||
private slots:
|
||||
public slots:
|
||||
void setOpMode();
|
||||
|
||||
private:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue