[Mac] Fixed, actions were not triggered.

remotes/origin/falkon
S. Razi Alavizadeh 13 years ago
parent a1ff0799cb
commit 05a8b7fcc5
  1. 6
      src/lib/app/mainapplication.h
  2. 6
      src/lib/app/qupzilla.cpp
  3. 6
      src/lib/other/macmenureceiver.cpp

@ -182,9 +182,6 @@ private:
#endif
DatabaseWriter* m_dbWriter;
UserAgentManager* m_uaManager;
#ifdef Q_OS_MAC
MacMenuReceiver* m_macMenuReceiver;
#endif
QList<QPointer<QupZilla> > m_mainWindows;
QString m_activeProfil;
@ -203,6 +200,9 @@ private:
#ifdef Q_OS_WIN
RegisterQAppAssociation* m_registerQAppAssociation;
#endif
#ifdef Q_OS_MAC
MacMenuReceiver* m_macMenuReceiver;
#endif
};
#endif // MAINAPPLICATION_H

@ -1076,7 +1076,9 @@ void QupZilla::aboutToShowViewMenu()
void QupZilla::aboutToHideViewMenu()
{
#ifndef Q_OS_MAC
m_actionPageSource->setEnabled(false);
#endif
}
void QupZilla::aboutToShowEditMenu()
@ -1095,9 +1097,11 @@ void QupZilla::aboutToShowEditMenu()
void QupZilla::aboutToHideEditMenu()
{
#ifndef Q_OS_MAC
foreach(QAction * act, m_menuEdit->actions()) {
act->setEnabled(false);
}
#endif
m_menuEdit->actions().at(8)->setEnabled(true);
m_actionPreferences->setEnabled(true);
@ -1110,7 +1114,9 @@ void QupZilla::aboutToShowToolsMenu()
void QupZilla::aboutToHideToolsMenu()
{
#ifndef Q_OS_MAC
m_actionPageInfo->setEnabled(false);
#endif
}
void QupZilla::aboutToShowEncodingMenu()

@ -29,8 +29,8 @@
MacMenuReceiver::MacMenuReceiver(QObject* parent)
: QObject(parent)
, m_macMenuBar(0)
, m_menuBookmarksAction(0)
, m_bookmarksMenuChanged(true)
, m_menuBookmarksAction(0)
{
}
@ -49,7 +49,7 @@ void MacMenuReceiver::setEnabledSelectedMenuActions(QMenu* menu, const QList<int
}
foreach (int index, indexList) {
Q_ASSERT(index < 0 || index >= menu->actions().size());
Q_ASSERT(index >= 0 && index < menu->actions().size());
menu->actions().at(index)->setEnabled(true);
}
}
@ -69,7 +69,7 @@ void MacMenuReceiver::setDisabledSelectedMenuActions(QMenu* menu, const QList<in
}
foreach (int index, indexList) {
Q_ASSERT(index < 0 || index >= menu->actions().size());
Q_ASSERT(index >= 0 && index < menu->actions().size());
menu->actions().at(index)->setDisabled(true);
}
}

Loading…
Cancel
Save