Changeset 254 for trunk/hiptop/pester


Ignore:
Timestamp:
07/19/06 02:47:48 (18 years ago)
Author:
Nicholas Riley
Message:

Register for time changed events so we actually get them in the alarm set dialog.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hiptop/pester/net/sabi/pester/AlarmSetDialog.java

    r253 r254  
    127127        }
    128128        validate();
     129        Application.registerForEvent(this, Event.EVENT_TIME_CHANGED));
    129130        show();
    130131        if (!mHaveShownWindow) {
     
    157158            date.addSeconds(editingInterval());
    158159        } else {
     160            // XXX is it necessary to do this, or do the two share the
     161            // XXX same physical Date object?
    159162            date = mDateEditor.getDate();
    160163            date.setTime(mTimeEditor.getDate().getTime());
     
    203206        mEditingAlarm = null;
    204207        mValidateAlarm.deactivate();
     208        Application.unregisterForEvent(this, Event.EVENT_TIME_CHANGED);
    205209    }
    206210
     
    231235            stopEditing();
    232236            return true;
    233         case Event.EVENT_TIME_CHANGED:
    234             // XXX this isn't being delivered on the simulator, why?
    235             DEBUG.p("time changed");
    236             validate();
    237             return true;
    238         case Event.EVENT_ALARM:
     237        case Event.EVENT_TIME_CHANGED: // time on device changed
     238        case Event.EVENT_ALARM: // computed time invalid
    239239        case EVENT_VALIDATE: // something changed
    240240            validate();
Note: See TracChangeset for help on using the changeset viewer.