Skip to content
Snippets Groups Projects
Commit 09e4fd77 authored by George Nachman's avatar George Nachman
Browse files

Add hidden pref MaxPasteHistoryEntries. Commit fixed template.xml

parent 7ead4bcd
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -60,7 +60,14 @@
{
static PasteboardHistory* instance;
if (!instance) {
instance = [[PasteboardHistory alloc] initWithMaxEntries:20];
int maxEntries = 20;
if ([[NSUserDefaults standardUserDefaults] objectForKey:@"MaxPasteHistoryEntries"]) {
maxEntries = [[NSUserDefaults standardUserDefaults] integerForKey:@"MaxPasteHistoryEntries"];
if (maxEntries < 0) {
maxEntries = 0;
}
}
instance = [[PasteboardHistory alloc] initWithMaxEntries:maxEntries];
}
return instance;
}
Loading
Loading
@@ -169,7 +176,7 @@
PasteboardEntry* entry = [PasteboardEntry entryWithString:value score:[[NSDate date] timeIntervalSince1970]];
entry->timestamp = [[NSDate alloc] init];
[entries_ addObject:entry];
if ([entries_ count] == maxEntries_) {
if ([entries_ count] > maxEntries_) {
[entries_ removeObjectAtIndex:0];
}
 
Loading
Loading
Loading
Loading
@@ -6,13 +6,13 @@
<description>Most recent changes with links to updates.</description>
<language>en</language>
<item>
<title>Version 0.20.%VER%</title>
<title>Version %VER%</title>
<sparkle:releaseNotesLink>
http://iterm2.googlecode.com/svn/trunk/appcasts/testing_changes.html
</sparkle:releaseNotesLink>
<pubDate>%DATE%</pubDate>
<enclosure url="http://iterm2.googlecode.com/files/iTerm2-%NAME%.zip"
sparkle:version="0.20.%VER%" length="%LENGTH%" type="application/octet-stream"
sparkle:version="%VER%" length="%LENGTH%" type="application/octet-stream"
sparkle:dsaSignature="%SIG%" />
</item>
</channel>
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment