Ignore:
Timestamp:
11/18/08 15:35:08 (16 years ago)
Author:
ra33
Message:

fixed getmail so it splits text items

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/agents/mail/MailSession.java

    r362 r404  
    458458                                        Text newItem = readMessage(msgs[msgNum], msgNum + 1, frame,
    459459                                                        point);
     460                                        // TODO: May want to reverse the order of mail messages
    460461                                        if (newItem != null) {
    461462                                                mailItems.add(newItem);
     
    565566                                                while (thisLine != null) {
    566567                                                        // A blank line is a signal to start a new text item
    567                                                         if (thisLine.trim() == "") {
     568                                                        if (thisLine.trim().equals("")) {
    568569                                                                addTextItem(frames, nextText.toString());
    569570                                                                nextText = new StringBuffer();
     
    597598                                if (nextText.length() == 0)
    598599                                        return;
    599 
    600                                 frames.addText(nextText.substring(0, nextText.length() - 1),
    601                                                 null, null, null, false);
     600                                // Remove the last char if its a newline
     601                                if (nextText.charAt(nextText.length() - 1) == '\n')
     602                                        nextText = nextText.substring(0, nextText.length() - 1);
     603                                //TODO: Make the space a setting in frame creator.
     604                                frames.addSpace(10);
     605                                frames.addText(nextText, null, null, null, false);
    602606                        }
    603607                }.start();
Note: See TracChangeset for help on using the changeset viewer.