|
|
|
@ -195,10 +195,8 @@ MainWindow::MainWindow(QWidget *parent)
@@ -195,10 +195,8 @@ MainWindow::MainWindow(QWidget *parent)
|
|
|
|
|
m_ui->actionManageCookies->setIcon(UIThemeManager::instance()->getIcon("preferences-web-browser-cookies")); |
|
|
|
|
|
|
|
|
|
auto *lockMenu = new QMenu(this); |
|
|
|
|
QAction *defineUiLockPasswdAct = lockMenu->addAction(tr("&Set Password")); |
|
|
|
|
connect(defineUiLockPasswdAct, &QAction::triggered, this, &MainWindow::defineUILockPassword); |
|
|
|
|
QAction *clearUiLockPasswdAct = lockMenu->addAction(tr("&Clear Password")); |
|
|
|
|
connect(clearUiLockPasswdAct, &QAction::triggered, this, &MainWindow::clearUILockPassword); |
|
|
|
|
lockMenu->addAction(tr("&Set Password"), this, &MainWindow::defineUILockPassword); |
|
|
|
|
lockMenu->addAction(tr("&Clear Password"), this, &MainWindow::clearUILockPassword); |
|
|
|
|
m_ui->actionLock->setMenu(lockMenu); |
|
|
|
|
|
|
|
|
|
// Creating Bittorrent session
|
|
|
|
@ -550,16 +548,11 @@ void MainWindow::addToolbarContextMenu()
@@ -550,16 +548,11 @@ void MainWindow::addToolbarContextMenu()
|
|
|
|
|
m_ui->toolBar->setContextMenuPolicy(Qt::CustomContextMenu); |
|
|
|
|
connect(m_ui->toolBar, &QWidget::customContextMenuRequested, this, &MainWindow::toolbarMenuRequested); |
|
|
|
|
|
|
|
|
|
QAction *iconsOnly = m_toolbarMenu->addAction(tr("Icons Only")); |
|
|
|
|
connect(iconsOnly, &QAction::triggered, this, &MainWindow::toolbarIconsOnly); |
|
|
|
|
QAction *textOnly = m_toolbarMenu->addAction(tr("Text Only")); |
|
|
|
|
connect(textOnly, &QAction::triggered, this, &MainWindow::toolbarTextOnly); |
|
|
|
|
QAction *textBesideIcons = m_toolbarMenu->addAction(tr("Text Alongside Icons")); |
|
|
|
|
connect(textBesideIcons, &QAction::triggered, this, &MainWindow::toolbarTextBeside); |
|
|
|
|
QAction *textUnderIcons = m_toolbarMenu->addAction(tr("Text Under Icons")); |
|
|
|
|
connect(textUnderIcons, &QAction::triggered, this, &MainWindow::toolbarTextUnder); |
|
|
|
|
QAction *followSystemStyle = m_toolbarMenu->addAction(tr("Follow System Style")); |
|
|
|
|
connect(followSystemStyle, &QAction::triggered, this, &MainWindow::toolbarFollowSystem); |
|
|
|
|
QAction *iconsOnly = m_toolbarMenu->addAction(tr("Icons Only"), this, &MainWindow::toolbarIconsOnly); |
|
|
|
|
QAction *textOnly = m_toolbarMenu->addAction(tr("Text Only"), this, &MainWindow::toolbarTextOnly); |
|
|
|
|
QAction *textBesideIcons = m_toolbarMenu->addAction(tr("Text Alongside Icons"), this, &MainWindow::toolbarTextBeside); |
|
|
|
|
QAction *textUnderIcons = m_toolbarMenu->addAction(tr("Text Under Icons"), this, &MainWindow::toolbarTextUnder); |
|
|
|
|
QAction *followSystemStyle = m_toolbarMenu->addAction(tr("Follow System Style"), this, &MainWindow::toolbarFollowSystem); |
|
|
|
|
|
|
|
|
|
auto *textPositionGroup = new QActionGroup(m_toolbarMenu); |
|
|
|
|
textPositionGroup->addAction(iconsOnly); |
|
|
|
@ -1804,21 +1797,21 @@ void MainWindow::on_actionOptions_triggered()
@@ -1804,21 +1797,21 @@ void MainWindow::on_actionOptions_triggered()
|
|
|
|
|
|
|
|
|
|
void MainWindow::on_actionTopToolBar_triggered() |
|
|
|
|
{ |
|
|
|
|
const bool isVisible = static_cast<QAction*>(sender())->isChecked(); |
|
|
|
|
const bool isVisible = static_cast<QAction *>(sender())->isChecked(); |
|
|
|
|
m_ui->toolBar->setVisible(isVisible); |
|
|
|
|
Preferences::instance()->setToolbarDisplayed(isVisible); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void MainWindow::on_actionShowStatusbar_triggered() |
|
|
|
|
{ |
|
|
|
|
const bool isVisible = static_cast<QAction*>(sender())->isChecked(); |
|
|
|
|
const bool isVisible = static_cast<QAction *>(sender())->isChecked(); |
|
|
|
|
Preferences::instance()->setStatusbarDisplayed(isVisible); |
|
|
|
|
showStatusBar(isVisible); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void MainWindow::on_actionSpeedInTitleBar_triggered() |
|
|
|
|
{ |
|
|
|
|
m_displaySpeedInTitle = static_cast<QAction * >(sender())->isChecked(); |
|
|
|
|
m_displaySpeedInTitle = static_cast<QAction *>(sender())->isChecked(); |
|
|
|
|
Preferences::instance()->showSpeedInTitleBar(m_displaySpeedInTitle); |
|
|
|
|
if (m_displaySpeedInTitle) |
|
|
|
|
reloadSessionStats(); |
|
|
|
@ -2097,7 +2090,7 @@ void MainWindow::checkProgramUpdate()
@@ -2097,7 +2090,7 @@ void MainWindow::checkProgramUpdate()
|
|
|
|
|
m_ui->actionCheckForUpdates->setEnabled(false); |
|
|
|
|
m_ui->actionCheckForUpdates->setText(tr("Checking for Updates...")); |
|
|
|
|
m_ui->actionCheckForUpdates->setToolTip(tr("Already checking for program updates in the background")); |
|
|
|
|
bool invokedByUser = m_ui->actionCheckForUpdates == qobject_cast<QAction * >(sender()); |
|
|
|
|
bool invokedByUser = m_ui->actionCheckForUpdates == qobject_cast<QAction *>(sender()); |
|
|
|
|
ProgramUpdater *updater = new ProgramUpdater(this, invokedByUser); |
|
|
|
|
connect(updater, &ProgramUpdater::updateCheckFinished, this, &MainWindow::handleUpdateCheckFinished); |
|
|
|
|
updater->checkForUpdates(); |
|
|
|
|