From: Neil T. <nt...@us...> - 2006-06-21 13:42:10
|
Update of /cvsroot/pgsqlformac/QueryTool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21547 Modified Files: ChangeLog SqlDocument.m SqlToolbarCategory.m TODO.txt Added Files: cancel_script_32.png Log Message: Add NSUserDefaults, icon for canceling script, fix multiple statement parsing problem. Index: SqlDocument.m =================================================================== RCS file: /cvsroot/pgsqlformac/QueryTool/SqlDocument.m,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** SqlDocument.m 20 Jun 2006 16:29:00 -0000 1.12 --- SqlDocument.m 21 Jun 2006 13:42:01 -0000 1.13 *************** *** 117,126 **** { /* read the preferences and add them to the drop downs */ [status setStringValue:[NSString stringWithString:@"Waiting for connection information"]]; ! [host setStringValue:@"localhost"]; ! [port setStringValue:@"5432"]; ! [NSApp beginSheet:panelConnect modalForWindow:window --- 117,153 ---- { /* read the preferences and add them to the drop downs */ + NSString * aDefault; [status setStringValue:[NSString stringWithString:@"Waiting for connection information"]]; ! aDefault = [[NSUserDefaults standardUserDefaults] stringForKey:@"PGSqlForMac_DefaultHost"]; ! if (aDefault) ! { ! [host setStringValue:aDefault]; ! } ! else ! { ! [host setStringValue:@"localhost"]; ! } ! aDefault = [[NSUserDefaults standardUserDefaults] stringForKey:@"PGSqlForMac_DefaultUserName"]; ! if (aDefault) ! { ! [userName setStringValue:aDefault]; ! } ! aDefault = [[NSUserDefaults standardUserDefaults] stringForKey:@"PGSqlForMac_DefaultDatabaseName"]; ! if (aDefault) ! { ! [databaseName setStringValue:aDefault]; ! } ! aDefault = [[NSUserDefaults standardUserDefaults] stringForKey:@"PGSqlForMac_DefaultPort"]; ! if (aDefault) ! { ! [port setStringValue:aDefault]; ! } ! else ! { ! [port setStringValue:@"5432"]; ! } ! [NSApp beginSheet:panelConnect modalForWindow:window *************** *** 148,151 **** --- 175,185 ---- [conn setPort:[port stringValue]]; + // update user defaults + [[NSUserDefaults standardUserDefaults] setObject:[NSString stringWithString:[userName stringValue]] forKey:@"PGSqlForMac_DefaultUserName"]; + [[NSUserDefaults standardUserDefaults] setObject:[NSString stringWithString:[conn host]] forKey:@"PGSqlForMac_DefaultHost"]; + [[NSUserDefaults standardUserDefaults] setObject:[NSString stringWithString:[port stringValue]] forKey:@"PGSqlForMac_DefaultPort"]; + [[NSUserDefaults standardUserDefaults] setObject:[NSString stringWithString:[databaseName stringValue]] forKey:@"PGSqlForMac_DefaultDatabaseName"]; + [[NSUserDefaults standardUserDefaults] synchronize]; + // close the sheet [NSApp stopModal]; *************** *** 210,215 **** } ! // this should be implemented as a thread ! // further, it should also parse the command for multiple statements. - (IBAction)onExecuteQuery:(id)sender --- 244,249 ---- } ! // TODO this should be implemented as a thread ! // further, it should also parse the command for multiple statements (or should it? NT) - (IBAction)onExecuteQuery:(id)sender *************** *** 248,252 **** NSArray *arrQuery = [toBeRun componentsSeparatedByString:@";"]; ! int x = 0; //for (x = 0; x < [arrQuery count]; x++) for (x = 0; x < 1; x++) --- 282,286 ---- NSArray *arrQuery = [toBeRun componentsSeparatedByString:@";"]; ! int x; //for (x = 0; x < [arrQuery count]; x++) for (x = 0; x < 1; x++) Index: TODO.txt =================================================================== RCS file: /cvsroot/pgsqlformac/QueryTool/TODO.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TODO.txt 20 Jun 2006 16:29:00 -0000 1.2 --- TODO.txt 21 Jun 2006 13:42:01 -0000 1.3 *************** *** 7,14 **** - 2006-06-02 Column SQL not complete. - - 2006-06-02 Function create or replace does not fully re-create the function. - - - 2006-06-02 First column of schema view default width is too small. - - 2006-06-02 Trigger SQL not complete. --- 7,10 ---- *************** *** 19,23 **** - 2006-06-16 Created function to attempt to cancel a query in pgCocoaDB. Need to add button to GUI, create icon, and change to async queries. - - 2006-06-20 Does not save last connection parameters for reuse when re-launched. --- 15,18 ---- *************** *** 25,34 **** ==================== - - 2006-06-20 separating sql statements by ";" does not correctly handle $$ quoted text required by functions. - Completed ========= - 2006-06-02 View menu did not have separator before drop menu item. --- 20,35 ---- ==================== Completed ========= + - 2006-06-02 Function create or replace does not fully re-create the function. (2006-06-21) + + - 2006-06-20 Does not save last connection parameters for reuse when re-launched. Added NSUserDefaults to connection pane. (2006-06-21) + + - 2006-06-20 separating sql statements by ";" does not correctly handle $$ quoted text required by functions. Fixed by removeing the parse of entered data. (2006-06-21) + + - 2006-06-02 First column of schema view default width is too small. (2006-06-20) + - 2006-06-02 View menu did not have separator before drop menu item. --- NEW FILE: cancel_script_32.png --- (This appears to be a binary file; contents omitted.) Index: SqlToolbarCategory.m =================================================================== RCS file: /cvsroot/pgsqlformac/QueryTool/SqlToolbarCategory.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SqlToolbarCategory.m 12 Dec 2005 00:22:02 -0000 1.2 --- SqlToolbarCategory.m 21 Jun 2006 13:42:01 -0000 1.3 *************** *** 50,53 **** --- 50,61 ---- } + if ( [itemIdentifier isEqualToString:@"Cancel"] ) { + [item setLabel:@"Cancel"]; + [item setPaletteLabel:[item label]]; + [item setImage:[NSImage imageNamed:@"cancel_script_32"]]; + [item setTarget:self]; + [item setAction:@selector(onCancelQuery:)]; + } + if ( [itemIdentifier isEqualToString:@"SelectDB"] ) { NSRect fRect = [dbListView frame]; *************** *** 65,69 **** { return [NSArray arrayWithObjects:@"Connect", @"Disconnect", @"Execute", ! @"SelectDB", NSToolbarSpaceItemIdentifier, NSToolbarFlexibleSpaceItemIdentifier, --- 73,77 ---- { return [NSArray arrayWithObjects:@"Connect", @"Disconnect", @"Execute", ! @"Cancel", @"SelectDB", NSToolbarSpaceItemIdentifier, NSToolbarFlexibleSpaceItemIdentifier, *************** *** 74,78 **** { return [NSArray arrayWithObjects: ! @"Connect", @"Disconnect", @"Execute", @"SelectDB", NSToolbarFlexibleSpaceItemIdentifier, NSToolbarCustomizeToolbarItemIdentifier, nil]; --- 82,86 ---- { return [NSArray arrayWithObjects: ! @"Connect", @"Disconnect", @"Execute", @"Cancel", @"SelectDB", NSToolbarFlexibleSpaceItemIdentifier, NSToolbarCustomizeToolbarItemIdentifier, nil]; *************** *** 97,100 **** --- 105,113 ---- } + if ( [theItem action] == @selector(onCancelQuery:) ) + { + return ([conn isConnected]); //FIXME should only be on if executing a query + } + //if ( [[theItem itemIdentifier] isEqualToString:@"SelectDB"] ) //{ Index: ChangeLog =================================================================== RCS file: /cvsroot/pgsqlformac/QueryTool/ChangeLog,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ChangeLog 20 Jun 2006 16:29:00 -0000 1.7 --- ChangeLog 21 Jun 2006 13:42:01 -0000 1.8 *************** *** 1,2 **** --- 1,7 ---- + 2006-06-20 11:29 ntiffin + + * ChangeLog, SqlDocument.m, TODO.txt: Update for better round trip + function processing. + 2006-06-10 13:43 ntiffin |