mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
* Only allow one settings dialog at a time.
This commit is contained in:
@@ -1000,10 +1000,15 @@ TomahawkWindow::onHistoryForwardAvailable( bool avail )
|
|||||||
void
|
void
|
||||||
TomahawkWindow::showSettingsDialog()
|
TomahawkWindow::showSettingsDialog()
|
||||||
{
|
{
|
||||||
SettingsDialog* settingsDialog = new SettingsDialog;
|
if ( m_settingsDialog )
|
||||||
connect( settingsDialog, SIGNAL( finished( bool ) ), settingsDialog, SLOT( deleteLater() ) );
|
return;
|
||||||
|
|
||||||
settingsDialog->show();
|
m_settingsDialog = new SettingsDialog;
|
||||||
|
// This needs to be a QueuedConnection, so that deleteLater() actually works.
|
||||||
|
connect( m_settingsDialog.data(), SIGNAL( finished( bool ) ),
|
||||||
|
m_settingsDialog.data(), SLOT( deleteLater() ), Qt::QueuedConnection );
|
||||||
|
|
||||||
|
m_settingsDialog->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -56,12 +56,12 @@ class QSearchField;
|
|||||||
class SourceTreeView;
|
class SourceTreeView;
|
||||||
class QAction;
|
class QAction;
|
||||||
|
|
||||||
|
class SettingsDialog;
|
||||||
class MusicScanner;
|
class MusicScanner;
|
||||||
class AudioControls;
|
class AudioControls;
|
||||||
class TomahawkTrayIcon;
|
class TomahawkTrayIcon;
|
||||||
class PlaylistModel;
|
class PlaylistModel;
|
||||||
class AnimatedSplitter;
|
class AnimatedSplitter;
|
||||||
|
|
||||||
class AccountsToolButton;
|
class AccountsToolButton;
|
||||||
|
|
||||||
namespace Ui
|
namespace Ui
|
||||||
@@ -179,6 +179,7 @@ private:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
Ui::TomahawkWindow* ui;
|
Ui::TomahawkWindow* ui;
|
||||||
|
QPointer<SettingsDialog> m_settingsDialog;
|
||||||
QSearchField* m_searchWidget;
|
QSearchField* m_searchWidget;
|
||||||
AudioControls* m_audioControls;
|
AudioControls* m_audioControls;
|
||||||
TomahawkTrayIcon* m_trayIcon;
|
TomahawkTrayIcon* m_trayIcon;
|
||||||
|
Reference in New Issue
Block a user