Changeset 280 for trunk/hiptop/pester


Ignore:
Timestamp:
07/24/06 07:19:50 (18 years ago)
Author:
Nicholas Riley
Message:

If you're editing an alarm, focus on the time/interval edit field
rather than the message. Relayout set alarm display when time/date
format changes (yay positionDynamically!). Attempt to fix tooltip for

1-minute alarm refreshing/flashing without changing (needs more

testing). Build against 3.0 libraries by default.

Location:
trunk/hiptop/pester
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/hiptop/pester/build.xml

    r237 r280  
    1212    <property name="APP_VERSION_BUILD" value="1"/>
    1313
     14    <property name="TARGET_LIB_VERSION" value="3.0" />
     15
    1416    <import file="${DANGER_HOME}/tools/build_common.xml"/>
    1517</project>
  • trunk/hiptop/pester/locale/en_US/Pester.rsrc

    r278 r280  
    163163                        alignBaseline = ID_AT_BUTTON
    164164                        positionToRight = ID_AT_BUTTON : 1
    165        
     165
    166166                dateEditor
    167167                        id = ID_DATE_EDITOR
     
    170170                        alignBaseline = ID_TIME_EDITOR
    171171                        className = "net.sabi.pester.AlarmDateEditor"
     172                        positionDynamically # can move if time format changes
    172173               
    173174                datePicker
     
    176177                        positionToRight = ID_DATE_EDITOR : 1
    177178                        alignTop = ID_DATE_EDITOR
     179                        positionDynamically # can move if time format changes
    178180        endGroupBox
    179181
     
    220222        button
    221223                event = EVENT_SET_ALARM
    222                 title = "Edit..."
     224                title = "Reschedule..."
    223225                position = buttonBottom2
    224226        button
  • trunk/hiptop/pester/net/sabi/pester/Alarm.java

    r277 r280  
    278278        if (i <= 24 * 60 * 60) {
    279279            i %= 60;
    280             return (i == 0 ? 60 : i);
     280            return (i == 0 ? 60 : i + 1);
    281281        }
    282282        i %= 3600;
    283         return (i == 0 ? 3600 : i);
     283        return (i == 0 ? 3600 : i + 1);
    284284    }
    285285
  • trunk/hiptop/pester/net/sabi/pester/AlarmSetDialog.java

    r270 r280  
    2323import danger.ui.StaticTextBox;
    2424import danger.ui.TypeAheadTextField;
     25import danger.ui.View;
    2526import danger.util.DEBUG;
    2627
     
    136137        Application.registerForEvent(this, Event.EVENT_TIME_CHANGED);
    137138        show();
     139        if (!asNew) setFocusedDescendant(isIn() ? (View)mPeriodField :
     140                                         (View)mTimeEditor);
    138141        if (!mHaveShownWindow) {
    139142            Rect alarmRect = mSetAlarmButton.getFrame();
     
    145148            mHaveShownWindow = true;
    146149            setAutoSize(false); // don't resize to contain it next time
     150            // XXX still a minor potential race here, but it's so unlikely
     151            // as to not be worth fixing
     152            Application.registerForEvent(this, Event.EVENT_TIME_FORMAT_CHANGED);
    147153        }
    148154    }
     
    244250            stopEditing();
    245251            return true;
     252        case Event.EVENT_TIME_FORMAT_CHANGED: // time format changed
     253            mTimeEditor.setFormat(DateTimeEditor.FORMAT_TIME_LONG);
     254            return true;
    246255        case Event.EVENT_TIME_CHANGED: // time on device changed
    247256        case Event.EVENT_ALARM: // computed time invalid
Note: See TracChangeset for help on using the changeset viewer.