summaryrefslogtreecommitdiff
path: root/src/tabbar.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-04-28 03:15:17 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-04-28 03:15:17 +0200
commit1758686ac4b3c1a2ebf9bc88158f7cf1ccb1e8e9 (patch)
tree392cb389ceafdf97d5b0bf475cf3ff0ec4f867c0 /src/tabbar.cpp
parentkdialog fixes (diff)
parentTabBar context menu fix ported (diff)
downloadrekonq-1758686ac4b3c1a2ebf9bc88158f7cf1ccb1e8e9.tar.xz
Merge commit 'avaddon/master' into MERGING
Diffstat (limited to 'src/tabbar.cpp')
-rw-r--r--src/tabbar.cpp25
1 files changed, 9 insertions, 16 deletions
diff --git a/src/tabbar.cpp b/src/tabbar.cpp
index 75a06e23..f11ea688 100644
--- a/src/tabbar.cpp
+++ b/src/tabbar.cpp
@@ -49,7 +49,8 @@ TabBar::TabBar(QWidget *parent)
setElideMode(Qt::ElideRight);
setContextMenuPolicy(Qt::CustomContextMenu);
setMovable(true);
- connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(contextMenuRequested(const QPoint &)));
+ connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this,
+ SLOT(contextMenuRequested(const QPoint &)));
// tabbar font
QFont standardFont = KGlobalSettings::generalFont();
@@ -96,18 +97,20 @@ QSize TabBar::tabSizeHint(int index) const
void TabBar::contextMenuRequested(const QPoint &position)
{
KMenu menu;
- menu.addAction(i18n("New &Tab"), this, SIGNAL(newTab()));
+ MainWindow *mainWindow = Application::instance()->mainWindow();
+
+ menu.addAction(mainWindow->actionByName(QLatin1String("new_tab")));
int index = tabAt(position);
if (-1 != index)
{
m_actualIndex = index;
- KAction *action = (KAction *) menu.addAction(i18n("Clone Tab"), this, SLOT(cloneTab()));
+ menu.addAction(KIcon("tab-duplicate"), i18n("Clone Tab"), this, SLOT(cloneTab()));
menu.addSeparator();
- action = (KAction *) menu.addAction(i18n("&Close Tab"), this, SLOT(closeTab()));
- action = (KAction *) menu.addAction(i18n("Close &Other Tabs"), this, SLOT(closeOtherTabs()));
+ menu.addAction(KIcon("tab-close"), i18n("&Close Tab"), this, SLOT(closeTab()));
+ menu.addAction(KIcon("tab-close-other"), i18n("Close &Other Tabs"), this, SLOT(closeOtherTabs()));
menu.addSeparator();
- action = (KAction *) menu.addAction(i18n("Reload Tab"), this, SLOT(reloadTab()));
+ menu.addAction(KIcon("view-refresh"), i18n("Reload Tab"), this, SLOT(reloadTab()));
}
else
{
@@ -136,16 +139,6 @@ void TabBar::closeOtherTabs()
}
-void TabBar::mousePressEvent(QMouseEvent *event)
-{
- if (event->button() == Qt::LeftButton)
- {
- m_dragStartPos = event->pos();
- }
- KTabBar::mousePressEvent(event);
-}
-
-
void TabBar::reloadTab()
{
emit reloadTab(m_actualIndex);