Permalink
Browse files

Changes for 64-bit compatibility by Brian Bergstrand: Keyed archiving…

…; 64-bit upgrade of NSArchiver data; upgrade sparkle version; upgrade Xcode project version to 3.1; targeting 10.5 SDK instead of 10.4. Also increase resiliency against potential serialization problems by verifying writes before saving; allow recovery of notes in the case that the database cannot be rewritten
  • Loading branch information...
1 parent 0ac3566 commit 238f532bc15a90e55a2827b495c11f0501d48bca Zachary Schneirov committed Sep 25, 2009
Showing with 8,186 additions and 2,062 deletions.
  1. 0 .gitattributes
  2. 0 .gitignore
  3. 0 AlienNoteImporter.h
  4. +2 −0 AlienNoteImporter.m
  5. 0 AppController.h
  6. +64 −58 AppController.m
  7. 0 AttributedPlainText.h
  8. +8 −8 AttributedPlainText.m
  9. 0 BlorPasswordRetriever.h
  10. 0 BlorPasswordRetriever.m
  11. 0 BodyScroller.h
  12. 0 BodyScroller.m
  13. 0 BookmarksController.h
  14. +15 −12 BookmarksController.m
  15. 0 BookmarksTable.h
  16. 0 BookmarksTable.m
  17. +15 −15 BufferUtils.c
  18. 0 BufferUtils.h
  19. 0 CRC32.c
  20. 0 CRC32.h
  21. 0 CarbonFSErrorStrings.h
  22. 0 DeletedNoteObject.h
  23. +22 −8 DeletedNoteObject.m
  24. 0 DeletionManager.h
  25. +4 −4 DeletionManager.m
  26. 0 DualField.h
  27. 0 DualField.m
  28. 0 EmptyView.h
  29. 0 EmptyView.m
  30. 0 EncodingsManager.h
  31. 0 EncodingsManager.m
  32. 0 English.lproj/BlorPasswordRetriever.nib/classes.nib
  33. 0 English.lproj/BlorPasswordRetriever.nib/info.nib
  34. 0 English.lproj/BlorPasswordRetriever.nib/keyedobjects.nib
  35. +15 −13 English.lproj/CarbonErrorStrings.plist
  36. 0 English.lproj/Contact Information.nvhelp
  37. 0 English.lproj/DeletionManager.nib/classes.nib
  38. 0 English.lproj/DeletionManager.nib/info.nib
  39. 0 English.lproj/DeletionManager.nib/keyedobjects.nib
  40. 0 English.lproj/EncodingsManager.nib/classes.nib
  41. 0 English.lproj/EncodingsManager.nib/info.nib
  42. 0 English.lproj/EncodingsManager.nib/keyedobjects.nib
  43. 0 English.lproj/Excruciatingly Useful Shortcuts.nvhelp
  44. 0 English.lproj/ExporterManager.nib/classes.nib
  45. 0 English.lproj/ExporterManager.nib/info.nib
  46. 0 English.lproj/ExporterManager.nib/keyedobjects.nib
  47. 0 English.lproj/FindPanel.nib/classes.nib
  48. 0 English.lproj/FindPanel.nib/info.nib
  49. 0 English.lproj/FindPanel.nib/keyedobjects.nib
  50. 0 English.lproj/FindPanel.strings
  51. 0 English.lproj/How does this thing work?.nvhelp
  52. 0 English.lproj/InfoPlist.strings
  53. 0 English.lproj/KeyDerivationManager.nib/classes.nib
  54. 0 English.lproj/KeyDerivationManager.nib/info.nib
  55. 0 English.lproj/KeyDerivationManager.nib/keyedobjects.nib
  56. 0 English.lproj/KeyDerivationManager~.nib/classes.nib
  57. 0 English.lproj/KeyDerivationManager~.nib/info.nib
  58. 0 English.lproj/KeyDerivationManager~.nib/keyedobjects.nib
  59. BIN English.lproj/Localizable.strings
  60. +4,260 −0 English.lproj/MainMenu-nssplitview.nib/designable.nib
  61. BIN English.lproj/MainMenu-nssplitview.nib/keyedobjects.nib
  62. BIN English.lproj/MainMenu.nib/keyedobjects.nib
  63. +113 −0 English.lproj/MainMenu~.nib/classes.nib
  64. +10 −0 English.lproj/MainMenu~.nib/data.dependency
  65. +31 −0 English.lproj/MainMenu~.nib/info.nib
  66. BIN English.lproj/MainMenu~.nib/keyedobjects.nib
  67. 0 English.lproj/NotationPrefsView.nib/classes.nib
  68. 0 English.lproj/NotationPrefsView.nib/info.nib
  69. 0 English.lproj/NotationPrefsView.nib/keyedobjects.nib
  70. 0 English.lproj/PTKeyComboPanel.nib/classes.nib
  71. 0 English.lproj/PTKeyComboPanel.nib/info.nib
  72. 0 English.lproj/PTKeyComboPanel.nib/keyedobjects.nib
  73. 0 English.lproj/PTKeyComboPanel~.nib/classes.nib
  74. 0 English.lproj/PTKeyComboPanel~.nib/info.nib
  75. 0 English.lproj/PTKeyComboPanel~.nib/keyedobjects.nib
  76. 0 English.lproj/PassphraseChanger.nib/classes.nib
  77. 0 English.lproj/PassphraseChanger.nib/info.nib
  78. 0 English.lproj/PassphraseChanger.nib/keyedobjects.nib
  79. 0 English.lproj/PassphrasePicker.nib/classes.nib
  80. 0 English.lproj/PassphrasePicker.nib/info.nib
  81. 0 English.lproj/PassphrasePicker.nib/keyedobjects.nib
  82. 0 English.lproj/PassphraseRetriever.nib/classes.nib
  83. 0 English.lproj/PassphraseRetriever.nib/info.nib
  84. 0 English.lproj/PassphraseRetriever.nib/keyedobjects.nib
  85. 0 English.lproj/Preferences.nib/classes.nib
  86. 0 English.lproj/Preferences.nib/info.nib
  87. 0 English.lproj/Preferences.nib/keyedobjects.nib
  88. 0 English.lproj/SavedSearches.nib/classes.nib
  89. 0 English.lproj/SavedSearches.nib/info.nib
  90. 0 English.lproj/SavedSearches.nib/keyedobjects.nib
  91. 0 English.lproj/SavedSearches~.nib/classes.nib
  92. 0 English.lproj/SavedSearches~.nib/info.nib
  93. 0 English.lproj/SavedSearches~.nib/keyedobjects.nib
  94. 0 English.lproj/TagEditingManager.nib/classes.nib
  95. 0 English.lproj/TagEditingManager.nib/info.nib
  96. 0 English.lproj/TagEditingManager.nib/keyedobjects.nib
  97. 0 English.lproj/This is the title of a note.nvhelp
  98. 0 English.lproj/URLGetter.nib/classes.nib
  99. 0 English.lproj/URLGetter.nib/info.nib
  100. 0 English.lproj/URLGetter.nib/keyedobjects.nib
  101. 0 English.lproj/URLGetter~.nib/classes.nib
  102. 0 English.lproj/URLGetter~.nib/info.nib
  103. 0 English.lproj/URLGetter~.nib/keyedobjects.nib
  104. 0 ExporterManager.h
  105. 0 ExporterManager.m
  106. +34 −40 FSExchangeObjectsCompat.c
  107. 0 FSExchangeObjectsCompat.h
  108. +7 −7 FastListDataSource.h
  109. +13 −13 FastListDataSource.m
  110. 0 FocusRingScrollView.h
  111. 0 FocusRingScrollView.m
  112. +1 −0 FrozenNotation.h
  113. +77 −30 FrozenNotation.m
  114. 0 GlobalPrefs.h
  115. +5 −5 GlobalPrefs.m
  116. 0 HeaderViewWIthMenu.h
  117. 0 HeaderViewWIthMenu.m
  118. 0 Images/Add.tiff
  119. 0 Images/Add_Pressed.tiff
  120. 0 Images/Editing.tiff
  121. 0 Images/General.tiff
  122. 0 Images/Notes.tiff
  123. 0 Images/PTKeyboardIcon.tiff
  124. 0 Images/PasswordAssistantButton.tif
  125. 0 Images/PasswordAssistantButtonPressed.tif
  126. 0 Images/Remove.tiff
  127. 0 Images/Remove_Pressed.tiff
  128. 0 Images/leftarrow.tif
  129. +18 −3 Info.plist
  130. 0 KeyDerivationDelaySlider.h
  131. 0 KeyDerivationDelaySlider.m
  132. 0 KeyDerivationManager.h
  133. 0 KeyDerivationManager.m
  134. 0 LabelEditor.h
  135. 0 LabelEditor.m
  136. 0 LabelObject.h
  137. 0 LabelObject.m
  138. 0 LabelsListController.h
  139. +2 −2 LabelsListController.m
  140. 0 License.txt
  141. 0 LinkingEditor.h
  142. +47 −8 LinkingEditor.m
  143. 0 LinkingEditor_Indentation.h
  144. 0 LinkingEditor_Indentation.m
  145. 0 MultiTextFinder.h
  146. 0 MultiTextFinder.m
  147. 0 MultiplePageView.h
  148. +1 −1 MultiplePageView.m
  149. +3 −3 NSCollection_utils.h
  150. +6 −6 NSCollection_utils.m
  151. 0 NSData_transformations.h
  152. 0 NSData_transformations.m
  153. 0 NSString_NV.h
  154. +7 −6 NSString_NV.m
  155. +1 −1 NSTextFinder.h
  156. +9 −3 NSTextFinder_LastFind.m
  157. 0 Notality.icns
  158. 0 Notation.freqorder
  159. 0 Notation.launchorder
  160. +55 −68 Notation.xcodeproj/project.pbxproj
  161. 0 Notation.xcodeproj/scrod.mode1
  162. +177 −139 Notation.xcodeproj/scrod.mode1v3
  163. +648 −777 Notation.xcodeproj/scrod.pbxuser
  164. +7 −7 NotationController.h
  165. +101 −27 NotationController.m
  166. +6 −0 NotationFileManager.h
  167. +20 −4 NotationFileManager.m
  168. 0 NotationPrefs.h
  169. +4 −4 NotationPrefs.m
  170. 0 NotationPrefsViewController.h
  171. +5 −5 NotationPrefsViewController.m
  172. +38 −5 Notation_Prefix.pch
  173. +6 −6 NoteAttributeColumn.h
  174. +4 −4 NoteAttributeColumn.m
  175. +11 −11 NoteObject.h
  176. +63 −22 NoteObject.m
  177. +3 −3 NotesTableView.h
  178. +17 −13 NotesTableView.m
  179. 0 PTHotKeys/PTHotKey.h
  180. 0 PTHotKeys/PTHotKey.m
  181. +2 −0 PTHotKeys/PTHotKeyCenter.h
  182. +14 −5 PTHotKeys/PTHotKeyCenter.m
  183. 0 PTHotKeys/PTKeyBroadcaster.h
  184. 0 PTHotKeys/PTKeyBroadcaster.m
  185. 0 PTHotKeys/PTKeyCodes.plist
  186. 0 PTHotKeys/PTKeyCombo.h
  187. +1 −1 PTHotKeys/PTKeyCombo.m
  188. 0 PTHotKeys/PTKeyComboPanel.h
  189. 0 PTHotKeys/PTKeyComboPanel.m
  190. 0 PassphraseChanger.h
  191. 0 PassphraseChanger.m
  192. 0 PassphrasePicker.h
  193. 0 PassphrasePicker.m
  194. 0 PassphraseRetriever.h
  195. 0 PassphraseRetriever.m
  196. 0 PrefsWindowController.h
  197. +1 −1 PrefsWindowController.m
  198. 0 QuickSearchTable.h
  199. 0 QuickSearchTable.m
  200. +17 −17 RBSplitView/RBSplitSubview.h
  201. +42 −43 RBSplitView/RBSplitSubview.m
  202. +12 −12 RBSplitView/RBSplitView.h
  203. +91 −90 RBSplitView/RBSplitView.m
  204. +24 −24 RBSplitView/RBSplitViewPrivateDefines.h
  205. 0 SFPasswordAssistantInspectorController.h
  206. 0 SavedSearchesController.m
  207. +0 −13 Sparkle.framework/Versions/A/Headers/NSApplication+AppCopies.h
  208. +0 −11 Sparkle.framework/Versions/A/Headers/NSFileManager+Authentication.h
  209. +0 −15 Sparkle.framework/Versions/A/Headers/NSFileManager+Verification.h
  210. +0 −61 Sparkle.framework/Versions/A/Headers/NSString+extras.h
  211. +0 −98 Sparkle.framework/Versions/A/Headers/RSS.h
  212. +11 −5 Sparkle.framework/Versions/A/Headers/SUAppcast.h
  213. +17 −27 Sparkle.framework/Versions/A/Headers/SUAppcastItem.h
  214. +0 −21 Sparkle.framework/Versions/A/Headers/SUAutomaticUpdateAlert.h
  215. +0 −20 Sparkle.framework/Versions/A/Headers/SUConstants.h
  216. +0 −26 Sparkle.framework/Versions/A/Headers/SUStatusChecker.h
  217. +0 −33 Sparkle.framework/Versions/A/Headers/SUStatusController.h
  218. +0 −25 Sparkle.framework/Versions/A/Headers/SUUnarchiver.h
  219. +0 −40 Sparkle.framework/Versions/A/Headers/SUUpdateAlert.h
  220. +96 −33 Sparkle.framework/Versions/A/Headers/SUUpdater.h
  221. +0 −20 Sparkle.framework/Versions/A/Headers/SUUtilities.h
  222. +27 −0 Sparkle.framework/Versions/A/Headers/SUVersionComparisonProtocol.h
  223. +13 −14 Sparkle.framework/Versions/A/Headers/Sparkle.h
  224. +5 −3 Sparkle.framework/Versions/A/Resources/Info.plist
  225. +7 −0 Sparkle.framework/Versions/A/Resources/License.txt
  226. +174 −0 Sparkle.framework/Versions/A/Resources/SUModelTranslation.plist
  227. +56 −12 Sparkle.framework/Versions/A/Resources/SUStatus.nib/classes.nib
  228. +10 −6 Sparkle.framework/Versions/A/Resources/SUStatus.nib/info.nib
  229. BIN Sparkle.framework/Versions/A/Resources/SUStatus.nib/keyedobjects.nib
  230. +50 −0 Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/classes.nib
  231. +20 −0 Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/info.nib
  232. BIN Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
  233. +67 −0 Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/classes.nib
  234. +20 −0 Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/info.nib
  235. BIN Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/keyedobjects.nib
  236. +59 −0 Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdatePermissionPrompt.nib/classes.nib
  237. +20 −0 Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdatePermissionPrompt.nib/info.nib
  238. BIN Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib
  239. BIN Sparkle.framework/Versions/A/Resources/de.lproj/Sparkle.strings
  240. +50 −12 Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/classes.nib
  241. +10 −6 Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/info.nib
  242. BIN Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
  243. +67 −21 Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/classes.nib
  244. +10 −6 Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/info.nib
  245. BIN Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/keyedobjects.nib
  246. +59 −0 Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdatePermissionPrompt.nib/classes.nib
  247. +21 −0 Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdatePermissionPrompt.nib/info.nib
  248. BIN Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib
  249. BIN Sparkle.framework/Versions/A/Resources/en.lproj/Sparkle.strings
  250. +50 −0 Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/classes.nib
  251. +20 −0 Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/info.nib
  252. BIN Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
  253. +67 −0 Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/classes.nib
  254. +20 −0 Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/info.nib
  255. BIN Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/keyedobjects.nib
  256. +59 −0 Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdatePermissionPrompt.nib/classes.nib
  257. +20 −0 Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdatePermissionPrompt.nib/info.nib
  258. BIN Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib
  259. BIN Sparkle.framework/Versions/A/Resources/es.lproj/Sparkle.strings
  260. +50 −0 Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/classes.nib
  261. +16 −0 Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/info.nib
  262. BIN Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
  263. +67 −0 Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/classes.nib
  264. +16 −0 Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/info.nib
  265. BIN Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/keyedobjects.nib
  266. +59 −0 Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdatePermissionPrompt.nib/classes.nib
  267. +16 −0 Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdatePermissionPrompt.nib/info.nib
  268. BIN Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib
  269. BIN Sparkle.framework/Versions/A/Resources/fr.lproj/Sparkle.strings
  270. +1 −0 Sparkle.framework/Versions/A/Resources/fr.lproj/fr.lproj
  271. +1 −0 Sparkle.framework/Versions/A/Resources/fr_CA.lproj
  272. +50 −0 Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/classes.nib
  273. +20 −0 Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/info.nib
  274. BIN Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
  275. +67 −0 Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/classes.nib
  276. +20 −0 Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/info.nib
  277. BIN Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/keyedobjects.nib
  278. +59 −0 Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdatePermissionPrompt.nib/classes.nib
  279. +20 −0 Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdatePermissionPrompt.nib/info.nib
  280. BIN Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib
  281. BIN Sparkle.framework/Versions/A/Resources/it.lproj/Sparkle.strings
  282. +50 −0 Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/classes.nib
  283. +18 −0 Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/info.nib
  284. BIN Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
  285. +67 −0 Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/classes.nib
  286. +16 −0 Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/info.nib
  287. BIN Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/keyedobjects.nib
  288. +59 −0 Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdatePermissionPrompt.nib/classes.nib
  289. +16 −0 Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdatePermissionPrompt.nib/info.nib
  290. BIN Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib
  291. BIN Sparkle.framework/Versions/A/Resources/nl.lproj/Sparkle.strings
  292. BIN Sparkle.framework/Versions/A/Resources/relaunch
  293. +50 −0 Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/classes.nib
  294. +20 −0 Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/info.nib
  295. BIN Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
  296. +67 −0 Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/classes.nib
  297. +20 −0 Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/info.nib
  298. BIN Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/keyedobjects.nib
  299. +59 −0 Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdatePermissionPrompt.nib/classes.nib
  300. +18 −0 Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdatePermissionPrompt.nib/info.nib
