diff --git a/include/SignalSender.h b/include/SignalSender.h index 3ea147a8f4c..e0a93e69474 100644 --- a/include/SignalSender.h +++ b/include/SignalSender.h @@ -13,11 +13,11 @@ class SignalSender : public QObject signals: void closeAllSignal(); - void closeAllButThisSignal(SubWindow * source); + void closeOthersSignal(SubWindow * source); public slots: void closeAll(); - void closeAllButThis(SubWindow* source); + void closeOthers(SubWindow* source); }; #endif diff --git a/include/SubWindow.h b/include/SubWindow.h index 9632d8e6850..0cee0ffba6b 100644 --- a/include/SubWindow.h +++ b/include/SubWindow.h @@ -92,15 +92,15 @@ class LMMS_EXPORT SubWindow : public QMdiSubWindow bool m_hasFocus; QMenu* m_systemMenu; QAction* m_closeAllAction; - QAction* m_closeAllButThisAction; + QAction* m_closeOthersAction; static void elideText( QLabel *label, QString text ); void adjustTitleBar(); private slots: void focusChanged( QMdiSubWindow * subWindow ); - void closeAllButThisEmit(); - void closeAllButThisRecive( SubWindow * source); + void closeOthersEmit(); + void closeOthersRecive( SubWindow * source); }; #endif diff --git a/src/gui/SignalSender.cpp b/src/gui/SignalSender.cpp index 4f87e815dab..792e60f5a50 100644 --- a/src/gui/SignalSender.cpp +++ b/src/gui/SignalSender.cpp @@ -11,7 +11,7 @@ void SignalSender::closeAll() emit closeAllSignal(); } -void SignalSender::closeAllButThis(SubWindow* source) +void SignalSender::closeOthers(SubWindow* source) { - emit closeAllButThisSignal(source); + emit closeOthersSignal(source); } diff --git a/src/gui/SubWindow.cpp b/src/gui/SubWindow.cpp index 9480d1dc6e1..eedda2926a2 100644 --- a/src/gui/SubWindow.cpp +++ b/src/gui/SubWindow.cpp @@ -37,15 +37,15 @@ #include "embed.h" #include "SignalSender.h" -void SubWindow::closeAllButThisEmit() +void SubWindow::closeOthersEmit() { // trigger signal sender to send a close event to all elements - emit SignalSender::getInstance()->closeAllButThis(this); + emit SignalSender::getInstance()->closeOthers(this); } -void SubWindow::closeAllButThisRecive(SubWindow* source) +void SubWindow::closeOthersRecive(SubWindow* source) { - // check if source of signal is equal to the current window + // make sure source of signal is not the current window if (source != this) { emit closeSignal(); } @@ -124,20 +124,20 @@ SubWindow::SubWindow( QWidget *parent, Qt::WindowFlags windowFlags ) : // add action to systemMenu m_systemMenu->addAction(m_closeAllAction); - // create 'close all but this' action - m_closeAllButThisAction = new QAction(); - m_closeAllButThisAction->setText("Close all but this"); - m_closeAllButThisAction->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_Q)); + // create 'close others' action + m_closeOthersAction = new QAction(); + m_closeOthersAction->setText("Close others"); + m_closeOthersAction->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_Q)); // connect action to signal emit - connect(m_closeAllButThisAction, SIGNAL(triggered()), this, SLOT(closeAllButThisEmit())); + connect(m_closeOthersAction, SIGNAL(triggered()), this, SLOT(closeOthersEmit())); // connect SignalSender to signal recive - connect(SignalSender::getInstance(), SIGNAL(closeAllButThisSignal(SubWindow*)), this, SLOT(closeAllButThisRecive(SubWindow*))); + connect(SignalSender::getInstance(), SIGNAL(closeOthersSignal(SubWindow*)), this, SLOT(closeOthersRecive(SubWindow*))); // connect signal to close action connect(this, SIGNAL(closeSignal()), this, SLOT(close())); // add action to subwindow to capture keypress - addAction(m_closeAllButThisAction); + addAction(m_closeOthersAction); // add action to systemMenu - m_systemMenu->addAction(m_closeAllButThisAction); + m_systemMenu->addAction(m_closeOthersAction); // update systemMenu setSystemMenu(m_systemMenu);