summaryrefslogtreecommitdiff
path: root/src/tabbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tabbar.cpp')
-rw-r--r--src/tabbar.cpp22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/tabbar.cpp b/src/tabbar.cpp
index 75a06e23..6914ef77 100644
--- a/src/tabbar.cpp
+++ b/src/tabbar.cpp
@@ -96,18 +96,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 +138,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);