mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Save last state of OpMode status bar droplist and restore it at start.
This commit is contained in:
parent
464e89b766
commit
48d7c57662
@ -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…
Reference in New Issue
Block a user