Save last state of OpMode status bar droplist and restore it at start.

This commit is contained in:
Phenom 2016-01-30 23:34:42 +01:00
parent 464e89b766
commit 48d7c57662

View File

@ -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);
}