aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/theme
diff options
context:
space:
mode:
authorGravatar Fabio Bas2012-02-26 14:57:49 +0000
committerGravatar Fabio Bas2012-02-26 14:57:49 +0000
commitb2891fe17c395b885b4fac8634fa8cca1a45fbb6 (patch)
treee9fcfdebc14137188b3cf02376fe90145d52943d /src/modules/theme
parentSome mixed changes, mostly related to osx development: (diff)
downloadKVIrc-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/theme')
-rw-r--r--src/modules/theme/ThemeManagementDialog.cpp8
-rw-r--r--src/modules/theme/ThemeManagementDialog.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/theme/ThemeManagementDialog.cpp b/src/modules/theme/ThemeManagementDialog.cpp
index e1becb2c4..a340385b6 100644
--- a/src/modules/theme/ThemeManagementDialog.cpp
+++ b/src/modules/theme/ThemeManagementDialog.cpp
@@ -47,7 +47,7 @@
#include "KviDynamicToolTip.h"
#include "KviIconManager.h"
#include "KviMessageBox.h"
-#include "KviTalPopupMenu.h"
+#include "QMenu.h"
#include "KviTalListWidget.h"
@@ -237,7 +237,7 @@ ThemeManagementDialog::ThemeManagementDialog(QWidget * parent)
// g->setSpacing(1);
vBox->setAlignment(b,Qt::AlignRight);
fillThemeBox();
- m_pContextPopup = new KviTalPopupMenu(this);
+ m_pContextPopup = new QMenu(this);
if(g_rectManagementDialogGeometry.y() < 5)
{
@@ -328,8 +328,8 @@ void ThemeManagementDialog::contextMenuRequested(const QPoint & pos)
{
m_pListWidget->setCurrentItem(m_pListWidget->itemAt(pos));
m_pContextPopup->clear();
- m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KviIconManager::Minus)),__tr2qs_ctx("&Remove Theme","theme"),this,SLOT(deleteTheme()));
- m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KviIconManager::Accept)),__tr2qs_ctx("&Apply Theme","theme"),this,SLOT(applyCurrentTheme()));
+ m_pContextPopup->addAction(*(g_pIconManager->getSmallIcon(KviIconManager::Minus)),__tr2qs_ctx("&Remove Theme","theme"),this,SLOT(deleteTheme()));
+ m_pContextPopup->addAction(*(g_pIconManager->getSmallIcon(KviIconManager::Accept)),__tr2qs_ctx("&Apply Theme","theme"),this,SLOT(applyCurrentTheme()));
m_pContextPopup->popup(m_pListWidget->viewport()->mapToGlobal(pos));
}
}
diff --git a/src/modules/theme/ThemeManagementDialog.h b/src/modules/theme/ThemeManagementDialog.h
index 0714050a2..c68e0f2af 100644
--- a/src/modules/theme/ThemeManagementDialog.h
+++ b/src/modules/theme/ThemeManagementDialog.h
@@ -27,7 +27,7 @@
#include "KviOptionsWidget.h"
#include "KviPointerList.h"
#include "KviTheme.h"
-#include "KviTalPopupMenu.h"
+#include "QMenu.h"
#include "KviTalWizard.h"
#include "KviTalListWidget.h"
@@ -70,7 +70,7 @@ protected:
KviTalIconAndRichTextItemDelegate * m_pItemDelegate;
KviTalListWidget * m_pListWidget;
QLabel * m_pCurrentInstalledThemeLabel;
- KviTalPopupMenu * m_pContextPopup;
+ QMenu * m_pContextPopup;
QToolButton * m_pDeleteThemeButton;
QToolButton * m_pPackThemeButton;
#if defined(COMPILE_WEBKIT_SUPPORT) || defined(Q_MOC_RUN)