[haiku-webkit-commits] r444 - webkit/trunk/WebKit/haiku/WebPositive

  • From: webkit@xxxxxxxxxxxxxxx
  • To: haiku-webkit-commits@xxxxxxxxxxxxx
  • Date: Tue, 20 Apr 2010 16:26:32 +0000

Author: stippi
Date: Tue Apr 20 16:26:32 2010
New Revision: 444
URL: http://mmlr.dyndns.org/changeset/444

Log:
Implementing MenusEnded() is not needed anymore, since we enable Cut/Copy/Paste
by default now.

Modified:
   webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp
   webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.h

Modified: webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp
==============================================================================
--- webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp     Tue Apr 20 
16:24:16 2010        (r443)
+++ webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp     Tue Apr 20 
16:26:32 2010        (r444)
@@ -712,19 +712,6 @@
 
 
 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)
 {
        // Executed in app thread (new BWebPage needs to be created in app 
thread).
@@ -1451,7 +1438,10 @@
                // 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);

Modified: webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.h
==============================================================================
--- webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.h       Tue Apr 20 
16:24:16 2010        (r443)
+++ webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.h       Tue Apr 20 
16:26:32 2010        (r444)
@@ -81,7 +81,6 @@
        virtual void                            MessageReceived(BMessage* 
message);
        virtual bool                            QuitRequested();
        virtual void                            MenusBeginning();
-       virtual void                            MenusEnded();
 
                        void                            CreateNewTab(const 
BString& url, bool select,
                                                                        
BWebView* webView = 0);

Other related posts:

  • » [haiku-webkit-commits] r444 - webkit/trunk/WebKit/haiku/WebPositive - webkit