mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-14 08:48:17 +00:00
Cmd+M minimizes main window on Mac OS X (Closes #928216)
This commit is contained in:
parent
1bc6130da5
commit
dd7e515f9c
@ -196,6 +196,7 @@ MainWindow::MainWindow(QWidget *parent, QStringList torrentCmdLine) : QMainWindo
|
|||||||
connect(actionIncreasePriority, SIGNAL(triggered()), transferList, SLOT(increasePrioSelectedTorrents()));
|
connect(actionIncreasePriority, SIGNAL(triggered()), transferList, SLOT(increasePrioSelectedTorrents()));
|
||||||
connect(actionDecreasePriority, SIGNAL(triggered()), transferList, SLOT(decreasePrioSelectedTorrents()));
|
connect(actionDecreasePriority, SIGNAL(triggered()), transferList, SLOT(decreasePrioSelectedTorrents()));
|
||||||
connect(actionToggleVisibility, SIGNAL(triggered()), this, SLOT(toggleVisibility()));
|
connect(actionToggleVisibility, SIGNAL(triggered()), this, SLOT(toggleVisibility()));
|
||||||
|
connect(actionMinimize, SIGNAL(triggered()), SLOT(minimizeWindow()));
|
||||||
|
|
||||||
m_pwr = new PowerManagement(this);
|
m_pwr = new PowerManagement(this);
|
||||||
preventTimer = new QTimer(this);
|
preventTimer = new QTimer(this);
|
||||||
@ -549,6 +550,10 @@ void MainWindow::createKeyboardShortcuts() {
|
|||||||
actionPause_All->setShortcut(QKeySequence(QString::fromUtf8("Ctrl+Shift+P")));
|
actionPause_All->setShortcut(QKeySequence(QString::fromUtf8("Ctrl+Shift+P")));
|
||||||
actionDecreasePriority->setShortcut(QKeySequence(QString::fromUtf8("Ctrl+-")));
|
actionDecreasePriority->setShortcut(QKeySequence(QString::fromUtf8("Ctrl+-")));
|
||||||
actionIncreasePriority->setShortcut(QKeySequence(QString::fromUtf8("Ctrl++")));
|
actionIncreasePriority->setShortcut(QKeySequence(QString::fromUtf8("Ctrl++")));
|
||||||
|
#ifdef Q_WS_MAC
|
||||||
|
actionMinimize->setShortcut(QKeySequence(QString::fromUtf8("Ctrl+M")));
|
||||||
|
addAction(actionMinimize);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Keyboard shortcuts slots
|
// Keyboard shortcuts slots
|
||||||
@ -1332,6 +1337,11 @@ void MainWindow::showConnectionSettings()
|
|||||||
options->showConnectionTab();
|
options->showConnectionTab();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::minimizeWindow()
|
||||||
|
{
|
||||||
|
setWindowState(windowState() ^ Qt::WindowMinimized);
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionExecution_Logs_triggered(bool checked)
|
void MainWindow::on_actionExecution_Logs_triggered(bool checked)
|
||||||
{
|
{
|
||||||
if(checked) {
|
if(checked) {
|
||||||
|
@ -110,6 +110,7 @@ protected slots:
|
|||||||
bool unlockUI();
|
bool unlockUI();
|
||||||
void notifyOfUpdate(QString);
|
void notifyOfUpdate(QString);
|
||||||
void showConnectionSettings();
|
void showConnectionSettings();
|
||||||
|
void minimizeWindow();
|
||||||
// Keyboard shortcuts
|
// Keyboard shortcuts
|
||||||
void createKeyboardShortcuts();
|
void createKeyboardShortcuts();
|
||||||
void displayTransferTab() const;
|
void displayTransferTab() const;
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>914</width>
|
<width>914</width>
|
||||||
<height>25</height>
|
<height>22</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menu_Edit">
|
<widget class="QMenu" name="menu_Edit">
|
||||||
@ -370,6 +370,11 @@
|
|||||||
<string>Show</string>
|
<string>Show</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionMinimize">
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">Minimize</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="icons.qrc"/>
|
<include location="icons.qrc"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user