1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 17:52:10 +02:00

TabContextMenu: Remove detach tab action

Tabs can now be detached with drag&drop
This commit is contained in:
David Rosca 2018-01-01 15:19:53 +01:00
parent 38bfd49d4f
commit 3eac8bd161
2 changed files with 2 additions and 10 deletions

View File

@ -1,6 +1,6 @@
/* ============================================================
* Falkon - Qt web browser
* Copyright (C) 2010-2017 David Rosca <nowrep@gmail.com>
* Copyright (C) 2010-2018 David Rosca <nowrep@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -44,7 +44,6 @@ TabContextMenu::TabContextMenu(int index, Qt::Orientation orientation, BrowserWi
connect(this, SIGNAL(closeToRight(int)), m_tabWidget, SLOT(closeToRight(int)));
connect(this, SIGNAL(closeToLeft(int)), m_tabWidget, SLOT(closeToLeft(int)));
connect(this, SIGNAL(duplicateTab(int)), m_tabWidget, SLOT(duplicateTab(int)));
connect(this, SIGNAL(detachTab(int)), m_tabWidget, SLOT(detachTab(int)));
init();
}
@ -120,10 +119,6 @@ void TabContextMenu::init()
addAction(QIcon::fromTheme("tab-duplicate"), tr("&Duplicate Tab"), this, SLOT(duplicateTab()));
if (m_tabWidget->count() > 1 && !webTab->isPinned()) {
addAction(QIcon::fromTheme("tab-detach"), tr("D&etach Tab"), this, SLOT(detachTab()));
}
addAction(webTab->isPinned() ? tr("Un&pin Tab") : tr("&Pin Tab"), this, SLOT(pinTab()));
addAction(webTab->isMuted() ? tr("Un&mute Tab") : tr("&Mute Tab"), this, SLOT(muteTab()));
addSeparator();

View File

@ -1,6 +1,6 @@
/* ============================================================
* Falkon - Qt web browser
* Copyright (C) 2010-2017 David Rosca <nowrep@gmail.com>
* Copyright (C) 2010-2018 David Rosca <nowrep@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -31,7 +31,6 @@ class FALKON_EXPORT TabContextMenu : public QMenu
public:
explicit TabContextMenu(int index, Qt::Orientation orientation, BrowserWindow* window, TabWidget* tabWidget, bool showCloseOtherTabs = true);
signals:
void reloadTab(int index);
void stopTab(int index);
@ -40,14 +39,12 @@ signals:
void closeToRight(int index);
void closeToLeft(int index);
void duplicateTab(int index);
void detachTab(int index);
private slots:
void reloadTab() { emit reloadTab(m_clickedTab); }
void stopTab() { emit stopTab(m_clickedTab); }
void closeTab() { emit tabCloseRequested(m_clickedTab); }
void duplicateTab() { emit duplicateTab(m_clickedTab); }
void detachTab() { emit detachTab(m_clickedTab); }
void pinTab();
void muteTab();