rem: var nsIRDFDataSource = Components.interfaces.nsIRDFDataSource; 
add:   folderPaneHeader.value = loadFolderViewForTree(aNewFolderView, GetFolderTree());    var folderLocationPicker = document.getElementById('folder-location-container'); if (folderLocationPicker) loadFolderViewForTree(aNewFolderView, document.getElementById('folderLocationPopup').tree); 
context: function loadFolderView(aNewFolderView){  if (gCurrentFolderView && (gCurrentFolderView == aNewFolderView))    return;  var folderPaneHeader = document.getElementById('folderpane-title');  var folderTree = GetFolderTree();  var database = GetFolderDatasource();  var nsIRDFDataSource = Components.interfaces.nsIRDFDataSource;  // Each folder pane view has the following properties:   // ref-> the ref attribute for the folderTree  // label -> the UI label associated with the folder view  // datasources -> array of the data sources associated with the view  var folderViews = [                       {ref:"msgaccounts:/",           label:"folderPaneHeader",           dataSources: [accountManagerDataSource.QueryInterface(nsIRDFDataSource),                                                                                                        folderDataSource.QueryInterface(nsIRDFDataSource)] },                      {ref:"mailnewsunreadfolders:/", label:"folderPaneHeader_unread",    dataSources: [unreadFolderDataSource.QueryInterface(nsIRDFDataSource)]},                      {ref:"mailnewsfavefolders:/",   label:"folderPaneHeader_favorites", dataSources: [favoriteFoldersDataSource.QueryInterface(nsIRDFDataSource)]},                      {ref:"mailnewsrecentfolders:/", label:"folderPaneHeader_recent",    dataSources: [recentFoldersDataSource.QueryInterface(nsIRDFDataSource)]},                    ];  // unload the current data sources  if (gCurrentFolderView != undefined)  {    var dataSourcesToUnload = folderViews[gCurrentFolderView].dataSources;    for (index in dataSourcesToUnload)      database.RemoveDataSource(dataSourcesToUnload[index]);  }  // add the new data sources  var dataSourcesToAdd = folderViews[aNewFolderView].dataSources;  for (index in dataSourcesToAdd)  {    database.AddDataSource(dataSourcesToAdd[index]);    var msgDS = dataSourcesToAdd[index].QueryInterface(Components.interfaces.nsIMsgRDFDataSource);    msgDS.window = msgWindow;  }  folderTree.setAttribute('ref', folderViews[aNewFolderView].ref);  folderPaneHeader.value = gMessengerBundle.getString(folderViews[aNewFolderView].label);  // reflect the new value back into prefs  pref.setIntPref('mail.ui.folderpane.view', gCurrentFolderView = aNewFolderView);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/a452f4073610bd4cf6686604edfc51cb2e04e617/msgMail3PaneWindow.js/buggy/mail/base/content/msgMail3PaneWindow.js