- Timestamp:
- 07/25/06 16:36:34 (18 years ago)
- Location:
- trunk/hiptop/pester
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hiptop/pester/locale/en_US/Pester.rsrc
r283 r287 209 209 endDialog 210 210 211 alert ID_ALARM_ALERT211 textInputAlert ID_ALARM_ALERT 212 212 systemDialog 213 213 title = "Alarm" … … 216 216 text = "Alarm!" 217 217 button 218 id = ID_SNOOZE_BUTTON 218 219 event = EVENT_SNOOZE_ALARM 219 220 title = "Snooze" 220 position = button Top1221 position = buttonBottom2 221 222 shortcut = cancelButton 222 223 button 223 224 event = EVENT_SET_ALARM 224 225 title = "Reschedule..." 225 position = buttonBottom 2226 position = buttonBottom3 226 227 button 227 228 event = EVENT_DISMISS_ALARM … … 229 230 position = buttonBottom1 230 231 shortcut = doneButton 231 endAlert 232 textField 233 id = ID_SNOOZE_MINUTES 234 title = "Snooze for minutes:" 235 dontAcceptKeyRepeats 236 initiallySelectAll 237 numericOnly 238 justifyRight 239 maxLength = 2 240 position = top 241 endTextInputAlert 232 242 233 243 alert ID_DISCARD_ALERT -
trunk/hiptop/pester/net/sabi/pester/Alarm.java
r280 r287 79 79 public void setUID(int uid) { 80 80 mUID = uid; 81 } 82 public void snoozeForMinutes(int minutes) { 83 mDate = new Date(); 84 mDate.addMinutes(minutes); 85 resume(); 81 86 } 82 87 -
trunk/hiptop/pester/net/sabi/pester/Pester.java
r278 r287 3 3 import danger.app.Application; 4 4 import danger.app.Event; 5 import danger.ui.AlertWindow; 5 import danger.app.IPCMessage; 6 import danger.ui.Layout; 7 import danger.ui.TextField; 8 import danger.ui.TextInputAlertWindow; 6 9 import danger.ui.ScreenWindow; 10 import danger.ui.StaticText; 7 11 import danger.util.DEBUG; 8 12 import java.util.Stack; … … 22 26 case Event.EVENT_ALARM: 23 27 Alarm alarm = (Alarm)e.argument; 24 AlertWindow alert = getAlert(ID_ALARM_ALERT, this);28 TextInputAlertWindow alert = getTextInputAlert(ID_ALARM_ALERT, this); 25 29 alert.setTitle(alarm.getDateTimeString()); 26 30 alert.setMessage(alarm.getMessage()); 27 31 alert.setShowTone(alarm.getAlert()); 28 alert.show(AlertWindow.SYSTEM_ALERT_TYPE_ALARM); 32 alert.disableButtonOnEmptyField(ID_SNOOZE_BUTTON, ID_SNOOZE_MINUTES); 33 alert.setShowCancel(false); 34 alert.show(TextInputAlertWindow.SYSTEM_ALERT_TYPE_ALARM); 29 35 sAlarmStack.push(alarm); 36 return true; 37 case EVENT_SET_ALARM: 38 AlarmSetDialog alarmSetDialog = AlarmSetDialog.getDialog(); 39 alarmSetDialog.setWindowStyle(AlarmSetDialog.SYSTEM_DIALOG_STYLE); 40 alarmSetDialog.editAlarm((Alarm)sAlarmStack.pop(),false); 41 return true; 42 case EVENT_SNOOZE_ALARM: 43 String snoozeMinutesString = 44 TextInputAlertWindow. 45 getTextFieldValue((IPCMessage)e.argument, 46 ID_SNOOZE_MINUTES); 47 int snoozeMinutes = Integer.parseInt(snoozeMinutesString); 48 ((Alarm)sAlarmStack.pop()).snoozeForMinutes(snoozeMinutes); 30 49 return true; 31 50 case EVENT_DISMISS_ALARM:
Note:
See TracChangeset
for help on using the changeset viewer.