diff options
| author | 2012-02-26 14:57:49 +0000 | |
|---|---|---|
| committer | 2012-02-26 14:57:49 +0000 | |
| commit | b2891fe17c395b885b4fac8634fa8cca1a45fbb6 (patch) | |
| tree | e9fcfdebc14137188b3cf02376fe90145d52943d /src/modules/notifier/NotifierWindow.cpp | |
| parent | Some mixed changes, mostly related to osx development: (diff) | |
| download | KVIrc-b2891fe17c395b885b4fac8634fa8cca1a45fbb6.tar.gz KVIrc-b2891fe17c395b885b4fac8634fa8cca1a45fbb6.tar.bz2 KVIrc-b2891fe17c395b885b4fac8634fa8cca1a45fbb6.zip | |
Dropped the KviTalPopupMenu layer, ported the involved code to QAction.
This fixes most of the random crashes on osx, and is the base for a next change in the menubar.
Addiotional fix: "disconnect" menu entry was broken since the 3.x era
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@6072 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/notifier/NotifierWindow.cpp')
| -rw-r--r-- | src/modules/notifier/NotifierWindow.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/modules/notifier/NotifierWindow.cpp b/src/modules/notifier/NotifierWindow.cpp index 651b2a77b..b6897ecac 100644 --- a/src/modules/notifier/NotifierWindow.cpp +++ b/src/modules/notifier/NotifierWindow.cpp @@ -953,9 +953,9 @@ void NotifierWindow::contextPopup(const QPoint & pos) { if(!m_pContextPopup) { - m_pContextPopup = new KviTalPopupMenu(this); + m_pContextPopup = new QMenu(this); connect(m_pContextPopup,SIGNAL(aboutToShow()),this,SLOT(fillContextPopup())); - m_pDisablePopup = new KviTalPopupMenu(this); + m_pDisablePopup = new QMenu(this); } m_pContextPopup->popup(pos); @@ -964,20 +964,20 @@ void NotifierWindow::contextPopup(const QPoint & pos) void NotifierWindow::fillContextPopup() { m_pContextPopup->clear(); - m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KviIconManager::Editor)),__tr2qs_ctx("Show/Hide input line","notifier"),this,SLOT(toggleLineEdit())); - m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KviIconManager::Close)),__tr2qs_ctx("Hide","notifier"),this,SLOT(hideNow())); - m_pContextPopup->insertSeparator(); + m_pContextPopup->addAction(*(g_pIconManager->getSmallIcon(KviIconManager::Editor)),__tr2qs_ctx("Show/Hide input line","notifier"),this,SLOT(toggleLineEdit())); + m_pContextPopup->addAction(*(g_pIconManager->getSmallIcon(KviIconManager::Close)),__tr2qs_ctx("Hide","notifier"),this,SLOT(hideNow())); + m_pContextPopup->addSeparator(); m_pDisablePopup->clear(); - m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KviIconManager::Time)),__tr2qs_ctx("1 Minute","notifier"),this,SLOT(disableFor1Minute())); - m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KviIconManager::Time)),__tr2qs_ctx("5 Minutes","notifier"),this,SLOT(disableFor5Minutes())); - m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KviIconManager::Time)),__tr2qs_ctx("15 Minutes","notifier"),this,SLOT(disableFor15Minutes())); - m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KviIconManager::Time)),__tr2qs_ctx("30 Minutes","notifier"),this,SLOT(disableFor30Minutes())); - m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KviIconManager::Time)),__tr2qs_ctx("1 Hour","notifier"),this,SLOT(disableFor60Minutes())); - m_pDisablePopup->insertSeparator(); - m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KviIconManager::Quit)),__tr2qs_ctx("Until KVIrc is Restarted","notifier"),this,SLOT(disableUntilKVIrcRestarted())); - m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KviIconManager::Quit)),__tr2qs_ctx("Permanently (Until Explicitly Enabled)","notifier"),this,SLOT(disablePermanently())); + m_pDisablePopup->addAction(*(g_pIconManager->getSmallIcon(KviIconManager::Time)),__tr2qs_ctx("1 Minute","notifier"),this,SLOT(disableFor1Minute())); + m_pDisablePopup->addAction(*(g_pIconManager->getSmallIcon(KviIconManager::Time)),__tr2qs_ctx("5 Minutes","notifier"),this,SLOT(disableFor5Minutes())); + m_pDisablePopup->addAction(*(g_pIconManager->getSmallIcon(KviIconManager::Time)),__tr2qs_ctx("15 Minutes","notifier"),this,SLOT(disableFor15Minutes())); + m_pDisablePopup->addAction(*(g_pIconManager->getSmallIcon(KviIconManager::Time)),__tr2qs_ctx("30 Minutes","notifier"),this,SLOT(disableFor30Minutes())); + m_pDisablePopup->addAction(*(g_pIconManager->getSmallIcon(KviIconManager::Time)),__tr2qs_ctx("1 Hour","notifier"),this,SLOT(disableFor60Minutes())); + m_pDisablePopup->addSeparator(); + m_pDisablePopup->addAction(*(g_pIconManager->getSmallIcon(KviIconManager::Quit)),__tr2qs_ctx("Until KVIrc is Restarted","notifier"),this,SLOT(disableUntilKVIrcRestarted())); + m_pDisablePopup->addAction(*(g_pIconManager->getSmallIcon(KviIconManager::Quit)),__tr2qs_ctx("Permanently (Until Explicitly Enabled)","notifier"),this,SLOT(disablePermanently())); - m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KviIconManager::Quit)),__tr2qs_ctx("Disable","notifier"),m_pDisablePopup); + m_pContextPopup->addAction(*(g_pIconManager->getSmallIcon(KviIconManager::Quit)),__tr2qs_ctx("Disable","notifier"))->setMenu(m_pDisablePopup); } void NotifierWindow::disableFor15Minutes() |
