2011-01-03 Yi Shen <yi.4.shen@nokia.com>

        Reviewed by Adam Barth.

        [Qt] Add SelectAll option to the context menu for the editor
        https://bugs.webkit.org/show_bug.cgi?id=50049

        Set shortcut for the SelectAll action.

        * QtTestBrowser/mainwindow.cpp:
        (MainWindow::buildUI):
2011-01-03  Yi Shen  <yi.4.shen@nokia.com>

        Reviewed by Adam Barth.

        [Qt] Add SelectAll option to the context menu for the editor
        https://bugs.webkit.org/show_bug.cgi?id=50049

        Enable SelectAll for the Qt context menu.

        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::populate):
        * platform/ContextMenuItem.h:
        * platform/LocalizationStrategy.h:
        * platform/LocalizedStrings.cpp:
        (WebCore::contextMenuItemTagSelectAll):
        * platform/LocalizedStrings.h:
2011-01-03  Yi Shen  <yi.4.shen@nokia.com>

        Reviewed by Adam Barth.

        [Qt] Add SelectAll option to the context menu for the editor
        https://bugs.webkit.org/show_bug.cgi?id=50049

        Enable SelectAll for the Qt context menu.

        * Api/qwebpage.cpp:
        (webActionForContextMenuAction):
        (QWebPage::action):
        * WebCoreSupport/WebPlatformStrategies.cpp:
        (WebPlatformStrategies::contextMenuItemTagSelectAll):
        * WebCoreSupport/WebPlatformStrategies.h:
2011-01-03  Yi Shen  <yi.4.shen@nokia.com>

        Reviewed by Adam Barth.

        [Qt] Add SelectAll option to the context menu for the editor
        https://bugs.webkit.org/show_bug.cgi?id=50049

        Add WebPlatformStrategies::contextMenuItemTagSelectAll for Qt.

        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::contextMenuItemTagSelectAll):
        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74941 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 335f12e6
