summaryrefslogtreecommitdiff
path: root/hw/xquartz
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2009-11-04 18:39:16 -0800
committerJeremy Huddleston <jeremyhu@freedesktop.org>2009-11-05 18:34:50 -0800
commit840a68dc5e3b4d285894f86df2a8c41fca5a4bec (patch)
tree468f7c441dc9dd94a954570e293228d3abb14f11 /hw/xquartz
parent0e3ad44c3b05cbe7b1d8f5ce7949fec3c7ae2e7c (diff)
XQuartz: Cleanup X11Controller.m compilation warnings.
Declare X11Controller as implementing NSTableViewDataSource. Use selectRowIndexes:byExtendingSelection instead of selectRow:byExtendingSelection Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
Diffstat (limited to 'hw/xquartz')
-rw-r--r--hw/xquartz/X11Controller.h2
-rw-r--r--hw/xquartz/X11Controller.m16
2 files changed, 9 insertions, 9 deletions
diff --git a/hw/xquartz/X11Controller.h b/hw/xquartz/X11Controller.h
index 88f50a1d7..bb284472a 100644
--- a/hw/xquartz/X11Controller.h
+++ b/hw/xquartz/X11Controller.h
@@ -55,7 +55,7 @@ typedef unsigned int NSUInteger;
#endif
#endif
-@interface X11Controller : NSObject
+@interface X11Controller : NSObject <NSTableViewDataSource>
{
IBOutlet NSPanel *prefs_panel;
diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
index 119154764..b28f4d303 100644
--- a/hw/xquartz/X11Controller.m
+++ b/hw/xquartz/X11Controller.m
@@ -426,8 +426,8 @@
[[columns objectAtIndex:2] setIdentifier:@"2"];
[apps_table setDataSource:self];
- [apps_table selectRow:0 byExtendingSelection:NO];
-
+ [apps_table selectRowIndexes:[NSIndexSet indexSetWithIndex:0] byExtendingSelection:NO];
+
[[apps_table window] makeKeyAndOrderFront:sender];
[apps_table reloadData];
if(oldapps != nil)
@@ -474,7 +474,7 @@
[item release];
[apps_table reloadData];
- [apps_table selectRow:row byExtendingSelection:NO];
+ [apps_table selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO];
}
- (IBAction) apps_table_duplicate:sender
@@ -497,7 +497,7 @@
[item release];
[apps_table reloadData];
- [apps_table selectRow:row+1 byExtendingSelection:NO];
+ [apps_table selectRowIndexes:[NSIndexSet indexSetWithIndex:row+1] byExtendingSelection:NO];
}
- (IBAction) apps_table_delete:sender
@@ -519,10 +519,10 @@
row = MIN (row, [table_apps count] - 1);
if (row >= 0)
- [apps_table selectRow:row byExtendingSelection:NO];
+ [apps_table selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO];
}
-- (int) numberOfRowsInTableView:(NSTableView *)tableView
+- (NSInteger) numberOfRowsInTableView:(NSTableView *)tableView
{
if (table_apps == nil) return 0;
@@ -530,7 +530,7 @@
}
- (id) tableView:(NSTableView *)tableView
-objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
+objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row
{
NSArray *item;
int col;
@@ -547,7 +547,7 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
}
- (void) tableView:(NSTableView *)tableView setObjectValue:(id)object
- forTableColumn:(NSTableColumn *)tableColumn row:(int)row
+ forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row
{
NSMutableArray *item;
int col;