| | 175 | |
|---|
| | 176 | Observer: { |
|---|
| | 177 | registerObserver: function() { |
|---|
| | 178 | try { |
|---|
| | 179 | makeObserver(this); |
|---|
| | 180 | var os = Cc["@mozilla.org/observer-service;1"].getService(Ci.nsIObserverService); |
|---|
| | 181 | os.addObserver(this, 'DTA:filterschanged', true); |
|---|
| | 182 | } |
|---|
| | 183 | catch (ex) { |
|---|
| | 184 | Debug.log("cannot install filterManager observer!", ex); |
|---|
| | 185 | return false; |
|---|
| | 186 | } |
|---|
| | 187 | return true; |
|---|
| | 188 | }, |
|---|
| | 189 | // nsIObserver::observe |
|---|
| | 190 | observe : function(subject, topic, prefName) { |
|---|
| | 191 | // filterManager will throw this topic at us. |
|---|
| | 192 | if (topic == 'DTA:filterschanged') { |
|---|
| | 193 | // the heavy work will be performed by changeTab.. |
|---|
| | 194 | // it will create the filter boxen for us, and furthermore do another selection |
|---|
| | 195 | Filters.reloadFilters(); |
|---|
| | 196 | } |
|---|
| | 197 | } |
|---|
| | 198 | }, |
|---|
| 412 | | setCellValue: function(idx, col, value) {}, |
|---|
| 413 | | |
|---|
| 414 | | // nsIObserver::observe |
|---|
| 415 | | observe : function(subject, topic, prefName) { |
|---|
| 416 | | // filterManager will throw this topic at us. |
|---|
| 417 | | if (topic == 'DTA:filterschanged') { |
|---|
| 418 | | // the heavy work will be performed by changeTab.. |
|---|
| 419 | | // it will create the filter boxen for us, and furthermore do another selection |
|---|
| 420 | | this.reloadFilters(); |
|---|
| 421 | | } |
|---|
| 422 | | } |
|---|
| | 424 | setCellValue: function(idx, col, value) {} |
|---|