rem: gMailSession.AddFolderListener(gSearchSessionFolderListener); 
add: var nsIFolderListener = Components.interfaces.nsIFolderListener; var notifyFlags = nsIFolderListener.event; gMailSession.AddFolderListener(gSearchSessionFolderListener, notifyFlags); 
context: function setupDatasource() {    RDF = Components.classes[rdfServiceContractID].getService(Components.interfaces.nsIRDFService);    gSearchView = Components.classes["@mozilla.org/messenger/msgdbview;1?type=search"].createInstance(Components.interfaces.nsIMsgDBView);    var count = new Object;    var cmdupdator = new nsMsgSearchCommandUpdater();    gSearchView.init(messenger, msgWindow, cmdupdator);    gSearchView.open(null, nsMsgViewSortType.byId, nsMsgViewSortOrder.ascending, nsMsgViewFlagsType.kNone, count);    // the thread pane needs to use the search datasource (to get the    // actual list of messages) and the message datasource (to get any    // attributes about each message)    gSearchSession = Components.classes[searchSessionContractID].createInstance(Components.interfaces.nsIMsgSearchSession);    gSearchSessionFolderListener = gSearchSession.QueryInterface(Components.interfaces.nsIFolderListener);    gMailSession = Components.classes[mailSessionContractID].getService(Components.interfaces.nsIMsgMailSession);    gMailSession.AddFolderListener(gSearchSessionFolderListener);    // the datasource is a listener on the search results    gViewSearchListener = gSearchView.QueryInterface(Components.interfaces.nsIMsgSearchNotify);    gSearchSession.registerListener(gViewSearchListener);    gSearchSession.addFolderListener(gFolderListener);}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/94abe5f5b380f45833d4b4855d4c8298fcda6514/SearchDialog.js/clean/mailnews/base/search/resources/content/SearchDialog.js