mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
Updated menus, added &shortcuts
This commit is contained in:
parent
c68518d134
commit
d3ef260c12
Binary file not shown.
Binary file not shown.
|
@ -37,7 +37,7 @@ void AdBlockIcon::showMenu(const QPoint &pos)
|
|||
AdBlockManager* manager = AdBlockManager::instance();
|
||||
|
||||
QMenu menu;
|
||||
menu.addAction(tr("Show AdBlock Settings"), manager, SLOT(showDialog()));
|
||||
menu.addAction(tr("Show AdBlock &Settings"), manager, SLOT(showDialog()));
|
||||
menu.addSeparator();
|
||||
QList<WebPage::AdBlockedEntry> entries = p_QupZilla->weView()->webPage()->adBlockedEntries();
|
||||
if (entries.isEmpty())
|
||||
|
@ -50,7 +50,7 @@ void AdBlockIcon::showMenu(const QPoint &pos)
|
|||
}
|
||||
}
|
||||
menu.addSeparator();
|
||||
menu.addAction(tr("Learn About Writing Rules"), this, SLOT(learnAboutRules()));
|
||||
menu.addAction(tr("Learn About Writing &Rules"), this, SLOT(learnAboutRules()));
|
||||
|
||||
menu.exec(pos);
|
||||
}
|
||||
|
@ -62,5 +62,4 @@ void AdBlockIcon::learnAboutRules()
|
|||
|
||||
AdBlockIcon::~AdBlockIcon()
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -178,48 +178,48 @@ void QupZilla::setupMenu()
|
|||
connect(m_menuTools, SIGNAL(aboutToShow()), this, SLOT(aboutToShowToolsMenu()));
|
||||
|
||||
m_menuFile = new QMenu(tr("File"));
|
||||
m_menuFile->addAction(QIcon::fromTheme("window-new"), tr("New Window"), this, SLOT(newWindow()))->setShortcut(QKeySequence("Ctrl+N"));
|
||||
m_menuFile->addAction(QIcon::fromTheme("window-new"), tr("&New Window"), this, SLOT(newWindow()))->setShortcut(QKeySequence("Ctrl+N"));
|
||||
m_menuFile->addAction(QIcon(":/icons/menu/popup.png"), tr("New Tab"), this, SLOT(addTab()))->setShortcut(QKeySequence("Ctrl+T"));
|
||||
m_menuFile->addAction(tr("Open Location"), this, SLOT(openLocation()))->setShortcut(QKeySequence("Ctrl+L"));
|
||||
m_menuFile->addAction(QIcon::fromTheme("document-open"), tr("Open File"), this, SLOT(openFile()))->setShortcut(QKeySequence("Ctrl+O"));
|
||||
m_menuFile->addAction(QIcon::fromTheme("document-open"), tr("Open &File"), this, SLOT(openFile()))->setShortcut(QKeySequence("Ctrl+O"));
|
||||
m_menuFile->addAction(tr("Close Tab"), m_tabWidget, SLOT(closeTab()))->setShortcut(QKeySequence("Ctrl+W"));
|
||||
m_menuFile->addAction(QIcon::fromTheme("window-close"), tr("Close Window"), this, SLOT(close()))->setShortcut(QKeySequence("Ctrl+Shift+W"));
|
||||
m_menuFile->addSeparator();
|
||||
m_menuFile->addAction(QIcon::fromTheme("document-save"), tr("Save Page As..."), this, SLOT(savePage()))->setShortcut(QKeySequence("Ctrl+S"));
|
||||
m_menuFile->addAction(QIcon::fromTheme("document-save"), tr("&Save Page As..."), this, SLOT(savePage()))->setShortcut(QKeySequence("Ctrl+S"));
|
||||
m_menuFile->addAction(tr("Send Link..."), this, SLOT(sendLink()));
|
||||
m_menuFile->addAction(QIcon::fromTheme("document-print"), tr("Print"), this, SLOT(printPage()));
|
||||
m_menuFile->addAction(QIcon::fromTheme("document-print"), tr("&Print"), this, SLOT(printPage()));
|
||||
m_menuFile->addSeparator();
|
||||
m_menuFile->addAction(QIcon::fromTheme("application-exit"), tr("Quit"), this, SLOT(quitApp()))->setShortcut(QKeySequence("Ctrl+Q"));
|
||||
menuBar()->addMenu(m_menuFile);
|
||||
|
||||
m_menuEdit = new QMenu(tr("Edit"));
|
||||
m_menuEdit->addAction(QIcon::fromTheme("edit-undo"), tr("Undo"))->setShortcut(QKeySequence("Ctrl+Z"));
|
||||
m_menuEdit->addAction(QIcon::fromTheme("edit-redo"), tr("Redo"))->setShortcut(QKeySequence("Ctrl+Shift+Z"));
|
||||
m_menuEdit->addAction(QIcon::fromTheme("edit-undo"), tr("&Undo"))->setShortcut(QKeySequence("Ctrl+Z"));
|
||||
m_menuEdit->addAction(QIcon::fromTheme("edit-redo"), tr("&Redo"))->setShortcut(QKeySequence("Ctrl+Shift+Z"));
|
||||
m_menuEdit->addSeparator();
|
||||
m_menuEdit->addAction(QIcon::fromTheme("edit-cut"), tr("Cut"))->setShortcut(QKeySequence("Ctrl+X"));
|
||||
m_menuEdit->addAction(QIcon::fromTheme("edit-copy"), tr("Copy"), this, SLOT(copy()))->setShortcut(QKeySequence("Ctrl+C"));
|
||||
m_menuEdit->addAction(QIcon::fromTheme("edit-paste"), tr("Paste"))->setShortcut(QKeySequence("Ctrl+V"));
|
||||
m_menuEdit->addAction(QIcon::fromTheme("edit-delete"), tr("Delete"))->setShortcut(QKeySequence("Del"));
|
||||
m_menuEdit->addAction(QIcon::fromTheme("edit-cut"), tr("&Cut"))->setShortcut(QKeySequence("Ctrl+X"));
|
||||
m_menuEdit->addAction(QIcon::fromTheme("edit-copy"), tr("C&opy"), this, SLOT(copy()))->setShortcut(QKeySequence("Ctrl+C"));
|
||||
m_menuEdit->addAction(QIcon::fromTheme("edit-paste"), tr("&Paste"))->setShortcut(QKeySequence("Ctrl+V"));
|
||||
m_menuEdit->addAction(QIcon::fromTheme("edit-delete"), tr("&Delete"))->setShortcut(QKeySequence("Del"));
|
||||
m_menuEdit->addSeparator();
|
||||
m_menuEdit->addAction(QIcon::fromTheme("edit-select-all"), tr("Select All"), this, SLOT(selectAll()))->setShortcut(QKeySequence("Ctrl+A"));
|
||||
m_menuEdit->addAction(QIcon::fromTheme("edit-select-all"), tr("Select &All"), this, SLOT(selectAll()))->setShortcut(QKeySequence("Ctrl+A"));
|
||||
m_menuEdit->addSeparator();
|
||||
m_menuEdit->addAction(QIcon::fromTheme("edit-find"), tr("Find"), this, SLOT(searchOnPage()))->setShortcut(QKeySequence("Ctrl+F"));
|
||||
m_menuEdit->addAction(QIcon::fromTheme("edit-find"), tr("&Find"), this, SLOT(searchOnPage()))->setShortcut(QKeySequence("Ctrl+F"));
|
||||
menuBar()->addMenu(m_menuEdit);
|
||||
|
||||
m_menuView = new QMenu(tr("View"));
|
||||
m_actionShowToolbar = new QAction(tr("Navigation Toolbar"), this);
|
||||
m_actionShowToolbar = new QAction(tr("&Navigation Toolbar"), this);
|
||||
m_actionShowToolbar->setCheckable(true);
|
||||
connect(m_actionShowToolbar, SIGNAL(triggered(bool)), this, SLOT(showNavigationToolbar()));
|
||||
m_actionShowBookmarksToolbar = new QAction(tr("Bookmarks Toolbar"), this);
|
||||
m_actionShowBookmarksToolbar = new QAction(tr("&Bookmarks Toolbar"), this);
|
||||
m_actionShowBookmarksToolbar->setCheckable(true);
|
||||
connect(m_actionShowBookmarksToolbar, SIGNAL(triggered(bool)), this, SLOT(showBookmarksToolbar()));
|
||||
m_actionShowStatusbar = new QAction(tr("Status Bar"), this);
|
||||
m_actionShowStatusbar = new QAction(tr("Sta&tus Bar"), this);
|
||||
m_actionShowStatusbar->setCheckable(true);
|
||||
connect(m_actionShowStatusbar, SIGNAL(triggered(bool)), this, SLOT(showStatusbar()));
|
||||
m_actionShowMenubar = new QAction(tr("Menu Bar"), this);
|
||||
m_actionShowMenubar = new QAction(tr("&Menu Bar"), this);
|
||||
m_actionShowMenubar->setCheckable(true);
|
||||
connect(m_actionShowMenubar, SIGNAL(triggered(bool)), this, SLOT(showMenubar()));
|
||||
m_actionShowFullScreen = new QAction(tr("Fullscreen"), this);
|
||||
m_actionShowFullScreen = new QAction(tr("&Fullscreen"), this);
|
||||
m_actionShowFullScreen->setCheckable(true);
|
||||
m_actionShowFullScreen->setShortcut(QKeySequence("F11"));
|
||||
connect(m_actionShowFullScreen, SIGNAL(triggered(bool)), this, SLOT(fullScreen(bool)));
|
||||
|
@ -229,7 +229,7 @@ void QupZilla::setupMenu()
|
|||
#else
|
||||
QIcon(":/icons/faenza/stop.png")
|
||||
#endif
|
||||
, tr("Stop"), this);
|
||||
, tr("&Stop"), this);
|
||||
connect(m_actionStop, SIGNAL(triggered()), this, SLOT(stop()));
|
||||
m_actionStop->setShortcut(QKeySequence("Esc"));
|
||||
m_actionReload = new QAction(
|
||||
|
@ -238,10 +238,10 @@ void QupZilla::setupMenu()
|
|||
#else
|
||||
QIcon(":/icons/faenza/reload.png")
|
||||
#endif
|
||||
, tr("Reload"), this);
|
||||
, tr("&Reload"), this);
|
||||
connect(m_actionReload, SIGNAL(triggered()), this, SLOT(reload()));
|
||||
m_actionReload->setShortcut(QKeySequence("Ctrl+R"));
|
||||
QAction* actionEncoding = new QAction(tr("Character Encoding"), this);
|
||||
QAction* actionEncoding = new QAction(tr("Character &Encoding"), this);
|
||||
m_menuEncoding = new QMenu(this);
|
||||
actionEncoding->setMenu(m_menuEncoding);
|
||||
connect(m_menuEncoding, SIGNAL(aboutToShow()), this, SLOT(aboutToShowEncodingMenu()));
|
||||
|
@ -254,13 +254,13 @@ void QupZilla::setupMenu()
|
|||
m_menuView->addAction(m_actionStop);
|
||||
m_menuView->addAction(m_actionReload);
|
||||
m_menuView->addSeparator();
|
||||
m_menuView->addAction(QIcon::fromTheme("zoom-in"), tr("Zoom In"), this, SLOT(zoomIn()))->setShortcut(QKeySequence("Ctrl++"));
|
||||
m_menuView->addAction(QIcon::fromTheme("zoom-out"), tr("Zoom Out"), this, SLOT(zoomOut()))->setShortcut(QKeySequence("Ctrl+-"));
|
||||
m_menuView->addAction(QIcon::fromTheme("zoom-in"), tr("Zoom &In"), this, SLOT(zoomIn()))->setShortcut(QKeySequence("Ctrl++"));
|
||||
m_menuView->addAction(QIcon::fromTheme("zoom-out"), tr("Zoom &Out"), this, SLOT(zoomOut()))->setShortcut(QKeySequence("Ctrl+-"));
|
||||
m_menuView->addAction(QIcon::fromTheme("zoom-original"), tr("Reset"), this, SLOT(zoomReset()))->setShortcut(QKeySequence("Ctrl+0"));
|
||||
m_menuView->addSeparator();
|
||||
m_menuView->addAction(actionEncoding);
|
||||
m_menuView->addSeparator();
|
||||
m_menuView->addAction(QIcon::fromTheme("text-html"), tr("Page Source"), this, SLOT(showSource()))->setShortcut(QKeySequence("Ctrl+U"));
|
||||
m_menuView->addAction(QIcon::fromTheme("text-html"), tr("&Page Source"), this, SLOT(showSource()))->setShortcut(QKeySequence("Ctrl+U"));
|
||||
m_menuView->addAction(m_actionShowFullScreen);
|
||||
menuBar()->addMenu(m_menuView);
|
||||
connect(m_menuView, SIGNAL(aboutToShow()), this, SLOT(aboutToShowViewMenu()));
|
||||
|
|
|
@ -245,9 +245,9 @@ void QupZilla::aboutToShowHistoryNextMenu()
|
|||
void QupZilla::aboutToShowBookmarksMenu()
|
||||
{
|
||||
m_menuBookmarks->clear();
|
||||
m_menuBookmarks->addAction(tr("Bookmark This Page"), this, SLOT(bookmarkPage()))->setShortcut(QKeySequence("Ctrl+D"));
|
||||
m_menuBookmarks->addAction(tr("Bookmark All Tabs"), this, SLOT(bookmarkAllTabs()));
|
||||
m_menuBookmarks->addAction(QIcon::fromTheme("user-bookmarks"), tr("Organize Bookmarks"), this, SLOT(showBookmarksManager()))->setShortcut(QKeySequence("Ctrl+Shift+O"));
|
||||
m_menuBookmarks->addAction(tr("Bookmark &This Page"), this, SLOT(bookmarkPage()))->setShortcut(QKeySequence("Ctrl+D"));
|
||||
m_menuBookmarks->addAction(tr("Bookmark &All Tabs"), this, SLOT(bookmarkAllTabs()));
|
||||
m_menuBookmarks->addAction(QIcon::fromTheme("user-bookmarks"), tr("Organize &Bookmarks"), this, SLOT(showBookmarksManager()))->setShortcut(QKeySequence("Ctrl+Shift+O"));
|
||||
m_menuBookmarks->addSeparator();
|
||||
if (m_tabWidget->count() == 1)
|
||||
m_menuBookmarks->actions().at(1)->setEnabled(false);
|
||||
|
@ -314,28 +314,28 @@ void QupZilla::aboutToShowHistoryMenu()
|
|||
#else
|
||||
QIcon(":/icons/faenza/back.png")
|
||||
#endif
|
||||
, tr("Back"), this, SLOT(goBack()))->setShortcut(QKeySequence("Ctrl+Left"));
|
||||
, tr("&Back"), this, SLOT(goBack()))->setShortcut(QKeySequence("Ctrl+Left"));
|
||||
m_menuHistory->addAction(
|
||||
#ifdef Q_WS_X11
|
||||
style()->standardIcon(QStyle::SP_ArrowForward)
|
||||
#else
|
||||
QIcon(":/icons/faenza/forward.png")
|
||||
#endif
|
||||
, tr("Forward"), this, SLOT(goNext()))->setShortcut(QKeySequence("Ctrl+Right"));
|
||||
, tr("&Forward"), this, SLOT(goNext()))->setShortcut(QKeySequence("Ctrl+Right"));
|
||||
m_menuHistory->addAction(
|
||||
#ifdef Q_WS_X11
|
||||
QIcon::fromTheme("go-home")
|
||||
#else
|
||||
QIcon(":/icons/faenza/home.png")
|
||||
#endif
|
||||
, tr("Home"), this, SLOT(goHome()))->setShortcut(QKeySequence("Alt+Home"));
|
||||
, tr("&Home"), this, SLOT(goHome()))->setShortcut(QKeySequence("Alt+Home"));
|
||||
|
||||
if (!weView()->history()->canGoBack())
|
||||
m_menuHistory->actions().at(0)->setEnabled(false);
|
||||
if (!weView()->history()->canGoForward())
|
||||
m_menuHistory->actions().at(1)->setEnabled(false);
|
||||
|
||||
m_menuHistory->addAction(QIcon(":/icons/menu/history.png"), tr("Show All History"), this, SLOT(showHistoryManager()))->setShortcut(QKeySequence("Ctrl+H"));
|
||||
m_menuHistory->addAction(QIcon(":/icons/menu/history.png"), tr("Show &All History"), this, SLOT(showHistoryManager()))->setShortcut(QKeySequence("Ctrl+H"));
|
||||
m_menuHistory->addSeparator();
|
||||
|
||||
QSqlQuery query;
|
||||
|
@ -354,32 +354,32 @@ void QupZilla::aboutToShowHistoryMenu()
|
|||
void QupZilla::aboutToShowHelpMenu()
|
||||
{
|
||||
m_menuHelp->clear();
|
||||
m_menuHelp->addAction(tr("Report Bug"), this, SLOT(reportBug()));
|
||||
m_menuHelp->addAction(tr("Report &Bug"), this, SLOT(reportBug()));
|
||||
m_menuHelp->addSeparator();
|
||||
mApp->plugins()->populateHelpMenu(m_menuHelp);
|
||||
m_menuHelp->addAction(QIcon(":/icons/menu/qt.png"), tr("About Qt"), qApp, SLOT(aboutQt()));
|
||||
m_menuHelp->addAction(QIcon(":/icons/qupzilla.png"), tr("About QupZilla"), this, SLOT(aboutQupZilla()));
|
||||
m_menuHelp->addAction(QIcon(":/icons/menu/qt.png"), tr("About &Qt"), qApp, SLOT(aboutQt()));
|
||||
m_menuHelp->addAction(QIcon(":/icons/qupzilla.png"), tr("&About QupZilla"), this, SLOT(aboutQupZilla()));
|
||||
}
|
||||
|
||||
void QupZilla::aboutToShowToolsMenu()
|
||||
{
|
||||
m_menuTools->clear();
|
||||
m_menuTools->addAction(tr("Web Search"), this, SLOT(webSearch()))->setShortcut(QKeySequence("Ctrl+K"));
|
||||
m_menuTools->addAction(QIcon::fromTheme("dialog-information"), tr("Page Info"), this, SLOT(showPageInfo()))->setShortcut(QKeySequence("Ctrl+I"));
|
||||
m_menuTools->addAction(tr("&Web Search"), this, SLOT(webSearch()))->setShortcut(QKeySequence("Ctrl+K"));
|
||||
m_menuTools->addAction(QIcon::fromTheme("dialog-information"), tr("Page &Info"), this, SLOT(showPageInfo()))->setShortcut(QKeySequence("Ctrl+I"));
|
||||
m_menuTools->addSeparator();
|
||||
m_menuTools->addAction(tr("Download Manager"), this, SLOT(showDownloadManager()))->setShortcut(QKeySequence("Ctrl+Y"));
|
||||
m_menuTools->addAction(tr("Cookies Manager"), this, SLOT(showCookieManager()));
|
||||
m_menuTools->addAction(tr("AdBlock"), AdBlockManager::instance(), SLOT(showDialog()));
|
||||
m_menuTools->addAction(QIcon(":/icons/menu/rss.png"), tr("RSS Reader"), this, SLOT(showRSSManager()));
|
||||
m_menuTools->addAction(QIcon::fromTheme("edit-clear"), tr("Clear Recent History"), this, SLOT(showClearPrivateData()));
|
||||
m_actionPrivateBrowsing = new QAction(tr("Private Browsing"), this);
|
||||
m_menuTools->addAction(tr("&Download Manager"), this, SLOT(showDownloadManager()))->setShortcut(QKeySequence("Ctrl+Y"));
|
||||
m_menuTools->addAction(tr("&Cookies Manager"), this, SLOT(showCookieManager()));
|
||||
m_menuTools->addAction(tr("&AdBlock"), AdBlockManager::instance(), SLOT(showDialog()));
|
||||
m_menuTools->addAction(QIcon(":/icons/menu/rss.png"), tr("RSS &Reader"), this, SLOT(showRSSManager()));
|
||||
m_menuTools->addAction(QIcon::fromTheme("edit-clear"), tr("Clear Recent &History"), this, SLOT(showClearPrivateData()));
|
||||
m_actionPrivateBrowsing = new QAction(tr("&Private Browsing"), this);
|
||||
m_actionPrivateBrowsing->setCheckable(true);
|
||||
m_actionPrivateBrowsing->setChecked(mApp->webSettings()->testAttribute(QWebSettings::PrivateBrowsingEnabled));
|
||||
connect(m_actionPrivateBrowsing, SIGNAL(triggered(bool)), this, SLOT(startPrivate(bool)));
|
||||
m_menuTools->addAction(m_actionPrivateBrowsing);
|
||||
m_menuTools->addSeparator();
|
||||
mApp->plugins()->populateToolsMenu(m_menuTools);
|
||||
m_menuTools->addAction(QIcon(":/icons/faenza/settings.png"), tr("Preferences"), this, SLOT(showPreferences()))->setShortcut(QKeySequence("Ctrl+P"));
|
||||
m_menuTools->addAction(QIcon(":/icons/faenza/settings.png"), tr("Pr&eferences"), this, SLOT(showPreferences()))->setShortcut(QKeySequence("Ctrl+P"));
|
||||
}
|
||||
|
||||
void QupZilla::aboutToShowViewMenu()
|
||||
|
|
|
@ -116,6 +116,7 @@ signals:
|
|||
void message(MainApplication::MessageType mes, bool state);
|
||||
|
||||
public slots:
|
||||
void showBookmarksToolbar();
|
||||
void refreshHistory(int index=-1);
|
||||
void loadActionUrl();
|
||||
void bookmarkPage();
|
||||
|
@ -156,7 +157,6 @@ private slots:
|
|||
|
||||
void showMenubar();
|
||||
void showNavigationToolbar();
|
||||
void showBookmarksToolbar();
|
||||
void showStatusbar();
|
||||
void showClearPrivateData();
|
||||
void showPreferences();
|
||||
|
|
|
@ -155,12 +155,12 @@ void BookmarksManager::contextMenuRequested(const QPoint &position)
|
|||
return;
|
||||
|
||||
QMenu menu;
|
||||
menu.addAction(tr("Open link in actual tab"), getQupZilla(), SLOT(loadActionUrl()))->setData(link);
|
||||
menu.addAction(tr("Open link in new tab"), this, SLOT(loadInNewTab()))->setData(link);
|
||||
menu.addAction(tr("Open link in actual &tab"), getQupZilla(), SLOT(loadActionUrl()))->setData(link);
|
||||
menu.addAction(tr("Open link in &new tab"), this, SLOT(loadInNewTab()))->setData(link);
|
||||
menu.addSeparator();
|
||||
|
||||
QMenu moveMenu;
|
||||
moveMenu.setTitle(tr("Move bookmark to folder"));
|
||||
moveMenu.setTitle(tr("Move bookmark to &folder"));
|
||||
moveMenu.addAction(QIcon(":icons/other/unsortedbookmarks.png"), tr("Unsorted Bookmarks"), this, SLOT(moveBookmark()))->setData("unsorted");
|
||||
moveMenu.addAction(style()->standardIcon(QStyle::SP_DirOpenIcon), tr("Bookmarks In Menu"), this, SLOT(moveBookmark()))->setData("bookmarksMenu");
|
||||
moveMenu.addAction(style()->standardIcon(QStyle::SP_DirOpenIcon), tr("Bookmarks In ToolBar"), this, SLOT(moveBookmark()))->setData("bookmarksToolbar");
|
||||
|
@ -171,7 +171,7 @@ void BookmarksManager::contextMenuRequested(const QPoint &position)
|
|||
menu.addMenu(&moveMenu);
|
||||
|
||||
menu.addSeparator();
|
||||
menu.addAction(tr("Close"), this, SLOT(close()));
|
||||
menu.addAction(tr("&Close"), this, SLOT(close()));
|
||||
|
||||
//Prevent choosing first option with double rightclick
|
||||
QPoint pos = QCursor::pos();
|
||||
|
|
|
@ -46,9 +46,9 @@ void BookmarksToolbar::customContextMenuRequested(const QPoint &pos)
|
|||
return;
|
||||
|
||||
QMenu menu;
|
||||
menu.addAction(tr("Bookmark Current Page"), p_QupZilla, SLOT(bookmarkPage()));
|
||||
menu.addAction(tr("Bookmark All Tabs"), p_QupZilla, SLOT(bookmarkAllTabs()));
|
||||
menu.addAction(QIcon::fromTheme("user-bookmarks"), tr("Organize Bookmarks"), p_QupZilla, SLOT(showBookmarksManager()));
|
||||
menu.addAction(tr("&Bookmark Current Page"), p_QupZilla, SLOT(bookmarkPage()));
|
||||
menu.addAction(tr("Bookmark &All Tabs"), p_QupZilla, SLOT(bookmarkAllTabs()));
|
||||
menu.addAction(QIcon::fromTheme("user-bookmarks"), tr("&Organize Bookmarks"), p_QupZilla, SLOT(showBookmarksManager()));
|
||||
menu.addSeparator();
|
||||
menu.addAction(
|
||||
#ifdef Q_WS_X11
|
||||
|
@ -56,10 +56,10 @@ void BookmarksToolbar::customContextMenuRequested(const QPoint &pos)
|
|||
#else
|
||||
QIcon(":/icons/faenza/reload.png")
|
||||
#endif
|
||||
,tr("Reload Toolbar"), this, SLOT(refreshBookmarks()));
|
||||
,tr("&Reload Toolbar"), this, SLOT(refreshBookmarks()));
|
||||
menu.addSeparator();
|
||||
menu.addAction(m_bookmarksModel->isShowingMostVisited() ? tr("Hide Most Visited") : tr("Show Most Visited"), this, SLOT(showMostVisited()));
|
||||
menu.addAction(tr("Hide Toolbar"), this, SLOT(hidePanel()));
|
||||
menu.addAction(m_bookmarksModel->isShowingMostVisited() ? tr("Hide Most &Visited") : tr("Show Most &Visited"), this, SLOT(showMostVisited()));
|
||||
menu.addAction(tr("&Hide Toolbar"), this, SLOT(hidePanel()));
|
||||
|
||||
//Prevent choosing first option with double rightclick
|
||||
QPoint position = QCursor::pos();
|
||||
|
@ -75,8 +75,7 @@ void BookmarksToolbar::showMostVisited()
|
|||
|
||||
void BookmarksToolbar::hidePanel()
|
||||
{
|
||||
this->hide();
|
||||
p_QupZilla->acShowBookmarksToolbar()->setChecked(false);
|
||||
p_QupZilla->showBookmarksToolbar();
|
||||
}
|
||||
|
||||
void BookmarksToolbar::refreshBookmarks()
|
||||
|
|
|
@ -57,7 +57,7 @@ void TabBar::contextMenuRequested(const QPoint &position)
|
|||
return;
|
||||
|
||||
QMenu menu;
|
||||
menu.addAction(QIcon(":/icons/menu/popup.png"),tr("New tab"), p_QupZilla, SLOT(addTab()));
|
||||
menu.addAction(QIcon(":/icons/menu/popup.png"),tr("&New tab"), p_QupZilla, SLOT(addTab()));
|
||||
menu.addSeparator();
|
||||
if (index!=-1) {
|
||||
WebTab* webTab = qobject_cast<WebTab*>(tabWidget->widget(m_clickedTab));
|
||||
|
@ -70,7 +70,7 @@ void TabBar::contextMenuRequested(const QPoint &position)
|
|||
#else
|
||||
QIcon(":/icons/faenza/stop.png")
|
||||
#endif
|
||||
,tr("Stop Tab"), this, SLOT(stopTab()));
|
||||
,tr("&Stop Tab"), this, SLOT(stopTab()));
|
||||
} else {
|
||||
menu.addAction(
|
||||
#ifdef Q_WS_X11
|
||||
|
@ -78,26 +78,26 @@ void TabBar::contextMenuRequested(const QPoint &position)
|
|||
#else
|
||||
QIcon(":/icons/faenza/reload.png")
|
||||
#endif
|
||||
,tr("Reload Tab"), this, SLOT(reloadTab()));
|
||||
,tr("&Reload Tab"), this, SLOT(reloadTab()));
|
||||
}
|
||||
menu.addAction(tr("Duplicate Tab"), this, SLOT(duplicateTab()));
|
||||
menu.addAction(webTab->isPinned() ? tr("Unpin Tab") : tr("Pin Tab"), this, SLOT(pinTab()));
|
||||
menu.addAction(tr("&Duplicate Tab"), this, SLOT(duplicateTab()));
|
||||
menu.addAction(webTab->isPinned() ? tr("Un&pin Tab") : tr("&Pin Tab"), this, SLOT(pinTab()));
|
||||
menu.addSeparator();
|
||||
menu.addAction(tr("Reload All Tabs"), tabWidget, SLOT(reloadAllTabs()));
|
||||
menu.addAction(tr("Bookmark This Tab"), this, SLOT(bookmarkTab()));
|
||||
menu.addAction(tr("Bookmark All Tabs"), p_QupZilla, SLOT(bookmarkAllTabs()));
|
||||
menu.addAction(tr("Re&load All Tabs"), tabWidget, SLOT(reloadAllTabs()));
|
||||
menu.addAction(tr("&Bookmark This Tab"), this, SLOT(bookmarkTab()));
|
||||
menu.addAction(tr("Bookmark &All Tabs"), p_QupZilla, SLOT(bookmarkAllTabs()));
|
||||
menu.addSeparator();
|
||||
QAction* action = menu.addAction(QIcon::fromTheme("user-trash"),tr("Restore Closed Tab"), tabWidget, SLOT(restoreClosedTab()));
|
||||
QAction* action = menu.addAction(QIcon::fromTheme("user-trash"),tr("Restore &Closed Tab"), tabWidget, SLOT(restoreClosedTab()));
|
||||
tabWidget->canRestoreTab() ? action->setEnabled(true) : action->setEnabled(false);
|
||||
menu.addSeparator();
|
||||
menu.addAction(tr("Close Other Tabs"), this, SLOT(closeAllButCurrent()));
|
||||
menu.addAction(QIcon::fromTheme("window-close"),tr("Close"), this, SLOT(closeTab()));
|
||||
menu.addAction(tr("Close Ot&her Tabs"), this, SLOT(closeAllButCurrent()));
|
||||
menu.addAction(QIcon::fromTheme("window-close"),tr("Cl&ose"), this, SLOT(closeTab()));
|
||||
menu.addSeparator();
|
||||
} else {
|
||||
menu.addAction(tr("Reload All Tabs"), tabWidget, SLOT(reloadAllTabs()));
|
||||
menu.addAction(tr("Bookmark All Tabs"), p_QupZilla, SLOT(bookmarkAllTabs()));
|
||||
menu.addAction(tr("Reloa&d All Tabs"), tabWidget, SLOT(reloadAllTabs()));
|
||||
menu.addAction(tr("Bookmark &All Ta&bs"), p_QupZilla, SLOT(bookmarkAllTabs()));
|
||||
menu.addSeparator();
|
||||
QAction* action = menu.addAction(QIcon::fromTheme("user-trash"),tr("Restore Closed Tab"), tabWidget, SLOT(restoreClosedTab()));
|
||||
QAction* action = menu.addAction(QIcon::fromTheme("user-trash"),tr("Restore &Closed Tab"), tabWidget, SLOT(restoreClosedTab()));
|
||||
tabWidget->canRestoreTab() ? action->setEnabled(true) : action->setEnabled(false);
|
||||
}
|
||||
|
||||
|
|
|
@ -407,13 +407,13 @@ void WebView::contextMenuEvent(QContextMenuEvent* event)
|
|||
if (!r.linkUrl().isEmpty() && r.linkUrl().scheme()!="javascript") {
|
||||
if (page()->selectedText() == r.linkText())
|
||||
findText("");
|
||||
menu->addAction(QIcon(":/icons/menu/popup.png"), tr("Open link in new tab"), this, SLOT(openUrlInNewTab()))->setData(r.linkUrl());
|
||||
menu->addAction(tr("Open link in new window"), this, SLOT(openUrlInNewWindow()))->setData(r.linkUrl());
|
||||
menu->addAction(QIcon(":/icons/menu/popup.png"), tr("Open link in new &tab"), this, SLOT(openUrlInNewTab()))->setData(r.linkUrl());
|
||||
menu->addAction(tr("Open link in new &window"), this, SLOT(openUrlInNewWindow()))->setData(r.linkUrl());
|
||||
menu->addSeparator();
|
||||
menu->addAction(QIcon::fromTheme("user-bookmarks"), tr("Bookmark link"), this, SLOT(bookmarkLink()))->setData(r.linkUrl());
|
||||
menu->addAction(QIcon::fromTheme("document-save"), tr("Save link as..."), this, SLOT(downloadLinkToDisk()))->setData(r.linkUrl());
|
||||
menu->addAction(QIcon::fromTheme("user-bookmarks"), tr("B&ookmark link"), this, SLOT(bookmarkLink()))->setData(r.linkUrl());
|
||||
menu->addAction(QIcon::fromTheme("document-save"), tr("&Save link as..."), this, SLOT(downloadLinkToDisk()))->setData(r.linkUrl());
|
||||
menu->addAction(tr("Send link..."), this, SLOT(sendLinkByMail()))->setData(r.linkUrl());
|
||||
menu->addAction(QIcon::fromTheme("edit-copy"), tr("Copy link address"), this, SLOT(copyLinkToClipboard()))->setData(r.linkUrl());
|
||||
menu->addAction(QIcon::fromTheme("edit-copy"), tr("&Copy link address"), this, SLOT(copyLinkToClipboard()))->setData(r.linkUrl());
|
||||
menu->addSeparator();
|
||||
if (!page()->selectedText().isEmpty())
|
||||
menu->addAction(pageAction(QWebPage::Copy));
|
||||
|
@ -422,11 +422,11 @@ void WebView::contextMenuEvent(QContextMenuEvent* event)
|
|||
if (!r.imageUrl().isEmpty()) {
|
||||
if (!menu->isEmpty())
|
||||
menu->addSeparator();
|
||||
menu->addAction(tr("Show image"), this, SLOT(showImage()))->setData(r.imageUrl());
|
||||
menu->addAction(tr("Copy image"), this, SLOT(copyImageToClipboard()))->setData(r.imageUrl());
|
||||
menu->addAction(QIcon::fromTheme("edit-copy"), tr("Copy image address"), this, SLOT(copyLinkToClipboard()))->setData(r.imageUrl());
|
||||
menu->addAction(tr("Show i&mage"), this, SLOT(showImage()))->setData(r.imageUrl());
|
||||
menu->addAction(tr("Copy im&age"), this, SLOT(copyImageToClipboard()))->setData(r.imageUrl());
|
||||
menu->addAction(QIcon::fromTheme("edit-copy"), tr("Copy image ad&dress"), this, SLOT(copyLinkToClipboard()))->setData(r.imageUrl());
|
||||
menu->addSeparator();
|
||||
menu->addAction(QIcon::fromTheme("document-save"), tr("Save image as..."), this, SLOT(downloadImageToDisk()))->setData(r.imageUrl());
|
||||
menu->addAction(QIcon::fromTheme("document-save"), tr("&Save image as..."), this, SLOT(downloadImageToDisk()))->setData(r.imageUrl());
|
||||
menu->addAction(tr("Send image..."), this, SLOT(sendLinkByMail()))->setData(r.linkUrl());
|
||||
menu->addSeparator();
|
||||
//menu->addAction(tr("Block image"), this, SLOT(blockImage()))->setData(r.imageUrl().toString());
|
||||
|
@ -443,7 +443,7 @@ void WebView::contextMenuEvent(QContextMenuEvent* event)
|
|||
}
|
||||
|
||||
if (menu->isEmpty()) {
|
||||
QAction* action = menu->addAction(tr("Back"), this, SLOT(back()));
|
||||
QAction* action = menu->addAction(tr("&Back"), this, SLOT(back()));
|
||||
#ifdef Q_WS_X11
|
||||
action->setIcon(style()->standardIcon(QStyle::SP_ArrowBack));
|
||||
#else
|
||||
|
@ -451,7 +451,7 @@ void WebView::contextMenuEvent(QContextMenuEvent* event)
|
|||
#endif
|
||||
history()->canGoBack() ? action->setEnabled(true) : action->setEnabled(false);
|
||||
|
||||
action = menu->addAction(tr("Forward"), this, SLOT(forward()));
|
||||
action = menu->addAction(tr("&Forward"), this, SLOT(forward()));
|
||||
#ifdef Q_WS_X11
|
||||
action->setIcon(style()->standardIcon(QStyle::SP_ArrowForward));
|
||||
#else
|
||||
|
@ -465,29 +465,29 @@ void WebView::contextMenuEvent(QContextMenuEvent* event)
|
|||
#else
|
||||
QIcon(":/icons/faenza/reload.png")
|
||||
#endif
|
||||
,tr("Reload"), this, SLOT(slotReload()));
|
||||
,tr("&Reload"), this, SLOT(slotReload()));
|
||||
action = menu->addAction(
|
||||
#ifdef Q_WS_X11
|
||||
style()->standardIcon(QStyle::SP_BrowserStop)
|
||||
#else
|
||||
QIcon(":/icons/faenza/stop.png")
|
||||
#endif
|
||||
,tr("Stop"), this, SLOT(stop()));
|
||||
,tr("S&top"), this, SLOT(stop()));
|
||||
isLoading() ? action->setEnabled(true) : action->setEnabled(false);
|
||||
|
||||
menu->addSeparator();
|
||||
menu->addAction(QIcon::fromTheme("user-bookmarks"), tr("Bookmark page"), this, SLOT(bookmarkLink()));
|
||||
menu->addAction(QIcon::fromTheme("document-save"), tr("Save page as..."), this, SLOT(downloadLinkToDisk()))->setData(url());
|
||||
menu->addAction(QIcon::fromTheme("user-bookmarks"), tr("Book&mark page"), this, SLOT(bookmarkLink()));
|
||||
menu->addAction(QIcon::fromTheme("document-save"), tr("&Save page as..."), this, SLOT(downloadLinkToDisk()))->setData(url());
|
||||
menu->addAction(tr("Send page..."), this, SLOT(sendLinkByMail()))->setData(url());
|
||||
menu->addSeparator();
|
||||
menu->addAction(QIcon::fromTheme("edit-select-all"), tr("Select all"), this, SLOT(selectAll()));
|
||||
menu->addAction(QIcon::fromTheme("edit-select-all"), tr("Select &all"), this, SLOT(selectAll()));
|
||||
if (!page()->selectedText().isEmpty())
|
||||
menu->addAction(pageAction(QWebPage::Copy));
|
||||
|
||||
menu->addSeparator();
|
||||
menu->addAction(QIcon::fromTheme("text-html"),tr("Show source code"), this, SLOT(showSource()));
|
||||
menu->addAction(QIcon::fromTheme("dialog-information"),tr("Show info about site"), this, SLOT(showSiteInfo()))->setData(url());
|
||||
menu->addAction(tr("Show Web Inspector"), this, SLOT(showInspector()));
|
||||
menu->addAction(QIcon::fromTheme("text-html"),tr("Show so&urce code"), this, SLOT(showSource()));
|
||||
menu->addAction(QIcon::fromTheme("dialog-information"),tr("Show info ab&out site"), this, SLOT(showSiteInfo()))->setData(url());
|
||||
menu->addAction(tr("Show Web &Inspector"), this, SLOT(showInspector()));
|
||||
}
|
||||
|
||||
mApp->plugins()->populateWebViewMenu(menu, this, r);
|
||||
|
@ -496,7 +496,7 @@ void WebView::contextMenuEvent(QContextMenuEvent* event)
|
|||
menu->addSeparator();
|
||||
QString selectedText = page()->selectedText();
|
||||
selectedText.truncate(20);
|
||||
menu->addAction(QIcon(":icons/menu/google.png"), tr("Search \"%1 ..\" on Google").arg(selectedText), this, SLOT(searchOnGoogle()))->setData(page()->selectedText());
|
||||
menu->addAction(QIcon(":icons/menu/google.png"), tr("Search \"%1 ..\" on &Google").arg(selectedText), this, SLOT(searchOnGoogle()))->setData(page()->selectedText());
|
||||
}
|
||||
|
||||
if (!menu->isEmpty()) {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user