Changeset 294
- Timestamp:
- 07/28/06 04:17:42 (18 years ago)
- Location:
- trunk/hiptop/pester
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hiptop/pester/locale/en_US/Pester.rsrc
r293 r294 262 262 endTextInputAlert 263 263 264 alert ID_LIMIT_ALERT 265 appAlertStyle 266 title = "Alarm Limit" 267 text = "You have reached the limit of ^0 alarms. You must delete an alarm (or wait for it to expire) before creating another alarm." 268 button 269 title = okButton 270 position = buttonBottom1 271 shortcut = doneButton 272 endAlert 273 264 274 alert ID_DISCARD_ALERT 265 275 appAlertStyle -
trunk/hiptop/pester/net/sabi/pester/AlarmListView.java
r292 r294 13 13 import danger.util.DEBUG; 14 14 import danger.util.StringUtils; 15 import danger.util.format.StringFormat; 15 16 16 17 public class AlarmListView extends ActiveListView … … 52 53 switch (e.type) { 53 54 case EVENT_NEW_ALARM: 54 // XXX check for max alarms 55 if (!Alarms.canCreateAlarm()) { 56 AlertWindow alert = 57 Application.getCurrentApp().getAlert(ID_LIMIT_ALERT, this); 58 alert.setMessage(StringFormat.withFormat(alert.getMessage(), 59 String.valueOf(Alarms.MAX_ALARM_COUNT))); 60 alert.show(); 61 return true; 62 } 55 63 alarmSetDialog().editAlarm(new Alarm(), true); 56 64 return true; -
trunk/hiptop/pester/net/sabi/pester/Alarms.java
r284 r294 13 13 public class Alarms extends StdActiveList { 14 14 // max # records in a datastore 15 p rivatestatic final int MAX_ALARM_COUNT = 50;15 public static final int MAX_ALARM_COUNT = 50; 16 16 17 17 private static Alarms sAlarmList = null; … … 62 62 } 63 63 64 public static boolean canCreateAlarm() { 65 return (sAlarmList.size() < MAX_ALARM_COUNT); 66 } 64 67 public static void addAlarm(Alarm alarm) { 65 68 sAlarmList.insertItemSorted(alarm, alarm);
Note:
See TracChangeset
for help on using the changeset viewer.