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()
|
void MainMenu::showPreferences()
|
||||||
{
|
{
|
||||||
Preferences* prefs = new Preferences(m_window, this);
|
if (!m_preferences)
|
||||||
prefs->show();
|
m_preferences = new Preferences(m_window, this);
|
||||||
|
|
||||||
|
m_preferences->show();
|
||||||
|
m_preferences->raise();
|
||||||
|
m_preferences->activateWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainMenu::quitApplication()
|
void MainMenu::quitApplication()
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
class QMenuBar;
|
class QMenuBar;
|
||||||
|
|
||||||
|
class Preferences;
|
||||||
class HistoryMenu;
|
class HistoryMenu;
|
||||||
class BookmarksMenu;
|
class BookmarksMenu;
|
||||||
class BrowserWindow;
|
class BrowserWindow;
|
||||||
@ -122,6 +123,7 @@ private:
|
|||||||
|
|
||||||
QHash<QString, QAction*> m_actions;
|
QHash<QString, QAction*> m_actions;
|
||||||
QPointer<BrowserWindow> m_window;
|
QPointer<BrowserWindow> m_window;
|
||||||
|
QPointer<Preferences> m_preferences;
|
||||||
|
|
||||||
QMenu* m_menuFile;
|
QMenu* m_menuFile;
|
||||||
QMenu* m_menuEdit;
|
QMenu* m_menuEdit;
|
||||||
|
Loading…
Reference in New Issue
Block a user