mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-24 12:46:35 +01:00
parent
9af542aa03
commit
345d03105f
@ -346,20 +346,20 @@ void BrowserWindow::setupMenu()
|
|||||||
if (!macMainMenu) {
|
if (!macMainMenu) {
|
||||||
macMainMenu = new MainMenu(this, 0);
|
macMainMenu = new MainMenu(this, 0);
|
||||||
macMainMenu->initMenuBar(new QMenuBar(0));
|
macMainMenu->initMenuBar(new QMenuBar(0));
|
||||||
|
connect(mApp, SIGNAL(activeWindowChanged(BrowserWindow*)), macMainMenu, SLOT(setWindow(BrowserWindow*)));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
macMainMenu->setWindow(this);
|
macMainMenu->setWindow(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_mainMenu = macMainMenu;
|
m_mainMenu = macMainMenu;
|
||||||
m_mainMenu->initSuperMenu(m_superMenu);
|
|
||||||
#else
|
#else
|
||||||
setMenuBar(new MenuBar(this));
|
setMenuBar(new MenuBar(this));
|
||||||
|
|
||||||
m_mainMenu = new MainMenu(this, this);
|
m_mainMenu = new MainMenu(this, this);
|
||||||
m_mainMenu->initMenuBar(menuBar());
|
m_mainMenu->initMenuBar(menuBar());
|
||||||
m_mainMenu->initSuperMenu(m_superMenu);
|
|
||||||
#endif
|
#endif
|
||||||
|
m_mainMenu->initSuperMenu(m_superMenu);
|
||||||
|
|
||||||
// Setup other shortcuts
|
// Setup other shortcuts
|
||||||
QShortcut* reloadBypassCacheAction = new QShortcut(QKeySequence(QSL("Ctrl+F5")), this);
|
QShortcut* reloadBypassCacheAction = new QShortcut(QKeySequence(QSL("Ctrl+F5")), this);
|
||||||
|
@ -845,6 +845,8 @@ void MainApplication::onFocusChanged()
|
|||||||
|
|
||||||
if (activeBrowserWindow) {
|
if (activeBrowserWindow) {
|
||||||
m_lastActiveWindow = activeBrowserWindow;
|
m_lastActiveWindow = activeBrowserWindow;
|
||||||
|
|
||||||
|
emit activeWindowChanged(m_lastActiveWindow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,6 +121,7 @@ public slots:
|
|||||||
|
|
||||||
signals:
|
signals:
|
||||||
void settingsReloaded();
|
void settingsReloaded();
|
||||||
|
void activeWindowChanged(BrowserWindow* window);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void postLaunch();
|
void postLaunch();
|
||||||
|
@ -38,13 +38,15 @@ class QUPZILLA_EXPORT MainMenu : public QMenu
|
|||||||
public:
|
public:
|
||||||
explicit MainMenu(BrowserWindow* window, QWidget* parent = 0);
|
explicit MainMenu(BrowserWindow* window, QWidget* parent = 0);
|
||||||
|
|
||||||
void setWindow(BrowserWindow* window);
|
|
||||||
|
|
||||||
void initMenuBar(QMenuBar* menuBar) const;
|
void initMenuBar(QMenuBar* menuBar) const;
|
||||||
void initSuperMenu(QMenu* superMenu) const;
|
void initSuperMenu(QMenu* superMenu) const;
|
||||||
|
|
||||||
QAction* action(const QString &name) const;
|
QAction* action(const QString &name) const;
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void setWindow(BrowserWindow* window);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
// Standard actions
|
// Standard actions
|
||||||
void showAboutDialog();
|
void showAboutDialog();
|
||||||
|
Loading…
Reference in New Issue
Block a user