| OLD | NEW |
| 1 /* Copyright (c) 2009 Google Inc. | 1 /* Copyright (c) 2009 Google Inc. |
| 2 * | 2 * |
| 3 * Licensed under the Apache License, Version 2.0 (the "License"); | 3 * Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 * you may not use this file except in compliance with the License. | 4 * you may not use this file except in compliance with the License. |
| 5 * You may obtain a copy of the License at | 5 * You may obtain a copy of the License at |
| 6 * | 6 * |
| 7 * http://www.apache.org/licenses/LICENSE-2.0 | 7 * http://www.apache.org/licenses/LICENSE-2.0 |
| 8 * | 8 * |
| 9 * Unless required by applicable law or agreed to in writing, software | 9 * Unless required by applicable law or agreed to in writing, software |
| 10 * distributed under the License is distributed on an "AS IS" BASIS, | 10 * distributed under the License is distributed on an "AS IS" BASIS, |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 128 |
| 129 - (void)awakeFromNib { | 129 - (void)awakeFromNib { |
| 130 [tabView_ selectTabViewItemWithIdentifier:kTabViewItemSelection]; | 130 [tabView_ selectTabViewItemWithIdentifier:kTabViewItemSelection]; |
| 131 | 131 |
| 132 // Make a suggested custom e-mail label of "Uploaded 1/2/34" with today's | 132 // Make a suggested custom e-mail label of "Uploaded 1/2/34" with today's |
| 133 // date, which is useful if the user wants to be able to select & delete these | 133 // date, which is useful if the user wants to be able to select & delete these |
| 134 // uploads | 134 // uploads |
| 135 NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] autorelease]; | 135 NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] autorelease]; |
| 136 [dateFormatter setFormatterBehavior:NSDateFormatterBehavior10_4]; | 136 [dateFormatter setFormatterBehavior:NSDateFormatterBehavior10_4]; |
| 137 | 137 |
| 138 [dateFormatter setDateStyle:NSDateFormatterShortStyle]; | 138 // we'll use a custom date format to avoid slashes in the tag, as slashes may |
| 139 // be interpreted by IMAP clients as a folder hierarchy |
| 139 [dateFormatter setTimeStyle:NSDateFormatterNoStyle]; | 140 [dateFormatter setTimeStyle:NSDateFormatterNoStyle]; |
| 141 [dateFormatter setDateFormat:@"dd-MMM-yyyy"]; |
| 140 NSString *dateStr = [dateFormatter stringFromDate:[NSDate date]]; | 142 NSString *dateStr = [dateFormatter stringFromDate:[NSDate date]]; |
| 141 | 143 |
| 142 NSString *template = NSLocalizedString(@"UploadDateTemplate", nil); // "Upload ed %@" | 144 NSString *template = NSLocalizedString(@"UploadDateTemplate", nil); // "Upload ed %@" |
| 143 NSString *suggestedLabel = [NSString stringWithFormat:template, dateStr]; | 145 NSString *suggestedLabel = [NSString stringWithFormat:template, dateStr]; |
| 144 [additionalLabelField_ setStringValue:suggestedLabel]; | 146 [additionalLabelField_ setStringValue:suggestedLabel]; |
| 145 | 147 |
| 146 // normally we reset just before a new upload, but calling this from | 148 // normally we reset just before a new upload, but calling this from |
| 147 // awakeFromNib now will clear the skipped files pop-up menu of its nib-loaded | 149 // awakeFromNib now will clear the skipped files pop-up menu of its nib-loaded |
| 148 // item | 150 // item |
| 149 [self resetUploading]; | 151 [self resetUploading]; |
| 150 | 152 |
| (...skipping 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1633 - (void)setLastUploadDate:(NSDate *)date { | 1635 - (void)setLastUploadDate:(NSDate *)date { |
| 1634 [lastUploadDate_ release]; | 1636 [lastUploadDate_ release]; |
| 1635 lastUploadDate_ = [date retain]; | 1637 lastUploadDate_ = [date retain]; |
| 1636 } | 1638 } |
| 1637 | 1639 |
| 1638 - (void)setSimulateUploads:(BOOL)flag { | 1640 - (void)setSimulateUploads:(BOOL)flag { |
| 1639 shouldSimulateUploads_ = flag; | 1641 shouldSimulateUploads_ = flag; |
| 1640 } | 1642 } |
| 1641 | 1643 |
| 1642 @end | 1644 @end |
| OLD | NEW |