mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-13 01:39:29 -04:00
Save last state of OpMode status bar droplist and restore it at start.
This commit is contained in:
parent
464e89b766
commit
48d7c57662
1 changed files with 6 additions and 0 deletions
|
@ -23,7 +23,10 @@
|
|||
#include <QLabel>
|
||||
|
||||
#include "gui/statusbar/OpModeStatus.h"
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
|
||||
#include <retroshare/rsconfig.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
OpModeStatus::OpModeStatus(QWidget *parent)
|
||||
|
@ -37,6 +40,8 @@ OpModeStatus::OpModeStatus(QWidget *parent)
|
|||
|
||||
connect(this, SIGNAL(activated( int )), this, SLOT(setOpMode()));
|
||||
|
||||
setCurrentIndex(Settings->valueFromGroup("StatusBar", "OpMode", QVariant(0)).toInt());
|
||||
setOpMode();
|
||||
setToolTip(tr("Use this DropList to quickly change Retroshare's behaviour\n No Anon D/L: switches off file forwarding\n Gaming Mode: 25% standard traffic and TODO: reduced popups\n Low Traffic: 10% standard traffic and TODO: pauses all file-transfers"));
|
||||
|
||||
setFocusPolicy(Qt::ClickFocus);
|
||||
|
@ -77,6 +82,7 @@ void OpModeStatus::setOpMode()
|
|||
|
||||
// reload to be safe.
|
||||
getOpMode();
|
||||
Settings->setValueToGroup("StatusBar", "OpMode", idx);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue