Changeset 317

Show
Ignore:
Timestamp:
2007-05-14 21:14:07 (2 years ago)
Author:
MaierMan
Message:

fixing the alerting service on OpenSuse? (for some reason the previous code didn't work)
moving makeObserver into AlertingService?._init so that it won't get initialized when the service is not available.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/chrome/content/dta/manager.js

    r280 r317  
    14001400var AlertService = { 
    14011401        _alerting: false, 
    1402         _service:  
    1403                 // not present in MacOS 
    1404                 ('@mozilla.org/alerts-service;1' in Cc)? 
    1405                         Cc['@mozilla.org/alerts-service;1'].getService(Ci.nsIAlertsService): 
    1406                         null 
    1407         , 
     1402        _init: function() { 
     1403                if ('@mozilla.org/alerts-service;1' in Cc && 'nsIAlertsService' in Ci) { 
     1404                        // some systems do not have this service 
     1405                        try { 
     1406                                this._service = Cc['@mozilla.org/alerts-service;1'].getService(Ci.nsIAlertsService); 
     1407                                makeObserver(this); 
     1408                        } 
     1409                        catch (ex) { 
     1410                                // no-op 
     1411                        } 
     1412                        return null; 
     1413                } 
     1414        }, 
     1415        _service: null, 
    14081416        show: function(title, msg, clickable, cookie) { 
    14091417                if (this._alerting || !this._service) { 
     
    14391447        } 
    14401448}; 
    1441 makeObserver(AlertService); 
     1449AlertService._init(); 
    14421450 
    14431451// --------* Controlli di chiusura e avvio nuovi downloads *-------- 
     
    40014009function stopCanvas() {Prefs.currentTooltip=null;} 
    40024010 
     4011