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

  • From: webkit@xxxxxxxxxxxxxxx
  • To: haiku-webkit-commits@xxxxxxxxxxxxx
  • Date: Thu, 20 May 2010 19:31:59 +0000

Author: stippi
Date: Thu May 20 19:31:56 2010
New Revision: 510
URL: http://mmlr.dyndns.org/changeset/510

Log:
Added Home button... by popular request. Will perhaps make it a setting.

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

Modified: webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp
==============================================================================
--- webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp     Thu May 20 
18:49:18 2010        (r509)
+++ webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp     Thu May 20 
19:31:56 2010        (r510)
@@ -83,6 +83,7 @@
        GO_BACK                                                                 
        = 'goba',
        GO_FORWARD                                                              
        = 'gofo',
        STOP                                                                    
        = 'stop',
+       HOME                                                                    
        = 'home',
        GOTO_URL                                                                
        = 'goul',
        RELOAD                                                                  
        = 'reld',
        CLEAR_HISTORY                                                           
= 'clhs',
@@ -359,6 +360,10 @@
        fStopButton->SetIcon(204);
        fStopButton->TrimIcon();
 
+       fHomeButton = new IconButton("Home", 0, NULL, new BMessage(HOME));
+       fHomeButton->SetIcon(206);
+       fHomeButton->TrimIcon();
+
        // URL input group
        fURLInputGroup = new URLInputGroup(new BMessage(GOTO_URL));
 
@@ -402,12 +407,14 @@
 
        // Navigation group
        BView* navigationGroup = BGroupLayoutBuilder(B_VERTICAL)
-               .Add(BGridLayoutBuilder(kElementSpacing, kElementSpacing)
-                       .Add(fBackButton, 0, 0)
-                       .Add(fForwardButton, 1, 0)
-                       .Add(fStopButton, 2, 0)
-                       .Add(fURLInputGroup, 3, 0)
-                       .SetInsets(kInsetSpacing, kInsetSpacing, kInsetSpacing, 
kInsetSpacing)
+               .Add(BGroupLayoutBuilder(B_HORIZONTAL, kElementSpacing)
+                       .Add(fBackButton)
+                       .Add(fForwardButton)
+                       .Add(fStopButton)
+                       .Add(fHomeButton)
+                       .Add(fURLInputGroup)
+                       .SetInsets(kInsetSpacing, kInsetSpacing, kInsetSpacing,
+                               kInsetSpacing)
                )
                .Add(new BSeparatorView(B_HORIZONTAL, B_PLAIN_BORDER))
        ;
@@ -580,6 +587,9 @@
                case STOP:
                        CurrentWebView()->StopLoading();
                        break;
+               case HOME:
+                       CurrentWebView()->LoadURL(fStartPageURL);
+                       break;
 
                case CLEAR_HISTORY: {
                        BrowsingHistory* history = 
BrowsingHistory::DefaultInstance();

Modified: webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.h
==============================================================================
--- webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.h       Thu May 20 
18:49:18 2010        (r509)
+++ webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.h       Thu May 20 
19:31:56 2010        (r510)
@@ -204,6 +204,7 @@
                        IconButton*                     fBackButton;
                        IconButton*                     fForwardButton;
                        IconButton*                     fStopButton;
+                       IconButton*                     fHomeButton;
                        URLInputGroup*          fURLInputGroup;
                        BStringView*            fStatusText;
                        BStatusBar*                     fLoadingProgressBar;

Modified: webkit/trunk/WebKit/haiku/WebPositive/WebPositive.rdef
==============================================================================
--- webkit/trunk/WebKit/haiku/WebPositive/WebPositive.rdef      Thu May 20 
18:49:18 2010        (r509)
+++ webkit/trunk/WebKit/haiku/WebPositive/WebPositive.rdef      Thu May 20 
19:31:56 2010        (r510)
@@ -296,6 +296,19 @@
        $"000A0503070809100117810004"
 };
 
+resource(206, "kActionGoStart") #'VICN' array {
+       $"6E63696605050002001602B53D77BAF2653D77A7B7CFFC460F874A2D7700F0FF"
+       $"D50200160236FB2637191CBC57873C40E14B0E7149D82700A2FFBB0200060239"
+       $"FB483A6DC2BDAC713D02DB4B384746086300EA0606FFD005050200060238B0C7"
+       $"397C47BD2A963C71B74A82C348B2B700FF4444FFF106060A0A06304942525044"
+       $"50383E32303D0A09303B3049324A32C0723643364C4252424036320A04503650"
+       $"44425242400A082D3E3535434645455439462C35312B3C0A062B3C2D3E353543"
+       $"46454535310A0445455439462C35310A0432C072324A364C36430A043A453A4A"
+       $"3E4C3EC2630A044645464A484848430A044C3F4C444E424E3D070A0001001001"
+       $"178400040A010101000A020102000A000406070809000A000103100117840004"
+       $"0A030105000A04010400"
+};
+
 resource(205, "kActionGo") archive BBitmap {
        "_frame" = rect { 0.0, 0.0, 15.0, 15.0 },
        "_cspace" = 8200,

Other related posts: