aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPUserManager.m
diff options
context:
space:
mode:
authoravenjamin <avenjamin@gmail.com>2009-08-24 13:17:09 +0000
committeravenjamin <avenjamin@gmail.com>2009-08-24 13:17:09 +0000
commit4f94e0a0a120fba845b040a6247a3af93f753c20 (patch)
treec03798b642e6ebc8765b1e6635534cd923124909 /Source/SPUserManager.m
parentf5a839db299b5b0b9a89fee8c3957584c976206b (diff)
downloadsequelpro-4f94e0a0a120fba845b040a6247a3af93f753c20.tar.gz
sequelpro-4f94e0a0a120fba845b040a6247a3af93f753c20.tar.bz2
sequelpro-4f94e0a0a120fba845b040a6247a3af93f753c20.zip
- Small code clean up. Simplified some logic.
Diffstat (limited to 'Source/SPUserManager.m')
-rw-r--r--Source/SPUserManager.m31
1 files changed, 6 insertions, 25 deletions
diff --git a/Source/SPUserManager.m b/Source/SPUserManager.m
index 8b26b001..dbac9ea2 100644
--- a/Source/SPUserManager.m
+++ b/Source/SPUserManager.m
@@ -294,6 +294,7 @@
#pragma mark -
#pragma mark OutlineView Delegate Methods
+
- (void)outlineView:(NSOutlineView *)olv willDisplayCell:(NSCell*)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item
{
if ([cell isKindOfClass:[ImageAndTextCell class]])
@@ -330,12 +331,7 @@
- (BOOL)outlineView:(NSOutlineView *)olv shouldEditTableColumn:(NSTableColumn *)tableColumn item:(id)item
{
- if ([[[item representedObject] children] count] == 0)
- {
- return TRUE;
- }
- return FALSE;
-
+ return ([[[item representedObject] children] count] == 0);
}
- (void)outlineViewSelectionDidChange:(NSNotification *)notification
@@ -652,25 +648,10 @@
return FALSE;
id selectedObject = [[treeController selectedObjects] objectAtIndex:0];
- if ([[tabViewItem identifier] isEqualToString:@"General"])
- {
- if ([selectedObject parent] == nil) {
- return TRUE;
- } else {
- return FALSE;
- }
- }
- else if ([[tabViewItem identifier] isEqualToString:@"Global Privileges"] ||
- [[tabViewItem identifier] isEqualToString:@"Resources"])
- {
- if ([selectedObject parent] != nil)
- {
- return TRUE;
- }
- else
- {
- return FALSE;
- }
+ if ([[tabViewItem identifier] isEqualToString:@"General"]) {
+ return ([selectedObject parent] == nil);
+ } else if ([[tabViewItem identifier] isEqualToString:@"Global Privileges"] || [[tabViewItem identifier] isEqualToString:@"Resources"]) {
+ return ([selectedObject parent] != nil);
}
return TRUE;