2011-01-03 Yi Shen <yi.4.shen@nokia.com>
Reviewed by Adam Barth.
[Qt] Add SelectAll option to the context menu for the editor
https://bugs.webkit.org/show_bug.cgi?id=50049
Set shortcut for the SelectAll action.
* QtTestBrowser/mainwindow.cpp:
(MainWindow::buildUI):
2011-01-03 David Levin <levin@chromium.org>
Reviewed by Eric Seidel.
......@@ -95,6 +95,7 @@ void MainWindow::buildUI()
page()->action(QWebPage::Cut)->setShortcut(QKeySequence::Cut);
page()->action(QWebPage::Copy)->setShortcut(QKeySequence::Copy);
page()->action(QWebPage::Paste)->setShortcut(QKeySequence::Paste);
page()->action(QWebPage::SelectAll)->setShortcut(QKeySequence::SelectAll);
page()->action(QWebPage::ToggleBold)->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_B));
page()->action(QWebPage::ToggleItalic)->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_I));
......
2011-01-03 Yi Shen <yi.4.shen@nokia.com>
Reviewed by Adam Barth.
[Qt] Add SelectAll option to the context menu for the editor
https://bugs.webkit.org/show_bug.cgi?id=50049
Enable SelectAll for the Qt context menu.
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::populate):
* platform/ContextMenuItem.h:
* platform/LocalizationStrategy.h:
* platform/LocalizedStrings.cpp:
(WebCore::contextMenuItemTagSelectAll):
* platform/LocalizedStrings.h:
2011-01-03 Dan Bernstein <mitz@apple.com>
Reviewed by Darin Adler.
......
......@@ -680,6 +680,8 @@ void ContextMenuController::populate()
ContextMenuItem PasteItem(ActionType, ContextMenuItemTagPaste, contextMenuItemTagPaste());
#if PLATFORM(GTK)
ContextMenuItem DeleteItem(ActionType, ContextMenuItemTagDelete, contextMenuItemTagDelete());
#endif
#if PLATFORM(GTK) || PLATFORM(QT)
ContextMenuItem SelectAllItem(ActionType, ContextMenuItemTagSelectAll, contextMenuItemTagSelectAll());
#endif
......@@ -862,6 +864,8 @@ void ContextMenuController::populate()
#if PLATFORM(GTK)
appendItem(DeleteItem, m_contextMenu.get());
appendItem(*separatorItem(), m_contextMenu.get());
#endif
#if PLATFORM(GTK) || PLATFORM(QT)
appendItem(SelectAllItem, m_contextMenu.get());
#endif
......
......@@ -76,7 +76,11 @@ namespace WebCore {
ContextMenuItemTagPaste,
#if PLATFORM(GTK)
ContextMenuItemTagDelete,
#endif
#if PLATFORM(GTK) || PLATFORM(QT)
ContextMenuItemTagSelectAll,
#endif
#if PLATFORM(GTK)
ContextMenuItemTagInputMethods,
ContextMenuItemTagUnicode,
#endif
......
......@@ -65,9 +65,11 @@ public:
virtual String contextMenuItemTagPaste() = 0;
#if PLATFORM(GTK)
virtual String contextMenuItemTagDelete() = 0;
virtual String contextMenuItemTagSelectAll() = 0;
virtual String contextMenuItemTagInputMethods() = 0;
virtual String contextMenuItemTagUnicode() = 0;
#endif
#if PLATFORM(GTK) || PLATFORM(QT)
virtual String contextMenuItemTagSelectAll() = 0;
#endif
virtual String contextMenuItemTagNoGuessesFound() = 0;
virtual String contextMenuItemTagIgnoreSpelling() = 0;
......
......@@ -144,6 +144,13 @@ String contextMenuItemTagPaste()
return platformStrategies()->localizationStrategy()->contextMenuItemTagPaste();
}
#if PLATFORM(QT)
String contextMenuItemTagSelectAll()
{
return platformStrategies()->localizationStrategy()->contextMenuItemTagSelectAll();
}
#endif
String contextMenuItemTagNoGuessesFound()
{
return platformStrategies()->localizationStrategy()->contextMenuItemTagNoGuessesFound();
......
......@@ -61,9 +61,11 @@ namespace WebCore {
String contextMenuItemTagPaste();
#if PLATFORM(GTK)
String contextMenuItemTagDelete();
String contextMenuItemTagSelectAll();
String contextMenuItemTagInputMethods();
String contextMenuItemTagUnicode();
#endif
#if PLATFORM(GTK) || PLATFORM(QT)
String contextMenuItemTagSelectAll();
#endif
String contextMenuItemTagNoGuessesFound();
String contextMenuItemTagIgnoreSpelling();
......
......@@ -418,6 +418,7 @@ static QWebPage::WebAction webActionForContextMenuAction(WebCore::ContextMenuAct
case WebCore::ContextMenuItemTagBold: return QWebPage::ToggleBold;
case WebCore::ContextMenuItemTagItalic: return QWebPage::ToggleItalic;
case WebCore::ContextMenuItemTagUnderline: return QWebPage::ToggleUnderline;
case WebCore::ContextMenuItemTagSelectAll: return QWebPage::SelectAll;
#if ENABLE(INSPECTOR)
case WebCore::ContextMenuItemTagInspectElement: return QWebPage::InspectElement;
#endif
......@@ -2734,6 +2735,9 @@ QAction *QWebPage::action(WebAction action) const
case Paste:
text = contextMenuItemTagPaste();
break;
case SelectAll:
text = contextMenuItemTagSelectAll();
break;
#ifndef QT_NO_UNDOSTACK
case Undo: {
QAction *a = undoStack()->createUndoAction(d->q);
......@@ -2782,9 +2786,6 @@ QAction *QWebPage::action(WebAction action) const
case MoveToEndOfDocument:
text = tr("Move the cursor to the end of the document");
break;
case SelectAll:
text = tr("Select all");
break;
case SelectNextChar:
text = tr("Select to the next character");
break;
......
2011-01-03 Yi Shen <yi.4.shen@nokia.com>
Reviewed by Adam Barth.
[Qt] Add SelectAll option to the context menu for the editor
https://bugs.webkit.org/show_bug.cgi?id=50049
Enable SelectAll for the Qt context menu.
* Api/qwebpage.cpp:
(webActionForContextMenuAction):
(QWebPage::action):
* WebCoreSupport/WebPlatformStrategies.cpp:
(WebPlatformStrategies::contextMenuItemTagSelectAll):
* WebCoreSupport/WebPlatformStrategies.h:
2011-01-03 Antonio Gomes <agomes@rim.com>
Unreviewed crash fix.
......
......@@ -290,6 +290,11 @@ String WebPlatformStrategies::contextMenuItemTagPaste()
return QCoreApplication::translate("QWebPage", "Paste", "Paste context menu item");
}
String WebPlatformStrategies::contextMenuItemTagSelectAll()
{
return QCoreApplication::translate("QWebPage", "Select All", "Select All context menu item");
}
String WebPlatformStrategies::contextMenuItemTagNoGuessesFound()
{
return QCoreApplication::translate("QWebPage", "No Guesses Found", "No Guesses Found context menu item");
......
......@@ -74,6 +74,7 @@ private:
virtual WTF::String contextMenuItemTagReload();
virtual WTF::String contextMenuItemTagCut();
virtual WTF::String contextMenuItemTagPaste();
virtual WTF::String contextMenuItemTagSelectAll();
virtual WTF::String contextMenuItemTagNoGuessesFound();
virtual WTF::String contextMenuItemTagIgnoreSpelling();
virtual WTF::String contextMenuItemTagLearnSpelling();
......
2011-01-03 Yi Shen <yi.4.shen@nokia.com>
Reviewed by Adam Barth.
[Qt] Add SelectAll option to the context menu for the editor
https://bugs.webkit.org/show_bug.cgi?id=50049
Add WebPlatformStrategies::contextMenuItemTagSelectAll for Qt.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::contextMenuItemTagSelectAll):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2011-01-03 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
......@@ -302,12 +302,6 @@ String WebPlatformStrategies::contextMenuItemTagDelete()
return "Delete";
}
String WebPlatformStrategies::contextMenuItemTagSelectAll()
{
notImplemented();
return "Select All";
}
String WebPlatformStrategies::contextMenuItemTagInputMethods()
{
notImplemented();
......@@ -322,6 +316,16 @@ String WebPlatformStrategies::contextMenuItemTagUnicode()
#endif
#if PLATFORM(GTK) || PLATFORM(QT)
String WebPlatformStrategies::contextMenuItemTagSelectAll()
{
notImplemented();
return "Select All";
}
#endif
String WebPlatformStrategies::contextMenuItemTagNoGuessesFound()
{
return UI_STRING("No Guesses Found", "No Guesses Found context menu item");
......
......@@ -78,9 +78,11 @@ private:
virtual String contextMenuItemTagPaste();
#if PLATFORM(GTK)
virtual String contextMenuItemTagDelete();
virtual String contextMenuItemTagSelectAll();
virtual String contextMenuItemTagInputMethods();
virtual String contextMenuItemTagUnicode();
#endif
#if PLATFORM(GTK) || PLATFORM(QT)
virtual String contextMenuItemTagSelectAll();
#endif
virtual String contextMenuItemTagNoGuessesFound();
virtual String contextMenuItemTagIgnoreSpelling();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment