Update Status Reminder and Do Not Disturb for compatibility with the changes from bug 759.
authorFlorian Quèze <florian@instantbird.org>
Thu Nov 10 01:59:54 2011 +0100 (6 months ago)
changeset 38ed9a4120b55e
parent 37 7f7829087892
child 39 822dd5fda520
Update Status Reminder and Do Not Disturb for compatibility with the changes from bug 759.
donotdisturb/Makefile
donotdisturb/bootstrap.js
statusreminder/Makefile
statusreminder/bootstrap.js
     1.1 --- a/donotdisturb/Makefile
     1.2 +++ b/donotdisturb/Makefile
     1.3 @@ -1,7 +1,7 @@
     1.4  PACKAGE = donotdisturb
     1.5  PACKAGE_ID = $(PACKAGE)@florian.instantbird.org
     1.6  PACKAGE_NAME = Do Not Disturb
     1.7 -PACKAGE_VERSION = 1.0
     1.8 +PACKAGE_VERSION = 1.0.1
     1.9  PACKAGE_DESCRIPTION = Prevent all interruptions while not available
    1.10  PACKAGE_AUTHOR = Florian Queze
    1.11  PACKAGE_MIN_VERSION = 1.1a1pre
     2.1 --- a/donotdisturb/bootstrap.js
     2.2 +++ b/donotdisturb/bootstrap.js
     2.3 @@ -46,7 +46,10 @@
     2.4    _currentStatus: imIStatusInfo.STATUS_UNKNOWN,
     2.5    _observing: false,
     2.6    _updateStatus: function() {
     2.7 -    this._currentStatus = Services.core.currentStatusType;
     2.8 +    if ("globalUserStatus" in Services.core)
     2.9 +      this._currentStatus = Services.core.globalUserStatus.statusType;
    2.10 +    else
    2.11 +      this._currentStatus = Services.core.currentStatusType;
    2.12    },
    2.13    isAvailable: function() {
    2.14      if (!this._observing) {
     3.1 --- a/statusreminder/Makefile
     3.2 +++ b/statusreminder/Makefile
     3.3 @@ -1,10 +1,10 @@
     3.4  PACKAGE = statusreminder
     3.5  PACKAGE_ID = $(PACKAGE)@florian.instantbird.org
     3.6  PACKAGE_NAME = Status Reminder
     3.7 -PACKAGE_VERSION = 1.0.2
     3.8 +PACKAGE_VERSION = 1.0.3
     3.9  PACKAGE_DESCRIPTION = Remind the current status with the color of the input box
    3.10  PACKAGE_AUTHOR = Florian Queze
    3.11  PACKAGE_MIN_VERSION = 0.3a2pre
    3.12 -PACKAGE_MAX_VERSION = 0.3b1pre
    3.13 +PACKAGE_MAX_VERSION = 1.2a1pre
    3.14  
    3.15  include ../rules.mk
     4.1 --- a/statusreminder/bootstrap.js
     4.2 +++ b/statusreminder/bootstrap.js
     4.3 @@ -40,7 +40,11 @@
     4.4  function getBackground()
     4.5  {
     4.6    const imIStatusInfo = Components.interfaces.imIStatusInfo;
     4.7 -  let status = Services.core.currentStatusType;
     4.8 +  let status;
     4.9 +  if ("globalUserStatus" in Services.core)
    4.10 +    status = Services.core.globalUserStatus.statusType;
    4.11 +  else
    4.12 +    status = Services.core.currentStatusType;
    4.13  
    4.14    function generateGradient(aRGB)
    4.15      "-moz-linear-gradient(rgba(" + aRGB + ", 0.2), rgba(" + aRGB + ", 0.1))"