Skip to content

Commit

Permalink
Merge https://github.com/scrod/nv into scrod
Browse files Browse the repository at this point in the history
* https://github.com/scrod/nv:
  update sparkle localizations for current NV localizations
  directly initialize prefixParentNotes with the note object; common case is a single prefixparent
  if UTF8String fails while generating cstring caches, then try other methods
  add Sparanoid's graciously donated Chinese localization
  CREATE Chinese Simplified language
  get back in there, ServicesMenu.strings
  I changed my mind; I don't want the tags column initially visible.
  to ensure custom-builds can upgrade
  to ensure custom-builds can upgrade
  ensure the presence of a ServicesMenu strings file to prevent failing-over to other localizations in 10.4
  • Loading branch information
csexton committed Feb 8, 2011
2 parents 97c760e + 02e14a7 commit 8510197
Show file tree
Hide file tree
Showing 107 changed files with 31,145 additions and 694 deletions.
18 changes: 0 additions & 18 deletions English.lproj/PTKeyComboPanel.nib/classes.nib

This file was deleted.

1,370 changes: 1,370 additions & 0 deletions English.lproj/PTKeyComboPanel.nib/designable.nib

Large diffs are not rendered by default.

26 changes: 0 additions & 26 deletions English.lproj/PTKeyComboPanel.nib/info.nib

This file was deleted.

Binary file modified English.lproj/PTKeyComboPanel.nib/keyedobjects.nib 100755 → 100644
Binary file not shown.
1 change: 1 addition & 0 deletions English.lproj/ServicesMenu.strings
@@ -0,0 +1 @@
"NV: New Note With Selection" = "NV: New Note With Selection";
2 changes: 1 addition & 1 deletion GlobalPrefs.m
Expand Up @@ -132,7 +132,7 @@ - (id)init {
[NSColor colorWithCalibratedRed:0.945 green:0.702 blue:0.702 alpha:1.0f]], SearchTermHighlightColorKey,

[NSNumber numberWithFloat:[NSFont smallSystemFontSize]], TableFontSizeKey,
[NSArray arrayWithObjects:NoteTitleColumnString, NoteLabelsColumnString, NoteDateModifiedColumnString, nil], NoteAttributesVisibleKey,
[NSArray arrayWithObjects:NoteTitleColumnString, NoteDateModifiedColumnString, nil], NoteAttributesVisibleKey,
NoteDateModifiedColumnString, TableSortColumnKey,
[NSNumber numberWithBool:YES], TableIsReverseSortedKey, nil]];

Expand Down
18 changes: 18 additions & 0 deletions NSString_NV.m
Expand Up @@ -485,6 +485,24 @@ - (const char*)lowercaseUTF8String {

const char *utf8String = [(NSString*)str2 UTF8String];

if (!utf8String) {

CFStringEncoding encoding = CFStringGetFastestEncoding(str2);
const char *cStrPtr = CFStringGetCStringPtr(str2, encoding);

if (cStrPtr && (kCFStringEncodingUTF8 == encoding || (encoding & 0x0100) == 0)) {
//-UTF8String failed, but the native cstringptr worked and was not a UTF16+ encoding
//so return that instead, forfeiting upper-ascii searchability for now
//(for whatever reason, native string encoding is almost never kCFStringEncodingUTF8, so CFStringGetFastestEncoding is called only if necessary)
utf8String = cStrPtr;

} else {
//-UTF8String failed and CFStringGetCStringPtr was not a good fallback; try lossy MacOSRoman and pray
NSMutableData *nullTerminatedData = [[[(NSString*)str2 dataUsingEncoding:NSMacOSRomanStringEncoding allowLossyConversion:YES] mutableCopy] autorelease];
[nullTerminatedData appendBytes:"\0" length:1];
utf8String = [nullTerminatedData bytes];
}
}
CFRelease(str2);
return utf8String;
}
Expand Down
93 changes: 93 additions & 0 deletions Notation.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions NoteObject.m
Expand Up @@ -1792,9 +1792,10 @@ BOOL noteTitleIsAPrefixOfOtherNoteTitle(NoteObject *longerNote, NoteObject *shor

- (void)addPrefixParentNote:(NoteObject*)aNote {
if (!prefixParentNotes) {
prefixParentNotes = [[NSMutableArray alloc] init];
prefixParentNotes = [[NSMutableArray alloc] initWithObjects:&aNote count:1];
} else {
[prefixParentNotes addObject:aNote];
}
[prefixParentNotes addObject:aNote];
}
- (void)removeAllPrefixParentNotes {
[prefixParentNotes removeAllObjects];
Expand Down
2 changes: 1 addition & 1 deletion PTHotKeys/PTKeyComboPanel.m
Expand Up @@ -61,7 +61,7 @@ - (void)_refreshContents


if( mTitleField )
[mTitleField setStringValue: [NSString stringWithFormat: mTitleFormat, mKeyName]];
[mTitleField setStringValue: mTitleFormat];

}

Expand Down
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

0 comments on commit 8510197

Please sign in to comment.