Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(218)

Side by Side Diff: Source/EmUpWindowController.m

Issue 201054: Change default label's date forward to avoid slashes Base URL: http://google-email-uploader-mac.googlecode.com/svn/trunk/
Patch Set: updates release notes Created 15 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/EmailUploader.xcodeproj/project.pbxproj » ('j') | Source/ReleaseNotes.txt » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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]];
thomasvl 2010/02/17 20:27:38 i almost hate to suggest this, but what about stic
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
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
OLDNEW
« no previous file with comments | « no previous file | Source/EmailUploader.xcodeproj/project.pbxproj » ('j') | Source/ReleaseNotes.txt » ('J')

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b