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