Outstanding patches from Jason
[webos-internals:modifications.git] / browser / browser-bookmark-list-button.patch
1 Name: Bookmarks-List Button In Browser
2 Version: 1.3.5-1
3 Author: Jason Robitaille
4 Description: Adds a bookmarks-list button that brings up the list view of bookmarks  (MIT license)
5
6 --- .orig/usr/palm/applications/com.palm.app.browser/app/controllers/page-navigationmenu.js
7 +++ /usr/palm/applications/com.palm.app.browser/app/controllers/page-navigationmenu.js
8 @@ -10,6 +10,12 @@
9                 command: 'back'
10         },
11         
12 +       Bookmarks: {
13 +               label: $L('Bookmarks'),
14 +               icon: 'bookmarks',
15 +               command: 'show-bookmarks-cmd'
16 +       },
17 +       
18         Forward: {
19                 label: $L('Go forward'),
20                 icon: 'forward',
21 --- .orig/usr/palm/applications/com.palm.app.browser/app/controllers/page-controls.js
22 +++ /usr/palm/applications/com.palm.app.browser/app/controllers/page-controls.js
23 @@ -25,6 +25,13 @@
24                         icon: MenuData.NavigationMenu.Forward.icon,
25                         command: MenuData.NavigationMenu.Forward.command
26                 };
27 +               
28 +               this._bookmarksModel = {
29 +                       disabled: false,
30 +                       label: MenuData.NavigationMenu.Bookmarks.label,
31 +                       icon: MenuData.NavigationMenu.Bookmarks.icon,
32 +                       command: MenuData.NavigationMenu.Bookmarks.command
33 +               };
34  
35                 this._model = {
36                         visible: true,
37 @@ -28,7 +35,7 @@
38  
39                 this._model = {
40                         visible: true,
41 -                       items: [this._backModel, {}, {}]
42 +                       items: [this._backModel, this._bookmarksModel, {}, {}]
43                 };
44  
45                 this._currentPageModel = {};
46 @@ -64,6 +71,7 @@
47                 var items = $A();
48                 this._backModel.disabled = !back;
49                 items.push(this._backModel);
50 +               items.push(this._bookmarksModel);
51  
52                 if (forward) {
53                         this._forwardModel.disabled = !forward;