Sorry, we could not display the entire diff because too many files (334) changed.
View
0 .gitattributes 100644 → 100755
File mode changed.
View
0 .gitignore 100644 → 100755
File mode changed.
View
0 AlienNoteImporter.h 100644 → 100755
File mode changed.
View
2 AlienNoteImporter.m 100644 → 100755
@@ -365,6 +365,7 @@ - (NoteObject*)noteWithFile:(NSString*)filename {
if (noteObject) {
//[noteObject setDateAdded:CFDateGetAbsoluteTime((CFDateRef)[attributes objectForKey:NSFileCreationDate])];
//[noteObject setDateModified:CFDateGetAbsoluteTime((CFDateRef)[attributes objectForKey:NSFileModificationDate])];
+ //TODO: take date/created modified; why throw away information?
[attributedStringFromData release];
@@ -454,6 +455,7 @@ - (NSArray*)_importStickies:(NSString*)filename {
if (noteObject) {
[noteObject setDateAdded:CFDateGetAbsoluteTime((CFDateRef)[doc creationDate])];
//[noteObject setDateModified:CFDateGetAbsoluteTime((CFDateRef)[doc modificationDate])];
+ //TODO: use the sticky's mod date
[notes addObject:noteObject];
} else {
View
0 AppController.h 100644 → 100755
File mode changed.
View
122 AppController.m 100644 → 100755
@@ -29,12 +29,12 @@ @implementation AppController
- (id)init {
if ([super init]) {
-
+
windowUndoManager = [[NSUndoManager alloc] init];
-
+
isCreatingANote = isFilteringFromTyping = typedStringIsCached = NO;
typedString = @"";
-
+
}
return self;
}
@@ -86,11 +86,11 @@ - (void)setupViewsAfterAppAwakened {
void outletObjectAwoke(id sender) {
static NSMutableSet *awokenOutlets = nil;
if (!awokenOutlets) awokenOutlets = [[NSMutableSet alloc] init];
-
+
[awokenOutlets addObject:sender];
AppController* appDelegate = (AppController*)[NSApp delegate];
-
+
if (appDelegate && [awokenOutlets containsObject:appDelegate] &&
[awokenOutlets containsObject:appDelegate->notesTableView] &&
[awokenOutlets containsObject:appDelegate->textView] &&
@@ -109,7 +109,7 @@ - (void)runDelayedIUActionsAfterLaunch {
[notationController checkIfNotationIsTrashed];
//connect sparkle programmatically to avoid loading its framework at nib awake;
- if (!NSClassFromString(@"SUUpdater")) {
+ if (RunningTigerAppKitOrHigher && !NSClassFromString(@"SUUpdater")) {
NSString *frameworkPath = [[[NSBundle bundleForClass:[self class]] privateFrameworksPath] stringByAppendingPathComponent:@"Sparkle.framework"];
if ([[NSBundle bundleWithPath:frameworkPath] load]) {
[sparkleUpdateItem setTarget:[[NSClassFromString(@"SUUpdater") alloc] init]];
@@ -122,7 +122,7 @@ - (void)runDelayedIUActionsAfterLaunch {
extern int decodedCount();
- (void)applicationDidFinishLaunching:(NSNotification*)aNote {
-
+
NSDate *before = [NSDate date];
prefsWindowController = [[PrefsWindowController alloc] init];
@@ -161,7 +161,7 @@ - (void)applicationDidFinishLaunching:(NSNotification*)aNote {
subMessage, NSLocalizedString(@"Choose another folder",nil),NSLocalizedString(@"Quit",nil),NULL) == NSAlertDefaultReturn) {
//show nsopenpanel, defaulting to current default notes dir
FSRef notesDirectoryRef;
- showOpenPanel:
+ showOpenPanel:
if (![prefsWindowController getNewNotesRefFromOpenPanel:&notesDirectoryRef returnedPath:&location]) {
//they cancelled the open panel, or it was unable to get the path/FSRef of the file
goto terminateApp;
@@ -179,7 +179,7 @@ - (void)applicationDidFinishLaunching:(NSNotification*)aNote {
[newNotation release];
NSLog(@"load time: %g, ",[[NSDate date] timeIntervalSinceDate:before]);
-// NSLog(@"version: %s", PRODUCT_NAME);
+ // NSLog(@"version: %s", PRODUCT_NAME);
//import old database(s) here if necessary
[AlienNoteImporter importBlorOrHelpFilesIfNecessaryIntoNotation:newNotation];
@@ -189,7 +189,7 @@ - (void)applicationDidFinishLaunching:(NSNotification*)aNote {
[notesToOpenOnLaunch release];
notesToOpenOnLaunch = nil;
}
-
+
//tell us when someone wants to load a new database
[prefsController registerForSettingChange:@selector(setAliasDataForDefaultDirectory:sender:) withTarget:self];
//tell us when sorting prefs changed
@@ -202,10 +202,10 @@ - (void)applicationDidFinishLaunching:(NSNotification*)aNote {
[self performSelector:@selector(runDelayedIUActionsAfterLaunch) withObject:nil afterDelay:0.1];
NSLog(@"decoded 7 bit count: %d", decodedCount());
-
+
return;
terminateApp:
- [NSApp terminate:self];
+ [NSApp terminate:self];
}
- (void)setNotationController:(NotationController*)newNotation {
@@ -248,7 +248,7 @@ - (BOOL)applicationOpenUntitledFile:(NSApplication *)sender {
return NO;
}
-- (BOOL)validateMenuItem:(id <NSMenuItem>)menuItem {
+- (BOOL)validateMenuItem:(NSMenuItem*)menuItem {
SEL selector = [menuItem action];
int numberSelected = [notesTableView numberOfSelectedRows];
@@ -271,22 +271,22 @@ - (BOOL)validateMenuItem:(id <NSMenuItem>)menuItem {
}
/*
-- (void)menuNeedsUpdate:(NSMenu *)menu {
- NSLog(@"mama needs update: %@", [menu title]);
-
- NSArray *selectedNotes = [notationController notesAtIndexes:[notesTableView selectedRowIndexes]];
- [selectedNotes setURLsInNotesForMenu:menu];
-}*/
+ - (void)menuNeedsUpdate:(NSMenu *)menu {
+ NSLog(@"mama needs update: %@", [menu title]);
+
+ NSArray *selectedNotes = [notationController notesAtIndexes:[notesTableView selectedRowIndexes]];
+ [selectedNotes setURLsInNotesForMenu:menu];
+ }*/
- (void)updateNoteMenus {
NSMenu *notesMenu = [[[NSApp mainMenu] itemWithTag:89] submenu];
-
+
int menuIndex = [notesMenu indexOfItemWithTarget:self andAction:@selector(deleteNote:)];
NSMenuItem *deleteItem = nil;
if (menuIndex > -1 && (deleteItem = [notesMenu itemAtIndex:menuIndex])) {
NSString *trailingQualifier = [prefsController confirmNoteDeletion] ? NSLocalizedString(@"...", @"ellipsis character") : @"";
[deleteItem setTitle:[NSString stringWithFormat:@"%@%@",
- NSLocalizedString(@"Delete", nil), trailingQualifier]];
+ NSLocalizedString(@"Delete", nil), trailingQualifier]];
}
}
@@ -313,13 +313,13 @@ - (BOOL)addNotesFromPasteboard:(NSPasteboard*)pasteboard {
//webkit URL!
if ([types containsObject:WebArchivePboardType]) {
sourceIdentiferString = [[pasteboard dataForType:WebArchivePboardType] pathURLFromWebArchive];
- //gecko URL!
+ //gecko URL!
} else if ([types containsObject:[NSString customPasteboardTypeOfCode:0x4D5A0003]]) {
//lazilly use syntheticTitle to get first line, even though that's not how our API is documented
sourceIdentiferString = [[pasteboard stringForType:[NSString customPasteboardTypeOfCode:0x4D5A0003]] syntheticTitle];
unichar nullChar = 0x0;
sourceIdentiferString = [sourceIdentiferString stringByReplacingOccurrencesOfString:
- [NSString stringWithCharacters:&nullChar length:1] withString:@""];
+ [NSString stringWithCharacters:&nullChar length:1] withString:@""];
}
if ([types containsObject:NSURLPboardType]) {
@@ -447,7 +447,7 @@ - (IBAction)deleteNote:(id)sender {
NSString *warningSingleFormatString = NSLocalizedString(@"Delete the note titled quotemark%@quotemark?", @"alert title when asked to delete a note");
NSString *warningMultipleFormatString = NSLocalizedString(@"Delete %d notes?", @"alert title when asked to delete multiple notes");
NSString *warnString = currentNote ? [NSString stringWithFormat:warningSingleFormatString, titleOfNote(currentNote)] :
- [NSString stringWithFormat:warningMultipleFormatString, [indexes count]];
+ [NSString stringWithFormat:warningMultipleFormatString, [indexes count]];
NSBeginAlertSheet(warnString, NSLocalizedString(@"Delete", @"name of delete button"), NSLocalizedString(@"Cancel", @"name of cancel button"),
nil, window, self, @selector(deleteSheetDidEnd:returnCode:contextInfo:), NULL, (void*)deleteObj,
NSLocalizedString(@"You can undo this action later.", @"informational delete-this-note? text"));
@@ -460,7 +460,7 @@ - (IBAction)deleteNote:(id)sender {
- (IBAction)exportNote:(id)sender {
NSIndexSet *indexes = [notesTableView selectedRowIndexes];
-
+
NSArray *notes = [notationController notesAtIndexes:indexes];
[notationController synchronizeNoteChanges:nil];
@@ -469,7 +469,7 @@ - (IBAction)exportNote:(id)sender {
- (IBAction)printNote:(id)sender {
NSIndexSet *indexes = [notesTableView selectedRowIndexes];
-
+
[MultiplePageView printNotes:[notationController notesAtIndexes:indexes] forWindow:window];
}
@@ -500,6 +500,7 @@ - (void)settingChangedForSelectorString:(NSString*)selectorString {
if ([selectorString isEqualToString:SEL_STR(setAliasDataForDefaultDirectory:sender:)]) {
//defaults changed for the database location -- load the new one!
+ //TODO: should remove all actions from windowUndoManager if initialization succeeds
OSStatus err = noErr;
NotationController *newNotation = nil;
@@ -566,7 +567,7 @@ - (void)showHelp:(id)sender {
}
- (void)application:(NSApplication *)sender openFiles:(NSArray *)filenames {
-
+
//should check filenames here to see whether notationcontroller already owns these
NSArray *notes = [[[[AlienNoteImporter alloc] initWithStoragePaths:filenames] autorelease] importedNotes];
@@ -676,18 +677,18 @@ - (BOOL)control:(NSControl *)control textView:(NSTextView *)aTextView doCommandB
//[field updateButtonIfNecessaryForEditor:aTextView];
return YES;
}
-
+
//following actions should also redraw the button, if it is visible
//except that this can be much more easily handled by -[DualField reflectScrolledClipView:]
/*if (command == @selector(moveLeft:) || command == @selector(moveRight:) ||
- command == @selector(moveLeftAndModifySelection:) || command == @selector(moveRightAndModifySelection:) ||
- command == @selector(moveToEndOfParagraph:) || command == @selector(moveToBeginningOfParagraph:) ||
- command == @selector(moveParagraphForwardAndModifySelection:) || command == @selector(moveParagraphBackwardAndModifySelection:) ||
- !strncmp((char*)command, "moveWord", 8) || !strncmp((char*)command, "page", 4) || !strncmp((char*)command, "scroll", 6)) {
- [field updateButtonIfNecessaryForEditor:aTextView];
- return NO;
- }*/
-
+ command == @selector(moveLeftAndModifySelection:) || command == @selector(moveRightAndModifySelection:) ||
+ command == @selector(moveToEndOfParagraph:) || command == @selector(moveToBeginningOfParagraph:) ||
+ command == @selector(moveParagraphForwardAndModifySelection:) || command == @selector(moveParagraphBackwardAndModifySelection:) ||
+ !strncmp((char*)command, "moveWord", 8) || !strncmp((char*)command, "page", 4) || !strncmp((char*)command, "scroll", 6)) {
+ [field updateButtonIfNecessaryForEditor:aTextView];
+ return NO;
+ }*/
+
if (command == @selector(moveToBeginningOfLineAndModifySelection:)) {
if ([aTextView respondsToSelector:@selector(moveToBeginningOfDocumentAndModifySelection:)]) {
@@ -720,7 +721,7 @@ - (BOOL)control:(NSControl *)control textView:(NSTextView *)aTextView doCommandB
}
}
}
-
+
} else if (control == (NSControl*)notesTableView) {
if (command == @selector(insertNewline:)) {
//hit return in cell
@@ -791,10 +792,15 @@ - (void)controlTextDidChange:(NSNotification *)aNotification {
if ([fieldString length] > 0) {
[field setSnapbackString:nil];
-
- unsigned int preferredNoteIndex = [notationController preferredSelectedNoteIndex];
+
+ NSUInteger preferredNoteIndex = [notationController preferredSelectedNoteIndex];
if ([prefsController autoCompleteSearches] && preferredNoteIndex != NSNotFound) {
+ //TODO: select nothing if search string is not equal to title of preferredNoteIndex
+ //e.g., modifying a note's title in the search field deselects it,
+ //whether a result of back-spacing either an auto-completed entry
+ //or the title of a manually-selected note
+
[notesTableView selectRowAndScroll:preferredNoteIndex];
if (didFilter) {
@@ -830,14 +836,14 @@ - (void)controlTextDidChange:(NSNotification *)aNotification {
}
} else {
//selecting nothing; nothing typed
-selectNothing:
+ selectNothing:
isFilteringFromTyping = NO;
[notesTableView deselectAll:nil];
//reloadData could have already de-selected us, and hence this notification would not be sent from -deselectAll:
[self processChangedSelectionForTable:notesTableView];
}
-
+
isFilteringFromTyping = NO;
}
}
@@ -855,11 +861,11 @@ - (void)tableViewSelectionIsChanging:(NSNotification *)aNotification {
allowMultipleSelection = YES;
}
}
-
+
if (allowMultipleSelection != [notesTableView allowsMultipleSelection]) {
//we may need to hack some hidden NSTableView instance variables to improve mid-drag flags-changing
//NSLog(@"set allows mult: %d", allowMultipleSelection);
-
+
[notesTableView setAllowsMultipleSelection:allowMultipleSelection];
//we need this because dragging a selection back to the same note will nto trigger a selectionDidChange notification
@@ -870,7 +876,7 @@ - (void)tableViewSelectionIsChanging:(NSNotification *)aNotification {
//occasionally changing multiple selection ability in-between selecting multiple items causes total deselection
[window makeFirstResponder:notesTableView];
}
-
+
[self processChangedSelectionForTable:[aNotification object]];
}
@@ -896,10 +902,10 @@ - (void)processChangedSelectionForTable:(NSTableView*)table {
NSTextView *fieldEditor = (NSTextView*)[field currentEditor];
if (table == (NSTableView*)notesTableView) {
-
+
if (selectedRow > -1 && numberSelected == 1) {
//if it is uncached, cache the typed string only if we are selecting a note
-
+
[self cacheTypedStringIfNecessary:[fieldEditor string]];
//add snapback-button here?
@@ -938,7 +944,7 @@ - (void)processChangedSelectionForTable:(NSTableView*)table {
if (!isFilteringFromTyping) {
if (currentNote) {
//selected nothing and something is currently selected
-
+
[self _setCurrentNote:nil];
if (typedStringIsCached) {
@@ -973,7 +979,7 @@ - (void)setEmptyViewState:(BOOL)state {
BOOL enable = /*numberSelected != 1;*/ state;
[textView setHidden:enable];
[editorStatusView setHidden:!enable];
-
+
if (enable) {
[editorStatusView setLabelStatus:[notesTableView numberOfSelectedRows]];
}
@@ -983,7 +989,7 @@ - (BOOL)displayContentsForNoteAtIndex:(int)noteIndex {
NoteObject *note = [notationController noteObjectAtFilteredIndex:noteIndex];
if (note != currentNote) {
[self setEmptyViewState:NO];
-
+
//actually load the new note
[self _setCurrentNote:note];
@@ -1035,7 +1041,7 @@ - (BOOL)displayContentsForNoteAtIndex:(int)noteIndex {
//from linkingeditor
- (void)textDidChange:(NSNotification *)aNotification {
id textObject = [aNotification object];
-
+
if (textObject == textView) {
[currentNote setContentString:[textView textStorage]];
}
@@ -1061,10 +1067,10 @@ - (void)textDidEndEditing:(NSNotification *)aNotification {
}
- (IBAction)fieldAction:(id)sender {
-
+
[self createNoteIfNecessary];
[window makeFirstResponder:textView];
-
+
}
- (NSUndoManager *)windowWillReturnUndoManager:(NSWindow *)sender {
@@ -1093,7 +1099,7 @@ - (NoteObject*)createNoteIfNecessary {
if (!currentNote) {
//this assertion not yet valid until labels list changes notes list
assert([notesTableView numberOfSelectedRows] != 1);
-
+
[textView setTypingAttributes:[prefsController noteBodyAttributes]];
[textView setFont:[prefsController noteBodyFont]];
@@ -1108,7 +1114,7 @@ - (NoteObject*)createNoteIfNecessary {
- (void)notation:(NotationController*)notation revealNote:(NoteObject*)note {
if (note) {
- unsigned selectedNoteIndex = [notation indexInFilteredListForNoteIdenticalTo:note];
+ NSUInteger selectedNoteIndex = [notation indexInFilteredListForNoteIdenticalTo:note];
if (selectedNoteIndex == NSNotFound) {
NSLog(@"Note was not visible--showing all notes and trying again");
@@ -1155,13 +1161,13 @@ - (void)notation:(NotationController*)notation wantsToSearchForString:(NSString*
}
}
-- (void)splitView:(RBSplitView*)sender wasResizedFrom:(float)oldDimension to:(float)newDimension {
+- (void)splitView:(RBSplitView*)sender wasResizedFrom:(CGFloat)oldDimension to:(CGFloat)newDimension {
if (sender == splitView) {
[sender adjustSubviewsExcepting:[splitView subviewAtPosition:0]];
}
}
-- (BOOL)splitView:(RBSplitView*)sender shouldHandleEvent:(NSEvent*)theEvent inDivider:(unsigned int)divider
+- (BOOL)splitView:(RBSplitView*)sender shouldHandleEvent:(NSEvent*)theEvent inDivider:(NSUInteger)divider
betweenView:(RBSplitSubview*)leading andView:(RBSplitSubview*)trailing {
//if upon the first mousedown, the top selected index is visible, snap to it when resizing
[notesTableView noteFirstVisibleRow];
@@ -1290,12 +1296,12 @@ - (IBAction)showPreferencesWindow:(id)sender {
- (IBAction)bringFocusToControlField:(id)sender {
if (![NSApp isActive])
[NSApp activateIgnoringOtherApps:YES];
-
+
if (![window isKeyWindow]) {
[window makeKeyAndOrderFront:sender];
}
[field selectText:sender];
-
+
[self setEmptyViewState:currentNote == nil];
}
View
0 AttributedPlainText.h 100644 → 100755
File mode changed.
View
16 AttributedPlainText.m 100644 → 100755
@@ -248,9 +248,9 @@ - (NSArray*)allLinks {
unsigned int startIndex = 0;
NSMutableArray *array = [NSMutableArray arrayWithCapacity:1];
while (startIndex < [self length]) {
- id link = [self findNextLinkAtIndex:startIndex effectiveRange:&range];
- if ([link isKindOfClass:[NSURL class]]) {
- [array addObject:link];
+ id alink = [self findNextLinkAtIndex:startIndex effectiveRange:&range];
+ if ([alink isKindOfClass:[NSURL class]]) {
+ [array addObject:alink];
}
startIndex = range.location+range.length;
}
@@ -261,19 +261,19 @@ - (NSArray*)allLinks {
- (id)findNextLinkAtIndex:(unsigned int)startIndex effectiveRange:(NSRange *)range {
NSRange linkRange;
- id link = nil;
- while (!link && startIndex < [self length]) {
- link = [self attribute:NSLinkAttributeName atIndex:startIndex effectiveRange:&linkRange];
+ id alink = nil;
+ while (!alink && startIndex < [self length]) {
+ alink = [self attribute:NSLinkAttributeName atIndex:startIndex effectiveRange:&linkRange];
startIndex++;
}
- if (link) {
+ if (alink) {
range->location = linkRange.location;
range->length = linkRange.length;
} else {
range->location = NSNotFound;
range->length = 0;
}
- return link;
+ return alink;
}
#if SEPARATE_ATTRS
View
0 BlorPasswordRetriever.h 100644 → 100755
File mode changed.
View
0 BlorPasswordRetriever.m 100644 → 100755
File mode changed.
View
0 BodyScroller.h 100644 → 100755
File mode changed.
View
0 BodyScroller.m 100644 → 100755
File mode changed.
View
0 BookmarksController.h 100644 → 100755
File mode changed.
View
27 BookmarksController.m 100644 → 100755
@@ -111,8 +111,8 @@ - (id)delegate {
- (BOOL)isEqual:(id)anObject {
return noteObject == [anObject noteObject];
}
-- (unsigned)hash {
- return (unsigned)noteObject;
+- (NSUInteger)hash {
+ return (NSUInteger)noteObject;
}
@end
@@ -183,7 +183,7 @@ - (void)setNotes:(NSArray*)someNotes {
}
- (NoteObject*)noteWithUUIDBytes:(CFUUIDBytes)bytes {
- unsigned noteIndex = [notes indexOfNoteWithUUIDBytes:&bytes];
+ NSUInteger noteIndex = [notes indexOfNoteWithUUIDBytes:&bytes];
if (noteIndex != NSNotFound) return [notes objectAtIndex:noteIndex];
return nil;
}
@@ -253,7 +253,7 @@ - (void)updateBookmarksUI {
- (void)selectBookmarkInTableView:(NoteBookmark*)bookmark {
if (bookmarksTableView && bookmark) {
//find bookmark index and select
- unsigned bmIndex = [bookmarks indexOfObjectIdenticalTo:bookmark];
+ NSUInteger bmIndex = [bookmarks indexOfObjectIdenticalTo:bookmark];
if (bmIndex != NSNotFound) {
isSelectingProgrammatically = YES;
[bookmarksTableView selectRow:bmIndex byExtendingSelection:NO];
@@ -263,7 +263,7 @@ - (void)selectBookmarkInTableView:(NoteBookmark*)bookmark {
}
}
-- (BOOL)validateMenuItem:(id <NSMenuItem>)menuItem {
+- (BOOL)validateMenuItem:(NSMenuItem*)menuItem {
//need to fix this for better style detection
SEL action = [menuItem action];
@@ -299,7 +299,7 @@ - (void)restoreBookmark:(id)sender {
[self restoreNoteBookmark:[sender representedObject]];
}
-- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex {
+- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex {
if ([[aTableColumn identifier] isEqualToString:@"description"]) {
NSString *description = [[bookmarks objectAtIndex:rowIndex] description];
if (description)
@@ -320,11 +320,11 @@ - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColu
return [NSString stringWithFormat:@"%@%@%@ %d", rowIndex > 17 ? ctrlCharStr : @"", rowIndex > 8 ? shiftCharStr : @"", cmdCharStr, (rowIndex % 9) + 1];
}
-- (int)numberOfRowsInTableView:(NSTableView *)aTableView {
+- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView {
return [bookmarks count];
}
-- (BOOL)tableView:(NSTableView *)aTableView shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex {
+- (BOOL)tableView:(NSTableView *)aTableView shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex {
return NO;
}
@@ -346,7 +346,7 @@ - (BOOL)tableView:(NSTableView *)tv writeRows:(NSArray*)rows toPasteboard:(NSPas
return YES;
}
-- (NSDragOperation)tableView:(NSTableView*)tv validateDrop:(id <NSDraggingInfo>)info proposedRow:(int)row
+- (NSDragOperation)tableView:(NSTableView*)tv validateDrop:(id <NSDraggingInfo>)info proposedRow:(NSInteger)row
proposedDropOperation:(NSTableViewDropOperation)op {
NSDragOperation dragOp = ([info draggingSource] == bookmarksTableView) ? NSDragOperationMove : NSDragOperationCopy;
@@ -356,13 +356,13 @@ - (NSDragOperation)tableView:(NSTableView*)tv validateDrop:(id <NSDraggingInfo>)
return dragOp;
}
-- (BOOL)tableView:(NSTableView*)tv acceptDrop:(id <NSDraggingInfo>)info row:(int)row dropOperation:(NSTableViewDropOperation)op {
+- (BOOL)tableView:(NSTableView*)tv acceptDrop:(id <NSDraggingInfo>)info row:(NSInteger)row dropOperation:(NSTableViewDropOperation)op {
if (row < 0)
row = 0;
if ([info draggingSource] == bookmarksTableView) {
NSArray *rows = [[info draggingPasteboard] propertyListForType:MovedBookmarksType];
- int theRow = [[rows objectAtIndex:0] intValue];
+ NSInteger theRow = [[rows objectAtIndex:0] intValue];
id object = [[bookmarks objectAtIndex:theRow] retain];
@@ -425,6 +425,9 @@ - (void)showBookmarks:(id)sender {
[bookmarksTableView reloadData];
[window makeKeyAndOrderFront:self];
+
+ //TODO: hide bookmarks window if already open
+ //TODO: fix nspanel to not respond to close
//highlight searches as appropriate while the window is open
//selecting a search restores it
@@ -453,7 +456,7 @@ - (void)addBookmark:(id)sender {
NoteBookmark *bookmark = [[NoteBookmark alloc] initWithNoteObject:[delegate selectedNoteObject] searchString:newString];
if (bookmark) {
- unsigned existingIndex = [bookmarks indexOfObject:bookmark];
+ NSUInteger existingIndex = [bookmarks indexOfObject:bookmark];
if (existingIndex != NSNotFound) {
//show them what they've already got
NoteBookmark *existingBookmark = [bookmarks objectAtIndex:existingIndex];
View
0 BookmarksTable.h 100644 → 100755
File mode changed.
View
0 BookmarksTable.m 100644 → 100755
File mode changed.
View
30 BufferUtils.c 100644 → 100755
@@ -102,12 +102,12 @@ unsigned DumbWordCount(const void *s1, size_t len) {
return count;
}
-int genericSortContextFirst(int (*context) (void*, void*), void* one, void* two) {
+NSInteger genericSortContextFirst(int (*context) (void*, void*), void* one, void* two) {
return context(one, two);
}
-int genericSortContextLast(void* one, void* two, int (*context) (void*, void*)) {
+NSInteger genericSortContextLast(void* one, void* two, int (*context) (void*, void*)) {
return context(&one, &two);
}
@@ -170,7 +170,7 @@ CFStringRef GetRandomizedFileName() {
ProcessSerialNumber psn;
OSStatus err = noErr;
if ((err = GetCurrentProcess(&psn)) != noErr) {
- printf("error getting process serial number: %ld\n", err);
+ printf("error getting process serial number: %d\n", (int)err);
//just use the location of our memory
psn.lowLongOfPSN = (unsigned long)&psn;
@@ -219,7 +219,7 @@ OSStatus FSRefMakeInDirectoryWithString(FSRef *directoryRef, FSRef *childRef, CF
OSStatus FSRefReadData(FSRef *fsRef, size_t maximumReadSize, UInt64 *bufferSize, void** newBuffer, UInt16 modeOptions) {
OSStatus err = noErr;
HFSUniStr255 dfName; //this is just NULL / 0, anyway
- SInt16 refNum;
+ FSIORefNum refNum;
SInt64 forkSize;
ByteCount readActualCount = 0, totalReadBytes = 0;
@@ -229,7 +229,7 @@ OSStatus FSRefReadData(FSRef *fsRef, size_t maximumReadSize, UInt64 *bufferSize,
}
if ((err = FSGetDataForkName(&dfName)) != noErr) {
- printf("FSGetDataForkName: error %ld\n", err);
+ printf("FSGetDataForkName: error %d\n", (int)err);
return err;
}
@@ -238,27 +238,27 @@ OSStatus FSRefReadData(FSRef *fsRef, size_t maximumReadSize, UInt64 *bufferSize,
//get fork size
//read data
if ((err = FSOpenFork(fsRef, dfName.length, dfName.unicode, fsRdPerm, &refNum)) != noErr) {
- printf("FSOpenFork: error %ld\n", err);
+ printf("FSOpenFork: error %d\n", (int)err);
return err;
}
if ((forkSize = *bufferSize) < 1) {
if ((err = FSGetForkSize(refNum, &forkSize)) != noErr) {
- printf("FSGetForkSize: error %ld\n", err);
+ printf("FSGetForkSize: error %d\n", (int)err);
return err;
}
}
- long copyBufferSize = MIN(maximumReadSize, forkSize);
+ size_t copyBufferSize = MIN(maximumReadSize, (size_t)forkSize);
void *fullSizeBuffer = (void*)malloc(forkSize);
- while (noErr == err && totalReadBytes < forkSize) {
+ while (noErr == err && totalReadBytes < (ByteCount)forkSize) {
err = FSReadFork(refNum, fsAtMark + modeOptions, 0, copyBufferSize, fullSizeBuffer + totalReadBytes, &readActualCount);
totalReadBytes += readActualCount;
}
OSErr lastReadErr = err;
if ((err = FSCloseFork(refNum)) != noErr)
- printf("FSCloseFork: error %ld\n", err);
+ printf("FSCloseFork: error %d\n", (int)err);
*newBuffer = fullSizeBuffer;
//in case we read less than the expected size or the size was not initially known
@@ -270,7 +270,7 @@ OSStatus FSRefReadData(FSRef *fsRef, size_t maximumReadSize, UInt64 *bufferSize,
OSStatus FSRefWriteData(FSRef *fsRef, size_t maximumWriteSize, UInt64 bufferSize, const void* buffer, UInt16 modeOptions, Boolean truncateFile) {
OSStatus err = noErr;
HFSUniStr255 dfName; //this is just NULL / 0, anyway
- SInt16 refNum;
+ FSIORefNum refNum;
ByteCount writeActualCount = 0, totalWrittenBytes = 0;
if (!buffer || !fsRef) {
@@ -279,14 +279,14 @@ OSStatus FSRefWriteData(FSRef *fsRef, size_t maximumWriteSize, UInt64 bufferSize
}
if ((err = FSGetDataForkName(&dfName)) != noErr) {
- printf("FSGetDataForkName: error %ld\n", err);
+ printf("FSGetDataForkName: error %d\n", (int)err);
return err;
}
//FSOpenFork
//get vrefnum or whatever
if ((err = FSOpenFork(fsRef, dfName.length, dfName.unicode, fsWrPerm, &refNum)) != noErr) {
- printf("FSOpenFork: error %ld\n", err);
+ printf("FSOpenFork: error %d\n", (int)err);
return err;
}
@@ -302,12 +302,12 @@ OSStatus FSRefWriteData(FSRef *fsRef, size_t maximumWriteSize, UInt64 bufferSize
OSErr writeError = err;
if (truncateFile && (err = FSSetForkSize(refNum, fsFromStart, bufferSize))) {
- printf("FSOpenFork: FSSetForkSize %ld\n", err);
+ printf("FSOpenFork: FSSetForkSize %d\n", (int)err);
return err;
}
if ((err = FSCloseFork(refNum)) != noErr)
- printf("FSCloseFork: error %ld\n", err);
+ printf("FSCloseFork: error %d\n", (int)err);
return writeError;
}
View
0 BufferUtils.h 100644 → 100755
File mode changed.
View
0 CRC32.c 100644 → 100755
File mode changed.
View
0 CRC32.h 100644 → 100755
File mode changed.
View
0 CarbonFSErrorStrings.h 100644 → 100755
File mode changed.
View
0 DeletedNoteObject.h 100644 → 100755
File mode changed.
View
30 DeletedNoteObject.m 100644 → 100755
@@ -22,19 +22,33 @@ - (id)initWithExistingObject:(id<SynchronizedNote>)note {
- (id)initWithCoder:(NSCoder*)decoder {
if ([super init]) {
- //needs a case for nskeyedarchiver as well; will CFUUIDBytes just be nsdata?
- [decoder decodeValueOfObjCType:@encode(CFUUIDBytes) at:&uniqueNoteIDBytes];
- [decoder decodeValueOfObjCType:@encode(unsigned int) at:&serverModifiedTime];
- [decoder decodeValueOfObjCType:@encode(unsigned int) at:&logSequenceNumber];
+
+ if ([decoder allowsKeyedCoding]) {
+ NSUInteger decodedByteCount;
+ const uint8_t *decodedBytes = [decoder decodeBytesForKey:VAR_STR(uniqueNoteIDBytes) returnedLength:&decodedByteCount];
+ memcpy(&uniqueNoteIDBytes, decodedBytes, MIN(decodedByteCount, sizeof(CFUUIDBytes)));
+ serverModifiedTime = [decoder decodeInt32ForKey:VAR_STR(serverModifiedTime)];
+ logSequenceNumber = [decoder decodeInt32ForKey:VAR_STR(logSequenceNumber)];
+ } else {
+ [decoder decodeValueOfObjCType:@encode(CFUUIDBytes) at:&uniqueNoteIDBytes];
+ [decoder decodeValueOfObjCType:@encode(unsigned int) at:&serverModifiedTime];
+ [decoder decodeValueOfObjCType:@encode(unsigned int) at:&logSequenceNumber];
+ }
}
return self;
}
- (void)encodeWithCoder:(NSCoder *)coder {
- [coder encodeValueOfObjCType:@encode(CFUUIDBytes) at:&uniqueNoteIDBytes];
- [coder encodeValueOfObjCType:@encode(unsigned int) at:&serverModifiedTime];
- [coder encodeValueOfObjCType:@encode(unsigned int) at:&logSequenceNumber];
-
+
+ if ([coder allowsKeyedCoding]) {
+ [coder encodeBytes:(const uint8_t *)&uniqueNoteIDBytes length:sizeof(CFUUIDBytes) forKey:VAR_STR(uniqueNoteIDBytes)];
+ [coder encodeInt32:serverModifiedTime forKey:VAR_STR(serverModifiedTime)];
+ [coder encodeInt32:logSequenceNumber forKey:VAR_STR(logSequenceNumber)];
+ } else {
+ [coder encodeValueOfObjCType:@encode(CFUUIDBytes) at:&uniqueNoteIDBytes];
+ [coder encodeValueOfObjCType:@encode(unsigned int) at:&serverModifiedTime];
+ [coder encodeValueOfObjCType:@encode(unsigned int) at:&logSequenceNumber];
+ }
}
- (CFUUIDBytes *)uniqueNoteIDBytes {
View
0 DeletionManager.h 100644 → 100755
File mode changed.
View
8 DeletionManager.m 100644 → 100755
@@ -188,19 +188,19 @@ - (void)windowDidEndSheet:(NSNotification *)aNotification {
}
}
-- (BOOL)tableView:(NSTableView *)aTableView shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex {
+- (BOOL)tableView:(NSTableView *)aTableView shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex {
return NO;
}
-- (BOOL)tableView:(NSTableView *)aTableView shouldSelectRow:(int)rowIndex {
+- (BOOL)tableView:(NSTableView *)aTableView shouldSelectRow:(NSInteger)rowIndex {
return NO;
}
-- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex {
+- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex {
return filenameOfNote((NoteObject *)[deletedNotes objectAtIndex:rowIndex]);
}
-- (int)numberOfRowsInTableView:(NSTableView *)aTableView {
+- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView {
return [deletedNotes count];
}
View
0 DualField.h 100644 → 100755
File mode changed.
View
0 DualField.m 100644 → 100755
File mode changed.
View
0 EmptyView.h 100644 → 100755
File mode changed.
View
0 EmptyView.m 100644 → 100755
File mode changed.
View
0 EncodingsManager.h 100644 → 100755
File mode changed.
View
0 EncodingsManager.m 100644 → 100755
File mode changed.
View
0 English.lproj/BlorPasswordRetriever.nib/classes.nib 100644 → 100755
File mode changed.
View
0 English.lproj/BlorPasswordRetriever.nib/info.nib 100644 → 100755
File mode changed.
View
0 English.lproj/BlorPasswordRetriever.nib/keyedobjects.nib 100644 → 100755
File mode changed.
View
28 English.lproj/CarbonErrorStrings.plist 100644 → 100755
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>-33</key>
@@ -19,11 +19,11 @@
<key>-40</key>
<string>a negative file position offset was specified</string>
<key>-41</key>
- <string>the file won't fit in memory</string>
+ <string>the file won&apos;t fit in memory</string>
<key>-42</key>
<string>there are too many open files</string>
<key>-43</key>
- <string>the file wasn't found</string>
+ <string>the file wasn&apos;t found</string>
<key>-44</key>
<string>the media is write-protected</string>
<key>-45</key>
@@ -41,7 +41,7 @@
<key>-51</key>
<string>the file reference number is invalid</string>
<key>-52</key>
- <string>the file position offset couldn't be obtained</string>
+ <string>the file position offset couldn&apos;t be obtained</string>
<key>-53</key>
<string>the volume is no longer present</string>
<key>-54</key>
@@ -53,13 +53,13 @@
<key>-57</key>
<string>the disk is not mac-formatted</string>
<key>-58</key>
- <string>the volume's file system type is not handled</string>
+ <string>the volume&apos;s file system type is not handled</string>
<key>-59</key>
<string>there was a problem in the middle of renaming</string>
<key>-60</key>
<string>the master directory block is bad</string>
<key>-61</key>
- <string>the file's permissions prevent you from writing</string>
+ <string>the file&apos;s permissions prevent you from writing</string>
<key>-64</key>
<string>the drive is not installed</string>
<key>-120</key>
@@ -79,17 +79,19 @@
<key>-818</key>
<string>the data could not be unserialized</string>
<key>-819</key>
- <string>the write-ahead log file could not be initialized</string>
+ <string>the Interim Note-Changes file could not be initialized</string>
<key>-820</key>
- <string>the write-ahead log couldn't be appended-to</string>
+ <string>the Interim Note-Changes file couldn&apos;t be appended-to</string>
<key>-821</key>
<string>authentication failed</string>
<key>-822</key>
- <string>the data couldn't be decompressed</string>
+ <string>the data couldn&apos;t be decompressed</string>
<key>-823</key>
<string>you did not enter a passphrase</string>
<key>-824</key>
<string>the data could not be formatted appropriately</string>
+ <key>-825</key>
+ <string>notes had mis-matching values after decoding</string>
<key>-1300</key>
<string>the specified file ID was not found on the file system</string>
<key>-1301</key>
@@ -101,9 +103,9 @@
<key>-1304</key>
<string>the catalog changed unexpectedly</string>
<key>-1306</key>
- <string>the file's contents were attempted to be exchanged with itself</string>
+ <string>the file&apos;s contents were attempted to be exchanged with itself</string>
<key>-1307</key>
- <string>the file doesn't match the file ID number</string>
+ <string>the file doesn&apos;t match the file ID number</string>
<key>-1308</key>
<string>the volume was improperly remounted</string>
<key>-1309</key>
@@ -131,11 +133,11 @@
<key>-1407</key>
<string>a folder was in fact a file</string>
<key>-1409</key>
- <string>the file's requested fork doesn't exist</string>
+ <string>the file&apos;s requested fork doesn&apos;t exist</string>
<key>-1410</key>
<string>the requested name is too long to be valid</string>
<key>-1411</key>
- <string>the file doesn't have a name</string>
+ <string>the file doesn&apos;t have a name</string>
<key>-1412</key>
<string>an invalid positioning mode was specified for accessing the file</string>
<key>-1413</key>
View
0 English.lproj/Contact Information.nvhelp 100644 → 100755
File mode changed.
View
0 English.lproj/DeletionManager.nib/classes.nib 100644 → 100755
File mode changed.
View
0 English.lproj/DeletionManager.nib/info.nib 100644 → 100755
File mode changed.
View
0 English.lproj/DeletionManager.nib/keyedobjects.nib 100644 → 100755
File mode changed.
View
0 English.lproj/EncodingsManager.nib/classes.nib 100644 → 100755
File mode changed.
View
0 English.lproj/EncodingsManager.nib/info.nib 100644 → 100755
File mode changed.
View
0 English.lproj/EncodingsManager.nib/keyedobjects.nib 100644 → 100755
File mode changed.
View
0 English.lproj/Excruciatingly Useful Shortcuts.nvhelp 100644 → 100755
File mode changed.
View
0 English.lproj/ExporterManager.nib/classes.nib 100644 → 100755
File mode changed.
View
0 English.lproj/ExporterManager.nib/info.nib 100644 → 100755
File mode changed.
View
0 English.lproj/ExporterManager.nib/keyedobjects.nib 100644 → 100755
File mode changed.
View
0 English.lproj/FindPanel.nib/classes.nib 100644 → 100755
File mode changed.
View
0 English.lproj/FindPanel.nib/info.nib 100644 → 100755
File mode changed.
View
0 English.lproj/FindPanel.nib/keyedobjects.nib 100644 → 100755
File mode changed.
View
0 English.lproj/FindPanel.strings 100644 → 100755
File mode changed.
View
0 English.lproj/How does this thing work?.nvhelp 100644 → 100755
File mode changed.
View
0 English.lproj/InfoPlist.strings 100644 → 100755
File mode changed.
View
0 English.lproj/KeyDerivationManager.nib/classes.nib 100644 → 100755
File mode changed.
View
0 English.lproj/KeyDerivationManager.nib/info.nib 100644 → 100755
File mode changed.
View
0 English.lproj/KeyDerivationManager.nib/keyedobjects.nib 100644 → 100755
File mode changed.
View
0 English.lproj/KeyDerivationManager~.nib/classes.nib 100644 → 100755
File mode changed.
View
0 English.lproj/KeyDerivationManager~.nib/info.nib 100644 → 100755
File mode changed.
View
0 English.lproj/KeyDerivationManager~.nib/keyedobjects.nib 100644 → 100755
File mode changed.
View
BIN English.lproj/Localizable.strings 100644 → 100755
Binary file not shown.
View
4,260 English.lproj/MainMenu-nssplitview.nib/designable.nib
4,260 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
BIN English.lproj/MainMenu-nssplitview.nib/keyedobjects.nib
Binary file not shown.
View
BIN English.lproj/MainMenu.nib/keyedobjects.nib
Binary file not shown.
View
113 English.lproj/MainMenu~.nib/classes.nib
@@ -0,0 +1,113 @@
+{
+ IBClasses = (
+ {
+ ACTIONS = {
+ bringFocusToControlField = id;
+ deleteNote = id;
+ exportNote = id;
+ fieldAction = id;
+ fixFileEncoding = id;
+ importNotes = id;
+ newNoteWithClipboard = id;
+ printNote = id;
+ renameNote = id;
+ showPreferencesWindow = id;
+ tagNote = id;
+ };
+ CLASS = AppController;
+ LANGUAGE = ObjC;
+ OUTLETS = {
+ editorStatusView = EmptyView;
+ field = DualField;
+ notesTableView = NotesTableView;
+ sparkleUpdateItem = NSMenuItem;
+ splitSubview = RBSplitSubview;
+ splitView = RBSplitView;
+ textView = LinkingEditor;
+ window = NSWindow;
+ };
+ SUPERCLASS = NSObject;
+ },
+ {
+ CLASS = DualField;
+ LANGUAGE = ObjC;
+ OUTLETS = {
+ notesTable = NotesTableView;
+ };
+ SUPERCLASS = NSTextField;
+ },
+ {
+ CLASS = EmptyView;
+ LANGUAGE = ObjC;
+ OUTLETS = {
+ labelText = NSTextField;
+ };
+ SUPERCLASS = NSView;
+ },
+ {
+ ACTIONS = {
+ bold = id;
+ defaultStyle = id;
+ deleteToBeginningOfLine = id;
+ deleteWordBackward = id;
+ italic = id;
+ shiftLeftAction = id;
+ shiftRightAction = id;
+ underlineNV = id;
+ };
+ CLASS = FirstResponder;
+ LANGUAGE = ObjC;
+ SUPERCLASS = NSObject;
+ },
+ {
+ CLASS = FocusRingScrollView;
+ LANGUAGE = ObjC;
+ SUPERCLASS = NSScrollView;
+ },
+ {
+ CLASS = HeaderViewWithMenu;
+ LANGUAGE = ObjC;
+ SUPERCLASS = NSTableHeaderView;
+ },
+ {
+ ACTIONS = {
+ bold = id;
+ italic = id;
+ underlineNV = id;
+ };
+ CLASS = LinkingEditor;
+ LANGUAGE = ObjC;
+ OUTLETS = {
+ controlField = DualField;
+ notesTableView = id;
+ };
+ SUPERCLASS = NSTextView;
+ },
+ {
+ ACTIONS = {
+ performFindPanelAction = id;
+ };
+ CLASS = NSTextView;
+ LANGUAGE = ObjC;
+ SUPERCLASS = NSText;
+ },
+ {
+ CLASS = NoteAttributeColumn;
+ LANGUAGE = ObjC;
+ SUPERCLASS = NSTableColumn;
+ },
+ {
+ ACTIONS = {
+ incrementNoteSelection = id;
+ paste = id;
+ };
+ CLASS = NotesTableView;
+ LANGUAGE = ObjC;
+ OUTLETS = {
+ controlField = NSTextField;
+ };
+ SUPERCLASS = NSTableView;
+ }
+ );
+ IBVersion = 1;
+}
View
10 English.lproj/MainMenu~.nib/data.dependency
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IBPaletteDependency</key>
+ <array>
+ <string>RBSplitView</string>
+ </array>
+</dict>
+</plist>
View
31 English.lproj/MainMenu~.nib/info.nib
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IBDocumentLocation</key>
+ <string>112 343 380 431 0 0 1680 1028 </string>
+ <key>IBEditorPositions</key>
+ <dict>
+ <key>29</key>
+ <string>34 1134 574 44 0 0 1920 1178 </string>
+ <key>341</key>
+ <string>735 613 167 144 0 0 1680 1028 </string>
+ </dict>
+ <key>IBFramework Version</key>
+ <string>489.0</string>
+ <key>IBLockedObjects</key>
+ <array>
+ <integer>233</integer>
+ <integer>208</integer>
+ </array>
+ <key>IBOldestOS</key>
+ <integer>3</integer>
+ <key>IBOpenObjects</key>
+ <array>
+ <integer>21</integer>
+ <integer>29</integer>
+ </array>
+ <key>IBSystem Version</key>
+ <string>9L30</string>
+</dict>
+</plist>
View
BIN English.lproj/MainMenu~.nib/keyedobjects.nib
Binary file not shown.
View
0 English.lproj/NotationPrefsView.nib/classes.nib 100644 → 100755
File mode changed.
View
0 English.lproj/NotationPrefsView.nib/info.nib 100644 → 100755
File mode changed.
View
0 English.lproj/NotationPrefsView.nib/keyedobjects.nib 100644 → 100755
File mode changed.
View
0 English.lproj/PTKeyComboPanel.nib/classes.nib 100644 → 100755
File mode changed.
View
0 English.lproj/PTKeyComboPanel.nib/info.nib 100644 → 100755
File mode changed.
View
0 English.lproj/PTKeyComboPanel.nib/keyedobjects.nib 100644 → 100755
File mode changed.
View
0 English.lproj/PTKeyComboPanel~.nib/classes.nib 100644 → 100755
File mode changed.
View
0 English.lproj/PTKeyComboPanel~.nib/info.nib 100644 → 100755
File mode changed.
View
0 English.lproj/PTKeyComboPanel~.nib/keyedobjects.nib 100644 → 100755
File mode changed.
View
0 English.lproj/PassphraseChanger.nib/classes.nib 100644 → 100755
File mode changed.
View
0 English.lproj/PassphraseChanger.nib/info.nib 100644 → 100755
File mode changed.
View
0 English.lproj/PassphraseChanger.nib/keyedobjects.nib 100644 → 100755
File mode changed.
View
0 English.lproj/PassphrasePicker.nib/classes.nib 100644 → 100755
File mode changed.
View
0 English.lproj/PassphrasePicker.nib/info.nib 100644 → 100755
File mode changed.
View
0 English.lproj/PassphrasePicker.nib/keyedobjects.nib 100644 → 100755
File mode changed.
View
0 English.lproj/PassphraseRetriever.nib/classes.nib 100644 → 100755
File mode changed.
View
0 English.lproj/PassphraseRetriever.nib/info.nib 100644 → 100755
File mode changed.
View
0 English.lproj/PassphraseRetriever.nib/keyedobjects.nib 100644 → 100755
File mode changed.
View
0 English.lproj/Preferences.nib/classes.nib 100644 → 100755
File mode changed.
View
0 English.lproj/Preferences.nib/info.nib 100644 → 100755
File mode changed.
View
0 English.lproj/Preferences.nib/keyedobjects.nib 100644 → 100755
File mode changed.
View
0 English.lproj/SavedSearches.nib/classes.nib 100644 → 100755
File mode changed.
View
0 English.lproj/SavedSearches.nib/info.nib 100644 → 100755
File mode changed.
View
0 English.lproj/SavedSearches.nib/keyedobjects.nib 100644 → 100755
File mode changed.
View
0 English.lproj/SavedSearches~.nib/classes.nib 100644 → 100755
File mode changed.
View
0 English.lproj/SavedSearches~.nib/info.nib 100644 → 100755
File mode changed.
View
0 English.lproj/SavedSearches~.nib/keyedobjects.nib 100644 → 100755
File mode changed.
View
0 English.lproj/TagEditingManager.nib/classes.nib 100644 → 100755
File mode changed.
View
0 English.lproj/TagEditingManager.nib/info.nib 100644 → 100755
File mode changed.
View
0 English.lproj/TagEditingManager.nib/keyedobjects.nib 100644 → 100755
File mode changed.
View
0 English.lproj/This is the title of a note.nvhelp 100644 → 100755
File mode changed.
View
0 English.lproj/URLGetter.nib/classes.nib 100644 → 100755
File mode changed.
View
0 English.lproj/URLGetter.nib/info.nib 100644 → 100755
File mode changed.
View
0 English.lproj/URLGetter.nib/keyedobjects.nib 100644 → 100755
File mode changed.
View
0 English.lproj/URLGetter~.nib/classes.nib 100644 → 100755
File mode changed.
View
0 English.lproj/URLGetter~.nib/info.nib 100644 → 100755
File mode changed.
View
0 English.lproj/URLGetter~.nib/keyedobjects.nib 100644 → 100755
File mode changed.
View
0 ExporterManager.h 100644 → 100755
File mode changed.
View
0 ExporterManager.m 100644 → 100755
File mode changed.
View
74 FSExchangeObjectsCompat.c 100644 → 100755
@@ -4,36 +4,34 @@
*/
#include "FSExchangeObjectsCompat.h"
+#include <sys/attr.h>
+#include <sys/stat.h>
+#include <sys/mount.h>
-#define GetVolParmsInfoExtendedAttributes(volParms) (((volParms)->vMVersion >= 3) ? (volParms)->vMExtendedAttributes : 0)
+__private_extern__ u_int32_t volumeCapabilities(const char *path)
+{
+ struct attrlist alist;
+ bzero(&alist, sizeof(alist));
+ alist.bitmapcount = ATTR_BIT_MAP_COUNT;
+ alist.volattr = ATTR_VOL_INFO|ATTR_VOL_CAPABILITIES; // XXX: VOL_INFO must always be set
-OSErr FSGetVolParms(FSVolumeRefNum volRefNum, UInt32 bufferSize, GetVolParmsInfoBuffer *volParmsInfo, UInt32 *actualInfoSize) {
- OSErr result;
- HParamBlockRec pb;
-
- /* check parameters */
- require_action((NULL != volParmsInfo) && (NULL != actualInfoSize),
- BadParameter, result = paramErr);
-
- pb.ioParam.ioNamePtr = NULL;
- pb.ioParam.ioVRefNum = volRefNum;
- pb.ioParam.ioBuffer = (Ptr)volParmsInfo;
- pb.ioParam.ioReqCount = (SInt32)bufferSize;
- result = PBHGetVolParmsSync(&pb);
- require_noerr(result, PBHGetVolParmsSync);
-
- /* return number of bytes the file system returned in volParmsInfo buffer */
- *actualInfoSize = (UInt32)pb.ioParam.ioActCount;
-
-PBHGetVolParmsSync:
-BadParameter:
-
- return ( result );
+ struct {
+ u_int32_t v_size;
+ /* Fixed storage */
+ vol_capabilities_attr_t v_caps;
+ } vinfo;
+ bzero(&vinfo, sizeof(vinfo));
+ if (0 == getattrlist(path, &alist, &vinfo, sizeof(vinfo), 0)
+ && 0 != (alist.volattr & ATTR_VOL_CAPABILITIES)) {
+ return (vinfo.v_caps.capabilities[VOL_CAPABILITIES_FORMAT]);
+ }
+
+ return (0);
}
-Boolean VolSupportsFSExchangeObjects(const GetVolParmsInfoBuffer *volParms)
+Boolean VolSupportsFSExchangeObjects(u_int32_t volCapabilities)
{
- return ( (GetVolParmsInfoExtendedAttributes(volParms) & (1L << bSupportsFSExchangeObjects)) != 0 );
+ return ( 0 != (volCapabilities & VOL_CAP_INT_EXCHANGEDATA));
}
@@ -96,23 +94,19 @@ static OSErr GenerateUniqueHFSUniStr(long *startSeed, const FSRef *dir1, const F
}
Boolean VolumeOfFSRefSupportsExchangeObjects(const FSRef *fsRef) {
- OSErr result;
- GetVolParmsInfoBuffer volParmsInfo;
- FSCatalogInfo sourceCatalogInfo;
- UInt32 infoSize;
-
- /* get source volume's vRefNum */
- result = FSGetCatalogInfo(fsRef, kFSCatInfoVolume, &sourceCatalogInfo, NULL, NULL, NULL);
- require_noerr(result, DetermineSourceVRefNumFailed);
+ /* get source volume's path */
+ char path[PATH_MAX+1];
+ (void)FSRefMakePath(fsRef, (UInt8*)path, PATH_MAX);
+
+ char root[PATH_MAX+1];
+ root[0] = root[PATH_MAX] = 0;
+ struct statfs sb;
+ if (0 == statfs(path, &sb)) {
+ bcopy(sb.f_mntonname, root, MIN(PATH_MAX, sizeof(sb.f_mntonname)));
+ }
/* see if that volume supports FSExchangeObjects */
- result = FSGetVolParms(sourceCatalogInfo.volume, sizeof(GetVolParmsInfoBuffer),
- &volParmsInfo, &infoSize);
- return (noErr == result) && VolSupportsFSExchangeObjects(&volParmsInfo);
-
-DetermineSourceVRefNumFailed:
-
- return false;
+ return (VolSupportsFSExchangeObjects(volumeCapabilities(root)));
}
OSErr FSExchangeObjectsEmulate(const FSRef *sourceRef, const FSRef *destRef, FSRef *newSourceRef, FSRef *newDestRef) {
View
0 FSExchangeObjectsCompat.h 100644 → 100755
File mode changed.
View
14 FastListDataSource.h 100644 → 100755
@@ -11,25 +11,25 @@
@interface FastListDataSource : NSObject {
id *objects;
- unsigned int count;
+ NSUInteger count;
IMP objRetain, objRelease;
}
- (id)initWithClass:(Class)aClass;
- (const id *)immutableObjects;
-- (unsigned int)count;
+- (NSUInteger)count;
-- (unsigned)indexOfObjectIdenticalTo:(id)address;
+- (NSUInteger)indexOfObjectIdenticalTo:(id)address;
- (NSArray*)objectsAtFilteredIndexes:(NSIndexSet*)indexSet;
- (void)fillArrayFromArray:(NSArray*)array;
- (BOOL)filterArrayUsingFunction:(BOOL (*)(id, void*))present context:(void*)context;
-- (void)sortStableUsingFunction:(int (*)(id *, id *))compare;
+- (void)sortStableUsingFunction:(NSInteger (*)(id *, id *))compare;
- (void)tableView:(NSTableView *)aTableView setObjectValue:(id)anObject
- forTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex;
-- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex;
-- (int)numberOfRowsInTableView:(NSTableView *)aTableView;
+ forTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex;
+- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex;
+- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView;
@end
View
26 FastListDataSource.m 100644 → 100755
@@ -31,12 +31,12 @@ - (const id *)immutableObjects {
return (const id *)objects;
}
-- (unsigned int)count {
+- (NSUInteger)count {
return count;
}
-- (unsigned)indexOfObjectIdenticalTo:(id)address {
- register unsigned i;
+- (NSUInteger)indexOfObjectIdenticalTo:(id)address {
+ register NSUInteger i;
if (address) {
for (i=0; i<count; i++) {
@@ -53,9 +53,9 @@ - (unsigned)indexOfObjectIdenticalTo:(id)address {
//figure out which notes are in the indexset
- (NSArray*)objectsAtFilteredIndexes:(NSIndexSet*)indexSet {
- unsigned int indexBuffer[40];
- unsigned int bufferIndex;
- unsigned int indexCount = 1;
+ NSUInteger indexBuffer[40];
+ NSUInteger bufferIndex;
+ NSUInteger indexCount = 1;
NSRange range = NSMakeRange([indexSet firstIndex],
[indexSet lastIndex]-[indexSet firstIndex]+1);
@@ -64,7 +64,7 @@ - (NSArray*)objectsAtFilteredIndexes:(NSIndexSet*)indexSet {