@@ -19,10 +19,10 @@ Components.utils.import("resource://services-sync/main.js");
1919 * disabled. Must sanely support 'hidden' attribute.
2020 * You may only have one UI access point at this time.
2121 */
22- function RemoteTabsView ( aSet , aSetUIAccess ) {
22+ function RemoteTabsView ( aSet , aSetUIAccessList ) {
2323 this . _set = aSet ;
2424 this . _set . controller = this ;
25- this . _uiAccessElement = aSetUIAccess ;
25+ this . _uiAccessElements = aSetUIAccessList ;
2626
2727 // Sync uses special voodoo observers.
2828 // If you want to change this code, talk to the fx-si team
@@ -38,7 +38,7 @@ function RemoteTabsView(aSet, aSetUIAccess) {
3838
3939RemoteTabsView . prototype = {
4040 _set : null ,
41- _uiAccessElement : null ,
41+ _uiAccessElements : [ ] ,
4242
4343 handleItemClick : function tabview_handleItemClick ( aItem ) {
4444 let url = aItem . getAttribute ( "value" ) ;
@@ -57,7 +57,9 @@ RemoteTabsView.prototype = {
5757 } ,
5858
5959 setUIAccessVisible : function setUIAccessVisible ( aVisible ) {
60- this . _uiAccessElement . hidden = ! aVisible ;
60+ for ( let elem of this . _uiAccessElements ) {
61+ elem . hidden = ! aVisible ;
62+ }
6163 } ,
6264
6365 populateGrid : function populateGrid ( ) {
@@ -108,7 +110,8 @@ let RemoteTabsStartView = {
108110
109111 init : function init ( ) {
110112 let vbox = document . getElementById ( "start-remotetabs" ) ;
111- this . _view = new RemoteTabsView ( this . _grid , vbox ) ;
113+ let uiList = [ vbox ] ;
114+ this . _view = new RemoteTabsView ( this . _grid , uiList ) ;
112115 } ,
113116
114117 uninit : function uninit ( ) {
@@ -127,9 +130,11 @@ let RemoteTabsPanelView = {
127130 get visible ( ) { return PanelUI . isPaneVisible ( "remotetabs-container" ) ; } ,
128131
129132 init : function init ( ) {
130- //decks are fragile, don't hide the tab panel(bad things happen), hide link.
133+ //decks are fragile, don't hide the tab panel(bad things happen), hide link in menu .
131134 let menuEntry = document . getElementById ( "menuitem-remotetabs" ) ;
132- this . _view = new RemoteTabsView ( this . _grid , menuEntry ) ;
135+ let snappedEntry = document . getElementById ( "snappedRemoteTabsLabel" ) ;
136+ let uiList = [ menuEntry , snappedEntry ] ;
137+ this . _view = new RemoteTabsView ( this . _grid , uiList ) ;
133138 } ,
134139
135140 show : function show ( ) {
0 commit comments