aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2011-01-17 23:52:53 +0000
committerrowanbeentje <rowan@beent.je>2011-01-17 23:52:53 +0000
commit43882565dbb5342c44ac0301a0393d922680be6b (patch)
treed187fcf784f7e55b36b0713209398402e18d2557
parenta283563c3467954d2e5029e7dd6449e14714ed2d (diff)
downloadsequelpro-43882565dbb5342c44ac0301a0393d922680be6b.tar.gz
sequelpro-43882565dbb5342c44ac0301a0393d922680be6b.tar.bz2
sequelpro-43882565dbb5342c44ac0301a0393d922680be6b.zip
- Add a double-click action for transferring user schema privs between available & granted
-rw-r--r--Source/SPUserManager.m23
1 files changed, 22 insertions, 1 deletions
diff --git a/Source/SPUserManager.m b/Source/SPUserManager.m
index 9a9b916f..87b01cdc 100644
--- a/Source/SPUserManager.m
+++ b/Source/SPUserManager.m
@@ -112,7 +112,11 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn";
// Set the button delegate
[splitViewButtonBar setSplitViewDelegate:self];
-
+
+ // Set schema table double-click actions
+ [grantedTableView setDoubleAction:@selector(doubleClickSchemaPriv:)];
+ [availableTableView setDoubleAction:@selector(doubleClickSchemaPriv:)];
+
[self _initializeUsers];
[self _initializeSchemaPrivs];
@@ -779,6 +783,23 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn";
}
/**
+ * Move double-clicked rows across to the other table, using the
+ * appropriate methods.
+ */
+- (IBAction)doubleClickSchemaPriv:(id)sender
+{
+
+ // Ignore double-clicked header cells
+ if ([sender clickedRow] == -1) return;
+
+ if (sender == availableTableView) {
+ [self addSchemaPriv:sender];
+ } else {
+ [self removeSchemaPriv:sender];
+ }
+}
+
+/**
* Refreshes the current list of users.
*/
- (IBAction)refresh:(id)sender