diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-10-09 08:05:13 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-10-09 08:05:13 (GMT) |
commit | cc9f9ba0bb389b014929af6f8f53e3248463612d (patch) | |
tree | 48da8c516bb1745bb1b576f104c0def4e6377818 | |
parent | 2c6f1075474f6b8086cc6abf7978aee9421761c8 (diff) | |
download | swift-contrib-cc9f9ba0bb389b014929af6f8f53e3248463612d.zip swift-contrib-cc9f9ba0bb389b014929af6f8f53e3248463612d.tar.bz2 |
Filter chat view actions again.
-rw-r--r-- | Swift/QtUI/QtChatView.cpp | 4 | ||||
-rw-r--r-- | Swift/QtUI/QtWebView.cpp | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/Swift/QtUI/QtChatView.cpp b/Swift/QtUI/QtChatView.cpp index 7bb5818..97ce992 100644 --- a/Swift/QtUI/QtChatView.cpp +++ b/Swift/QtUI/QtChatView.cpp @@ -51,21 +51,19 @@ QtChatView::QtChatView(QtChatTheme* theme, QWidget* parent) : QWidget(parent), f mainLayout->addWidget(webView_); #endif #ifdef SWIFT_EXPERIMENTAL_FT setAcceptDrops(true); #endif webPage_ = new QWebPage(this); webPage_->setLinkDelegationPolicy(QWebPage::DelegateAllLinks); -#ifdef SWIFT_EXPERIMENTAL_FT - webPage_->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true); -#endif + //webPage_->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true); webView_->setPage(webPage_); connect(webPage_, SIGNAL(selectionChanged()), SLOT(copySelectionToClipboard())); viewReady_ = false; isAtBottom_ = true; resetView(); } void QtChatView::handleClearRequested() { diff --git a/Swift/QtUI/QtWebView.cpp b/Swift/QtUI/QtWebView.cpp index d393b6c..388f06a 100644 --- a/Swift/QtUI/QtWebView.cpp +++ b/Swift/QtUI/QtWebView.cpp @@ -41,33 +41,32 @@ void QtWebView::dragEnterEvent(QDragEnterEvent*) { void QtWebView::setFontSizeIsMinimal(bool minimum) { fontSizeIsMinimal = minimum; } void QtWebView::contextMenuEvent(QContextMenuEvent* ev) { // Filter out the relevant actions from the standard actions QMenu* menu = page()->createStandardContextMenu(); - /* QList<QAction*> actions(menu->actions()); for (int i = 0; i < actions.size(); ++i) { QAction* action = actions.at(i); bool removeAction = true; for(size_t j = 0; j < filteredActions.size(); ++j) { if (action == pageAction(filteredActions[j])) { removeAction = false; break; } } if (removeAction) { menu->removeAction(action); } - }*/ + } // Add our own custom actions menu->addAction(tr("Clear"), this, SIGNAL(clearRequested())); menu->addAction(tr("Increase font size"), this, SIGNAL(fontGrowRequested())); QAction* shrink = new QAction(tr("Decrease font size"), this); shrink->setEnabled(!fontSizeIsMinimal); connect(shrink, SIGNAL(triggered()), this, SIGNAL(fontShrinkRequested())); menu->addAction(shrink); |