Changeset 295 for trunk/hiptop/pester
- Timestamp:
- 07/28/06 08:33:38 (18 years ago)
- Location:
- trunk/hiptop/pester
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hiptop/pester/locale/en_US/Pester.rsrc
r294 r295 276 276 title = "Discard Alarm?" 277 277 icon = stopIcon 278 text = "Permanently discard this alarm?"278 text = "Permanently discard \u201c^0\u201d?" 279 279 button 280 280 event = EVENT_CONFIRM_DISCARD -
trunk/hiptop/pester/net/sabi/pester/Alarm.java
r287 r295 31 31 // transient 32 32 private int mState; 33 private int mAbsoluteFireTime; // only valid if periodic33 private int mAbsoluteFireTime; // valid if periodic and modified since reboot 34 34 private danger.app.Alarm mAlarm; 35 35 private int mUID; … … 39 39 mAlarm = new danger.app.Alarm(0, Application.getCurrentApp(), this); 40 40 mUID = 0; 41 mAbsoluteFireTime = -1; 41 42 } 42 43 … … 83 84 mDate = new Date(); 84 85 mDate.addMinutes(minutes); 86 mAbsoluteFireTime = Hardware.getAbsoluteTime() + (minutes * 60); 85 87 resume(); 86 88 } … … 121 123 int alertID = dataStream.readInt(); 122 124 mAlert = (alertID == 0 ? null : new RingToneObject(alertID)); 125 mAbsoluteFireTime = -1; // just in case 123 126 } catch (Exception e) { 124 127 // XXX do something … … 152 155 if (mState != STATE_SCHEDULED) 153 156 return; 154 if (getUsesPeriod() ) {157 if (getUsesPeriod() && mAbsoluteFireTime != -1) { 155 158 int realSecondsLeft = mAbsoluteFireTime - Hardware.getAbsoluteTime(); 156 159 mDate = new Date(); … … 230 233 else if (daysFromToday == 1) 231 234 dateString = "Tomorrow"; // XXX localize 232 else if (daysFromToday < 7)235 else if (daysFromToday > 1 && daysFromToday < 7) 233 236 dateString = date.getDayString(); 234 237 else -
trunk/hiptop/pester/net/sabi/pester/AlarmListView.java
r294 r295 69 69 AlertWindow alert = 70 70 Application.getCurrentApp().getAlert(ID_DISCARD_ALERT, this); 71 alert.setMessage( "Permanently discard \u201c" +72 alarm.getMessage() + "\u201d?"); // XXX localize71 alert.setMessage(StringFormat.withFormat(alert.getMessage(), 72 alarm.getMessage())); 73 73 alert.show(); 74 74 return true; … … 79 79 ((Alarm)getFocusedItem()).resume(); 80 80 return true; 81 // XXX for EVENT_TIME_FORMAT_CHANGED, we also need to force a82 // full redraw (in addition to invalidating the tooltip)81 case Event.EVENT_TIME_FORMAT_CHANGED: 82 invalidate(); 83 83 case Event.EVENT_TIME_CHANGED: 84 84 if (mToolTipWindow == null || !mToolTipWindow.isVisible()) -
trunk/hiptop/pester/net/sabi/pester/Alarms.java
r294 r295 54 54 public static Alarms getList() { 55 55 if (sAlarmList == null) { 56 Application.registerForEvent(sListener, Event.EVENT_TIME_CHANGED);57 56 sSettingsDB = new SettingsDB("settings", true /* auto sync */); 58 57 sListener = new Listener(); 59 58 new Alarms(); 59 Application.registerForEvent(sListener, Event.EVENT_TIME_CHANGED); 60 60 } 61 61 return sAlarmList;
Note:
See TracChangeset
for help on using the changeset viewer.