adium 2142:4b770f2bcdd9: Dim the minus button appropriately, all...
commits at adium.im
commits at adium.im
Mon May 11 04:18:45 UTC 2009
details: http://hg.adium.im/adium/rev/4b770f2bcdd9
revision: 2142:4b770f2bcdd9
author: Zachary West <zacw at adium.im>
date: Mon May 11 00:18:28 2009 -0400
Dim the minus button appropriately, allow multiple selection in the groups list.
diffstat:
Resources/en.lproj/AIAdvancedInspectorPane.nib/classes.nib | 8 ++
Resources/en.lproj/AIAdvancedInspectorPane.nib/info.nib | 2 +-
Resources/en.lproj/AIAdvancedInspectorPane.nib/keyedobjects.nib |
Source/AIAdvancedInspectorPane.m | 33 ++++++++---
4 files changed, 33 insertions(+), 10 deletions(-)
diffs (110 lines):
diff -r 2db630070494 -r 4b770f2bcdd9 Resources/en.lproj/AIAdvancedInspectorPane.nib/classes.nib
--- a/Resources/en.lproj/AIAdvancedInspectorPane.nib/classes.nib Mon May 11 00:10:44 2009 -0400
+++ b/Resources/en.lproj/AIAdvancedInspectorPane.nib/classes.nib Mon May 11 00:18:28 2009 -0400
@@ -113,6 +113,14 @@
</dict>
<dict>
<key>CLASS</key>
+ <string>AIPlasticMinusButton</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>AIPlasticButton</string>
+ </dict>
+ <dict>
+ <key>CLASS</key>
<string>NSView</string>
<key>LANGUAGE</key>
<string>ObjC</string>
diff -r 2db630070494 -r 4b770f2bcdd9 Resources/en.lproj/AIAdvancedInspectorPane.nib/info.nib
--- a/Resources/en.lproj/AIAdvancedInspectorPane.nib/info.nib Mon May 11 00:10:44 2009 -0400
+++ b/Resources/en.lproj/AIAdvancedInspectorPane.nib/info.nib Mon May 11 00:18:28 2009 -0400
@@ -10,7 +10,7 @@
<integer>5</integer>
<key>IBOpenObjects</key>
<array>
- <integer>6</integer>
+ <integer>67</integer>
</array>
<key>IBSystem Version</key>
<string>9G55</string>
diff -r 2db630070494 -r 4b770f2bcdd9 Resources/en.lproj/AIAdvancedInspectorPane.nib/keyedobjects.nib
Binary file Resources/en.lproj/AIAdvancedInspectorPane.nib/keyedobjects.nib has changed
diff -r 2db630070494 -r 4b770f2bcdd9 Source/AIAdvancedInspectorPane.m
--- a/Source/AIAdvancedInspectorPane.m Mon May 11 00:10:44 2009 -0400
+++ b/Source/AIAdvancedInspectorPane.m Mon May 11 00:18:28 2009 -0400
@@ -31,7 +31,8 @@
#define ADVANCED_NIB_NAME (@"AIAdvancedInspectorPane")
@interface AIAdvancedInspectorPane()
--(void)reloadPopup;
+- (void)reloadPopup;
+- (void)configureControlDimming;
@end
@implementation AIAdvancedInspectorPane
@@ -89,6 +90,11 @@
return inspectorContentView;
}
+- (void)configureControlDimming
+{
+ [button_removeGroup setEnabled:[tableView_groups numberOfSelectedRows]];
+}
+
-(void)updateForListObject:(AIListObject *)inObject
{
if (displayedObject != inObject) {
@@ -169,15 +175,8 @@
[accountMenu rebuildMenu];
[button_addGroup setMenu:[adium.contactController groupMenuWithTarget:self]];
-}
-
-- (void)selectGroup:(id)sender
-{
- AIListGroup *group = [sender representedObject];
- [currentSelectedAccount addContact:currentSelectedContact toGroup:group];
-
- [tableView_groups reloadData];
+ [self configureControlDimming];
}
- (void)accountMenu:(AIAccountMenu *)inAccountMenu didSelectAccount:(AIAccount *)inAccount
@@ -251,12 +250,23 @@
}
#pragma mark Group control
+- (void)selectGroup:(id)sender
+{
+ AIListGroup *group = [sender representedObject];
+
+ [currentSelectedAccount addContact:currentSelectedContact toGroup:group];
+
+ [tableView_groups deselectAll:nil];
+ [tableView_groups reloadData];
+}
+
- (void)removeSelectedGroups:(id)sender
{
for (AIListGroup *group in [currentSelectedContact.remoteGroups.allObjects objectsAtIndexes:tableView_groups.selectedRowIndexes]) {
[currentSelectedContact removeFromGroup:group];
}
+ [tableView_groups deselectAll:nil];
[tableView_groups reloadData];
}
@@ -285,6 +295,11 @@
return nil;
}
+- (void)tableViewSelectionDidChange:(NSNotification *)notification
+{
+ [self configureControlDimming];
+}
+
- (void)tableViewDeleteSelectedRows:(NSTableView *)tableView
{
[self removeSelectedGroups:nil];
More information about the commits
mailing list