Revision: 7309
http://skim-app.svn.sourceforge.net/skim-app/?rev=7309&view=rev
Author: hofman
Date: 2011-06-23 14:51:41 +0000 (Thu, 23 Jun 2011)
Log Message:
-----------
use enum for direction
Modified Paths:
--------------
trunk/SKMainWindowController.m
trunk/SKMainWindowController_UI.m
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2011-06-23 13:05:53 UTC (rev 7308)
+++ trunk/SKMainWindowController.m 2011-06-23 14:51:41 UTC (rev 7309)
@@ -177,7 +177,7 @@
- (SKProgressController *)progressController;
- (void)goToSelectedFindResults:(id)sender;
-- (void)updateFindResultHighlightsForDirection:(NSInteger)direction;
+- (void)updateFindResultHighlightsForDirection:(NSSelectionDirection)direction;
- (void)selectSelectedNote:(id)sender;
- (void)goToSelectedOutlineItem:(id)sender;
@@ -971,7 +971,7 @@
if ([leftSideController.findTableView window])
[self displayGroupedFindViewAnimating:NO];
}
- [self updateFindResultHighlightsForDirection:0];
+ [self updateFindResultHighlightsForDirection:NSDirectSelection];
}
}
@@ -1736,7 +1736,7 @@
[[findController findField] selectText:nil];
}
-- (void)updateFindResultHighlightsForDirection:(NSInteger)direction {
+- (void)updateFindResultHighlightsForDirection:(NSSelectionDirection)direction
{
NSArray *findResults = nil;
if (mwcFlags.findPaneState == SKSingularFindPaneState &&
[leftSideController.findTableView window])
@@ -1750,12 +1750,12 @@
} else {
- if (direction == 0) {
+ if (direction == NSDirectSelection) {
searchResultIndex = 0;
- } else if (direction == 1) {
+ } else if (direction == NSSelectingNext) {
if (++searchResultIndex >= (NSInteger)[findResults count])
searchResultIndex = 0;
- } else if (direction == -1) {
+ } else if (direction == NSSelectingPrevious) {
if (--searchResultIndex < 0)
searchResultIndex = [findResults count] - 1;
}
@@ -1786,7 +1786,7 @@
}
- (void)goToSelectedFindResults:(id)sender {
- [self updateFindResultHighlightsForDirection:0];
+ [self updateFindResultHighlightsForDirection:NSDirectSelection];
}
- (IBAction)searchNotes:(id)sender {
Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m 2011-06-23 13:05:53 UTC (rev 7308)
+++ trunk/SKMainWindowController_UI.m 2011-06-23 14:51:41 UTC (rev 7309)
@@ -98,7 +98,7 @@
- (void)updateNoteFilterPredicate;
-- (void)updateFindResultHighlightsForDirection:(NSInteger)direction;
+- (void)updateFindResultHighlightsForDirection:(NSSelectionDirection)direction;
- (void)observeUndoManagerCheckpoint:(NSNotification *)notification;
@@ -363,7 +363,7 @@
- (void)tableViewSelectionDidChange:(NSNotification *)aNotification {
if ([[aNotification object] isEqual:leftSideController.findTableView] ||
[[aNotification object] isEqual:leftSideController.groupedFindTableView]) {
- [self updateFindResultHighlightsForDirection:0];
+ [self updateFindResultHighlightsForDirection:NSDirectSelection];
if ([self interactionMode] == SKPresentationMode && [[NSUserDefaults
standardUserDefaults] boolForKey:SKAutoHidePresentationContentsKey])
[self hideLeftSideWindow];
@@ -498,13 +498,13 @@
- (void)tableViewMoveLeft:(NSTableView *)tv {
if (([tv isEqual:leftSideController.findTableView] || [tv
isEqual:leftSideController.groupedFindTableView])) {
- [self updateFindResultHighlightsForDirection:-1];
+ [self updateFindResultHighlightsForDirection:NSSelectingPrevious];
}
}
- (void)tableViewMoveRight:(NSTableView *)tv {
if (([tv isEqual:leftSideController.findTableView] || [tv
isEqual:leftSideController.groupedFindTableView])) {
- [self updateFindResultHighlightsForDirection:1];
+ [self updateFindResultHighlightsForDirection:NSSelectingNext];
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit