mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
[Tabs] Use theme icons for tab-new and tab-duplicate.
This commit is contained in:
parent
16d5917d43
commit
42e0f535fe
@ -389,7 +389,7 @@ void QupZilla::setupMenu()
|
|||||||
* File Menu *
|
* File Menu *
|
||||||
*************/
|
*************/
|
||||||
m_menuFile = new QMenu(tr("&File"));
|
m_menuFile = new QMenu(tr("&File"));
|
||||||
m_menuFile->addAction(QIcon(":/icons/menu/new-tab.png"), tr("New Tab"), MENU_RECEIVER, SLOT(addTab()))->setShortcut(QKeySequence("Ctrl+T"));
|
m_menuFile->addAction(QIcon::fromTheme("tab-new", QIcon(":/icons/menu/new-tab.png")), tr("New Tab"), MENU_RECEIVER, SLOT(addTab()))->setShortcut(QKeySequence("Ctrl+T"));
|
||||||
m_menuFile->addAction(QIcon::fromTheme("window-new"), tr("&New Window"), MENU_RECEIVER, SLOT(newWindow()))->setShortcut(QKeySequence("Ctrl+N"));
|
m_menuFile->addAction(QIcon::fromTheme("window-new"), tr("&New Window"), MENU_RECEIVER, SLOT(newWindow()))->setShortcut(QKeySequence("Ctrl+N"));
|
||||||
m_menuFile->addAction(QIcon::fromTheme("document-open-remote"), tr("Open Location"), MENU_RECEIVER, SLOT(openLocation()))->setShortcut(QKeySequence("Ctrl+L"));
|
m_menuFile->addAction(QIcon::fromTheme("document-open-remote"), tr("Open Location"), MENU_RECEIVER, SLOT(openLocation()))->setShortcut(QKeySequence("Ctrl+L"));
|
||||||
m_menuFile->addAction(QIcon::fromTheme("document-open"), tr("Open &File..."), MENU_RECEIVER, SLOT(openFile()))->setShortcut(QKeySequence("Ctrl+O"));
|
m_menuFile->addAction(QIcon::fromTheme("document-open"), tr("Open &File..."), MENU_RECEIVER, SLOT(openFile()))->setShortcut(QKeySequence("Ctrl+O"));
|
||||||
|
@ -127,7 +127,7 @@ void TabBar::contextMenuRequested(const QPoint &position)
|
|||||||
m_clickedTab = index;
|
m_clickedTab = index;
|
||||||
|
|
||||||
QMenu menu;
|
QMenu menu;
|
||||||
menu.addAction(QIcon(":/icons/menu/new-tab.png"), tr("&New tab"), p_QupZilla, SLOT(addTab()));
|
menu.addAction(QIcon::fromTheme("tab-new", QIcon(":/icons/menu/new-tab.png")), tr("&New tab"), p_QupZilla, SLOT(addTab()));
|
||||||
menu.addSeparator();
|
menu.addSeparator();
|
||||||
if (index != -1) {
|
if (index != -1) {
|
||||||
WebTab* webTab = qobject_cast<WebTab*>(m_tabWidget->widget(m_clickedTab));
|
WebTab* webTab = qobject_cast<WebTab*>(m_tabWidget->widget(m_clickedTab));
|
||||||
@ -141,7 +141,7 @@ void TabBar::contextMenuRequested(const QPoint &position)
|
|||||||
menu.addAction(qIconProvider->standardIcon(QStyle::SP_BrowserReload), tr("&Reload Tab"), this, SLOT(reloadTab()));
|
menu.addAction(qIconProvider->standardIcon(QStyle::SP_BrowserReload), tr("&Reload Tab"), this, SLOT(reloadTab()));
|
||||||
}
|
}
|
||||||
|
|
||||||
menu.addAction(tr("&Duplicate Tab"), this, SLOT(duplicateTab()));
|
menu.addAction(QIcon::fromTheme("tab-duplicate"), tr("&Duplicate Tab"), this, SLOT(duplicateTab()));
|
||||||
menu.addAction(webTab->isPinned() ? tr("Un&pin Tab") : tr("&Pin Tab"), this, SLOT(pinTab()));
|
menu.addAction(webTab->isPinned() ? tr("Un&pin Tab") : tr("&Pin Tab"), this, SLOT(pinTab()));
|
||||||
menu.addSeparator();
|
menu.addSeparator();
|
||||||
menu.addAction(tr("Re&load All Tabs"), m_tabWidget, SLOT(reloadAllTabs()));
|
menu.addAction(tr("Re&load All Tabs"), m_tabWidget, SLOT(reloadAllTabs()));
|
||||||
|
@ -923,7 +923,7 @@ void WebView::createPageContextMenu(QMenu* menu, const QPoint &pos)
|
|||||||
m_clickedFrame = frameAtPos;
|
m_clickedFrame = frameAtPos;
|
||||||
Menu* frameMenu = new Menu(tr("This frame"));
|
Menu* frameMenu = new Menu(tr("This frame"));
|
||||||
frameMenu->addAction(tr("Show &only this frame"), this, SLOT(loadClickedFrame()));
|
frameMenu->addAction(tr("Show &only this frame"), this, SLOT(loadClickedFrame()));
|
||||||
Action* act = new Action(QIcon(":/icons/menu/new-tab.png"), tr("Show this frame in new &tab"));
|
Action* act = new Action(QIcon::fromTheme("tab-new", QIcon(":/icons/menu/new-tab.png")), tr("Show this frame in new &tab"));
|
||||||
connect(act, SIGNAL(triggered()), this, SLOT(loadClickedFrameInNewTab()));
|
connect(act, SIGNAL(triggered()), this, SLOT(loadClickedFrameInNewTab()));
|
||||||
connect(act, SIGNAL(middleClicked()), this, SLOT(loadClickedFrameInBgTab()));
|
connect(act, SIGNAL(middleClicked()), this, SLOT(loadClickedFrameInBgTab()));
|
||||||
frameMenu->addAction(act);
|
frameMenu->addAction(act);
|
||||||
@ -966,7 +966,7 @@ void WebView::createLinkContextMenu(QMenu* menu, const QWebHitTestResult &hitTes
|
|||||||
}
|
}
|
||||||
|
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
Action* act = new Action(QIcon(":/icons/menu/new-tab.png"), tr("Open link in new &tab"));
|
Action* act = new Action(QIcon::fromTheme("tab-new", QIcon(":/icons/menu/new-tab.png")), tr("Open link in new &tab"));
|
||||||
act->setData(hitTest.linkUrl());
|
act->setData(hitTest.linkUrl());
|
||||||
connect(act, SIGNAL(triggered()), this, SLOT(userDefinedOpenUrlInNewTab()));
|
connect(act, SIGNAL(triggered()), this, SLOT(userDefinedOpenUrlInNewTab()));
|
||||||
connect(act, SIGNAL(middleClicked()), this, SLOT(userDefinedOpenUrlInBgTab()));
|
connect(act, SIGNAL(middleClicked()), this, SLOT(userDefinedOpenUrlInBgTab()));
|
||||||
|
Loading…
Reference in New Issue
Block a user