|
|
|
|
@ -78,6 +78,7 @@ PopupWindow::PopupWindow(PopupWebView* view) |
|
|
|
|
m_menuEdit->addAction(QIcon::fromTheme("edit-select-all"), tr("Select All"), m_view, SLOT(selectAll()))->setShortcut(QKeySequence("Ctrl+A")); |
|
|
|
|
m_menuEdit->addAction(QIcon::fromTheme("edit-find"), tr("Find"), this, SLOT(searchOnPage()))->setShortcut(QKeySequence("Ctrl+F")); |
|
|
|
|
connect(m_menuEdit, SIGNAL(aboutToShow()), this, SLOT(aboutToShowEditMenu())); |
|
|
|
|
connect(m_menuEdit, SIGNAL(aboutToHide()), this, SLOT(aboutToHideEditMenu())); |
|
|
|
|
m_menuBar->addMenu(m_menuEdit); |
|
|
|
|
|
|
|
|
|
m_menuView = new QMenu(tr("View")); |
|
|
|
|
@ -108,6 +109,8 @@ PopupWindow::PopupWindow(PopupWebView* view) |
|
|
|
|
m_layout->addWidget(m_statusBar); |
|
|
|
|
setLayout(m_layout); |
|
|
|
|
|
|
|
|
|
aboutToHideEditMenu(); |
|
|
|
|
|
|
|
|
|
connect(m_view, SIGNAL(showNotification(QWidget*)), this, SLOT(showNotification(QWidget*))); |
|
|
|
|
connect(m_view, SIGNAL(titleChanged(QString)), this, SLOT(titleChanged())); |
|
|
|
|
connect(m_view, SIGNAL(urlChanged(QUrl)), m_locationBar, SLOT(showUrl(QUrl))); |
|
|
|
|
@ -230,6 +233,18 @@ void PopupWindow::aboutToShowEditMenu() |
|
|
|
|
m_menuEdit->actions().at(7)->setEnabled(m_view->pageAction(QWebPage::SelectAll)->isEnabled()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void PopupWindow::aboutToHideEditMenu() |
|
|
|
|
{ |
|
|
|
|
m_menuEdit->actions().at(0)->setEnabled(false); |
|
|
|
|
m_menuEdit->actions().at(1)->setEnabled(false); |
|
|
|
|
// Separator
|
|
|
|
|
m_menuEdit->actions().at(3)->setEnabled(false); |
|
|
|
|
m_menuEdit->actions().at(4)->setEnabled(false); |
|
|
|
|
m_menuEdit->actions().at(5)->setEnabled(false); |
|
|
|
|
// Separator
|
|
|
|
|
m_menuEdit->actions().at(7)->setEnabled(false); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void PopupWindow::savePageScreen() |
|
|
|
|
{ |
|
|
|
|
PageScreen* pageScreen = new PageScreen(m_view, this); |
|
|
|
|
|