adium 2433:446905abfc24: Set the source list in IB, don't use AI...

commits at adium.im commits at adium.im
Sun May 31 21:58:05 UTC 2009


details:	http://hg.adium.im/adium/rev/446905abfc24
revision:	2433:446905abfc24
author:		Zachary West <zacw at adium.im>
date:		Sun May 31 17:57:31 2009 -0400

Set the source list in IB, don't use AIImageTextCell. Refs #12019.

Our overloading of the text display was causing it to look pretty weird compared to a real source list.

diffs (337 lines):

diff -r d8892a29ba70 -r 446905abfc24 Resources/AdvancedPreferences.nib/classes.nib
--- a/Resources/AdvancedPreferences.nib/classes.nib	Sun May 31 12:53:35 2009 -0700
+++ b/Resources/AdvancedPreferences.nib/classes.nib	Sun May 31 17:57:31 2009 -0400
@@ -1,38 +1,221 @@
-{
-    IBClasses = (
-        {
-            CLASS = AIAdvancedPreferences; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {
-                modularPane = AIModularPaneCategoryView; 
-                "shelf_splitView" = KNShelfSplitView; 
-                "tableView_categories" = NSTableView; 
-            }; 
-            SUPERCLASS = AIPreferencePane; 
-        }, 
-        {
-            CLASS = AIAlternatingRowTableView; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSTableView; 
-        }, 
-        {CLASS = AIAutoScrollView; LANGUAGE = ObjC; SUPERCLASS = NSScrollView; }, 
-        {
-            ACTIONS = {changePreference = id; }; 
-            CLASS = AIModularPane; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {plugin = id; view = NSView; }; 
-            SUPERCLASS = AIObject; 
-        }, 
-        {CLASS = AIModularPaneCategoryView; LANGUAGE = ObjC; SUPERCLASS = NSView; }, 
-        {CLASS = AIObject; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {CLASS = AIPreferencePane; LANGUAGE = ObjC; SUPERCLASS = AIModularPane; }, 
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {
-            CLASS = KNShelfSplitView; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {contentView = NSView; shelfView = NSView; }; 
-            SUPERCLASS = NSView; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
+<?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>IBClasses</key>
+	<array>
+		<dict>
+			<key>ACTIONS</key>
+			<dict>
+				<key>toggleShelf</key>
+				<string>id</string>
+			</dict>
+			<key>CLASS</key>
+			<string>KNShelfSplitView</string>
+			<key>LANGUAGE</key>
+			<string>ObjC</string>
+			<key>OUTLETS</key>
+			<dict>
+				<key>contentView</key>
+				<string>NSView</string>
+				<key>delegate</key>
+				<string>id</string>
+				<key>shelfView</key>
+				<string>NSView</string>
+				<key>target</key>
+				<string>id</string>
+			</dict>
+			<key>SUPERCLASS</key>
+			<string>NSView</string>
+		</dict>
+		<dict>
+			<key>CLASS</key>
+			<string>NSApplication</string>
+			<key>LANGUAGE</key>
+			<string>ObjC</string>
+			<key>SUPERCLASS</key>
+			<string>NSResponder</string>
+		</dict>
+		<dict>
+			<key>CLASS</key>
+			<string>RBSplitView</string>
+			<key>LANGUAGE</key>
+			<string>ObjC</string>
+			<key>OUTLETS</key>
+			<dict>
+				<key>delegate</key>
+				<string>id</string>
+			</dict>
+			<key>SUPERCLASS</key>
+			<string>RBSplitSubview</string>
+		</dict>
+		<dict>
+			<key>CLASS</key>
+			<string>RBSplitSubview</string>
+			<key>LANGUAGE</key>
+			<string>ObjC</string>
+			<key>SUPERCLASS</key>
+			<string>NSView</string>
+		</dict>
+		<dict>
+			<key>CLASS</key>
+			<string>NSMenu</string>
+			<key>LANGUAGE</key>
+			<string>ObjC</string>
+			<key>SUPERCLASS</key>
+			<string>NSObject</string>
+		</dict>
+		<dict>
+			<key>ACTIONS</key>
+			<dict>
+				<key>adiumPrint</key>
+				<string>id</string>
+				<key>didAdjustSubviews</key>
+				<string>RBSplitView</string>
+				<key>prefsWindowWillClose</key>
+				<string>SS_PrefsController</string>
+				<key>toggleFindPanel</key>
+				<string>id</string>
+				<key>willAdjustSubviews</key>
+				<string>RBSplitView</string>
+			</dict>
+			<key>CLASS</key>
+			<string>NSObject</string>
+			<key>LANGUAGE</key>
+			<string>ObjC</string>
+		</dict>
+		<dict>
+			<key>CLASS</key>
+			<string>NSScrollView</string>
+			<key>LANGUAGE</key>
+			<string>ObjC</string>
+			<key>SUPERCLASS</key>
+			<string>NSView</string>
+		</dict>
+		<dict>
+			<key>CLASS</key>
+			<string>NSView</string>
+			<key>LANGUAGE</key>
+			<string>ObjC</string>
+			<key>SUPERCLASS</key>
+			<string>NSResponder</string>
+		</dict>
+		<dict>
+			<key>CLASS</key>
+			<string>FirstResponder</string>
+			<key>LANGUAGE</key>
+			<string>ObjC</string>
+			<key>SUPERCLASS</key>
+			<string>NSObject</string>
+		</dict>
+		<dict>
+			<key>CLASS</key>
+			<string>AIPreferencePane</string>
+			<key>LANGUAGE</key>
+			<string>ObjC</string>
+			<key>SUPERCLASS</key>
+			<string>AIModularPane</string>
+		</dict>
+		<dict>
+			<key>CLASS</key>
+			<string>AIModularPaneCategoryView</string>
+			<key>LANGUAGE</key>
+			<string>ObjC</string>
+			<key>SUPERCLASS</key>
+			<string>NSView</string>
+		</dict>
+		<dict>
+			<key>CLASS</key>
+			<string>NSCell</string>
+			<key>LANGUAGE</key>
+			<string>ObjC</string>
+			<key>SUPERCLASS</key>
+			<string>NSObject</string>
+		</dict>
+		<dict>
+			<key>ACTIONS</key>
+			<dict>
+				<key>changePreference</key>
+				<string>id</string>
+			</dict>
+			<key>CLASS</key>
+			<string>AIModularPane</string>
+			<key>LANGUAGE</key>
+			<string>ObjC</string>
+			<key>OUTLETS</key>
+			<dict>
+				<key>plugin</key>
+				<string>id</string>
+				<key>view</key>
+				<string>NSView</string>
+			</dict>
+			<key>SUPERCLASS</key>
+			<string>NSObject</string>
+		</dict>
+		<dict>
+			<key>CLASS</key>
+			<string>NSImageCell</string>
+			<key>LANGUAGE</key>
+			<string>ObjC</string>
+			<key>SUPERCLASS</key>
+			<string>NSCell</string>
+		</dict>
+		<dict>
+			<key>CLASS</key>
+			<string>AIAlternatingRowTableView</string>
+			<key>LANGUAGE</key>
+			<string>ObjC</string>
+			<key>SUPERCLASS</key>
+			<string>NSTableView</string>
+		</dict>
+		<dict>
+			<key>CLASS</key>
+			<string>AIAdvancedPreferences</string>
+			<key>LANGUAGE</key>
+			<string>ObjC</string>
+			<key>OUTLETS</key>
+			<dict>
+				<key>modularPane</key>
+				<string>AIModularPaneCategoryView</string>
+				<key>shelf_splitView</key>
+				<string>KNShelfSplitView</string>
+				<key>tableView_categories</key>
+				<string>NSTableView</string>
+			</dict>
+			<key>SUPERCLASS</key>
+			<string>AIPreferencePane</string>
+		</dict>
+		<dict>
+			<key>CLASS</key>
+			<string>SS_PrefsController</string>
+			<key>LANGUAGE</key>
+			<string>ObjC</string>
+			<key>OUTLETS</key>
+			<dict>
+				<key>delegate</key>
+				<string>id</string>
+			</dict>
+			<key>SUPERCLASS</key>
+			<string>NSObject</string>
+		</dict>
+		<dict>
+			<key>CLASS</key>
+			<string>AIAutoScrollView</string>
+			<key>LANGUAGE</key>
+			<string>ObjC</string>
+			<key>SUPERCLASS</key>
+			<string>NSScrollView</string>
+		</dict>
+		<dict>
+			<key>CLASS</key>
+			<string>NSTableView</string>
+			<key>LANGUAGE</key>
+			<string>ObjC</string>
+			<key>SUPERCLASS</key>
+			<string>NSControl</string>
+		</dict>
+	</array>
+	<key>IBVersion</key>
+	<string>1</string>
+</dict>
+</plist>
diff -r d8892a29ba70 -r 446905abfc24 Resources/AdvancedPreferences.nib/info.nib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Resources/AdvancedPreferences.nib/info.nib	Sun May 31 17:57:31 2009 -0400
@@ -0,0 +1,20 @@
+<?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>IBFramework Version</key>
+	<string>677</string>
+	<key>IBLastKnownRelativeProjectPath</key>
+	<string>../Adium.xcodeproj</string>
+	<key>IBOldestOS</key>
+	<integer>5</integer>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>14</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>9J61</string>
+	<key>targetFramework</key>
+	<string>IBCocoaFramework</string>
+</dict>
+</plist>
diff -r d8892a29ba70 -r 446905abfc24 Resources/AdvancedPreferences.nib/keyedobjects.nib
Binary file Resources/AdvancedPreferences.nib/keyedobjects.nib has changed
diff -r d8892a29ba70 -r 446905abfc24 Source/AIAdvancedPreferences.m
--- a/Source/AIAdvancedPreferences.m	Sun May 31 12:53:35 2009 -0700
+++ b/Source/AIAdvancedPreferences.m	Sun May 31 17:57:31 2009 -0400
@@ -111,16 +111,8 @@
  */
 - (void)_configureAdvancedPreferencesTable
 {	
-	//Configure our tableView
-	AIImageTextCell *cell = [[AIImageTextCell alloc] init];
-	[cell setFont:[NSFont systemFontOfSize:12]];
-	[[tableView_categories tableColumnWithIdentifier:@"description"] setDataCell:cell];
-	[cell release];
-	
 	[[tableView_categories enclosingScrollView] setAutohidesScrollers:YES];
-	
-	[tableView_categories setSelectionHighlightStyle:NSTableViewSelectionHighlightStyleSourceList];
-	
+
 	//Select the previously selected row
 	NSInteger row = [[adium.preferenceController preferenceForKey:KEY_ADVANCED_PREFERENCE_SELECTED_ROW
 														group:PREF_GROUP_WINDOW_POSITIONS] integerValue];
@@ -143,16 +135,15 @@
  */
 - (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row
 {
-	return [[[self advancedCategoryArray] objectAtIndex:row] label];
-}
-
-/*!
-* @brief Set the category image before the cell is displayed
- */
-- (void)tableView:(NSTableView *)tableView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row
-{
-	[cell setImage:[[[self advancedCategoryArray] objectAtIndex:row] image]];
-	[cell setSubString:nil];
+	NSString *identifier = tableColumn.identifier;
+	
+	if ([identifier isEqualToString:@"description"]) {
+		return [[[self advancedCategoryArray] objectAtIndex:row] label];
+	} else if ([identifier isEqualToString:@"image"]) {
+		return [[[self advancedCategoryArray] objectAtIndex:row] image];
+	}
+	
+	return nil;
 }
 
 /*!




More information about the commits mailing list