Implementing MenusEnded() is not needed anymore, since we enable Cut/Copy/Paste

by default now.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@444 94f232f2-1747-11df-bad5-a5bfde151594
This commit is contained in:
stippi 2010-04-20 16:26:32 +00:00 committed by Alexandre Deckner
parent 0e7170b49e
commit c53bbc329d
2 changed files with 4 additions and 15 deletions

View File

@ -711,19 +711,6 @@ BrowserWindow::MenusBeginning()
}
void
BrowserWindow::MenusEnded()
{
// Reenabled the clipboard items, since we don't update them when
// the capabilities really change, but only when the menu is opened.
// The shortcuts need to work when the capabilities change without
// the Edit menu being opened meanwhile.
fCutMenuItem->SetEnabled(true);
fCopyMenuItem->SetEnabled(true);
fPasteMenuItem->SetEnabled(true);
}
void
BrowserWindow::CreateNewTab(const BString& url, bool select, BWebView* webView)
{
@ -1451,7 +1438,10 @@ BrowserWindow::_UpdateClipboardItems()
// BWebView doesn't have focus, we'll dispatch these message
// there anyway. This works so fast that the user can never see
// the wrong enabled state when the menu opens until the result
// message arrives.
// message arrives. The initial state needs to be enabled, since
// standard shortcut handling is always wrapped inside MenusBeginning()
// and MenusEnded(), and since we update items asynchronously, we need
// to have them enabled to begin with.
fCutMenuItem->SetEnabled(true);
fCopyMenuItem->SetEnabled(true);
fPasteMenuItem->SetEnabled(true);

View File

@ -81,7 +81,6 @@ public:
virtual void MessageReceived(BMessage* message);
virtual bool QuitRequested();
virtual void MenusBeginning();
virtual void MenusEnded();
void CreateNewTab(const BString& url, bool select,
BWebView* webView = 0);