mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Preferences: Prevent opening more than one window
This commit is contained in:
parent
fbcb3022ee
commit
05c1fec5c6
@ -118,8 +118,12 @@ void MainMenu::showAboutDialog()
|
||||
|
||||
void MainMenu::showPreferences()
|
||||
{
|
||||
Preferences* prefs = new Preferences(m_window, this);
|
||||
prefs->show();
|
||||
if (!m_preferences)
|
||||
m_preferences = new Preferences(m_window, this);
|
||||
|
||||
m_preferences->show();
|
||||
m_preferences->raise();
|
||||
m_preferences->activateWindow();
|
||||
}
|
||||
|
||||
void MainMenu::quitApplication()
|
||||
|
@ -26,6 +26,7 @@
|
||||
|
||||
class QMenuBar;
|
||||
|
||||
class Preferences;
|
||||
class HistoryMenu;
|
||||
class BookmarksMenu;
|
||||
class BrowserWindow;
|
||||
@ -122,6 +123,7 @@ private:
|
||||
|
||||
QHash<QString, QAction*> m_actions;
|
||||
QPointer<BrowserWindow> m_window;
|
||||
QPointer<Preferences> m_preferences;
|
||||
|
||||
QMenu* m_menuFile;
|
||||
QMenu* m_menuEdit;
|
||||
|
Loading…
Reference in New Issue
Block a user