From 8b39f25ee75d7db1eff68aaa71b92d3282e4c054 Mon Sep 17 00:00:00 2001 From: abhibeckert Date: Mon, 29 Sep 2008 09:49:36 +0000 Subject: tag release candidate 2 of 0.9.2 release --- trunk/CMCopyTable.h | 92 + trunk/CMCopyTable.m | 183 + trunk/CMImageView.h | 36 + trunk/CMImageView.m | 48 + trunk/CMMCPConnection.h | 37 + trunk/CMMCPConnection.m | 221 + trunk/CMMCPResult.h | 33 + trunk/CMMCPResult.m | 154 + trunk/CMTextView.h | 32 + trunk/CMTextView.m | 296 + trunk/CustomQuery.h | 105 + trunk/CustomQuery.m | 776 + trunk/English.lproj/Credits.rtf | 63 + trunk/English.lproj/DBView.xib | 18248 +++++++++++++++++++ trunk/English.lproj/InfoPlist.strings | Bin 0 -> 590 bytes trunk/English.lproj/Localizable.strings | Bin 0 -> 33230 bytes trunk/English.lproj/MainMenu.xib | 7375 ++++++++ trunk/English.lproj/english_help/bar.gif | Bin 0 -> 184 bytes trunk/English.lproj/english_help/english_help idx | Bin 0 -> 6144 bytes trunk/English.lproj/english_help/icon.gif | Bin 0 -> 1068 bytes trunk/English.lproj/english_help/index.html | 99 + .../English.lproj/english_help/sequel-pro_logo.jpg | Bin 0 -> 1932 bytes trunk/English.lproj/english_help/topics/bar.gif | Bin 0 -> 184 bytes .../English.lproj/english_help/topics/connect.html | 59 + .../English.lproj/english_help/topics/connect.jpg | Bin 0 -> 6812 bytes .../English.lproj/english_help/topics/console.html | 48 + trunk/English.lproj/english_help/topics/data.html | 92 + trunk/English.lproj/english_help/topics/dump.html | 93 + .../english_help/topics/encoding.html | 73 + .../english_help/topics/preferences.html | 58 + .../english_help/topics/preferences.jpg | Bin 0 -> 8025 bytes trunk/English.lproj/english_help/topics/query.html | 58 + .../english_help/topics/reference.html | 212 + .../english_help/topics/sample_query.html | 81 + .../english_help/topics/sample_tables.html | 374 + .../english_help/topics/sequel-pro_logo.jpg | Bin 0 -> 1932 bytes .../English.lproj/english_help/topics/syntax.html | 49 + .../English.lproj/english_help/topics/tables.html | 89 + trunk/Growl Registration Ticket.growlRegDict | 26 + trunk/Growl.framework/Growl | 1 + trunk/Growl.framework/Headers | 1 + trunk/Growl.framework/Resources | 1 + trunk/Growl.framework/Versions/A/Growl | Bin 0 -> 139476 bytes trunk/Growl.framework/Versions/A/Headers/Growl.h | 6 + .../A/Headers/GrowlApplicationBridge-Carbon.h | 780 + .../Versions/A/Headers/GrowlApplicationBridge.h | 609 + .../Versions/A/Headers/GrowlDefines.h | 348 + .../Versions/A/Resources/Info.plist | 24 + trunk/Growl.framework/Versions/Current | 1 + trunk/ImageAndTextCell.h | 59 + trunk/ImageAndTextCell.m | 135 + trunk/Info.plist | 82 + trunk/KeyChain.h | 37 + trunk/KeyChain.m | 64 + trunk/MCPKit_bundled.framework/Headers | 1 + trunk/MCPKit_bundled.framework/MCPKit_bundled | 1 + trunk/MCPKit_bundled.framework/PrivateHeaders | 1 + trunk/MCPKit_bundled.framework/Resources | 1 + .../Versions/A/Headers/MCPAttribute.h | 104 + .../A/Headers/MCPClassDescription+MCPEntreprise.h | 42 + .../Versions/A/Headers/MCPClassDescription.h | 91 + .../Versions/A/Headers/MCPConnection.h | 158 + .../Versions/A/Headers/MCPConnectionWinCont.h | 52 + .../Versions/A/Headers/MCPConstants.h | 33 + .../Versions/A/Headers/MCPDocument.h | 95 + .../A/Headers/MCPEntrepriseNotifications.h | 35 + .../Versions/A/Headers/MCPFastQueries.h | 47 + .../Versions/A/Headers/MCPJoin.h | 68 + .../Versions/A/Headers/MCPKit_bundled.h | 38 + .../Versions/A/Headers/MCPModel+MCPEntreprise.h | 32 + .../Versions/A/Headers/MCPModel.h | 78 + .../Versions/A/Headers/MCPNull.h | 36 + .../Versions/A/Headers/MCPNumber.h | 84 + .../Versions/A/Headers/MCPObject.h | 106 + .../Versions/A/Headers/MCPRelation.h | 109 + .../Versions/A/Headers/MCPResult.h | 110 + .../Versions/A/Headers/MCPResultPlus.h | 43 + .../Versions/A/Headers/my_alloc.h | 52 + .../Versions/A/Headers/my_list.h | 46 + .../Versions/A/Headers/mysql.h | 738 + .../Versions/A/Headers/mysql_com.h | 399 + .../Versions/A/Headers/mysql_embed.h | 33 + .../Versions/A/Headers/mysql_time.h | 56 + .../Versions/A/Headers/mysql_version.h | 29 + .../Versions/A/Headers/typelib.h | 34 + .../Versions/A/MCPKit_bundled | Bin 0 -> 1748716 bytes .../A/PrivateHeaders/MCPAttribute+Private.h | 35 + .../A/PrivateHeaders/MCPClassDescription+Private.h | 41 + .../A/PrivateHeaders/MCPRelation+Private.h | 41 + .../A/Resources/English.lproj/InfoPlist.strings | Bin 0 -> 192 bytes .../MCPConnectionWindow.nib/JavaCompiling.plist | 8 + .../_MCPConnectionWindow_EOArchive_English.java | 424 + .../MCPConnectionWindow.nib/classes.nib | 28 + .../English.lproj/MCPConnectionWindow.nib/info.nib | 16 + .../MCPConnectionWindow.nib/keyedobjects.nib | Bin 0 -> 9169 bytes .../Versions/A/Resources/Info.plist | 20 + trunk/MCPKit_bundled.framework/Versions/Current | 1 + trunk/MainController.h | 110 + trunk/MainController.m | 829 + trunk/SPTableInfo.h | 24 + trunk/SPTableInfo.m | 184 + trunk/SSHTunnel.h | 57 + trunk/SSHTunnel.m | 531 + trunk/SSHTunnel_old.h | 41 + trunk/SSHTunnel_old.m | 225 + trunk/Sparkle.framework/Headers | 1 + trunk/Sparkle.framework/Resources | 1 + trunk/Sparkle.framework/Sparkle | 1 + .../Versions/A/Headers/NSBundle+SUAdditions.h | 57 + .../Versions/A/Headers/NSFileManager+Aliases.h | 18 + .../A/Headers/NSFileManager+Authentication.h | 16 + .../A/Headers/NSFileManager+ExtendedAttributes.h | 53 + .../A/Headers/NSFileManager+Verification.h | 17 + .../Versions/A/Headers/NSString+extras.h | 66 + .../Versions/A/Headers/NSURL+Parameters.h | 18 + .../Versions/A/Headers/NSWorkspace+SystemVersion.h | 18 + .../Versions/A/Headers/NSWorkspace_RBAdditions.h | 41 + .../Versions/A/Headers/NTSynchronousTask.h | 29 + trunk/Sparkle.framework/Versions/A/Headers/RSS.h | 77 + .../Versions/A/Headers/SUAppcast.h | 32 + .../Versions/A/Headers/SUAppcastItem.h | 48 + .../Versions/A/Headers/SUAutomaticUpdateAlert.h | 39 + .../Versions/A/Headers/SUAutomaticUpdateDriver.h | 23 + .../Versions/A/Headers/SUBasicUpdateDriver.h | 59 + .../Versions/A/Headers/SUConstants.h | 72 + .../Versions/A/Headers/SUInstaller.h | 24 + .../Versions/A/Headers/SUPackageInstaller.h | 19 + .../Versions/A/Headers/SUPlainInstaller.h | 18 + .../Versions/A/Headers/SUProbingUpdateDriver.h | 24 + .../Versions/A/Headers/SUScheduledUpdateDriver.h | 21 + .../A/Headers/SUStandardVersionComparator.h | 36 + .../Versions/A/Headers/SUStatusChecker.h | 30 + .../Versions/A/Headers/SUStatusController.h | 42 + .../Versions/A/Headers/SUSystemProfiler.h | 17 + .../Versions/A/Headers/SUUIBasedUpdateDriver.h | 23 + .../Versions/A/Headers/SUUnarchiver.h | 29 + .../Versions/A/Headers/SUUpdateAlert.h | 46 + .../Versions/A/Headers/SUUpdateDriver.h | 27 + .../Versions/A/Headers/SUUpdatePermissionPrompt.h | 36 + .../Versions/A/Headers/SUUpdater.h | 80 + .../Versions/A/Headers/SUUserDefaults.h | 41 + .../A/Headers/SUUserInitiatedUpdateDriver.h | 21 + .../A/Headers/SUVersionComparisonProtocol.h | 27 + .../Versions/A/Headers/SUVersionComparisonTest.h | 16 + .../Versions/A/Headers/SUWindowController.h | 19 + .../Sparkle.framework/Versions/A/Headers/Sparkle.h | 63 + .../Versions/A/Resources/Info.plist | 24 + .../Versions/A/Resources/SUModelTranslation.plist | 174 + .../Versions/A/Resources/SUStatus.nib/classes.nib | 48 + .../Versions/A/Resources/SUStatus.nib/info.nib | 20 + .../A/Resources/SUStatus.nib/keyedobjects.nib | Bin 0 -> 7168 bytes .../SUAutomaticUpdateAlert.nib/classes.nib | 50 + .../en.lproj/SUAutomaticUpdateAlert.nib/info.nib | 20 + .../SUAutomaticUpdateAlert.nib/keyedobjects.nib | Bin 0 -> 7148 bytes .../en.lproj/SUUpdateAlert.nib/classes.nib | 67 + .../Resources/en.lproj/SUUpdateAlert.nib/info.nib | 20 + .../en.lproj/SUUpdateAlert.nib/keyedobjects.nib | Bin 0 -> 10282 bytes .../SUUpdatePermissionPrompt.nib/classes.nib | 59 + .../en.lproj/SUUpdatePermissionPrompt.nib/info.nib | 21 + .../SUUpdatePermissionPrompt.nib/keyedobjects.nib | Bin 0 -> 12679 bytes .../Versions/A/Resources/en.lproj/Sparkle.strings | Bin 0 -> 7580 bytes .../Versions/A/Resources/relaunch | Bin 0 -> 75404 bytes trunk/Sparkle.framework/Versions/A/Sparkle | Bin 0 -> 762824 bytes .../Versions/A/relaunch.app/Contents/Info.plist | 24 + .../A/relaunch.app/Contents/MacOS/relaunch | Bin 0 -> 71208 bytes .../Versions/A/relaunch.app/Contents/PkgInfo | 1 + trunk/Sparkle.framework/Versions/Current | 1 + trunk/Sparkle.framework/relaunch.app | 1 + trunk/TableContent.h | 136 + trunk/TableContent.m | 1910 ++ trunk/TableDocument.h | 223 + trunk/TableDocument.m | 1583 ++ trunk/TableDocumentSplitView.h | 35 + trunk/TableDocumentSplitView.m | 39 + trunk/TableDump.h | 136 + trunk/TableDump.m | 1473 ++ trunk/TableSource.h | 127 + trunk/TableSource.m | 1160 ++ trunk/TableStatus.h | 63 + trunk/TableStatus.m | 113 + trunk/TablesList.h | 95 + trunk/TablesList.m | 694 + trunk/askForPass.sh | 12 + trunk/gpl.html | 1 + trunk/gpl.txt | 340 + trunk/images/CodeAssistantProtocol.tiff | Bin 0 -> 568 bytes trunk/images/appicon.icns | Bin 0 -> 109752 bytes trunk/images/clearconsole.tiff | Bin 0 -> 16528 bytes trunk/images/columnadd.tiff | Bin 0 -> 16208 bytes trunk/images/columncopy.tiff | Bin 0 -> 15292 bytes trunk/images/columndelete.tiff | Bin 0 -> 16984 bytes trunk/images/columnrefresh.tiff | Bin 0 -> 15400 bytes trunk/images/connectionadd.tiff | Bin 0 -> 16208 bytes trunk/images/connectioncopy.tiff | Bin 0 -> 15296 bytes trunk/images/connectiondelete.tiff | Bin 0 -> 17000 bytes trunk/images/connectionrefresh.tiff | Bin 0 -> 15440 bytes trunk/images/createtablesyntax.tiff | Bin 0 -> 15940 bytes trunk/images/databases.tiff | Bin 0 -> 15436 bytes trunk/images/dbadd.tiff | Bin 0 -> 16324 bytes trunk/images/dbdelete.tiff | Bin 0 -> 17084 bytes trunk/images/dbrefresh.tiff | Bin 0 -> 15544 bytes trunk/images/flushprivileges.tiff | Bin 0 -> 17236 bytes trunk/images/grabber-horizontal.png | Bin 0 -> 2791 bytes trunk/images/grabber-vertical.png | Bin 0 -> 2794 bytes trunk/images/hideconsole.tiff | Bin 0 -> 16972 bytes trunk/images/indexadd.tiff | Bin 0 -> 16144 bytes trunk/images/indexdelete.tiff | Bin 0 -> 16124 bytes trunk/images/logo-48.png | Bin 0 -> 5209 bytes trunk/images/optimizetable.tiff | Bin 0 -> 16840 bytes trunk/images/query.tiff | Bin 0 -> 15332 bytes trunk/images/queryadd.tiff | Bin 0 -> 16284 bytes trunk/images/querycopy.tiff | Bin 0 -> 15352 bytes trunk/images/querydelete.tiff | Bin 0 -> 16280 bytes trunk/images/queryrefresh.tiff | Bin 0 -> 15496 bytes trunk/images/reload.tiff | Bin 0 -> 15488 bytes trunk/images/rowadd.tiff | Bin 0 -> 16112 bytes trunk/images/rowcopy.tiff | Bin 0 -> 15280 bytes trunk/images/rowdelete.tiff | Bin 0 -> 16144 bytes trunk/images/rowrefresh.tiff | Bin 0 -> 15364 bytes trunk/images/selectall.tiff | Bin 0 -> 15396 bytes trunk/images/selectnone.tiff | Bin 0 -> 15236 bytes trunk/images/sheettotable.tiff | Bin 0 -> 15376 bytes trunk/images/showconsole.tiff | Bin 0 -> 16880 bytes trunk/images/showvariables.tiff | Bin 0 -> 16980 bytes trunk/images/sort-down.tiff | Bin 0 -> 518 bytes trunk/images/sort-up.tiff | Bin 0 -> 518 bytes trunk/images/spyglass.tiff | Bin 0 -> 612 bytes trunk/images/table-small.tif | Bin 0 -> 28408 bytes trunk/images/tableadd.tiff | Bin 0 -> 16348 bytes trunk/images/tablecopy.tiff | Bin 0 -> 15380 bytes trunk/images/tabledelete.tiff | Bin 0 -> 16324 bytes trunk/images/tablerefresh.tiff | Bin 0 -> 15572 bytes trunk/images/tables.tiff | Bin 0 -> 15316 bytes trunk/images/tabletosheet.tiff | Bin 0 -> 15368 bytes trunk/images/textencode.tiff | Bin 0 -> 15240 bytes trunk/images/toolbar-switch-to-browse.png | Bin 0 -> 1781 bytes trunk/images/toolbar-switch-to-sql.png | Bin 0 -> 1296 bytes trunk/images/toolbar-switch-to-structure.png | Bin 0 -> 980 bytes trunk/images/toolbar-switch-to-table-info.png | Bin 0 -> 979 bytes trunk/main.m | 6 + trunk/sequel-pro.scriptSuite | 37 + trunk/sequel-pro.scriptTerminology | 31 + trunk/sequel-pro.xcodeproj/ide.pbxuser | 222 + trunk/sequel-pro.xcodeproj/project.pbxproj | 860 + 244 files changed, 47796 insertions(+) create mode 100644 trunk/CMCopyTable.h create mode 100644 trunk/CMCopyTable.m create mode 100644 trunk/CMImageView.h create mode 100644 trunk/CMImageView.m create mode 100644 trunk/CMMCPConnection.h create mode 100644 trunk/CMMCPConnection.m create mode 100644 trunk/CMMCPResult.h create mode 100644 trunk/CMMCPResult.m create mode 100644 trunk/CMTextView.h create mode 100644 trunk/CMTextView.m create mode 100644 trunk/CustomQuery.h create mode 100644 trunk/CustomQuery.m create mode 100644 trunk/English.lproj/Credits.rtf create mode 100644 trunk/English.lproj/DBView.xib create mode 100644 trunk/English.lproj/InfoPlist.strings create mode 100644 trunk/English.lproj/Localizable.strings create mode 100644 trunk/English.lproj/MainMenu.xib create mode 100644 trunk/English.lproj/english_help/bar.gif create mode 100644 trunk/English.lproj/english_help/english_help idx create mode 100644 trunk/English.lproj/english_help/icon.gif create mode 100755 trunk/English.lproj/english_help/index.html create mode 100644 trunk/English.lproj/english_help/sequel-pro_logo.jpg create mode 100644 trunk/English.lproj/english_help/topics/bar.gif create mode 100755 trunk/English.lproj/english_help/topics/connect.html create mode 100644 trunk/English.lproj/english_help/topics/connect.jpg create mode 100755 trunk/English.lproj/english_help/topics/console.html create mode 100755 trunk/English.lproj/english_help/topics/data.html create mode 100755 trunk/English.lproj/english_help/topics/dump.html create mode 100755 trunk/English.lproj/english_help/topics/encoding.html create mode 100755 trunk/English.lproj/english_help/topics/preferences.html create mode 100644 trunk/English.lproj/english_help/topics/preferences.jpg create mode 100755 trunk/English.lproj/english_help/topics/query.html create mode 100755 trunk/English.lproj/english_help/topics/reference.html create mode 100755 trunk/English.lproj/english_help/topics/sample_query.html create mode 100755 trunk/English.lproj/english_help/topics/sample_tables.html create mode 100644 trunk/English.lproj/english_help/topics/sequel-pro_logo.jpg create mode 100755 trunk/English.lproj/english_help/topics/syntax.html create mode 100755 trunk/English.lproj/english_help/topics/tables.html create mode 100644 trunk/Growl Registration Ticket.growlRegDict create mode 120000 trunk/Growl.framework/Growl create mode 120000 trunk/Growl.framework/Headers create mode 120000 trunk/Growl.framework/Resources create mode 100755 trunk/Growl.framework/Versions/A/Growl create mode 100644 trunk/Growl.framework/Versions/A/Headers/Growl.h create mode 100644 trunk/Growl.framework/Versions/A/Headers/GrowlApplicationBridge-Carbon.h create mode 100644 trunk/Growl.framework/Versions/A/Headers/GrowlApplicationBridge.h create mode 100644 trunk/Growl.framework/Versions/A/Headers/GrowlDefines.h create mode 100644 trunk/Growl.framework/Versions/A/Resources/Info.plist create mode 120000 trunk/Growl.framework/Versions/Current create mode 100755 trunk/ImageAndTextCell.h create mode 100755 trunk/ImageAndTextCell.m create mode 100644 trunk/Info.plist create mode 100644 trunk/KeyChain.h create mode 100644 trunk/KeyChain.m create mode 120000 trunk/MCPKit_bundled.framework/Headers create mode 120000 trunk/MCPKit_bundled.framework/MCPKit_bundled create mode 120000 trunk/MCPKit_bundled.framework/PrivateHeaders create mode 120000 trunk/MCPKit_bundled.framework/Resources create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPAttribute.h create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPClassDescription+MCPEntreprise.h create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPClassDescription.h create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPConnection.h create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPConnectionWinCont.h create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPConstants.h create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPDocument.h create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPEntrepriseNotifications.h create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPFastQueries.h create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPJoin.h create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPKit_bundled.h create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPModel+MCPEntreprise.h create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPModel.h create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPNull.h create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPNumber.h create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPObject.h create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPRelation.h create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPResult.h create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPResultPlus.h create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Headers/my_alloc.h create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Headers/my_list.h create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Headers/mysql.h create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Headers/mysql_com.h create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Headers/mysql_embed.h create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Headers/mysql_time.h create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Headers/mysql_version.h create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Headers/typelib.h create mode 100755 trunk/MCPKit_bundled.framework/Versions/A/MCPKit_bundled create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/PrivateHeaders/MCPAttribute+Private.h create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/PrivateHeaders/MCPClassDescription+Private.h create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/PrivateHeaders/MCPRelation+Private.h create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/InfoPlist.strings create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/JavaCompiling.plist create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/_MCPConnectionWindow_EOArchive_English.java create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/classes.nib create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/info.nib create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/keyedobjects.nib create mode 100644 trunk/MCPKit_bundled.framework/Versions/A/Resources/Info.plist create mode 120000 trunk/MCPKit_bundled.framework/Versions/Current create mode 100644 trunk/MainController.h create mode 100644 trunk/MainController.m create mode 100644 trunk/SPTableInfo.h create mode 100644 trunk/SPTableInfo.m create mode 100644 trunk/SSHTunnel.h create mode 100755 trunk/SSHTunnel.m create mode 100755 trunk/SSHTunnel_old.h create mode 100755 trunk/SSHTunnel_old.m create mode 120000 trunk/Sparkle.framework/Headers create mode 120000 trunk/Sparkle.framework/Resources create mode 120000 trunk/Sparkle.framework/Sparkle create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/NSBundle+SUAdditions.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/NSFileManager+Aliases.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/NSFileManager+Authentication.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/NSFileManager+ExtendedAttributes.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/NSFileManager+Verification.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/NSString+extras.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/NSURL+Parameters.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/NSWorkspace+SystemVersion.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/NSWorkspace_RBAdditions.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/NTSynchronousTask.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/RSS.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/SUAppcast.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/SUAutomaticUpdateAlert.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/SUAutomaticUpdateDriver.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/SUBasicUpdateDriver.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/SUConstants.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/SUInstaller.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/SUPackageInstaller.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/SUPlainInstaller.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/SUProbingUpdateDriver.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/SUScheduledUpdateDriver.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/SUStandardVersionComparator.h create mode 100755 trunk/Sparkle.framework/Versions/A/Headers/SUStatusChecker.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/SUStatusController.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/SUSystemProfiler.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/SUUIBasedUpdateDriver.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/SUUnarchiver.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/SUUpdateAlert.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/SUUpdateDriver.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/SUUpdatePermissionPrompt.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/SUUpdater.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/SUUserDefaults.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/SUUserInitiatedUpdateDriver.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/SUVersionComparisonProtocol.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/SUVersionComparisonTest.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/SUWindowController.h create mode 100644 trunk/Sparkle.framework/Versions/A/Headers/Sparkle.h create mode 100644 trunk/Sparkle.framework/Versions/A/Resources/Info.plist create mode 100644 trunk/Sparkle.framework/Versions/A/Resources/SUModelTranslation.plist create mode 100644 trunk/Sparkle.framework/Versions/A/Resources/SUStatus.nib/classes.nib create mode 100644 trunk/Sparkle.framework/Versions/A/Resources/SUStatus.nib/info.nib create mode 100644 trunk/Sparkle.framework/Versions/A/Resources/SUStatus.nib/keyedobjects.nib create mode 100644 trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/classes.nib create mode 100644 trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/info.nib create mode 100644 trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib create mode 100644 trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/classes.nib create mode 100644 trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/info.nib create mode 100644 trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/keyedobjects.nib create mode 100644 trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdatePermissionPrompt.nib/classes.nib create mode 100644 trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdatePermissionPrompt.nib/info.nib create mode 100644 trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib create mode 100644 trunk/Sparkle.framework/Versions/A/Resources/en.lproj/Sparkle.strings create mode 100755 trunk/Sparkle.framework/Versions/A/Resources/relaunch create mode 100755 trunk/Sparkle.framework/Versions/A/Sparkle create mode 100644 trunk/Sparkle.framework/Versions/A/relaunch.app/Contents/Info.plist create mode 100755 trunk/Sparkle.framework/Versions/A/relaunch.app/Contents/MacOS/relaunch create mode 100644 trunk/Sparkle.framework/Versions/A/relaunch.app/Contents/PkgInfo create mode 120000 trunk/Sparkle.framework/Versions/Current create mode 120000 trunk/Sparkle.framework/relaunch.app create mode 100644 trunk/TableContent.h create mode 100644 trunk/TableContent.m create mode 100644 trunk/TableDocument.h create mode 100644 trunk/TableDocument.m create mode 100644 trunk/TableDocumentSplitView.h create mode 100644 trunk/TableDocumentSplitView.m create mode 100644 trunk/TableDump.h create mode 100644 trunk/TableDump.m create mode 100644 trunk/TableSource.h create mode 100644 trunk/TableSource.m create mode 100644 trunk/TableStatus.h create mode 100644 trunk/TableStatus.m create mode 100644 trunk/TablesList.h create mode 100644 trunk/TablesList.m create mode 100755 trunk/askForPass.sh create mode 100644 trunk/gpl.html create mode 100644 trunk/gpl.txt create mode 100644 trunk/images/CodeAssistantProtocol.tiff create mode 100755 trunk/images/appicon.icns create mode 100644 trunk/images/clearconsole.tiff create mode 100644 trunk/images/columnadd.tiff create mode 100644 trunk/images/columncopy.tiff create mode 100644 trunk/images/columndelete.tiff create mode 100644 trunk/images/columnrefresh.tiff create mode 100644 trunk/images/connectionadd.tiff create mode 100644 trunk/images/connectioncopy.tiff create mode 100644 trunk/images/connectiondelete.tiff create mode 100644 trunk/images/connectionrefresh.tiff create mode 100644 trunk/images/createtablesyntax.tiff create mode 100644 trunk/images/databases.tiff create mode 100644 trunk/images/dbadd.tiff create mode 100644 trunk/images/dbdelete.tiff create mode 100644 trunk/images/dbrefresh.tiff create mode 100644 trunk/images/flushprivileges.tiff create mode 100644 trunk/images/grabber-horizontal.png create mode 100644 trunk/images/grabber-vertical.png create mode 100644 trunk/images/hideconsole.tiff create mode 100644 trunk/images/indexadd.tiff create mode 100644 trunk/images/indexdelete.tiff create mode 100644 trunk/images/logo-48.png create mode 100644 trunk/images/optimizetable.tiff create mode 100644 trunk/images/query.tiff create mode 100644 trunk/images/queryadd.tiff create mode 100644 trunk/images/querycopy.tiff create mode 100644 trunk/images/querydelete.tiff create mode 100644 trunk/images/queryrefresh.tiff create mode 100644 trunk/images/reload.tiff create mode 100644 trunk/images/rowadd.tiff create mode 100644 trunk/images/rowcopy.tiff create mode 100644 trunk/images/rowdelete.tiff create mode 100644 trunk/images/rowrefresh.tiff create mode 100644 trunk/images/selectall.tiff create mode 100644 trunk/images/selectnone.tiff create mode 100644 trunk/images/sheettotable.tiff create mode 100644 trunk/images/showconsole.tiff create mode 100644 trunk/images/showvariables.tiff create mode 100644 trunk/images/sort-down.tiff create mode 100644 trunk/images/sort-up.tiff create mode 100644 trunk/images/spyglass.tiff create mode 100644 trunk/images/table-small.tif create mode 100644 trunk/images/tableadd.tiff create mode 100644 trunk/images/tablecopy.tiff create mode 100644 trunk/images/tabledelete.tiff create mode 100644 trunk/images/tablerefresh.tiff create mode 100644 trunk/images/tables.tiff create mode 100644 trunk/images/tabletosheet.tiff create mode 100644 trunk/images/textencode.tiff create mode 100644 trunk/images/toolbar-switch-to-browse.png create mode 100644 trunk/images/toolbar-switch-to-sql.png create mode 100644 trunk/images/toolbar-switch-to-structure.png create mode 100644 trunk/images/toolbar-switch-to-table-info.png create mode 100644 trunk/main.m create mode 100755 trunk/sequel-pro.scriptSuite create mode 100755 trunk/sequel-pro.scriptTerminology create mode 100644 trunk/sequel-pro.xcodeproj/ide.pbxuser create mode 100644 trunk/sequel-pro.xcodeproj/project.pbxproj diff --git a/trunk/CMCopyTable.h b/trunk/CMCopyTable.h new file mode 100644 index 00000000..18fabde5 --- /dev/null +++ b/trunk/CMCopyTable.h @@ -0,0 +1,92 @@ +/*! + @header CMCopyTable.h + @abstract sequel-pro + @discussion
+ $Id:$
+ Created by Stuart Glenn on Wed Apr 21 2004.
+ Changed by Lorenz Textor on Sat Nov 13 2004
+ Copyright (c) 2004 Stuart Glenn. All rights reserved.
+
+*/ + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +#import + + +/*! + @class copyTable + @abstract subclassed NSTableView to implement copy & drag-n-drop + @discussion Allows copying by creating a string with each table row as + a separate line and each cell then separate via tabs. The drag out + is in similar format. The values for each cell are obtained via the + objects description method +*/ +@interface CMCopyTable : NSTableView +{ + +} + +/*! + @method copy: + @abstract does the work of copying + @discussion gets selected (if any) row(s) as a string setting it + then into th default pasteboard as a string type and tabular text type. + @param sender who asked for this copy? +*/ +- (void)copy:(id)sender; + +/*! + @method validateMenuItem: + @abstract Dynamically enable Copy menu item for the table view + @discussion Will only enable the Copy item when something is selected in + this table view + @param anItem the menu item being validated + @result YES if there is at least one row selected & the menu item is + copy, NO otherwise +*/ +- (BOOL)validateMenuItem:(NSMenuItem*)anItem; + +/*! + @method draggingSourceOperationMaskForLocal: + @discussion Allows for dragging out of the table to other applications + @param isLocal who cares + @result Always calls for a copy type drag operation +*/ +- (unsigned int)draggingSourceOperationMaskForLocal:(BOOL)isLocal; + +/*! + @method selectedRowsAsTabString + @abstract getter of the selected rows of the table for copy + @discussion For the selected rows returns a single string with each row + separated by a newline and then for each column value separated by a + tab. Values are from the objects description method, so make sure it + returns something meaningful. + @result The above described string, or nil if nothing selected +*/ +- (NSString *)selectedRowsAsTabString; + +/*! + @method draggedRowsAsTabString: + @abstract getter of the dragged rows of the table for drag + @discussion For the dragged rows returns a single string with each row + separated by a newline and then for each column value separated by a + tab. Values are from the objects description method, so make sure it + returns something meaningful. + @result The above described string, or nil if nothing selected +*/ +- (NSString *)draggedRowsAsTabString:(NSArray *)rows; + +@end diff --git a/trunk/CMCopyTable.m b/trunk/CMCopyTable.m new file mode 100644 index 00000000..8b46b583 --- /dev/null +++ b/trunk/CMCopyTable.m @@ -0,0 +1,183 @@ +// +// CMCopyTable.m +// sequel-pro +// +// Created by Stuart Glenn on Wed Apr 21 2004. +// Changed by Lorenz Textor on Sat Nov 13 2004 +// Copyright (c) 2004 Stuart Glenn. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +#import "CMCopyTable.h" + + +@implementation CMCopyTable + +- (void)copy:(id)sender +{ + NSString *tmp = [self selectedRowsAsTabString]; + + if ( nil != tmp ) + { + NSPasteboard *pb = [NSPasteboard generalPasteboard]; + + [pb declareTypes:[NSArray arrayWithObjects: NSTabularTextPboardType, + NSStringPboardType, nil] + owner:nil]; + + [pb setString:tmp forType:NSStringPboardType]; + [pb setString:tmp forType:NSTabularTextPboardType]; + } +} + +//allow for drag-n-drop out of the application as a copy +- (unsigned int)draggingSourceOperationMaskForLocal:(BOOL)isLocal +{ + return NSDragOperationCopy; +} + +//only have the copy menu item enabled when row(s) are selected +- (BOOL)validateMenuItem:(NSMenuItem*)anItem +{ + int row = [self selectedRow]; + if ([[anItem title] isEqualToString:@"Copy"] ) + { + if (row < 0 ) + { + return NO; + } + } + return YES; +} + +//get selected rows a string of newline separated lines of tab separated fields +//the value in each field is from the objects description method +- (NSString *)selectedRowsAsTabString +{ + if ( [self numberOfSelectedRows] > 0 ) + { + NSArray *columns = [self tableColumns]; + int numColumns = [columns count]; + id dataSource = [self dataSource]; + + NSMutableString *result = [NSMutableString stringWithCapacity:numColumns]; + + //this is really deprecated in 10.3, but the new method is really weird + NSEnumerator *enumerator = [self selectedRowEnumerator]; + + int c; + id row = nil; + id rowData = nil; + NSTableColumn *col = nil; + + while (row = [enumerator nextObject]) + { + rowData = nil; + for ( c = 0; c < numColumns; c++) + { + col = [columns objectAtIndex:c]; + rowData = [dataSource tableView:self + objectValueForTableColumn:col + row:[row intValue] ]; + + if ( nil != rowData ) + { + [result appendString:[NSString stringWithFormat:@"%@\t", [rowData description] ] ]; + } + else + { + [result appendString:@"\t"]; + } + } //end for each column + + if ( [result length] ) + { + [result deleteCharactersInRange:NSMakeRange([result length]-1, 1)]; + } + [result appendString: [ NSString stringWithFormat:@"\n"]]; + } //end for each row + + if ( [result length] ) + { + [result deleteCharactersInRange:NSMakeRange([result length]-1, 1)]; + } + return result; + } + else + { + return nil; + } +} + +//get dragged rows a string of newline separated lines of tab separated fields +//the value in each field is from the objects description method +- (NSString *)draggedRowsAsTabString:(NSArray *)rows +{ + if ( [rows count] > 0 ) + { + NSArray *columns = [self tableColumns]; + int numColumns = [columns count]; + id dataSource = [self dataSource]; + + NSMutableString *result = [NSMutableString stringWithCapacity:numColumns]; + + //this is really deprecated in 10.3, but the new method is really weird + NSEnumerator *enumerator = [rows objectEnumerator]; + + int c; + id row = nil; + id rowData = nil; + NSTableColumn *col = nil; + + while (row = [enumerator nextObject]) + { + rowData = nil; + for ( c = 0; c < numColumns; c++) + { + col = [columns objectAtIndex:c]; + rowData = [dataSource tableView:self + objectValueForTableColumn:col + row:[row intValue] ]; + + if ( nil != rowData ) + { + [result appendString:[NSString stringWithFormat:@"%@\t", [rowData description] ] ]; + } + else + { + [result appendString:@"\t"]; + } + } //end for each column + + if ( [result length] ) + { + [result deleteCharactersInRange:NSMakeRange([result length]-1, 1)]; + } + [result appendString: [ NSString stringWithFormat:@"\n"]]; + } //end for each row + + if ( [result length] ) + { + [result deleteCharactersInRange:NSMakeRange([result length]-1, 1)]; + } + return result; + } + else + { + return nil; + } +} + +@end diff --git a/trunk/CMImageView.h b/trunk/CMImageView.h new file mode 100644 index 00000000..c0444240 --- /dev/null +++ b/trunk/CMImageView.h @@ -0,0 +1,36 @@ +// +// CMImageView.h +// sequel-pro +// +// Created by lorenz textor (lorenz@textor.ch) on Sat Sep 06 2003. +// Copyright (c) 2002-2003 Lorenz Textor. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at +// Or mail to + +#import + + +@interface CMImageView : NSImageView { + + NSString *draggedFilePath; + +} + +- (NSString *)draggedFilePath; + +@end diff --git a/trunk/CMImageView.m b/trunk/CMImageView.m new file mode 100644 index 00000000..f3757879 --- /dev/null +++ b/trunk/CMImageView.m @@ -0,0 +1,48 @@ +// +// CMImageView.m +// sequel-pro +// +// Created by lorenz textor (lorenz@textor.ch) on Sat Sep 06 2003. +// Copyright (c) 2002-2003 Lorenz Textor. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at +// Or mail to + +#import "CMImageView.h" + + +@implementation CMImageView + +- (NSString *)draggedFilePath +/* +returns the path of the dragged file +*/ +{ + return [NSString stringWithString:draggedFilePath]; +} + +- (void)concludeDragOperation:(id )sender +{ + if ( draggedFilePath ) + [draggedFilePath release]; + + draggedFilePath = [[NSString stringWithString:[[[sender draggingPasteboard] propertyListForType:@"NSFilenamesPboardType"] objectAtIndex:0]] retain]; + + [super concludeDragOperation:sender]; +} + +@end diff --git a/trunk/CMMCPConnection.h b/trunk/CMMCPConnection.h new file mode 100644 index 00000000..1433d885 --- /dev/null +++ b/trunk/CMMCPConnection.h @@ -0,0 +1,37 @@ +// +// CMMCPConnection.h +// sequel-pro +// +// Created by lorenz textor (lorenz@textor.ch) on Wed Sept 21 2005. +// Copyright (c) 2002-2003 Lorenz Textor. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at +// Or mail to + +#import +#import +#import "CMMCPResult.h" + +@interface CMMCPConnection : MCPConnection { + id delegate; +} + +- (CMMCPResult *) queryString:(NSString *) query; +- (void)setDelegate:(id)object; +- (NSTimeZone *) timeZone; + +@end diff --git a/trunk/CMMCPConnection.m b/trunk/CMMCPConnection.m new file mode 100644 index 00000000..1e022e40 --- /dev/null +++ b/trunk/CMMCPConnection.m @@ -0,0 +1,221 @@ +// +// CMMCPConnection.m +// sequel-pro +// +// Created by lorenz textor (lorenz@textor.ch) on Wed Sept 21 2005. +// Copyright (c) 2002-2003 Lorenz Textor. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at +// Or mail to + +#import "CMMCPConnection.h" + + +@implementation CMMCPConnection + +/* ++ (NSStringEncoding) encodingForMySQLEncoding:(const char *) mysqlEncoding + Gets a proper NSStringEncoding according to the given MySQL charset. + + MySQL 4.0 offers this charsets: + big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1 latin1_de latin2 latin5 sjis swe7 tis620 ujis usa7 win1250 win1251ukr + + WARNING : incomplete implementation. Please, send your fixes. +{ +// unicode + if (!strncmp(mysqlEncoding, "utf8", 4)) { + return NSUTF8StringEncoding; + } + if (!strncmp(mysqlEncoding, "ucs2", 4)) { + return NSUnicodeStringEncoding; + } +// west european + if (!strncmp(mysqlEncoding, "ascii", 5)) { + return NSASCIIStringEncoding; + } + if (!strncmp(mysqlEncoding, "latin1", 6)) { + return NSISOLatin1StringEncoding; + } + if (!strncmp(mysqlEncoding, "macroman", 8)) { + return NSMacOSRomanStringEncoding; + } +// central european + if (!strncmp(mysqlEncoding, "cp1250", 6)) { + return NSWindowsCP1250StringEncoding; + } + if (!strncmp(mysqlEncoding, "latin2", 6)) { + return NSISOLatin2StringEncoding; + } +// south european and middle east + if (!strncmp(mysqlEncoding, "cp1256", 6)) { + return CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingWindowsArabic); + } + if (!strncmp(mysqlEncoding, "greek", 5)) { + return CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingISOLatinGreek); + } + if (!strncmp(mysqlEncoding, "hebrew", 6)) { + CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingISOLatinHebrew); + } + if (!strncmp(mysqlEncoding, "latin5", 6)) { + return CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingISOLatin5); + } +// baltic + if (!strncmp(mysqlEncoding, "cp1257", 6)) { + return CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingWindowsBalticRim); + } +// cyrillic + if (!strncmp(mysqlEncoding, "cp1251", 6)) { + return NSWindowsCP1251StringEncoding; + } +// asian + if (!strncmp(mysqlEncoding, "big5", 4)) { + return CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingBig5); + } + if (!strncmp(mysqlEncoding, "ujis", 4)) { + return NSJapaneseEUCStringEncoding; + } + if (!strncmp(mysqlEncoding, "sjis", 4)) { + return NSShiftJISStringEncoding; + } + +// default to iso latin 1, even if it is not exact (throw an exception?) + NSLog(@"warning: unknown encoding %s! falling back to latin1.", mysqlEncoding); + return NSISOLatin1StringEncoding; +} +*/ + +- (CMMCPResult *) queryString:(NSString *) query +/* +modified version of queryString to be used in sequel-pro +*/ +{ + CMMCPResult *theResult; + const char *theCQuery = [self cStringFromString:query]; + int theQueryCode; + +//[DIFF]: check connection + if ( ![self checkConnection] ) { + NSLog(@"Connection was gone, but should be reestablished now!"); + } +//end [DIFF] + +//[DIFF]: inform the delegate about the query + if ( delegate && [delegate respondsToSelector:@selector(willQueryString:)] ) + [delegate willQueryString:query]; +//end [DIFF] + + if (0 == (theQueryCode = mysql_query(mConnection, theCQuery))) { + if (mysql_field_count(mConnection) != 0) { +//[DIFF]: use CMMCPResult instad of MCPResult + theResult = [[CMMCPResult alloc] initWithMySQLPtr:mConnection encoding:mEncoding timeZone:mTimeZone]; +//end [DIFF] + } + else { + return nil; + } + } + else { +// NSLog (@"Problem in queryString error code is : %d, query is : %s -in ObjC : %@-\n", theQueryCode, theCQuery, query); +// NSLog(@"Error message is : %@\n", [self getLastErrorMessage]); +// theResult = [theResult init]; // Old version... +// theResult = nil; +//[DIFF]: inform the delegate about errors + if ( delegate && [delegate respondsToSelector:@selector(queryGaveError:)] ) + [delegate queryGaveError:[self getLastErrorMessage]]; +//end [DIFF] + return nil; + } + return [theResult autorelease]; +} + +- (void)setDelegate:(id)object +/* +sets the delegate +*/ +{ + delegate = object; +} + + + + + +- (NSTimeZone *) timeZone +/*" Getting the currently used time zone (in communication with the DB server). "*/ +/* fixes mysql 4.1.14 problem, can be deleted as soon as fixed in the framework */ +{ + if ([self checkConnection]) { + MCPResult *theSessionTZ = [self queryString:@"SHOW VARIABLES LIKE '%time_zone'"]; + NSArray *theRow; +// diff + id theTZName; +// end diff + NSTimeZone *theTZ; + + [theSessionTZ dataSeek:1ULL]; + theRow = [theSessionTZ fetchRowAsArray]; + theTZName = [theRow objectAtIndex:1]; +// diff + if ( [theTZName isKindOfClass:[NSData class]] ) { + // MySQL 4.1.14 returns the mysql variables as nsdata + theTZName = [self stringWithText:theTZName]; + } +// end diff + if ([theTZName isEqualToString:@"SYSTEM"]) { + [theSessionTZ dataSeek:0ULL]; + theRow = [theSessionTZ fetchRowAsArray]; + theTZName = [theRow objectAtIndex:1]; +// diff + if ( [theTZName isKindOfClass:[NSData class]] ) { + // MySQL 4.1.14 returns the mysql variables as nsdata + theTZName = [self stringWithText:theTZName]; + } +// end diff + } + if (theTZName) { // Old versions of the server does not support there own time zone ? + theTZ = [NSTimeZone timeZoneWithName:theTZName]; + } + else { // By default set the time zone to the local one.. + // Try to get the name using the previously available variable: +// NSLog(@"Fecthing time-zone on 'old' DB server : variable name is : timezone"); + theSessionTZ = [self queryString:@"SHOW VARIABLES LIKE 'timezone'"]; + [theSessionTZ dataSeek:0ULL]; + theRow = [theSessionTZ fetchRowAsArray]; + theTZName = [theRow objectAtIndex:1]; + if (theTZName) { // Finally we found one ... +// NSLog(@"Result is : %@", theTZName); + theTZ = [NSTimeZone timeZoneWithName:theTZName]; + } + else { + theTZ = [NSTimeZone defaultTimeZone]; +// theTZ = [NSTimeZone systemTimeZone]; + NSLog(@"The time zone is not defined on the server, set it to the default one : %@", theTZ); + } + } + if (theTZ != mTimeZone) { + [mTimeZone release]; + mTimeZone = [theTZ retain]; + } + } + return mTimeZone; +} + + + + + +@end diff --git a/trunk/CMMCPResult.h b/trunk/CMMCPResult.h new file mode 100644 index 00000000..c5ab06cf --- /dev/null +++ b/trunk/CMMCPResult.h @@ -0,0 +1,33 @@ +// +// CMMCPResult.h +// sequel-pro +// +// Created by lorenz textor (lorenz@textor.ch) on Wed Sept 21 2005. +// Copyright (c) 2002-2003 Lorenz Textor. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at +// Or mail to + +#import +#import + + +@interface CMMCPResult : MCPResult { + +} + +@end diff --git a/trunk/CMMCPResult.m b/trunk/CMMCPResult.m new file mode 100644 index 00000000..ff5c6c88 --- /dev/null +++ b/trunk/CMMCPResult.m @@ -0,0 +1,154 @@ +// +// CMMCPResult.m +// sequel-pro +// +// Created by lorenz textor (lorenz@textor.ch) on Wed Sept 21 2005. +// Copyright (c) 2002-2003 Lorenz Textor. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at +// Or mail to + +#import "CMMCPResult.h" + + +@implementation CMMCPResult + +- (id) fetchRowAsType:(MCPReturnType) aType +/*" +modified version for use with sequel-pro +"*/ +{ + MYSQL_ROW theRow; + unsigned long *theLengths; + MYSQL_FIELD *theField; + int i; + id theReturn; + + if (mResult == NULL) { +// If there is no results, returns nil, as after the last row... + return nil; + } + + theRow = mysql_fetch_row(mResult); + if (theRow == NULL) { + return nil; + } + + switch (aType) { + case MCPTypeArray: + theReturn = [NSMutableArray arrayWithCapacity:mNumOfFields]; + break; + case MCPTypeDictionary: + if (mNames == nil) { + [self fetchFieldNames]; + } + theReturn = [NSMutableDictionary dictionaryWithCapacity:mNumOfFields]; + break; + default : + NSLog (@"Unknown type : %d, will return an Array!\n", aType); + theReturn = [NSMutableArray arrayWithCapacity:mNumOfFields]; + break; + } + + theLengths = mysql_fetch_lengths(mResult); + theField = mysql_fetch_fields(mResult); + for (i=0; i +// Or mail to + +#import + +@interface CMTextView : NSTextView { +} + +-(NSArray *)completionsForPartialWordRange:(NSRange)charRange indexOfSelectedItem:(int *)index; +-(NSArray *)keywords; + +@end diff --git a/trunk/CMTextView.m b/trunk/CMTextView.m new file mode 100644 index 00000000..0542ffa8 --- /dev/null +++ b/trunk/CMTextView.m @@ -0,0 +1,296 @@ +// +// CMTextView.m +// sequel-pro +// +// Created by Carsten BlŸm. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at +// Or mail to + +#import "CMTextView.h" + +@implementation CMTextView + +- (NSArray *)completionsForPartialWordRange:(NSRange)charRange indexOfSelectedItem:(int *)index +{ + + NSString *partialString = [[self string] substringWithRange:charRange]; + unsigned int partialLength = [partialString length]; + unsigned int options = NSCaseInsensitiveSearch | NSAnchoredSearch; + unsigned int i; + NSRange partialRange = NSMakeRange(0, partialLength); + NSMutableArray *compl = [[NSMutableArray alloc] initWithCapacity:32]; + NSArray *keywords = [self keywords]; + + // Get the document +// id tableDocument = [[[self window] windowController] document]; + id tableDocument = [[self window] delegate]; + +//NSLog(@"doc: %@", [[[self window] windowController] document]); + + // Get an array of table names for the current database + id tableNames = [[tableDocument valueForKeyPath:@"tablesListInstance"] valueForKey:@"tables"]; + + // Add matching table names to compl + for (i = 0; i < [tableNames count]; i ++) + { + if ([[tableNames objectAtIndex:i] length] > partialLength) + { + NSRange range = [[tableNames objectAtIndex:i] rangeOfString:partialString + options:options + range:partialRange]; + if (range.location != NSNotFound) + { + [compl addObject:[tableNames objectAtIndex:i]]; + } + } + + } + + // Add matching keywords to compl + for (i = 0; i < [keywords count]; i ++) + { + if ([[keywords objectAtIndex:i] length] > partialLength) + { + NSRange range = [[keywords objectAtIndex:i] rangeOfString:partialString + options:options + range:partialRange]; + if (range.location != NSNotFound) + { + [compl addObject:[keywords objectAtIndex:i]]; + } + } + } + + return [compl autorelease]; +} + + + +-(NSArray *)keywords { + return [NSArray arrayWithObjects: + @"ADD", + @"ALL", + @"ALTER", + @"ANALYZE", + @"AND", + @"ASC", + @"ASENSITIVE", + @"BEFORE", + @"BETWEEN", + @"BIGINT", + @"BINARY", + @"BLOB", + @"BOTH", + @"CALL", + @"CASCADE", + @"CASE", + @"CHANGE", + @"CHAR", + @"CHARACTER", + @"CHECK", + @"COLLATE", + @"COLUMN", + @"COLUMNS", + @"CONDITION", + @"CONNECTION", + @"CONSTRAINT", + @"CONTINUE", + @"CONVERT", + @"CREATE", + @"CROSS", + @"CURRENT_DATE", + @"CURRENT_TIME", + @"CURRENT_TIMESTAMP", + @"CURRENT_USER", + @"CURSOR", + @"DATABASE", + @"DATABASES", + @"DAY_HOUR", + @"DAY_MICROSECOND", + @"DAY_MINUTE", + @"DAY_SECOND", + @"DEC", + @"DECIMAL", + @"DECLARE", + @"DEFAULT", + @"DELAYED", + @"DELETE", + @"DESC", + @"DESCRIBE", + @"DETERMINISTIC", + @"DISTINCT", + @"DISTINCTROW", + @"DIV", + @"DOUBLE", + @"DROP", + @"DUAL", + @"EACH", + @"ELSE", + @"ELSEIF", + @"ENCLOSED", + @"ESCAPED", + @"EXISTS", + @"EXIT", + @"EXPLAIN", + @"FALSE", + @"FETCH", + @"FIELDS", + @"FLOAT", + @"FOR", + @"FORCE", + @"FOREIGN", + @"FOUND", + @"FROM", + @"FULLTEXT", + @"GOTO", + @"GRANT", + @"GROUP", + @"HAVING", + @"HIGH_PRIORITY", + @"HOUR_MICROSECOND", + @"HOUR_MINUTE", + @"HOUR_SECOND", + @"IGNORE", + @"INDEX", + @"INFILE", + @"INNER", + @"INOUT", + @"INSENSITIVE", + @"INSERT", + @"INT", + @"INTEGER", + @"INTERVAL", + @"INTO", + @"ITERATE", + @"JOIN", + @"KEY", + @"KEYS", + @"KILL", + @"LEADING", + @"LEAVE", + @"LEFT", + @"LIKE", + @"LIMIT", + @"LINES", + @"LOAD", + @"LOCALTIME", + @"LOCALTIMESTAMP", + @"LOCK", + @"LONG", + @"LONGBLOB", + @"LONGTEXT", + @"LOOP", + @"LOW_PRIORITY", + @"MATCH", + @"MEDIUMBLOB", + @"MEDIUMINT", + @"MEDIUMTEXT", + @"MIDDLEINT", + @"MINUTE_MICROSECOND", + @"MINUTE_SECOND", + @"MOD", + @"NATURAL", + @"NOT", + @"NO_WRITE_TO_BINLOG", + @"NULL", + @"NUMERIC", + @"ON", + @"OPTIMIZE", + @"OPTION", + @"OPTIONALLY", + @"ORDER", + @"OUT", + @"OUTER", + @"OUTFILE", + @"PRECISION", + @"PRIMARY", + @"PRIVILEGES", + @"PROCEDURE", + @"PURGE", + @"READ", + @"REAL", + @"REFERENCES", + @"REGEXP", + @"RENAME", + @"REPEAT", + @"REPLACE", + @"REQUIRE", + @"RESTRICT", + @"RETURN", + @"REVOKE", + @"RIGHT", + @"RLIKE", + @"SECOND_MICROSECOND", + @"SELECT", + @"SENSITIVE", + @"SEPARATOR", + @"SET", + @"SHOW", + @"SMALLINT", + @"SONAME", + @"SPATIAL", + @"SPECIFIC", + @"SQL", + @"SQLEXCEPTION", + @"SQLSTATE", + @"SQLWARNING", + @"SQL_BIG_RESULT", + @"SQL_CALC_FOUND_ROWS", + @"SQL_SMALL_RESULT", + @"SSL", + @"STARTING", + @"STRAIGHT_JOIN", + @"TABLE", + @"TABLES", + @"TERMINATED", + @"THEN", + @"TINYBLOB", + @"TINYINT", + @"TINYTEXT", + @"TRAILING", + @"TRIGGER", + @"TRUE", + @"UNDO", + @"UNION", + @"UNIQUE", + @"UNLOCK", + @"UNSIGNED", + @"UPDATE", + @"USAGE", + @"USE", + @"USING", + @"UTC_DATE", + @"UTC_TIME", + @"UTC_TIMESTAMP", + @"VALUES", + @"VARBINARY", + @"VARCHAR", + @"VARCHARACTER", + @"VARYING", + @"WHEN", + @"WHERE", + @"WHILE", + @"WITH", + @"WRITE", + @"XOR", + @"YEAR_MONTH", + @"ZEROFILL", + nil]; +} + +@end diff --git a/trunk/CustomQuery.h b/trunk/CustomQuery.h new file mode 100644 index 00000000..0a3aca94 --- /dev/null +++ b/trunk/CustomQuery.h @@ -0,0 +1,105 @@ +// +// CustomQuery.h +// sequel-pro +// +// Created by lorenz textor (lorenz@textor.ch) on Wed May 01 2002. +// Copyright (c) 2002-2003 Lorenz Textor. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at +// Or mail to + +#import +#import +#import "CMCopyTable.h" +#import "CMMCPConnection.h" +#import "CMMCPResult.h" + + +@interface CustomQuery : NSObject { + + IBOutlet id tableDumpInstance; + + IBOutlet id tableWindow; + IBOutlet id queryFavoritesButton; + IBOutlet id queryHistoryButton; + IBOutlet id textView; + IBOutlet CMCopyTable *customQueryView; + IBOutlet id errorText; + IBOutlet id affectedRowsText; + IBOutlet id valueSheet; + IBOutlet id valueTextField; + IBOutlet id queryFavoritesSheet; + IBOutlet id queryFavoritesView; + + CMMCPConnection *mySQLConnection; + NSArray *queryResult; + NSUserDefaults *prefs; + NSMutableArray *queryFavorites; +} + +//IBAction methods +- (IBAction)performQuery:(id)sender; +- (IBAction)chooseQueryFavorite:(id)sender; +- (IBAction)chooseQueryHistory:(id)sender; +- (IBAction)closeSheet:(id)sender; + +//queryFavoritesSheet methods +- (IBAction)addQueryFavorite:(id)sender; +- (IBAction)removeQueryFavorite:(id)sender; +- (IBAction)copyQueryFavorite:(id)sender; +- (IBAction)closeQueryFavoritesSheet:(id)sender; + +//getter methods +- (NSArray *)currentResult; + +//additional methods +- (void)setConnection:(CMMCPConnection *)theConnection; +- (void)setFavorites; +- (void)doPerformQueryService:(NSString *)query; + +//tableView datasource methods +- (int)numberOfRowsInTableView:(NSTableView *)aTableView; +- (id)tableView:(NSTableView *)aTableView + objectValueForTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex; +- (void)tableView:(NSTableView *)aTableView + setObjectValue:(id)anObject + forTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex; + +//tableView drag&drop datasource methods +- (BOOL)tableView:(NSTableView *)aTableView writeRows:(NSArray*)rows toPasteboard:(NSPasteboard*)pboard; +- (NSDragOperation)tableView:(NSTableView*)aTableView validateDrop:(id )info proposedRow:(int)row + proposedDropOperation:(NSTableViewDropOperation)operation; +- (BOOL)tableView:(NSTableView*)aTableView acceptDrop:(id )info row:(int)row dropOperation:(NSTableViewDropOperation)operation; + +//tableView delegate methods +- (BOOL)tableView:(NSTableView *)aTableView shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex; + +//splitView delegate methods +- (BOOL)splitView:(NSSplitView *)sender canCollapseSubview:(NSView *)subview; +- (float)splitView:(NSSplitView *)sender constrainMaxCoordinate:(float)proposedMax ofSubviewAt:(int)offset; +- (float)splitView:(NSSplitView *)sender constrainMinCoordinate:(float)proposedMin ofSubviewAt:(int)offset; + +//textView delegate methods +- (BOOL)textView:(NSTextView *)aTextView doCommandBySelector:(SEL)aSelector; + +//last but not least +- (id)init; +- (void)dealloc; + +@end diff --git a/trunk/CustomQuery.m b/trunk/CustomQuery.m new file mode 100644 index 00000000..70b305d6 --- /dev/null +++ b/trunk/CustomQuery.m @@ -0,0 +1,776 @@ +// +// CustomQuery.m +// sequel-pro +// +// Created by lorenz textor (lorenz@textor.ch) on Wed May 01 2002. +// Copyright (c) 2002-2003 Lorenz Textor. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at +// Or mail to + +#import "CustomQuery.h" +#import "TableDump.h" +#import + + +@implementation CustomQuery + +//IBAction methods +- (IBAction)performQuery:(id)sender; +/* +performs the mysql-query given by the user +sets the tableView columns corresponding to the mysql-result +*/ +{ + NSArray *theColumns; + NSTableColumn *theCol; + CMMCPResult *theResult = nil; + NSArray *queries; +// NSArray *theTypes; + NSMutableArray *menuItems = [NSMutableArray array]; + NSMutableArray *tempResult = [NSMutableArray array]; + NSMutableString *errors = [NSMutableString string]; + int i; + + //query started + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self]; + + //split queries by ;'s + queries = [tableDumpInstance splitQueries:[textView string]]; + +//perform queries + for ( i = 0 ; i < [queries count] ; i++ ) { + theResult = [mySQLConnection queryString:[queries objectAtIndex:i]]; + if ( ![[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) { + //query gave error + if ( [queries count] > 1 ) { + [errors appendString:[NSString stringWithFormat:NSLocalizedString(@"[ERROR in query %d] %@\n", @"error text when multiple custom query failed"), + i+1, + [mySQLConnection getLastErrorMessage]]]; + } else { + [errors setString:[mySQLConnection getLastErrorMessage]]; + } + } +// theTypes = [queryResult fetchTypesAsArray]; + } + + //perform empty query if no query is given + if ( [queries count] == 0 ) { + theResult = [mySQLConnection queryString:@""]; + [errors setString:[mySQLConnection getLastErrorMessage]]; + } + +//put result in array + [queryResult release]; + queryResult = nil; + if ( nil != theResult ) + { + int r = [theResult numOfRows]; + for ( i = 0 ; i < r ; i++ ) { + [theResult dataSeek:i]; + [tempResult addObject:[theResult fetchRowAsArray]]; + } + queryResult = [[NSArray arrayWithArray:tempResult] retain]; + } + +//add query to history + [queryHistoryButton insertItemWithTitle:[textView string] atIndex:1]; + while ( [queryHistoryButton numberOfItems] > 21 ) { + [queryHistoryButton removeItemAtIndex:[queryHistoryButton numberOfItems]-1]; + } + for ( i = 1 ; i < [queryHistoryButton numberOfItems] ; i++ ) + { + [menuItems addObject:[queryHistoryButton itemTitleAtIndex:i]]; + } + [prefs setObject:menuItems forKey:@"queryHistory"]; + +//select the text of the query textView and set standard font + [textView selectAll:self]; + if ( [errors length] ) { + [errorText setStringValue:errors]; + } else { + [errorText setStringValue:NSLocalizedString(@"There were no errors.", @"text shown when query was successfull")]; + } + if ( [mySQLConnection affectedRows] != -1 ) { + [affectedRowsText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%@ row(s) affected", @"text showing how many rows have been affected"), + [[NSNumber numberWithLongLong:[mySQLConnection affectedRows]] stringValue]]]; + } else { + [affectedRowsText setStringValue:@""]; + } + if ( [prefs boolForKey:@"useMonospacedFonts"] ) { + [textView setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]]; + } else { + [textView setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; + } + + if ( !theResult || ![theResult numOfRows] ) { +//no rows in result + //free tableView + theColumns = [customQueryView tableColumns]; + while ([theColumns count]) { + [customQueryView removeTableColumn:[theColumns objectAtIndex:0]]; + } +// theCol = [[NSTableColumn alloc] initWithIdentifier:@""]; +// [[theCol headerCell] setStringValue:@""]; +// [customQueryView addTableColumn:theCol]; +// [customQueryView sizeLastColumnToFit]; + [customQueryView reloadData]; +// [theCol release]; + + //query finished + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self]; + + // Query Finished Growl Notification + [GrowlApplicationBridge notifyWithTitle:@"Query Finished" + description:[NSString stringWithFormat:NSLocalizedString(@"%@",@"description for query finished growl notification"), [errorText stringValue]] + notificationName:@"Query Finished" + iconData:nil + priority:0 + isSticky:NO + clickContext:nil + ]; + + return; + } + +//set columns +//remove all columns + theColumns = [customQueryView tableColumns]; +// i=0; + while ([theColumns count]) { + [customQueryView removeTableColumn:[theColumns objectAtIndex:0]]; +// i++; + } + +//add columns, corresponding to the query result + theColumns = [theResult fetchFieldNames]; + for ( i = 0 ; i < [theResult numOfFields] ; i++) { + theCol = [[NSTableColumn alloc] initWithIdentifier:[NSNumber numberWithInt:i]]; +// theCol = [[NSTableColumn alloc] initWithIdentifier:[theColumns objectAtIndex:i]]; +// [theCol setEditable:NO]; + if ( [theCol respondsToSelector:@selector(setResizingMask:)] ) { + // os 10.4 + [theCol setResizingMask:NSTableColumnUserResizingMask]; + } else { + // os pre-10.4 + [theCol setResizable:YES]; + } + NSTextFieldCell *dataCell = [[[NSTextFieldCell alloc] initTextCell:@""] autorelease]; + [dataCell setEditable:NO]; + // [[theCol dataCell] setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; + if ( [prefs boolForKey:@"useMonospacedFonts"] ) { + [dataCell setFont:[NSFont fontWithName:@"Monaco" size:10]]; + } else { + [dataCell setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; + } + if ( [dataCell respondsToSelector:@selector(setLineBreakMode:)] ) { + // os 10.4 + [dataCell setLineBreakMode:NSLineBreakByTruncatingTail]; + } + [theCol setDataCell:dataCell]; +/* + if ([[theTypes objectAtIndex:i] isEqualToString:@"timestamp"]) { + [[theCol dataCell] setFormatter:[[NSDateFormatter alloc] + initWithDateFormat:@"%d/%m/%Y at %H:%M:%S" allowNaturalLanguage:YES]]; + } + if ([[theTypes objectAtIndex:i] isEqualToString:@"datetime"]) { + [[theCol dataCell] setFormatter:[[NSDateFormatter alloc] initWithDateFormat:@"%d/%m/%Y at %H:%M:%S" allowNaturalLanguage:YES]]; + } +*/ + [[theCol headerCell] setStringValue:[theColumns objectAtIndex:i]]; + + [customQueryView addTableColumn:theCol]; + [theCol release]; + } + + [customQueryView sizeLastColumnToFit]; + //tries to fix problem with last row (otherwise to small) + //sets last column to width of the first if smaller than 30 + //problem not fixed for resizing window +/* + if ( [[customQueryView tableColumnWithIdentifier:[theColumns objectAtIndex:[theColumns count]-1]] width] < 30 ) + [[customQueryView tableColumnWithIdentifier:[theColumns objectAtIndex:[theColumns count]-1]] + setWidth:[[customQueryView tableColumnWithIdentifier:[theColumns objectAtIndex:0]] width]]; +*/ + if ( [[customQueryView tableColumnWithIdentifier:[NSNumber numberWithInt:[theColumns count]-1]] width] < 30 ) + [[customQueryView tableColumnWithIdentifier:[NSNumber numberWithInt:[theColumns count]-1]] + setWidth:[[customQueryView tableColumnWithIdentifier:[NSNumber numberWithInt:0]] width]]; + [customQueryView reloadData]; + + //query finished + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self]; + + // Query Finished Growl Notification + [GrowlApplicationBridge notifyWithTitle:@"Query Finished" + description:[NSString stringWithFormat:NSLocalizedString(@"%@",@"description for query finished growl notification"), [errorText stringValue]] + notificationName:@"Query Finished" + iconData:nil + priority:0 + isSticky:NO + clickContext:nil + ]; +} + +- (IBAction)chooseQueryFavorite:(id)sender +/* +insert the choosen favorite query in the query textView or save query to favorites or opens window to edit favorites +*/ +{ + if ( [queryFavoritesButton indexOfSelectedItem] == 1) { +//save query to favorites + //check if favorite doesn't exist + NSEnumerator *enumerator = [queryFavorites objectEnumerator]; + id favorite; + while ( (favorite = [enumerator nextObject]) ) { + if ( [favorite isEqualToString:[textView string]] ) { + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, + NSLocalizedString(@"Query already exists in favorites.", @"message of panel when trying to save query which already exists in favorites")); + return; + } + } + if ( [[textView string] isEqualToString:@""] ) { + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, + NSLocalizedString(@"Query can't be empty.", @"message of panel when trying to save empty query")); + return; + } + [queryFavorites addObject:[NSString stringWithString:[textView string]]]; + [prefs setObject:queryFavorites forKey:@"queryFavorites"]; + [self setFavorites]; + } else if ( [queryFavoritesButton indexOfSelectedItem] == 2) { +//edit favorites + [NSApp beginSheet:queryFavoritesSheet + modalForWindow:tableWindow modalDelegate:self + didEndSelector:nil contextInfo:nil]; + [NSApp runModalForWindow:queryFavoritesSheet]; + + [NSApp endSheet:queryFavoritesSheet]; + [queryFavoritesSheet orderOut:nil]; + } else if ( [queryFavoritesButton indexOfSelectedItem] != 3) { +//choose favorite + [textView replaceCharactersInRange:[textView selectedRange] withString:[queryFavoritesButton titleOfSelectedItem]]; + } +} + +- (IBAction)chooseQueryHistory:(id)sender +/* +insert the choosen history query in the query textView +*/ +{ + [textView setString:[queryHistoryButton titleOfSelectedItem]]; + [textView selectAll:self]; +} + +- (IBAction)closeSheet:(id)sender +/* +closes the sheet +*/ +{ + [NSApp stopModal]; +} + + +//queryFavoritesSheet methods +- (IBAction)addQueryFavorite:(id)sender +/* +adds a query favorite +*/ +{ + int row = [queryFavoritesView editedRow]; + int column = [queryFavoritesView editedColumn]; + NSTableColumn *tableColumn; + NSCell *cell; + +//end editing + if ( row != -1 ) { + tableColumn = [[queryFavoritesView tableColumns] objectAtIndex:column]; + cell = [tableColumn dataCellForRow:row]; + [cell endEditing:[queryFavoritesView currentEditor]]; + } + + [queryFavorites addObject:[NSString string]]; + [queryFavoritesView reloadData]; + [queryFavoritesView selectRow:[queryFavoritesView numberOfRows]-1 byExtendingSelection:NO]; + [queryFavoritesView editColumn:0 row:[queryFavoritesView numberOfRows]-1 withEvent:nil select:YES]; +} + +- (IBAction)removeQueryFavorite:(id)sender +/* +removes a query favorite +*/ +{ + int row = [queryFavoritesView editedRow]; + int column = [queryFavoritesView editedColumn]; + NSTableColumn *tableColumn; + NSCell *cell; + +//end editing + if ( row != -1 ) { + tableColumn = [[queryFavoritesView tableColumns] objectAtIndex:column]; + cell = [tableColumn dataCellForRow:row]; + [cell endEditing:[queryFavoritesView currentEditor]]; + } + + if ( [queryFavoritesView numberOfSelectedRows] > 0 ) { + [queryFavorites removeObjectAtIndex:[queryFavoritesView selectedRow]]; + [queryFavoritesView reloadData]; + } +} + +- (IBAction)copyQueryFavorite:(id)sender +/* +copies a query favorite +*/ +{ + int row = [queryFavoritesView editedRow]; + int column = [queryFavoritesView editedColumn]; + NSTableColumn *tableColumn; + NSCell *cell; + +//end editing + if ( row != -1 ) { + tableColumn = [[queryFavoritesView tableColumns] objectAtIndex:column]; + cell = [tableColumn dataCellForRow:row]; + [cell endEditing:[queryFavoritesView currentEditor]]; + } + + if ( [queryFavoritesView numberOfSelectedRows] > 0 ) { + [queryFavorites insertObject: + [NSString stringWithString:[queryFavorites objectAtIndex:[queryFavoritesView selectedRow]]] + atIndex:[queryFavoritesView selectedRow]+1]; + [queryFavoritesView reloadData]; + [queryFavoritesView selectRow:[queryFavoritesView selectedRow]+1 byExtendingSelection:NO]; + [queryFavoritesView editColumn:0 row:[queryFavoritesView selectedRow] withEvent:nil select:YES]; + } +} + +- (IBAction)closeQueryFavoritesSheet:(id)sender +/* +closes queryFavoritesSheet and saves favorites to preferences +*/ +{ + int row = [queryFavoritesView editedRow]; + int column = [queryFavoritesView editedColumn]; + NSTableColumn *tableColumn; + NSCell *cell; + +//end editing + if ( row != -1 ) { + tableColumn = [[queryFavoritesView tableColumns] objectAtIndex:column]; + cell = [tableColumn dataCellForRow:row]; + [cell endEditing:[queryFavoritesView currentEditor]]; + } + + [NSApp stopModal]; + [prefs setObject:queryFavorites forKey:@"queryFavorites"]; + [self setFavorites]; +} + + +//getter methods +- (NSArray *)currentResult +/* +returns the current result (as shown in custom result view) as array, the first object containing the field names as array, the following objects containing the rows as array +*/ +{ + NSArray *tableColumns = [customQueryView tableColumns]; + NSEnumerator *enumerator = [tableColumns objectEnumerator]; + id tableColumn; + NSMutableArray *currentResult = [NSMutableArray array]; + NSMutableArray *tempRow = [NSMutableArray array]; + int i; + + //set field names as first line + while ( (tableColumn = [enumerator nextObject]) ) { + [tempRow addObject:[[tableColumn headerCell] stringValue]]; + } + [currentResult addObject:[NSArray arrayWithArray:tempRow]]; + + //add rows + for ( i = 0 ; i < [self numberOfRowsInTableView:customQueryView] ; i++) { + [tempRow removeAllObjects]; + enumerator = [tableColumns objectEnumerator]; + while ( (tableColumn = [enumerator nextObject]) ) { + [tempRow addObject:[self tableView:customQueryView objectValueForTableColumn:tableColumn row:i]]; + } + [currentResult addObject:[NSArray arrayWithArray:tempRow]]; + } + return currentResult; +} + + +//additional methods +- (void)setConnection:(CMMCPConnection *)theConnection +/* +sets the connection (received from TableDocument) and makes things that have to be done only once +*/ +{ + NSArray *tableColumns = [queryFavoritesView tableColumns]; + NSEnumerator *enumerator = [tableColumns objectEnumerator]; + id column; + + mySQLConnection = theConnection; + + prefs = [[NSUserDefaults standardUserDefaults] retain]; + if ( [prefs objectForKey:@"queryFavorites"] ) { + queryFavorites = [[NSMutableArray alloc] initWithArray:[prefs objectForKey:@"queryFavorites"]]; + } else { + queryFavorites = [[NSMutableArray array] retain]; + } + +//set up interface + [customQueryView setVerticalMotionCanBeginDrag:NO]; + if ( [prefs boolForKey:@"useMonospacedFonts"] ) { + [textView setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]]; + } else { + [textView setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; + } + [textView setContinuousSpellCheckingEnabled:NO]; + [queryFavoritesView registerForDraggedTypes:[NSArray arrayWithObjects:@"SequelProPasteboard", nil]]; + while ( (column = [enumerator nextObject]) ) + { + if ( [prefs boolForKey:@"useMonospacedFonts"] ) { + [[column dataCell] setFont:[NSFont fontWithName:@"Monaco" size:10]]; + } else { + [[column dataCell] setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; + } + } +// [queryFavoritesView reloadData]; + if ( [prefs objectForKey:@"queryHistory"] ) + { + [queryHistoryButton addItemsWithTitles:[prefs objectForKey:@"queryHistory"]]; + } + [self setFavorites]; +} + +- (void)setFavorites +/* +set up the favorites popUpButton +*/ +{ + int i; + +//remove all menuItems and add favorites from preferences + for ( i = 4 ; i < [queryFavoritesButton numberOfItems] ; i++ ) { + [queryFavoritesButton removeItemAtIndex:i]; + } + [queryFavoritesButton addItemsWithTitles:queryFavorites]; +} + +- (void)doPerformQueryService:(NSString *)query +/* +inserts the query in the textView and performs query +*/ +{ + [textView setString:query]; + [self performQuery:self]; +} + + +//tableView datasource methods +- (int)numberOfRowsInTableView:(NSTableView *)aTableView +{ + if ( aTableView == customQueryView ) { + if ( nil == queryResult ) { + return 0; + } else { + return [queryResult count]; + } + } else if ( aTableView == queryFavoritesView ) { + return [queryFavorites count]; + } else { + return 0; + } +} + +- (id)tableView:(NSTableView *)aTableView + objectValueForTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex +{ + NSArray *theRow; +// NSString *theIdentifier = [aTableColumn identifier]; + NSNumber *theIdentifier = [aTableColumn identifier]; + + if ( aTableView == customQueryView ) { + theRow = [queryResult objectAtIndex:rowIndex]; + + if ( [[theRow objectAtIndex:[theIdentifier intValue]] isKindOfClass:[NSData class]] ) { + NSString *tmp = [[NSString alloc] initWithData:[theRow objectAtIndex:[theIdentifier intValue]] + encoding:[mySQLConnection encoding]]; + return [tmp autorelease]; + } + if ( [[theRow objectAtIndex:[theIdentifier intValue]] isMemberOfClass:[NSNull class]] ) + return [prefs objectForKey:@"nullValue"]; + + return [theRow objectAtIndex:[theIdentifier intValue]]; + } else if ( aTableView == queryFavoritesView ) { + return [queryFavorites objectAtIndex:rowIndex]; + } else { + return @""; + } +} + +- (void)tableView:(NSTableView *)aTableView setObjectValue:(id)anObject + forTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex +{ + if ( aTableView == queryFavoritesView ) { + NSEnumerator *enumerator = [queryFavorites objectEnumerator]; + id favorite; + int i = 0; + + if ( [anObject isEqualToString:@""] ) { +// NSRunAlertPanel(@"Error", @"Query can't be empty.", @"OK", nil, nil); + //remove row +// if ( [[queryFavorites objectAtIndex:rowIndex] isEqualToString:@""] ) { + [queryFavoritesView deselectAll:self]; + [queryFavorites removeObjectAtIndex:rowIndex]; + [queryFavoritesView reloadData]; + return; + } + + while ( (favorite = [enumerator nextObject]) ) { + if ( [favorite isEqualToString:anObject] && i != rowIndex) { + NSRunAlertPanel(@"Error", @"Query already exists in favorites.", @"OK", nil, nil); + //remove row if it was a (blank) new row or a copied row + if ( [[queryFavorites objectAtIndex:rowIndex] isEqualToString:@""] || + [[queryFavorites objectAtIndex:rowIndex] isEqualToString:anObject] ) { + [queryFavoritesView deselectAll:self]; + [queryFavorites removeObjectAtIndex:rowIndex]; + [queryFavoritesView reloadData]; + } + return; + } + i++; + } + [queryFavorites replaceObjectAtIndex:rowIndex withObject:anObject]; + } +} + + +//tableView drag&drop datasource methods +- (BOOL)tableView:(NSTableView *)aTableView writeRows:(NSArray*)rows toPasteboard:(NSPasteboard*)pboard +{ + int originalRow; + NSArray *pboardTypes; + + if ( aTableView == queryFavoritesView ) + { + if ( [rows count] == 1 ) + { + pboardTypes = [NSArray arrayWithObjects:@"SequelProPasteboard", nil]; + originalRow = [[rows objectAtIndex:0] intValue]; + + [pboard declareTypes:pboardTypes owner:nil]; + [pboard setString:[[NSNumber numberWithInt:originalRow] stringValue] forType:@"SequelProPasteboard"]; + + return YES; + } + else + { + return NO; + } + } else if ( aTableView == customQueryView ) { + NSString *tmp = [customQueryView draggedRowsAsTabString:rows]; + if ( nil != tmp ) + { + [pboard declareTypes:[NSArray arrayWithObjects: NSTabularTextPboardType, + NSStringPboardType, nil] + owner:nil]; + [pboard setString:tmp forType:NSStringPboardType]; + [pboard setString:tmp forType:NSTabularTextPboardType]; + return YES; + } + return NO; + } else { + return NO; + } +} + +- (NSDragOperation)tableView:(NSTableView*)aTableView validateDrop:(id )info proposedRow:(int)row + proposedDropOperation:(NSTableViewDropOperation)operation +{ + NSArray *pboardTypes = [[info draggingPasteboard] types]; + int originalRow; + + if ( aTableView == queryFavoritesView ) { + if ([pboardTypes count] == 1 && row != -1) + { + if ([[pboardTypes objectAtIndex:0] isEqualToString:@"SequelProPasteboard"]==YES && operation==NSTableViewDropAbove) + { + originalRow = [[[info draggingPasteboard] stringForType:@"SequelProPasteboard"] intValue]; + + if (row != originalRow && row != (originalRow+1)) + { + return NSDragOperationMove; + } + } + } + return NSDragOperationNone; + } else { + return NSDragOperationNone; + } +} + +- (BOOL)tableView:(NSTableView*)aTableView acceptDrop:(id )info row:(int)row dropOperation:(NSTableViewDropOperation)operation +{ + int originalRow; + int destinationRow; + NSMutableDictionary *draggedRow; + + if ( aTableView == queryFavoritesView ) { + originalRow = [[[info draggingPasteboard] stringForType:@"SequelProPasteboard"] intValue]; + destinationRow = row; + + if ( destinationRow > originalRow ) + destinationRow--; + + draggedRow = [queryFavorites objectAtIndex:originalRow]; + [queryFavorites removeObjectAtIndex:originalRow]; + [queryFavorites insertObject:draggedRow atIndex:destinationRow]; + + [queryFavoritesView reloadData]; + [queryFavoritesView selectRow:destinationRow byExtendingSelection:NO]; + + return YES; + } else { + return NO; + } +} + + +//tableView delegate methods +- (BOOL)tableView:(NSTableView *)aTableView shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex +/* +opens sheet with value when double clicking on a field +*/ +{ + if ( aTableView == customQueryView ) { + NSArray *theRow; + NSString *theValue; + NSNumber *theIdentifier = [aTableColumn identifier]; + + //get the value + theRow = [queryResult objectAtIndex:rowIndex]; + + if ( [[theRow objectAtIndex:[theIdentifier intValue]] isKindOfClass:[NSData class]] ) { + theValue = [[NSString alloc] initWithData:[theRow objectAtIndex:[theIdentifier intValue]] + encoding:[mySQLConnection encoding]]; + [theValue autorelease]; + } else if ( [[theRow objectAtIndex:[theIdentifier intValue]] isMemberOfClass:[NSNull class]] ) { + theValue = [prefs objectForKey:@"nullValue"]; + } else { + theValue = [theRow objectAtIndex:[theIdentifier intValue]]; + } + + [valueTextField setString:[theValue description]]; + [valueTextField selectAll:self]; + [NSApp beginSheet:valueSheet + modalForWindow:tableWindow modalDelegate:self + didEndSelector:nil contextInfo:nil]; + [NSApp runModalForWindow:valueSheet]; + + [NSApp endSheet:valueSheet]; + [valueSheet orderOut:nil]; + + return NO; + } else { + return YES; + } +} + + +//splitView delegate methods +- (BOOL)splitView:(NSSplitView *)sender canCollapseSubview:(NSView *)subview +/* +tells the splitView that it can collapse views +*/ +{ + return YES; +} + +- (float)splitView:(NSSplitView *)sender constrainMaxCoordinate:(float)proposedMax ofSubviewAt:(int)offset +/* +defines max position of splitView +*/ +{ + if ( offset == 0 ) { + return proposedMax - 100; + } else { + return proposedMax - 73; + } +} + +- (float)splitView:(NSSplitView *)sender constrainMinCoordinate:(float)proposedMin ofSubviewAt:(int)offset +/* +defines min position of splitView +*/ +{ + if ( offset == 0 ) { + return proposedMin + 100; + } else { + return proposedMin + 100; + } +} + + +//textView delegate methods +- (BOOL)textView:(NSTextView *)aTextView doCommandBySelector:(SEL)aSelector +/* +traps enter key and + performs query instead of inserting a line break if aTextView == textView + closes valueSheet if aTextView == valueTextField +*/ +{ + if ( aTextView == textView ) { + if ( [aTextView methodForSelector:aSelector] == [aTextView methodForSelector:@selector(insertNewline:)] && + [[[NSApp currentEvent] characters] isEqualToString:@"\003"] ) + { + [self performQuery:self]; + return YES; + } else { + return NO; + } + } else if ( aTextView == valueTextField ) { + if ( [aTextView methodForSelector:aSelector] == [aTextView methodForSelector:@selector(insertNewline:)] ) + { + [self closeSheet:self]; + return YES; + } else { + return NO; + } + } + return NO; +} + + +//last but not least +- (id)init; +{ + self = [super init]; + return self; +} + +- (void)dealloc +{ + [queryResult release]; + [prefs release]; + [queryFavorites release]; + + [super dealloc]; +} + + +@end diff --git a/trunk/English.lproj/Credits.rtf b/trunk/English.lproj/Credits.rtf new file mode 100644 index 00000000..02985441 --- /dev/null +++ b/trunk/English.lproj/Credits.rtf @@ -0,0 +1,63 @@ +{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\vieww22120\viewh18020\viewkind0 +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural + +\f0\b\fs24 \cf0 Current Developers +\b0 \ +Abhi Beckert, {\field{\*\fldinst{HYPERLINK "http://www.abhibeckert.com"}}{\fldrslt http://www.abhibeckert.com}}\ +Matt Langtree, {\field{\*\fldinst{HYPERLINK "http://www.mattlangtree.com"}}{\fldrslt http://www.mattlangtree.com}}\ +Ben Perry, {\field{\*\fldinst{HYPERLINK "http://www.benperry.com.au"}}{\fldrslt http://www.benperry.com.au}}\ +\ + +\b Past Developers +\b0 \ +Lorenz Textor, lorenz@textor.ch\ +Jeff Skrysak\ +\ + +\b Additional Code +\b0 \ +Serge Cohen and\ +Bertrand Mansion\ +(SMySQL framework)\ +Tristan O'Tierney\ +Kotaro Funakoshi\ +David Buxton\ +Stuart B. Glenn\ +Jason Hallford\ +Carsten Bl\'fcm\ +Andrea Salomoni\ +\ + +\b Artwork +\b0 \ +Icon by Abhi Beckert, based heavily on an icon from the Crystal theme (http://www.everaldo.com/crystal/)\ +GUI design by Abhi Beckert, Matt Langtree and snowhouse (http://www.snowhouse.co.uk)\ +\ + +\b Additional Thanks +\b0 \ +City of Cairns.com (http://cityofcairns.com), for allowing Abhi and Matt to work on Sequel Pro when we'd otherwise be doing billable work.\ +\ + +\b GPL +\b0 \ +Copyright (C) 2002-2008 Lorenz Textor, Abhi Beckert, Matt Langtree, Ben Perry. All rights reserved.\ +\ +This program is free software; you can redistribute it and/or modify\ +it under the terms of the GNU General Public License as published by\ +the Free Software Foundation; either version 2 of the License, or\ +(at your option) any later version.\ +\ +This program is distributed in the hope that it will be useful,\ +but WITHOUT ANY WARRANTY; without even the implied warranty of\ +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\ +GNU General Public License for more details.\ +\ +You should have received a copy of the GNU General Public License along\ +with this program; if not, write to the Free Software Foundation, Inc.,\ +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\ +\ +http://www.gnu.org/licenses/old-licenses/gpl-2.0.html} \ No newline at end of file diff --git a/trunk/English.lproj/DBView.xib b/trunk/English.lproj/DBView.xib new file mode 100644 index 00000000..f9dffe44 --- /dev/null +++ b/trunk/English.lproj/DBView.xib @@ -0,0 +1,18248 @@ + + + + 1050 + 9F33 + 670 + 949.34 + 352.00 + + YES + + + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + YES + + TableDocument + + + FirstResponder + + + NSApplication + + + 15 + 2 + {{13, 329}, {845, 504}} + 1886912512 + Connecting... + NSWindow + View + {3.40282e+38, 3.40282e+38} + {780, 480} + + + 256 + + YES + + + 274 + + YES + + + 256 + + YES + + + 289 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{176, 6}, {8, 10}} + + YES + + 130560 + 33554432 + + NSImage + grabber-vertical + + 0 + 2 + 0 + YES + + YES + + + + 260 + {{-1, -2}, {28, 26}} + + YES + + 67239424 + 134348800 + add + + LucidaGrande + 1.100000e+01 + 3100 + + + -2033958657 + 34 + + NSImage + tableadd + + + + + + 200 + 25 + + + + + 260 + {{26, -2}, {28, 26}} + + YES + + 67239424 + 134348800 + - + + + -2033958657 + 34 + + NSImage + tabledelete + + + + 200 + 25 + + + + + 260 + {{80, -2}, {28, 26}} + + YES + + 67239424 + 134348800 + reload + + + -2033975041 + 34 + + NSImage + tablerefresh + + + + + + 200 + 25 + + + + + 260 + {{53, -2}, {28, 26}} + + YES + + 67239424 + 134348800 + cp + + + -2033958657 + 34 + + NSImage + tablecopy + + + + + + 200 + 25 + + + + + 290 + {{107, -2}, {83, 26}} + + YES + + -2080244224 + 134217728 + + + LucidaGrande + 1.300000e+01 + 1044 + + + 147603711 + 162 + + + 400 + 75 + + + + + 274 + + YES + + + 4370 + + YES + + + 2304 + + YES + + + 4352 + {189, 361} + + YES + + + -2147483392 + {{-26, 0}, {16, 17}} + + + YES + + tables + 1.858690e+02 + 4.286900e+01 + 1.000000e+03 + + 75628032 + 0 + Tables + + + 3 + MC4zMzMzMzI5OQA + + + 6 + System + headerTextColor + + 3 + MAA + + + + + 337772096 + 272761856 + Text Cell + + + YES + + 6 + System + controlColor + + 3 + MC42NjY2NjY2OQA + + + + 6 + System + controlTextColor + + + + 3 + YES + YES + + + + 3.000000e+00 + 2.000000e+00 + + 6 + System + _sourceListBackgroundColor + + 1 + MC44MzkyMTU3IDAuODY2NjY2NjcgMC44OTgwMzkyMgA + + + + 6 + System + gridColor + + 3 + MC41AA + + + 1.700000e+01 + 1514143744 + 2 + 15 + 0 + YES + 1 + + + {{1, 1}, {189, 361}} + + + + + 6 + System + controlBackgroundColor + + + 4 + + + + -2147483392 + {{175, 1}, {15, 481}} + + + _doScroller: + 9.979253e-01 + + + + 256 + {{-100, -100}, {141, 11}} + + 257 + + _doScroller: + 9.904762e-01 + + + {191, 363} + + + 530 + + + + QSAAAEEgAABBmAAAQZgAAA + + + + 4370 + + YES + + + 2304 + + YES + + + 4352 + {189, 112} + + YES + + + -2147483392 + {{-26, 0}, {16, 17}} + + + YES + + info + 1.858690e+02 + 4.286900e+01 + 1.000000e+03 + + 75628032 + 0 + Information + + + 3 + MC4zMzMzMzI5OQA + + + + + 337772096 + 272761856 + Text Cell + + + YES + + + + 3 + YES + YES + + + + 3.000000e+00 + 2.000000e+00 + + 6 + System + _sourceListBackgroundColor + + 1 + MC44MzkyMTU3IDAuODY2NjY2NjcgMC44OTgwMzkyMgA + + + + 1.700000e+01 + 1514143744 + 2 + 15 + 0 + YES + 1 + + + {{1, 1}, {189, 112}} + + + + + 4 + + + + -2147483392 + {{175, 1}, {15, 481}} + + + _doScroller: + 9.979253e-01 + + + + 256 + {{-100, -100}, {141, 11}} + + 257 + + _doScroller: + 9.904762e-01 + + + {{0, 372}, {191, 114}} + + + 530 + + + + QSAAAEEgAABBmAAAQZgAAA + + + {{0, 20}, {191, 486}} + + + + {189, 504} + + NSView + + + + 256 + + YES + + + 274 + {{-7, -10}, {659, 518}} + + + YES + + source + + + 256 + + YES + + + 274 + + YES + + + 256 + + YES + + + 289 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{595, 6}, {10, 13}} + + YES + + 130560 + 33554432 + + NSImage + grabber-horizontal + + 0 + 2 + 0 + YES + + YES + + + + 257 + {{387, 8}, {55, 11}} + + YES + + 67239424 + 4456448 + Table Type: + + LucidaGrande + 9.000000e+00 + 3614 + + + + + + + + + 257 + {{443, 6}, {135, 15}} + + YES + + -1539178944 + 263168 + + + 109199615 + 1 + + LucidaGrande + 9.000000e+00 + 16 + + + + + + + + 400 + 75 + + + -- + + 1048576 + 2147483647 + 1 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + _popUpItemAction: + + + YES + + + OtherViews + + + YES + + + + MyISAM + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + ISAM + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + InnoDB + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + BDB + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + 3 + YES + YES + 1 + + + + + 4370 + + YES + + + 2304 + + YES + + + 4352 + {612, 253} + + YES + + + 256 + {612, 17} + + + + + + -2147483392 + {{-26, 0}, {16, 17}} + + + + YES + + Field + 8.500000e+01 + 4.000000e+01 + 1.000000e+03 + + 75628032 + 0 + Field + + + + + + 337772096 + 133120 + Text Cell + + + + 6 + System + textBackgroundColor + + 3 + MQA + + + + + 3 + YES + YES + + + + Type + 5.400000e+01 + 1.000000e+01 + 1.000000e+03 + + 67239424 + 0 + Type + + + 6 + System + headerColor + + + + + + 337772096 + 133120 + Text Cell + + + + + 10 + YES + YES + + YES + tinyint + smallint + mediumint + int + bigint + float + double + decimal + -------- + date + datetime + timestamp + time + year + -------- + char + varchar + tinyblob + tinytext + blob + text + mediumblob + mediumtext + longblob + longtext + enum + set + + + + 274 + {13, 486} + + + YES + + YES + + + 1.000000e+01 + 1.000000e+01 + 1.000000e+03 + + 67239424 + 0 + + + + + + + 338820672 + 1024 + + + YES + + + + 3 + YES + + + + 3.000000e+00 + 2.000000e+00 + + + 1.600000e+01 + tableViewAction: + -228556800 + + + + 1 + 15 + 0 + YES + + NO + + 3 + YES + YES + + + + Length + 5.500000e+01 + 1.000000e+01 + 1.000000e+03 + + 67239424 + 0 + Length + + + + + + 337772096 + 133120 + Text Cell + + + + + + 3 + YES + YES + + + + unsigned + 5.500000e+01 + 1.000000e+01 + 1.000000e+03 + + 67239424 + 0 + Unsigned + + + + + + 67239424 + 131072 + + + LucidaGrande + 1.200000e+01 + 16 + + + 1211912703 + 2 + + NSImage + NSSwitch + + + NSSwitch + + + + 400 + 75 + + 3 + YES + YES + + + + zerofill + 5.500000e+01 + 1.000000e+01 + 1.000000e+03 + + 67239424 + 0 + Zerofill + + + + + + 67239424 + 131072 + + + + 1211912703 + 2 + + + + + 400 + 75 + + 3 + YES + YES + + + + binary + 5.500000e+01 + 1.000000e+01 + 1.000000e+03 + + 67239424 + 0 + Binary + + + + + + 67239424 + 131072 + + + + 1211912703 + 2 + + + + + 400 + 75 + + 3 + YES + YES + + + + Null + 5.500000e+01 + 1.000000e+01 + 1.000000e+03 + + 67239424 + 0 + Null + + + + + + 337772097 + 133120 + Text Cell + + + + + 2 + YES + YES + + YES + YES + NO + + + + 274 + {13, 36} + + + YES + + YES + + + 1.000000e+01 + 1.000000e+01 + 1.000000e+03 + + 67239424 + 0 + + + + + + + 337772096 + 2048 + + + + + + 3 + YES + + + + 3.000000e+00 + 2.000000e+00 + + + 1.600000e+01 + tableViewAction: + -228556800 + + + + 1 + 15 + 0 + YES + + NO + + 3 + YES + YES + + + + Key + 5.400000e+01 + 1.000000e+01 + 1.000000e+03 + + 67239424 + 0 + Key + + + + + + 67239488 + 133120 + Text Cell + + + + + + 3 + YES + + + + Default + 4.300000e+01 + 1.000000e+01 + 1.000000e+03 + + 67239424 + 0 + Default + + + + + + 337772096 + 133120 + Text Cell + + + + + + 3 + YES + YES + + + + Extra + 7.139795e+01 + 3.139795e+01 + 1.000000e+03 + + 67239424 + 0 + Extra + + + + + + 337772097 + 133120 + Text Cell + + + + + 3 + YES + YES + + YES + None + auto_increment + on update CURRENT_TIMESTAMP + + + + 274 + {13, 54} + + + YES + + YES + + + 1.000000e+01 + 1.000000e+01 + 1.000000e+03 + + 67239424 + 0 + + + + + + + 338820672 + 1024 + + + YES + + + + 3 + YES + + + + 3.000000e+00 + 2.000000e+00 + + + 1.600000e+01 + tableViewAction: + -228556800 + + + + 1 + 15 + 0 + YES + + NO + + 3 + YES + YES + + + + 3.000000e+00 + 2.000000e+00 + + + 1.600000e+01 + -222265344 + 1 + 15 + 0 + YES + + + {{1, 17}, {612, 253}} + + + + + 4 + + + + -2147483392 + {{598, 17}, {15, 238}} + + + _doScroller: + 8.170732e-01 + + + + -2147483392 + {{1, 255}, {597, 15}} + + 1 + + _doScroller: + 9.951220e-01 + + + + 2304 + + YES + + + {{1, 0}, {612, 17}} + + + + + 4 + + + + {{-1, 24}, {614, 271}} + + + 562 + + + + + + QSAAAEEgAABBkAAAQZAAAA + + + + 290 + {{107, 0}, {506, 26}} + + YES + + -2080244224 + 134217728 + + + + 147603711 + 162 + + + 400 + 75 + + + + + 260 + {{-1, 0}, {28, 26}} + + YES + + 604110336 + 134348800 + add + + + -2033958657 + 402653218 + + NSImage + columnadd + + + a + 200 + 25 + + + + + 260 + {{26, 0}, {28, 26}} + + YES + + 604110336 + 134348800 + remove + + + -2033958657 + 34 + + NSImage + columndelete + + + fw + 200 + 25 + + + + + 260 + {{53, 0}, {28, 26}} + + YES + + 604110336 + 134348800 + cp + + + -2033958657 + 268435490 + + NSImage + columncopy + + + d + 200 + 25 + + + + + 260 + {{80, 0}, {28, 26}} + + YES + + 67239424 + 134348800 + reload + + + -2033975041 + 268435490 + + NSImage + columnrefresh + + + r + 200 + 25 + + + + {613, 295} + + NSView + + + + 256 + + YES + + + 264 + {{7, 167}, {46, 14}} + + YES + + 67239424 + 4194304 + Indexes + + + + + + + + + 4370 + + YES + + + 2304 + + YES + + + 4352 + {612, 121} + + YES + + + 256 + {612, 17} + + + + + + -2147483392 + {{-26, 0}, {16, 17}} + + + + YES + + Non_unique + 6.900000e+01 + 4.000000e+01 + 1.000000e+03 + + 75628032 + 0 + Non_unique + + + + + + 67239488 + 133120 + Text Cell + + + + + + 3 + YES + + + + Key_name + 5.900000e+01 + 4.000000e+01 + 1.000000e+03 + + 75628032 + 0 + Key_name + + + + + + 67239488 + 133120 + Text Cell + + + + + + 3 + YES + + + + Seq_in_index + 7.200000e+01 + 1.000000e+01 + 1.000000e+03 + + 67239424 + 0 + Seq_in_index + + + + + + 67239488 + 133120 + Text Cell + + + + + + 3 + YES + + + + Column_name + 7.900000e+01 + 1.000000e+01 + 1.000000e+03 + + 67239424 + 0 + Column_name + + + + + + 67239488 + 133120 + Text Cell + + + + + + 3 + YES + + + + Collation + 5.000000e+01 + 1.000000e+01 + 1.000000e+03 + + 67239424 + 0 + Collation + + + + + + 67239488 + 133120 + Text Cell + + + + + + 3 + YES + + + + Cardinality + 6.200000e+01 + 1.000000e+01 + 1.000000e+03 + + 67239424 + 0 + Cardinality + + + + + + 67239488 + 133120 + Text Cell + + + + + + 3 + YES + + + + Sub_part + 5.000000e+01 + 1.000000e+01 + 1.000000e+03 + + 67239424 + 0 + Sub_part + + + + + + 67239488 + 133120 + Text Cell + + + + + + 3 + YES + + + + Packed + 4.200000e+01 + 1.000000e+01 + 1.000000e+03 + + 67239424 + 0 + Packed + + + + + + 67239488 + 133120 + Text Cell + + + + + + 3 + YES + + + + Comment + 1.019760e+02 + 5.597600e+01 + 1.000000e+03 + + 67239424 + 0 + Comment + + + + + + 67239488 + 133120 + Text Cell + + + + + + 3 + YES + + + + 3.000000e+00 + 2.000000e+00 + + + 1.300000e+01 + -222298112 + 4 + 15 + 0 + YES + + + {{1, 17}, {612, 121}} + + + + + 4 + + + + -2147483392 + {{84, 17}, {15, 67}} + + + _doScroller: + 8.170732e-01 + + + + -2147483392 + {{1, 123}, {612, 15}} + + 1 + + _doScroller: + 1.749117e-01 + + + + 2304 + + YES + + + {{1, 0}, {612, 17}} + + + + + 4 + + + + {{-1, 22}, {614, 139}} + + + 562 + + + + + + QSAAAEEgAABBcAAAQXAAAA + + + + 258 + {{80, -2}, {533, 26}} + + YES + + -2080244224 + 134217728 + + + + 147603711 + 162 + + + 400 + 75 + + + + + 260 + {{-1, -2}, {28, 26}} + + YES + + 604110336 + 134348800 + add + + + -2033958657 + 34 + + NSImage + indexadd + + + + 200 + 25 + + + + + 260 + {{26, -2}, {28, 26}} + + YES + + 604110336 + 134348800 + remove + + + -2033958657 + 34 + + NSImage + indexdelete + + + + 200 + 25 + + + + + 260 + {{53, -2}, {28, 26}} + + YES + + 67239424 + 134348800 + reload + + + -2033975041 + 268435490 + + + r + 200 + 25 + + + + {{0, 304}, {613, 181}} + + NSView + + + {{7, 10}, {613, 485}} + + + + {{10, 7}, {624, 498}} + + + Structure + + + + + content + + + 256 + + YES + + + 4370 + + YES + + + 2304 + + YES + + + 4352 + {612, 408} + + YES + + + 256 + {612, 17} + + + + + + -2147483392 + {{-26, 0}, {16, 17}} + + + + YES + + 6.090000e+02 + 8.000000e+00 + 1.000000e+03 + + 75628032 + 0 + + + + + + + 338820672 + 1024 + Text Cell + + + + + + 3 + YES + YES + + + + 3.000000e+00 + 2.000000e+00 + + + 1.600000e+01 + 1522532352 + 2 + 15 + 0 + YES + + + {{1, 17}, {612, 408}} + + + + + 2 + + + + -2147483392 + {{598, 17}, {15, 393}} + + + _doScroller: + 7.028754e-01 + + + + -2147483392 + {{1, 410}, {597, 15}} + + 1 + + _doScroller: + 9.904762e-01 + + + + 2304 + + YES + + + {{1, 0}, {612, 17}} + + + + + 4 + + + + {{6, 32}, {614, 426}} + + + 562 + + + + + + QSAAAEEgAABBkAAAQZAAAA + + + + 292 + {{6, 8}, {28, 26}} + + YES + + 604110336 + 134348800 + add + + + -2033958657 + 402653218 + + NSImage + rowadd + + + a + 200 + 25 + + + + + 292 + {{33, 8}, {28, 26}} + + YES + + 604110336 + 134348800 + remove + + + -2033958657 + 34 + + NSImage + rowdelete + + + fw + 200 + 25 + + + + + 265 + {{51, 466}, {136, 20}} + + YES + + -1539178944 + 1024 + + LucidaGrande + 1.100000e+01 + 16 + + + -2038284033 + 36 + + + + + + 400 + 75 + + + field + + 1048576 + 2147483647 + 1 + + + _popUpItemAction: + + + YES + + + OtherViews + + + YES + + + + -1 + 3 + YES + YES + 1 + + + + + 265 + {{197, 466}, {86, 20}} + + YES + + -1539178944 + 1024 + + + -2038284033 + 36 + + + + + + 400 + 75 + + + is + + 1048576 + 2147483647 + 1 + + + _popUpItemAction: + + + YES + + + OtherViews + + + YES + + + + 3 + YES + YES + 1 + + + + + 292 + {{87, 8}, {28, 26}} + + YES + + 67239424 + 134348800 + reload + + + -2033975041 + 268435490 + + NSImage + rowrefresh + + + r + 200 + 25 + + + + + 292 + {{114, 8}, {28, 26}} + + YES + + 67239424 + 134217728 + + + + -2032926465 + 34 + + NSImage + tabletosheet + + + NSImage + sheettotable + + + + + + 200 + 25 + + + + + 292 + {{60, 8}, {28, 26}} + + YES + + 604110336 + 134348800 + + + + -2033434369 + 268435490 + + NSImage + rowcopy + + + d + 200 + 25 + + + + + 265 + {{291, 467}, {176, 19}} + + YES + + 879885888 + 268567552 + + + + YES + 1 + + + + 537001472 + 0 + search + _searchFieldSearch: + + + 138690815 + 0 + + 400 + 75 + + + 537001472 + 0 + clear + + YES + + YES + + YES + AXDescription + NSAccessibilityEncodedAttributesValueType + + + YES + cancel + + + + + _searchFieldCancel: + + + 138690815 + 0 + + 400 + 75 + + 255 + CAAAAA + + + + + 290 + {{141, 8}, {479, 26}} + + YES + + -2080244224 + 134217728 + + + + 147603711 + 162 + + + 400 + 75 + + + + + 265 + {{542, 467}, {40, 19}} + + YES + + -1267597759 + -1874721792 + + + + + YES + + YES + allowsFloats + formatterBehavior + + + YES + + + + + # + # + + + + + + + + + + NaN + + YES + + YES + + + YES + + + + + 0 + 0 + YES + NO + 1 + AAAAAAAAAAAAAAAAAAAAAA + + + + 3 + YES + YES + YES + + . + , + NO + YES + NO + + 0 + + YES + + + 6 + System + textColor + + + + + + + 265 + {{3, 469}, {43, 14}} + + YES + + 67239488 + 272761856 + Search: + + + + + + + + + 265 + {{472, 469}, {65, 14}} + + YES + + 67239488 + 272761856 + Limit From: + + + + + + + + + 290 + {{150, 2}, {465, 26}} + + YES + + 67239424 + 4194304 + + + + + + + + + + 1289 + + {{600, 467}, {16, 16}} + + 28938 + 1.000000e+02 + + + {{10, 7}, {624, 498}} + + Content + + + + + customQuery + + + 256 + + YES + + + 274 + + YES + + + 274 + + YES + + + 4370 + + YES + + + 2304 + + YES + + + 6418 + {612, 14} + + + + + + + + + + + YES + + + 6 + + + + 6.120000e+02 + 1 + + + 12259 + + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + 6 + System + selectedTextBackgroundColor + + + + 6 + System + selectedTextColor + + + + + + + + + 6 + {1226, 1e+07} + {98, 0} + + + + {{1, 1}, {612, 114}} + + + + + + {4, -5} + 1 + + 4 + + + + -2147483392 + {{598, 1}, {15, 68}} + + + _doScroller: + 1.000000e+00 + + + + 256 + {{-100, -100}, {601, 11}} + + 257 + + _doScroller: + 1.000000e+00 + 9.456522e-01 + + + {{0, 27}, {614, 116}} + + + 530 + + + + + + + 257 + {{509, -5}, {90, 28}} + + YES + + 67239424 + 134348800 + Run Query + + + -2034876161 + 1 + + + DQ + 200 + 25 + + + + + 290 + {{264, -2}, {245, 22}} + + YES + + -2076049856 + 132096 + + + -2038284033 + 1 + + + + + + 400 + 75 + + + YES + Select query from history... + + 1048576 + 2147483647 + + + _popUpItemAction: + + + YES + + + OtherViews + + + YES + + + + YES + 3 + YES + YES + 1 + + + + + 288 + {{17, -2}, {245, 22}} + + YES + + -2076049856 + 132096 + + + -2038284033 + 1 + + + + + + 400 + 75 + + + YES + Select query from favorites... + + 1048576 + 2147483647 + + + _popUpItemAction: + + + YES + + + OtherViews + + + YES + + + + Save query to favorites... + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + Edit favorites... + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + YES + YES + + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + YES + 3 + YES + YES + 1 + + + + {614, 142} + + NSView + + + + 274 + + YES + + + 4370 + + YES + + + 2304 + + YES + + + 4352 + {612, 227} + + YES + + + 256 + {612, 17} + + + + + + -2147483392 + {{-26, 0}, {16, 17}} + + + + YES + + 6.090000e+02 + 4.000000e+01 + 1.000000e+03 + + 75628032 + 0 + + + + + + + 70385217 + 132096 + Text Cell + + + + + + 3 + YES + + + + 3.000000e+00 + 2.000000e+00 + + + 1.300000e+01 + -88080384 + 4 + 15 + 0 + YES + + + {{1, 17}, {612, 227}} + + + + + 4 + + + + -2147483392 + {{598, 17}, {15, 212}} + + + _doScroller: + 9.800000e-01 + + + + -2147483392 + {{1, 229}, {597, 15}} + + 1 + + _doScroller: + 9.904762e-01 + + + + 2304 + + YES + + + {{1, 0}, {612, 17}} + + + + + 4 + + + + {614, 245} + + + 562 + + + + + + QSAAAEEgAABBcAAAQXAAAA + + + {{0, 151}, {614, 245}} + + NSView + + + + 256 + + YES + + + 266 + {{242, 59}, {355, 14}} + + YES + + 67239424 + 71303168 + + + + + + + + + + 264 + {{17, 59}, {143, 14}} + + YES + + 67239424 + 4194304 + Last Error Message + + LucidaGrande-Bold + 1.100000e+01 + 16 + + + + + + + + + 274 + {{17, 20}, {580, 35}} + + YES + + 67239424 + 4194304 + + + + + + + + + {{0, 405}, {614, 79}} + + NSView + + + {{6, 10}, {614, 484}} + + + + {{10, 7}, {624, 498}} + + Custom Query + + + + + status + + + 256 + + YES + + + 266 + + YES + + + 256 + + YES + + + 256 + {{17, 42}, {253, 13}} + + YES + + 67239424 + 4194304 + Data: -- + + LucidaGrande + 1.000000e+01 + 2843 + + + + + + + + + 256 + {{17, 20}, {253, 13}} + + YES + + 67239424 + 4194304 + Max Data: -- + + + + + + + + + 258 + {{272, 42}, {274, 13}} + + YES + + 67239424 + 4194304 + Index: -- + + + + + + + + + 258 + {{272, 20}, {274, 13}} + + YES + + 67239424 + 4194304 + Free: -- + + + + + + + + {{2, 2}, {566, 75}} + + + + {{27, 153}, {570, 92}} + + {0, 0} + + 67239424 + 0 + Sizes + + + + 3 + MCAwLjgwMDAwMDAxAA + + + + 3 + 0 + 2 + NO + + + + 266 + + YES + + + 256 + + YES + + + 256 + {{17, 42}, {253, 13}} + + YES + + 67239424 + 4194304 + TmFtZTogLS0KA + + + + + + + + + 256 + {{17, 20}, {253, 13}} + + YES + + 67239424 + 4194304 + Type: -- + + + + + + + + + 258 + {{272, 42}, {274, 13}} + + YES + + 67239424 + 4194304 + Created At: -- + + + + + + + + + 258 + {{272, 20}, {274, 13}} + + YES + + 67239424 + 4194304 + Updated At: -- + + + + + + + + {{2, 2}, {566, 75}} + + + + {{27, 370}, {570, 92}} + + {0, 0} + + 67239424 + 0 + Table + + + + 3 + MCAwLjgwMDAwMDAxAA + + + + 3 + 0 + 2 + NO + + + + 274 + + YES + + + 256 + + YES + + + 274 + {{17, 20}, {529, 53}} + + YES + + 67239424 + 4194304 + -- + + + + + + + + {{2, 2}, {566, 93}} + + + + {{27, 27}, {570, 110}} + + {0, 0} + + 67239424 + 0 + Comments + + + + 3 + MCAwLjgwMDAwMDAxAA + + + + 3 + 0 + 2 + NO + + + + 266 + + YES + + + 256 + + YES + + + 256 + {{17, 42}, {253, 13}} + + YES + + 67239424 + 4194304 + Number Of: -- + + + + + + + + + 256 + {{17, 20}, {253, 13}} + + YES + + 67239424 + 4194304 + Format: -- + + + + + + + + + 258 + {{272, 42}, {274, 13}} + + YES + + 67239424 + 4194304 + Avg. Length: -- + + + + + + + + + 258 + {{272, 20}, {274, 13}} + + YES + + 67239424 + 4194304 + Auto Increment: -- + + + + + + + + {{2, 2}, {566, 75}} + + + + {{27, 262}, {570, 92}} + + {0, 0} + + 67239424 + 0 + Rows + + + + 3 + MCAwLjgwMDAwMDAxAA + + + + 3 + 0 + 2 + NO + + + {{10, 7}, {624, 498}} + + Status + + + + + + + 134217731 + YES + YES + + YES + + + + + {{198, 0}, {647, 504}} + + NSView + + + {845, 504} + + YES + DBViewSplitter + + + {845, 504} + + + {{0, 0}, {1440, 878}} + {780, 502} + {3.40282e+38, 3.40282e+38} + DBView + + + TableContent + + + 1 + 2 + {{469, 447}, {519, 335}} + 1886914560 + connectSheet + NSWindow + + View + + {3.40282e+38, 3.40282e+38} + {256, 191} + + + 256 + + YES + + + 256 + {{408, 12}, {92, 32}} + + YES + + 67239424 + 134217728 + Connect + + + -2038284033 + 1 + + LucidaGrande + 1.300000e+01 + 16 + + + DQ + 200 + 25 + + + + + 256 + {{326, 12}, {82, 32}} + + YES + + 67239424 + 134217728 + Cancel + + + -2038284033 + 1 + + + Gw + 200 + 25 + + + + + 1280 + + {{48, 22}, {16, 16}} + + 28938 + 1.000000e+02 + + + + 268 + {{71, 290}, {97, 21}} + + YES + + 67239488 + 272630784 + Sequel Pro + + LucidaGrande-Bold + 1.700000e+01 + 16 + + + + + + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{15, 275}, {48, 48}} + + YES + + 130560 + 33554432 + + NSImage + logo-48 + + 0 + 3 + 0 + NO + + YES + + + + 292 + {{13, 16}, {25, 25}} + + YES + + 67239424 + 134217728 + + + + -2038415105 + 33 + + + 200 + 25 + + + + + -2147483356 + {{69, 22}, {76, 14}} + + YES + + 67239488 + 272761856 + Q29ubmVjdGluZ+KApg + + + + + + + + + 292 + + YES + + + 256 + + YES + + + 256 + {{320, 166}, {185, 18}} + + YES + + -1804468671 + 4326400 + + + + YES + + + + + + + 256 + {{287, 34}, {29, 17}} + + YES + + 67239424 + 4194304 + Port: + + + + + + + + + 256 + {{284, 164}, {33, 17}} + + YES + + 67239424 + 4194304 + Host: + + + + + + + + + 256 + {{320, 36}, {185, 18}} + + YES + + -1804468671 + 4326400 + + + 3306 + + YES + + + + + + + 256 + {{259, 86}, {57, 17}} + + YES + + 67239424 + 4194304 + Database: + + + + + + + + + 256 + {{285, 141}, {32, 17}} + + YES + + 67239424 + 4194304 + User: + + + + + + + + + 256 + {{320, 114}, {185, 18}} + + YES + + -1804468671 + 4326400 + + + + YES + + + + + + + 256 + {{320, 88}, {185, 18}} + + YES + + -1804468671 + 4326400 + + + optional + + YES + + + + + + + 256 + {{320, 140}, {185, 18}} + + YES + + -1804468671 + 4326400 + + + + YES + + + + + + + 256 + {{320, 62}, {185, 18}} + + YES + + -1804468671 + 4326400 + + + optional + + YES + + + + + + + 256 + {{273, 60}, {43, 17}} + + YES + + 67239424 + 4194304 + Socket: + + + + + + + + + 4364 + + YES + + + 2304 + + YES + + + 4352 + {213, 157} + + YES + + + 256 + {213, 17} + + + + + + -2147483392 + {{-26, 0}, {16, 17}} + + + + YES + + favorites + 2.100000e+02 + 4.000000e+01 + 1.000000e+03 + + 75628032 + 0 + Favorites + + + 3 + MC4zMzMzMzI5OQA + + + + + 337772096 + 133120 + Text Cell + + + + + + 3 + YES + YES + + + + 3.000000e+00 + 2.000000e+00 + + + 1.400000e+01 + -759169024 + 4 + 15 + 0 + YES + + + {{1, 17}, {213, 157}} + + + + + 4 + + + + -2147483392 + {{199, 17}, {15, 162}} + + + _doScroller: + 9.943503e-01 + + + + -2147483392 + {{1, 179}, {198, 15}} + + 1 + + _doScroller: + 9.953271e-01 + + + + 2304 + + YES + + + {{1, 0}, {213, 17}} + + + + + 4 + + + + {{12, 34}, {215, 175}} + + + 562 + + + + + + QSAAAEEgAABBgAAAQYAAAA + + + + 256 + {{259, 112}, {58, 17}} + + YES + + 67239424 + 4194304 + Password: + + + + + + + + + 268 + {{269, 192}, {236, 17}} + + YES + + 67239488 + 272630784 + Enter the connection details below + + LucidaGrande-Bold + 1.300000e+01 + 16 + + + + + + + + + 268 + {{12, 13}, {28, 23}} + + YES + + -2080244224 + 134217728 + + + + -2033434369 + 162 + + NSImage + NSAddTemplate + + + + 400 + 75 + + + + + 268 + {{39, 13}, {28, 23}} + + YES + + -2080244224 + 134217728 + + + + -2033434369 + 162 + + NSImage + NSRemoveTemplate + + + + 400 + 75 + + + + + 268 + {{66, 13}, {161, 23}} + + YES + + -2080244224 + 134217728 + + + + 147603711 + 162 + + + 400 + 75 + + + + {{1, 1}, {523, 220}} + + + + {{-3, 44}, {525, 222}} + + {0, 0} + + 67239424 + 0 + Box + + + + 3 + MCAwLjgwMDAwMDAxAA + + + + 1 + 0 + 0 + NO + + + {519, 335} + + + {{0, 0}, {1440, 878}} + {256, 213} + {3.40282e+38, 3.40282e+38} + + + TablesList + + + TableSource + + + CustomQuery + + + 1 + 2 + {{512, 379}, {262, 139}} + 1886912512 + indexSheet + NSWindow + + View + + {3.40282e+38, 3.40282e+38} + {213, 107} + + + 256 + + YES + + + 256 + {{17, 98}, {128, 22}} + + YES + + -2076049856 + 132096 + + + -2038284033 + 1 + + + + + + 400 + 75 + + + PRIMARY KEY + + 1048576 + 2147483647 + 1 + + + _popUpItemAction: + + + YES + + + OtherViews + + + YES + + + + INDEX + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + UNIQUE + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + FULLTEXT + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + 3 + YES + YES + 1 + + + + + 256 + {{20, 76}, {122, 19}} + + YES + + -1267597759 + 4326400 + PRIMARY + + + YES + + + + + + + 256 + {{147, 77}, {58, 14}} + + YES + + 67239424 + 4194304 + Key Name + + + + + + + + + 256 + {{147, 103}, {53, 14}} + + YES + + 67239424 + 4194304 + Key Type + + + + + + + + + 256 + {{20, 48}, {125, 22}} + + YES + + 343014976 + 132096 + + + + + + YES + + + 5 + YES + YES + + + + 274 + {15, 0} + + + YES + + YES + + + 1.200000e+01 + 1.000000e+01 + 1.000000e+03 + + 75628032 + 0 + + + + + + + 338820672 + 1024 + + + YES + + + + 3 + YES + + + + 3.000000e+00 + 2.000000e+00 + + + 1.600000e+01 + tableViewAction: + -767524864 + + + + 1 + 15 + 0 + YES + + + + + + 256 + {{147, 53}, {98, 14}} + + YES + + 67239424 + 4194304 + Indexed Columns + + + + + + + + + 256 + {{167, 13}, {80, 28}} + + YES + + 67239424 + 138018816 + Add + + + -2038284033 + 1 + + Helvetica + 1.100000e+01 + 16 + + + DQ + 200 + 25 + + + + + 256 + {{89, 13}, {80, 28}} + + YES + + 67239424 + 138018816 + Cancel + + + -2038284033 + 1 + + + Gw + 200 + 25 + + + + {{1, 9}, {262, 139}} + + {{0, 0}, {1440, 878}} + {213, 129} + {3.40282e+38, 3.40282e+38} + + + TableDump + + + 1 + 2 + {{351, 522}, {306, 122}} + 1886912512 + keySheet + NSWindow + + View + + {3.40282e+38, 3.40282e+38} + {213, 107} + + + 256 + + YES + + + 256 + {{17, 74}, {272, 28}} + + YES + + 67239424 + 4194304 + RmllbGQgbXVzdCBiZSBpbmRleGVkIHRvIHN1cHBvcnQgYXV0b19pbmNyZW1lbnQuCldoaWNoIGluZGV4 +IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 + + + + + + + + + 256 + {{74, 45}, {162, 22}} + + YES + + -2076049856 + 132096 + + + -2038284033 + 1 + + + + + + 400 + 75 + + + PRIMARY KEY + + 1048576 + 2147483647 + 1 + + + _popUpItemAction: + + + YES + + + OtherViews + + + YES + + + + INDEX + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + UNIQUE + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + FULLTEXT + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + 3 + YES + YES + 1 + + + + + 256 + {{154, 17}, {84, 28}} + + 1 + YES + + 67239424 + 138018816 + Add + + 1 + + -2038284033 + 1 + + + DQ + 200 + 25 + + + + + 256 + {{72, 17}, {84, 28}} + + YES + + 67239424 + 138018816 + RG9uJ3QgYWRkA + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + {{1, 9}, {306, 122}} + + {{0, 0}, {1440, 878}} + {213, 129} + {3.40282e+38, 3.40282e+38} + + + 1 + 2 + {{356, 461}, {262, 127}} + 1886912512 + copyTableSheet + NSWindow + + View + + {3.40282e+38, 3.40282e+38} + {213, 107} + + + 256 + + YES + + + 256 + {{17, 93}, {149, 14}} + + YES + + 67239424 + 4194304 + Duplicate table to + + + + + + + + + 256 + {{20, 67}, {222, 18}} + + YES + + -1804468671 + 4326400 + + + + YES + + + + + + + 256 + {{19, 43}, {189, 18}} + + YES + + 67239424 + 131072 + Duplicate table content + + + 1211912703 + 2 + + + + 200 + 25 + + + + + 256 + {{167, 13}, {80, 28}} + + 1 + YES + + 67239424 + 138018816 + Duplicate + + 1 + + -2038284033 + 1 + + + DQ + 200 + 25 + + + + + 256 + {{89, 13}, {80, 28}} + + YES + + 67239424 + 138018816 + Cancel + + + -2038284033 + 1 + + + Gw + 200 + 25 + + + + {{1, 9}, {262, 127}} + + {{0, 0}, {1440, 878}} + {213, 129} + {3.40282e+38, 3.40282e+38} + + + 1 + 2 + {{343, 483}, {220, 112}} + 1886912512 + databaseSheet + NSWindow + + View + + {256, 191} + {162.05, 5} + + + 256 + + YES + + + 256 + {{17, 78}, {88, 14}} + + YES + + 67239424 + 4194304 + Database Name + + + + + + + + + 256 + {{20, 52}, {180, 18}} + + YES + + -1804468671 + 4326400 + + + + YES + + + + + + + 256 + {{135, 13}, {70, 28}} + + 1 + YES + + 67239424 + 138018816 + Add + + 1 + + -2038284033 + 1 + + + DQ + 200 + 25 + + + + + 256 + {{67, 13}, {70, 28}} + + YES + + 67239424 + 138018816 + Cancel + + + -2038284033 + 1 + + + Gw + 200 + 25 + + + + {{1, 9}, {220, 112}} + + {{0, 0}, {1440, 878}} + {162.05, 27} + {256, 213} + + + 9 + 2 + {{115, 380}, {667, 425}} + 1886912512 + editSheet + NSWindow + + View + + {3.40282e+38, 3.40282e+38} + {350, 200} + + + 256 + + YES + + + 257 + {{576, 13}, {76, 28}} + + 1 + YES + + 67239424 + 138018816 + OK + + 1 + + -2038284033 + 1 + + + DQ + 200 + 25 + + + + + 257 + {{502, 13}, {76, 28}} + + YES + + 67239424 + 134348800 + Cancel + + + -2038284033 + 1 + + + Gw + 200 + 25 + + + + + 274 + {{10, 32}, {647, 373}} + + + YES + + + 1 + + + + 256 + + YES + + + 274 + + YES + + + 2304 + + YES + + + 2322 + {574, 14} + + + + + + + + + + + YES + + + 6 + + + + 5.740000e+02 + 1 + + + 12259 + + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + + + + + + YES + + YES + NSColor + NSCursor + NSUnderline + + + YES + + 1 + MCAwIDEAA + + + {8, -8} + 13 + + + + + + + 6 + {1161, 1e+07} + {87, 0} + + + + {{1, 1}, {574, 293}} + + + + + + 4 + + + + 256 + {{575, 1}, {11, 293}} + + 256 + + _doScroller: + 6.016427e-01 + + + + 256 + {{-100, -100}, {87, 18}} + + 257 + + _doScroller: + 1.000000e+00 + 9.456522e-01 + + + {{20, 20}, {587, 295}} + + + 18 + + + + + + {{10, 25}, {627, 335}} + + + Text + + + + + + 2 + + + + 256 + + YES + + + 274 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{17, 17}, {593, 301}} + + YES + + 270663168 + 0 + 0 + 0 + 2 + NO + + YES + + + {{10, 25}, {627, 335}} + + Image + + + + + 3 + + + 256 + + YES + + + 274 + + YES + + + 2304 + + YES + + + 2322 + + YES + + YES + Apple HTML pasteboard type + Apple PDF pasteboard type + Apple PICT pasteboard type + CorePasteboardFlavorType 0x6D6F6F76 + NSColor pasteboard type + NSFilenamesPboardType + NSStringPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT RTFD pasteboard type + NeXT Rich Text Format v1.0 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {574, 14} + + + + + + + + + + + YES + + + 6 + + + + 5.740000e+02 + 1 + + + 2917 + + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + + + + + + + + 6 + {1161, 1e+07} + {87, 0} + + + + {{1, 1}, {574, 293}} + + + + + + 4 + + + + 256 + {{575, 1}, {11, 293}} + + 256 + + _doScroller: + 7.128954e-01 + + + + 256 + {{-100, -100}, {87, 18}} + + 257 + + _doScroller: + 1.000000e+00 + 9.456522e-01 + + + {{20, 20}, {587, 295}} + + + 18 + + + + + + {{10, 25}, {627, 335}} + + Hex + + + + + + + 134217728 + YES + YES + + YES + + + + + + 256 + {{89, 13}, {76, 28}} + + YES + + 67239424 + 134348800 + Save... + + + -2038284033 + 268435457 + + + s + 200 + 25 + + + + + 256 + {{15, 13}, {76, 28}} + + YES + + 67239424 + 134348800 + Open... + + + -2038284033 + 268435457 + + + o + 200 + 25 + + + + {{1, 9}, {667, 425}} + + {{0, 0}, {1440, 878}} + {350, 222} + {3.40282e+38, 3.40282e+38} + + + KeyChain + + + 9 + 2 + {{221, 567}, {381, 247}} + 1886912512 + valueSheet + NSWindow + + View + + {3.40282e+38, 3.40282e+38} + {213, 107} + + + 256 + + YES + + + 274 + + YES + + + 2304 + + YES + + + 2322 + {328, 14} + + + + + + + + + + + YES + + + 6 + + + + 3.280000e+02 + 1 + + + 3045 + + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + + + + + + + + 6 + {669, 1e+07} + {87, 0} + + + + {{1, 1}, {328, 180}} + + + + + + 4 + + + + 256 + {{329, 1}, {11, 180}} + + 256 + + _doScroller: + 6.896552e-01 + + + + 256 + {{-100, -100}, {87, 18}} + + 257 + + _doScroller: + 1.000000e+00 + 9.456522e-01 + + + {{20, 45}, {341, 182}} + + + 18 + + + + + + + 257 + {{290, 13}, {76, 28}} + + 1 + YES + + 67239424 + 138018816 + Close + + 1 + + -2038284033 + 1 + + + DQ + 200 + 25 + + + + {381, 247} + + {{0, 0}, {1440, 878}} + {213, 129} + {3.40282e+38, 3.40282e+38} + + + 15 + 2 + {{363, 524}, {418, 191}} + 1886912512 + Query favorites + NSWindow + + View + + {3.40282e+38, 3.40282e+38} + {213, 107} + + + 256 + + YES + + + 257 + {{340, 12}, {28, 30}} + + YES + + 67239424 + 134348800 + Remove + + + 113524991 + 2 + + NSImage + querydelete + + + fw + 200 + 25 + + + + + 274 + + YES + + + 2304 + + YES + + + 256 + {365, 94} + + YES + + + 256 + {365, 17} + + + + + + 256 + {{366, 0}, {12, 17}} + + + + YES + + name + 3.623290e+02 + 8.932900e+01 + 1.000000e+03 + + 75628032 + 0 + Query favorites + + + 3 + MC4zMzMzMzI5OQA + + + + + 338820672 + 1024 + Text Cell + + + + + + 3 + YES + YES + + + + 3.000000e+00 + 2.000000e+00 + + + 1.300000e+01 + -767557632 + 4 + 15 + 0 + YES + + + {{1, 17}, {365, 94}} + + + + + 4 + + + + 256 + {{366, 17}, {11, 94}} + + 256 + + _doScroller: + 6.266667e-01 + + + + 256 + {{1, 111}, {365, 11}} + + 257 + + _doScroller: + 9.565217e-01 + + + + 2304 + + YES + + + {{1, 0}, {365, 17}} + + + + + 4 + + + + {{20, 48}, {378, 123}} + + + 50 + + + + + + QSAAAEEgAABBcAAAQXAAAA + + + + 257 + {{308, 12}, {28, 30}} + + YES + + 67239424 + 134348800 + Copy + + + 113524991 + 2 + + NSImage + querycopy + + + fw + 200 + 25 + + + + + 257 + {{372, 12}, {28, 30}} + + YES + + 67239424 + 134348800 + Add + + + 113524991 + 2 + + NSImage + queryadd + + + + 200 + 25 + + + + + 256 + {{15, 13}, {72, 28}} + + YES + + 67239424 + 138018816 + Close + + + -2038284033 + 1 + + + DQ + 200 + 25 + + + + {418, 191} + + {{0, 0}, {1440, 878}} + {213, 129} + {3.40282e+38, 3.40282e+38} + + + + 256 + + YES + + + 256 + {{77, 55}, {102, 14}} + + YES + + 67239424 + 4194304 + Fields enclosed by + + + + + + + + + 256 + {{77, 80}, {113, 14}} + + YES + + 67239424 + 4194304 + Fields terminated by + + + + + + + + + 257 + {{237, 50}, {54, 22}} + + YES + + 343014977 + 132096 + \n + + + YES + + + 3 + YES + + YES + \n + \r\n + \r + + + + + 274 + {13, 54} + + + YES + + YES + + + 1.000000e+01 + 1.000000e+01 + 1.000000e+03 + + 75628032 + 0 + + + + + + 3 + MC4zMzMzMzI5OQA + + + + + 338820672 + 1024 + + + YES + + + + 3 + YES + + + + 3.000000e+00 + 2.000000e+00 + + + 1.600000e+01 + tableViewAction: + -765427712 + + + + 1 + 15 + 0 + YES + + + + + + 257 + {{294, 55}, {113, 14}} + + YES + + 67239424 + 4194304 + Lines terminated by + + + + + + + + + 257 + {{237, 75}, {54, 22}} + + YES + + 343014977 + 132096 + \ + + + YES + + + 2 + YES + + YES + \ + Ig + + + + + 274 + {13, 36} + + + YES + + YES + + + 1.000000e+01 + 1.000000e+01 + 1.000000e+03 + + 75628032 + 0 + + + + + + 3 + MC4zMzMzMzI5OQA + + + + + 338820672 + 1024 + + + YES + + + + 3 + YES + + + + 3.000000e+00 + 2.000000e+00 + + + 1.600000e+01 + tableViewAction: + -765427712 + + + + 1 + 15 + 0 + YES + + + + + + 257 + {{294, 80}, {102, 14}} + + YES + + 67239424 + 4194304 + Fields escaped by + + + + + + + + + 256 + {{20, 75}, {54, 22}} + + YES + + 343014977 + 132096 + , + + + YES + + + 3 + YES + + YES + , + ; + \t + + + + + 274 + {13, 54} + + + YES + + YES + + + 1.000000e+01 + 1.000000e+01 + 1.000000e+03 + + 75628032 + 0 + + + + + + 3 + MC4zMzMzMzI5OQA + + + + + 338820672 + 1024 + + + YES + + + + 3 + YES + + + + 3.000000e+00 + 2.000000e+00 + + + 1.600000e+01 + tableViewAction: + -765427712 + + + + 1 + 15 + 0 + YES + + + + + + 256 + {{20, 50}, {54, 22}} + + YES + + 343014977 + 132096 + Ig + + + YES + + + 2 + YES + + YES + Ig + + + + + + 274 + {13, 36} + + + YES + + YES + + + 1.000000e+01 + 1.000000e+01 + 1.000000e+03 + + 75628032 + 0 + + + + + + 3 + MC4zMzMzMzI5OQA + + + + + 338820672 + 1024 + + + YES + + + + 3 + YES + + + + 3.000000e+00 + 2.000000e+00 + + + 1.600000e+01 + tableViewAction: + -765427712 + + + + 1 + 15 + 0 + YES + + + + + + 256 + {{19, 18}, {172, 18}} + + YES + + -2080244224 + 131072 + Put fields names at first row + + + 1211912703 + 2 + + + + 200 + 25 + + + + {424, 116} + NSView + NSResponder + + + + {200, 572} + {100, 80} + {2000, 1000} + 1 + 0.000000e+00 + 0.000000e+00 + + + + + + 256 + + YES + + + 274 + + YES + + + 2304 + + YES + + + 2322 + + YES + + YES + Apple HTML pasteboard type + Apple PDF pasteboard type + Apple PICT pasteboard type + CorePasteboardFlavorType 0x6D6F6F76 + NSColor pasteboard type + NSFilenamesPboardType + NSStringPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT RTFD pasteboard type + NeXT Rich Text Format v1.0 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {747, 14} + + + + + + + + + + + YES + + + 6 + + + + 7.470000e+02 + 1 + + + 3041 + + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + + + + + + + + 6 + {1507, 1e+07} + {87, 0} + + + + {{1, 1}, {747, 54}} + + + + + + 4 + + + + 256 + {{748, 1}, {11, 54}} + + 256 + + _doScroller: + 1.000000e+00 + + + + 256 + {{-100, -100}, {87, 18}} + + 257 + + _doScroller: + 1.000000e+00 + 9.456522e-01 + + + {{20, 20}, {760, 56}} + + + 18 + + + + + + {800, 96} + NSView + NSResponder + + + 15 + 2 + {{386, 508}, {411, 341}} + 1886912512 + Variables + NSWindow + + View + + {3.40282e+38, 3.40282e+38} + {300, 200} + + + 256 + + YES + + + 274 + + YES + + + 2304 + + YES + + + 256 + {358, 247} + + YES + + + 256 + {358, 17} + + + + + + 256 + {{359, 0}, {12, 17}} + + + + YES + + Variable_name + 1.760000e+02 + 4.000000e+01 + 1.000000e+03 + + 75628032 + 0 + Variable_name + + + 3 + MC4zMzMzMzI5OQA + + + + + 338820672 + 1024 + Text Cell + + + + + + 3 + YES + + + + Value + 1.760000e+02 + 4.000000e+01 + 1.000000e+03 + + 75628032 + 0 + Value + + + + + + 338820672 + 1024 + Text Cell + + + + + + 3 + YES + + + + 3.000000e+00 + 2.000000e+00 + + + 1.300000e+01 + 1514176512 + 1 + 15 + 0 + YES + + + {{1, 17}, {358, 247}} + + + + + 4 + + + + 256 + {{359, 17}, {11, 247}} + + 256 + + _doScroller: + 7.736842e-01 + + + + 256 + {{1, 264}, {358, 11}} + + 257 + + _doScroller: + 9.972145e-01 + + + + 2304 + + YES + + + {{1, 0}, {358, 17}} + + + + + 4 + + + + {{20, 45}, {371, 276}} + + + 50 + + + + + + QSAAAEEgAABBcAAAQXAAAA + + + + 257 + {{320, 13}, {76, 28}} + + YES + + 67239424 + 138018816 + Close + + + -2038284033 + 1 + + + DQ + 200 + 25 + + + + {411, 341} + + {{0, 0}, {1440, 878}} + {300, 222} + {3.40282e+38, 3.40282e+38} + + + + 256 + + YES + + + 274 + + YES + + + 2304 + + YES + + + 256 + {198, 107} + + YES + + + 256 + {{223, 0}, {16, 17}} + + + YES + + switch + 1.500000e+01 + 1.500000e+01 + 1.000000e+03 + + 75628032 + 0 + + + + 3 + MC4zMzMzMzI5OQA + + + + + 338820672 + 1024 + + + + + + YES + + + + tables + 1.770000e+02 + 4.000000e+01 + 1.000000e+03 + + 75628032 + 0 + + + + + + + 338820672 + 1024 + + + + + + 3 + YES + + + + 3.000000e+00 + 2.000000e+00 + + + 1.500000e+01 + 306184192 + 4 + 15 + 0 + YES + + + {{1, 1}, {198, 107}} + + + + + 4 + + + + 256 + {{199, 1}, {11, 107}} + + 256 + + _doScroller: + 6.294118e-01 + + + + 256 + {{-100, -100}, {227, 11}} + + 257 + + _doScroller: + 9.904762e-01 + + + {{20, 20}, {211, 109}} + + + 18 + + + + QSAAAEEgAABBiAAAQYgAAA + + + + 265 + {{237, 102}, {26, 28}} + + YES + + 67239424 + 134348800 + reload + + + 113508607 + 2 + + + + + + 200 + 25 + + + + + 257 + {{237, 45}, {26, 28}} + + 1 + YES + + 67239424 + 134348800 + select all + + 1 + + 116670719 + 2 + + NSImage + selectall + + + + 200 + 25 + + + + + 257 + {{237, 15}, {26, 28}} + + YES + + 67239424 + 134348800 + select nothing + + + 113524991 + 2 + + NSImage + selectnone + + + + 200 + 25 + + + + + 265 + {{288, 52}, {151, 18}} + + YES + + 67239424 + 131072 + Add errors to dump-file + + + 1211912703 + 2 + + + + 200 + 25 + + + + + 265 + {{288, 72}, {118, 18}} + + YES + + -2080244224 + 131072 + Add table content + + + 1211912703 + 2 + + + + 200 + 25 + + + + + 265 + {{288, 92}, {110, 18}} + + YES + + -2080244224 + 131072 + Add create table + + + 1211912703 + 2 + + + + 200 + 25 + + + + + 265 + {{288, 112}, {151, 18}} + + YES + + 67239424 + 131072 + Add drop table + + + 1211912703 + 2 + + + + 200 + 25 + + + + {457, 149} + NSView + NSResponder + + + 9 + 2 + {{467, 379}, {405, 267}} + 1886912512 + errorSheet + NSWindow + + View + + {3.40282e+38, 3.40282e+38} + {213, 107} + + + 256 + + YES + + + 264 + {{20, 233}, {140, 14}} + + YES + + 67239424 + 4194304 + There have been errors! + + + + + + + + + 274 + + YES + + + 2304 + + YES + + + 2322 + {352, 14} + + + + + + + + + + + YES + + + 6 + + + + 3.520000e+02 + 1 + + + 2913 + + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + + + + + + + + 6 + {717, 1e+07} + {64, 0} + + + + {{1, 1}, {352, 178}} + + + + + + 4 + + + + 256 + {{353, 1}, {11, 178}} + + 256 + + _doScroller: + 1.000000e+00 + + + + 256 + {{-100, -100}, {87, 18}} + + 257 + + _doScroller: + 1.000000e+00 + 9.456522e-01 + + + {{20, 45}, {365, 180}} + + + 18 + + + + + + + 257 + {{314, 13}, {76, 28}} + + YES + + 67239424 + 138018816 + Close + + + -2038284033 + 1 + + + DQ + 200 + 25 + + + + {{1, 9}, {405, 267}} + + {{0, 0}, {1440, 878}} + {213, 129} + {3.40282e+38, 3.40282e+38} + + + 1 + 2 + {{461, 588}, {375, 72}} + 1886912512 + singleProgressSheet + NSWindow + + View + + {3.40282e+38, 3.40282e+38} + {213, 50} + + + 256 + + YES + + + 1280 + + {{19, 40}, {337, 12}} + + 16652 + 1.000000e+02 + + + + 256 + {{17, 20}, {341, 14}} + + YES + + 67239424 + 4194304 + + + + + + + + + {{1, 9}, {375, 72}} + + {{0, 0}, {1440, 878}} + {213, 72} + {3.40282e+38, 3.40282e+38} + + + + 256 + + YES + + + 256 + {{20, 50}, {54, 22}} + + YES + + 343014977 + 132096 + Ig + + + YES + + + 2 + YES + + YES + Ig + + + + + + 274 + {13, 36} + + + YES + + YES + + + 1.000000e+01 + 1.000000e+01 + 1.000000e+03 + + 75628032 + 0 + + + + + + 3 + MC4zMzMzMzI5OQA + + + + + 338820672 + 1024 + + + YES + + + + 3 + YES + + + + 3.000000e+00 + 2.000000e+00 + + + 1.600000e+01 + tableViewAction: + -765427712 + + + + 1 + 15 + 0 + YES + + + + + + 256 + {{77, 55}, {102, 14}} + + YES + + 67239424 + 4194304 + Fields enclosed by + + + + + + + + + 257 + {{237, 75}, {54, 22}} + + YES + + 343014977 + 132096 + \ + + + YES + + + 2 + YES + + YES + \ + Ig + + + + + 274 + {13, 36} + + + YES + + YES + + + 1.000000e+01 + 1.000000e+01 + 1.000000e+03 + + 75628032 + 0 + + + + + + 3 + MC4zMzMzMzI5OQA + + + + + 338820672 + 1024 + + + YES + + + + 3 + YES + + + + 3.000000e+00 + 2.000000e+00 + + + 1.600000e+01 + tableViewAction: + -765427712 + + + + 1 + 15 + 0 + YES + + + + + + 257 + {{294, 80}, {102, 14}} + + YES + + 67239424 + 4194304 + Fields escaped by + + + + + + + + + 257 + {{237, 50}, {54, 22}} + + YES + + 343014977 + 132096 + \n + + + YES + + + 3 + YES + + YES + \n + \r\n + \r + + + + + 274 + {13, 54} + + + YES + + YES + + + 1.000000e+01 + 1.000000e+01 + 1.000000e+03 + + 75628032 + 0 + + + + + + 3 + MC4zMzMzMzI5OQA + + + + + 338820672 + 1024 + + + YES + + + + 3 + YES + + + + 3.000000e+00 + 2.000000e+00 + + + 1.600000e+01 + tableViewAction: + -765427712 + + + + 1 + 15 + 0 + YES + + + + + + 257 + {{294, 55}, {113, 14}} + + YES + + 67239424 + 4194304 + Lines terminated by + + + + + + + + + 256 + {{20, 75}, {54, 22}} + + YES + + 343014977 + 132096 + , + + + YES + + + 3 + YES + + YES + , + ; + \t + + + + + 274 + {13, 54} + + + YES + + YES + + + 1.000000e+01 + 1.000000e+01 + 1.000000e+03 + + 75628032 + 0 + + + + + + 3 + MC4zMzMzMzI5OQA + + + + + 338820672 + 1024 + + + YES + + + + 3 + YES + + + + 3.000000e+00 + 2.000000e+00 + + + 1.600000e+01 + tableViewAction: + -765427712 + + + + 1 + 15 + 0 + YES + + + + + + 256 + {{77, 80}, {113, 14}} + + YES + + 67239424 + 4194304 + Fields terminated by + + + + + + + + + 256 + {{17, 18}, {188, 18}} + + YES + + -2080244224 + 131072 + First line contains fields names + + + 1211912703 + 2 + + + + 200 + 25 + + + + {424, 116} + + NSView + + NSResponder + + + + 256 + + YES + + + 257 + {{291, 65}, {54, 22}} + + YES + + 343014977 + 132096 + \ + + + YES + + + 2 + YES + + YES + \ + Ig + + + + + 274 + {13, 36} + + + YES + + YES + + + 1.000000e+01 + 1.000000e+01 + 1.000000e+03 + + 75628032 + 0 + + + + + + 3 + MC4zMzMzMzI5OQA + + + + + 338820672 + 1024 + + + YES + + + + 3 + YES + + + + 3.000000e+00 + 2.000000e+00 + + + 1.600000e+01 + tableViewAction: + -765427712 + + + + 1 + 15 + 0 + YES + + + + + + 257 + {{288, 18}, {172, 18}} + + YES + + -2080244224 + 131072 + Put fields names at first row + + + 1211912703 + 2 + + + + 200 + 25 + + + + + 256 + {{348, 95}, {102, 14}} + + YES + + 67239424 + 4194304 + Fields enclosed by + + + + + + + + + 257 + {{348, 70}, {102, 14}} + + YES + + 67239424 + 4194304 + Fields escaped by + + + + + + + + + 256 + {{348, 120}, {113, 14}} + + YES + + 67239424 + 4194304 + Fields terminated by + + + + + + + + + 257 + {{291, 40}, {54, 22}} + + YES + + 343014977 + 132096 + \n + + + YES + + + 3 + YES + + YES + \n + \r\n + \r + + + + + 274 + {13, 54} + + + YES + + YES + + + 1.000000e+01 + 1.000000e+01 + 1.000000e+03 + + 75628032 + 0 + + + + + + 3 + MC4zMzMzMzI5OQA + + + + + 338820672 + 1024 + + + YES + + + + 3 + YES + + + + 3.000000e+00 + 2.000000e+00 + + + 1.600000e+01 + tableViewAction: + -765427712 + + + + 1 + 15 + 0 + YES + + + + + + 257 + {{348, 45}, {113, 14}} + + YES + + 67239424 + 4194304 + Lines terminated by + + + + + + + + + 256 + {{291, 90}, {54, 22}} + + YES + + 343014977 + 132096 + Ig + + + YES + + + 2 + YES + + YES + Ig + + + + + + 274 + {13, 36} + + + YES + + YES + + + 1.000000e+01 + 1.000000e+01 + 1.000000e+03 + + 75628032 + 0 + + + + + + 3 + MC4zMzMzMzI5OQA + + + + + 338820672 + 1024 + + + YES + + + + 3 + YES + + + + 3.000000e+00 + 2.000000e+00 + + + 1.600000e+01 + tableViewAction: + -765427712 + + + + 1 + 15 + 0 + YES + + + + + + 256 + {{291, 115}, {54, 22}} + + YES + + 343014977 + 132096 + , + + + YES + + + 3 + YES + + YES + , + ; + \t + + + + + 274 + {13, 54} + + + YES + + YES + + + 1.000000e+01 + 1.000000e+01 + 1.000000e+03 + + 75628032 + 0 + + + + + + 3 + MC4zMzMzMzI5OQA + + + + + 338820672 + 1024 + + + YES + + + + 3 + YES + + + + 3.000000e+00 + 2.000000e+00 + + + 1.600000e+01 + tableViewAction: + -765427712 + + + + 1 + 15 + 0 + YES + + + + + + 257 + {{237, 46}, {26, 28}} + + 1 + YES + + 67239424 + 134348800 + select all + + 1 + + 116670719 + 2 + + + + 200 + 25 + + + + + 265 + {{237, 110}, {26, 28}} + + YES + + 67239424 + 134348800 + reload + + + 113508607 + 2 + + + + + + 200 + 25 + + + + + 257 + {{237, 16}, {26, 28}} + + YES + + 67239424 + 134348800 + select nothing + + + 113524991 + 2 + + + + 200 + 25 + + + + + 274 + + YES + + + 2304 + + YES + + + 256 + {198, 115} + + YES + + + 256 + {{223, 0}, {16, 17}} + + + YES + + switch + 1.500000e+01 + 1.500000e+01 + 1.000000e+03 + + 75628032 + 0 + + + + 3 + MC4zMzMzMzI5OQA + + + + + 338820672 + 1024 + + + + + + YES + + + + tables + 1.770000e+02 + 4.000000e+01 + 1.000000e+03 + + 75628032 + 0 + + + + + + + 338820672 + 1024 + + + + + + 3 + YES + + + + 3.000000e+00 + 2.000000e+00 + + + 1.500000e+01 + 306184192 + 4 + 15 + 0 + YES + + + {{1, 1}, {198, 115}} + + + + + 4 + + + + 256 + {{199, 1}, {11, 115}} + + 256 + + _doScroller: + 6.764706e-01 + + + + 256 + {{-100, -100}, {227, 11}} + + 257 + + _doScroller: + 9.904762e-01 + + + {{20, 20}, {211, 117}} + + + 18 + + + + QSAAAEEgAABBiAAAQYgAAA + + + {478, 157} + + NSView + + NSResponder + + + + 256 + + YES + + + 257 + {{237, 46}, {26, 28}} + + 1 + YES + + 67239424 + 134348800 + select all + + 1 + + 116670719 + 2 + + + + 200 + 25 + + + + + 257 + {{237, 16}, {26, 28}} + + YES + + 67239424 + 134348800 + select nothing + + + 113524991 + 2 + + + + 200 + 25 + + + + + 265 + {{237, 110}, {26, 28}} + + YES + + 67239424 + 134348800 + reload + + + 113508607 + 2 + + + + + + 200 + 25 + + + + + 274 + + YES + + + 2304 + + YES + + + 256 + {198, 115} + + YES + + + 256 + {{223, 0}, {16, 17}} + + + YES + + switch + 1.500000e+01 + 1.500000e+01 + 1.000000e+03 + + 75628032 + 0 + + + + 3 + MC4zMzMzMzI5OQA + + + + + 338820672 + 1024 + + + + + + YES + + + + tables + 1.770000e+02 + 4.000000e+01 + 1.000000e+03 + + 75628032 + 0 + + + + + + + 338820672 + 1024 + + + + + + 3 + YES + + + + 3.000000e+00 + 2.000000e+00 + + + 1.500000e+01 + 306184192 + 4 + 15 + 0 + YES + + + {{1, 1}, {198, 115}} + + + + + 4 + + + + 256 + {{199, 1}, {11, 115}} + + 256 + + _doScroller: + 6.764706e-01 + + + + 256 + {{-100, -100}, {227, 11}} + + 257 + + _doScroller: + 9.904762e-01 + + + {{20, 20}, {211, 117}} + + + 18 + + + + QSAAAEEgAABBiAAAQYgAAA + + + {281, 157} + + NSView + + NSResponder + + + 15 + 2 + {{262, 482}, {432, 282}} + 1886912512 + fieldMappingSheet + NSWindow + + View + + {3.40282e+38, 3.40282e+38} + {350, 250} + + + 256 + + YES + + + 274 + + YES + + + 2304 + + YES + + + 256 + {379, 193} + + YES + + + 256 + {{346, 0}, {12, 17}} + + + YES + + 0 + 1.880000e+02 + 1.500000e+01 + 1.000000e+03 + + 75628032 + 0 + + + + 3 + MC4zMzMzMzI5OQA + + + + + 338820672 + 1024 + Text Cell + + + + + + 3 + YES + + + + 1 + 1.850000e+02 + 4.000000e+01 + 1.000000e+03 + + 75628032 + 0 + + + + + + + 338820672 + 1024 + Text Cell + + + + + + 3 + YES + YES + + + + 3.000000e+00 + 2.000000e+00 + + + 2.000000e+01 + 1379958784 + 1 + 15 + 0 + YES + + + {{1, 1}, {379, 193}} + + + + + 4 + + + + 256 + {{380, 1}, {11, 193}} + + 256 + + _doScroller: + 8.772727e-01 + + + + 256 + {{-100, -100}, {227, 11}} + + 257 + + _doScroller: + 9.904762e-01 + + + {{20, 45}, {392, 195}} + + + 18 + + + + QSAAAEEgAABBsAAAQbAAAA + + + + 264 + {{20, 248}, {263, 14}} + + YES + + 67239424 + 4194304 + Please choose field mapping + + LucidaGrande-Bold + 1.000000e+01 + 16 + + + + + + + + + 257 + {{267, 13}, {76, 28}} + + YES + + 67239424 + 138018816 + Cancel + + + -2038284033 + 1 + + + Gw + 200 + 25 + + + + + 257 + {{341, 13}, {76, 28}} + + 1 + YES + + 67239424 + 138018816 + Import + + 1 + + -2038284033 + 1 + + + DQ + 200 + 25 + + + + + 256 + {{18, 10}, {32, 29}} + + YES + + 604110336 + 134217728 + PA + + LucidaGrande + 1.000000e+01 + 16 + + + -2038021889 + 2 + + + + 400 + 75 + + + + + 256 + {{54, 10}, {32, 29}} + + 1 + YES + + 67239424 + 134217728 + Pg + + 1 + + -2038021889 + 2 + + + + 400 + 75 + + + + {432, 282} + + {{0, 0}, {1440, 878}} + {350, 272} + {3.40282e+38, 3.40282e+38} + + + TableStatus + + + YES + + + + YES + name + host + + YES + YES + + YES + YES + YES + YES + YES + + + 8223 + 2 + {{196, 160}, {588, 350}} + -469762048 + Create Table Syntax + NSPanel + + {3.40282e+38, 3.40282e+38} + + + 256 + + YES + + + 274 + + YES + + + 2304 + + YES + + + 2322 + {588, 72} + + + + + + Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum Et harumd und lookum like Greek to me, dereud facilis est er expedit distinct. Nam liber te conscient to factor tum poen legum odioque civiuda + + + YES + + YES + + YES + NSColor + NSFont + NSParagraphStyle + + + YES + + 1 + MCAwIDAAA + + + + 3 + + YES + + 0.000000e+00 + + + 5.600000e+01 + + + 1.120000e+02 + + + 1.680000e+02 + + + 2.240000e+02 + + + 2.800000e+02 + + + 3.360000e+02 + + + 3.920000e+02 + + + 4.480000e+02 + + + 5.040000e+02 + + + 5.600000e+02 + + + 6.160000e+02 + + + 6.720000e+02 + + + 7.280000e+02 + + + 7.840000e+02 + + + 8.400000e+02 + + + 8.960000e+02 + + + 9.520000e+02 + + + 1.008000e+03 + + + 1.064000e+03 + + + 1.120000e+03 + + + 1.176000e+03 + + + 1.232000e+03 + + + 1.288000e+03 + + + 1.344000e+03 + + + 1.400000e+03 + + + 1.456000e+03 + + + 1.512000e+03 + + + 1.568000e+03 + + + 1.624000e+03 + + + 1.680000e+03 + + + 1.736000e+03 + + + + + + + YES + + YES + NSColor + NSFont + NSParagraphStyle + + + YES + + + + 3 + + YES + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GQAEAQgADAEiAAcBhAQAA + + + + + YES + + + 6 + + + + 5.880000e+02 + 1 + + + 10849 + + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + + + + + + 6 + {1176, 1e+07} + {83, 0} + + + + {588, 316} + + + + + 1 + MSAxIDEgMC44MTk5OTk5OQA + + + 6 + + + + -2147483392 + {{573, 0}, {15, 316}} + + + _doScroller: + 3.877301e-01 + + + + 256 + {{-100, -100}, {87, 18}} + + 1 + + _doScroller: + 1.000000e+00 + 9.456522e-01 + + + {{0, 34}, {588, 316}} + + + 528 + + + + + + + 289 + {{512, 7}, {56, 19}} + + YES + + 67239424 + 134217728 + Copy + + + -2038152961 + 164 + + + 400 + 75 + + + + {588, 350} + + {{0, 0}, {1440, 878}} + {3.40282e+38, 3.40282e+38} + createTableSyntaxWindow + + + + 301 + + YES + + + 298 + {{0, 3}, {200, 26}} + + YES + + -2076049856 + 134219776 + + + -2038284033 + 35 + + + 400 + 75 + + + Choose Database... + + 1048576 + 2147483647 + 1 + + + _popUpItemAction: + + + YES + + OtherViews + + YES + + + + YES + YES + + + 2147483647 + + + _popUpItemAction: + + + + + QWRkIERhdGFiYXNl4oCmA + + 2147483647 + + + _popUpItemAction: + + + + + YES + YES + + + 2147483647 + 1 + + + _popUpItemAction: + + + + + 1 + YES + YES + 2 + + + + {200, 32} + NSView + + + SPTableInfo + + + + + YES + + + delegate + + + + 17 + + + + dataSource + + + + 72 + + + + dataSource + + + + 89 + + + + connectSheet + + + + 97 + + + + addTable: + + + + 102 + + + + tablesListInstance + + + + 104 + + + + hostField + + + + 105 + + + + userField + + + + 106 + + + + passwordField + + + + 107 + + + + portField + + + + 108 + + + + databaseField + + + + 109 + + + + connect: + + + + 117 + + + + closeSheet: + + + + 118 + + + + dataSource + + + + 135 + + + + tableSourceInstance + + + + 137 + + + + tablesListView + + + + 138 + + + + tableContentView + + + + 142 + + + + tableContentInstance + + + + 143 + + + + fieldField + + + + 164 + + + + compareField + + + + 166 + + + + setCompareTypes: + + + + 196 + + + + delegate + + + + 203 + + + + removeRow: + + + + 204 + + + + addRow: + + + + 205 + + + + removeTable: + + + + 207 + + + + customQueryInstance + + + + 208 + + + + tableContentInstance + + + + 209 + + + + tableSourceInstance + + + + 210 + + + + customQueryView + + + + 214 + + + + performQuery: + + + + 215 + + + + textView + + + + 216 + + + + updateTables: + + + + 218 + + + + dataSource + + + + 243 + + + + tableSourceView + + + + 244 + + + + delegate + + + + 251 + + + + delegate + + + + 252 + + + + tableWindow + + + + 258 + + + + countText + + + + 262 + + + + reloadTable: + + + + 264 + + + + tableWindow + + + + 266 + + + + affectedRowsText + + + + 299 + + + + addField: + + + + 314 + + + + removeField: + + + + 315 + + + + removeIndex: + + + + 317 + + + + indexView + + + + 318 + + + + dataSource + + + + 319 + + + + indexSheet + + + + 336 + + + + indexedColumnsField + + + + 337 + + + + tableWindow + + + + 338 + + + + indexNameField + + + + 339 + + + + reloadTable: + + + + 340 + + + + addIndex: + + + + 342 + + + + closeIndexSheet: + + + + 343 + + + + openIndexSheet: + + + + 344 + + + + indexTypeField + + + + 345 + + + + chooseIndexType: + + + + 346 + + + + removeButton + + + + 347 + + + + addButton + + + + 348 + + + + removeFieldButton + + + + 349 + + + + addFieldButton + + + + 350 + + + + removeIndexButton + + + + 351 + + + + addIndexButton + + + + 352 + + + + tableDumpInstance + + + + 378 + + + + tableWindow + + + + 387 + + + + chooseKeyButton + + + + 420 + + + + keySheet + + + + 421 + + + + closeKeySheet: + + + + 422 + + + + closeKeySheet: + + + + 423 + + + + copyTable: + + + + 496 + + + + closeCopyTableSheet: + + + + 517 + + + + closeCopyTableSheet: + + + + 518 + + + + copyTableNameField + + + + 519 + + + + copyTableContentSwitch + + + + 520 + + + + copyTableSheet + + + + 521 + + + + tableDocumentInstance + + + + 534 + + + + databaseNameField + + + + 583 + + + + databaseSheet + + + + 584 + + + + closeDatabaseSheet: + + + + 585 + + + + closeDatabaseSheet: + + + + 586 + + + + tableDocumentInstance + + + + 587 + + + + tabView + + + + 600 + + + + delegate + + + + 601 + + + + multipleLineEditingButton + + + + 603 + + + + editSheet + + + + 610 + + + + closeEditSheet: + + + + 611 + + + + closeEditSheet: + + + + 612 + + + + connectProgressBar + + + + 615 + + + + keyChainInstance + + + + 618 + + + + tableDumpInstance + + + + 619 + + + + delegate + + + + 671 + + + + delegate + + + + 678 + + + + delegate + + + + 679 + + + + delegate + + + + 709 + + + + delegate + + + + 710 + + + + closeSheet: + + + + 717 + + + + valueSheet + + + + 718 + + + + valueTextField + + + + 719 + + + + tableWindow + + + + 720 + + + + delegate + + + + 721 + + + + delegate + + + + 737 + + + + queryFavoritesView + + + + 738 + + + + queryFavoritesSheet + + + + 739 + + + + copyQueryFavorite: + + + + 740 + + + + removeQueryFavorite: + + + + 741 + + + + addQueryFavorite: + + + + 742 + + + + dataSource + + + + 746 + + + + closeQueryFavoritesSheet: + + + + 747 + + + + customQueryInstance + + + + 750 + + + + tableWindow + + + + 752 + + + + copyField: + + + + 809 + + + + copyFieldButton + + + + 810 + + + + copyButton + + + + 813 + + + + copyRow: + + + + 814 + + + + exportCSVView + + + + 819 + + + + contentView + + + + 826 + + + + parentWindow + + + + 827 + + + + consoleTextView + + + + 830 + + + + consoleDrawer + + + + 832 + + + + closeSheet: + + + + 851 + + + + variablesTableView + + + + 852 + + + + dataSource + + + + 853 + + + + variablesSheet + + + + 854 + + + + tableSourceInstance + + + + 855 + + + + queryProgressBar + + + + 860 + + + + tableDocumentInstance + + + + 900 + + + + exportDumpView + + + + 937 + + + + addDropTableSwitch + + + + 938 + + + + addTableContentSwitch + + + + 939 + + + + addErrorsSwitch + + + + 940 + + + + addCreateTableSwitch + + + + 941 + + + + exportDumpTableView + + + + 942 + + + + reloadTables: + + + + 943 + + + + selectTables: + + + + 944 + + + + selectTables: + + + + 945 + + + + dataSource + + + + 946 + + + + customQueryInstance + + + + 953 + + + + errorsView + + + + 966 + + + + errorsSheet + + + + 967 + + + + closeSheet: + + + + 968 + + + + singleProgressText + + + + 975 + + + + singleProgressBar + + + + 976 + + + + singleProgressSheet + + + + 977 + + + + importFieldsTerminatedField + + + + 1001 + + + + importFieldsEnclosedField + + + + 1003 + + + + importFieldsEscapedField + + + + 1004 + + + + importLinesTerminatedField + + + + 1005 + + + + importCSVView + + + + 1006 + + + + exportFieldNamesSwitch + + + + 1020 + + + + exportFieldsTerminatedField + + + + 1021 + + + + exportFieldsEnclosedField + + + + 1022 + + + + exportFieldsEscapedField + + + + 1023 + + + + exportLinesTerminatedField + + + + 1024 + + + + tableContentInstance + + + + 1025 + + + + tablesListInstance + + + + 1026 + + + + dataSource + + + + 1096 + + + + exportMultipleFieldsTerminatedField + + + + 1097 + + + + exportMultipleFieldsEnclosedField + + + + 1098 + + + + exportMultipleFieldsEscapedField + + + + 1099 + + + + exportMultipleLinesTerminatedField + + + + 1100 + + + + exportMultipleFieldNamesSwitch + + + + 1101 + + + + reloadTables: + + + + 1102 + + + + selectTables: + + + + 1103 + + + + selectTables: + + + + 1104 + + + + exportMultipleCSVTableView + + + + 1105 + + + + exportMultipleCSVView + + + + 1106 + + + + dataSource + + + + 1124 + + + + reloadTables: + + + + 1125 + + + + selectTables: + + + + 1126 + + + + selectTables: + + + + 1127 + + + + exportMultipleXMLTableView + + + + 1128 + + + + exportMultipleXMLView + + + + 1129 + + + + socketField + + + + 1133 + + + + importFieldNamesSwitch + + + + 1148 + + + + closeSheet: + + + + 1162 + + + + closeSheet: + + + + 1163 + + + + rowDownButton + + + + 1164 + + + + fieldMappingTableView + + + + 1165 + + + + rowUpButton + + + + 1166 + + + + dataSource + + + + 1167 + + + + stepRow: + + + + 1168 + + + + stepRow: + + + + 1169 + + + + fieldMappingSheet + + + + 1170 + + + + tablesListInstance + + + + 1171 + + + + tableSourceInstance + + + + 1172 + + + + tablesListInstance + + + + 1173 + + + + chooseQueryFavorite: + + + + 1188 + + + + chooseQueryHistory: + + + + 1189 + + + + queryFavoritesButton + + + + 1190 + + + + queryHistoryButton + + + + 1191 + + + + errorText + + + + 1192 + + + + editTextView + + + + 1232 + + + + editImage + + + + 1233 + + + + hexTextView + + + + 1234 + + + + saveEditSheet: + + + + 1235 + + + + openEditSheet: + + + + 1236 + + + + dropImage: + + + + 1237 + + + + delegate + + + + 1238 + + + + tableDumpInstance + + + + 1239 + + + + tableTabView + + + + 1244 + + + + commentsBox + + + + 1278 + + + + rowsAutoIncrement + + + + 1279 + + + + rowsAvgLength + + + + 1280 + + + + rowsFormat + + + + 1281 + + + + rowsNumber + + + + 1282 + + + + sizeData + + + + 1283 + + + + sizeFree + + + + 1284 + + + + sizeIndex + + + + 1285 + + + + sizeMaxData + + + + 1286 + + + + tableCreatedAt + + + + 1287 + + + + tableName + + + + 1288 + + + + tableType + + + + 1289 + + + + tableUpdatedAt + + + + 1290 + + + + tableStatusInstance + + + + 1291 + + + + typeChanged: + + + + 1301 + + + + tableTypeButton + + + + 1302 + + + + tableStatusInstance + + + + 1303 + + + + favoritesController + + + + 1945 + + + + initialFirstResponder + + + + 1958 + + + + connectProgressStatusText + + + + 2275 + + + + contentArray: favorites + + + + + + contentArray: favorites + contentArray + favorites + 2 + + + 3149 + + + + value: arrangedObjects.name + + + + + + value: arrangedObjects.name + value + arrangedObjects.name + + NSConditionallySetsEditable + + + 2 + + + 3174 + + + + argumentField + + + + 3965 + + + + filterTable: + + + + 3966 + + + + limitRowsField + + + + 3975 + + + + syntaxViewContent + + + + 3985 + + + + syntaxView + + + + 3986 + + + + createTableSyntaxWindow + + + + 3989 + + + + copyCreateTableSyntax: + + + + 3993 + + + + chooseDatabaseButton + + + + 3999 + + + + dbTablesTableView + + + + 4000 + + + + nextKeyView + + + + 4001 + + + + nextKeyView + + + + 4002 + + + + nextKeyView + + + + 4004 + + + + nextKeyView + + + + 4005 + + + + nextKeyView + + + + 4006 + + + + nextKeyView + + + + 4007 + + + + nextKeyView + + + + 4010 + + + + nextKeyView + + + + 4011 + + + + connectFavoritesTableView + + + + 4012 + + + + infoTable + + + + 4490 + + + + tableListInstance + + + + 4491 + + + + delegate + + + + 4492 + + + + dataSource + + + + 4493 + + + + tableDocumentInstance + + + + 4496 + + + + structureGrabber + + + + 4505 + + + + sidebarGrabber + + + + 4510 + + + + connectSheetAddToFavorites: + + + + 4517 + + + + remove: + + + + 4519 + + + + initialFirstResponder + + + + 4520 + + + + addDatabase: + + + + 4524 + + + + reloadTable: + + + + 4525 + + + + + YES + + 0 + + YES + + + + + + -2 + + + RmlsZSdzIE93bmVyA + + + -1 + + + First Responder + + + -3 + + + Application + + + 5 + + + YES + + + + DBView + + + 6 + + + YES + + + + + + 677 + + + YES + + + + + + + 675 + + + YES + + + + + + + + + + + + 30 + + + YES + + + + + + 206 + + + YES + + + + + + 217 + + + YES + + + + + + 495 + + + YES + + + + + + 2863 + + + YES + + + + + + 676 + + + YES + + + + + + 25 + + + YES + + + + + + + + + 26 + + + YES + + + + + + 27 + + + YES + + + + + + + + + + + + + + + + + + + + 35 + + + YES + + + + + + + + + 36 + + + YES + + + + + + 38 + + + YES + + + + + + 75 + + + YES + + + + + + 76 + + + YES + + + + + + 146 + + + YES + + + + + + 156 + + + YES + + + + + + 261 + + + YES + + + + + + 263 + + + YES + + + + + + 602 + + + YES + + + + + + 811 + + + YES + + + + + + 28 + + + YES + + + + + + 29 + + + YES + + + + + + 674 + + + YES + + + + + + + 672 + + + YES + + + + + + + + + + + 275 + + + YES + + + + + + 276 + + + YES + + + + + + 277 + + + YES + + + + + + 279 + + + YES + + + + + + 287 + + + YES + + + + + + + + + 289 + + + YES + + + + + + + + + + + + + + 288 + + + YES + + + + + + 1314 + + + + + 290 + + + YES + + + + + + 1315 + + + + + 291 + + + YES + + + + + + 1316 + + + + + 292 + + + YES + + + + + + 1317 + + + + + 293 + + + YES + + + + + + 1323 + + + + + 294 + + + YES + + + + + + 1322 + + + + + 295 + + + YES + + + + + + 1318 + + + + + 296 + + + YES + + + + + + 1319 + + + + + 297 + + + YES + + + + + + 1320 + + + + + 3675 + + + YES + + + + + + 673 + + + YES + + + + + + + + + + + + + + 73 + + + YES + + + + + + 74 + + + YES + + + + + + 231 + + + YES + + + + + + + + + 232 + + + YES + + + + + + + + + + + + + + + 233 + + + YES + + + + + + 1311 + + + + + 245 + + + YES + + + + + + 1304 + + + + + 246 + + + YES + + + + + + 1326 + + + + + 247 + + + YES + + + + + + 1312 + + + + + 248 + + + YES + + + + + + 1313 + + + + + 249 + + + YES + + + + + + 1309 + + + + + 654 + + + YES + + + + + + 1310 + + + + + 655 + + + YES + + + + + + 1305 + + + + + 748 + + + YES + + + + + + 1306 + + + + + 749 + + + YES + + + + + + 1307 + + + + + 807 + + + YES + + + + + + 1294 + + + YES + + + + + + 1297 + + + YES + + + + + + 3673 + + + YES + + + + + + 3677 + + + YES + + + + + + 119 + + + YES + + + + + + 120 + + + YES + + + + + + 670 + + + YES + + + + + + + + 662 + + + YES + + + + + + + + + 121 + + + YES + + + + + + + + 122 + + + + + 125 + + + YES + + + + + + 1175 + + + YES + + + + + + 1182 + + + YES + + + + + + 663 + + + YES + + + + + + 133 + + + YES + + + + + + + + + 132 + + + YES + + + + + + 131 + + + YES + + + + + + 1325 + + + + + 669 + + + YES + + + + + + + + 222 + + + YES + + + + + + 224 + + + YES + + + + + + 298 + + + YES + + + + + + 1245 + + + YES + + + + + + 1246 + + + YES + + + + + + + + + 1255 + + + YES + + + + + + + + + 1256 + + + YES + + + + + + + + + 1267 + + + YES + + + + + + 1272 + + + YES + + + + + + + + + 39 + + + YES + + + + connectSheet + + + 40 + + + YES + + + + + + + + + + + + + 51 + + + YES + + + + + + 52 + + + YES + + + + + + 614 + + + + + 2260 + + + YES + + + + + + 2261 + + + YES + + + + + + 2264 + + + YES + + + + + + 2266 + + + YES + + + + + + 2268 + + + YES + + + + + + + + + + + + + + + + + + + + + + 67 + + + TableContent + + + 68 + + + TablesList + + + 69 + + + TableSource + + + 134 + + + CustomQuery + + + 320 + + + YES + + + + indexSheet + + + 321 + + + YES + + + + + + + + + + + + + 323 + + + YES + + + + + + 329 + + + YES + + + + + + 330 + + + YES + + + + + + 331 + + + YES + + + + + + 332 + + + YES + + + + + + 333 + + + YES + + + + + + 334 + + + YES + + + + + + 335 + + + YES + + + + + + 362 + + + TableDump + + + 409 + + + YES + + + + keySheet + + + 410 + + + YES + + + + + + + + + 411 + + + YES + + + + + + 414 + + + YES + + + + + + 418 + + + YES + + + + + + 419 + + + YES + + + + + + 501 + + + YES + + + + copyTableSheet + + + 500 + + + YES + + + + + + + + + + 512 + + + YES + + + + + + 513 + + + YES + + + + + + 514 + + + YES + + + + + + 515 + + + YES + + + + + + 516 + + + YES + + + + + + 565 + + + YES + + + + databaseSheet + + + 557 + + + YES + + + + + + + + + 579 + + + YES + + + + + + 580 + + + YES + + + + + + 581 + + + YES + + + + + + 582 + + + YES + + + + + + 604 + + + YES + + + + editSheet + + + 605 + + + YES + + + + + + + + + + 608 + + + YES + + + + + + 609 + + + YES + + + + + + 1215 + + + YES + + + + + + + + 1216 + + + YES + + + + + + 1217 + + + YES + + + + + + 1221 + + + YES + + + + + + + + 1222 + + + + + 1218 + + + YES + + + + + + 1214 + + + YES + + + + + + 1227 + + + YES + + + + + + 1223 + + + YES + + + + + + 1224 + + + YES + + + + + + 1230 + + + YES + + + + + + + + 1231 + + + + + 1225 + + + YES + + + + + + 1226 + + + YES + + + + + + 617 + + + KeyChain + + + 714 + + + YES + + + + valueSheet + + + 713 + + + YES + + + + + + + 711 + + + YES + + + + + + 715 + + + YES + + + + + + + + 716 + + + + + 724 + + + YES + + + + queryFavoritesSheet + + + 725 + + + YES + + + + + + + + + + 729 + + + YES + + + + + + 730 + + + YES + + + + + + + + + 735 + + + YES + + + + + + 728 + + + YES + + + + + + 731 + + + YES + + + + + + 733 + + + YES + + + + + + 743 + + + YES + + + + + + 815 + + + YES + + + + + + + + + + + + exportCSVView + + + 1007 + + + YES + + + + + + 1008 + + + YES + + + + + + 1009 + + + YES + + + + + + 1010 + + + YES + + + + + + 1011 + + + YES + + + + + + 1012 + + + YES + + + + + + 1013 + + + YES + + + + + + 1014 + + + YES + + + + + + 1015 + + + YES + + + + + + 821 + + + consoleDrawer + + + 824 + + + YES + + + + consoleDrawerView + + + 828 + + + YES + + + + + + + + 829 + + + + + 839 + + + YES + + + + variablesSheet + + + 835 + + + YES + + + + + + + 849 + + + YES + + + + + + + + + 846 + + + YES + + + + + + + 847 + + + YES + + + + + + 848 + + + YES + + + + + + 910 + + + YES + + + + + + + + + + + exportDumpView + + + 918 + + + YES + + + + + + + + 921 + + + YES + + + + + + + 919 + + + YES + + + + + + 920 + + + YES + + + + + + 923 + + + YES + + + + + + 924 + + + YES + + + + + + 925 + + + YES + + + + + + 929 + + + YES + + + + + + 930 + + + YES + + + + + + 931 + + + YES + + + + + + 935 + + + YES + + + + + + 959 + + + YES + + + + errorSheet + + + 960 + + + YES + + + + + + + + 961 + + + YES + + + + + + 962 + + + YES + + + + + + + + 963 + + + + + 964 + + + YES + + + + + + 969 + + + YES + + + + singleProgressSheet + + + 970 + + + YES + + + + + + + 971 + + + + + 972 + + + YES + + + + + + 978 + + + YES + + + + + + + + + + + + importCSVView + + + 985 + + + YES + + + + + + 986 + + + YES + + + + + + 988 + + + YES + + + + + + 989 + + + YES + + + + + + 991 + + + YES + + + + + + 992 + + + YES + + + + + + 996 + + + YES + + + + + + 997 + + + YES + + + + + + 1136 + + + YES + + + + + + 1058 + + + YES + + + + + + + + + + + + + + + + exportMultipleCSVView + + + 1073 + + + YES + + + + + + 1074 + + + YES + + + + + + 1075 + + + YES + + + + + + 1076 + + + YES + + + + + + 1077 + + + YES + + + + + + 1078 + + + YES + + + + + + 1079 + + + YES + + + + + + 1080 + + + YES + + + + + + 1081 + + + YES + + + + + + 1087 + + + YES + + + + + + 1088 + + + YES + + + + + + 1089 + + + YES + + + + + + 1091 + + + YES + + + + + + + + 1092 + + + YES + + + + + + + 1086 + + + YES + + + + + + 1090 + + + YES + + + + + + 1113 + + + YES + + + + + + + exportMultipleXMLView + + + 1115 + + + YES + + + + + + 1116 + + + YES + + + + + + 1117 + + + YES + + + + + + 1118 + + + YES + + + + + + + + 1114 + + + YES + + + + + + + 1119 + + + YES + + + + + + 1120 + + + YES + + + + + + 1149 + + + YES + + + + fieldMappingSheet + + + 1150 + + + YES + + + + + + + + + + + 1152 + + + YES + + + + + + + + 1153 + + + YES + + + + + + + 1151 + + + YES + + + + + + 1154 + + + YES + + + + + + 1155 + + + YES + + + + + + 1156 + + + YES + + + + + + 1157 + + + YES + + + + + + 1158 + + + YES + + + + + + 1161 + + + YES + + + + + + 1277 + + + TableStatus + + + 1907 + + + Shared User Defaults Controller + + + 1920 + + + Favorites + + + 3746 + + + + + 3747 + + + + + 3748 + + + + + 3749 + + + + + 3751 + + + + + 3752 + + + + + 3753 + + + + + 3754 + + + YES + + + + + + 3755 + + + YES + + + + + + 3759 + + + + + 3760 + + + + + 3761 + + + + + 3766 + + + + + 3767 + + + + + 3768 + + + + + 3769 + + + + + 3770 + + + + + 3771 + + + + + 3772 + + + + + 3773 + + + + + 3774 + + + + + 3775 + + + YES + + + + + + 3776 + + + + + 3777 + + + + + 3778 + + + + + 3779 + + + + + 3780 + + + YES + + + + + + 3781 + + + YES + + + + + + 3782 + + + + + 3783 + + + + + 3784 + + + + + 3798 + + + + + 3799 + + + + + 3800 + + + + + 3801 + + + + + 3802 + + + + + 3803 + + + + + 3818 + + + YES + + + + + + 3819 + + + + + 3820 + + + + + 3821 + + + + + 3822 + + + + + 3823 + + + + + 3824 + + + + + 3825 + + + + + 3826 + + + + + 3827 + + + YES + + + + + + 3828 + + + + + 3829 + + + + + 3830 + + + + + 3831 + + + + + 3832 + + + + + 3833 + + + + + 3834 + + + + + 3835 + + + + + 3836 + + + + + 3837 + + + + + 3838 + + + + + 3839 + + + + + 3840 + + + + + 3841 + + + + + 3842 + + + + + 3843 + + + + + 3844 + + + + + 3845 + + + + + 3846 + + + + + 3847 + + + + + 3848 + + + + + 3849 + + + + + 3850 + + + + + 3851 + + + + + 3852 + + + + + 3853 + + + + + 3854 + + + + + 3855 + + + + + 3856 + + + + + 3857 + + + + + 3860 + + + + + 3861 + + + + + 3862 + + + + + 3863 + + + + + 3864 + + + + + 3865 + + + + + 3866 + + + + + 3867 + + + + + 3868 + + + + + 3869 + + + + + 3870 + + + + + 3871 + + + + + 3872 + + + + + 3873 + + + + + 3874 + + + + + 3875 + + + + + 3876 + + + + + 3877 + + + + + 3878 + + + + + 3879 + + + + + 3880 + + + + + 3881 + + + + + 3882 + + + + + 3883 + + + + + 3884 + + + + + 3885 + + + + + 3886 + + + + + 3887 + + + + + 3888 + + + + + 3889 + + + + + 3890 + + + + + 3891 + + + + + 3892 + + + + + 3893 + + + + + 3894 + + + + + 3895 + + + + + 3896 + + + + + 3897 + + + + + 3898 + + + + + 3903 + + + + + 3904 + + + + + 3905 + + + + + 3906 + + + + + 3907 + + + + + 3908 + + + + + 3909 + + + + + 3910 + + + + + 3911 + + + + + 3912 + + + + + 3913 + + + + + 3914 + + + + + 147 + + + YES + + + + + + 144 + + + + + 157 + + + YES + + + + + + 154 + + + + + 1300 + + + YES + + + + + + + + + + 1299 + + + + + 1298 + + + + + 1296 + + + + + 1295 + + + + + 1293 + + + + + 1183 + + + YES + + + + + + 1177 + + + + + 1178 + + + YES + + + + + + + + + 1181 + + + + + 1180 + + + + + 1179 + + + + + 1176 + + + + + 325 + + + YES + + + + + + + + + 328 + + + + + 327 + + + + + 326 + + + + + 324 + + + + + 415 + + + YES + + + + + + + + + 417 + + + + + 416 + + + + + 413 + + + + + 412 + + + + + 3918 + + + + + 3919 + + + + + 3920 + + + + + 3921 + + + + + 3922 + + + + + 3923 + + + + + 3924 + + + + + 3925 + + + + + 3926 + + + + + 3927 + + + + + 3928 + + + + + 3929 + + + + + 3930 + + + + + 3931 + + + + + 3935 + + + + + 3936 + + + + + 3937 + + + + + 3938 + + + + + 3939 + + + + + 3940 + + + + + 3941 + + + + + 3942 + + + + + 3943 + + + + + 3944 + + + + + 3945 + + + + + 3946 + + + + + 3947 + + + + + 3948 + + + + + 3951 + + + + + 3952 + + + + + 3953 + + + + + 3954 + + + + + 3955 + + + + + 3956 + + + + + 3957 + + + + + 3958 + + + + + 3959 + + + + + 3960 + + + + + 1271 + + + YES + + + + + + 3787 + + + + + 1260 + + + YES + + + + + + 3785 + + + + + 1270 + + + YES + + + + + + 3786 + + + + + 1274 + + + YES + + + + + + 3788 + + + + + 1264 + + + YES + + + + + + 3791 + + + + + 1273 + + + YES + + + + + + 3792 + + + + + 1263 + + + YES + + + + + + 3790 + + + + + 1262 + + + YES + + + + + + 3789 + + + + + 1261 + + + YES + + + + + + 3793 + + + + + 1268 + + + YES + + + + + + 3796 + + + + + 1259 + + + YES + + + + + + 3794 + + + + + 1269 + + + YES + + + + + + 3797 + + + + + 1265 + + + YES + + + + + + 3795 + + + + + 41 + + + YES + + + + + + 3804 + + + + + 256 + + + YES + + + + + + 3812 + + + + + 253 + + + YES + + + + + + 3809 + + + + + 47 + + + YES + + + + + + 3807 + + + + + 257 + + + YES + + + + + + 3813 + + + + + 254 + + + YES + + + + + + 3810 + + + + + 45 + + + YES + + + + + + 3806 + + + + + 50 + + + YES + + + + + + 3808 + + + + + 43 + + + YES + + + + + + 3805 + + + + + 1130 + + + YES + + + + + + 3814 + + + + + 1131 + + + YES + + + + + + 3815 + + + + + 1911 + + + YES + + + + + + + + + 3934 + + + + + 3933 + + + + + 3932 + + + + + 1914 + + + YES + + + + + + 1916 + + + YES + + + + + + 1919 + + + + + 255 + + + YES + + + + + + 3811 + + + + + 2273 + + + YES + + + + + + 3817 + + + + + 3963 + + + YES + + + + + + 3964 + + + + + 3967 + + + YES + + + + + + 3968 + + + + + 3969 + + + YES + + + + + + 3970 + + + YES + + + + + + 3971 + + + YES + + + + + + 3972 + + + + + 3973 + + + YES + + + + + + 3974 + + + + + 3976 + + + + + 3987 + + + YES + + + + createTableSyntaxWindow + + + 3988 + + + YES + + + + + + + 3981 + + + YES + + + + + + SyntaxView + + + 3984 + + + + + 3983 + + + + + 3982 + + + + + 3990 + + + YES + + + + + + 3991 + + + + + 850 + + + YES + + + + + + 3858 + + + + + 3994 + + + YES + + + + Select DB Toolbar View + + + 3995 + + + YES + + + + + + 3996 + + + YES + + + + + + 3997 + + + YES + + + + + + + + + 3998 + + + + + 4487 + + + YES + + + + + + + 21 + + + YES + + + + + + + + 3916 + + + + + 3915 + + + + + 22 + + + YES + + + + + + 23 + + + YES + + + + + + 4015 + + + + + 4481 + + + YES + + + + + + + + 4484 + + + YES + + + + + + 4483 + + + + + 4482 + + + + + 4485 + + + YES + + + + + + 4486 + + + + + 4488 + + + SP Table Info + + + 4503 + + + YES + + + + + + 4504 + + + + + 4508 + + + YES + + + + + + 4509 + + + + + 4511 + + + YES + + + + + + 4512 + + + + + 4513 + + + YES + + + + + + 4514 + + + + + 4515 + + + YES + + + + + + 4516 + + + + + 4521 + + + + + 4522 + + + + + 4523 + + + + + 858 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + -3.ImportedFromIB2 + 1007.IBPluginDependency + 1007.ImportedFromIB2 + 1008.IBPluginDependency + 1008.ImportedFromIB2 + 1009.IBAttributePlaceholdersKey + 1009.IBPluginDependency + 1009.ImportedFromIB2 + 1010.IBPluginDependency + 1010.ImportedFromIB2 + 1011.IBAttributePlaceholdersKey + 1011.IBPluginDependency + 1011.ImportedFromIB2 + 1012.IBPluginDependency + 1012.ImportedFromIB2 + 1013.IBAttributePlaceholdersKey + 1013.IBPluginDependency + 1013.ImportedFromIB2 + 1014.IBAttributePlaceholdersKey + 1014.IBPluginDependency + 1014.ImportedFromIB2 + 1015.IBPluginDependency + 1015.ImportedFromIB2 + 1058.IBPluginDependency + 1058.ImportedFromIB2 + 1073.IBAttributePlaceholdersKey + 1073.IBPluginDependency + 1073.ImportedFromIB2 + 1074.IBPluginDependency + 1074.ImportedFromIB2 + 1075.IBPluginDependency + 1075.ImportedFromIB2 + 1076.IBPluginDependency + 1076.ImportedFromIB2 + 1077.IBPluginDependency + 1077.ImportedFromIB2 + 1078.IBAttributePlaceholdersKey + 1078.IBPluginDependency + 1078.ImportedFromIB2 + 1079.IBPluginDependency + 1079.ImportedFromIB2 + 1080.IBAttributePlaceholdersKey + 1080.IBPluginDependency + 1080.ImportedFromIB2 + 1081.IBAttributePlaceholdersKey + 1081.IBPluginDependency + 1081.ImportedFromIB2 + 1086.IBPluginDependency + 1086.ImportedFromIB2 + 1087.IBAttributePlaceholdersKey + 1087.IBPluginDependency + 1087.ImportedFromIB2 + 1088.IBAttributePlaceholdersKey + 1088.IBPluginDependency + 1088.ImportedFromIB2 + 1089.IBAttributePlaceholdersKey + 1089.IBPluginDependency + 1089.ImportedFromIB2 + 1090.IBPluginDependency + 1090.ImportedFromIB2 + 1091.IBPluginDependency + 1091.ImportedFromIB2 + 1092.IBPluginDependency + 1092.ImportedFromIB2 + 1113.IBPluginDependency + 1113.ImportedFromIB2 + 1114.IBPluginDependency + 1114.ImportedFromIB2 + 1115.IBAttributePlaceholdersKey + 1115.IBPluginDependency + 1115.ImportedFromIB2 + 1116.IBAttributePlaceholdersKey + 1116.IBPluginDependency + 1116.ImportedFromIB2 + 1117.IBAttributePlaceholdersKey + 1117.IBPluginDependency + 1117.ImportedFromIB2 + 1118.IBPluginDependency + 1118.ImportedFromIB2 + 1119.IBPluginDependency + 1119.ImportedFromIB2 + 1120.IBPluginDependency + 1120.ImportedFromIB2 + 1130.IBPluginDependency + 1130.ImportedFromIB2 + 1131.IBPluginDependency + 1131.ImportedFromIB2 + 1136.IBPluginDependency + 1136.ImportedFromIB2 + 1149.IBPluginDependency + 1149.IBWindowTemplateEditedContentRect + 1149.ImportedFromIB2 + 1149.editorWindowContentRectSynchronizationRect + 1149.windowTemplate.hasMaxSize + 1149.windowTemplate.hasMinSize + 1149.windowTemplate.maxSize + 1149.windowTemplate.minSize + 1150.IBPluginDependency + 1150.ImportedFromIB2 + 1151.IBPluginDependency + 1151.ImportedFromIB2 + 1152.IBPluginDependency + 1152.ImportedFromIB2 + 1153.IBPluginDependency + 1153.ImportedFromIB2 + 1154.IBPluginDependency + 1154.ImportedFromIB2 + 1155.IBPluginDependency + 1155.ImportedFromIB2 + 1156.IBPluginDependency + 1156.ImportedFromIB2 + 1157.IBPluginDependency + 1157.ImportedFromIB2 + 1158.IBPluginDependency + 1158.ImportedFromIB2 + 1161.IBPluginDependency + 1161.ImportedFromIB2 + 1175.IBAttributePlaceholdersKey + 1175.IBPluginDependency + 1175.ImportedFromIB2 + 1176.IBPluginDependency + 1176.ImportedFromIB2 + 1177.IBPluginDependency + 1177.ImportedFromIB2 + 1178.IBPluginDependency + 1178.ImportedFromIB2 + 1179.IBPluginDependency + 1179.ImportedFromIB2 + 1180.IBPluginDependency + 1180.ImportedFromIB2 + 1181.IBPluginDependency + 1181.ImportedFromIB2 + 1182.IBAttributePlaceholdersKey + 1182.IBPluginDependency + 1182.ImportedFromIB2 + 1183.IBPluginDependency + 1183.ImportedFromIB2 + 119.IBPluginDependency + 119.ImportedFromIB2 + 120.IBPluginDependency + 120.ImportedFromIB2 + 121.IBPluginDependency + 121.ImportedFromIB2 + 1214.IBPluginDependency + 1214.ImportedFromIB2 + 1215.IBPluginDependency + 1215.ImportedFromIB2 + 1216.IBPluginDependency + 1216.ImportedFromIB2 + 1217.IBPluginDependency + 1217.ImportedFromIB2 + 1218.IBPluginDependency + 1218.ImportedFromIB2 + 122.CustomClassName + 122.IBPluginDependency + 122.ImportedFromIB2 + 1221.IBPluginDependency + 1221.ImportedFromIB2 + 1222.IBPluginDependency + 1222.ImportedFromIB2 + 1223.IBPluginDependency + 1223.ImportedFromIB2 + 1224.IBPluginDependency + 1224.ImportedFromIB2 + 1225.IBPluginDependency + 1225.ImportedFromIB2 + 1226.IBPluginDependency + 1226.ImportedFromIB2 + 1227.CustomClassName + 1227.IBPluginDependency + 1227.ImportedFromIB2 + 1230.IBPluginDependency + 1230.ImportedFromIB2 + 1231.IBPluginDependency + 1231.ImportedFromIB2 + 1245.IBPluginDependency + 1245.ImportedFromIB2 + 1246.IBPluginDependency + 1246.ImportedFromIB2 + 125.IBAttributePlaceholdersKey + 125.IBPluginDependency + 125.ImportedFromIB2 + 1255.IBPluginDependency + 1255.ImportedFromIB2 + 1256.IBPluginDependency + 1256.ImportedFromIB2 + 1259.IBPluginDependency + 1259.ImportedFromIB2 + 1260.IBPluginDependency + 1260.ImportedFromIB2 + 1261.IBPluginDependency + 1261.ImportedFromIB2 + 1262.IBPluginDependency + 1262.ImportedFromIB2 + 1263.IBPluginDependency + 1263.ImportedFromIB2 + 1264.IBPluginDependency + 1264.ImportedFromIB2 + 1265.IBPluginDependency + 1265.ImportedFromIB2 + 1267.IBPluginDependency + 1267.ImportedFromIB2 + 1268.IBPluginDependency + 1268.ImportedFromIB2 + 1269.IBPluginDependency + 1269.ImportedFromIB2 + 1270.IBPluginDependency + 1270.ImportedFromIB2 + 1271.IBPluginDependency + 1271.ImportedFromIB2 + 1272.IBPluginDependency + 1272.ImportedFromIB2 + 1273.IBPluginDependency + 1273.ImportedFromIB2 + 1274.IBPluginDependency + 1274.ImportedFromIB2 + 1277.IBPluginDependency + 1277.ImportedFromIB2 + 1293.IBPluginDependency + 1293.ImportedFromIB2 + 1294.IBPluginDependency + 1294.ImportedFromIB2 + 1295.IBPluginDependency + 1295.ImportedFromIB2 + 1296.IBPluginDependency + 1296.ImportedFromIB2 + 1297.IBPluginDependency + 1297.ImportedFromIB2 + 1298.IBPluginDependency + 1298.ImportedFromIB2 + 1299.IBPluginDependency + 1299.ImportedFromIB2 + 1300.IBPluginDependency + 1300.ImportedFromIB2 + 1304.IBPluginDependency + 1304.ImportedFromIB2 + 1305.IBPluginDependency + 1305.ImportedFromIB2 + 1306.IBPluginDependency + 1306.ImportedFromIB2 + 1307.IBPluginDependency + 1307.ImportedFromIB2 + 1309.IBPluginDependency + 1309.ImportedFromIB2 + 131.IBPluginDependency + 131.ImportedFromIB2 + 1310.IBPluginDependency + 1310.ImportedFromIB2 + 1311.IBPluginDependency + 1311.ImportedFromIB2 + 1312.IBPluginDependency + 1312.ImportedFromIB2 + 1313.IBPluginDependency + 1313.ImportedFromIB2 + 1314.IBPluginDependency + 1314.ImportedFromIB2 + 1315.IBPluginDependency + 1315.ImportedFromIB2 + 1316.IBPluginDependency + 1316.ImportedFromIB2 + 1317.IBPluginDependency + 1317.ImportedFromIB2 + 1318.IBPluginDependency + 1318.ImportedFromIB2 + 1319.IBPluginDependency + 1319.ImportedFromIB2 + 132.CustomClassName + 132.IBPluginDependency + 132.ImportedFromIB2 + 1320.IBPluginDependency + 1320.ImportedFromIB2 + 1322.IBPluginDependency + 1322.ImportedFromIB2 + 1323.IBPluginDependency + 1323.ImportedFromIB2 + 1325.IBPluginDependency + 1325.ImportedFromIB2 + 1326.IBPluginDependency + 1326.ImportedFromIB2 + 133.IBPluginDependency + 133.ImportedFromIB2 + 134.IBPluginDependency + 134.ImportedFromIB2 + 144.IBPluginDependency + 144.ImportedFromIB2 + 146.IBAttributePlaceholdersKey + 146.IBPluginDependency + 146.ImportedFromIB2 + 147.IBPluginDependency + 147.ImportedFromIB2 + 154.IBPluginDependency + 154.ImportedFromIB2 + 156.IBAttributePlaceholdersKey + 156.IBPluginDependency + 156.ImportedFromIB2 + 157.IBPluginDependency + 157.ImportedFromIB2 + 157.editorWindowContentRectSynchronizationRect + 1907.IBPluginDependency + 1907.ImportedFromIB2 + 1911.IBPluginDependency + 1911.ImportedFromIB2 + 1914.IBPluginDependency + 1914.ImportedFromIB2 + 1916.IBPluginDependency + 1916.ImportedFromIB2 + 1919.IBPluginDependency + 1919.ImportedFromIB2 + 1920.IBPluginDependency + 1920.ImportedFromIB2 + 206.IBAttributePlaceholdersKey + 206.IBPluginDependency + 206.ImportedFromIB2 + 21.IBPluginDependency + 21.ImportedFromIB2 + 217.IBAttributePlaceholdersKey + 217.IBPluginDependency + 217.ImportedFromIB2 + 22.IBPluginDependency + 22.ImportedFromIB2 + 222.IBPluginDependency + 222.ImportedFromIB2 + 224.IBPluginDependency + 224.ImportedFromIB2 + 2260.IBPluginDependency + 2260.ImportedFromIB2 + 2261.IBPluginDependency + 2261.ImportedFromIB2 + 2264.IBPluginDependency + 2264.ImportedFromIB2 + 2266.IBPluginDependency + 2266.ImportedFromIB2 + 2268.IBPluginDependency + 2268.ImportedFromIB2 + 2273.IBPluginDependency + 2273.ImportedFromIB2 + 23.IBPluginDependency + 23.ImportedFromIB2 + 231.IBPluginDependency + 231.ImportedFromIB2 + 232.IBPluginDependency + 232.ImportedFromIB2 + 233.IBPluginDependency + 233.ImportedFromIB2 + 245.IBPluginDependency + 245.ImportedFromIB2 + 246.IBPluginDependency + 246.ImportedFromIB2 + 247.IBPluginDependency + 247.ImportedFromIB2 + 248.IBPluginDependency + 248.ImportedFromIB2 + 249.IBPluginDependency + 249.ImportedFromIB2 + 25.IBPluginDependency + 25.ImportedFromIB2 + 253.IBPluginDependency + 253.ImportedFromIB2 + 254.IBPluginDependency + 254.ImportedFromIB2 + 255.IBPluginDependency + 255.ImportedFromIB2 + 256.IBPluginDependency + 256.ImportedFromIB2 + 257.IBPluginDependency + 257.ImportedFromIB2 + 26.IBPluginDependency + 26.ImportedFromIB2 + 261.IBPluginDependency + 261.ImportedFromIB2 + 263.IBAttributePlaceholdersKey + 263.IBPluginDependency + 263.ImportedFromIB2 + 27.IBPluginDependency + 27.ImportedFromIB2 + 275.IBAttributePlaceholdersKey + 275.IBPluginDependency + 275.ImportedFromIB2 + 276.IBAttributePlaceholdersKey + 276.IBPluginDependency + 276.ImportedFromIB2 + 277.IBAttributePlaceholdersKey + 277.IBPluginDependency + 277.ImportedFromIB2 + 279.IBPluginDependency + 279.ImportedFromIB2 + 28.IBPluginDependency + 28.ImportedFromIB2 + 2863.IBPluginDependency + 2863.ImportedFromIB2 + 287.IBPluginDependency + 287.ImportedFromIB2 + 288.IBPluginDependency + 288.ImportedFromIB2 + 289.IBPluginDependency + 289.ImportedFromIB2 + 29.IBPluginDependency + 29.ImportedFromIB2 + 290.IBPluginDependency + 290.ImportedFromIB2 + 291.IBPluginDependency + 291.ImportedFromIB2 + 292.IBPluginDependency + 292.ImportedFromIB2 + 293.IBPluginDependency + 293.ImportedFromIB2 + 294.IBPluginDependency + 294.ImportedFromIB2 + 295.IBPluginDependency + 295.ImportedFromIB2 + 296.IBPluginDependency + 296.ImportedFromIB2 + 297.IBPluginDependency + 297.ImportedFromIB2 + 298.IBPluginDependency + 298.ImportedFromIB2 + 30.IBAttributePlaceholdersKey + 30.IBPluginDependency + 30.ImportedFromIB2 + 320.IBPluginDependency + 320.ImportedFromIB2 + 320.windowTemplate.hasMaxSize + 320.windowTemplate.hasMinSize + 320.windowTemplate.maxSize + 320.windowTemplate.minSize + 321.IBPluginDependency + 321.ImportedFromIB2 + 323.IBAttributePlaceholdersKey + 323.IBPluginDependency + 323.ImportedFromIB2 + 324.IBPluginDependency + 324.ImportedFromIB2 + 325.IBPluginDependency + 325.ImportedFromIB2 + 326.IBPluginDependency + 326.ImportedFromIB2 + 327.IBPluginDependency + 327.ImportedFromIB2 + 328.IBPluginDependency + 328.ImportedFromIB2 + 329.IBAttributePlaceholdersKey + 329.IBPluginDependency + 329.ImportedFromIB2 + 330.IBPluginDependency + 330.ImportedFromIB2 + 331.IBPluginDependency + 331.ImportedFromIB2 + 332.IBAttributePlaceholdersKey + 332.IBPluginDependency + 332.ImportedFromIB2 + 333.IBPluginDependency + 333.ImportedFromIB2 + 334.IBPluginDependency + 334.ImportedFromIB2 + 335.IBPluginDependency + 335.ImportedFromIB2 + 35.IBPluginDependency + 35.ImportedFromIB2 + 36.CustomClassName + 36.IBPluginDependency + 36.ImportedFromIB2 + 362.IBPluginDependency + 362.ImportedFromIB2 + 3673.IBPluginDependency + 3673.ImportedFromIB2 + 3675.IBPluginDependency + 3675.ImportedFromIB2 + 3677.IBAttributePlaceholdersKey + 3677.IBPluginDependency + 3677.ImportedFromIB2 + 38.IBPluginDependency + 38.ImportedFromIB2 + 39.IBEditorWindowLastContentRect + 39.IBPluginDependency + 39.IBWindowTemplateEditedContentRect + 39.ImportedFromIB2 + 39.editorWindowContentRectSynchronizationRect + 39.windowTemplate.hasMaxSize + 39.windowTemplate.hasMinSize + 39.windowTemplate.maxSize + 39.windowTemplate.minSize + 3903.IBShouldRemoveOnLegacySave + 3904.IBShouldRemoveOnLegacySave + 3905.IBShouldRemoveOnLegacySave + 3906.IBShouldRemoveOnLegacySave + 3907.IBShouldRemoveOnLegacySave + 3908.IBShouldRemoveOnLegacySave + 3909.IBShouldRemoveOnLegacySave + 3910.IBShouldRemoveOnLegacySave + 3911.IBShouldRemoveOnLegacySave + 3912.IBShouldRemoveOnLegacySave + 3913.IBShouldRemoveOnLegacySave + 3914.IBShouldRemoveOnLegacySave + 3915.IBShouldRemoveOnLegacySave + 3916.IBShouldRemoveOnLegacySave + 3918.IBShouldRemoveOnLegacySave + 3919.IBShouldRemoveOnLegacySave + 3920.IBShouldRemoveOnLegacySave + 3921.IBShouldRemoveOnLegacySave + 3922.IBShouldRemoveOnLegacySave + 3923.IBShouldRemoveOnLegacySave + 3924.IBShouldRemoveOnLegacySave + 3925.IBShouldRemoveOnLegacySave + 3926.IBShouldRemoveOnLegacySave + 3927.IBShouldRemoveOnLegacySave + 3928.IBShouldRemoveOnLegacySave + 3929.IBShouldRemoveOnLegacySave + 3930.IBShouldRemoveOnLegacySave + 3931.IBShouldRemoveOnLegacySave + 3932.IBShouldRemoveOnLegacySave + 3933.IBShouldRemoveOnLegacySave + 3934.IBShouldRemoveOnLegacySave + 3935.IBShouldRemoveOnLegacySave + 3936.IBShouldRemoveOnLegacySave + 3937.IBShouldRemoveOnLegacySave + 3938.IBShouldRemoveOnLegacySave + 3939.IBShouldRemoveOnLegacySave + 3940.IBShouldRemoveOnLegacySave + 3941.IBShouldRemoveOnLegacySave + 3942.IBShouldRemoveOnLegacySave + 3943.IBShouldRemoveOnLegacySave + 3944.IBShouldRemoveOnLegacySave + 3945.IBShouldRemoveOnLegacySave + 3946.IBShouldRemoveOnLegacySave + 3947.IBShouldRemoveOnLegacySave + 3948.IBShouldRemoveOnLegacySave + 3951.IBShouldRemoveOnLegacySave + 3952.IBShouldRemoveOnLegacySave + 3953.IBShouldRemoveOnLegacySave + 3954.IBShouldRemoveOnLegacySave + 3955.IBShouldRemoveOnLegacySave + 3956.IBShouldRemoveOnLegacySave + 3957.IBShouldRemoveOnLegacySave + 3958.IBShouldRemoveOnLegacySave + 3959.IBShouldRemoveOnLegacySave + 3960.IBShouldRemoveOnLegacySave + 3963.IBPluginDependency + 3964.IBPluginDependency + 3967.IBPluginDependency + 3967.ImportedFromIB2 + 3969.IBPluginDependency + 3970.IBPluginDependency + 3971.IBPluginDependency + 3972.IBPluginDependency + 3973.IBPluginDependency + 3974.IBPluginDependency + 3976.IBPluginDependency + 3981.IBPluginDependency + 3981.IBViewIntegration.shadowBlurRadius + 3981.IBViewIntegration.shadowColor + 3981.IBViewIntegration.shadowOffsetHeight + 3981.IBViewIntegration.shadowOffsetWidth + 3981.editorWindowContentRectSynchronizationRect + 3982.IBPluginDependency + 3983.IBPluginDependency + 3984.IBPluginDependency + 3987.IBEditorWindowLastContentRect + 3987.IBPluginDependency + 3987.IBWindowTemplateEditedContentRect + 3987.NSWindowTemplate.visibleAtLaunch + 3987.editorWindowContentRectSynchronizationRect + 3987.windowTemplate.hasMaxSize + 3987.windowTemplate.maxSize + 3988.IBPluginDependency + 3990.IBPluginDependency + 3991.IBPluginDependency + 3994.IBEditorWindowLastContentRect + 3994.IBPluginDependency + 3994.WindowOrigin + 3994.editorWindowContentRectSynchronizationRect + 3995.IBPluginDependency + 3996.IBPluginDependency + 3997.IBEditorWindowLastContentRect + 3997.IBPluginDependency + 3997.editorWindowContentRectSynchronizationRect + 3998.IBPluginDependency + 40.IBPluginDependency + 40.ImportedFromIB2 + 4015.CustomClassName + 4015.IBPluginDependency + 409.IBPluginDependency + 409.ImportedFromIB2 + 409.windowTemplate.hasMaxSize + 409.windowTemplate.hasMinSize + 409.windowTemplate.maxSize + 409.windowTemplate.minSize + 41.IBPluginDependency + 41.ImportedFromIB2 + 410.IBPluginDependency + 410.ImportedFromIB2 + 411.IBPluginDependency + 411.ImportedFromIB2 + 412.IBPluginDependency + 412.ImportedFromIB2 + 413.IBPluginDependency + 413.ImportedFromIB2 + 414.IBAttributePlaceholdersKey + 414.IBPluginDependency + 414.ImportedFromIB2 + 415.IBPluginDependency + 415.ImportedFromIB2 + 416.IBPluginDependency + 416.ImportedFromIB2 + 417.IBPluginDependency + 417.ImportedFromIB2 + 418.IBPluginDependency + 418.ImportedFromIB2 + 419.IBPluginDependency + 419.ImportedFromIB2 + 43.IBPluginDependency + 43.ImportedFromIB2 + 4481.IBPluginDependency + 4481.ImportedFromIB2 + 4482.IBShouldRemoveOnLegacySave + 4483.IBShouldRemoveOnLegacySave + 4484.IBPluginDependency + 4484.ImportedFromIB2 + 4485.IBPluginDependency + 4485.ImportedFromIB2 + 4486.CustomClassName + 4486.IBPluginDependency + 4488.IBPluginDependency + 45.CustomClassName + 45.IBPluginDependency + 45.ImportedFromIB2 + 4511.IBPluginDependency + 4512.IBPluginDependency + 4513.IBPluginDependency + 4514.IBPluginDependency + 4515.IBPluginDependency + 4516.IBPluginDependency + 4521.IBPluginDependency + 4522.IBPluginDependency + 4523.IBPluginDependency + 47.IBPluginDependency + 47.ImportedFromIB2 + 495.IBAttributePlaceholdersKey + 495.IBPluginDependency + 495.ImportedFromIB2 + 5.IBEditorWindowLastContentRect + 5.IBPluginDependency + 5.IBWindowTemplateEditedContentRect + 5.ImportedFromIB2 + 5.NSWindowTemplate.visibleAtLaunch + 5.editorWindowContentRectSynchronizationRect + 5.windowTemplate.hasMaxSize + 5.windowTemplate.hasMinSize + 5.windowTemplate.maxSize + 5.windowTemplate.minSize + 50.IBPluginDependency + 50.ImportedFromIB2 + 500.IBPluginDependency + 500.ImportedFromIB2 + 501.IBPluginDependency + 501.ImportedFromIB2 + 501.windowTemplate.hasMaxSize + 501.windowTemplate.hasMinSize + 501.windowTemplate.maxSize + 501.windowTemplate.minSize + 51.IBPluginDependency + 51.ImportedFromIB2 + 512.IBPluginDependency + 512.ImportedFromIB2 + 513.IBPluginDependency + 513.ImportedFromIB2 + 514.IBPluginDependency + 514.ImportedFromIB2 + 515.IBPluginDependency + 515.ImportedFromIB2 + 516.IBPluginDependency + 516.ImportedFromIB2 + 52.IBPluginDependency + 52.ImportedFromIB2 + 557.IBPluginDependency + 557.ImportedFromIB2 + 565.IBPluginDependency + 565.ImportedFromIB2 + 565.windowTemplate.hasMaxSize + 565.windowTemplate.hasMinSize + 565.windowTemplate.maxSize + 565.windowTemplate.minSize + 579.IBPluginDependency + 579.ImportedFromIB2 + 580.IBPluginDependency + 580.ImportedFromIB2 + 581.IBPluginDependency + 581.ImportedFromIB2 + 582.IBPluginDependency + 582.ImportedFromIB2 + 6.IBPluginDependency + 6.ImportedFromIB2 + 602.IBAttributePlaceholdersKey + 602.IBPluginDependency + 602.ImportedFromIB2 + 604.IBPluginDependency + 604.ImportedFromIB2 + 604.windowTemplate.hasMaxSize + 604.windowTemplate.hasMinSize + 604.windowTemplate.maxSize + 604.windowTemplate.minSize + 605.IBPluginDependency + 605.ImportedFromIB2 + 608.IBPluginDependency + 608.ImportedFromIB2 + 609.IBPluginDependency + 609.ImportedFromIB2 + 614.IBPluginDependency + 614.ImportedFromIB2 + 617.IBPluginDependency + 617.ImportedFromIB2 + 654.IBPluginDependency + 654.ImportedFromIB2 + 655.IBPluginDependency + 655.ImportedFromIB2 + 662.IBPluginDependency + 662.ImportedFromIB2 + 663.IBPluginDependency + 663.ImportedFromIB2 + 669.IBPluginDependency + 669.ImportedFromIB2 + 67.IBPluginDependency + 67.ImportedFromIB2 + 670.IBPluginDependency + 670.ImportedFromIB2 + 672.IBPluginDependency + 672.ImportedFromIB2 + 673.IBPluginDependency + 673.ImportedFromIB2 + 674.IBPluginDependency + 674.ImportedFromIB2 + 675.IBPluginDependency + 675.ImportedFromIB2 + 676.IBPluginDependency + 676.ImportedFromIB2 + 677.CustomClassName + 677.IBPluginDependency + 677.ImportedFromIB2 + 68.IBPluginDependency + 68.ImportedFromIB2 + 69.IBPluginDependency + 69.ImportedFromIB2 + 711.IBPluginDependency + 711.ImportedFromIB2 + 713.IBPluginDependency + 713.ImportedFromIB2 + 714.IBPluginDependency + 714.IBWindowTemplateEditedContentRect + 714.ImportedFromIB2 + 714.editorWindowContentRectSynchronizationRect + 714.windowTemplate.hasMaxSize + 714.windowTemplate.hasMinSize + 714.windowTemplate.maxSize + 714.windowTemplate.minSize + 715.IBPluginDependency + 715.ImportedFromIB2 + 716.IBPluginDependency + 716.ImportedFromIB2 + 724.IBPluginDependency + 724.ImportedFromIB2 + 724.windowTemplate.hasMaxSize + 724.windowTemplate.hasMinSize + 724.windowTemplate.maxSize + 724.windowTemplate.minSize + 725.IBPluginDependency + 725.ImportedFromIB2 + 728.IBPluginDependency + 728.ImportedFromIB2 + 729.IBAttributePlaceholdersKey + 729.IBPluginDependency + 729.ImportedFromIB2 + 73.IBAttributePlaceholdersKey + 73.IBPluginDependency + 73.ImportedFromIB2 + 730.IBAttributePlaceholdersKey + 730.IBPluginDependency + 730.ImportedFromIB2 + 731.IBAttributePlaceholdersKey + 731.IBPluginDependency + 731.ImportedFromIB2 + 733.IBAttributePlaceholdersKey + 733.IBPluginDependency + 733.ImportedFromIB2 + 735.IBPluginDependency + 735.ImportedFromIB2 + 74.IBAttributePlaceholdersKey + 74.IBPluginDependency + 74.ImportedFromIB2 + 743.IBPluginDependency + 743.ImportedFromIB2 + 748.IBPluginDependency + 748.ImportedFromIB2 + 749.IBPluginDependency + 749.ImportedFromIB2 + 75.IBAttributePlaceholdersKey + 75.IBPluginDependency + 75.ImportedFromIB2 + 76.IBAttributePlaceholdersKey + 76.IBPluginDependency + 76.ImportedFromIB2 + 807.IBAttributePlaceholdersKey + 807.IBPluginDependency + 807.ImportedFromIB2 + 811.IBAttributePlaceholdersKey + 811.IBPluginDependency + 811.ImportedFromIB2 + 815.IBPluginDependency + 815.ImportedFromIB2 + 821.IBPluginDependency + 821.ImportedFromIB2 + 824.IBPluginDependency + 824.ImportedFromIB2 + 828.IBPluginDependency + 828.ImportedFromIB2 + 829.IBPluginDependency + 829.ImportedFromIB2 + 835.IBPluginDependency + 835.ImportedFromIB2 + 839.IBPluginDependency + 839.IBWindowTemplateEditedContentRect + 839.ImportedFromIB2 + 839.editorWindowContentRectSynchronizationRect + 839.windowTemplate.hasMaxSize + 839.windowTemplate.hasMinSize + 839.windowTemplate.maxSize + 839.windowTemplate.minSize + 846.IBPluginDependency + 846.ImportedFromIB2 + 847.IBPluginDependency + 847.ImportedFromIB2 + 848.IBPluginDependency + 848.ImportedFromIB2 + 849.IBPluginDependency + 849.ImportedFromIB2 + 850.IBPluginDependency + 850.ImportedFromIB2 + 858.IBPluginDependency + 858.ImportedFromIB2 + 910.IBPluginDependency + 910.ImportedFromIB2 + 918.IBPluginDependency + 918.ImportedFromIB2 + 919.IBPluginDependency + 919.ImportedFromIB2 + 920.IBPluginDependency + 920.ImportedFromIB2 + 921.IBPluginDependency + 921.ImportedFromIB2 + 923.IBAttributePlaceholdersKey + 923.IBPluginDependency + 923.ImportedFromIB2 + 924.IBAttributePlaceholdersKey + 924.IBPluginDependency + 924.ImportedFromIB2 + 925.IBAttributePlaceholdersKey + 925.IBPluginDependency + 925.ImportedFromIB2 + 929.IBAttributePlaceholdersKey + 929.IBPluginDependency + 929.ImportedFromIB2 + 930.IBAttributePlaceholdersKey + 930.IBPluginDependency + 930.ImportedFromIB2 + 931.IBAttributePlaceholdersKey + 931.IBPluginDependency + 931.ImportedFromIB2 + 935.IBAttributePlaceholdersKey + 935.IBPluginDependency + 935.ImportedFromIB2 + 959.IBPluginDependency + 959.ImportedFromIB2 + 959.windowTemplate.hasMaxSize + 959.windowTemplate.hasMinSize + 959.windowTemplate.maxSize + 959.windowTemplate.minSize + 960.IBPluginDependency + 960.ImportedFromIB2 + 961.IBPluginDependency + 961.ImportedFromIB2 + 962.IBPluginDependency + 962.ImportedFromIB2 + 963.IBPluginDependency + 963.ImportedFromIB2 + 964.IBPluginDependency + 964.ImportedFromIB2 + 969.IBPluginDependency + 969.ImportedFromIB2 + 969.windowTemplate.hasMaxSize + 969.windowTemplate.hasMinSize + 969.windowTemplate.maxSize + 969.windowTemplate.minSize + 970.IBPluginDependency + 970.ImportedFromIB2 + 971.IBPluginDependency + 971.ImportedFromIB2 + 972.IBPluginDependency + 972.ImportedFromIB2 + 978.IBPluginDependency + 978.ImportedFromIB2 + 985.IBAttributePlaceholdersKey + 985.IBPluginDependency + 985.ImportedFromIB2 + 986.IBPluginDependency + 986.ImportedFromIB2 + 988.IBAttributePlaceholdersKey + 988.IBPluginDependency + 988.ImportedFromIB2 + 989.IBPluginDependency + 989.ImportedFromIB2 + 991.IBAttributePlaceholdersKey + 991.IBPluginDependency + 991.ImportedFromIB2 + 992.IBPluginDependency + 992.ImportedFromIB2 + 996.IBAttributePlaceholdersKey + 996.IBPluginDependency + 996.ImportedFromIB2 + 997.IBPluginDependency + 997.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Character used to terminate lines + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Character used to escape special characters + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Character used to separate fields + + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Character used to enclose fields + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Character used to escape special characters + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Character used to terminate lines + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Character used to enclose fields + + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Character used to separate fields + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Mark all tables + + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Refresh list of tables + + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Unmark all tables + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Mark all tables + + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Unmark all tables + + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Refresh list of tables + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + {{387, 725}, {432, 282}} + + {{387, 725}, {432, 282}} + + + {3.40282e+38, 3.40282e+38} + {350, 250} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Choose a query out of the last 20 queries + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Choose a favorite from the menu or save the current query to the favorites + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + CMTextView + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + CMImageView + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Run the query (Enter) + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + CMCopyTable + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Choose a field you want to use for your search + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Choose a search operator + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{535, 926}, {92, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Delete selected table + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Refresh list of tables + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Refresh table content (Cmd+R) + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Add index + + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Delete selected index + + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Refresh list of fields and indexes (Cmd+R) + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Add table + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + {3.40282e+38, 3.40282e+38} + {213, 107} + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Choose the type of the index + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Choose the name of the index or leave blank to use column name + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Choose the column(s) to be indexed (enter multiple columns comma separated without space after comma) + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + CMCopyTable + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Refresh list of fields and indexes (Cmd+R) + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{99, 63}, {519, 335}} + com.apple.InterfaceBuilder.CocoaPlugin + {{99, 63}, {519, 335}} + + {{136, 447}, {519, 335}} + + + {3.40282e+38, 3.40282e+38} + {256, 191} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + {{343, 395}, {320, 180}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{369, 505}, {588, 350}} + com.apple.InterfaceBuilder.CocoaPlugin + {{115, 214}, {588, 350}} + + {{115, 214}, {588, 350}} + + {3.40282e+38, 3.40282e+38} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{0, 1102}, {200, 32}} + com.apple.InterfaceBuilder.CocoaPlugin + {628, 654} + {{284, 769}, {200, 32}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{-11, 1068}, {200, 63}} + com.apple.InterfaceBuilder.CocoaPlugin + {{273, 775}, {200, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + ImageAndTextCell + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + {3.40282e+38, 3.40282e+38} + {213, 107} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Choose the type of the index + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + ImageAndTextCell + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + NSSecureTextField + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Duplicate selected table + + + com.apple.InterfaceBuilder.CocoaPlugin + + {{240, 291}, {845, 504}} + com.apple.InterfaceBuilder.CocoaPlugin + {{240, 291}, {845, 504}} + + + {{62, 352}, {845, 504}} + + + {3.40282e+38, 3.40282e+38} + {780, 480} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + {3.40282e+38, 3.40282e+38} + {213, 107} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + {256, 191} + {162.05, 5} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Open sheet by double-clicking on a field to edit values instead of spreadsheet-like editing + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + {3.40282e+38, 3.40282e+38} + {350, 200} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + TableDocumentSplitView + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + {{321, 837}, {381, 247}} + + {{321, 837}, {381, 247}} + + + {3.40282e+38, 3.40282e+38} + {213, 107} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + {3.40282e+38, 3.40282e+38} + {213, 107} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Remove a query favorite + + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Add field (Cmd+Option+A) + + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + RWRpdCBhIGZhdm9yaXRlIGJ5IGRvdWJsZS1jbGlja2luZyBvbiBpdCBvciBkcmFnJmRyb3AgaXQgdG8g +Y2hhbmdlIHRoZSBvcmRlcg + + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Duplicate a query favorite + + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Add a query favorite + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Delete selected field + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Add row (Cmd+Option+A) + + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Delete selected row(s) + + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Duplicate selected row (Cmd+D) + + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Duplicate selected row (Cmd+D) + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + {{321, 508}, {411, 341}} + + {{321, 508}, {411, 341}} + + + {3.40282e+38, 3.40282e+38} + {300, 200} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Refresh list of tables + + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Mark all tables + + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Unmark all tables + + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Write errors which occurred while dumping the database to the dump file + + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Add table content + + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Add create table syntax + + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Add a drop table- before the create table-command + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + {3.40282e+38, 3.40282e+38} + {213, 107} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + {3.40282e+38, 3.40282e+38} + {213, 50} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Character used to enclose fields + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Character used to escape special characters + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Character used to terminate line + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Character used to separate fields + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + YES + + + YES + + + + + YES + + YES + + + YES + + + + 4525 + + + + YES + + CMCopyTable + NSTableView + + copy: + id + + + IBProjectSource + CMCopyTable.h + + + + CMCopyTable + NSTableView + + IBUserSource + + + + + CMImageView + NSImageView + + IBProjectSource + CMImageView.h + + + + CMImageView + NSImageView + + IBUserSource + + + + + CMTextView + NSTextView + + IBProjectSource + CMTextView.h + + + + CMTextView + NSTextView + + IBUserSource + + + + + CustomQuery + NSObject + + YES + + YES + addQueryFavorite: + chooseQueryFavorite: + chooseQueryHistory: + closeQueryFavoritesSheet: + closeSheet: + copyQueryFavorite: + performQuery: + removeQueryFavorite: + + + YES + id + id + id + id + id + id + id + id + + + + YES + + YES + affectedRowsText + customQueryView + errorText + queryFavoritesButton + queryFavoritesSheet + queryFavoritesView + queryHistoryButton + tableDumpInstance + tableWindow + textView + valueSheet + valueTextField + + + YES + id + CMCopyTable + id + id + id + id + id + id + id + id + id + id + + + + IBProjectSource + CustomQuery.h + + + + CustomQuery + NSObject + + IBUserSource + + + + + FirstResponder + NSObject + + copyCreateTableSyntax: + id + + + IBUserSource + + + + + ImageAndTextCell + NSTextFieldCell + + IBProjectSource + ImageAndTextCell.h + + + + KeyChain + NSObject + + IBProjectSource + KeyChain.h + + + + KeyChain + NSObject + + IBUserSource + + + + + SPTableInfo + NSObject + + YES + + YES + infoTable + tableDocumentInstance + tableListInstance + + + YES + id + id + id + + + + IBProjectSource + SPTableInfo.h + + + + TableContent + NSObject + + YES + + YES + addRow: + closeEditSheet: + copyRow: + dropImage: + filterTable: + openEditSheet: + reloadTable: + reloadTableValues: + removeRow: + saveEditSheet: + setCompareTypes: + showAll: + stepLimitRows: + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + addButton + argumentField + compareField + copyButton + countText + editData + editImage + editSheet + editTextView + fieldField + filterButton + hexTextView + limitRowsButton + limitRowsField + limitRowsStepper + limitRowsText + multipleLineEditingButton + removeButton + tableContentView + tableDocumentInstance + tableSourceInstance + tableWindow + tablesListInstance + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + CMCopyTable + id + id + id + id + + + + IBProjectSource + TableContent.h + + + + TableContent + NSObject + + IBUserSource + + + + + TableDocument + NSDocument + + YES + + YES + addDatabase: + analyzeTable: + checkTable: + checksumTable: + chooseDatabase: + chooseEncoding: + chooseFavorite: + clearConsole: + closeDatabaseSheet: + closeSheet: + connect: + connectSheetAddToFavorites: + connectToDB: + copyCreateTableSyntax: + export: + exportMultipleTables: + exportTable: + flushPrivileges: + flushTable: + import: + importCSV: + optimizeTable: + removeDatabase: + repairTable: + setDatabases: + showCreateTableSyntax: + showVariables: + toggleConsole: + viewContent: + viewQuery: + viewStatus: + viewStructure: + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + chooseDatabaseButton + connectFavoritesTableView + connectProgressBar + connectProgressStatusText + connectSheet + consoleDrawer + consoleTextView + createTableSyntaxWindow + customQueryInstance + databaseField + databaseNameField + databaseSheet + dbTablesTableView + favoritesButton + favoritesController + hostField + keyChainInstance + passwordField + portField + queryProgressBar + sidebarGrabber + socketField + syntaxView + syntaxViewContent + tableContentInstance + tableDumpInstance + tableSourceInstance + tableStatusInstance + tableTabView + tableWindow + tablesListInstance + userField + variablesSheet + variablesTableView + + + YES + id + NSTableView + id + id + id + id + id + NSWindow + id + id + id + id + NSTableView + id + NSArrayController + id + id + id + id + id + id + id + id + id + id + id + id + id + NSTabView + id + id + id + id + id + + + + IBProjectSource + TableDocument.h + + + + TableDocument + NSDocument + + toggleUseSSH: + id + + + YES + + YES + sshCheckbox + sshHostField + sshPasswordField + sshPortField + sshUserField + + + YES + id + id + id + id + id + + + + IBUserSource + + + + + TableDocumentSplitView + NSSplitView + + IBProjectSource + TableDocumentSplitView.h + + + + TableDump + NSObject + + YES + + YES + closeSheet: + reloadTables: + selectTables: + stepRow: + + + YES + id + id + id + id + + + + YES + + YES + addCreateTableSwitch + addDropTableSwitch + addErrorsSwitch + addTableContentSwitch + customQueryInstance + errorsSheet + errorsView + exportCSVView + exportDumpTableView + exportDumpView + exportFieldNamesSwitch + exportFieldsEnclosedField + exportFieldsEscapedField + exportFieldsTerminatedField + exportLinesTerminatedField + exportMultipleCSVTableView + exportMultipleCSVView + exportMultipleFieldNamesSwitch + exportMultipleFieldsEnclosedField + exportMultipleFieldsEscapedField + exportMultipleFieldsTerminatedField + exportMultipleLinesTerminatedField + exportMultipleXMLTableView + exportMultipleXMLView + fieldMappingSheet + fieldMappingTableView + importCSVView + importFieldNamesSwitch + importFieldsEnclosedField + importFieldsEscapedField + importFieldsTerminatedField + importLinesTerminatedField + rowDownButton + rowUpButton + singleProgressBar + singleProgressSheet + singleProgressText + tableContentInstance + tableDocumentInstance + tableSourceInstance + tableWindow + tablesListInstance + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + + + + IBProjectSource + TableDump.h + + + + TableDump + NSObject + + IBUserSource + + + + + TableSource + NSObject + + YES + + YES + addField: + addIndex: + chooseIndexType: + closeIndexSheet: + closeKeySheet: + copyField: + openIndexSheet: + reloadTable: + removeField: + removeIndex: + typeChanged: + + + YES + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + addFieldButton + addIndexButton + chooseKeyButton + copyFieldButton + indexNameField + indexSheet + indexTypeField + indexView + indexedColumnsField + keySheet + removeFieldButton + removeIndexButton + structureGrabber + tableSourceView + tableTypeButton + tableWindow + tablesListInstance + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + + + + IBProjectSource + TableSource.h + + + + TableSource + NSObject + + IBUserSource + + + + + TableStatus + NSObject + + reloadTable: + id + + + YES + + YES + commentsBox + rowsAutoIncrement + rowsAvgLength + rowsFormat + rowsNumber + sizeData + sizeFree + sizeIndex + sizeMaxData + tableCreatedAt + tableName + tableType + tableUpdatedAt + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + id + + + + IBProjectSource + TableStatus.h + + + + TableStatus + NSObject + + IBUserSource + + + + + TablesList + NSObject + + YES + + YES + addTable: + closeCopyTableSheet: + copyTable: + removeTable: + updateTables: + + + YES + id + id + id + id + id + + + + YES + + YES + copyTableContentSwitch + copyTableNameField + copyTableSheet + customQueryInstance + tabView + tableContentInstance + tableDocumentInstance + tableDumpInstance + tableSourceInstance + tableStatusInstance + tableWindow + tablesListView + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + + + + IBProjectSource + TablesList.h + + + + TablesList + NSObject + + IBUserSource + + + + + + 0 + ../sequel-pro.xcodeproj + 3 + + diff --git a/trunk/English.lproj/InfoPlist.strings b/trunk/English.lproj/InfoPlist.strings new file mode 100644 index 00000000..d23d35e4 Binary files /dev/null and b/trunk/English.lproj/InfoPlist.strings differ diff --git a/trunk/English.lproj/Localizable.strings b/trunk/English.lproj/Localizable.strings new file mode 100644 index 00000000..5b76de27 Binary files /dev/null and b/trunk/English.lproj/Localizable.strings differ diff --git a/trunk/English.lproj/MainMenu.xib b/trunk/English.lproj/MainMenu.xib new file mode 100644 index 00000000..4d343708 --- /dev/null +++ b/trunk/English.lproj/MainMenu.xib @@ -0,0 +1,7375 @@ + + + + 1050 + 9F33 + 670 + 949.34 + 352.00 + + YES + + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + YES + + + NSApplication + + + + FirstResponder + + + NSApplication + + + MainMenu + + YES + + + Sequel Pro + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + Sequel Pro + + YES + + + About Sequel Pro + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Preferences... + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Check for Updates... + + 2147483647 + + + + + + Make a Donation... + + 1048576 + 2147483647 + + + + + + Visit Website... + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + + Services + + + YES + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide Sequel Pro + h + 1048576 + 2147483647 + + + + + + Hide Others + + 1048576 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit Sequel Pro + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + + File + + + YES + + + New Connection + n + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Import + + 1048576 + 2147483647 + + + submenuAction: + + Import + + YES + + + TXlTUUwgZHVtcOKApg + + 1048576 + 2147483647 + + + 1 + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Q1NWIGZpbGXigKY + + 1048576 + 2147483647 + + + 2 + + + + + + + Export + + 1048576 + 2147483647 + + + submenuAction: + + Export + + YES + + + TXlTUUwgZHVtcOKApg + + 1048576 + 2147483647 + + + 5 + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Table Content Result + + 1048576 + 2147483647 + + + submenuAction: + + Table Content Result + + YES + + + CSV file... + + 1048576 + 2147483647 + + + 6 + + + + XML file... + + 1048576 + 2147483647 + + + 7 + + + + + + + Custom Query Result + + 1048576 + 2147483647 + + + submenuAction: + + Custom Query Result + + YES + + + CSV file... + + 1048576 + 2147483647 + + + 8 + + + + XML file... + + 1048576 + 2147483647 + + + 9 + + + + + + + Multiple Tables + + 1048576 + 2147483647 + + + submenuAction: + + Multiple Tables + + YES + + + CSV file... + + 1048576 + 2147483647 + + + 10 + + + + XML file... + + 1048576 + 2147483647 + + + 11 + + + + + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Page Setup... + P + 1048576 + 2147483647 + + + + + + Print... + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + + Edit + + + YES + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Clear + + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + Duplicate + d + 1048840 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + + Find + + + YES + + + Find... + f + 1048576 + 2147483647 + + + + + + Find Next + g + 1048576 + 2147483647 + + + + + + Find Previous + d + 1048576 + 2147483647 + + + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + + + + Scroll to Selection + j + 1048576 + 2147483647 + + + + + + + + + Spelling + + 1048576 + 2147483647 + + + submenuAction: + + Spelling + + YES + + + Spelling... + : + 1048576 + 2147483647 + + + + + + Check Spelling + ; + 1048576 + 2147483647 + + + + + + Check Spelling As You Type + + 1048576 + 2147483647 + + + + + + + + + + + + View + + 1048576 + 2147483647 + + + submenuAction: + + View + + YES + + + Table Structure + 1 + 1048576 + 2147483647 + + + + + + Table Content + 2 + 1048576 + 2147483647 + + + + + + Custom Query + 3 + 1048576 + 2147483647 + + + + + + Table Status + 4 + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Toggle Console + + 1048576 + 2147483647 + + + + + + Clear Console + k + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Hide Toolbar + T + 1048576 + 2147483647 + + + + + + Customize Toolbar... + + 2147483647 + + + + + + + + + Database + + 1048576 + 2147483647 + + + submenuAction: + 1 + + Database + + YES + + + Add Database... + + 1048576 + 2147483647 + + + + + + Remove Database... + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Refresh Databases + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Database Encoding + + 1048576 + 2147483647 + + + submenuAction: + 1 + + Database Encoding + + YES + + + UCS-2 Unicode (ucs2) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + UTF-8 Unicode (utf8) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + US ASCII (ascii) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + ISO Latin 1 (latin1) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + Mac Roman (macroman) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Windows Latin 2 (cp1250) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + ISO Latin 2 (latin2) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Windows Arabic (cp1256) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + ISO Greek (greek) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + ISO Hebrew (hebrew) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + ISO Turkish (latin5) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Windows Baltic (cp1257) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Windows Cyrillic (cp1251) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Big5 Traditional Chinese (big5) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + Shift-JIS Japanese (sjis) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + EUC-JP Japanese (ujis) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Flush Privileges + + 1048576 + 2147483647 + + + + + + Show Server Variables... + + 1048576 + 2147483647 + + + + + + + + + + + + Table + + 1048576 + 2147483647 + + + submenuAction: + + Table + + YES + + + Copy Create Table Syntax + C + 1179914 + 2147483647 + + + + + + Show Create Table Syntax + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Check Table + + 1048576 + 2147483647 + + + + + + Analyze Table + + 1048576 + 2147483647 + + + + + + Optimize Table + + 1048576 + 2147483647 + + + + + + Repair Table + + 1048576 + 2147483647 + + + + + + Flush Table + + 1048576 + 2147483647 + + + + + + Checksum Table + + 1048576 + 2147483647 + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + + Window + + + YES + + + Minimize + m + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 1048576 + 2147483647 + + + submenuAction: + + + Help + + + YES + + + Sequel Pro Help + ? + 1048576 + 2147483647 + + + + + + Online Help + + 2147483647 + + + + + + + + _NSMainMenu + + + 3 + 2 + {{119, 773}, {710, 292}} + 1886912512 + Preferences + NSWindow + + View + + {3.40282e+38, 3.40282e+38} + {213, 107} + + + 256 + + YES + + + 256 + {{19, 237}, {190, 18}} + + YES + + -2080244224 + 131072 + Reload table after adding a row + + LucidaGrande + 1.100000e+01 + 3100 + + + 1211912703 + 2 + + NSImage + NSSwitch + + + NSSwitch + + + + 200 + 25 + + + + + 256 + {{19, 217}, {190, 18}} + + YES + + -2080244224 + 131072 + Reload table after editing a row + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 256 + {{19, 197}, {203, 18}} + + YES + + 67239424 + 131072 + Reload table after removing a row + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 256 + + YES + + + 2304 + + YES + + + 256 + {414, 169} + + YES + + + 256 + {414, 17} + + + + + + 256 + {{415, 0}, {12, 17}} + + + + YES + + name + 8.000000e+01 + 1.000000e+01 + 1.000000e+03 + + 75628032 + 0 + Name + + + 3 + MC4zMzMzMzI5OQA + + + 6 + System + headerTextColor + + 3 + MAA + + + + + 337772096 + 133120 + Text Cell + + + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 6 + System + controlTextColor + + + + 3 + YES + YES + + + + host + 8.000000e+01 + 1.000000e+01 + 1.000000e+03 + + 75628032 + 0 + Host + + + + + + 337772096 + 133120 + Text Cell + + + + + + 3 + YES + YES + + + + user + 8.000000e+01 + 1.000000e+01 + 1.000000e+03 + + 67239424 + 0 + User + + + 6 + System + headerColor + + + + + + 337772096 + 133120 + Text Cell + + + + + + 3 + YES + YES + + + + port + 3.200000e+01 + 1.000000e+01 + 1.000000e+03 + + 67239424 + 0 + Port + + + + + + 337772096 + 133120 + Text Cell + + + + + + 3 + YES + YES + + + + database + 8.000000e+01 + 1.000000e+01 + 1.000000e+03 + + 67239424 + 0 + Database + + + + + + 337772096 + 133120 + Text Cell + + + + + + 3 + YES + YES + + + + useSSH + 4.400000e+01 + 1.000000e+01 + 1.000000e+03 + + 67239424 + 0 + use SSH + + + + + + 67239424 + 131072 + + + LucidaGrande + 1.200000e+01 + 16 + + + 1215582719 + 2 + + + + 400 + 75 + + 3 + YES + YES + + + + 3.000000e+00 + 2.000000e+00 + + 6 + System + controlBackgroundColor + + 3 + MC42NjY2NjY2OQA + + + + 6 + System + gridColor + + 3 + MC41AA + + + 1.500000e+01 + -222298112 + 4 + 15 + 0 + YES + + + {{1, 17}, {414, 169}} + + + + + 4 + + + + 256 + {{415, 17}, {11, 169}} + + 256 + + _doScroller: + 9.941176e-01 + + + + 256 + {{1, 186}, {414, 11}} + + 257 + + _doScroller: + 2.315789e-01 + + + + 2304 + + YES + + + {{1, 0}, {414, 17}} + + + + + 4 + + + + {{263, 52}, {427, 198}} + + + 50 + + + + + + QSAAAEEgAABBiAAAQYgAAA + + + + 256 + {{260, 258}, {52, 14}} + + YES + + 67239424 + 4194304 + Favorites + + + + 6 + System + controlColor + + + + + + + + 256 + {{664, 16}, {28, 30}} + + YES + + 67239424 + 134217728 + Add + + LucidaGrande + 1.300000e+01 + 1044 + + + 113524991 + 402653186 + + NSImage + connectionadd + + + a + 200 + 25 + + + + + 256 + {{632, 16}, {28, 30}} + + YES + + 67239424 + 134217728 + Remove + + + 113524991 + 2 + + NSImage + connectiondelete + + + fw + 200 + 25 + + + + + 256 + {{600, 16}, {28, 30}} + + YES + + 67239424 + 134217728 + Copy + + + -2033958657 + 34 + + NSImage + NSRemoveTemplate + + + fw + 200 + 25 + + + + + 256 + {{22, 75}, {51, 18}} + + YES + + -1804468671 + 4326400 + NULL + + + YES + + + 6 + System + textColor + + + + + + + 256 + {{78, 76}, {168, 14}} + + YES + + 67239424 + 4194304 + String to display NULL-Values + + + + + + + + + 256 + {{19, 177}, {225, 18}} + + YES + + -2080244224 + 131072 + Show error when no rows are affected + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 256 + {{19, 157}, {185, 18}} + + YES + + 67239424 + 131072 + RG9uJ3QgbG9hZCBibG9iIGFuZCB0ZXh0IGZpZWxkcw + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 256 + {{19, 97}, {100, 18}} + + YES + + 67239424 + 131072 + Limit result to + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 256 + {{123, 98}, {76, 18}} + + YES + + -1267597759 + 71435264 + 100 + + + YES + + + + + + + 256 + {{204, 99}, {30, 14}} + + YES + + 67239424 + 4194304 + rows + + + + + + + + + 256 + {{162, 52}, {98, 14}} + + YES + + 67239424 + 4194304 + Default Encoding + + + + + + + + + 256 + {{19, 137}, {185, 18}} + + YES + + 67239424 + 131072 + Use monospaced fonts + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 258 + {{19, 46}, {141, 22}} + + YES + + -2076049856 + 132096 + + + -2038284033 + 1 + + + + + + 400 + 75 + + + Autodetect + + 1048576 + 2147483647 + 1 + + + _popUpItemAction: + + + YES + + OtherViews + + YES + + + + YES + YES + + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + UCS-2 Unicode (ucs2) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + UTF-8 Unicode (utf8) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + YES + YES + + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + US ASCII (ascii) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + ISO Latin 1 (latin1) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + Mac Roman (macroman) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + YES + YES + + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + Windows Latin 2 (cp1250) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + ISO Latin 2 (latin2) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + YES + YES + + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + Windows Arabic (cp1256) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + ISO Greek (greek) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + ISO Hebrew (hebrew) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + ISO Turkish (latin5) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + YES + YES + + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + Windows Baltic (cp1257) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + YES + YES + + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + Windows Cyrillic (cp1251) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + YES + YES + + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + Big5 Traditional Chinese (big5) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + Shift-JIS Japanese (sjis) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + EUC-JP Japanese (ujis) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + 3 + YES + YES + 1 + + + + + 256 + {{19, 117}, {194, 18}} + + YES + + -2080244224 + 131072 + Fetch correct row count (slower) + + + 1211912703 + 2 + + + + 200 + 25 + + + + {710, 292} + + {{0, 0}, {1920, 1178}} + {213, 129} + {3.40282e+38, 3.40282e+38} + + + MainController + + + KeyChain + + + 1 + 2 + {{828, 556}, {278, 365}} + 1886912512 + favoriteSheet + NSWindow + + View + + {3.40282e+38, 3.40282e+38} + {213, 107} + + + 256 + + YES + + + 256 + {{20, 223}, {159, 18}} + + YES + + -1804468671 + 4326400 + + + + YES + + + + + + + 256 + {{20, 249}, {159, 18}} + + YES + + 341966336 + 4325376 + + + + YES + + + + YES + NSAllRomanInputSourcesLocaleIdentifier + + + + + + 256 + {{184, 302}, {29, 14}} + + YES + + 67239424 + 4194304 + Host + + + + + + + + + 256 + {{184, 276}, {29, 14}} + + YES + + 67239424 + 4194304 + VXNlcgo + + + + + + + + + 256 + {{184, 224}, {63, 14}} + + YES + + 67239424 + 4194304 + Database * + + + + + + + + + 256 + {{20, 275}, {159, 18}} + + YES + + -1804468671 + 4326400 + + + + YES + + + + + + + 256 + {{97, 13}, {84, 28}} + + YES + + 67239424 + 134348800 + Cancel + + + -2038284033 + 1 + + + Gw + 200 + 25 + + + + + 256 + {{179, 13}, {84, 28}} + + 1 + YES + + 67239424 + 134348800 + Save + + 1 + + -2038284033 + 1 + + + DQ + 200 + 25 + + + + + 256 + {{184, 250}, {55, 14}} + + YES + + 67239424 + 4194304 + UGFzc3dvcmQKA + + + + + + + + + 256 + {{184, 172}, {35, 14}} + + YES + + 67239424 + 4194304 + Port * + + + + + + + + + 256 + {{20, 171}, {159, 18}} + + YES + + -1804468671 + 4326400 + + + + YES + + + + + + + 256 + {{20, 301}, {159, 18}} + + YES + + -1804468671 + 4326400 + + + + YES + + + + + + + 256 + {{184, 328}, {35, 14}} + + YES + + 67239424 + 4194304 + TmFtZQo + + + + + + + + + 256 + {{20, 327}, {159, 18}} + + YES + + -1804468671 + 4326400 + + + + YES + + + + + + + 256 + {{184, 198}, {48, 14}} + + YES + + 67239424 + 4194304 + Socket * + + + + + + + + + 256 + {{20, 197}, {159, 18}} + + YES + + -1804468671 + 4326400 + + + + YES + + + + + + + 256 + {{17, 21}, {57, 14}} + + YES + + 67239424 + 4194304 + * optional + + + + + + + + + 256 + {{17, 147}, {118, 18}} + + YES + + 67239424 + 131072 + Use SSH tunnel + + + 1211912703 + 2 + + + + 200 + 25 + + + + + 256 + {{20, 97}, {159, 18}} + + YES + + -1267597759 + 4326400 + + + + YES + + + + + + + 256 + {{20, 71}, {159, 18}} + + YES + + -1267597759 + 4326400 + + + + YES + + + + + + + 256 + {{184, 97}, {55, 14}} + + YES + + 67239424 + 4194304 + U1NIIFVzZXIKA + + + + + + + + + 256 + {{183, 71}, {78, 14}} + + YES + + 67239424 + 4194304 + U1NIIFBhc3N3b3JkCg + + + + + + + + + 256 + {{20, 123}, {159, 18}} + + YES + + -1267597759 + 4326400 + + + + YES + + + + + + + 256 + {{184, 124}, {55, 14}} + + YES + + 67239424 + 4194304 + SSH Host + + + + + + + + + 256 + {{20, 45}, {159, 18}} + + YES + + -1267597759 + 4326400 + 8888 + + + YES + + + + + + + 256 + {{184, 46}, {63, 14}} + + YES + + 67239424 + 4194304 + Local Port + + + + + + + + {278, 365} + + {{0, 0}, {1920, 1178}} + {213, 129} + {3.40282e+38, 3.40282e+38} + + + SUUpdater + + + + + YES + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + showHelp: + + + + 122 + + + + terminate: + + + + 139 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + hideOtherApplications: + + + + 146 + + + + hide: + + + + 152 + + + + unhideAllApplications: + + + + 153 + + + + cut: + + + + 175 + + + + paste: + + + + 176 + + + + redo: + + + + 178 + + + + selectAll: + + + + 179 + + + + undo: + + + + 180 + + + + copy: + + + + 181 + + + + clear: + + + + 183 + + + + showGuessPanel: + + + + 188 + + + + checkSpelling: + + + + 190 + + + + toggleContinuousSpellChecking: + + + + 192 + + + + performClose: + + + + 193 + + + + newDocument: + + + + 194 + + + + reloadAfterAddingSwitch + + + + 214 + + + + reloadAfterEditingSwitch + + + + 215 + + + + reloadAfterRemovingSwitch + + + + 216 + + + + openPreferences: + + + + 218 + + + + preferencesWindow + + + + 219 + + + + dataSource + + + + 235 + + + + addFavorite: + + + + 236 + + + + removeFavorite: + + + + 237 + + + + tableView + + + + 238 + + + + copyFavorite: + + + + 241 + + + + nullValueField + + + + 245 + + + + keyChainInstance + + + + 248 + + + + nameField + + + + 274 + + + + hostField + + + + 276 + + + + userField + + + + 277 + + + + passwordField + + + + 278 + + + + portField + + + + 279 + + + + databaseField + + + + 280 + + + + favoriteSheet + + + + 281 + + + + closeFavoriteSheet: + + + + 282 + + + + closeFavoriteSheet: + + + + 283 + + + + delegate + + + + 285 + + + + showErrorSwitch + + + + 287 + + + + dontShowBlobSwitch + + + + 292 + + + + limitRowsField + + + + 316 + + + + limitRowsSwitch + + + + 317 + + + + chooseLimitRows: + + + + 321 + + + + import: + + + + 425 + + + + export: + + + + 427 + + + + export: + + + + 430 + + + + export: + + + + 434 + + + + donate: + + + + 440 + + + + delegate + + + + 481 + + + + useMonospacedFontsSwitch + + + + 482 + + + + socketField + + + + 486 + + + + viewStructure: + + + + 501 + + + + viewContent: + + + + 502 + + + + viewQuery: + + + + 503 + + + + viewStatus: + + + + 506 + + + + initialFirstResponder + + + + 507 + + + + nextKeyView + + + + 508 + + + + nextKeyView + + + + 509 + + + + nextKeyView + + + + 510 + + + + nextKeyView + + + + 511 + + + + nextKeyView + + + + 512 + + + + nextKeyView + + + + 513 + + + + nextKeyView + + + + 514 + + + + visitWebsite: + + + + 517 + + + + visitHelpWebsite: + + + + 520 + + + + nextKeyView + + + + 530 + + + + nextKeyView + + + + 531 + + + + nextKeyView + + + + 532 + + + + nextKeyView + + + + 533 + + + + toggleUseSSH: + + + + 534 + + + + sshCheckbox + + + + 535 + + + + sshHostField + + + + 536 + + + + sshUserField + + + + 537 + + + + sshPasswordField + + + + 538 + + + + sshPortField + + + + 539 + + + + encodingPopUpButton + + + + 575 + + + + fetchRowCountSwitch + + + + 578 + + + + addDatabase: + + + + 630 + + + + removeDatabase: + + + + 659 + + + + setDatabases: + + + + 660 + + + + chooseEncoding: + + + + 662 + + + + chooseEncoding: + + + + 663 + + + + chooseEncoding: + + + + 664 + + + + chooseEncoding: + + + + 665 + + + + chooseEncoding: + + + + 666 + + + + chooseEncoding: + + + + 667 + + + + chooseEncoding: + + + + 668 + + + + chooseEncoding: + + + + 669 + + + + chooseEncoding: + + + + 670 + + + + chooseEncoding: + + + + 671 + + + + chooseEncoding: + + + + 672 + + + + chooseEncoding: + + + + 673 + + + + chooseEncoding: + + + + 674 + + + + chooseEncoding: + + + + 675 + + + + chooseEncoding: + + + + 676 + + + + chooseEncoding: + + + + 677 + + + + importCSV: + + + + 678 + + + + exportTable: + + + + 679 + + + + exportTable: + + + + 680 + + + + exportMultipleTables: + + + + 681 + + + + exportMultipleTables: + + + + 682 + + + + checkTable: + + + + 767 + + + + analyzeTable: + + + + 768 + + + + optimizeTable: + + + + 769 + + + + repairTable: + + + + 770 + + + + flushTable: + + + + 771 + + + + showCreateTableSyntax: + + + + 780 + + + + copyCreateTableSyntax: + + + + 781 + + + + showVariables: + + + + 784 + + + + flushPrivileges: + + + + 786 + + + + copyTable: + + + + 788 + + + + toggleConsole: + + + + 792 + + + + clearConsole: + + + + 793 + + + + checkForUpdates: + + + + 796 + + + + checksumTable: + + + + 798 + + + + runToolbarCustomizationPalette: + + + + 808 + + + + toggleToolbarShown: + + + + 809 + + + + + YES + + 0 + + YES + + + + + + -2 + + + RmlsZSdzIE93bmVyA + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + YES + + + + + + + + + + + MainMenu + + + 19 + + + YES + + + + + + 24 + + + YES + + + + + + + + 5 + + + + + 23 + + + + + 92 + + + YES + + + + + 56 + + + YES + + + + + + 57 + + + YES + + + + + + + + + + + + + + + + + + + + 58 + + + + + 129 + + + + + 131 + + + YES + + + + + + 130 + + + + + 134 + + + + + 136 + + + + + 143 + + + + + 144 + + + + + 145 + + + + + 149 + + + + + 150 + + + + + 199 + + + + + 435 + + + + + 438 + + + + + 516 + + + + + 83 + + + YES + + + + + + 81 + + + YES + + + + + + + + + + + + + + 73 + + + + + 74 + + + + + 77 + + + + + 78 + + + + + 79 + + + + + 82 + + + + + 324 + + + + + 369 + + + YES + + + + + + 370 + + + YES + + + + + + + + 371 + + + + + 375 + + + + + 379 + + + + + 372 + + + YES + + + + + + 373 + + + YES + + + + + + + + + + 377 + + + + + 378 + + + + + 385 + + + YES + + + + + + 386 + + + YES + + + + + + + 403 + + + + + 404 + + + + + 394 + + + YES + + + + + + 395 + + + YES + + + + + + + 405 + + + + + 433 + + + + + 400 + + + YES + + + + + + 401 + + + YES + + + + + + + 407 + + + + + 408 + + + + + 103 + + + YES + + + + + + 106 + + + YES + + + + + + + 111 + + + + + 518 + + + + + 163 + + + YES + + + + + + 169 + + + YES + + + + + + + + + + + + + + + + + 156 + + + + + 157 + + + + + 158 + + + + + 160 + + + + + 164 + + + + + 168 + + + YES + + + + + + 159 + + + YES + + + + + + + + + + 154 + + + + + 155 + + + + + 161 + + + + + 162 + + + + + 167 + + + + + 171 + + + + + 172 + + + + + 173 + + + + + 174 + + + + + 184 + + + YES + + + + + + 185 + + + YES + + + + + + + + 187 + + + + + 189 + + + + + 191 + + + + + 496 + + + YES + + + + + + 498 + + + YES + + + + + + + + + + + + + + + 497 + + + + + 499 + + + + + 500 + + + + + 504 + + + + + 627 + + + YES + + + + + + 628 + + + YES + + + + + + + + + + + + + + 629 + + + + + 631 + + + + + 632 + + + + + 633 + + + + + 634 + + + + + 658 + + + YES + + + + + + 635 + + + YES + + + + + + + + + + + + + + + + + + + + + + + + + + + 636 + + + + + 637 + + + + + 638 + + + + + 639 + + + + + 640 + + + + + 641 + + + + + 642 + + + + + 643 + + + + + 644 + + + + + 645 + + + + + 646 + + + + + 647 + + + + + 648 + + + + + 649 + + + + + 650 + + + + + 651 + + + + + 652 + + + + + 653 + + + + + 654 + + + + + 655 + + + + + 656 + + + + + 657 + + + + + 204 + + + YES + + + + preferencesWindow + + + 205 + + + YES + + + + + + + + + + + + + + + + + + + + + + + + 202 + + + YES + + + + + + 203 + + + YES + + + + + + 206 + + + YES + + + + + + 227 + + + YES + + + + + + + + + 225 + + + YES + + + + + + + + + + + 226 + + + YES + + + + + + 544 + + + + + 228 + + + YES + + + + + + 543 + + + + + 229 + + + YES + + + + + + 545 + + + + + 230 + + + YES + + + + + + 546 + + + + + 231 + + + YES + + + + + + 547 + + + + + 540 + + + YES + + + + + + 542 + + + + + 232 + + + YES + + + + + + 233 + + + YES + + + + + + 234 + + + YES + + + + + + 240 + + + YES + + + + + + 243 + + + YES + + + + + + 244 + + + YES + + + + + + 286 + + + YES + + + + + + 288 + + + YES + + + + + + 289 + + + YES + + + + + + 290 + + + YES + + + + + + 291 + + + YES + + + + + + 441 + + + YES + + + + + + 479 + + + YES + + + + + + 549 + + + YES + + + + + + 576 + + + YES + + + + + + 213 + + + MainController + + + 247 + + + KeyChain + + + 249 + + + YES + + + + favoriteSheet + + + 250 + + + YES + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 251 + + + YES + + + + + + 252 + + + YES + + + + + + 253 + + + YES + + + + + + 255 + + + YES + + + + + + 256 + + + YES + + + + + + 257 + + + YES + + + + + + 258 + + + YES + + + + + + 260 + + + YES + + + + + + 261 + + + YES + + + + + + 262 + + + YES + + + + + + 264 + + + YES + + + + + + 266 + + + YES + + + + + + 272 + + + YES + + + + + + 273 + + + YES + + + + + + 483 + + + YES + + + + + + 484 + + + YES + + + + + + 485 + + + YES + + + + + + 521 + + + YES + + + + + + 522 + + + YES + + + + + + 523 + + + YES + + + + + + 524 + + + YES + + + + + + 525 + + + YES + + + + + + 526 + + + YES + + + + + + 527 + + + YES + + + + + + 528 + + + YES + + + + + + 529 + + + YES + + + + + + 700 + + + + + 701 + + + + + 702 + + + + + 703 + + + + + 704 + + + + + 705 + + + + + 706 + + + + + 707 + + + + + 708 + + + + + 709 + + + + + 710 + + + + + 711 + + + + + 712 + + + + + 713 + + + + + 714 + + + + + 715 + + + + + 716 + + + YES + + + + + + 717 + + + + + 718 + + + + + 719 + + + + + 720 + + + + + 721 + + + + + 722 + + + + + 723 + + + + + 724 + + + + + 725 + + + + + 726 + + + + + 727 + + + + + 728 + + + + + 729 + + + + + 730 + + + + + 731 + + + + + 732 + + + + + 733 + + + + + 734 + + + + + 735 + + + + + 736 + + + + + 737 + + + + + 738 + + + + + 739 + + + + + 740 + + + + + 741 + + + + + 742 + + + + + 743 + + + + + 550 + + + YES + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 574 + + + + + 573 + + + + + 572 + + + + + 571 + + + + + 570 + + + + + 569 + + + + + 568 + + + + + 567 + + + + + 566 + + + + + 565 + + + + + 564 + + + + + 563 + + + + + 562 + + + + + 561 + + + + + 560 + + + + + 559 + + + + + 558 + + + + + 557 + + + + + 556 + + + + + 555 + + + + + 554 + + + + + 553 + + + + + 552 + + + + + 551 + + + + + 744 + + + + + 745 + + + + + 746 + + + + + 757 + + + YES + + + + + + 758 + + + YES + + + + + + + + + + + + + + 759 + + + + + 760 + + + + + 761 + + + + + 762 + + + + + 763 + + + + + 764 + + + + + 765 + + + + + 778 + + + + + 782 + + + + + 783 + + + + + 785 + + + + + 787 + + + + + 789 + + + + + 790 + + + + + 791 + + + + + 794 + + + + + 795 + + + + + 797 + + + + + 805 + + + + + 806 + + + + + 807 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + -3.ImportedFromIB2 + 103.IBPluginDependency + 103.ImportedFromIB2 + 106.IBEditorWindowLastContentRect + 106.IBPluginDependency + 106.ImportedFromIB2 + 106.editorWindowContentRectSynchronizationRect + 111.IBPluginDependency + 111.ImportedFromIB2 + 129.IBPluginDependency + 129.ImportedFromIB2 + 130.IBPluginDependency + 130.ImportedFromIB2 + 131.IBPluginDependency + 131.ImportedFromIB2 + 134.IBPluginDependency + 134.ImportedFromIB2 + 136.IBPluginDependency + 136.ImportedFromIB2 + 143.IBPluginDependency + 143.ImportedFromIB2 + 144.IBPluginDependency + 144.ImportedFromIB2 + 145.IBPluginDependency + 145.ImportedFromIB2 + 149.IBPluginDependency + 149.ImportedFromIB2 + 150.IBPluginDependency + 150.ImportedFromIB2 + 154.IBPluginDependency + 154.ImportedFromIB2 + 155.IBPluginDependency + 155.ImportedFromIB2 + 156.IBPluginDependency + 156.ImportedFromIB2 + 157.IBPluginDependency + 157.ImportedFromIB2 + 158.IBPluginDependency + 158.ImportedFromIB2 + 159.IBEditorWindowLastContentRect + 159.IBPluginDependency + 159.ImportedFromIB2 + 160.IBPluginDependency + 160.ImportedFromIB2 + 161.IBPluginDependency + 161.ImportedFromIB2 + 162.IBPluginDependency + 162.ImportedFromIB2 + 163.IBPluginDependency + 163.ImportedFromIB2 + 164.IBPluginDependency + 164.ImportedFromIB2 + 167.IBPluginDependency + 167.ImportedFromIB2 + 168.IBPluginDependency + 168.ImportedFromIB2 + 169.IBEditorWindowLastContentRect + 169.IBPluginDependency + 169.ImportedFromIB2 + 169.editorWindowContentRectSynchronizationRect + 171.IBPluginDependency + 171.ImportedFromIB2 + 172.IBPluginDependency + 172.ImportedFromIB2 + 173.IBPluginDependency + 173.ImportedFromIB2 + 174.IBPluginDependency + 174.ImportedFromIB2 + 184.IBPluginDependency + 184.ImportedFromIB2 + 185.IBEditorWindowLastContentRect + 185.IBPluginDependency + 185.ImportedFromIB2 + 187.IBPluginDependency + 187.ImportedFromIB2 + 189.IBPluginDependency + 189.ImportedFromIB2 + 19.IBPluginDependency + 19.ImportedFromIB2 + 191.IBPluginDependency + 191.ImportedFromIB2 + 199.IBPluginDependency + 199.ImportedFromIB2 + 202.IBAttributePlaceholdersKey + 202.IBPluginDependency + 202.ImportedFromIB2 + 203.IBAttributePlaceholdersKey + 203.IBPluginDependency + 203.ImportedFromIB2 + 204.IBPluginDependency + 204.IBWindowTemplateEditedContentRect + 204.ImportedFromIB2 + 204.editorWindowContentRectSynchronizationRect + 204.windowTemplate.hasMaxSize + 204.windowTemplate.hasMinSize + 204.windowTemplate.maxSize + 204.windowTemplate.minSize + 205.IBPluginDependency + 205.ImportedFromIB2 + 206.IBAttributePlaceholdersKey + 206.IBPluginDependency + 206.ImportedFromIB2 + 213.IBPluginDependency + 213.ImportedFromIB2 + 225.IBPluginDependency + 225.ImportedFromIB2 + 226.IBPluginDependency + 226.ImportedFromIB2 + 227.IBAttributePlaceholdersKey + 227.IBPluginDependency + 227.ImportedFromIB2 + 228.IBPluginDependency + 228.ImportedFromIB2 + 229.IBPluginDependency + 229.ImportedFromIB2 + 23.IBPluginDependency + 23.ImportedFromIB2 + 230.IBPluginDependency + 230.ImportedFromIB2 + 231.IBPluginDependency + 231.ImportedFromIB2 + 232.IBPluginDependency + 232.ImportedFromIB2 + 233.IBAttributePlaceholdersKey + 233.IBPluginDependency + 233.ImportedFromIB2 + 234.IBAttributePlaceholdersKey + 234.IBPluginDependency + 234.ImportedFromIB2 + 24.IBEditorWindowLastContentRect + 24.IBPluginDependency + 24.ImportedFromIB2 + 24.editorWindowContentRectSynchronizationRect + 240.IBAttributePlaceholdersKey + 240.IBPluginDependency + 240.ImportedFromIB2 + 243.IBAttributePlaceholdersKey + 243.IBPluginDependency + 243.ImportedFromIB2 + 244.IBPluginDependency + 244.ImportedFromIB2 + 247.IBPluginDependency + 247.ImportedFromIB2 + 249.IBPluginDependency + 249.IBWindowTemplateEditedContentRect + 249.ImportedFromIB2 + 249.editorWindowContentRectSynchronizationRect + 249.windowTemplate.hasMaxSize + 249.windowTemplate.hasMinSize + 249.windowTemplate.maxSize + 249.windowTemplate.minSize + 250.IBPluginDependency + 250.ImportedFromIB2 + 251.IBPluginDependency + 251.ImportedFromIB2 + 252.IBPluginDependency + 252.ImportedFromIB2 + 253.IBPluginDependency + 253.ImportedFromIB2 + 255.IBPluginDependency + 255.ImportedFromIB2 + 256.IBPluginDependency + 256.ImportedFromIB2 + 257.IBPluginDependency + 257.ImportedFromIB2 + 258.IBPluginDependency + 258.ImportedFromIB2 + 260.IBPluginDependency + 260.ImportedFromIB2 + 261.IBPluginDependency + 261.ImportedFromIB2 + 262.IBPluginDependency + 262.ImportedFromIB2 + 264.IBPluginDependency + 264.ImportedFromIB2 + 266.IBPluginDependency + 266.ImportedFromIB2 + 272.IBPluginDependency + 272.ImportedFromIB2 + 273.IBPluginDependency + 273.ImportedFromIB2 + 286.IBAttributePlaceholdersKey + 286.IBPluginDependency + 286.ImportedFromIB2 + 288.IBAttributePlaceholdersKey + 288.IBPluginDependency + 288.ImportedFromIB2 + 289.IBAttributePlaceholdersKey + 289.IBPluginDependency + 289.ImportedFromIB2 + 29.IBEditorWindowLastContentRect + 29.IBPluginDependency + 29.ImportedFromIB2 + 29.editorWindowContentRectSynchronizationRect + 290.IBAttributePlaceholdersKey + 290.IBPluginDependency + 290.ImportedFromIB2 + 291.IBAttributePlaceholdersKey + 291.IBPluginDependency + 291.ImportedFromIB2 + 324.IBPluginDependency + 324.ImportedFromIB2 + 369.IBPluginDependency + 369.ImportedFromIB2 + 370.IBEditorWindowLastContentRect + 370.IBPluginDependency + 370.ImportedFromIB2 + 370.editorWindowContentRectSynchronizationRect + 371.IBPluginDependency + 371.ImportedFromIB2 + 372.IBPluginDependency + 372.ImportedFromIB2 + 373.IBEditorWindowLastContentRect + 373.IBPluginDependency + 373.ImportedFromIB2 + 373.editorWindowContentRectSynchronizationRect + 375.IBPluginDependency + 375.ImportedFromIB2 + 377.IBPluginDependency + 377.ImportedFromIB2 + 378.IBPluginDependency + 378.ImportedFromIB2 + 379.IBPluginDependency + 379.ImportedFromIB2 + 385.IBPluginDependency + 385.ImportedFromIB2 + 386.IBEditorWindowLastContentRect + 386.IBPluginDependency + 386.ImportedFromIB2 + 394.IBPluginDependency + 394.ImportedFromIB2 + 395.IBEditorWindowLastContentRect + 395.IBPluginDependency + 395.ImportedFromIB2 + 400.IBPluginDependency + 400.ImportedFromIB2 + 401.IBEditorWindowLastContentRect + 401.IBPluginDependency + 401.ImportedFromIB2 + 403.IBPluginDependency + 403.ImportedFromIB2 + 404.IBPluginDependency + 404.ImportedFromIB2 + 405.IBPluginDependency + 405.ImportedFromIB2 + 407.IBPluginDependency + 407.ImportedFromIB2 + 408.IBPluginDependency + 408.ImportedFromIB2 + 433.IBPluginDependency + 433.ImportedFromIB2 + 435.IBPluginDependency + 435.ImportedFromIB2 + 438.IBPluginDependency + 438.ImportedFromIB2 + 441.IBPluginDependency + 441.ImportedFromIB2 + 479.IBAttributePlaceholdersKey + 479.IBPluginDependency + 479.ImportedFromIB2 + 483.IBPluginDependency + 483.ImportedFromIB2 + 484.IBPluginDependency + 484.ImportedFromIB2 + 485.IBPluginDependency + 485.ImportedFromIB2 + 496.IBPluginDependency + 496.ImportedFromIB2 + 497.IBPluginDependency + 497.ImportedFromIB2 + 498.IBEditorWindowLastContentRect + 498.IBPluginDependency + 498.ImportedFromIB2 + 498.editorWindowContentRectSynchronizationRect + 499.IBPluginDependency + 499.ImportedFromIB2 + 5.IBPluginDependency + 5.ImportedFromIB2 + 500.IBPluginDependency + 500.ImportedFromIB2 + 504.IBPluginDependency + 504.ImportedFromIB2 + 516.IBPluginDependency + 516.ImportedFromIB2 + 518.IBPluginDependency + 518.ImportedFromIB2 + 521.IBPluginDependency + 521.ImportedFromIB2 + 522.IBPluginDependency + 522.ImportedFromIB2 + 523.CustomClassName + 523.IBPluginDependency + 523.ImportedFromIB2 + 524.IBPluginDependency + 524.ImportedFromIB2 + 525.IBPluginDependency + 525.ImportedFromIB2 + 526.IBPluginDependency + 526.ImportedFromIB2 + 527.IBPluginDependency + 527.ImportedFromIB2 + 528.IBPluginDependency + 528.ImportedFromIB2 + 529.IBPluginDependency + 529.ImportedFromIB2 + 540.IBPluginDependency + 540.ImportedFromIB2 + 542.IBPluginDependency + 542.ImportedFromIB2 + 543.IBPluginDependency + 543.ImportedFromIB2 + 544.IBPluginDependency + 544.ImportedFromIB2 + 545.IBPluginDependency + 545.ImportedFromIB2 + 546.IBPluginDependency + 546.ImportedFromIB2 + 547.IBPluginDependency + 547.ImportedFromIB2 + 549.IBPluginDependency + 549.ImportedFromIB2 + 550.IBPluginDependency + 550.ImportedFromIB2 + 550.editorWindowContentRectSynchronizationRect + 551.IBPluginDependency + 551.ImportedFromIB2 + 552.IBPluginDependency + 552.ImportedFromIB2 + 553.IBPluginDependency + 553.ImportedFromIB2 + 554.IBPluginDependency + 554.ImportedFromIB2 + 555.IBPluginDependency + 555.ImportedFromIB2 + 556.IBPluginDependency + 556.ImportedFromIB2 + 557.IBPluginDependency + 557.ImportedFromIB2 + 558.IBPluginDependency + 558.ImportedFromIB2 + 559.IBPluginDependency + 559.ImportedFromIB2 + 56.IBPluginDependency + 56.ImportedFromIB2 + 560.IBPluginDependency + 560.ImportedFromIB2 + 561.IBPluginDependency + 561.ImportedFromIB2 + 562.IBPluginDependency + 562.ImportedFromIB2 + 563.IBPluginDependency + 563.ImportedFromIB2 + 564.IBPluginDependency + 564.ImportedFromIB2 + 565.IBPluginDependency + 565.ImportedFromIB2 + 566.IBPluginDependency + 566.ImportedFromIB2 + 567.IBPluginDependency + 567.ImportedFromIB2 + 568.IBPluginDependency + 568.ImportedFromIB2 + 569.IBPluginDependency + 569.ImportedFromIB2 + 57.IBEditorWindowLastContentRect + 57.IBPluginDependency + 57.ImportedFromIB2 + 57.editorWindowContentRectSynchronizationRect + 570.IBPluginDependency + 570.ImportedFromIB2 + 571.IBPluginDependency + 571.ImportedFromIB2 + 572.IBPluginDependency + 572.ImportedFromIB2 + 573.IBPluginDependency + 573.ImportedFromIB2 + 574.IBPluginDependency + 574.ImportedFromIB2 + 576.IBAttributePlaceholdersKey + 576.IBPluginDependency + 576.ImportedFromIB2 + 58.IBPluginDependency + 58.ImportedFromIB2 + 627.IBPluginDependency + 627.ImportedFromIB2 + 628.IBEditorWindowLastContentRect + 628.IBPluginDependency + 628.ImportedFromIB2 + 628.editorWindowContentRectSynchronizationRect + 629.IBPluginDependency + 629.ImportedFromIB2 + 631.IBPluginDependency + 631.ImportedFromIB2 + 632.IBPluginDependency + 632.ImportedFromIB2 + 633.IBPluginDependency + 633.ImportedFromIB2 + 634.IBPluginDependency + 634.ImportedFromIB2 + 635.IBPluginDependency + 635.ImportedFromIB2 + 635.editorWindowContentRectSynchronizationRect + 636.IBPluginDependency + 636.ImportedFromIB2 + 637.IBPluginDependency + 637.ImportedFromIB2 + 638.IBPluginDependency + 638.ImportedFromIB2 + 639.IBPluginDependency + 639.ImportedFromIB2 + 640.IBPluginDependency + 640.ImportedFromIB2 + 641.IBPluginDependency + 641.ImportedFromIB2 + 642.IBPluginDependency + 642.ImportedFromIB2 + 643.IBPluginDependency + 643.ImportedFromIB2 + 644.IBPluginDependency + 644.ImportedFromIB2 + 645.IBPluginDependency + 645.ImportedFromIB2 + 646.IBPluginDependency + 646.ImportedFromIB2 + 647.IBPluginDependency + 647.ImportedFromIB2 + 648.IBPluginDependency + 648.ImportedFromIB2 + 649.IBPluginDependency + 649.ImportedFromIB2 + 650.IBPluginDependency + 650.ImportedFromIB2 + 651.IBPluginDependency + 651.ImportedFromIB2 + 652.IBPluginDependency + 652.ImportedFromIB2 + 653.IBPluginDependency + 653.ImportedFromIB2 + 654.IBPluginDependency + 654.ImportedFromIB2 + 655.IBPluginDependency + 655.ImportedFromIB2 + 656.IBPluginDependency + 656.ImportedFromIB2 + 657.IBPluginDependency + 657.ImportedFromIB2 + 658.IBPluginDependency + 658.ImportedFromIB2 + 73.IBPluginDependency + 73.ImportedFromIB2 + 74.IBPluginDependency + 74.ImportedFromIB2 + 744.IBShouldRemoveOnLegacySave + 745.IBShouldRemoveOnLegacySave + 746.IBShouldRemoveOnLegacySave + 757.IBPluginDependency + 758.IBEditorWindowLastContentRect + 758.IBPluginDependency + 758.editorWindowContentRectSynchronizationRect + 759.IBPluginDependency + 760.IBPluginDependency + 761.IBPluginDependency + 762.IBPluginDependency + 763.IBPluginDependency + 764.IBPluginDependency + 765.IBPluginDependency + 77.IBPluginDependency + 77.ImportedFromIB2 + 778.IBPluginDependency + 78.IBPluginDependency + 78.ImportedFromIB2 + 782.IBPluginDependency + 783.IBPluginDependency + 785.IBPluginDependency + 787.IBPluginDependency + 789.IBPluginDependency + 79.IBPluginDependency + 79.ImportedFromIB2 + 790.IBPluginDependency + 791.IBPluginDependency + 794.IBPluginDependency + 795.IBPluginDependency + 797.IBPluginDependency + 805.IBPluginDependency + 806.IBPluginDependency + 807.IBPluginDependency + 81.IBEditorWindowLastContentRect + 81.IBPluginDependency + 81.ImportedFromIB2 + 81.editorWindowContentRectSynchronizationRect + 82.IBPluginDependency + 82.ImportedFromIB2 + 83.IBPluginDependency + 83.ImportedFromIB2 + 92.IBPluginDependency + 92.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{581, 440}, {181, 43}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{561, 605}, {181, 43}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{436, 200}, {227, 103}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{279, 260}, {157, 223}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{654, 613}, {157, 223}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{436, 220}, {262, 63}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Reload table content after a row has been edited + + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Reload table content after a row has been removed + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + {{59, 583}, {710, 292}} + + {{59, 583}, {710, 292}} + + + {3.40282e+38, 3.40282e+38} + {213, 107} + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Reload table content after a row has been added + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + RWRpdCBhIGZhdm9yaXRlIGJ5IGRvdWJsZS1jbGlja2luZyBvbiBpdCBvciBkcmFnJmRyb3AgaXQgdG8g +Y2hhbmdlIHRoZSBvcmRlcg + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Add favorite + + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Remove favorite + + + com.apple.InterfaceBuilder.CocoaPlugin + + {{510, 430}, {197, 53}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{449, 1007}, {197, 53}} + + ToolTip + + ToolTip + + Duplicate favorite + + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + String that is used to display a field with a NULL-Value + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + {{828, 556}, {278, 365}} + + {{828, 556}, {278, 365}} + + + {3.40282e+38, 3.40282e+38} + {213, 107} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Show an error when a row has been added or edited but MySQL says that no rows are affected + + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Load blob and text fields only when editing the row to speed up interface + + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Limit result to a given number of rows to speed up interface + + + com.apple.InterfaceBuilder.CocoaPlugin + + {{131, 483}, {511, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{506, 836}, {511, 20}} + + ToolTip + + ToolTip + + Limit result to a given number of rows to speed up interface + + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Limit result to a given number of rows to speed up interface + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{442, 370}, {172, 53}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{399, 525}, {172, 53}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{442, 340}, {213, 93}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{399, 465}, {213, 93}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{655, 360}, {136, 43}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{655, 340}, {136, 43}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{655, 320}, {136, 43}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Use monospaced fonts in the interface + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{323, 300}, {235, 183}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{698, 703}, {184, 133}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + NSSecureTextField + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{67, 289}, {228, 362}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{122, 334}, {218, 253}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{518, 583}, {218, 253}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Fetch the correct row count even if result is limited (may slow down interface when selecting large tables) + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{373, 330}, {231, 153}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{312, 683}, {231, 153}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{556, 185}, {279, 383}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + com.apple.InterfaceBuilder.CocoaPlugin + {{454, 310}, {268, 173}} + com.apple.InterfaceBuilder.CocoaPlugin + {{829, 663}, {268, 173}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{237, 330}, {205, 153}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{180, 535}, {182, 253}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + YES + + + YES + + + + + YES + + YES + + + YES + + + + 809 + + + + YES + + CMCopyTable + NSTableView + + copy: + id + + + IBProjectSource + CMCopyTable.h + + + + FirstResponder + NSObject + + YES + + YES + addDatabase: + analyzeTable: + checkTable: + checksumTable: + chooseEncoding: + clearConsole: + copyCreateTableSyntax: + copyTable: + export: + exportMultipleTables: + exportTable: + flushPrivileges: + flushTable: + import: + importCSV: + optimizeTable: + removeDatabase: + repairTable: + setDatabases: + showCreateTableSyntax: + showVariables: + toggleConsole: + viewContent: + viewQuery: + viewStatus: + viewStructure: + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + + + + IBUserSource + + + + + KeyChain + NSObject + + IBProjectSource + KeyChain.h + + + + KeyChain + NSObject + + IBUserSource + + + + + MainController + NSObject + + YES + + YES + addFavorite: + checkForUpdates: + chooseLimitRows: + closeFavoriteSheet: + copyFavorite: + donate: + openPreferences: + removeFavorite: + toggleUseSSH: + visitHelpWebsite: + visitWebsite: + + + YES + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + databaseField + dontShowBlobSwitch + encodingPopUpButton + favoriteSheet + fetchRowCountSwitch + hostField + keyChainInstance + limitRowsField + limitRowsSwitch + nameField + nullValueField + passwordField + portField + preferencesWindow + reloadAfterAddingSwitch + reloadAfterEditingSwitch + reloadAfterRemovingSwitch + showErrorSwitch + socketField + sshCheckbox + sshHostField + sshPasswordField + sshPortField + sshUserField + tableView + useMonospacedFontsSwitch + userField + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + + + + IBProjectSource + MainController.h + + + + MainController + NSObject + + closePreferences: + id + + + IBUserSource + + + + + NSMenu + NSObject + + IBUserSource + + + + + TableDocument + NSDocument + + YES + + YES + addDatabase: + analyzeTable: + checkTable: + checksumTable: + chooseDatabase: + chooseEncoding: + chooseFavorite: + clearConsole: + closeDatabaseSheet: + closeSheet: + connect: + connectSheetAddToFavorites: + connectToDB: + copyCreateTableSyntax: + export: + exportMultipleTables: + exportTable: + flushPrivileges: + flushTable: + import: + importCSV: + optimizeTable: + removeDatabase: + repairTable: + setDatabases: + showCreateTableSyntax: + showVariables: + toggleConsole: + viewContent: + viewQuery: + viewStatus: + viewStructure: + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + chooseDatabaseButton + connectFavoritesTableView + connectProgressBar + connectProgressStatusText + connectSheet + consoleDrawer + consoleTextView + createTableSyntaxWindow + customQueryInstance + databaseField + databaseNameField + databaseSheet + dbTablesTableView + favoritesButton + favoritesController + hostField + keyChainInstance + passwordField + portField + queryProgressBar + sidebarGrabber + socketField + syntaxView + syntaxViewContent + tableContentInstance + tableDumpInstance + tableSourceInstance + tableStatusInstance + tableTabView + tableWindow + tablesListInstance + userField + variablesSheet + variablesTableView + + + YES + id + NSTableView + id + id + id + id + id + NSWindow + id + id + id + id + NSTableView + id + NSArrayController + id + id + id + id + id + id + id + id + id + id + id + id + id + NSTabView + id + id + id + id + id + + + + IBProjectSource + TableDocument.h + + + + TablesList + NSObject + + YES + + YES + addTable: + closeCopyTableSheet: + copyTable: + removeTable: + updateTables: + + + YES + id + id + id + id + id + + + + YES + + YES + copyTableContentSwitch + copyTableNameField + copyTableSheet + customQueryInstance + tabView + tableContentInstance + tableDocumentInstance + tableDumpInstance + tableSourceInstance + tableStatusInstance + tableWindow + tablesListView + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + + + + IBProjectSource + TablesList.h + + + + + 0 + ../sequel-pro.xcodeproj + 3 + + diff --git a/trunk/English.lproj/english_help/bar.gif b/trunk/English.lproj/english_help/bar.gif new file mode 100644 index 00000000..f716f3f9 Binary files /dev/null and b/trunk/English.lproj/english_help/bar.gif differ diff --git a/trunk/English.lproj/english_help/english_help idx b/trunk/English.lproj/english_help/english_help idx new file mode 100644 index 00000000..beac9c4d Binary files /dev/null and b/trunk/English.lproj/english_help/english_help idx differ diff --git a/trunk/English.lproj/english_help/icon.gif b/trunk/English.lproj/english_help/icon.gif new file mode 100644 index 00000000..70f30b35 Binary files /dev/null and b/trunk/English.lproj/english_help/icon.gif differ diff --git a/trunk/English.lproj/english_help/index.html b/trunk/English.lproj/english_help/index.html new file mode 100755 index 00000000..265dd630 --- /dev/null +++ b/trunk/English.lproj/english_help/index.html @@ -0,0 +1,99 @@ + + +Sequel Pro Help + + + + + + + + + +
+ + + + + + + + + +
+ + +

Sequel Pro Help

+
+ +
+ +
+ + + + + + +
+ + Topics +
+ + Connecting to a Database +
+ Managing Tables (Creation, Deletion, Changes) +
+ Data Management +
+ Performing Custom Queries +
+ Data Dumps (CSV, XML) +
+ Setting Preferences +
+ Console +
+ Encoding +
+ Table Syntax Generation +
+ SQL Table examples +
+ SQL Query examples +
+ MySQL SQL Reference +
+
+
+
+ + Sequel Pro Website +
+ + http://code.google.com/p/sequel-pro/ + +
+
+
+ Developers and Contributors +
+ Abhi Beckert, Matt Langtree, Lorenz Textor, Jeff Skrysak, Walter Lee Davis, Tristan O'Tierney, Kotaro Funakoshi, David Buxton, Stuart B. Glenn, Jason Hallford, snowhouse, MySQL Cocoa project +
+
+
+ MySQL Websites +
+ + http://www.mysql.com/ +
+ http://www.serverlogistics.com/mysql.php +
+
+
+
+ +
+ + + \ No newline at end of file diff --git a/trunk/English.lproj/english_help/sequel-pro_logo.jpg b/trunk/English.lproj/english_help/sequel-pro_logo.jpg new file mode 100644 index 00000000..18d9f2da Binary files /dev/null and b/trunk/English.lproj/english_help/sequel-pro_logo.jpg differ diff --git a/trunk/English.lproj/english_help/topics/bar.gif b/trunk/English.lproj/english_help/topics/bar.gif new file mode 100644 index 00000000..f716f3f9 Binary files /dev/null and b/trunk/English.lproj/english_help/topics/bar.gif differ diff --git a/trunk/English.lproj/english_help/topics/connect.html b/trunk/English.lproj/english_help/topics/connect.html new file mode 100755 index 00000000..2fbe0864 --- /dev/null +++ b/trunk/English.lproj/english_help/topics/connect.html @@ -0,0 +1,59 @@ + + +Sequel Pro Help - Connecting to a Database + + + + + + + + +
+ + + + + + + + + +
+ +

Connecting to a Database

+
+ +
+ +
+Back to the main menu +
+
+ + In order to work with a database and its tables, you must first be connected to it. The database connection screen appears at the start of the program. +
+
+ + + + + +
+ +
    +
  • Enter at least the host (IP or domain name). To connect to a local database, enter localhost or 127.0.0.1 as host.
  • +
  • If you enter a database, it will be selected when the connection to the server is established. Otherwise you can select one of the databases on the server afterwards.
  • +
  • If you enter no port, Sequel Pro uses the default port.
  • +
  • Choose "Save to favorites..." in the favorites popup-button to save a connection. Passwords are stored in the Keychain. To edit favorites open the Preferences.
  • +
  • You can connect to multiple databases by opening a new window (Menu File > New)
  • +
+
+ +
+ +
+ + + \ No newline at end of file diff --git a/trunk/English.lproj/english_help/topics/connect.jpg b/trunk/English.lproj/english_help/topics/connect.jpg new file mode 100644 index 00000000..e9c1ab6e Binary files /dev/null and b/trunk/English.lproj/english_help/topics/connect.jpg differ diff --git a/trunk/English.lproj/english_help/topics/console.html b/trunk/English.lproj/english_help/topics/console.html new file mode 100755 index 00000000..1269dc38 --- /dev/null +++ b/trunk/English.lproj/english_help/topics/console.html @@ -0,0 +1,48 @@ + + +Sequel Pro Help - Actions Console + + + + + + + + +
+ + + + + + + + + +
+ +

Console

+
+ +
+ +
+Back to the main menu +
+
+ + The Console at the bottom of Sequel Pro lists all of the actions you made in the current session accompanied by a timestamp. +It can be shown or hidden using the toolbar icon at the top that says "Show/Hide Console". You can also clear +the console by using the "Clear Console" button. If those two icons are not located in your toolbar then right-click +in the toolbar area and select "Customize Toolbar..." from the menu. You should then see a window +of icons which you can add to your Sequel Pro toolbar including the two mentioned above. +
+
+ + + +
+ + + \ No newline at end of file diff --git a/trunk/English.lproj/english_help/topics/data.html b/trunk/English.lproj/english_help/topics/data.html new file mode 100755 index 00000000..14aaeb9f --- /dev/null +++ b/trunk/English.lproj/english_help/topics/data.html @@ -0,0 +1,92 @@ + + +Sequel Pro Help - Data Management + + + + + + + + +
+ + + + + + + + + +
+ +

Data Management

+
+ +
+ +
+Back to the main menu +
+
+ + In order to view, add, modify, or change data (rows) in your database tables you must either be in the "Content" tab or the "Custom Query" tab. +
+
+Adding and editing fields + + + + +
+ +
    +
  • Add or remove entries with the plus- and minus-buttons. You can select more than one entry and remove them together.
  • +
  • Edit entries by double-clicking on the value you want to change. If the button with the three lines on it is clicked, double clicking on a value opens a sheet where you can edit it. This is preferred to edit large entries or entries with multiple lines.
  • +
  • Use the value specified in the preferences (NULL by default) to enter NULL-values.
  • +
  • Changes aren't written to the database until you deselect the row!
  • +
  • It is recommended that you edit only tables which have a primary key.
  • +
+
+ +
+
+Sorting and filtering the table content + + + + +
+ +
    +
  • To sort a table by a field, click on the header of the appropriate column in the content-view.
  • +
  • Click on it twice to sort the table in descending order.
  • +
  • Select a field and operator and enter a keyword to filter a table. Click on the Show All-button to disable filtering.
  • +
  • As wildcards use % and _ (% matches any number of characters, even zero characters; _ matches exactly one character)
  • +
  • If you have selected "Limit result..." in the Preferences, you can specify the first row to be returned and hit "Go".
  • +
+
+ +
+
+Binary Data (Images, Strings, Hex Representations) + + + + +
+ +
    +
  • Field type should be Blob or Longblob
  • +
  • To edit/enter the data, double select the field in the Content tab
  • +
  • Click on Open and load an image
  • +
  • Change to image and hex view
  • +
+
+ +
+ + + \ No newline at end of file diff --git a/trunk/English.lproj/english_help/topics/dump.html b/trunk/English.lproj/english_help/topics/dump.html new file mode 100755 index 00000000..99123b69 --- /dev/null +++ b/trunk/English.lproj/english_help/topics/dump.html @@ -0,0 +1,93 @@ + + +Sequel Pro Help - Data Dumps + + + + + + + + +
+ + + + + + + + + +
+ +

Data Dumps

+
+ +
+ +
+Back to the main menu +
+
+ + In order to perform actions with data dumps, you must use the "File->Import; File->Export" menu options of Sequel Pro. A variety +of exports/dumps can be performed: Sequel Pro dump, Export of Table Content Results (csv or xml format), Export of Custom +Query Results (csv or xml format), or Export of Multiple Table data (csv or xml format). On the other hand, you can only import a +Sequel Pro dump or a CSV file. +
+
+CSV File Format Information + + + + +
+ +
    +
  • You can choose the following characters: fields enclosed, fields terminated, escaped and line ends
  • +
  • The following characters are escaped: the escaped-character itself, the line ends character, the enclosed character (if given) and the fields terminated character if no enclosed character is given
  • +
  • NULL values are written without enclosed character. If it is enclosed, it is interpreted as a string.
  • +
  • When importing a csv, unenclosed \N is also interpreted as NULL (this format is used by mysqldump)
  • +
  • The recommended formats should work best. When importing, enclosed/terminated/escaped characters should be all only one character long (line ends may be longer).
  • +
+
+ +
+Importing Dumps + + + + +
+ +
    +
  • Choose "File->Import" from the Sequel Pro Menu
  • +
  • You must choose to import a CSV file (table data) or a Sequel Pro dump (varied information)
  • +
+
+ + +
+Excel CSV Formatting Options +
+If you wish to export data to a CSV file for use in Excel, use the following settings: + + + + +
+ +
    +
  • Enclosed by: " (single quote)
  • +
  • Escaped by: " (single quote)
  • +
  • Line ends: \r (for Macs)
  • +
  • Delimiter: , (comma)
  • +
+
+ +
+ + + \ No newline at end of file diff --git a/trunk/English.lproj/english_help/topics/encoding.html b/trunk/English.lproj/english_help/topics/encoding.html new file mode 100755 index 00000000..adaed683 --- /dev/null +++ b/trunk/English.lproj/english_help/topics/encoding.html @@ -0,0 +1,73 @@ + + +Sequel Pro Help - Text Encoding + + + + + + + + +
+ + + + + + + + + +
+ +

Text Encoding

+
+ +
+ +
+Back to the main menu +
+
+ + You may choose the type of encoding for the data (text) that is stored in your MySQL database. There are two +places to choose the encoding: the Preferences pane or the encoding pull-down bar at the bottom left of the application window. There +are over 20 encodings for you to choose from. +
+
+In the Preferences Pane + + + + +
+ +
    +
  • Open up the "Preferences Pane" of Sequel Pro
  • +
  • From the pull-down at the bottom left of the preferences window, labelled "Default Encoding", choose an option.
  • +
  • The encoding you choose will be the default encoding for all future databases
  • +
+
+
+In the Application Window + + + + +
+ +
    +
  • In the main application window there will be a pull-down at the bottom left of the window labelled "Encoding".
  • +
  • From the pull-down choose an encoding option.
  • +
  • The encoding you choose will be the default encoding for all future databases
  • +
+
+ + + +
+ + + \ No newline at end of file diff --git a/trunk/English.lproj/english_help/topics/preferences.html b/trunk/English.lproj/english_help/topics/preferences.html new file mode 100755 index 00000000..0350d76b --- /dev/null +++ b/trunk/English.lproj/english_help/topics/preferences.html @@ -0,0 +1,58 @@ + + +Sequel Pro Help - Setting Preferences + + + + + + + + +
+ + + + + + + + + +
+ +

Setting Preferences

+
+ +
+ +
+Back to the main menu +
+
+ +
+ + + + + +
+ +
    +
  • Choose if you want to reload the table after adding, editing or removing a row. If you reload it, you will be sure that the entries showed by Sequel Pro correspond to the entries in the MySQL database, but editing tables will become slow with big tables.
  • +
  • Choose if you want Sequel Pro to show an error message if no rows have been affected after adding or editing a row.
  • +
  • Choose if you want to display the values of blob and text fields (especially with big tables this can speed up the interface significantly because Sequel Pro will load only the blob and text fields of the rows you will be editing).
  • +
  • Choose if you want to limit the rows returned by the MySQL server. You can limit the result to a given number of rows to speed up the interface.
  • +
  • Select a value that is displayed and used to enter NULL-values.
  • +
  • Add favorites used to quickly connect to a MySQL database. Drag&drop them to change their order. Double-click to edit a favorite. Passwords are stored in the Keychain.
  • +
+
+ +
+ +
+ + + \ No newline at end of file diff --git a/trunk/English.lproj/english_help/topics/preferences.jpg b/trunk/English.lproj/english_help/topics/preferences.jpg new file mode 100644 index 00000000..64ae8e10 Binary files /dev/null and b/trunk/English.lproj/english_help/topics/preferences.jpg differ diff --git a/trunk/English.lproj/english_help/topics/query.html b/trunk/English.lproj/english_help/topics/query.html new file mode 100755 index 00000000..bb628047 --- /dev/null +++ b/trunk/English.lproj/english_help/topics/query.html @@ -0,0 +1,58 @@ + + +Sequel Pro Help - Performing Custom Queries + + + + + + + + +
+ + + + + + + + + +
+ +

Performing Custom Queries

+
+ +
+ +
+Back to the main menu +
+
+ + In order to perform a SQL query you must first choose the "Custom Query" tab. +
+
+ + + + +
+ +
    +
  • Enter your query and click on the "Run Query" button.
  • +
  • The result, if there is one, is displayed in the bottom view.
  • +
  • Under "Last Error Message" you can see the last error message returned by MySQL, if there is one.
  • +
  • Add your query to the favorites or select a favorite query with the favorites pop-up-button.
  • +
  • Select one of the last 20 queries with the history pop-up-button.
  • +
  • You can perform custom queries out of your favorite text editor by using the services menu (Services > Sequel Pro > Perform selection as MySQL query). Sequel Pro uses the last opened window to perform the query.
  • +
  • If you perferm a query out of a different text editor, be sure that Sequel Pro is already loaded and has at least one window open.
  • +
+
+ +
+ + + \ No newline at end of file diff --git a/trunk/English.lproj/english_help/topics/reference.html b/trunk/English.lproj/english_help/topics/reference.html new file mode 100755 index 00000000..b746bed9 --- /dev/null +++ b/trunk/English.lproj/english_help/topics/reference.html @@ -0,0 +1,212 @@ + + +Sequel Pro Help - MySQL SQL Referernce + + + + + + + + +
+ + + + + + + + + +
+ +

MySQL SQL Reference

+
+ +
+ +
+Back to the main menu +
+
+ + + + +
+ + In the following commands and functions, any italicized text should be replaced by a variable + or name of your choice. Any text within brackets ( [ and ] ) is optional. This is only a short reference + of the SQL commands supported in MySQL. It is NOT the full list and also may not be complete + nor up-to-date. + +
+ +
+ + + + + +
+ + Commands +
+ CREATE DATABASE [IF NOT EXISTS] name +
+ CREATE [UNIQUE|FULLTEXT] INDEX name ON table (column,..) +
+ CREATE TABLE [IF NOT EXISTS] name +
+ DELETE FROM table [WHERE clause] [LIMIT n] +
+ DROP DATABASE [IF EXISTS] name +
+ DROP TABLE [IF EXISTS] name +
+ GRANT privilege ON table TO user +
+ INSERT [INTO] table [ (column, ...) ] VALUES (values, ...) +
+ LOAD DATA INFILE file INTO TABLE name +
+ SELECT [DISTINCT|ALL| |] FROM table [WHERE clause ] +
+ UPDATE table SET column=value,... [WHERE clause] [LIMIT n] +
+
+ Logical Operators +
+ NOT or  ! - performs a logical not +
+ OR or | | - performs a logical or +
+ XOR - performs a logical exclusive or +
+ AND or && - performs a logical and +
+
+ + Aggregate Functions +
+ AVG(expression) +
+ BIT_AND(expression) +
+ BIT_OR(expression) +
+ COUNT(expression) +
+ MAX(expression) +
+ MIN(expression) +
+ STD(expression)/STDDEV(expression) +
+ SUM(expression) +
+
+ General Functions +
+ ABS(number) +
+ ACOS(number) +
+ ADDDATE(date, INTERVAL, amount, type) +
+ ASCII(char) +
+ ASIN(number) +
+ ATAN(number) +
+ ATAN2(x, y) +
+ BENCHMARK(num, function) +
+ BIN((decimal) +
+ BIT_COUNT(number) +
+ BIT_LENGTH(number) +
+ CEILING(number) +
+ CHAR_LENGTH(string) +
+ COS(radians) +
+ COT(radians) +
+ CURDATE() +
+ CURTIME() +
+ DATABASE() +
+ DATE_FORMAT(date, format) +
+ DAYNAME(date) +
+ DAYOFMONTH(date) +
+ DAYOFWEEK(date) +
+ DAYOFYEAR(date) +
+ EXP(power) +
+ FLOOR(number) +
+ FORMAT(number, decimals) +
+ HOUR(time) +
+ LENGTH(string) +
+ LOG(number) +
+ LOWER(number) +
+ MD5(string) +
+ MINUTE(time) +
+ MONTH(date) +
+ MONTHNAME(date) +
+ NOW() +
+ PASSWORD(string) +
+ QUARTER(date) +
+ REVERSE(string) +
+ SECOND(time) +
+ SIGN(number) +
+ SPACE(number) +
+ SQRT(number) +
+ UPPER(string) +
+ VERSION() +
+ WEEK(date) +
+ WEEKDAY(date) +
+ YEAR(date) +
+
+ +
+ + + \ No newline at end of file diff --git a/trunk/English.lproj/english_help/topics/sample_query.html b/trunk/English.lproj/english_help/topics/sample_query.html new file mode 100755 index 00000000..66b249fd --- /dev/null +++ b/trunk/English.lproj/english_help/topics/sample_query.html @@ -0,0 +1,81 @@ + + +Sequel Pro Help - SQL Query Examples + + + + + + + + +
+ + + + + + + + + +
+ +

SQL Query Examples

+
+ +
+ +
+Back to the main menu +
+
+ + + + +
+ + The following queries are only examples and any use of these queries in a company or critical environment + signifies the prior knowledge and acceptance, on behalf of the implentor, that the authors of this software are not liable for damages or losses in use of these queries. + No guarantees are made as to the quality or reliabity of the queries listed below. They are listed to help database designers/creators in their + work by showing an example. + +
+
+
+ + + + + + + +
+ + Example SELECT Query +
+ This obtains information an account table and only returns the accounts with logins of 1 or more, + ordered alphabetically by the person's name. +
+
+ SELECT * FROM accounts WHERE LoginCount > 1 ORDER BY Name +
+
+
+ + Example DELETE Query +
+ This query deletes one row of data from a product table. +
+
+ DELETE FROM products WHERE ProductID=5 LIMIT 1 +
+
+
+ +
+ + + \ No newline at end of file diff --git a/trunk/English.lproj/english_help/topics/sample_tables.html b/trunk/English.lproj/english_help/topics/sample_tables.html new file mode 100755 index 00000000..ba61c094 --- /dev/null +++ b/trunk/English.lproj/english_help/topics/sample_tables.html @@ -0,0 +1,374 @@ + + +Sequel Pro Help - SQL Table Examples + + + + + + + + +
+ + + + + + + + + +
+ +

SQL Table Examples

+
+ +
+ +
+Back to the main menu +
+
+ + + + +
+ + The following tables are only examples and any use of these tables in a company or critical environment + signifies the prior knowledge and acceptance, on behalf of the implentor, that the authors of this software are not liable for damages or losses in use of these tables. + No guarantees are made as to the quality or reliabity of the table designs listed below. They are listed to help database designers/creators in their + work by showing an example. +
+ The schema used is non-standard. It shows the table name above three columns. The first is the name of the variable, the second + is the type of that variable, and the third is the size (if necessary). +
+
+
+
+ + + + + +
+ + Example Accounts Database Table +
+ This table was designed for a custom system needing user accounts where they + could have a login and password to a website. It tracks logins, modifications to + the data and who created the account. It also allows the account to be locked out. + The password should be MD5 encrypted and stored in the database that way. +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ tblAccounts +
+  AccountID + + INTEGER + + 11 +
+  Name + + VARCHAR + + 200 +
+  Login + + VARCHAR + + 12 +
+  Password + + VARCHAR + + 32 +
+  Locked + + TINYINT + + +
+  LoginCount + + INTEGER + + 11 +
+  LastLogin + + DATETIME + + +
+  Created + + DATETIME + + +
+  CreatedBy + + VARCHAR + + 200 +
+  Updated + + DATETIME + +
+  UpdatedBy + + VARCHAR + + 200 +
+
+
+ * The AccountID is a PRIMARY KEY (also UNIQUE) +
+ * The Password is MD5 encrypted, hence the length of 32 +
+ * The Locked value is either zero (0) or one (1) +
+
+ + Example Products Database Table +
+ This table was designed to store basic production information, possibly in a + small business database or online shopping cart. It is highly recommended + that this table be customized to your needs. +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ tblProducts +
+  ProductID + + INTEGER + + 11 +
+  Name + + VARCHAR + + 200 +
+  ShortDescription + + VARCHAR + + 250 +
+  LongDescription + + TEXT + + +
+  Price + + DECIMAL(9,2) + + +
+  ImageURL + + VARCHAR + + 250 +
+  Locked + + TINYINT + + +
+  ViewCount + + INTEGER + + 11 +
+  LastViewed + + DATETIME + + +
+  Created + + DATETIME + + +
+  CreatedBy + + VARCHAR + + 200 +
+  Updated + + DATETIME + +
+  UpdatedBy + + VARCHAR + + 200 +
+
+
+ * The ProductID is a PRIMARY KEY (also UNIQUE) +
+ * The ImageURL points to an image of the product +
+ * The Locked value is either zero (0) or one (1) +
+
+ +
+ + + \ No newline at end of file diff --git a/trunk/English.lproj/english_help/topics/sequel-pro_logo.jpg b/trunk/English.lproj/english_help/topics/sequel-pro_logo.jpg new file mode 100644 index 00000000..18d9f2da Binary files /dev/null and b/trunk/English.lproj/english_help/topics/sequel-pro_logo.jpg differ diff --git a/trunk/English.lproj/english_help/topics/syntax.html b/trunk/English.lproj/english_help/topics/syntax.html new file mode 100755 index 00000000..39c4da72 --- /dev/null +++ b/trunk/English.lproj/english_help/topics/syntax.html @@ -0,0 +1,49 @@ + + +Sequel Pro Help - Table Syntax Generation + + + + + + + + +
+ + + + + + + + + +
+ +

Table Syntax Generation

+
+ +
+ +
+Back to the main menu +
+
+ + If you would like to generate a SQL output of your table's syntax (column types, sizes, keys, table name, etc..) use +the "Create Table Syntax" icon at the top of the application in the Sequel Pro Toolbar area. You can then use that text to +create a copy of the table in another database or it may also serve as a backup of the table's schema. If the "Create Table Syntax" icon is +not located in your toolbar then right-click +in the toolbar area and select "Customize Toolbar..." from the menu. You should then see a window +of icons which you can add to your Sequel Pro toolbar including the one mentioned above. +
+
+ + + +
+ + + \ No newline at end of file diff --git a/trunk/English.lproj/english_help/topics/tables.html b/trunk/English.lproj/english_help/topics/tables.html new file mode 100755 index 00000000..3840bb26 --- /dev/null +++ b/trunk/English.lproj/english_help/topics/tables.html @@ -0,0 +1,89 @@ + + +Sequel Pro Help - Managing Tables + + + + + + + + +
+ + + + + + + + + +
+ +

Managing Tables

+
+ +
+ +
+Back to the main menu +
+
+ + In order to perform actions with tables, you must first choose the "Structure" tab. +
+
+Adding and Editing Fields + + + + +
+ +
    +
  • Add fields with the plus-button and drop them with the minus-button.
  • +
  • Edit fields by double-click on the value you want to change. To cancel editing hit the esc-key.
  • +
  • Changes aren't written to the database until you deselect the row!
  • +
  • You can also drag & drop fields to change their order (if they are not indexed).
  • +
+
+ +
+
+Adding, editing, removing and copying tables + + + + +
+ +
    +
  • Add or remove tables with the plus- and minus-buttons.
  • +
  • If you add a table, Sequel Pro creates a field called "id" because a table must have at least one column. You can change or delete this field afterwards.
  • +
  • Change the name of a table by double-clicking on it. Hit the esc-key to cancel editing.
  • +
  • Select a table and hit the copy button under the list of tables to copy it. If you mark "Copy table content", the new table will also contain all entries of the old table.
  • +
+
+ +
+
+Adding and editing indexes + + + + +
+ +
    +
  • Add indexes with the plus-button and drop them with the minus-button.
  • +
  • Select "Key Type", "Key Name" and "Indexed Columns" in the sheet. If you don't specify a key name, the column name is used as name.
  • +
  • If you want to make an index of more than one column, enter them in the appropriated field separated by commas (without whitespace after the comma!).
  • +
+
+ +
+ + + \ No newline at end of file diff --git a/trunk/Growl Registration Ticket.growlRegDict b/trunk/Growl Registration Ticket.growlRegDict new file mode 100644 index 00000000..e2992404 --- /dev/null +++ b/trunk/Growl Registration Ticket.growlRegDict @@ -0,0 +1,26 @@ + + + + + AllNotifications + + Connected + Disconnected + Import Finished + Export Finished + Table Syntax Copied + Query Finished + + DefaultNotifications + + Connected + Disconnected + Import Finished + Export Finished + Table Syntax Copied + Query Finished + + TicketVersion + 1 + + diff --git a/trunk/Growl.framework/Growl b/trunk/Growl.framework/Growl new file mode 120000 index 00000000..85956e2d --- /dev/null +++ b/trunk/Growl.framework/Growl @@ -0,0 +1 @@ +Versions/Current/Growl \ No newline at end of file diff --git a/trunk/Growl.framework/Headers b/trunk/Growl.framework/Headers new file mode 120000 index 00000000..a177d2a6 --- /dev/null +++ b/trunk/Growl.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/trunk/Growl.framework/Resources b/trunk/Growl.framework/Resources new file mode 120000 index 00000000..953ee36f --- /dev/null +++ b/trunk/Growl.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/trunk/Growl.framework/Versions/A/Growl b/trunk/Growl.framework/Versions/A/Growl new file mode 100755 index 00000000..cfe458fd Binary files /dev/null and b/trunk/Growl.framework/Versions/A/Growl differ diff --git a/trunk/Growl.framework/Versions/A/Headers/Growl.h b/trunk/Growl.framework/Versions/A/Headers/Growl.h new file mode 100644 index 00000000..e2a44255 --- /dev/null +++ b/trunk/Growl.framework/Versions/A/Headers/Growl.h @@ -0,0 +1,6 @@ +#include "GrowlDefines.h" + +#ifdef __OBJC__ +# include "GrowlApplicationBridge.h" +#endif +#include "GrowlApplicationBridge-Carbon.h" diff --git a/trunk/Growl.framework/Versions/A/Headers/GrowlApplicationBridge-Carbon.h b/trunk/Growl.framework/Versions/A/Headers/GrowlApplicationBridge-Carbon.h new file mode 100644 index 00000000..e35663f6 --- /dev/null +++ b/trunk/Growl.framework/Versions/A/Headers/GrowlApplicationBridge-Carbon.h @@ -0,0 +1,780 @@ +// +// GrowlApplicationBridge-Carbon.h +// Growl +// +// Created by Mac-arena the Bored Zo on Wed Jun 18 2004. +// Based on GrowlApplicationBridge.h by Evan Schoenberg. +// This source code is in the public domain. You may freely link it into any +// program. +// + +#ifndef _GROWLAPPLICATIONBRIDGE_CARBON_H_ +#define _GROWLAPPLICATIONBRIDGE_CARBON_H_ + +#include +#include + +#ifndef GROWL_EXPORT +#define GROWL_EXPORT __attribute__((visibility("default"))) +#endif + +/*! @header GrowlApplicationBridge-Carbon.h + * @abstract Declares an API that Carbon applications can use to interact with Growl. + * @discussion GrowlApplicationBridge uses a delegate to provide information //XXX + * to Growl (such as your application's name and what notifications it may + * post) and to provide information to your application (such as that Growl + * is listening for notifications or that a notification has been clicked). + * + * You can set the Growldelegate with Growl_SetDelegate and find out the + * current delegate with Growl_GetDelegate. See struct Growl_Delegate for more + * information about the delegate. + */ + +__BEGIN_DECLS + +/*! @struct Growl_Delegate + * @abstract Delegate to supply GrowlApplicationBridge with information and respond to events. + * @discussion The Growl delegate provides your interface to + * GrowlApplicationBridge. When GrowlApplicationBridge needs information about + * your application, it looks for it in the delegate; when Growl or the user + * does something that you might be interested in, GrowlApplicationBridge + * looks for a callback in the delegate and calls it if present + * (meaning, if it is not NULL). + * XXX on all of that + * @field size The size of the delegate structure. + * @field applicationName The name of your application. + * @field registrationDictionary A dictionary describing your application and the notifications it can send out. + * @field applicationIconData Your application's icon. + * @field growlInstallationWindowTitle The title of the installation window. + * @field growlInstallationInformation Text to display in the installation window. + * @field growlUpdateWindowTitle The title of the update window. + * @field growlUpdateInformation Text to display in the update window. + * @field referenceCount A count of owners of the delegate. + * @field retain Called when GrowlApplicationBridge receives this delegate. + * @field release Called when GrowlApplicationBridge no longer needs this delegate. + * @field growlIsReady Called when GrowlHelperApp is listening for notifications. + * @field growlNotificationWasClicked Called when a Growl notification is clicked. + * @field growlNotificationTimedOut Called when a Growl notification timed out. + */ +struct Growl_Delegate { + /* @discussion This should be sizeof(struct Growl_Delegate). + */ + size_t size; + + /*All of these attributes are optional. + *Optional attributes can be NULL; required attributes that + * are NULL cause setting the Growl delegate to fail. + *XXX - move optional/required status into the discussion for each field + */ + + /* This name is used both internally and in the Growl preferences. + * + * This should remain stable between different versions and incarnations of + * your application. + * For example, "SurfWriter" is a good app name, whereas "SurfWriter 2.0" and + * "SurfWriter Lite" are not. + * + * This can be NULL if it is provided elsewhere, namely in an + * auto-discoverable plist file in your app bundle + * (XXX refer to more information on that) or in registrationDictionary. + */ + CFStringRef applicationName; + + /* + * Must contain at least these keys: + * GROWL_NOTIFICATIONS_ALL (CFArray): + * Contains the names of all notifications your application may post. + * + * Can also contain these keys: + * GROWL_NOTIFICATIONS_DEFAULT (CFArray): + * Names of notifications that should be enabled by default. + * If omitted, GROWL_NOTIFICATIONS_ALL will be used. + * GROWL_APP_NAME (CFString): + * Same as the applicationName member of this structure. + * If both are present, the applicationName member shall prevail. + * If this key is present, you may omit applicationName (set it to NULL). + * GROWL_APP_ICON (CFData): + * Same as the iconData member of this structure. + * If both are present, the iconData member shall prevail. + * If this key is present, you may omit iconData (set it to NULL). + * + * If you change the contents of this dictionary after setting the delegate, + * be sure to call Growl_Reregister. + * + * This can be NULL if you have an auto-discoverable plist file in your app + * bundle. (XXX refer to more information on that) + */ + CFDictionaryRef registrationDictionary; + + /* The data can be in any format supported by NSImage. As of + * Mac OS X 10.3, this includes the .icns, TIFF, JPEG, GIF, PNG, PDF, and + * PICT formats. + * + * If this is not supplied, Growl will look up your application's icon by + * its application name. + */ + CFDataRef applicationIconData; + + /* Installer display attributes + * + * These four attributes are used by the Growl installer, if this framework + * supports it. + * For any of these being NULL, a localised default will be + * supplied. + */ + + /* If this is NULL, Growl will use a default, + * localized title. + * + * Only used if you're using Growl-WithInstaller.framework. Otherwise, + * this member is ignored. + */ + CFStringRef growlInstallationWindowTitle; + /* This information may be as long or short as desired (the + * window will be sized to fit it). If Growl is not installed, it will + * be displayed to the user as an explanation of what Growl is and what + * it can do in your application. + * It should probably note that no download is required to install. + * + * If this is NULL, Growl will use a default, localized + * explanation. + * + * Only used if you're using Growl-WithInstaller.framework. Otherwise, + * this member is ignored. + */ + CFStringRef growlInstallationInformation; + /* If this is NULL, Growl will use a default, + * localized title. + * + * Only used if you're using Growl-WithInstaller.framework. Otherwise, + * this member is ignored. + */ + CFStringRef growlUpdateWindowTitle; + /* This information may be as long or short as desired (the + * window will be sized to fit it). If an older version of Growl is + * installed, it will be displayed to the user as an explanation that an + * updated version of Growl is included in your application and + * no download is required. + * + * If this is NULL, Growl will use a default, localized + * explanation. + * + * Only used if you're using Growl-WithInstaller.framework. Otherwise, + * this member is ignored. + */ + CFStringRef growlUpdateInformation; + + /* This member is provided for use by your retain and release + * callbacks (see below). + * + * GrowlApplicationBridge never directly uses this member. Instead, it + * calls your retain callback (if non-NULL) and your release + * callback (if non-NULL). + */ + unsigned referenceCount; + + //Functions. Currently all of these are optional (any of them can be NULL). + + /* When you call Growl_SetDelegate(newDelegate), it will call + * oldDelegate->release(oldDelegate), and then it will call + * newDelegate->retain(newDelegate), and the return value from retain + * is what will be set as the delegate. + * (This means that this member works like CFRetain and -[NSObject retain].) + * This member is optional (it can be NULL). + * For a delegate allocated with malloc, this member would be + * NULL. + * @result A delegate to which GrowlApplicationBridge holds a reference. + */ + void *(*retain)(void *); + /* When you call Growl_SetDelegate(newDelegate), it will call + * oldDelegate->release(oldDelegate), and then it will call + * newDelegate->retain(newDelegate), and the return value from retain + * is what will be set as the delegate. + * (This means that this member works like CFRelease and + * -[NSObject release].) + * This member is optional (it can be NULL). + * For a delegate allocated with malloc, this member might be + * free(3). + */ + void (*release)(void *); + + /* Informs the delegate that Growl (specifically, the GrowlHelperApp) was + * launched successfully (or was already running). The application can + * take actions with the knowledge that Growl is installed and functional. + */ + void (*growlIsReady)(void); + + /* Informs the delegate that a Growl notification was clicked. It is only + * sent for notifications sent with a non-NULL clickContext, + * so if you want to receive a message when a notification is clicked, + * clickContext must not be NULL when calling + * Growl_PostNotification or + * Growl_NotifyWithTitleDescriptionNameIconPriorityStickyClickContext. + */ + void (*growlNotificationWasClicked)(CFPropertyListRef clickContext); + + /* Informs the delegate that a Growl notification timed out. It is only + * sent for notifications sent with a non-NULL clickContext, + * so if you want to receive a message when a notification is clicked, + * clickContext must not be NULL when calling + * Growl_PostNotification or + * Growl_NotifyWithTitleDescriptionNameIconPriorityStickyClickContext. + */ + void (*growlNotificationTimedOut)(CFPropertyListRef clickContext); +}; + +/*! @struct Growl_Notification + * @abstract Structure describing a Growl notification. + * @discussion XXX + * @field size The size of the notification structure. + * @field name Identifies the notification. + * @field title Short synopsis of the notification. + * @field description Additional text. + * @field iconData An icon for the notification. + * @field priority An indicator of the notification's importance. + * @field reserved Bits reserved for future usage. + * @field isSticky Requests that a notification stay on-screen until dismissed explicitly. + * @field clickContext An identifier to be passed to your click callback when a notification is clicked. + * @field clickCallback A callback to call when the notification is clicked. + */ +struct Growl_Notification { + /* This should be sizeof(struct Growl_Notification). + */ + size_t size; + + /* The notification name distinguishes one type of + * notification from another. The name should be human-readable, as it + * will be displayed in the Growl preference pane. + * + * The name is used in the GROWL_NOTIFICATIONS_ALL and + * GROWL_NOTIFICATIONS_DEFAULT arrays in the registration dictionary, and + * in this member of the Growl_Notification structure. + */ + CFStringRef name; + + /* A notification's title describes the notification briefly. + * It should be easy to read quickly by the user. + */ + CFStringRef title; + + /* The description supplements the title with more + * information. It is usually longer and sometimes involves a list of + * subjects. For example, for a 'Download complete' notification, the + * description might have one filename per line. GrowlMail in Growl 0.6 + * uses a description of '%d new mail(s)' (formatted with the number of + * messages). + */ + CFStringRef description; + + /* The notification icon usually indicates either what + * happened (it may have the same icon as e.g. a toolbar item that + * started the process that led to the notification), or what it happened + * to (e.g. a document icon). + * + * The icon data is optional, so it can be NULL. In that + * case, the application icon is used alone. Not all displays support + * icons. + * + * The data can be in any format supported by NSImage. As of Mac OS X + * 10.3, this includes the .icns, TIFF, JPEG, GIF, PNG, PDF, and PICT form + * ats. + */ + CFDataRef iconData; + + /* Priority is new in Growl 0.6, and is represented as a + * signed integer from -2 to +2. 0 is Normal priority, -2 is Very Low + * priority, and +2 is Very High priority. + * + * Not all displays support priority. If you do not wish to assign a + * priority to your notification, assign 0. + */ + signed int priority; + + /* These bits are not used in Growl 0.6. Set them to 0. + */ + unsigned reserved: 31; + + /* When the sticky bit is clear, in most displays, + * notifications disappear after a certain amount of time. Sticky + * notifications, however, remain on-screen until the user dismisses them + * explicitly, usually by clicking them. + * + * Sticky notifications were introduced in Growl 0.6. Most notifications + * should not be sticky. Not all displays support sticky notifications, + * and the user may choose in Growl's preference pane to force the + * notification to be sticky or non-sticky, in which case the sticky bit + * in the notification will be ignored. + */ + unsigned isSticky: 1; + + /* If this is not NULL, and your click callback + * is not NULL either, this will be passed to the callback + * when your notification is clicked by the user. + * + * Click feedback was introduced in Growl 0.6, and it is optional. Not + * all displays support click feedback. + */ + CFPropertyListRef clickContext; + + /* If this is not NULL, it will be called instead + * of the Growl delegate's click callback when clickContext is + * non-NULL and the notification is clicked on by the user. + * + * Click feedback was introduced in Growl 0.6, and it is optional. Not + * all displays support click feedback. + * + * The per-notification click callback is not yet supported as of Growl + * 0.7. + */ + void (*clickCallback)(CFPropertyListRef clickContext); + + CFStringRef identifier; +}; + +#pragma mark - +#pragma mark Easy initialisers + +/*! @defined InitGrowlDelegate + * @abstract Callable macro. Initializes a Growl delegate structure to defaults. + * @discussion Call with a pointer to a struct Growl_Delegate. All of the + * members of the structure will be set to 0 or NULL, except for + * size (which will be set to sizeof(struct Growl_Delegate)) and + * referenceCount (which will be set to 1). + */ +#define InitGrowlDelegate(delegate) \ + do { \ + if (delegate) { \ + (delegate)->size = sizeof(struct Growl_Delegate); \ + (delegate)->applicationName = NULL; \ + (delegate)->registrationDictionary = NULL; \ + (delegate)->applicationIconData = NULL; \ + (delegate)->growlInstallationWindowTitle = NULL; \ + (delegate)->growlInstallationInformation = NULL; \ + (delegate)->growlUpdateWindowTitle = NULL; \ + (delegate)->growlUpdateInformation = NULL; \ + (delegate)->referenceCount = 1U; \ + (delegate)->retain = NULL; \ + (delegate)->release = NULL; \ + (delegate)->growlIsReady = NULL; \ + (delegate)->growlNotificationWasClicked = NULL; \ + (delegate)->growlNotificationTimedOut = NULL; \ + } \ + } while(0) + +/*! @defined InitGrowlNotification + * @abstract Callable macro. Initializes a Growl notification structure to defaults. + * @discussion Call with a pointer to a struct Growl_Notification. All of + * the members of the structure will be set to 0 or NULL, except + * for size (which will be set to + * sizeof(struct Growl_Notification)). + */ +#define InitGrowlNotification(notification) \ + do { \ + if (notification) { \ + (notification)->size = sizeof(struct Growl_Notification); \ + (notification)->name = NULL; \ + (notification)->title = NULL; \ + (notification)->description = NULL; \ + (notification)->iconData = NULL; \ + (notification)->priority = 0; \ + (notification)->reserved = 0U; \ + (notification)->isSticky = false; \ + (notification)->clickContext = NULL; \ + (notification)->clickCallback = NULL; \ + (notification)->identifier = NULL; \ + } \ + } while(0) + +#pragma mark - +#pragma mark Public API + +// @functiongroup Managing the Growl delegate + +/*! @function Growl_SetDelegate + * @abstract Replaces the current Growl delegate with a new one, or removes + * the Growl delegate. + * @param newDelegate + * @result Returns false and does nothing else if a pointer that was passed in + * is unsatisfactory (because it is non-NULL, but at least one + * required member of it is NULL). Otherwise, sets or unsets the + * delegate and returns true. + * @discussion When newDelegate is non-NULL, sets + * the delegate to newDelegate. When it is NULL, + * the current delegate will be unset, and no delegate will be in place. + * + * It is legal for newDelegate to be the current delegate; + * nothing will happen, and Growl_SetDelegate will return true. It is also + * legal for it to be NULL, as described above; again, it will + * return true. + * + * If there was a delegate in place before the call, Growl_SetDelegate will + * call the old delegate's release member if it was non-NULL. If + * newDelegate is non-NULL, Growl_SetDelegate will + * call newDelegate->retain, and set the delegate to its return + * value. + * + * If you are using Growl-WithInstaller.framework, and an older version of + * Growl is installed on the user's system, the user will automatically be + * prompted to update. + * + * GrowlApplicationBridge currently does not copy this structure, nor does it + * retain any of the CF objects in the structure (it regards the structure as + * a container that retains the objects when they are added and releases them + * when they are removed or the structure is destroyed). Also, + * GrowlApplicationBridge currently does not modify any member of the + * structure, except possibly the referenceCount by calling the retain and + * release members. + */ +GROWL_EXPORT Boolean Growl_SetDelegate(struct Growl_Delegate *newDelegate); + +/*! @function Growl_GetDelegate + * @abstract Returns the current Growl delegate, if any. + * @result The current Growl delegate. + * @discussion Returns the last pointer passed into Growl_SetDelegate, or + * NULL if no such call has been made. + * + * This function follows standard Core Foundation reference-counting rules. + * Because it is a Get function, not a Copy function, it will not retain the + * delegate on your behalf. You are responsible for retaining and releasing + * the delegate as needed. + */ +GROWL_EXPORT struct Growl_Delegate *Growl_GetDelegate(void); + +#pragma mark - + +// @functiongroup Posting Growl notifications + +/*! @function Growl_PostNotification + * @abstract Posts a Growl notification. + * @param notification The notification to post. + * @discussion This is the preferred means for sending a Growl notification. + * The notification name and at least one of the title and description are + * required (all three are preferred). All other parameters may be + * NULL (or 0 or false as appropriate) to accept default values. + * + * If using the Growl-WithInstaller framework, if Growl is not installed the + * user will be prompted to install Growl. + * If the user cancels, this function will have no effect until the next + * application session, at which time when it is called the user will be + * prompted again. The user is also given the option to not be prompted again. + * If the user does choose to install Growl, the requested notification will + * be displayed once Growl is installed and running. + */ +GROWL_EXPORT void Growl_PostNotification(const struct Growl_Notification *notification); + +/*! @function Growl_PostNotificationWithDictionary +* @abstract Notifies using a userInfo dictionary suitable for passing to +* CFDistributedNotificationCenter. +* @param userInfo The dictionary to notify with. +* @discussion Before Growl 0.6, your application would have posted +* notifications using CFDistributedNotificationCenter by creating a userInfo +* dictionary with the notification data. This had the advantage of allowing +* you to add other data to the dictionary for programs besides Growl that +* might be listening. +* +* This function allows you to use such dictionaries without being restricted +* to using CFDistributedNotificationCenter. The keys for this dictionary + * can be found in GrowlDefines.h. +*/ +GROWL_EXPORT void Growl_PostNotificationWithDictionary(CFDictionaryRef userInfo); + +/*! @function Growl_NotifyWithTitleDescriptionNameIconPriorityStickyClickContext + * @abstract Posts a Growl notification using parameter values. + * @param title The title of the notification. + * @param description The description of the notification. + * @param notificationName The name of the notification as listed in the + * registration dictionary. + * @param iconData Data representing a notification icon. Can be NULL. + * @param priority The priority of the notification (-2 to +2, with -2 + * being Very Low and +2 being Very High). + * @param isSticky If true, requests that this notification wait for a + * response from the user. + * @param clickContext An object to pass to the clickCallback, if any. Can + * be NULL, in which case the clickCallback is not called. + * @discussion Creates a temporary Growl_Notification, fills it out with the + * supplied information, and calls Growl_PostNotification on it. + * See struct Growl_Notification and Growl_PostNotification for more + * information. + * + * The icon data can be in any format supported by NSImage. As of Mac OS X + * 10.3, this includes the .icns, TIFF, JPEG, GIF, PNG, PDF, and PICT formats. + */ +GROWL_EXPORT void Growl_NotifyWithTitleDescriptionNameIconPriorityStickyClickContext( + /*inhale*/ + CFStringRef title, + CFStringRef description, + CFStringRef notificationName, + CFDataRef iconData, + signed int priority, + Boolean isSticky, + CFPropertyListRef clickContext); + +#pragma mark - + +// @functiongroup Registering + +/*! @function Growl_RegisterWithDictionary + * @abstract Register your application with Growl without setting a delegate. + * @discussion When you call this function with a dictionary, + * GrowlApplicationBridge registers your application using that dictionary. + * If you pass NULL, GrowlApplicationBridge will ask the delegate + * (if there is one) for a dictionary, and if that doesn't work, it will look + * in your application's bundle for an auto-discoverable plist. + * (XXX refer to more information on that) + * + * If you pass a dictionary to this function, it must include the + * GROWL_APP_NAME key, unless a delegate is set. + * + * This function is mainly an alternative to the delegate system introduced + * with Growl 0.6. Without a delegate, you cannot receive callbacks such as + * growlIsReady (since they are sent to the delegate). You can, + * however, set a delegate after registering without one. + * + * This function was introduced in Growl.framework 0.7. + * @result false if registration failed (e.g. if Growl isn't installed). + */ +GROWL_EXPORT Boolean Growl_RegisterWithDictionary(CFDictionaryRef regDict); + +/*! @function Growl_Reregister + * @abstract Updates your registration with Growl. + * @discussion If your application changes the contents of the + * GROWL_NOTIFICATIONS_ALL key in the registrationDictionary member of the + * Growl delegate, or if it changes the value of that member, or if it + * changes the contents of its auto-discoverable plist, call this function + * to have Growl update its registration information for your application. + * + * Otherwise, this function does not normally need to be called. If you're + * using a delegate, your application will be registered when you set the + * delegate if both the delegate and its registrationDictionary member are + * non-NULL. + * + * This function is now implemented using + * Growl_RegisterWithDictionary. + */ +GROWL_EXPORT void Growl_Reregister(void); + +#pragma mark - + +/*! @function Growl_SetWillRegisterWhenGrowlIsReady + * @abstract Tells GrowlApplicationBridge to register with Growl when Growl + * launches (or not). + * @discussion When Growl has started listening for notifications, it posts a + * GROWL_IS_READY notification on the Distributed Notification + * Center. GrowlApplicationBridge listens for this notification, using it to + * perform various tasks (such as calling your delegate's + * growlIsReady callback, if it has one). If this function is + * called with true, one of those tasks will be to reregister + * with Growl (in the manner of Growl_Reregister). + * + * This attribute is automatically set back to false + * (the default) after every GROWL_IS_READY notification. + * @param flag true if you want GrowlApplicationBridge to register with + * Growl when next it is ready; false if not. + */ +GROWL_EXPORT void Growl_SetWillRegisterWhenGrowlIsReady(Boolean flag); +/*! @function Growl_WillRegisterWhenGrowlIsReady + * @abstract Reports whether GrowlApplicationBridge will register with Growl + * when Growl next launches. + * @result true if GrowlApplicationBridge will register with + * Growl when next it posts GROWL_IS_READY; false if not. + */ +GROWL_EXPORT Boolean Growl_WillRegisterWhenGrowlIsReady(void); + +#pragma mark - + +// @functiongroup Obtaining registration dictionaries + +/*! @function Growl_CopyRegistrationDictionaryFromDelegate + * @abstract Asks the delegate for a registration dictionary. + * @discussion If no delegate is set, or if the delegate's + * registrationDictionary member is NULL, this + * function returns NULL. + * + * This function does not attempt to clean up the dictionary in any way - for + * example, if it is missing the GROWL_APP_NAME key, the result + * will be missing it too. Use + * Growl_CreateRegistrationDictionaryByFillingInDictionary or + * Growl_CreateRegistrationDictionaryByFillingInDictionaryRestrictedToKeys + * to try to fill in missing keys. + * + * This function was introduced in Growl.framework 0.7. + * @result A registration dictionary. + */ +GROWL_EXPORT CFDictionaryRef Growl_CopyRegistrationDictionaryFromDelegate(void); + +/*! @function Growl_CopyRegistrationDictionaryFromBundle + * @abstract Looks in a bundle for a registration dictionary. + * @discussion This function looks in a bundle for an auto-discoverable + * registration dictionary file using CFBundleCopyResourceURL. + * If it finds one, it loads the file using CFPropertyList and + * returns the result. + * + * If you pass NULL as the bundle, the main bundle is examined. + * + * This function does not attempt to clean up the dictionary in any way - for + * example, if it is missing the GROWL_APP_NAME key, the result + * will be missing it too. Use + * Growl_CreateRegistrationDictionaryByFillingInDictionary: or + * Growl_CreateRegistrationDictionaryByFillingInDictionaryRestrictedToKeys + * to try to fill in missing keys. + * + * This function was introduced in Growl.framework 0.7. + * @result A registration dictionary. + */ +GROWL_EXPORT CFDictionaryRef Growl_CopyRegistrationDictionaryFromBundle(CFBundleRef bundle); + +/*! @function Growl_CreateBestRegistrationDictionary + * @abstract Obtains a registration dictionary, filled out to the best of + * GrowlApplicationBridge's knowledge. + * @discussion This function creates a registration dictionary as best + * GrowlApplicationBridge knows how. + * + * First, GrowlApplicationBridge examines the Growl delegate (if there is + * one) and gets the registration dictionary from that. If no such dictionary + * was obtained, GrowlApplicationBridge looks in your application's main + * bundle for an auto-discoverable registration dictionary file. If that + * doesn't exist either, this function returns NULL. + * + * Second, GrowlApplicationBridge calls + * Growl_CreateRegistrationDictionaryByFillingInDictionary with + * whatever dictionary was obtained. The result of that function is the + * result of this function. + * + * GrowlApplicationBridge uses this function when you call + * Growl_SetDelegate, or when you call + * Growl_RegisterWithDictionary with NULL. + * + * This function was introduced in Growl.framework 0.7. + * @result A registration dictionary. + */ +GROWL_EXPORT CFDictionaryRef Growl_CreateBestRegistrationDictionary(void); + +#pragma mark - + +// @functiongroup Filling in registration dictionaries + +/*! @function Growl_CreateRegistrationDictionaryByFillingInDictionary + * @abstract Tries to fill in missing keys in a registration dictionary. + * @param regDict The dictionary to fill in. + * @result The dictionary with the keys filled in. + * @discussion This function examines the passed-in dictionary for missing keys, + * and tries to work out correct values for them. As of 0.7, it uses: + * + * Key Value + * --- ----- + * GROWL_APP_NAME CFBundleExecutableName + * GROWL_APP_ICON The icon of the application. + * GROWL_APP_LOCATION The location of the application. + * GROWL_NOTIFICATIONS_DEFAULT GROWL_NOTIFICATIONS_ALL + * + * Keys are only filled in if missing; if a key is present in the dictionary, + * its value will not be changed. + * + * This function was introduced in Growl.framework 0.7. + */ +GROWL_EXPORT CFDictionaryRef Growl_CreateRegistrationDictionaryByFillingInDictionary(CFDictionaryRef regDict); +/*! @function Growl_CreateRegistrationDictionaryByFillingInDictionaryRestrictedToKeys + * @abstract Tries to fill in missing keys in a registration dictionary. + * @param regDict The dictionary to fill in. + * @param keys The keys to fill in. If NULL, any missing keys are filled in. + * @result The dictionary with the keys filled in. + * @discussion This function examines the passed-in dictionary for missing keys, + * and tries to work out correct values for them. As of 0.7, it uses: + * + * Key Value + * --- ----- + * GROWL_APP_NAME CFBundleExecutableName + * GROWL_APP_ICON The icon of the application. + * GROWL_APP_LOCATION The location of the application. + * GROWL_NOTIFICATIONS_DEFAULT GROWL_NOTIFICATIONS_ALL + * + * Only those keys that are listed in keys will be filled in. + * Other missing keys are ignored. Also, keys are only filled in if missing; + * if a key is present in the dictionary, its value will not be changed. + * + * This function was introduced in Growl.framework 0.7. + */ +GROWL_EXPORT CFDictionaryRef Growl_CreateRegistrationDictionaryByFillingInDictionaryRestrictedToKeys(CFDictionaryRef regDict, CFSetRef keys); + +/*! @brief Tries to fill in missing keys in a notification dictionary. + * @param notifDict The dictionary to fill in. + * @return The dictionary with the keys filled in. This will be a separate instance from \a notifDict. + * @discussion This function examines the \a notifDict for missing keys, and + * tries to get them from the last known registration dictionary. As of 1.1, + * the keys that it will look for are: + * + * \li GROWL_APP_NAME + * \li GROWL_APP_ICON + * + * @since Growl.framework 1.1 + */ +GROWL_EXPORT CFDictionaryRef Growl_CreateNotificationDictionaryByFillingInDictionary(CFDictionaryRef notifDict); + +#pragma mark - + +// @functiongroup Querying Growl's status + +/*! @function Growl_IsInstalled + * @abstract Determines whether the Growl prefpane and its helper app are + * installed. + * @result Returns true if Growl is installed, false otherwise. + */ +GROWL_EXPORT Boolean Growl_IsInstalled(void); + +/*! @function Growl_IsRunning + * @abstract Cycles through the process list to find whether GrowlHelperApp + * is running. + * @result Returns true if Growl is running, false otherwise. + */ +GROWL_EXPORT Boolean Growl_IsRunning(void); + +#pragma mark - + +// @functiongroup Launching Growl + +/*! @typedef GrowlLaunchCallback + * @abstract Callback to notify you that Growl is running. + * @param context The context pointer passed to Growl_LaunchIfInstalled. + * @discussion Growl_LaunchIfInstalled calls this callback function if Growl + * was already running or if it launched Growl successfully. + */ +typedef void (*GrowlLaunchCallback)(void *context); + +/*! @function Growl_LaunchIfInstalled + * @abstract Launches GrowlHelperApp if it is not already running. + * @param callback A callback function which will be called if Growl was successfully + * launched or was already running. Can be NULL. + * @param context The context pointer to pass to the callback. Can be NULL. + * @result Returns true if Growl was successfully launched or was already + * running; returns false and does not call the callback otherwise. + * @discussion Returns true and calls the callback (if the callback is not + * NULL) if the Growl helper app began launching or was already + * running. Returns false and performs no other action if Growl could not be + * launched (e.g. because the Growl preference pane is not properly installed). + * + * If Growl_CreateBestRegistrationDictionary returns + * non-NULL, this function will register with Growl atomically. + * + * The callback should take a single argument; this is to allow applications + * to have context-relevant information passed back. It is perfectly + * acceptable for context to be NULL. The callback itself can be + * NULL if you don't want one. + */ +GROWL_EXPORT Boolean Growl_LaunchIfInstalled(GrowlLaunchCallback callback, void *context); + +#pragma mark - +#pragma mark Constants + +/*! @defined GROWL_PREFPANE_BUNDLE_IDENTIFIER + * @abstract The CFBundleIdentifier of the Growl preference pane bundle. + * @discussion GrowlApplicationBridge uses this to determine whether Growl is + * currently installed, by searching for the Growl preference pane. Your + * application probably does not need to use this macro itself. + */ +#ifndef GROWL_PREFPANE_BUNDLE_IDENTIFIER +#define GROWL_PREFPANE_BUNDLE_IDENTIFIER CFSTR("com.growl.prefpanel") +#endif + +__END_DECLS + +#endif /* _GROWLAPPLICATIONBRIDGE_CARBON_H_ */ diff --git a/trunk/Growl.framework/Versions/A/Headers/GrowlApplicationBridge.h b/trunk/Growl.framework/Versions/A/Headers/GrowlApplicationBridge.h new file mode 100644 index 00000000..4341f3fb --- /dev/null +++ b/trunk/Growl.framework/Versions/A/Headers/GrowlApplicationBridge.h @@ -0,0 +1,609 @@ +// +// GrowlApplicationBridge.h +// Growl +// +// Created by Evan Schoenberg on Wed Jun 16 2004. +// Copyright 2004-2006 The Growl Project. All rights reserved. +// + +/*! + * @header GrowlApplicationBridge.h + * @abstract Defines the GrowlApplicationBridge class. + * @discussion This header defines the GrowlApplicationBridge class as well as + * the GROWL_PREFPANE_BUNDLE_IDENTIFIER constant. + */ + +#ifndef __GrowlApplicationBridge_h__ +#define __GrowlApplicationBridge_h__ + +#import +#import +#import "GrowlDefines.h" + +//Forward declarations +@protocol GrowlApplicationBridgeDelegate; + +//Internal notification when the user chooses not to install (to avoid continuing to cache notifications awaiting installation) +#define GROWL_USER_CHOSE_NOT_TO_INSTALL_NOTIFICATION @"User chose not to install" + +//------------------------------------------------------------------------------ +#pragma mark - + +/*! + * @class GrowlApplicationBridge + * @abstract A class used to interface with Growl. + * @discussion This class provides a means to interface with Growl. + * + * Currently it provides a way to detect if Growl is installed and launch the + * GrowlHelperApp if it's not already running. + */ +@interface GrowlApplicationBridge : NSObject { + +} + +/*! + * @method isGrowlInstalled + * @abstract Detects whether Growl is installed. + * @discussion Determines if the Growl prefpane and its helper app are installed. + * @result Returns YES if Growl is installed, NO otherwise. + */ ++ (BOOL) isGrowlInstalled; + +/*! + * @method isGrowlRunning + * @abstract Detects whether GrowlHelperApp is currently running. + * @discussion Cycles through the process list to find whether GrowlHelperApp is running and returns its findings. + * @result Returns YES if GrowlHelperApp is running, NO otherwise. + */ ++ (BOOL) isGrowlRunning; + +#pragma mark - + +/*! + * @method setGrowlDelegate: + * @abstract Set the object which will be responsible for providing and receiving Growl information. + * @discussion This must be called before using GrowlApplicationBridge. + * + * The methods in the GrowlApplicationBridgeDelegate protocol are required + * and return the basic information needed to register with Growl. + * + * The methods in the GrowlApplicationBridgeDelegate_InformalProtocol + * informal protocol are individually optional. They provide a greater + * degree of interaction between the application and growl such as informing + * the application when one of its Growl notifications is clicked by the user. + * + * The methods in the GrowlApplicationBridgeDelegate_Installation_InformalProtocol + * informal protocol are individually optional and are only applicable when + * using the Growl-WithInstaller.framework which allows for automated Growl + * installation. + * + * When this method is called, data will be collected from inDelegate, Growl + * will be launched if it is not already running, and the application will be + * registered with Growl. + * + * If using the Growl-WithInstaller framework, if Growl is already installed + * but this copy of the framework has an updated version of Growl, the user + * will be prompted to update automatically. + * + * @param inDelegate The delegate for the GrowlApplicationBridge. It must conform to the GrowlApplicationBridgeDelegate protocol. + */ ++ (void) setGrowlDelegate:(NSObject *)inDelegate; + +/*! + * @method growlDelegate + * @abstract Return the object responsible for providing and receiving Growl information. + * @discussion See setGrowlDelegate: for details. + * @result The Growl delegate. + */ ++ (NSObject *) growlDelegate; + +#pragma mark - + +/*! + * @method notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext: + * @abstract Send a Growl notification. + * @discussion This is the preferred means for sending a Growl notification. + * The notification name and at least one of the title and description are + * required (all three are preferred). All other parameters may be + * nil (or 0 or NO as appropriate) to accept default values. + * + * If using the Growl-WithInstaller framework, if Growl is not installed the + * user will be prompted to install Growl. If the user cancels, this method + * will have no effect until the next application session, at which time when + * it is called the user will be prompted again. The user is also given the + * option to not be prompted again. If the user does choose to install Growl, + * the requested notification will be displayed once Growl is installed and + * running. + * + * @param title The title of the notification displayed to the user. + * @param description The full description of the notification displayed to the user. + * @param notifName The internal name of the notification. Should be human-readable, as it will be displayed in the Growl preference pane. + * @param iconData NSData object to show with the notification as its icon. If nil, the application's icon will be used instead. + * @param priority The priority of the notification. The default value is 0; positive values are higher priority and negative values are lower priority. Not all Growl displays support priority. + * @param isSticky If YES, the notification will remain on screen until clicked. Not all Growl displays support sticky notifications. + * @param clickContext A context passed back to the Growl delegate if it implements -(void)growlNotificationWasClicked: and the notification is clicked. Not all display plugins support clicking. The clickContext must be plist-encodable (completely of NSString, NSArray, NSNumber, NSDictionary, and NSData types). + */ ++ (void) notifyWithTitle:(NSString *)title + description:(NSString *)description + notificationName:(NSString *)notifName + iconData:(NSData *)iconData + priority:(signed int)priority + isSticky:(BOOL)isSticky + clickContext:(id)clickContext; + +/*! + * @method notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:identifier: + * @abstract Send a Growl notification. + * @discussion This is the preferred means for sending a Growl notification. + * The notification name and at least one of the title and description are + * required (all three are preferred). All other parameters may be + * nil (or 0 or NO as appropriate) to accept default values. + * + * If using the Growl-WithInstaller framework, if Growl is not installed the + * user will be prompted to install Growl. If the user cancels, this method + * will have no effect until the next application session, at which time when + * it is called the user will be prompted again. The user is also given the + * option to not be prompted again. If the user does choose to install Growl, + * the requested notification will be displayed once Growl is installed and + * running. + * + * @param title The title of the notification displayed to the user. + * @param description The full description of the notification displayed to the user. + * @param notifName The internal name of the notification. Should be human-readable, as it will be displayed in the Growl preference pane. + * @param iconData NSData object to show with the notification as its icon. If nil, the application's icon will be used instead. + * @param priority The priority of the notification. The default value is 0; positive values are higher priority and negative values are lower priority. Not all Growl displays support priority. + * @param isSticky If YES, the notification will remain on screen until clicked. Not all Growl displays support sticky notifications. + * @param clickContext A context passed back to the Growl delegate if it implements -(void)growlNotificationWasClicked: and the notification is clicked. Not all display plugins support clicking. The clickContext must be plist-encodable (completely of NSString, NSArray, NSNumber, NSDictionary, and NSData types). + * @param identifier An identifier for this notification. Notifications with equal identifiers are coalesced. + */ ++ (void) notifyWithTitle:(NSString *)title + description:(NSString *)description + notificationName:(NSString *)notifName + iconData:(NSData *)iconData + priority:(signed int)priority + isSticky:(BOOL)isSticky + clickContext:(id)clickContext + identifier:(NSString *)identifier; + +/*! + * @method notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:identifier: + * @abstract Send a Growl notification. + * @discussion This is the preferred means for sending a Growl notification. + * The notification name and at least one of the title and description are + * required (all three are preferred). All other parameters may be + * nil (or 0 or NO as appropriate) to accept default values. + * + * If using the Growl-WithInstaller framework, if Growl is not installed the + * user will be prompted to install Growl. If the user cancels, this method + * will have no effect until the next application session, at which time when + * it is called the user will be prompted again. The user is also given the + * option to not be prompted again. If the user does choose to install Growl, + * the requested notification will be displayed once Growl is installed and + * running. + * + * @param title The title of the notification displayed to the user. + * @param description The full description of the notification displayed to the user. + * @param notifName The internal name of the notification. Should be human-readable, as it will be displayed in the Growl preference pane. + * @param iconData NSData object to show with the notification as its icon. If nil, the application's icon will be used instead. + * @param priority The priority of the notification. The default value is 0; positive values are higher priority and negative values are lower priority. Not all Growl displays support priority. + * @param isSticky If YES, the notification will remain on screen until clicked. Not all Growl displays support sticky notifications. + * @param clickContext A context passed back to the Growl delegate if it implements -(void)growlNotificationWasClicked: and the notification is clicked. Not all display plugins support clicking. The clickContext must be plist-encodable (completely of NSString, NSArray, NSNumber, NSDictionary, and NSData types). + * @param identifier An identifier for this notification. Notifications with equal identifiers are coalesced. + */ ++ (void) notifyWithTitle:(NSString *)title + description:(NSString *)description + notificationName:(NSString *)notifName + iconData:(NSData *)iconData + priority:(signed int)priority + isSticky:(BOOL)isSticky + clickContext:(id)clickContext + identifier:(NSString *)identifier; + +/*! @method notifyWithDictionary: + * @abstract Notifies using a userInfo dictionary suitable for passing to + * NSDistributedNotificationCenter. + * @param userInfo The dictionary to notify with. + * @discussion Before Growl 0.6, your application would have posted + * notifications using NSDistributedNotificationCenter by + * creating a userInfo dictionary with the notification data. This had the + * advantage of allowing you to add other data to the dictionary for programs + * besides Growl that might be listening. + * + * This method allows you to use such dictionaries without being restricted + * to using NSDistributedNotificationCenter. The keys for this dictionary + * can be found in GrowlDefines.h. + */ ++ (void) notifyWithDictionary:(NSDictionary *)userInfo; + +#pragma mark - + +/*! @method registerWithDictionary: + * @abstract Register your application with Growl without setting a delegate. + * @discussion When you call this method with a dictionary, + * GrowlApplicationBridge registers your application using that dictionary. + * If you pass nil, GrowlApplicationBridge will ask the delegate + * (if there is one) for a dictionary, and if that doesn't work, it will look + * in your application's bundle for an auto-discoverable plist. + * (XXX refer to more information on that) + * + * If you pass a dictionary to this method, it must include the + * GROWL_APP_NAME key, unless a delegate is set. + * + * This method is mainly an alternative to the delegate system introduced + * with Growl 0.6. Without a delegate, you cannot receive callbacks such as + * -growlIsReady (since they are sent to the delegate). You can, + * however, set a delegate after registering without one. + * + * This method was introduced in Growl.framework 0.7. + */ ++ (BOOL) registerWithDictionary:(NSDictionary *)regDict; + +/*! @method reregisterGrowlNotifications + * @abstract Reregister the notifications for this application. + * @discussion This method does not normally need to be called. If your + * application changes what notifications it is registering with Growl, call + * this method to have the Growl delegate's + * -registrationDictionaryForGrowl method called again and the + * Growl registration information updated. + * + * This method is now implemented using -registerWithDictionary:. + */ ++ (void) reregisterGrowlNotifications; + +#pragma mark - + +/*! @method setWillRegisterWhenGrowlIsReady: + * @abstract Tells GrowlApplicationBridge to register with Growl when Growl + * launches (or not). + * @discussion When Growl has started listening for notifications, it posts a + * GROWL_IS_READY notification on the Distributed Notification + * Center. GrowlApplicationBridge listens for this notification, using it to + * perform various tasks (such as calling your delegate's + * -growlIsReady method, if it has one). If this method is + * called with YES, one of those tasks will be to reregister + * with Growl (in the manner of -reregisterGrowlNotifications). + * + * This attribute is automatically set back to NO (the default) + * after every GROWL_IS_READY notification. + * @param flag YES if you want GrowlApplicationBridge to register with + * Growl when next it is ready; NO if not. + */ ++ (void) setWillRegisterWhenGrowlIsReady:(BOOL)flag; +/*! @method willRegisterWhenGrowlIsReady + * @abstract Reports whether GrowlApplicationBridge will register with Growl + * when Growl next launches. + * @result YES if GrowlApplicationBridge will register with Growl + * when next it posts GROWL_IS_READY; NO if not. + */ ++ (BOOL) willRegisterWhenGrowlIsReady; + +#pragma mark - + +/*! @method registrationDictionaryFromDelegate + * @abstract Asks the delegate for a registration dictionary. + * @discussion If no delegate is set, or if the delegate's + * -registrationDictionaryForGrowl method returns + * nil, this method returns nil. + * + * This method does not attempt to clean up the dictionary in any way - for + * example, if it is missing the GROWL_APP_NAME key, the result + * will be missing it too. Use +[GrowlApplicationBridge + * registrationDictionaryByFillingInDictionary:] or + * +[GrowlApplicationBridge + * registrationDictionaryByFillingInDictionary:restrictToKeys:] to try + * to fill in missing keys. + * + * This method was introduced in Growl.framework 0.7. + * @result A registration dictionary. + */ ++ (NSDictionary *) registrationDictionaryFromDelegate; + +/*! @method registrationDictionaryFromBundle: + * @abstract Looks in a bundle for a registration dictionary. + * @discussion This method looks in a bundle for an auto-discoverable + * registration dictionary file using -[NSBundle + * pathForResource:ofType:]. If it finds one, it loads the file using + * +[NSDictionary dictionaryWithContentsOfFile:] and returns the + * result. + * + * If you pass nil as the bundle, the main bundle is examined. + * + * This method does not attempt to clean up the dictionary in any way - for + * example, if it is missing the GROWL_APP_NAME key, the result + * will be missing it too. Use +[GrowlApplicationBridge + * registrationDictionaryByFillingInDictionary:] or + * +[GrowlApplicationBridge + * registrationDictionaryByFillingInDictionary:restrictToKeys:] to try + * to fill in missing keys. + * + * This method was introduced in Growl.framework 0.7. + * @result A registration dictionary. + */ ++ (NSDictionary *) registrationDictionaryFromBundle:(NSBundle *)bundle; + +/*! @method bestRegistrationDictionary + * @abstract Obtains a registration dictionary, filled out to the best of + * GrowlApplicationBridge's knowledge. + * @discussion This method creates a registration dictionary as best + * GrowlApplicationBridge knows how. + * + * First, GrowlApplicationBridge contacts the Growl delegate (if there is + * one) and gets the registration dictionary from that. If no such dictionary + * was obtained, GrowlApplicationBridge looks in your application's main + * bundle for an auto-discoverable registration dictionary file. If that + * doesn't exist either, this method returns nil. + * + * Second, GrowlApplicationBridge calls + * +registrationDictionaryByFillingInDictionary: with whatever + * dictionary was obtained. The result of that method is the result of this + * method. + * + * GrowlApplicationBridge uses this method when you call + * +setGrowlDelegate:, or when you call + * +registerWithDictionary: with nil. + * + * This method was introduced in Growl.framework 0.7. + * @result A registration dictionary. + */ ++ (NSDictionary *) bestRegistrationDictionary; + +#pragma mark - + +/*! @method registrationDictionaryByFillingInDictionary: + * @abstract Tries to fill in missing keys in a registration dictionary. + * @discussion This method examines the passed-in dictionary for missing keys, + * and tries to work out correct values for them. As of 0.7, it uses: + * + * Key Value + * --- ----- + * GROWL_APP_NAME CFBundleExecutableName + * GROWL_APP_ICON The icon of the application. + * GROWL_APP_LOCATION The location of the application. + * GROWL_NOTIFICATIONS_DEFAULT GROWL_NOTIFICATIONS_ALL + * + * Keys are only filled in if missing; if a key is present in the dictionary, + * its value will not be changed. + * + * This method was introduced in Growl.framework 0.7. + * @param regDict The dictionary to fill in. + * @result The dictionary with the keys filled in. This is an autoreleased + * copy of regDict. + */ ++ (NSDictionary *) registrationDictionaryByFillingInDictionary:(NSDictionary *)regDict; +/*! @method registrationDictionaryByFillingInDictionary:restrictToKeys: + * @abstract Tries to fill in missing keys in a registration dictionary. + * @discussion This method examines the passed-in dictionary for missing keys, + * and tries to work out correct values for them. As of 0.7, it uses: + * + * Key Value + * --- ----- + * GROWL_APP_NAME CFBundleExecutableName + * GROWL_APP_ICON The icon of the application. + * GROWL_APP_LOCATION The location of the application. + * GROWL_NOTIFICATIONS_DEFAULT GROWL_NOTIFICATIONS_ALL + * + * Only those keys that are listed in keys will be filled in. + * Other missing keys are ignored. Also, keys are only filled in if missing; + * if a key is present in the dictionary, its value will not be changed. + * + * This method was introduced in Growl.framework 0.7. + * @param regDict The dictionary to fill in. + * @param keys The keys to fill in. If nil, any missing keys are filled in. + * @result The dictionary with the keys filled in. This is an autoreleased + * copy of regDict. + */ ++ (NSDictionary *) registrationDictionaryByFillingInDictionary:(NSDictionary *)regDict restrictToKeys:(NSSet *)keys; + +/*! @brief Tries to fill in missing keys in a notification dictionary. + * @param notifDict The dictionary to fill in. + * @return The dictionary with the keys filled in. This will be a separate instance from \a notifDict. + * @discussion This function examines the \a notifDict for missing keys, and + * tries to get them from the last known registration dictionary. As of 1.1, + * the keys that it will look for are: + * + * \li GROWL_APP_NAME + * \li GROWL_APP_ICON + * + * @since Growl.framework 1.1 + */ ++ (NSDictionary *) notificationDictionaryByFillingInDictionary:(NSDictionary *)regDict; + ++ (NSDictionary *) frameworkInfoDictionary; +@end + +//------------------------------------------------------------------------------ +#pragma mark - + +/*! + * @protocol GrowlApplicationBridgeDelegate + * @abstract Required protocol for the Growl delegate. + * @discussion The methods in this protocol are required and are called + * automatically as needed by GrowlApplicationBridge. See + * +[GrowlApplicationBridge setGrowlDelegate:]. + * See also GrowlApplicationBridgeDelegate_InformalProtocol. + */ + +@protocol GrowlApplicationBridgeDelegate + +// -registrationDictionaryForGrowl has moved to the informal protocol as of 0.7. + +@end + +//------------------------------------------------------------------------------ +#pragma mark - + +/*! + * @category NSObject(GrowlApplicationBridgeDelegate_InformalProtocol) + * @abstract Methods which may be optionally implemented by the GrowlDelegate. + * @discussion The methods in this informal protocol will only be called if implemented by the delegate. + */ +@interface NSObject (GrowlApplicationBridgeDelegate_InformalProtocol) + +/*! + * @method registrationDictionaryForGrowl + * @abstract Return the dictionary used to register this application with Growl. + * @discussion The returned dictionary gives Growl the complete list of + * notifications this application will ever send, and it also specifies which + * notifications should be enabled by default. Each is specified by an array + * of NSString objects. + * + * For most applications, these two arrays can be the same (if all sent + * notifications should be displayed by default). + * + * The NSString objects of these arrays will correspond to the + * notificationName: parameter passed in + * +[GrowlApplicationBridge + * notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:] calls. + * + * The dictionary should have the required key object pairs: + * key: GROWL_NOTIFICATIONS_ALL object: NSArray of NSString objects + * key: GROWL_NOTIFICATIONS_DEFAULT object: NSArray of NSString objects + * + * The dictionary may have the following key object pairs: + * key: GROWL_NOTIFICATIONS_HUMAN_READABLE_NAMES object: NSDictionary of key: notification name object: human-readable notification name + * + * You do not need to implement this method if you have an auto-discoverable + * plist file in your app bundle. (XXX refer to more information on that) + * + * @result The NSDictionary to use for registration. + */ +- (NSDictionary *) registrationDictionaryForGrowl; + +/*! + * @method applicationNameForGrowl + * @abstract Return the name of this application which will be used for Growl bookkeeping. + * @discussion This name is used both internally and in the Growl preferences. + * + * This should remain stable between different versions and incarnations of + * your application. + * For example, "SurfWriter" is a good app name, whereas "SurfWriter 2.0" and + * "SurfWriter Lite" are not. + * + * You do not need to implement this method if you are providing the + * application name elsewhere, meaning in an auto-discoverable plist file in + * your app bundle (XXX refer to more information on that) or in the result + * of -registrationDictionaryForGrowl. + * + * @result The name of the application using Growl. + */ +- (NSString *) applicationNameForGrowl; + +/*! + * @method applicationIconForGrowl + * @abstract Return the NSImage to treat as the application icon. + * @discussion The delegate may optionally return an NSImage + * object to use as the application icon. If this method is not implemented, + * {{{-applicationIconDataForGrowl}}} is tried. If that method is not + * implemented, the application's own icon is used. Neither method is + * generally needed. + * @result The NSImage to treat as the application icon. + */ +- (NSImage *) applicationIconForGrowl; + +/*! + * @method applicationIconDataForGrowl + * @abstract Return the NSData to treat as the application icon. + * @discussion The delegate may optionally return an NSData + * object to use as the application icon; if this is not implemented, the + * application's own icon is used. This is not generally needed. + * @result The NSData to treat as the application icon. + * @deprecated In version 1.1, in favor of {{{-applicationIconForGrowl}}}. + */ +- (NSData *) applicationIconDataForGrowl; + +/*! + * @method growlIsReady + * @abstract Informs the delegate that Growl has launched. + * @discussion Informs the delegate that Growl (specifically, the + * GrowlHelperApp) was launched successfully. The application can take actions + * with the knowledge that Growl is installed and functional. + */ +- (void) growlIsReady; + +/*! + * @method growlNotificationWasClicked: + * @abstract Informs the delegate that a Growl notification was clicked. + * @discussion Informs the delegate that a Growl notification was clicked. It + * is only sent for notifications sent with a non-nil + * clickContext, so if you want to receive a message when a notification is + * clicked, clickContext must not be nil when calling + * +[GrowlApplicationBridge notifyWithTitle: description:notificationName:iconData:priority:isSticky:clickContext:]. + * @param clickContext The clickContext passed when displaying the notification originally via +[GrowlApplicationBridge notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:]. + */ +- (void) growlNotificationWasClicked:(id)clickContext; + +/*! + * @method growlNotificationTimedOut: + * @abstract Informs the delegate that a Growl notification timed out. + * @discussion Informs the delegate that a Growl notification timed out. It + * is only sent for notifications sent with a non-nil + * clickContext, so if you want to receive a message when a notification is + * clicked, clickContext must not be nil when calling + * +[GrowlApplicationBridge notifyWithTitle: description:notificationName:iconData:priority:isSticky:clickContext:]. + * @param clickContext The clickContext passed when displaying the notification originally via +[GrowlApplicationBridge notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:]. + */ +- (void) growlNotificationTimedOut:(id)clickContext; + +@end + +#pragma mark - +/*! + * @category NSObject(GrowlApplicationBridgeDelegate_Installation_InformalProtocol) + * @abstract Methods which may be optionally implemented by the Growl delegate when used with Growl-WithInstaller.framework. + * @discussion The methods in this informal protocol will only be called if + * implemented by the delegate. They allow greater control of the information + * presented to the user when installing or upgrading Growl from within your + * application when using Growl-WithInstaller.framework. + */ +@interface NSObject (GrowlApplicationBridgeDelegate_Installation_InformalProtocol) + +/*! + * @method growlInstallationWindowTitle + * @abstract Return the title of the installation window. + * @discussion If not implemented, Growl will use a default, localized title. + * @result An NSString object to use as the title. + */ +- (NSString *)growlInstallationWindowTitle; + +/*! + * @method growlUpdateWindowTitle + * @abstract Return the title of the upgrade window. + * @discussion If not implemented, Growl will use a default, localized title. + * @result An NSString object to use as the title. + */ +- (NSString *)growlUpdateWindowTitle; + +/*! + * @method growlInstallationInformation + * @abstract Return the information to display when installing. + * @discussion This information may be as long or short as desired (the window + * will be sized to fit it). It will be displayed to the user as an + * explanation of what Growl is and what it can do in your application. It + * should probably note that no download is required to install. + * + * If this is not implemented, Growl will use a default, localized explanation. + * @result An NSAttributedString object to display. + */ +- (NSAttributedString *)growlInstallationInformation; + +/*! + * @method growlUpdateInformation + * @abstract Return the information to display when upgrading. + * @discussion This information may be as long or short as desired (the window + * will be sized to fit it). It will be displayed to the user as an + * explanation that an updated version of Growl is included in your + * application and no download is required. + * + * If this is not implemented, Growl will use a default, localized explanation. + * @result An NSAttributedString object to display. + */ +- (NSAttributedString *)growlUpdateInformation; + +@end + +//private +@interface GrowlApplicationBridge (GrowlInstallationPrompt_private) ++ (void) _userChoseNotToInstallGrowl; +@end + +#endif /* __GrowlApplicationBridge_h__ */ diff --git a/trunk/Growl.framework/Versions/A/Headers/GrowlDefines.h b/trunk/Growl.framework/Versions/A/Headers/GrowlDefines.h new file mode 100644 index 00000000..2b971cfe --- /dev/null +++ b/trunk/Growl.framework/Versions/A/Headers/GrowlDefines.h @@ -0,0 +1,348 @@ +// +// GrowlDefines.h +// + +#ifndef _GROWLDEFINES_H +#define _GROWLDEFINES_H + +#ifdef __OBJC__ +#define XSTR(x) (@x) +#define STRING_TYPE NSString * +#else +#define XSTR CFSTR +#define STRING_TYPE CFStringRef +#endif + +/*! @header GrowlDefines.h + * @abstract Defines all the notification keys. + * @discussion Defines all the keys used for registration with Growl and for + * Growl notifications. + * + * Most applications should use the functions or methods of Growl.framework + * instead of posting notifications such as those described here. + * @updated 2004-01-25 + */ + +// UserInfo Keys for Registration +#pragma mark UserInfo Keys for Registration + +/*! @group Registration userInfo keys */ +/* @abstract Keys for the userInfo dictionary of a GROWL_APP_REGISTRATION distributed notification. + * @discussion The values of these keys describe the application and the + * notifications it may post. + * + * Your application must register with Growl before it can post Growl + * notifications (and have them not be ignored). However, as of Growl 0.6, + * posting GROWL_APP_REGISTRATION notifications directly is no longer the + * preferred way to register your application. Your application should instead + * use Growl.framework's delegate system. + * See +[GrowlApplicationBridge setGrowlDelegate:] or Growl_SetDelegate for + * more information. + */ + +/*! @defined GROWL_APP_NAME + * @abstract The name of your application. + * @discussion The name of your application. This should remain stable between + * different versions and incarnations of your application. + * For example, "SurfWriter" is a good app name, whereas "SurfWriter 2.0" and + * "SurfWriter Lite" are not. + */ +#define GROWL_APP_NAME XSTR("ApplicationName") +/*! @defined GROWL_APP_ID + * @abstract The bundle identifier of your application. + * @discussion The bundle identifier of your application. This key should + * be unique for your application while there may be several applications + * with the same GROWL_APP_NAME. + * This key is optional. + */ +#define GROWL_APP_ID XSTR("ApplicationId") +/*! @defined GROWL_APP_ICON + * @abstract The image data for your application's icon. + * @discussion Image data representing your application's icon. This may be + * superimposed on a notification icon as a badge, used as the notification + * icon when a notification-specific icon is not supplied, or ignored + * altogether, depending on the display. Must be in a format supported by + * NSImage, such as TIFF, PNG, GIF, JPEG, BMP, PICT, or PDF. + * + * Optional. Not supported by all display plugins. + */ +#define GROWL_APP_ICON XSTR("ApplicationIcon") +/*! @defined GROWL_NOTIFICATIONS_DEFAULT + * @abstract The array of notifications to turn on by default. + * @discussion These are the names of the notifications that should be enabled + * by default when your application registers for the first time. If your + * application reregisters, Growl will look here for any new notification + * names found in GROWL_NOTIFICATIONS_ALL, but ignore any others. + */ +#define GROWL_NOTIFICATIONS_DEFAULT XSTR("DefaultNotifications") +/*! @defined GROWL_NOTIFICATIONS_ALL + * @abstract The array of all notifications your application can send. + * @discussion These are the names of all of the notifications that your + * application may post. See GROWL_NOTIFICATION_NAME for a discussion of good + * notification names. + */ +#define GROWL_NOTIFICATIONS_ALL XSTR("AllNotifications") +/*! @defined GROWL_NOTIFICATIONS_HUMAN_READABLE_DESCRIPTIONS + * @abstract A dictionary of human-readable names for your notifications. + * @discussion By default, the Growl UI will display notifications by the names given in GROWL_NOTIFICATIONS_ALL + * which correspond to the GROWL_NOTIFICATION_NAME. This dictionary specifies the human-readable name to display. + * The keys of the dictionary are GROWL_NOTIFICATION_NAME strings; the objects are the human-readable versions. + * For any GROWL_NOTIFICATION_NAME not specific in this dictionary, the GROWL_NOTIFICATION_NAME will be displayed. + * + * This key is optional. + */ +#define GROWL_NOTIFICATIONS_HUMAN_READABLE_NAMES XSTR("HumanReadableNames") +/*! @defined GROWL_NOTIFICATIONS_DESCRIPTIONS +* @abstract A dictionary of descriptions of _when_ each notification occurs +* @discussion This is an NSDictionary whose keys are GROWL_NOTIFICATION_NAME strings and whose objects are +* descriptions of _when_ each notification occurs, such as "You received a new mail message" or +* "A file finished downloading". +* +* This key is optional. +*/ +#define GROWL_NOTIFICATIONS_DESCRIPTIONS XSTR("NotificationDescriptions") + +/*! @defined GROWL_TICKET_VERSION + * @abstract The version of your registration ticket. + * @discussion Include this key in a ticket plist file that you put in your + * application bundle for auto-discovery. The current ticket version is 1. + */ +#define GROWL_TICKET_VERSION XSTR("TicketVersion") +// UserInfo Keys for Notifications +#pragma mark UserInfo Keys for Notifications + +/*! @group Notification userInfo keys */ +/* @abstract Keys for the userInfo dictionary of a GROWL_NOTIFICATION distributed notification. + * @discussion The values of these keys describe the content of a Growl + * notification. + * + * Not all of these keys are supported by all displays. Only the name, title, + * and description of a notification are universal. Most of the built-in + * displays do support all of these keys, and most other visual displays + * probably will also. But, as of 0.6, the Log, MailMe, and Speech displays + * support only textual data. + */ + +/*! @defined GROWL_NOTIFICATION_NAME + * @abstract The name of the notification. + * @discussion The name of the notification. Note that if you do not define + * GROWL_NOTIFICATIONS_HUMAN_READABLE_NAMES when registering your ticket originally this name + * will the one displayed within the Growl preference pane and should be human-readable. + */ +#define GROWL_NOTIFICATION_NAME XSTR("NotificationName") +/*! @defined GROWL_NOTIFICATION_TITLE + * @abstract The title to display in the notification. + * @discussion The title of the notification. Should be very brief. + * The title usually says what happened, e.g. "Download complete". + */ +#define GROWL_NOTIFICATION_TITLE XSTR("NotificationTitle") +/*! @defined GROWL_NOTIFICATION_DESCRIPTION + * @abstract The description to display in the notification. + * @discussion The description should be longer and more verbose than the title. + * The description usually tells the subject of the action, + * e.g. "Growl-0.6.dmg downloaded in 5.02 minutes". + */ +#define GROWL_NOTIFICATION_DESCRIPTION XSTR("NotificationDescription") +/*! @defined GROWL_NOTIFICATION_ICON + * @discussion Image data for the notification icon. Must be in a format + * supported by NSImage, such as TIFF, PNG, GIF, JPEG, BMP, PICT, or PDF. + * + * Optional. Not supported by all display plugins. + */ +#define GROWL_NOTIFICATION_ICON XSTR("NotificationIcon") +/*! @defined GROWL_NOTIFICATION_APP_ICON + * @discussion Image data for the application icon, in case GROWL_APP_ICON does + * not apply for some reason. Must be in a format supported by NSImage, such + * as TIFF, PNG, GIF, JPEG, BMP, PICT, or PDF. + * + * Optional. Not supported by all display plugins. + */ +#define GROWL_NOTIFICATION_APP_ICON XSTR("NotificationAppIcon") +/*! @defined GROWL_NOTIFICATION_PRIORITY + * @discussion The priority of the notification as an integer number from + * -2 to +2 (+2 being highest). + * + * Optional. Not supported by all display plugins. + */ +#define GROWL_NOTIFICATION_PRIORITY XSTR("NotificationPriority") +/*! @defined GROWL_NOTIFICATION_STICKY + * @discussion A Boolean number controlling whether the notification is sticky. + * + * Optional. Not supported by all display plugins. + */ +#define GROWL_NOTIFICATION_STICKY XSTR("NotificationSticky") +/*! @defined GROWL_NOTIFICATION_CLICK_CONTEXT + * @abstract Identifies which notification was clicked. + * @discussion An identifier for the notification for clicking purposes. + * + * This will be passed back to the application when the notification is + * clicked. It must be plist-encodable (a data, dictionary, array, number, or + * string object), and it should be unique for each notification you post. + * A good click context would be a UUID string returned by NSProcessInfo or + * CFUUID. + * + * Optional. Not supported by all display plugins. + */ +#define GROWL_NOTIFICATION_CLICK_CONTEXT XSTR("NotificationClickContext") + +/*! @defined GROWL_DISPLAY_PLUGIN + * @discussion The name of a display plugin which should be used for this notification. + * Optional. If this key is not set or the specified display plugin does not + * exist, the display plugin stored in the application ticket is used. This key + * allows applications to use different default display plugins for their + * notifications. The user can still override those settings in the preference + * pane. + */ +#define GROWL_DISPLAY_PLUGIN XSTR("NotificationDisplayPlugin") + +/*! @defined GROWL_NOTIFICATION_IDENTIFIER + * @abstract An identifier for the notification for coalescing purposes. + * Notifications with the same identifier fall into the same class; only + * the last notification of a class is displayed on the screen. If a + * notification of the same class is currently being displayed, it is + * replaced by this notification. + * + * Optional. Not supported by all display plugins. + */ +#define GROWL_NOTIFICATION_IDENTIFIER XSTR("GrowlNotificationIdentifier") + +/*! @defined GROWL_APP_PID + * @abstract The process identifier of the process which sends this + * notification. If this field is set, the application will only receive + * clicked and timed out notifications which originate from this process. + * + * Optional. + */ +#define GROWL_APP_PID XSTR("ApplicationPID") + +/*! @defined GROWL_NOTIFICATION_PROGRESS +* @abstract If this key is set, it should contain a double value wrapped +* in a NSNumber which describes some sort of progress (from 0.0 to 100.0). +* If this is key is not set, no progress bar is shown. +* +* Optional. Not supported by all display plugins. +*/ +#define GROWL_NOTIFICATION_PROGRESS XSTR("NotificationProgress") + +// Notifications +#pragma mark Notifications + +/*! @group Notification names */ +/* @abstract Names of distributed notifications used by Growl. + * @discussion These are notifications used by applications (directly or + * indirectly) to interact with Growl, and by Growl for interaction between + * its components. + * + * Most of these should no longer be used in Growl 0.6 and later, in favor of + * Growl.framework's GrowlApplicationBridge APIs. + */ + +/*! @defined GROWL_APP_REGISTRATION + * @abstract The distributed notification for registering your application. + * @discussion This is the name of the distributed notification that can be + * used to register applications with Growl. + * + * The userInfo dictionary for this notification can contain these keys: + *
    + *
  • GROWL_APP_NAME
  • + *
  • GROWL_APP_ICON
  • + *
  • GROWL_NOTIFICATIONS_ALL
  • + *
  • GROWL_NOTIFICATIONS_DEFAULT
  • + *
+ * + * No longer recommended as of Growl 0.6. An alternate method of registering + * is to use Growl.framework's delegate system. + * See +[GrowlApplicationBridge setGrowlDelegate:] or Growl_SetDelegate for + * more information. + */ +#define GROWL_APP_REGISTRATION XSTR("GrowlApplicationRegistrationNotification") +/*! @defined GROWL_APP_REGISTRATION_CONF + * @abstract The distributed notification for confirming registration. + * @discussion The name of the distributed notification sent to confirm the + * registration. Used by the Growl preference pane. Your application probably + * does not need to use this notification. + */ +#define GROWL_APP_REGISTRATION_CONF XSTR("GrowlApplicationRegistrationConfirmationNotification") +/*! @defined GROWL_NOTIFICATION + * @abstract The distributed notification for Growl notifications. + * @discussion This is what it all comes down to. This is the name of the + * distributed notification that your application posts to actually send a + * Growl notification. + * + * The userInfo dictionary for this notification can contain these keys: + *
    + *
  • GROWL_NOTIFICATION_NAME (required)
  • + *
  • GROWL_NOTIFICATION_TITLE (required)
  • + *
  • GROWL_NOTIFICATION_DESCRIPTION (required)
  • + *
  • GROWL_NOTIFICATION_ICON
  • + *
  • GROWL_NOTIFICATION_APP_ICON
  • + *
  • GROWL_NOTIFICATION_PRIORITY
  • + *
  • GROWL_NOTIFICATION_STICKY
  • + *
  • GROWL_NOTIFICATION_CLICK_CONTEXT
  • + *
  • GROWL_APP_NAME (required)
  • + *
+ * + * No longer recommended as of Growl 0.6. Three alternate methods of posting + * notifications are +[GrowlApplicationBridge notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:], + * Growl_NotifyWithTitleDescriptionNameIconPriorityStickyClickContext, and + * Growl_PostNotification. + */ +#define GROWL_NOTIFICATION XSTR("GrowlNotification") +/*! @defined GROWL_SHUTDOWN +* @abstract The distributed notification name that tells Growl to shutdown. +* @discussion The Growl preference pane posts this notification when the +* "Stop Growl" button is clicked. +*/ +#define GROWL_SHUTDOWN XSTR("GrowlShutdown") +/*! @defined GROWL_PING + * @abstract A distributed notification to check whether Growl is running. + * @discussion This is used by the Growl preference pane. If it receives a + * GROWL_PONG, the preference pane takes this to mean that Growl is running. + */ +#define GROWL_PING XSTR("Honey, Mind Taking Out The Trash") +/*! @defined GROWL_PONG + * @abstract The distributed notification sent in reply to GROWL_PING. + * @discussion GrowlHelperApp posts this in reply to GROWL_PING. + */ +#define GROWL_PONG XSTR("What Do You Want From Me, Woman") +/*! @defined GROWL_IS_READY + * @abstract The distributed notification sent when Growl starts up. + * @discussion GrowlHelperApp posts this when it has begin listening on all of + * its sources for new notifications. GrowlApplicationBridge (in + * Growl.framework), upon receiving this notification, reregisters using the + * registration dictionary supplied by its delegate. + */ +#define GROWL_IS_READY XSTR("Lend Me Some Sugar; I Am Your Neighbor!") +/*! @defined GROWL_NOTIFICATION_CLICKED + * @abstract The distributed notification sent when a supported notification is clicked. + * @discussion When a Growl notification with a click context is clicked on by + * the user, Growl posts this distributed notification. + * The GrowlApplicationBridge responds to this notification by calling a + * callback in its delegate. + */ +#define GROWL_NOTIFICATION_CLICKED XSTR("GrowlClicked!") +#define GROWL_NOTIFICATION_TIMED_OUT XSTR("GrowlTimedOut!") + +/*! @group Other symbols */ +/* Symbols which don't fit into any of the other categories. */ + +/*! @defined GROWL_KEY_CLICKED_CONTEXT + * @abstract Used internally as the key for the clickedContext passed over DNC. + * @discussion This key is used in GROWL_NOTIFICATION_CLICKED, and contains the + * click context that was supplied in the original notification. + */ +#define GROWL_KEY_CLICKED_CONTEXT XSTR("ClickedContext") +/*! @defined GROWL_REG_DICT_EXTENSION + * @abstract The filename extension for registration dictionaries. + * @discussion The GrowlApplicationBridge in Growl.framework registers with + * Growl by creating a file with the extension of .(GROWL_REG_DICT_EXTENSION) + * and opening it in the GrowlHelperApp. This happens whether or not Growl is + * running; if it was stopped, it quits immediately without listening for + * notifications. + */ +#define GROWL_REG_DICT_EXTENSION XSTR("growlRegDict") + + +#define GROWL_POSITION_PREFERENCE_KEY @"GrowlSelectedPosition" + +#endif //ndef _GROWLDEFINES_H diff --git a/trunk/Growl.framework/Versions/A/Resources/Info.plist b/trunk/Growl.framework/Versions/A/Resources/Info.plist new file mode 100644 index 00000000..38bfb237 --- /dev/null +++ b/trunk/Growl.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + Growl + CFBundleIdentifier + com.growl.growlframework + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.1.4 + CFBundleSignature + GRRR + CFBundleVersion + 1.1.4 + NSPrincipalClass + GrowlApplicationBridge + + diff --git a/trunk/Growl.framework/Versions/Current b/trunk/Growl.framework/Versions/Current new file mode 120000 index 00000000..8c7e5a66 --- /dev/null +++ b/trunk/Growl.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/trunk/ImageAndTextCell.h b/trunk/ImageAndTextCell.h new file mode 100755 index 00000000..897549cd --- /dev/null +++ b/trunk/ImageAndTextCell.h @@ -0,0 +1,59 @@ +// +// ImageAndTextCell.h +// +// Copyright © 2006, Apple. All rights reserved. +// + +/* + IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in + consideration of your agreement to the following terms, and your use, installation, + modification or redistribution of this Apple software constitutes acceptance of these + terms. If you do not agree with these terms, please do not use, install, modify or + redistribute this Apple software. + + In consideration of your agreement to abide by the following terms, and subject to these + terms, Apple grants you a personal, non-exclusive license, under Apple’s copyrights in + this original Apple software (the "Apple Software"), to use, reproduce, modify and + redistribute the Apple Software, with or without modifications, in source and/or binary + forms; provided that if you redistribute the Apple Software in its entirety and without + modifications, you must retain this notice and the following text and disclaimers in all + such redistributions of the Apple Software. Neither the name, trademarks, service marks + or logos of Apple Computer, Inc. may be used to endorse or promote products derived from + the Apple Software without specific prior written permission from Apple. Except as expressly + stated in this notice, no other rights or licenses, express or implied, are granted by Apple + herein, including but not limited to any patent rights that may be infringed by your + derivative works or by other works in which the Apple Software may be incorporated. + + The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, + EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS + USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. + + IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, + REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND + WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR + OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#import + +#define INDENT_AMOUNT 17 + +@interface ImageAndTextCell : NSTextFieldCell +{ +@private + NSImage *image; + int _indentationLevel; +} + +- (void)setImage:(NSImage *)anImage; +- (NSImage *)image; + +- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView; +- (NSSize)cellSize; + +- (void)setIndentationLevel:(int)level; +- (int)IndentationLevel; +@end diff --git a/trunk/ImageAndTextCell.m b/trunk/ImageAndTextCell.m new file mode 100755 index 00000000..96c0ff9d --- /dev/null +++ b/trunk/ImageAndTextCell.m @@ -0,0 +1,135 @@ +/* + ImageAndTextCell.m + Copyright © 2006, Apple Computer, Inc., all rights reserved. + + Subclass of NSTextFieldCell which can display text and an image simultaneously. +*/ + +#import "ImageAndTextCell.h" + +@implementation ImageAndTextCell + +- (void)dealloc { + [image release]; + image = nil; + [super dealloc]; +} + +- copyWithZone:(NSZone *)zone +{ + ImageAndTextCell *cell = (ImageAndTextCell *)[super copyWithZone:zone]; + cell->image = [image retain]; + return cell; +} + +- (void)setImage:(NSImage *)anImage +{ + if (anImage != image) + { + [image release]; + image = [anImage retain]; + } +} + +- (NSImage *)image +{ + return image; +} + +- (NSRect)imageFrameForCellFrame:(NSRect)cellFrame +{ + if (image != nil) + { + NSRect imageFrame; + imageFrame.size = [image size]; + imageFrame.origin = cellFrame.origin; + imageFrame.origin.x += ((1 - MIN(1,INDENT_AMOUNT)) * 3) + (INDENT_AMOUNT * _indentationLevel); + imageFrame.origin.y += ceil((cellFrame.size.height - imageFrame.size.height) / 2); + return imageFrame; + } + else + return NSZeroRect; +} + +- (void)editWithFrame:(NSRect)aRect inView:(NSView *)controlView editor:(NSText *)textObj delegate:(id)anObject event:(NSEvent *)theEvent +{ + if (_indentationLevel != 0) { + NSRect indentationFrame; + NSDivideRect(aRect, &indentationFrame, &aRect, (INDENT_AMOUNT * _indentationLevel), NSMinXEdge); + } + + if (image != nil) { + NSRect imageFrame; + NSDivideRect (aRect, &imageFrame, &aRect, 3 + [image size].width, NSMinXEdge); + } + + [super editWithFrame:aRect inView: controlView editor:textObj delegate:anObject event:theEvent]; +} + +- (void)selectWithFrame:(NSRect)aRect inView:(NSView *)controlView editor:(NSText *)textObj delegate:(id)anObject start:(int)selStart length:(int)selLength +{ + if (_indentationLevel != 0) { + NSRect indentationFrame; + NSDivideRect(aRect, &indentationFrame, &aRect, (INDENT_AMOUNT * _indentationLevel), NSMinXEdge); + } + + if (image != nil) { + NSRect imageFrame; + NSDivideRect (aRect, &imageFrame, &aRect, 3 + [image size].width, NSMinXEdge); + } + + [super selectWithFrame:aRect inView: controlView editor:textObj delegate:anObject start:selStart length:selLength]; +} + +- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView +{ + if (_indentationLevel != 0) + { + NSRect indentationFrame; + NSDivideRect(cellFrame, &indentationFrame, &cellFrame, (INDENT_AMOUNT * _indentationLevel), NSMinXEdge); + } + + if (image != nil) + { + NSSize imageSize; + NSRect imageFrame; + + imageSize = [image size]; + NSDivideRect(cellFrame, &imageFrame, &cellFrame, 3 + imageSize.width, NSMinXEdge); + if ([self drawsBackground]) + { + [[self backgroundColor] set]; + NSRectFill(imageFrame); + } + imageFrame.origin.x += 3; + imageFrame.size = imageSize; + + if ([controlView isFlipped]) + imageFrame.origin.y += ceil((cellFrame.size.height + imageFrame.size.height) / 2); + else + imageFrame.origin.y += ceil((cellFrame.size.height - imageFrame.size.height) / 2); + + [image compositeToPoint:imageFrame.origin operation:NSCompositeSourceOver]; + } + [super drawWithFrame:cellFrame inView:controlView]; +} + +- (NSSize)cellSize +{ + NSSize cellSize = [super cellSize]; + cellSize.width += (image ? [image size].width : 0) + ((1 - MIN(1,INDENT_AMOUNT)) * 3) + (INDENT_AMOUNT * _indentationLevel); + return cellSize; +} + +- (void)setIndentationLevel:(int)level +{ + _indentationLevel = MAX(0,level); +} + +- (int)IndentationLevel +{ + return _indentationLevel; +} + +@end + diff --git a/trunk/Info.plist b/trunk/Info.plist new file mode 100644 index 00000000..763c57c9 --- /dev/null +++ b/trunk/Info.plist @@ -0,0 +1,82 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDocumentTypes + + + CFBundleTypeExtensions + + ???? + + CFBundleTypeIconFile + + CFBundleTypeName + DocumentType + CFBundleTypeOSTypes + + ???? + + CFBundleTypeRole + Editor + NSDocumentClass + TableDocument + + + CFBundleExecutable + Sequel Pro + CFBundleGetInfoString + Sequel Pro v0.9.2 + CFBundleHelpBookFolder + english_help + CFBundleHelpBookName + Sequel Pro Help + CFBundleIconFile + appicon.icns + CFBundleIdentifier + com.google.code.sequel-pro + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Sequel Pro + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 0.9.2 + NSAppleScriptEnabled + YES + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + SUFeedURL + http://sequelpro.com/appcast/app-releases.xml + NSServices + + + NSKeyEquivalent + + default + M + + NSMenuItem + + default + Sequel Pro/Perform selection as MySQL query + + NSMessage + doPerformQueryService + NSPortName + Sequel Pro + NSSendTypes + + NSStringPboardType + + + + + diff --git a/trunk/KeyChain.h b/trunk/KeyChain.h new file mode 100644 index 00000000..f0caf0da --- /dev/null +++ b/trunk/KeyChain.h @@ -0,0 +1,37 @@ +// +// KeyChain.h +// sequel-pro +// +// Created by lorenz textor (lorenz@textor.ch) on Wed Dec 25 2002. +// Copyright (c) 2002-2003 Lorenz Textor. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at +// Or mail to + +#import +#import + + +@interface KeyChain : NSObject { + +} + +- (void)addPassword:(NSString *)password forName:(NSString *)name account:(NSString *)account; +- (NSString *)getPasswordForName:(NSString *)name account:(NSString *)account; +- (void)deletePasswordForName:(NSString *)name account:(NSString *)account; + +@end diff --git a/trunk/KeyChain.m b/trunk/KeyChain.m new file mode 100644 index 00000000..7e71c489 --- /dev/null +++ b/trunk/KeyChain.m @@ -0,0 +1,64 @@ +// +// KeyChain.m +// sequel-pro +// +// Created by lorenz textor (lorenz@textor.ch) on Wed Dec 25 2002. +// Copyright (c) 2002-2003 Lorenz Textor. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at +// Or mail to + +#import "KeyChain.h" + + +@implementation KeyChain + +- (void)addPassword:(NSString *)password forName:(NSString *)name account:(NSString *)account +{ + int code; + code = kcaddgenericpassword([name cString], [account cString], + [password cStringLength], [password cString], NULL); + + if ( code != 0 ) + NSLog(@"Error while trying to add password for name: %@ account: %@", name, account); +} + +- (NSString *)getPasswordForName:(NSString *)name account:(NSString *)account +{ + int code; + UInt32 length; + void *p = (void *)malloc(128 * sizeof(char)); + NSString *password = @""; + + code = kcfindgenericpassword([name cString], [account cString], 128, p, &length, nil); + + if (!code) + password = [NSString stringWithCString:(const char*)p length:length]; + free(p); + + return password; +} + +- (void)deletePasswordForName:(NSString *)name account:(NSString *)account +{ + KCItemRef itemref = nil ; + + kcfindgenericpassword([name cString],[account cString],nil,nil,nil,&itemref); + KCDeleteItem(itemref); +} + +@end diff --git a/trunk/MCPKit_bundled.framework/Headers b/trunk/MCPKit_bundled.framework/Headers new file mode 120000 index 00000000..fc757d7c --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers/ \ No newline at end of file diff --git a/trunk/MCPKit_bundled.framework/MCPKit_bundled b/trunk/MCPKit_bundled.framework/MCPKit_bundled new file mode 120000 index 00000000..88bf2d87 --- /dev/null +++ b/trunk/MCPKit_bundled.framework/MCPKit_bundled @@ -0,0 +1 @@ +Versions/Current/MCPKit_bundled \ No newline at end of file diff --git a/trunk/MCPKit_bundled.framework/PrivateHeaders b/trunk/MCPKit_bundled.framework/PrivateHeaders new file mode 120000 index 00000000..834d4c04 --- /dev/null +++ b/trunk/MCPKit_bundled.framework/PrivateHeaders @@ -0,0 +1 @@ +Versions/Current/PrivateHeaders/ \ No newline at end of file diff --git a/trunk/MCPKit_bundled.framework/Resources b/trunk/MCPKit_bundled.framework/Resources new file mode 120000 index 00000000..089faccc --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources/ \ No newline at end of file diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPAttribute.h b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPAttribute.h new file mode 100644 index 00000000..7044718d --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPAttribute.h @@ -0,0 +1,104 @@ +// +// MCPAttribute.h +// MCPModeler +// +// Created by Serge Cohen (serge.cohen@m4x.org) on 09/08/04. +// Copyright 2004 Serge Cohen. All rights reserved. +// +// This code is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2 of the License, or any later version. +// +// This code is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// For a copy of the GNU General Public License, visit or +// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330, +// Boston, MA 02111-1307, USA. +// +// More info at +// + + +#import + +@class MCPModel; +@class MCPClassDescription; +@class MCPRelation; +@class MCPJoin; + + +@interface MCPAttribute : NSObject < NSCoding > { +@protected + MCPClassDescription *classDescription; // ClassDescription of which the attribute is attribute + NSString *name; // Name of the attribute (Obj-C side) + Class valueClass; // Class used by the attribute (or NULL if the internal type is not an object) + NSString *internalType; // Name of the class, or type used for the class definition + NSString *externalName; // Name of the corresponding column in the DB + NSString *externalType; // Type used to store the attribute (in the DB) + unsigned int width; // Width (for storing by the DB) + BOOL allowsNull; // Attribute can be null + BOOL autoGenerated; // Attribute is auto generated by the DB + BOOL isPartOfKey; // Attribute is part of theprimary key of the class description + BOOL isPartOfIdentity; // Attribute is part of the idclass description of the class description + BOOL hasAccessor; // Does this attribute have an accessor + id defaultValue; // Default value of the attribute + NSMutableArray *joins; // An array of the joins using this attribute +// NSMutableArray *relations; // An array of the relations (MCPRelation) that use this attribue as join +} + +#pragma mark Class methods ++ (void) initialize; + +#pragma mark Life cycle +- (id) initForClassDescription:(MCPClassDescription *) iClassDescription withName:(NSString *) iName; +- (void) dealloc; + +#pragma mark NSCoding protocol +- (id) initWithCoder:(NSCoder *) decoder; +- (void) encodeWithCoder:(NSCoder *) encoder; + +#pragma mark Setters +- (void) setName:(NSString *) iName; +- (void) setValueClass:(Class) iValueClass; +- (void) setInternalType:(NSString *) iInternalType; +- (void) setExternalType:(NSString *) iExternalType; +- (void) setExternalName:(NSString *) iExternalName; +- (void) setWidth:(unsigned int) iWidth; +- (void) setAllowsNull:(BOOL) iAllowsNull; +- (void) setAutoGenerated:(BOOL) iAutoGenerated; +- (void) setIsPartOfKey:(BOOL) iIsPartOfKey; +- (void) setIsPartOfIdentity:(BOOL) iIsPartOfIdentity; +- (void) setHasAccessor:(BOOL) iHasAccessor; +- (void) setDefaultValue:(id) iDefaultValue; +- (void) insertObject:(MCPJoin *) iJoin inJoinsAtIndex:(unsigned int) index; +- (void) removeObjectFromJoinsAtIndex:(unsigned int) index; +//- (void) addRelation:(MCPRelation *) iRelation; +//- (void) removeRelation:(MCPRelation *) iRelation; + +#pragma mark Getters +- (MCPClassDescription *) classDescription; +- (NSString *) name; +- (Class) valueClass; +- (NSString *) valueClassName; +- (NSString *) internalType; +- (NSString *) externalName; +- (NSString *) externalType; +- (unsigned int) width; +- (BOOL) allowsNull; +- (BOOL) autoGenerated; +- (BOOL) isPartOfKey; +- (BOOL) isPartOfIdentity; +- (BOOL) hasAccessor; +- (id) defaultValue; +- (unsigned int) countOfJoins; +- (MCPJoin *) objectInJoinsAtIndex:(unsigned int) index; +- (unsigned int) indexOfJoinIdenticalTo:(id) iJoin; + +#pragma mark Some general methods: +- (BOOL) isEqual:(id) iObject; + + +@end diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPClassDescription+MCPEntreprise.h b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPClassDescription+MCPEntreprise.h new file mode 100644 index 00000000..a41a4617 --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPClassDescription+MCPEntreprise.h @@ -0,0 +1,42 @@ +// +// MCPClassDescription+MCPEntreprise.h +// MCPModeler +// +// Created by Serge Cohen (serge.cohen@m4x.org) on 01/11/04. +// Copyright 2004 Serge Cohen. All rights reserved. +// +// This code is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2 of the License, or any later version. +// +// This code is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// For a copy of the GNU General Public License, visit or +// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330, +// Boston, MA 02111-1307, USA. +// +// More info at +// + +#import +#import "MCPClassDescription.h" + +@interface MCPClassDescription (MCPEntreprise) + +#pragma mark Pseudo getters (for NSClassDescription overload) +- (NSArray *) attributeKeys; +- (NSString *) inverseRelationshipKey:(NSString *) relationshipKey; +- (NSArray *) toManyRelationshipKeys; +- (NSArray *) toOneRelationshipKeys; + +#pragma mark Specifics for MCPObject +- (NSArray *) primaryKeyAttributes; +- (NSArray *) identityAttributes; +- (MCPAttribute *) attributeWithName: (NSString *) iName; +- (MCPRelation *) relationWithName:(NSString *) iRelationName; +- (BOOL) singleIntAutoGenKey; + +@end diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPClassDescription.h b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPClassDescription.h new file mode 100644 index 00000000..26ca382e --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPClassDescription.h @@ -0,0 +1,91 @@ +// +// MCPClassDescription.h +// MCPModeler +// +// Created by Serge Cohen (serge.cohen@m4x.org) on 09/08/04. +// Copyright 2004 Serge Cohen. All rights reserved. +// +// This code is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2 of the License, or any later version. +// +// This code is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// For a copy of the GNU General Public License, visit or +// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330, +// Boston, MA 02111-1307, USA. +// +// More info at +// + + +#import + +@class MCPModel; +@class MCPAttribute; +@class MCPRelation; +@class MCPRelation; + +@interface MCPClassDescription : NSClassDescription < NSCoding > { +@protected + MCPModel *model; // The model where we stand + NSString *name; // Name of the class (can not use className, as it is already used by NSObject). + NSString *externalName; // Name of the table for storage + NSMutableArray *attributes; // array of the attributes of the class description + NSMutableArray *relations; // array of the relations of the class description (both origin and destination) + NSMutableArray *incomings; // array if the INCOMMING relation (just to be sure we are able to invalidate those if necessary) + Class representedClass; // the class object that the description represents. +} + +#warning hasSingleIntAutoGenKey should be a method returning the obvious (from the name). +// This correspond to the method singleIntAutoGenKey in the category MCPEntreprise... which name should I change... + +#pragma mark Class methods ++ (void) initialize; + +#pragma mark Life cycle +- (id) initInModel:(MCPModel *) iModel withName:(NSString *) iName; +- (void) dealloc; + +#pragma mark NSCoding protocol +- (id) initWithCoder:(NSCoder *) decoder; +- (void) encodeWithCoder:(NSCoder *) encoder; + +#pragma mark Making new attributes and relations +- (MCPAttribute *) addNewAttributeWithName:(NSString *) iName inPosition:(int) index; +- (MCPRelation *) addNewRelationTo:(MCPClassDescription *) iTo name:(NSString *) iName inPostion:(int) index; + +#pragma mark Setters +- (void) setName:(NSString *) iName; +- (void) setExternalName:(NSString *) iExternalName; +- (void) insertObject:(MCPAttribute *) iAttribute inAttributesAtIndex:(unsigned int) index; +- (void) removeObjectFromAttributesAtIndex:(unsigned int) index; +- (void) insertObject:(MCPRelation *) iRelation inRelationsAtIndex:(unsigned int) index; +- (void) removeObjectFromRelationsAtIndex:(unsigned int) index; + +#pragma mark Getters +- (MCPModel *) model; +- (NSString *) name; +- (NSString *) externalName; +- (NSArray *) attributes; +- (unsigned int) countOfAttributes; +- (MCPAttribute *) objectInAttributesAtIndex:(unsigned int) index; +- (unsigned int) indexOfAttribute:(id) iAttribute; +- (NSArray *) relations; +- (unsigned int) countOfRelations; +- (MCPRelation *) objectInRelationsAtIndex:(unsigned int) index; +- (unsigned int) indexOfRelation:(id) iRelation; +- (Class) representedClass; + +#pragma mark Some general methods: +- (BOOL) isEqual:(id) iObject; + +#pragma mark Output for logging +- (NSString *) descriptionWithLocale:(NSDictionary *) locale; +//- (NSString *) descriptionWithLocale:(NSDictionary *) locale; +//- (NSString *) description; + +@end diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPConnection.h b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPConnection.h new file mode 100644 index 00000000..5b2f2eaf --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPConnection.h @@ -0,0 +1,158 @@ +// +// MCPConnection.h +// SMySQL +// +// Created by serge cohen (serge.cohen@m4x.org) on Sat Dec 08 2001. +// Copyright (c) 2001 Serge Cohen. +// +// This code is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2 of the License, or any later version. +// +// This code is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// For a copy of the GNU General Public License, visit or +// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330, +// Boston, MA 02111-1307, USA. +// +// More info at +// +// $Id: MCPConnection.h 335 2006-01-08 21:14:07Z serge $ +// $Author: serge $ + + +#import +#import "mysql.h" +#import "MCPConstants.h" + + +@class MCPResult; + +// Deafult connection option +extern const unsigned int kMCPConnectionDefaultOption; + +// Default socket (from the mysql.h used at compile time) +extern const char *kMCPConnectionDefaultSocket; + +// Added to mysql error code +extern const unsigned int kMCPConnectionNotInited; + +// The length of the truncation if required: +extern const unsigned int kLengthOfTruncationForLog; + +@interface MCPConnection : NSObject { +@protected + MYSQL *mConnection; /*"The inited MySQL connection."*/ + BOOL mConnected; /*"Reflect the fact that the connection is already in place or not."*/ + NSStringEncoding mEncoding; /*"The encoding used by MySQL server, to ISO-1 default."*/ + NSTimeZone *mTimeZone; /*"The time zone of the session."*/ + unsigned int mConnectionFlags; /*"The flags to be used for the connection to the database."*/ +} +/*" +Getting default of MySQL +"*/ ++ (NSDictionary *) getMySQLLocales; ++ (NSStringEncoding) encodingForMySQLEncoding:(const char *) mysqlEncoding; ++ (NSStringEncoding) defaultMySQLEncoding; + +/*" +Class maintenance +"*/ ++ (void) initialize; ++ (void) setLogQueries:(BOOL) iLogFlag; ++ (void) setTruncateLongFieldInLogs:(BOOL) iTruncFlag; ++ (BOOL) truncateLongField; + +/*" +Initialisation +"*/ +- (id) init; +// Port to 0 to use the default port +- (id) initToHost:(NSString *) host withLogin:(NSString *) login password:(NSString *) pass usingPort:(int) port; +- (id) initToSocket:(NSString *) socket withLogin:(NSString *) login password:(NSString *) pass; + +- (BOOL) setConnectionOption:(int) option toValue:(BOOL) value; +// Port to 0 to use the default port +- (BOOL) connectWithLogin:(NSString *) login password:(NSString *) pass host:(NSString *) host port:(int) port socket:(NSString *) socket; + +- (BOOL) selectDB:(NSString *) dbName; + +/*" +Errors information +"*/ + +- (NSString *) getLastErrorMessage; +- (unsigned int) getLastErrorID; +- (BOOL) isConnected; +- (BOOL) checkConnection; + +/*" +Queries +"*/ + +- (NSString *) prepareBinaryData:(NSData *) theData; +- (NSString *) prepareString:(NSString *) theString; +- (NSString *) quoteObject:(id) theObject; + +- (MCPResult *) queryString:(NSString *) query; + +- (my_ulonglong) affectedRows; +- (my_ulonglong) insertId; + + +/*" +Getting description of the database structure +"*/ +- (MCPResult *) listDBs; +- (MCPResult *) listDBsLike:(NSString *) dbsName; +- (MCPResult *) listTables; +- (MCPResult *) listTablesLike:(NSString *) tablesName; +// Next method uses SHOW TABLES FROM db to be sure that the db is not changed during this call. +- (MCPResult *) listTablesFromDB:(NSString *) dbName like:(NSString *) tablesName; +- (MCPResult *) listFieldsFromTable:(NSString *) tableName; +- (MCPResult *) listFieldsFromTable:(NSString *) tableName like:(NSString *) fieldsName; + + +/*" +Server information and control +"*/ + +- (NSString *) clientInfo; +- (NSString *) hostInfo; +- (NSString *) serverInfo; +- (NSNumber *) protoInfo; +- (MCPResult *) listProcesses; +- (BOOL) killProcess:(unsigned long) pid; + +//- (BOOL)createDBWithName:(NSString *)dbName; +//- (BOOL)dropDBWithName:(NSString *)dbName; + +/*" +Disconnection +"*/ +- (void) disconnect; +- (void) dealloc; + +/*" +String encoding concerns (C string type to NSString). +It's unlikely that users of the framework needs to use these methods which are used internally +"*/ +- (void) setEncoding:(NSStringEncoding) theEncoding; +- (NSStringEncoding) encoding; + +- (const char *) cStringFromString:(NSString *) theString; +- (NSString *) stringWithCString:(const char *) theCString; + +/*" +Text data convertion to string +"*/ +- (NSString *) stringWithText:(NSData *) theTextData; + +/*" Time Zone handling ."*/ +- (void) setTimeZone:(NSTimeZone *) iTimeZone; +- (NSTimeZone *) timeZone; + +@end diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPConnectionWinCont.h b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPConnectionWinCont.h new file mode 100644 index 00000000..98195e9f --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPConnectionWinCont.h @@ -0,0 +1,52 @@ +// +// MCPConnectionWinCont.h +// Vacations +// +// Created by Serge Cohen on Mon May 26 2003. +// Copyright (c) 2003 ARP/wARP. All rights reserved. +// + +#import + +// External classes, forward reference. +@class MCPDocument; + + +@interface MCPConnectionWinCont : NSWindowController +{ + IBOutlet NSTextField *mHostField; + IBOutlet NSTextField *mLoginField; + IBOutlet NSTextField *mDatabaseField; + IBOutlet NSTextField *mPortField; + + IBOutlet NSPanel *mPasswordSheet; + IBOutlet NSTextField *mPasswordField; + + IBOutlet NSButton *mCreateButton; +// MCPDocument *mMCPDocument; +} + + +/*" Actions for Interface Builder "*/ +/*" For the clear text information. "*/ +- (IBAction) doGo:(id) sender; +- (IBAction) doCancel:(id) sender; +- (IBAction) doCreate:(id) sender; +- (IBAction) modifyInstance:(id) sender; + + +/*" For the password. "*/ +- (IBAction) passwordClick:(id) sender; +- (IBAction) askPassword:(id) sender; +- (NSString *) Password; + + +/*" Overrides of NSWindowController method, to adapt to this Window Controller. "*/ +- (id) init; +- (void) dealloc; +- (void) windowDidLoad; + +/*" Getting the button for creating a DB. "*/ +- (NSButton*) getCreateButton; + +@end diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPConstants.h b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPConstants.h new file mode 100644 index 00000000..cccdfe8c --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPConstants.h @@ -0,0 +1,33 @@ +// +// MCPConstants.h +// SMySQL +// +// Created by Serge Cohen (serge.cohen@m4x.org) on Mon Jun 03 2002. +// Copyright (c) 2001 Serge Cohen. +// +// This code is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2 of the License, or any later version. +// +// This code is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// For a copy of the GNU General Public License, visit or +// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330, +// Boston, MA 02111-1307, USA. +// +// More info at +// +// $Id: MCPConstants.h 335 2006-01-08 21:14:07Z serge $ +// $Author: serge $ + + +typedef enum { + MCPTypeArray = 1, + MCPTypeDictionary = 2, + MCPTypeFlippedArray = 3, + MCPTypeFlippedDictionary = 4 +} MCPReturnType; + diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPDocument.h b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPDocument.h new file mode 100644 index 00000000..28f375da --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPDocument.h @@ -0,0 +1,95 @@ +// +// MCPDocument.h +// Vacations +// +// Created by Serge Cohen on Sat May 24 2003. +// Copyright (c) 2003 ARP/wARP. All rights reserved. +// + + +#import + +// External classes, forward reference. +@class MCPConnection; +@class MCPResult; + + +@interface MCPDocument : NSDocument +{ + BOOL MCPConInfoNeeded, MCPPassNeeded; + NSString *MCPHost, *MCPLogin, *MCPDatabase; + unsigned int MCPPort; + MCPConnection *MCPConnect; + +// Handling of windows. + NSWindowController *MCPMainWinCont; + Class MCPConnectedWinCont; /*" Window controller used once the connection is established (As a class). "*/ +// Handling the DB creation state. + NSString *MCPModelName; + BOOL MCPWillCreateNewDB; +} + +/*" Class Maintenance "*/ ++ (void) initialize; + +// Standards +/*" Initialisation and deallocation "*/ +- (id) init; +- (void) dealloc; + +/*" Connection to the databse related "*/ +- (MCPResult *) MCPqueryString:(NSString *) query; +- (unsigned int) MCPinsertRow:(NSString *) insert; +- (MCPConnection *) MCPgetConnection; + +// Accessors +/*" Accessors to the parameters of the connection "*/ +- (void) setMCPHost:(NSString *) theHost; +- (void) setMCPLogin:(NSString *) theLogin; +- (void) setMCPDatabase:(NSString *) theDatabase; +- (void) setMCPPort:(unsigned int) thePort; +- (void) setMCPConInfoNeeded:(BOOL) theConInfoNeeded; + +- (NSString *) MCPHost; +- (NSString *) MCPLogin; +- (NSString *) MCPDatabase; +- (unsigned int) MCPPort; +- (BOOL) MCPConInfoNeeded; +- (BOOL) MCPPassNeeded; + +- (BOOL) MCPisConnected; +- (MCPConnection *) MCPConnect; + +/*" Accessor to the window generated once the connection is established "*/ +- (void) setMCPConnectedWinCont:(Class) theConnectedWinCont; + +- (Class) MCPConnectedWinCont; + +/*" Accessors to the main window (connection or connected window), through their window controller. "*/ +- (NSWindowController *) MCPMainWinCont; + +/*" Accessors to the DB creation instances. "*/ +- (void) setMCPModelName:(NSString *) theModelName; +- (void) setMCPWillCreateNewDB:(BOOL) theWillCreateNewDB; + +- (NSString *) MCPModelName; +- (BOOL) MCPWillCreateNewDB; + +/*" Practical creation of the database, from a model file. "*/ +- (BOOL) createModelDB; + +/*" Overrides of NSDocument methods. "*/ +// Managing the document in file format +- (NSData *) dataRepresentationOfType:(NSString *) aType; +- (BOOL)loadDataRepresentation:(NSData *) data ofType:(NSString *)aType; + +// Managing NSWindowController(s) +- (NSArray *) makeWindowControllers; +- (void) windowControllerDidLoadNib:(NSWindowController *) aController; + +/*" Method to take care of the password sheet. "*/ +// Callback from sheet +- (void) MCPPasswordSheetDidEnd:(NSWindow *) sheet returnCode:(int) returnCode contextInfo:(void *) contextInfo; + + +@end diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPEntrepriseNotifications.h b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPEntrepriseNotifications.h new file mode 100644 index 00000000..824051e6 --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPEntrepriseNotifications.h @@ -0,0 +1,35 @@ +// +// MCPEntrepriseNotifications.h +// MCPModeler +// +// Created by Serge Cohen (serge.cohen@m4x.org) on 09/08/04. +// Copyright 2004 Serge Cohen. All rights reserved. +// +// This code is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2 of the License, or any later version. +// +// This code is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// For a copy of the GNU General Public License, visit or +// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330, +// Boston, MA 02111-1307, USA. +// +// More info at +// + + +#import + +// The instance are defined in MMDocument.h + +#pragma mark Name for notification + +extern NSString *MCPModelChangedNotification; +extern NSString *MCPClassDescriptionChangedNotification; +extern NSString *MCPAttributeChangedNotification; +extern NSString *MCPRelationChangedNotification; + diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPFastQueries.h b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPFastQueries.h new file mode 100644 index 00000000..cea22a11 --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPFastQueries.h @@ -0,0 +1,47 @@ +// +// MCPFastQueries.h +// SMySQL +// +// Created by Serge Cohen (serge.cohen@m4x.org) on Mon Jun 03 2002. +// Copyright (c) 2001 Serge Cohen. +// +// This code is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2 of the License, or any later version. +// +// This code is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// For a copy of the GNU General Public License, visit or +// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330, +// Boston, MA 02111-1307, USA. +// +// More info at +// +// $Id: MCPFastQueries.h 334 2006-01-08 20:32:38Z serge $ +// $Author: serge $ + +#import + +#import "MCPConnection.h" + +@interface MCPConnection (MCPFastQueries) +/*" +For insert queries, get directly the Id of the newly inserted row +"*/ +- (my_ulonglong) insertQuery:(NSString *) aQuery; +- (my_ulonglong) updateQuery:(NSString *) aQuery; + + +/*" +Returns directly a proper NS object, or a collection (NSArray, NSDictionary...). +"*/ +- (id) getFirstFieldFromQuery:(NSString *) aQuery; +- (id) getFirstRowFromQuery:(NSString *) aQuery asType:(MCPReturnType) aType; +- (id) getAllRowsFromQuery:(NSString *) aQuery asType:(MCPReturnType) aType; +- (NSArray *) getQuery:(NSString *) aQuery colWithIndex:(unsigned int) aCol; +- (NSArray *) getQuery:(NSString *) aQuery colWithName:(NSString *) aColName; + +@end diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPJoin.h b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPJoin.h new file mode 100644 index 00000000..4784a30b --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPJoin.h @@ -0,0 +1,68 @@ +// +// MCPJoin.h +// MCPModeler +// +// Created by Serge Cohen (serge.cohen@m4x.org) on 18/08/04. +// Copyright 2004 Serge Cohen. All rights reserved. +// +// This code is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2 of the License, or any later version. +// +// This code is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// For a copy of the GNU General Public License, visit or +// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330, +// Boston, MA 02111-1307, USA. +// +// More info at +// + +#import + +@class MCPModel; +@class MCPClassDescription; +@class MCPAttribute; +@class MCPRelation; +@class MCPRelation; + +@interface MCPJoin : NSObject < NSCoding > { +@protected +// Note that NONE of these attributes are retained!!! +// Instead all these objects are notified of the existence of the join +// and are responsible to invalidate/delete it if necessary. + MCPRelation *relation; + MCPAttribute *origin; + MCPAttribute *destination; +} + +#pragma mark Class methods ++ (void) initialize; + +#pragma mark Life cycle +- (id) initForRelation:(MCPRelation *) iRelation from:(MCPAttribute *) iOrigin to:(MCPAttribute *) iDestination; +- (void) invalidate; +- (void) dealloc; + +#pragma mark NSCoding protocol +- (id) initWithCoder:(NSCoder *) decoder; +- (void) encodeWithCoder:(NSCoder *) encoder; + +#pragma mark Setters +// No setter for relation : should be set at init time! +- (void) setOrigin:(MCPAttribute *) iOrigin; +- (void) setDestination:(MCPAttribute *) iDestination; + +#pragma mark Getters +- (MCPRelation *) relation; +- (MCPAttribute *) origin; +- (MCPAttribute *) destination; +- (unsigned int) index; + +#pragma mark Some general methods: +- (BOOL) isEqual:(id) iObject; + +@end diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPKit_bundled.h b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPKit_bundled.h new file mode 100644 index 00000000..3242a9dd --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPKit_bundled.h @@ -0,0 +1,38 @@ +/* + * MCPKit_bundled.h + * MCPKit + * + * Created by serge cohen (serge.cohen@m4x.org) on Sat Dec 08 2001. + * Copyright (c) 2001 Serge Cohen. + * + * This code is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or any later version. + * + * This code is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * For a copy of the GNU General Public License, visit or + * write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330, + * Boston, MA 02111-1307, USA. + * + * More info at + * + * + * $Id: MCPKit_bundled.h 335 2006-01-08 21:14:07Z serge $ + * $Author: serge $ + */ + +#import + +#import +#import +#import +#import +#import +#import +#import +#import "mysql.h" +//#import diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPModel+MCPEntreprise.h b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPModel+MCPEntreprise.h new file mode 100644 index 00000000..069c9862 --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPModel+MCPEntreprise.h @@ -0,0 +1,32 @@ +// +// MCPModel+MCPEntreprise.h +// MCPModeler +// +// Created by Serge Cohen (serge.cohen@m4x.org) on 01/11/04. +// Copyright 2004 Serge Cohen. All rights reserved. +// +// This code is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2 of the License, or any later version. +// +// This code is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// For a copy of the GNU General Public License, visit or +// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330, +// Boston, MA 02111-1307, USA. +// +// More info at +// + +#import "MCPModel.h" + +@interface MCPModel (MCPEntreprise) + +#pragma mark Work as a class description server +- (void) registerAsClassDescriptionServer; +- (void) registerDescriptionForClass:(NSNotification *) notification; + +@end diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPModel.h b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPModel.h new file mode 100644 index 00000000..362fed72 --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPModel.h @@ -0,0 +1,78 @@ +// +// MCPModel.h +// MCPModeler +// +// Created by Serge Cohen (serge.cohen@m4x.org) on 09/08/04. +// Copyright 2004 Serge Cohen. All rights reserved. +// +// This code is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2 of the License, or any later version. +// +// This code is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// For a copy of the GNU General Public License, visit or +// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330, +// Boston, MA 02111-1307, USA. +// +// More info at +// + +#import + +@class MCPClassDescription; +@class MCPAttribute; +@class MCPRelation; + +@interface MCPModel : NSObject < NSCoding > { +@protected + NSString *name; // Name of the model ... useless. + NSMutableArray *classDescriptions; // Order of the class descriptions in the model. + BOOL usesInnoDBTables; // The database should use InnoDB tables. +// Might add a string holding définition of tables. +// Might also add some sort of template for generated files (at least the header). +} + +#pragma mark Class methods ++ (void) initialize; + +#pragma mark Life cycle +- (id) initWithName:(NSString *) iName; +- (void) dealloc; + +#pragma mark NSCoding protocol +- (id) initWithCoder:(NSCoder *) decoder; +- (void) encodeWithCoder:(NSCoder *) encoder; + +#pragma mark Making new class description +- (MCPClassDescription *) addNewClassDescriptionWithName:(NSString *) iName inPosition:(int) index; + +#pragma mark Setters +- (void) setName:(NSString *) iName; +- (void) setClassDescriptions:(NSArray *) iClassDescriptions; +- (void) insertObject:(MCPClassDescription *) iClassDescription inClassDescriptionsAtIndex:(unsigned int) index; +- (void) removeObjectFromClassDescriptionsAtIndex:(unsigned int) index; +- (void) setUsesInnoDBTables:(BOOL) iUsesInnoDB; + +// Deprecated : non KVC +//- (void) removeClassDescription:(MCPClassDescription *) iClassDescription; +//- (void) addClassDescription:(MCPClassDescription *) iClassDescription; + +#pragma mark Getters +- (NSString *) name; +- (NSArray *) classDescriptions; +- (unsigned int) countOfClassDescriptions; +- (MCPClassDescription *) objectInClassDescriptionsAtIndex:(unsigned int) index; +- (unsigned int) indexOfClassDescription:(id) iClassDescription; +- (BOOL) usesInnoDBTables; + +// Deprecated : non KVC +//- (MCPClassDescription *) classDescriptionWithClassName:(NSString *) iClassDescriptionClassName; + +#pragma mark Output for logging +- (NSString *) descriptionWithLocale:(NSDictionary *) locale; + +@end diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPNull.h b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPNull.h new file mode 100644 index 00000000..1fa0babd --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPNull.h @@ -0,0 +1,36 @@ +// +// MCPNull.h +// SMySQL +// +// Created by Serge Cohen (serge.cohen@m4x.org) on Sun Jun 02 2002. +// Copyright (c) 2001 Serge Cohen. +// +// This code is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2 of the License, or any later version. +// +// This code is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// For a copy of the GNU General Public License, visit or +// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330, +// Boston, MA 02111-1307, USA. +// +// More info at +// +// $Id: MCPNull.h 334 2006-01-08 20:32:38Z serge $ +// $Author: serge $ + +#import + + +@interface NSObject (MCPNSNullTest) + +/*" +Addin to NSObject. +"*/ +- (BOOL) isNSNull; + +@end diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPNumber.h b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPNumber.h new file mode 100644 index 00000000..f4851e2a --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPNumber.h @@ -0,0 +1,84 @@ +// +// MCPNumber.h +// NumberTest +// +// Created by serge cohen (serge.cohen@m4x.org) on Sat Dec 08 2001. +// Copyright (c) 2001 Serge Cohen. +// +// This code is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2 of the License, or any later version. +// +// This code is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// For a copy of the GNU General Public License, visit or +// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330, +// Boston, MA 02111-1307, USA. +// +// More info at +// +// $Id: MCPNumber.h 334 2006-01-08 20:32:38Z serge $ +// $Author: serge $ + +#import + + +@interface MCPNumber : NSNumber { + const char *typeCode; + NSNumber *number; +} + +- (id) initWithChar:(char) value; +- (id) initWithUnsignedChar:(unsigned char) value; +- (id) initWithShort:(short) value; +- (id) initWithUnsignedShort:(unsigned short) value; +- (id) initWithInt:(int) value; +- (id) initWithUnsignedInt:(unsigned int) value; +- (id) initWithLong:(long) value; +- (id) initWithUnsignedLong:(unsigned long) value; +- (id) initWithLongLong:(long long) value; +- (id) initWithUnsignedLongLong:(unsigned long long) value; +- (id) initWithFloat:(float) value; +- (id) initWithDouble:(double) value; +- (id) initWithBool:(BOOL) value; + ++ (MCPNumber *) numberWithChar:(char) value; ++ (MCPNumber *) numberWithUnsignedChar:(unsigned char) value; ++ (MCPNumber *) numberWithShort:(short) value; ++ (MCPNumber *) numberWithUnsignedShort:(unsigned short) value; ++ (MCPNumber *) numberWithInt:(int) value; ++ (MCPNumber *) numberWithUnsignedInt:(unsigned int) value; ++ (MCPNumber *) numberWithLong:(long) value; ++ (MCPNumber *) numberWithUnsignedLong:(unsigned long) value; ++ (MCPNumber *) numberWithLongLong:(long long) value; ++ (MCPNumber *) numberWithUnsignedLongLong:(unsigned long long) value; ++ (MCPNumber *) numberWithFloat:(float) value; ++ (MCPNumber *) numberWithDouble:(double) value; ++ (MCPNumber *) numberWithBool:(BOOL) value; + +- (void) dealloc; + +/*" Most important : NSNumber primitive methods: "*/ +- (const char *) objCType; +- (void) getValue:(void *) buffer; + +//- (NSString *) descriptionWithLocale:(NSDictionary *) aLocale; // Not Primitive, but buggy... + +- (char) charValue; +- (unsigned char) unsignedCharValue; +- (short) shortValue; +- (unsigned short) unsignedShortValue; +- (int) intValue; +- (unsigned int) unsignedIntValue; +- (long) longValue; +- (unsigned long) unsignedLongValue; +- (long long) longLongValue; +- (unsigned long long) unsignedLongLongValue; +- (float) floatValue; +- (double) doubleValue; +- (BOOL) boolValue; + +@end diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPObject.h b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPObject.h new file mode 100644 index 00000000..2496180a --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPObject.h @@ -0,0 +1,106 @@ +// +// MCPObject.h +// MCPKit +// +// Created by Serge Cohen on Wed May 19 2004. +// Copyright (c) 2004 Serge Cohen. All rights reserved. +// + +#import + +/*" Possible return code on some operations of the database interaction. "*/ +typedef enum { + MCPDBReturnUnknown = 0, /*"Unknown state, should not happen."*/ + MCPDBReturnDeleted = 1, /*"The entry have been successfuly deleted from DB."*/ + MCPDBReturnUsed = 2, /*"The entry can not be removed, because some entries are still connected to it (some delete restrict/inhibit delete)."*/ + MCPDBReturnNone = 3, /*"No entry exist with this Id."*/ + MCPDBReturnNew = 4, /*"The entry was indeed new and inserted in the database."*/ + MCPDBReturnUpdated = 5, /*"The entry was updated in the DB."*/ + MCPDBReturnIncompleteKey = 6, /*"Part of the primary key is missing, action not taken."*/ + MCPDBReturnMultiple = 7, /*"Multiple rows are found with a query supposed to return at most one row."*/ + MCPDBReturnNoIdentity = 8, /*"The object does not have attributes that defines identity."*/ + MCPDBReturnNoKey = 9, /*"There is no primary key defined for this entity."*/ + MCPDBReturnNoConnection = 10, /*"The MCPObject is not having a connection."*/ + MCPDBReturnWrongRelationOrigin = 11, /*"Looking for a relation not which origin is not of the specified class."*/ + MCPDBReturnWrongRelationCardinality = 12, /*"Using a method assuming a cardinality of the relation while the relation as the other one."*/ + MCPDBReturnNoSuchRelation = 13, /*"There is no relation with such a name starting from this class."*/ + MCPDBReturnNotTarget = 14, /*"Tried to remove an object from a relation, while the objects does NOT belong to the relation."*/ + MCPDBReturnOK = 100 /*"Everything went OK."*/ +} MCPDBReturnCode; + +@class MCPConnection; +@class MCPClassDescription; +@class MCPRelation; + +@interface MCPObject : NSObject { + MCPClassDescription *classDescription; + MCPConnection *connection; +} + +#pragma mark Life of the Object +/*" Life of the object "*/ +- (id) init; +- (id) initWithDictionary:(NSDictionary *) dictionary; + +- (void) dealloc; + +- (void) setAttributesToDefault; + +#pragma mark Accessors +/*" Accessor(s) "*/ +- (MCPClassDescription *) classDescription; +- (MCPConnection *) connection; + +- (void) setConnection:(MCPConnection *) iConnection; + +#pragma mark Database interface +/*" Database interface "*/ +- (id) readFromDBRow:(NSDictionary *) iDictionary withTableName:(NSString *) iTableName; +- (MCPDBReturnCode) setPrimaryKey:(id) iDictionary andFetchFromDB:(MCPConnection *) iConnection; +//- (MCPDBReturnCode) setPrimaryKey:(NSDictionary *) iDictionary andFetchFromDB:(MCPConnection *) iConnection; +- (NSDictionary *) checkDBId; // the returned dictionary contains a MCPDBReturnCode key with the return code. +- (NSDictionary *) saveInDB; // the returned dictionary contains a MCPDBReturnCode key with the return code. +- (MCPDBReturnCode) getAutoGenerated; +- (MCPDBReturnCode) updateInDB; +- (MCPDBReturnCode) deleteInDB; ++ (MCPDBReturnCode) deleteInDBUsingConnection:(MCPConnection *) iConnection withId:(id) iId; + +#pragma mark Handling relations +/*" Handling realtions "*/ +- (id) getTargetOfRelation:(MCPRelation *) iRelation; +- (id) getTargetOfRelationNamed:(NSString *) iRelationName; +- (MCPDBReturnCode) setTarget:(id) iTarget forRelation:(MCPRelation *) iRelation; +- (MCPDBReturnCode) setTarget:(id) iTarget forRelationNamed:(NSString *) iRelationName; +- (unsigned int) countTargetForRelation:(MCPRelation *) iRelation; +- (unsigned int) countTargetForRelationNamed:(NSString *) iRelationName; +- (MCPObject *) getTargetOfRelation:(MCPRelation *) iRelation atIndex:(unsigned int) iIndex; +- (MCPObject *) getTargetOfRelationNamed:(NSString *) iRelationName atIndex:(unsigned int) iIndex; +- (MCPDBReturnCode) addTarget:(MCPObject *) iTarget toRelation:(MCPRelation *) iRelation; +- (MCPDBReturnCode) addTarget:(MCPObject *) iTarget toRelationNamed:(NSString *) iRelationName; +- (MCPDBReturnCode) removeTarget:(MCPObject *) iTarget toRelation:(MCPRelation *) iRelation; +- (MCPDBReturnCode) removeTarget:(MCPObject *) iTarget toRelationNamed:(NSString *) iRelationName; +- (MCPDBReturnCode) removeTargetToRelation:(MCPRelation *) iRelation atIndex:(unsigned int) iIndex; +- (MCPDBReturnCode) removeTargetToRelationNamed:(NSString *) iRelationName atIndex:(unsigned int) iIndex; +- (unsigned int) indexOfTarget:(MCPObject *) iTarget inRelation:(MCPRelation *) iRelation; +- (unsigned int) indexOfTarget:(MCPObject *) iTarget inRelationNamed:(NSString *) iRelationName; + +#pragma mark Utilities +/*" Utility methods "*/ +- (id) defaultValueForKey:(NSString *) iKey; +- (NSDictionary *) primaryKey; + +/*" Testing equality (VERY important for relation management)"*/ +- (BOOL) isEqual:(id) iObject; + +#pragma mark Output +/*" Output : "*/ +- (NSString *) description; +- (NSString *) descriptionWithLocale:(NSDictionary *) locale; + +#pragma mark Ordering the array for relations +- (NSString *) orderSQLForClassDescription:(MCPClassDescription *) iClassDescription; + +/*" Anti-crash method... "*/ +- (void) setNilValueForKey:(NSString *) iKey; + +@end diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPRelation.h b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPRelation.h new file mode 100644 index 00000000..fa359e2e --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPRelation.h @@ -0,0 +1,109 @@ +// +// MCPRelation.h +// MCPModeler +// +// Created by Serge Cohen (serge.cohen@m4x.org) on 11/08/04. +// Copyright 2004 Serge Cohen. All rights reserved. +// +// This code is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2 of the License, or any later version. +// +// This code is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// For a copy of the GNU General Public License, visit or +// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330, +// Boston, MA 02111-1307, USA. +// +// More info at +// + + +#import + +@class MCPModel; +@class MCPClassDescription; +@class MCPAttribute; + +@class MCPJoin; + +typedef enum { + OnDeleteNullify = 1, + OnDeleteDeny = 2, + OnDeleteCascade = 3, + OnDeleteDefault = 4, + OnDeleteNoAction = 5 +} MCPRelationDeleteRule; + + +@interface MCPRelation : NSObject < NSCoding > { +@protected + NSString *name; // Name of the relation + MCPRelationDeleteRule deleteRule; // Delete rule : what to do of the destination when origin is deleted + MCPRelation *inverseRelation; // The inverse relation (or nil if no inverse present) + MCPClassDescription *origin; // The class description from which the relation originate + MCPClassDescription *destination; // The class description to which the relation arrives + NSMutableArray *joins; // Joining attributes (array of MCPJoin) + BOOL isToMany; // Is the relation to many (or to one) + BOOL isMandatory; // Is the relation mandatory for the class description (origin) + BOOL ownsDestination; // The origin class description owns the destination class description(ies) +} + +#pragma mark Class methods ++ (void) initialize; + ++ (NSArray *) existingDeleteRules; +- (NSArray *) existingDeleteRules; + +#pragma mark Life cycle +- (id) initWithName:(NSString *) iName from:(MCPClassDescription *) iFrom to:(MCPClassDescription *) iTo; +- (void) invalidateRelation; +- (void) dealloc; + +#pragma mark NSCoding protocol +- (id) initWithCoder:(NSCoder *) decoder; +- (void) encodeWithCoder:(NSCoder *) encoder; + +#pragma mark Managing joins +//- (MCPJoin *) addNewJoin; +- (MCPJoin *) addJoinFrom:(MCPAttribute *) iFrom to:(MCPAttribute *) iTo; +- (void) removeJoinFrom:(MCPAttribute *) iFrom to:(MCPAttribute *) iTo; +//- (void) unjoinAttribute:(MCPAttribute *) iAttribute; + +#pragma mark Setters +- (void) setDestination:(MCPClassDescription *) iDestination; +- (void) setName:(NSString *) iName; +- (void) setDeleteRule:(MCPRelationDeleteRule) iDeleteRule; +- (void) setInverseRelation:(MCPRelation *) iInverseRelation; +- (void) insertObject:(MCPJoin *) iJoin inJoinsAtIndex:(unsigned int) index; +- (void) removeObjectFromJoinsAtIndex:(unsigned int) index; +- (void) setIsToMany:(BOOL) iIsToMany; +- (void) setIsMandatory:(BOOL) iIsMandatory; +- (void) setOwnsDestintation:(BOOL) iOwnsDestination; + +#pragma mark Getters +- (NSString *) name; +- (MCPRelationDeleteRule) deleteRule; +- (MCPRelation *) inverseRelation; +- (MCPClassDescription *) origin; +- (MCPClassDescription *) destination; +- (NSArray *) joins; +- (unsigned int) countOfJoins; +- (MCPJoin *) objectInJoinsAtIndex:(unsigned int) index; +- (unsigned int) indexOfJoinIdenticalTo:(id) iJoin; +- (BOOL) isToMany; +- (BOOL) isMandatory; +- (BOOL) ownsDestination; + +#pragma mark Some Usefull methods +- (MCPAttribute *) destinationAttributeForOrigin:(MCPAttribute *) iFrom; +- (MCPAttribute *) originAttributeForDestination:(MCPAttribute *) iTo; + +#pragma mark Some general methods: +- (BOOL) isEqual:(id) iObject; +- (NSString *) descriptionWithLocale:(NSDictionary *) locale; + +@end diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPResult.h b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPResult.h new file mode 100644 index 00000000..91b69fb5 --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPResult.h @@ -0,0 +1,110 @@ +// +// MCPResult.h +// SMySQL +// +// Created by serge cohen (serge.cohen@m4x.org) on Sat Dec 08 2001. +// Copyright (c) 2001 Serge Cohen. +// +// This code is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2 of the License, or any later version. +// +// This code is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// For a copy of the GNU General Public License, visit or +// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330, +// Boston, MA 02111-1307, USA. +// +// More info at +// +// $Id: MCPResult.h 335 2006-01-08 21:14:07Z serge $ +// $Author: serge $ + + +#import +#import "mysql.h" +#import "MCPConstants.h" + + +@interface MCPResult : NSObject { +@protected + MYSQL_RES *mResult; /*" The MYSQL_RES structure of the C API. "*/ + NSArray *mNames; /*" An NSArray holding the name of the columns. "*/ + NSDictionary *mMySQLLocales; /*" A Locales dictionary to define the locales of MySQL. "*/ + NSStringEncoding mEncoding; /*" The encoding used by MySQL server, to ISO-1 default. "*/ + unsigned int mNumOfFields; /*" The number of fields in the result. "*/ + NSTimeZone *mTimeZone; /*" The time zone of the connection when the query was made. "*/ +} +/*" +Class maintenance + "*/ + ++ (void) initialize; + + /*" + Init used #{only} by #{MCPConnection} + "*/ + +- (id) initWithMySQLPtr:(MYSQL *) mySQLPtr encoding:(NSStringEncoding) theEncoding timeZone:(NSTimeZone *) iTimeZone; +- (id) initWithResPtr:(MYSQL_RES *) mySQLResPtr encoding:(NSStringEncoding) theEncoding timeZone:(NSTimeZone *) iTimeZone; +- (id) init; + + /*" + General info on the result + "*/ + +- (my_ulonglong) numOfRows; +- (unsigned int) numOfFields; + + /*" + Getting the rows + "*/ + +- (void) dataSeek:(my_ulonglong) row; + +- (id) fetchRowAsType:(MCPReturnType) aType; +- (NSArray *) fetchRowAsArray; +- (NSDictionary *) fetchRowAsDictionary; + + /*" + Getting information on columns + "*/ + +- (NSArray *) fetchFieldNames; + +- (id) fetchTypesAsType:(MCPReturnType) aType; +- (NSArray *) fetchTypesAsArray; +- (NSDictionary *) fetchTypesAsDictionary; + +- (unsigned int) fetchFlagsAtIndex:(unsigned int) index; +- (unsigned int) fetchFlagsForKey:(NSString *) key; + +- (BOOL) isBlobAtIndex:(unsigned int) index; +- (BOOL) isBlobForKey:(NSString *) key; + + /*" + Text data convertion to string + "*/ +- (NSString *) stringWithText:(NSData *) theTextData; + + /*" + Utility method + "*/ +- (NSString *) description; + + /*" + End of the scope... + "*/ + +- (void) dealloc; + + /*" + Private methods, internal use only + "*/ +- (const char *) cStringFromString:(NSString *) theString; +- (NSString *) stringWithCString:(const char *) theCString; + +@end diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPResultPlus.h b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPResultPlus.h new file mode 100644 index 00000000..28d6ff2f --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Headers/MCPResultPlus.h @@ -0,0 +1,43 @@ +// +// MCPResultPlus.h +// SMySQL +// +// Created by Serge Cohen (serge.cohen@m4x.org) on Mon Jun 03 2002. +// Copyright (c) 2001 Serge Cohen. +// +// This code is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2 of the License, or any later version. +// +// This code is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// For a copy of the GNU General Public License, visit or +// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330, +// Boston, MA 02111-1307, USA. +// +// More info at +// +// $Id: MCPResultPlus.h 334 2006-01-08 20:32:38Z serge $ +// $Author: serge $ + +#import + +#import "MCPResult.h" + +@interface MCPResult (MCPResultPlus) + +/*" +Getting a complete column as an array +"*/ +- (NSArray *) fetchColAtIndex:(unsigned int) aCol; +- (NSArray *) fetchColWithName:(NSString *) aColName; + +/*" +Getting the complete result as 2D array +"*/ +- (id) fetch2DResultAsType:(MCPReturnType) aType; + +@end diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Headers/my_alloc.h b/trunk/MCPKit_bundled.framework/Versions/A/Headers/my_alloc.h new file mode 100644 index 00000000..a3dd35d7 --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Headers/my_alloc.h @@ -0,0 +1,52 @@ +/* Copyright (C) 2000 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +/* + Data structures for mysys/my_alloc.c (root memory allocator) +*/ + +#ifndef _my_alloc_h +#define _my_alloc_h + +#define ALLOC_MAX_BLOCK_TO_DROP 4096 +#define ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP 10 + +typedef struct st_used_mem +{ /* struct for once_alloc (block) */ + struct st_used_mem *next; /* Next block in use */ + unsigned int left; /* memory left in block */ + unsigned int size; /* size of block */ +} USED_MEM; + + +typedef struct st_mem_root +{ + USED_MEM *free; /* blocks with free memory in it */ + USED_MEM *used; /* blocks almost without free memory */ + USED_MEM *pre_alloc; /* preallocated block */ + /* if block have less memory it will be put in 'used' list */ + unsigned int min_malloc; + unsigned int block_size; /* initial block size */ + unsigned int block_num; /* allocated blocks counter */ + /* + first free block in queue test counter (if it exceed + MAX_BLOCK_USAGE_BEFORE_DROP block will be droped in 'used' list) + */ + unsigned int first_block_usage; + + void (*error_handler)(void); +} MEM_ROOT; +#endif diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Headers/my_list.h b/trunk/MCPKit_bundled.framework/Versions/A/Headers/my_list.h new file mode 100644 index 00000000..f786621e --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Headers/my_list.h @@ -0,0 +1,46 @@ +/* Copyright (C) 2000 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#ifndef _list_h_ +#define _list_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct st_list { + struct st_list *prev,*next; + void *data; +} LIST; + +typedef int (*list_walk_action)(void *,void *); + +extern LIST *list_add(LIST *root,LIST *element); +extern LIST *list_delete(LIST *root,LIST *element); +extern LIST *list_cons(void *data,LIST *root); +extern LIST *list_reverse(LIST *root); +extern void list_free(LIST *root,unsigned int free_data); +extern unsigned int list_length(LIST *); +extern int list_walk(LIST *,list_walk_action action,gptr argument); + +#define rest(a) ((a)->next) +#define list_push(a,b) (a)=list_cons((b),(a)) +#define list_pop(A) {LIST *old=(A); (A)=list_delete(old,old) ; my_free((gptr) old,MYF(MY_FAE)); } + +#ifdef __cplusplus +} +#endif +#endif diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Headers/mysql.h b/trunk/MCPKit_bundled.framework/Versions/A/Headers/mysql.h new file mode 100644 index 00000000..d8a56126 --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Headers/mysql.h @@ -0,0 +1,738 @@ +/* Copyright (C) 2000-2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#ifndef _mysql_h +#define _mysql_h + +#ifdef __CYGWIN__ /* CYGWIN implements a UNIX API */ +#undef WIN +#undef _WIN +#undef _WIN32 +#undef _WIN64 +#undef __WIN__ +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _global_h /* If not standard header */ +#include +#ifdef __LCC__ +#include /* For windows */ +#endif +typedef char my_bool; +#if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__) +#define __WIN__ +#endif +#if !defined(__WIN__) +#define STDCALL +#else +#define STDCALL __stdcall +#endif +typedef char * gptr; + +#ifndef my_socket_defined +#ifdef __WIN__ +#define my_socket SOCKET +#else +typedef int my_socket; +#endif /* __WIN__ */ +#endif /* my_socket_defined */ +#endif /* _global_h */ + +#include "mysql_com.h" +#include "mysql_time.h" +#include "mysql_version.h" +#include "typelib.h" + +#include "my_list.h" /* for LISTs used in 'MYSQL' and 'MYSQL_STMT' */ + +extern unsigned int mysql_port; +extern char *mysql_unix_port; + +#define CLIENT_NET_READ_TIMEOUT 365*24*3600 /* Timeout on read */ +#define CLIENT_NET_WRITE_TIMEOUT 365*24*3600 /* Timeout on write */ + +#ifdef __NETWARE__ +#pragma pack(push, 8) /* 8 byte alignment */ +#endif + +#define IS_PRI_KEY(n) ((n) & PRI_KEY_FLAG) +#define IS_NOT_NULL(n) ((n) & NOT_NULL_FLAG) +#define IS_BLOB(n) ((n) & BLOB_FLAG) +#define IS_NUM(t) ((t) <= FIELD_TYPE_INT24 || (t) == FIELD_TYPE_YEAR) +#define IS_NUM_FIELD(f) ((f)->flags & NUM_FLAG) +#define INTERNAL_NUM_FIELD(f) (((f)->type <= FIELD_TYPE_INT24 && ((f)->type != FIELD_TYPE_TIMESTAMP || (f)->length == 14 || (f)->length == 8)) || (f)->type == FIELD_TYPE_YEAR) + + +typedef struct st_mysql_field { + char *name; /* Name of column */ + char *org_name; /* Original column name, if an alias */ + char *table; /* Table of column if column was a field */ + char *org_table; /* Org table name, if table was an alias */ + char *db; /* Database for table */ + char *catalog; /* Catalog for table */ + char *def; /* Default value (set by mysql_list_fields) */ + unsigned long length; /* Width of column (create length) */ + unsigned long max_length; /* Max width for selected set */ + unsigned int name_length; + unsigned int org_name_length; + unsigned int table_length; + unsigned int org_table_length; + unsigned int db_length; + unsigned int catalog_length; + unsigned int def_length; + unsigned int flags; /* Div flags */ + unsigned int decimals; /* Number of decimals in field */ + unsigned int charsetnr; /* Character set */ + enum enum_field_types type; /* Type of field. See mysql_com.h for types */ +} MYSQL_FIELD; + +typedef char **MYSQL_ROW; /* return data as array of strings */ +typedef unsigned int MYSQL_FIELD_OFFSET; /* offset to current field */ + +#ifndef _global_h +#if defined(NO_CLIENT_LONG_LONG) +typedef unsigned long my_ulonglong; +#elif defined (__WIN__) +typedef unsigned __int64 my_ulonglong; +#else +typedef unsigned long long my_ulonglong; +#endif +#endif + +#define MYSQL_COUNT_ERROR (~(my_ulonglong) 0) + +typedef struct st_mysql_rows { + struct st_mysql_rows *next; /* list of rows */ + MYSQL_ROW data; + unsigned long length; +} MYSQL_ROWS; + +typedef MYSQL_ROWS *MYSQL_ROW_OFFSET; /* offset to current row */ + +#include "my_alloc.h" + +typedef struct st_mysql_data { + my_ulonglong rows; + unsigned int fields; + MYSQL_ROWS *data; + MEM_ROOT alloc; +#if !defined(CHECK_EMBEDDED_DIFFERENCES) || defined(EMBEDDED_LIBRARY) + MYSQL_ROWS **prev_ptr; +#endif +} MYSQL_DATA; + +enum mysql_option +{ + MYSQL_OPT_CONNECT_TIMEOUT, MYSQL_OPT_COMPRESS, MYSQL_OPT_NAMED_PIPE, + MYSQL_INIT_COMMAND, MYSQL_READ_DEFAULT_FILE, MYSQL_READ_DEFAULT_GROUP, + MYSQL_SET_CHARSET_DIR, MYSQL_SET_CHARSET_NAME, MYSQL_OPT_LOCAL_INFILE, + MYSQL_OPT_PROTOCOL, MYSQL_SHARED_MEMORY_BASE_NAME, MYSQL_OPT_READ_TIMEOUT, + MYSQL_OPT_WRITE_TIMEOUT, MYSQL_OPT_USE_RESULT, + MYSQL_OPT_USE_REMOTE_CONNECTION, MYSQL_OPT_USE_EMBEDDED_CONNECTION, + MYSQL_OPT_GUESS_CONNECTION, MYSQL_SET_CLIENT_IP, MYSQL_SECURE_AUTH +}; + +struct st_mysql_options { + unsigned int connect_timeout, read_timeout, write_timeout; + unsigned int port, protocol; + unsigned long client_flag; + char *host,*user,*password,*unix_socket,*db; + struct st_dynamic_array *init_commands; + char *my_cnf_file,*my_cnf_group, *charset_dir, *charset_name; + char *ssl_key; /* PEM key file */ + char *ssl_cert; /* PEM cert file */ + char *ssl_ca; /* PEM CA file */ + char *ssl_capath; /* PEM directory of CA-s? */ + char *ssl_cipher; /* cipher to use */ + char *shared_memory_base_name; + unsigned long max_allowed_packet; + my_bool use_ssl; /* if to use SSL or not */ + my_bool compress,named_pipe; + /* + On connect, find out the replication role of the server, and + establish connections to all the peers + */ + my_bool rpl_probe; + /* + Each call to mysql_real_query() will parse it to tell if it is a read + or a write, and direct it to the slave or the master + */ + my_bool rpl_parse; + /* + If set, never read from a master, only from slave, when doing + a read that is replication-aware + */ + my_bool no_master_reads; +#if !defined(CHECK_EMBEDDED_DIFFERENCES) || defined(EMBEDDED_LIBRARY) + my_bool separate_thread; +#endif + enum mysql_option methods_to_use; + char *client_ip; + /* Refuse client connecting to server if it uses old (pre-4.1.1) protocol */ + my_bool secure_auth; + + /* function pointers for local infile support */ + int (*local_infile_init)(void **, const char *, void *); + int (*local_infile_read)(void *, char *, unsigned int); + void (*local_infile_end)(void *); + int (*local_infile_error)(void *, char *, unsigned int); + void *local_infile_userdata; +}; + +enum mysql_status +{ + MYSQL_STATUS_READY,MYSQL_STATUS_GET_RESULT,MYSQL_STATUS_USE_RESULT +}; + +enum mysql_protocol_type +{ + MYSQL_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP, MYSQL_PROTOCOL_SOCKET, + MYSQL_PROTOCOL_PIPE, MYSQL_PROTOCOL_MEMORY +}; +/* + There are three types of queries - the ones that have to go to + the master, the ones that go to a slave, and the adminstrative + type which must happen on the pivot connectioin +*/ +enum mysql_rpl_type +{ + MYSQL_RPL_MASTER, MYSQL_RPL_SLAVE, MYSQL_RPL_ADMIN +}; + +struct st_mysql_methods; + +typedef struct st_mysql +{ + NET net; /* Communication parameters */ + gptr connector_fd; /* ConnectorFd for SSL */ + char *host,*user,*passwd,*unix_socket,*server_version,*host_info,*info; + char *db; + struct charset_info_st *charset; + MYSQL_FIELD *fields; + MEM_ROOT field_alloc; + my_ulonglong affected_rows; + my_ulonglong insert_id; /* id if insert on table with NEXTNR */ + my_ulonglong extra_info; /* Used by mysqlshow */ + unsigned long thread_id; /* Id for connection in server */ + unsigned long packet_length; + unsigned int port; + unsigned long client_flag,server_capabilities; + unsigned int protocol_version; + unsigned int field_count; + unsigned int server_status; + unsigned int server_language; + unsigned int warning_count; + struct st_mysql_options options; + enum mysql_status status; + my_bool free_me; /* If free in mysql_close */ + my_bool reconnect; /* set to 1 if automatic reconnect */ + + /* session-wide random string */ + char scramble[SCRAMBLE_LENGTH+1]; + + /* + Set if this is the original connection, not a master or a slave we have + added though mysql_rpl_probe() or mysql_set_master()/ mysql_add_slave() + */ + my_bool rpl_pivot; + /* + Pointers to the master, and the next slave connections, points to + itself if lone connection. + */ + struct st_mysql* master, *next_slave; + + struct st_mysql* last_used_slave; /* needed for round-robin slave pick */ + /* needed for send/read/store/use result to work correctly with replication */ + struct st_mysql* last_used_con; + + LIST *stmts; /* list of all statements */ + const struct st_mysql_methods *methods; + void *thd; + /* + Points to boolean flag in MYSQL_RES or MYSQL_STMT. We set this flag + from mysql_stmt_close if close had to cancel result set of this object. + */ + my_bool *unbuffered_fetch_owner; +} MYSQL; + +typedef struct st_mysql_res { + my_ulonglong row_count; + MYSQL_FIELD *fields; + MYSQL_DATA *data; + MYSQL_ROWS *data_cursor; + unsigned long *lengths; /* column lengths of current row */ + MYSQL *handle; /* for unbuffered reads */ + MEM_ROOT field_alloc; + unsigned int field_count, current_field; + MYSQL_ROW row; /* If unbuffered read */ + MYSQL_ROW current_row; /* buffer to current row */ + my_bool eof; /* Used by mysql_fetch_row */ + /* mysql_stmt_close() had to cancel this result */ + my_bool unbuffered_fetch_cancelled; + const struct st_mysql_methods *methods; +} MYSQL_RES; + +#define MAX_MYSQL_MANAGER_ERR 256 +#define MAX_MYSQL_MANAGER_MSG 256 + +#define MANAGER_OK 200 +#define MANAGER_INFO 250 +#define MANAGER_ACCESS 401 +#define MANAGER_CLIENT_ERR 450 +#define MANAGER_INTERNAL_ERR 500 + +#if !defined(MYSQL_SERVER) && !defined(MYSQL_CLIENT) +#define MYSQL_CLIENT +#endif + + +typedef struct st_mysql_manager +{ + NET net; + char *host,*user,*passwd; + unsigned int port; + my_bool free_me; + my_bool eof; + int cmd_status; + int last_errno; + char* net_buf,*net_buf_pos,*net_data_end; + int net_buf_size; + char last_error[MAX_MYSQL_MANAGER_ERR]; +} MYSQL_MANAGER; + +typedef struct st_mysql_parameters +{ + unsigned long *p_max_allowed_packet; + unsigned long *p_net_buffer_length; +} MYSQL_PARAMETERS; + +#if !defined(MYSQL_SERVER) && !defined(EMBEDDED_LIBRARY) +#define max_allowed_packet (*mysql_get_parameters()->p_max_allowed_packet) +#define net_buffer_length (*mysql_get_parameters()->p_net_buffer_length) +#endif + +/* + Set up and bring down the server; to ensure that applications will + work when linked against either the standard client library or the + embedded server library, these functions should be called. +*/ +int STDCALL mysql_server_init(int argc, char **argv, char **groups); +void STDCALL mysql_server_end(void); +/* + mysql_server_init/end need to be called when using libmysqld or + libmysqlclient (exactly, mysql_server_init() is called by mysql_init() so + you don't need to call it explicitely; but you need to call + mysql_server_end() to free memory). The names are a bit misleading + (mysql_SERVER* to be used when using libmysqlCLIENT). So we add more general + names which suit well whether you're using libmysqld or libmysqlclient. We + intend to promote these aliases over the mysql_server* ones. +*/ +#define mysql_library_init mysql_server_init +#define mysql_library_end mysql_server_end + +MYSQL_PARAMETERS *STDCALL mysql_get_parameters(void); + +/* + Set up and bring down a thread; these function should be called + for each thread in an application which opens at least one MySQL + connection. All uses of the connection(s) should be between these + function calls. +*/ +my_bool STDCALL mysql_thread_init(void); +void STDCALL mysql_thread_end(void); + +/* + Functions to get information from the MYSQL and MYSQL_RES structures + Should definitely be used if one uses shared libraries. +*/ + +my_ulonglong STDCALL mysql_num_rows(MYSQL_RES *res); +unsigned int STDCALL mysql_num_fields(MYSQL_RES *res); +my_bool STDCALL mysql_eof(MYSQL_RES *res); +MYSQL_FIELD *STDCALL mysql_fetch_field_direct(MYSQL_RES *res, + unsigned int fieldnr); +MYSQL_FIELD * STDCALL mysql_fetch_fields(MYSQL_RES *res); +MYSQL_ROW_OFFSET STDCALL mysql_row_tell(MYSQL_RES *res); +MYSQL_FIELD_OFFSET STDCALL mysql_field_tell(MYSQL_RES *res); + +unsigned int STDCALL mysql_field_count(MYSQL *mysql); +my_ulonglong STDCALL mysql_affected_rows(MYSQL *mysql); +my_ulonglong STDCALL mysql_insert_id(MYSQL *mysql); +unsigned int STDCALL mysql_errno(MYSQL *mysql); +const char * STDCALL mysql_error(MYSQL *mysql); +const char *STDCALL mysql_sqlstate(MYSQL *mysql); +unsigned int STDCALL mysql_warning_count(MYSQL *mysql); +const char * STDCALL mysql_info(MYSQL *mysql); +unsigned long STDCALL mysql_thread_id(MYSQL *mysql); +const char * STDCALL mysql_character_set_name(MYSQL *mysql); + +MYSQL * STDCALL mysql_init(MYSQL *mysql); +my_bool STDCALL mysql_ssl_set(MYSQL *mysql, const char *key, + const char *cert, const char *ca, + const char *capath, const char *cipher); +my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user, + const char *passwd, const char *db); +MYSQL * STDCALL mysql_real_connect(MYSQL *mysql, const char *host, + const char *user, + const char *passwd, + const char *db, + unsigned int port, + const char *unix_socket, + unsigned long clientflag); +int STDCALL mysql_select_db(MYSQL *mysql, const char *db); +int STDCALL mysql_query(MYSQL *mysql, const char *q); +int STDCALL mysql_send_query(MYSQL *mysql, const char *q, + unsigned long length); +int STDCALL mysql_real_query(MYSQL *mysql, const char *q, + unsigned long length); +MYSQL_RES * STDCALL mysql_store_result(MYSQL *mysql); +MYSQL_RES * STDCALL mysql_use_result(MYSQL *mysql); + +/* perform query on master */ +my_bool STDCALL mysql_master_query(MYSQL *mysql, const char *q, + unsigned long length); +my_bool STDCALL mysql_master_send_query(MYSQL *mysql, const char *q, + unsigned long length); +/* perform query on slave */ +my_bool STDCALL mysql_slave_query(MYSQL *mysql, const char *q, + unsigned long length); +my_bool STDCALL mysql_slave_send_query(MYSQL *mysql, const char *q, + unsigned long length); + +/* local infile support */ + +#define LOCAL_INFILE_ERROR_LEN 512 + +void +mysql_set_local_infile_handler(MYSQL *mysql, + int (*local_infile_init)(void **, const char *, + void *), + int (*local_infile_read)(void *, char *, + unsigned int), + void (*local_infile_end)(void *), + int (*local_infile_error)(void *, char*, + unsigned int), + void *); + +void +mysql_set_local_infile_default(MYSQL *mysql); + + +/* + enable/disable parsing of all queries to decide if they go on master or + slave +*/ +void STDCALL mysql_enable_rpl_parse(MYSQL* mysql); +void STDCALL mysql_disable_rpl_parse(MYSQL* mysql); +/* get the value of the parse flag */ +int STDCALL mysql_rpl_parse_enabled(MYSQL* mysql); + +/* enable/disable reads from master */ +void STDCALL mysql_enable_reads_from_master(MYSQL* mysql); +void STDCALL mysql_disable_reads_from_master(MYSQL* mysql); +/* get the value of the master read flag */ +my_bool STDCALL mysql_reads_from_master_enabled(MYSQL* mysql); + +enum mysql_rpl_type STDCALL mysql_rpl_query_type(const char* q, int len); + +/* discover the master and its slaves */ +my_bool STDCALL mysql_rpl_probe(MYSQL* mysql); + +/* set the master, close/free the old one, if it is not a pivot */ +int STDCALL mysql_set_master(MYSQL* mysql, const char* host, + unsigned int port, + const char* user, + const char* passwd); +int STDCALL mysql_add_slave(MYSQL* mysql, const char* host, + unsigned int port, + const char* user, + const char* passwd); + +int STDCALL mysql_shutdown(MYSQL *mysql, + enum mysql_enum_shutdown_level + shutdown_level); +int STDCALL mysql_dump_debug_info(MYSQL *mysql); +int STDCALL mysql_refresh(MYSQL *mysql, + unsigned int refresh_options); +int STDCALL mysql_kill(MYSQL *mysql,unsigned long pid); +int STDCALL mysql_set_server_option(MYSQL *mysql, + enum enum_mysql_set_option + option); +int STDCALL mysql_ping(MYSQL *mysql); +const char * STDCALL mysql_stat(MYSQL *mysql); +const char * STDCALL mysql_get_server_info(MYSQL *mysql); +const char * STDCALL mysql_get_client_info(void); +unsigned long STDCALL mysql_get_client_version(void); +const char * STDCALL mysql_get_host_info(MYSQL *mysql); +unsigned long STDCALL mysql_get_server_version(MYSQL *mysql); +unsigned int STDCALL mysql_get_proto_info(MYSQL *mysql); +MYSQL_RES * STDCALL mysql_list_dbs(MYSQL *mysql,const char *wild); +MYSQL_RES * STDCALL mysql_list_tables(MYSQL *mysql,const char *wild); +MYSQL_RES * STDCALL mysql_list_processes(MYSQL *mysql); +int STDCALL mysql_options(MYSQL *mysql,enum mysql_option option, + const char *arg); +void STDCALL mysql_free_result(MYSQL_RES *result); +void STDCALL mysql_data_seek(MYSQL_RES *result, + my_ulonglong offset); +MYSQL_ROW_OFFSET STDCALL mysql_row_seek(MYSQL_RES *result, + MYSQL_ROW_OFFSET offset); +MYSQL_FIELD_OFFSET STDCALL mysql_field_seek(MYSQL_RES *result, + MYSQL_FIELD_OFFSET offset); +MYSQL_ROW STDCALL mysql_fetch_row(MYSQL_RES *result); +unsigned long * STDCALL mysql_fetch_lengths(MYSQL_RES *result); +MYSQL_FIELD * STDCALL mysql_fetch_field(MYSQL_RES *result); +MYSQL_RES * STDCALL mysql_list_fields(MYSQL *mysql, const char *table, + const char *wild); +unsigned long STDCALL mysql_escape_string(char *to,const char *from, + unsigned long from_length); +unsigned long STDCALL mysql_hex_string(char *to,const char *from, + unsigned long from_length); +unsigned long STDCALL mysql_real_escape_string(MYSQL *mysql, + char *to,const char *from, + unsigned long length); +void STDCALL mysql_debug(const char *debug); +char * STDCALL mysql_odbc_escape_string(MYSQL *mysql, + char *to, + unsigned long to_length, + const char *from, + unsigned long from_length, + void *param, + char * + (*extend_buffer) + (void *, char *to, + unsigned long *length)); +void STDCALL myodbc_remove_escape(MYSQL *mysql,char *name); +unsigned int STDCALL mysql_thread_safe(void); +my_bool STDCALL mysql_embedded(void); +MYSQL_MANAGER* STDCALL mysql_manager_init(MYSQL_MANAGER* con); +MYSQL_MANAGER* STDCALL mysql_manager_connect(MYSQL_MANAGER* con, + const char* host, + const char* user, + const char* passwd, + unsigned int port); +void STDCALL mysql_manager_close(MYSQL_MANAGER* con); +int STDCALL mysql_manager_command(MYSQL_MANAGER* con, + const char* cmd, int cmd_len); +int STDCALL mysql_manager_fetch_line(MYSQL_MANAGER* con, + char* res_buf, + int res_buf_size); +my_bool STDCALL mysql_read_query_result(MYSQL *mysql); + + +/* + The following definitions are added for the enhanced + client-server protocol +*/ + +/* statement state */ +enum enum_mysql_stmt_state +{ + MYSQL_STMT_INIT_DONE= 1, MYSQL_STMT_PREPARE_DONE, MYSQL_STMT_EXECUTE_DONE, + MYSQL_STMT_FETCH_DONE +}; + + +/* bind structure */ +typedef struct st_mysql_bind +{ + unsigned long *length; /* output length pointer */ + my_bool *is_null; /* Pointer to null indicator */ + void *buffer; /* buffer to get/put data */ + enum enum_field_types buffer_type; /* buffer type */ + unsigned long buffer_length; /* buffer length, must be set for str/binary */ + + /* Following are for internal use. Set by mysql_stmt_bind_param */ + unsigned char *inter_buffer; /* for the current data position */ + unsigned long offset; /* offset position for char/binary fetch */ + unsigned long internal_length; /* Used if length is 0 */ + unsigned int param_number; /* For null count and error messages */ + unsigned int pack_length; /* Internal length for packed data */ + my_bool is_unsigned; /* set if integer type is unsigned */ + my_bool long_data_used; /* If used with mysql_send_long_data */ + my_bool internal_is_null; /* Used if is_null is 0 */ + void (*store_param_func)(NET *net, struct st_mysql_bind *param); + void (*fetch_result)(struct st_mysql_bind *, unsigned char **row); + void (*skip_result)(struct st_mysql_bind *, MYSQL_FIELD *, + unsigned char **row); +} MYSQL_BIND; + + +/* statement handler */ +typedef struct st_mysql_stmt +{ + MEM_ROOT mem_root; /* root allocations */ + LIST list; /* list to keep track of all stmts */ + MYSQL *mysql; /* connection handle */ + MYSQL_BIND *params; /* input parameters */ + MYSQL_BIND *bind; /* output parameters */ + MYSQL_FIELD *fields; /* result set metadata */ + MYSQL_DATA result; /* cached result set */ + MYSQL_ROWS *data_cursor; /* current row in cached result */ + /* copy of mysql->affected_rows after statement execution */ + my_ulonglong affected_rows; + my_ulonglong insert_id; /* copy of mysql->insert_id */ + /* + mysql_stmt_fetch() calls this function to fetch one row (it's different + for buffered, unbuffered and cursor fetch). + */ + int (*read_row_func)(struct st_mysql_stmt *stmt, + unsigned char **row); + unsigned long stmt_id; /* Id for prepared statement */ + unsigned int last_errno; /* error code */ + unsigned int param_count; /* input parameter count */ + unsigned int field_count; /* number of columns in result set */ + enum enum_mysql_stmt_state state; /* statement state */ + char last_error[MYSQL_ERRMSG_SIZE]; /* error message */ + char sqlstate[SQLSTATE_LENGTH+1]; + /* Types of input parameters should be sent to server */ + my_bool send_types_to_server; + my_bool bind_param_done; /* input buffers were supplied */ + my_bool bind_result_done; /* output buffers were supplied */ + /* mysql_stmt_close() had to cancel this result */ + my_bool unbuffered_fetch_cancelled; + /* + Is set to true if we need to calculate field->max_length for + metadata fields when doing mysql_stmt_store_result. + */ + my_bool update_max_length; +} MYSQL_STMT; + +enum enum_stmt_attr_type +{ + /* + When doing mysql_stmt_store_result calculate max_length attribute + of statement metadata. This is to be consistent with the old API, + where this was done automatically. + In the new API we do that only by request because it slows down + mysql_stmt_store_result sufficiently. + */ + STMT_ATTR_UPDATE_MAX_LENGTH +}; + + +typedef struct st_mysql_methods +{ + my_bool (*read_query_result)(MYSQL *mysql); + my_bool (*advanced_command)(MYSQL *mysql, + enum enum_server_command command, + const char *header, + unsigned long header_length, + const char *arg, + unsigned long arg_length, + my_bool skip_check); + MYSQL_DATA *(*read_rows)(MYSQL *mysql,MYSQL_FIELD *mysql_fields, + unsigned int fields); + MYSQL_RES * (*use_result)(MYSQL *mysql); + void (*fetch_lengths)(unsigned long *to, + MYSQL_ROW column, unsigned int field_count); + void (*flush_use_result)(MYSQL *mysql); +#if !defined(MYSQL_SERVER) || defined(EMBEDDED_LIBRARY) + MYSQL_FIELD * (*list_fields)(MYSQL *mysql); + my_bool (*read_prepare_result)(MYSQL *mysql, MYSQL_STMT *stmt); + int (*stmt_execute)(MYSQL_STMT *stmt); + int (*read_binary_rows)(MYSQL_STMT *stmt); + int (*unbuffered_fetch)(MYSQL *mysql, char **row); + void (*free_embedded_thd)(MYSQL *mysql); + const char *(*read_statistics)(MYSQL *mysql); + my_bool (*next_result)(MYSQL *mysql); + int (*read_change_user_result)(MYSQL *mysql, char *buff, const char *passwd); +#endif +} MYSQL_METHODS; + + +MYSQL_STMT * STDCALL mysql_stmt_init(MYSQL *mysql); +int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, + unsigned long length); +int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt); +int STDCALL mysql_stmt_fetch(MYSQL_STMT *stmt); +int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind, + unsigned int column, + unsigned long offset); +int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt); +unsigned long STDCALL mysql_stmt_param_count(MYSQL_STMT * stmt); +my_bool STDCALL mysql_stmt_attr_set(MYSQL_STMT *stmt, + enum enum_stmt_attr_type attr_type, + const void *attr); +my_bool STDCALL mysql_stmt_attr_get(MYSQL_STMT *stmt, + enum enum_stmt_attr_type attr_type, + void *attr); +my_bool STDCALL mysql_stmt_bind_param(MYSQL_STMT * stmt, MYSQL_BIND * bnd); +my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT * stmt, MYSQL_BIND * bnd); +my_bool STDCALL mysql_stmt_close(MYSQL_STMT * stmt); +my_bool STDCALL mysql_stmt_reset(MYSQL_STMT * stmt); +my_bool STDCALL mysql_stmt_free_result(MYSQL_STMT *stmt); +my_bool STDCALL mysql_stmt_send_long_data(MYSQL_STMT *stmt, + unsigned int param_number, + const char *data, + unsigned long length); +MYSQL_RES *STDCALL mysql_stmt_result_metadata(MYSQL_STMT *stmt); +MYSQL_RES *STDCALL mysql_stmt_param_metadata(MYSQL_STMT *stmt); +unsigned int STDCALL mysql_stmt_errno(MYSQL_STMT * stmt); +const char *STDCALL mysql_stmt_error(MYSQL_STMT * stmt); +const char *STDCALL mysql_stmt_sqlstate(MYSQL_STMT * stmt); +MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_seek(MYSQL_STMT *stmt, + MYSQL_ROW_OFFSET offset); +MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_tell(MYSQL_STMT *stmt); +void STDCALL mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong offset); +my_ulonglong STDCALL mysql_stmt_num_rows(MYSQL_STMT *stmt); +my_ulonglong STDCALL mysql_stmt_affected_rows(MYSQL_STMT *stmt); +my_ulonglong STDCALL mysql_stmt_insert_id(MYSQL_STMT *stmt); +unsigned int STDCALL mysql_stmt_field_count(MYSQL_STMT *stmt); + +my_bool STDCALL mysql_commit(MYSQL * mysql); +my_bool STDCALL mysql_rollback(MYSQL * mysql); +my_bool STDCALL mysql_autocommit(MYSQL * mysql, my_bool auto_mode); +my_bool STDCALL mysql_more_results(MYSQL *mysql); +int STDCALL mysql_next_result(MYSQL *mysql); +void STDCALL mysql_close(MYSQL *sock); + + +/* status return codes */ +#define MYSQL_NO_DATA 100 + +#define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT) + +#ifdef USE_OLD_FUNCTIONS +MYSQL * STDCALL mysql_connect(MYSQL *mysql, const char *host, + const char *user, const char *passwd); +int STDCALL mysql_create_db(MYSQL *mysql, const char *DB); +int STDCALL mysql_drop_db(MYSQL *mysql, const char *DB); +#define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT) +#endif +#define HAVE_MYSQL_REAL_CONNECT + +/* + The following functions are mainly exported because of mysqlbinlog; + They are not for general usage +*/ + +#define simple_command(mysql, command, arg, length, skip_check) \ + (*(mysql)->methods->advanced_command)(mysql, command, \ + NullS, 0, arg, length, skip_check) +unsigned long net_safe_read(MYSQL* mysql); + +#ifdef __NETWARE__ +#pragma pack(pop) /* restore alignment */ +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* _mysql_h */ diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Headers/mysql_com.h b/trunk/MCPKit_bundled.framework/Versions/A/Headers/mysql_com.h new file mode 100644 index 00000000..6f941fc0 --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Headers/mysql_com.h @@ -0,0 +1,399 @@ +/* Copyright (C) 2000 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +/* +** Common definition between mysql server & client +*/ + +#ifndef _mysql_com_h +#define _mysql_com_h + +#define NAME_LEN 64 /* Field/table name length */ +#define HOSTNAME_LENGTH 60 +#define USERNAME_LENGTH 16 +#define SERVER_VERSION_LENGTH 60 +#define SQLSTATE_LENGTH 5 + +#define LOCAL_HOST "localhost" +#define LOCAL_HOST_NAMEDPIPE "." + + +#if defined(__WIN__) && !defined( _CUSTOMCONFIG_) +#define MYSQL_NAMEDPIPE "MySQL" +#define MYSQL_SERVICENAME "MySQL" +#endif /* __WIN__ */ + +enum enum_server_command +{ + COM_SLEEP, COM_QUIT, COM_INIT_DB, COM_QUERY, COM_FIELD_LIST, + COM_CREATE_DB, COM_DROP_DB, COM_REFRESH, COM_SHUTDOWN, COM_STATISTICS, + COM_PROCESS_INFO, COM_CONNECT, COM_PROCESS_KILL, COM_DEBUG, COM_PING, + COM_TIME, COM_DELAYED_INSERT, COM_CHANGE_USER, COM_BINLOG_DUMP, + COM_TABLE_DUMP, COM_CONNECT_OUT, COM_REGISTER_SLAVE, + COM_PREPARE, COM_EXECUTE, COM_LONG_DATA, COM_CLOSE_STMT, + COM_RESET_STMT, COM_SET_OPTION, + /* don't forget to update const char *command_name[] in sql_parse.cc */ + + /* Must be last */ + COM_END +}; + + +/* + Length of random string sent by server on handshake; this is also length of + obfuscated password, recieved from client +*/ +#define SCRAMBLE_LENGTH 20 +#define SCRAMBLE_LENGTH_323 8 +/* length of password stored in the db: new passwords are preceeded with '*' */ +#define SCRAMBLED_PASSWORD_CHAR_LENGTH (SCRAMBLE_LENGTH*2+1) +#define SCRAMBLED_PASSWORD_CHAR_LENGTH_323 (SCRAMBLE_LENGTH_323*2) + + +#define NOT_NULL_FLAG 1 /* Field can't be NULL */ +#define PRI_KEY_FLAG 2 /* Field is part of a primary key */ +#define UNIQUE_KEY_FLAG 4 /* Field is part of a unique key */ +#define MULTIPLE_KEY_FLAG 8 /* Field is part of a key */ +#define BLOB_FLAG 16 /* Field is a blob */ +#define UNSIGNED_FLAG 32 /* Field is unsigned */ +#define ZEROFILL_FLAG 64 /* Field is zerofill */ +#define BINARY_FLAG 128 /* Field is binary */ + +/* The following are only sent to new clients */ +#define ENUM_FLAG 256 /* field is an enum */ +#define AUTO_INCREMENT_FLAG 512 /* field is a autoincrement field */ +#define TIMESTAMP_FLAG 1024 /* Field is a timestamp */ +#define SET_FLAG 2048 /* field is a set */ +#define NUM_FLAG 32768 /* Field is num (for clients) */ +#define PART_KEY_FLAG 16384 /* Intern; Part of some key */ +#define GROUP_FLAG 32768 /* Intern: Group field */ +#define UNIQUE_FLAG 65536 /* Intern: Used by sql_yacc */ +#define BINCMP_FLAG 131072 /* Intern: Used by sql_yacc */ + +#define REFRESH_GRANT 1 /* Refresh grant tables */ +#define REFRESH_LOG 2 /* Start on new log file */ +#define REFRESH_TABLES 4 /* close all tables */ +#define REFRESH_HOSTS 8 /* Flush host cache */ +#define REFRESH_STATUS 16 /* Flush status variables */ +#define REFRESH_THREADS 32 /* Flush thread cache */ +#define REFRESH_SLAVE 64 /* Reset master info and restart slave + thread */ +#define REFRESH_MASTER 128 /* Remove all bin logs in the index + and truncate the index */ + +/* The following can't be set with mysql_refresh() */ +#define REFRESH_READ_LOCK 16384 /* Lock tables for read */ +#define REFRESH_FAST 32768 /* Intern flag */ + +/* RESET (remove all queries) from query cache */ +#define REFRESH_QUERY_CACHE 65536 +#define REFRESH_QUERY_CACHE_FREE 0x20000L /* pack query cache */ +#define REFRESH_DES_KEY_FILE 0x40000L +#define REFRESH_USER_RESOURCES 0x80000L + +#define CLIENT_LONG_PASSWORD 1 /* new more secure passwords */ +#define CLIENT_FOUND_ROWS 2 /* Found instead of affected rows */ +#define CLIENT_LONG_FLAG 4 /* Get all column flags */ +#define CLIENT_CONNECT_WITH_DB 8 /* One can specify db on connect */ +#define CLIENT_NO_SCHEMA 16 /* Don't allow database.table.column */ +#define CLIENT_COMPRESS 32 /* Can use compression protocol */ +#define CLIENT_ODBC 64 /* Odbc client */ +#define CLIENT_LOCAL_FILES 128 /* Can use LOAD DATA LOCAL */ +#define CLIENT_IGNORE_SPACE 256 /* Ignore spaces before '(' */ +#define CLIENT_PROTOCOL_41 512 /* New 4.1 protocol */ +#define CLIENT_INTERACTIVE 1024 /* This is an interactive client */ +#define CLIENT_SSL 2048 /* Switch to SSL after handshake */ +#define CLIENT_IGNORE_SIGPIPE 4096 /* IGNORE sigpipes */ +#define CLIENT_TRANSACTIONS 8192 /* Client knows about transactions */ +#define CLIENT_RESERVED 16384 /* Old flag for 4.1 protocol */ +#define CLIENT_SECURE_CONNECTION 32768 /* New 4.1 authentication */ +#define CLIENT_MULTI_STATEMENTS 65536 /* Enable/disable multi-stmt support */ +#define CLIENT_MULTI_RESULTS 131072 /* Enable/disable multi-results */ +#define CLIENT_REMEMBER_OPTIONS (((ulong) 1) << 31) + +#define SERVER_STATUS_IN_TRANS 1 /* Transaction has started */ +#define SERVER_STATUS_AUTOCOMMIT 2 /* Server in auto_commit mode */ +#define SERVER_STATUS_MORE_RESULTS 4 /* More results on server */ +#define SERVER_MORE_RESULTS_EXISTS 8 /* Multi query - next query exists */ +#define SERVER_QUERY_NO_GOOD_INDEX_USED 16 +#define SERVER_QUERY_NO_INDEX_USED 32 +#define SERVER_STATUS_DB_DROPPED 256 /* A database was dropped */ + +#define MYSQL_ERRMSG_SIZE 512 +#define NET_READ_TIMEOUT 30 /* Timeout on read */ +#define NET_WRITE_TIMEOUT 60 /* Timeout on write */ +#define NET_WAIT_TIMEOUT 8*60*60 /* Wait for new query */ + +struct st_vio; /* Only C */ +typedef struct st_vio Vio; + +#define MAX_TINYINT_WIDTH 3 /* Max width for a TINY w.o. sign */ +#define MAX_SMALLINT_WIDTH 5 /* Max width for a SHORT w.o. sign */ +#define MAX_MEDIUMINT_WIDTH 8 /* Max width for a INT24 w.o. sign */ +#define MAX_INT_WIDTH 10 /* Max width for a LONG w.o. sign */ +#define MAX_BIGINT_WIDTH 20 /* Max width for a LONGLONG */ +#define MAX_CHAR_WIDTH 255 /* Max length for a CHAR colum */ +#define MAX_BLOB_WIDTH 8192 /* Default width for blob */ + +typedef struct st_net { +#if !defined(CHECK_EMBEDDED_DIFFERENCES) || !defined(EMBEDDED_LIBRARY) + Vio* vio; + unsigned char *buff,*buff_end,*write_pos,*read_pos; + my_socket fd; /* For Perl DBI/dbd */ + unsigned long max_packet,max_packet_size; + unsigned int pkt_nr,compress_pkt_nr; + unsigned int write_timeout, read_timeout, retry_count; + int fcntl; + my_bool compress; + /* + The following variable is set if we are doing several queries in one + command ( as in LOAD TABLE ... FROM MASTER ), + and do not want to confuse the client with OK at the wrong time + */ + unsigned long remain_in_buf,length, buf_length, where_b; + unsigned int *return_status; + unsigned char reading_or_writing; + char save_char; + my_bool no_send_ok; + /* + Pointer to query object in query cache, do not equal NULL (0) for + queries in cache that have not stored its results yet + */ +#endif + char last_error[MYSQL_ERRMSG_SIZE], sqlstate[SQLSTATE_LENGTH+1]; + unsigned int last_errno; + unsigned char error; + gptr query_cache_query; + my_bool report_error; /* We should report error (we have unreported error) */ + my_bool return_errno; +} NET; + +#define packet_error (~(unsigned long) 0) + +enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY, + MYSQL_TYPE_SHORT, MYSQL_TYPE_LONG, + MYSQL_TYPE_FLOAT, MYSQL_TYPE_DOUBLE, + MYSQL_TYPE_NULL, MYSQL_TYPE_TIMESTAMP, + MYSQL_TYPE_LONGLONG,MYSQL_TYPE_INT24, + MYSQL_TYPE_DATE, MYSQL_TYPE_TIME, + MYSQL_TYPE_DATETIME, MYSQL_TYPE_YEAR, + MYSQL_TYPE_NEWDATE, + MYSQL_TYPE_NEW_DECIMAL=246, + MYSQL_TYPE_ENUM=247, + MYSQL_TYPE_SET=248, + MYSQL_TYPE_TINY_BLOB=249, + MYSQL_TYPE_MEDIUM_BLOB=250, + MYSQL_TYPE_LONG_BLOB=251, + MYSQL_TYPE_BLOB=252, + MYSQL_TYPE_VAR_STRING=253, + MYSQL_TYPE_STRING=254, + MYSQL_TYPE_GEOMETRY=255 + +}; + +/* For backward compatibility */ +#define CLIENT_MULTI_QUERIES CLIENT_MULTI_STATEMENTS +#define FIELD_TYPE_DECIMAL MYSQL_TYPE_DECIMAL +#define FIELD_TYPE_TINY MYSQL_TYPE_TINY +#define FIELD_TYPE_SHORT MYSQL_TYPE_SHORT +#define FIELD_TYPE_LONG MYSQL_TYPE_LONG +#define FIELD_TYPE_FLOAT MYSQL_TYPE_FLOAT +#define FIELD_TYPE_DOUBLE MYSQL_TYPE_DOUBLE +#define FIELD_TYPE_NULL MYSQL_TYPE_NULL +#define FIELD_TYPE_TIMESTAMP MYSQL_TYPE_TIMESTAMP +#define FIELD_TYPE_LONGLONG MYSQL_TYPE_LONGLONG +#define FIELD_TYPE_INT24 MYSQL_TYPE_INT24 +#define FIELD_TYPE_DATE MYSQL_TYPE_DATE +#define FIELD_TYPE_TIME MYSQL_TYPE_TIME +#define FIELD_TYPE_DATETIME MYSQL_TYPE_DATETIME +#define FIELD_TYPE_YEAR MYSQL_TYPE_YEAR +#define FIELD_TYPE_NEWDATE MYSQL_TYPE_NEWDATE +#define FIELD_TYPE_NEW_DECIMAL MYSQL_TYPE_NEW_DECIMAL +#define FIELD_TYPE_ENUM MYSQL_TYPE_ENUM +#define FIELD_TYPE_SET MYSQL_TYPE_SET +#define FIELD_TYPE_TINY_BLOB MYSQL_TYPE_TINY_BLOB +#define FIELD_TYPE_MEDIUM_BLOB MYSQL_TYPE_MEDIUM_BLOB +#define FIELD_TYPE_LONG_BLOB MYSQL_TYPE_LONG_BLOB +#define FIELD_TYPE_BLOB MYSQL_TYPE_BLOB +#define FIELD_TYPE_VAR_STRING MYSQL_TYPE_VAR_STRING +#define FIELD_TYPE_STRING MYSQL_TYPE_STRING +#define FIELD_TYPE_CHAR MYSQL_TYPE_TINY +#define FIELD_TYPE_INTERVAL MYSQL_TYPE_ENUM +#define FIELD_TYPE_GEOMETRY MYSQL_TYPE_GEOMETRY + + +/* Shutdown/kill enums and constants */ + +/* Bits for THD::killable. */ +#define MYSQL_SHUTDOWN_KILLABLE_CONNECT (unsigned char)(1 << 0) +#define MYSQL_SHUTDOWN_KILLABLE_TRANS (unsigned char)(1 << 1) +#define MYSQL_SHUTDOWN_KILLABLE_LOCK_TABLE (unsigned char)(1 << 2) +#define MYSQL_SHUTDOWN_KILLABLE_UPDATE (unsigned char)(1 << 3) + +enum mysql_enum_shutdown_level { + /* + We want levels to be in growing order of hardness (because we use number + comparisons). Note that DEFAULT does not respect the growing property, but + it's ok. + */ + SHUTDOWN_DEFAULT = 0, + /* wait for existing connections to finish */ + SHUTDOWN_WAIT_CONNECTIONS= MYSQL_SHUTDOWN_KILLABLE_CONNECT, + /* wait for existing trans to finish */ + SHUTDOWN_WAIT_TRANSACTIONS= MYSQL_SHUTDOWN_KILLABLE_TRANS, + /* wait for existing updates to finish (=> no partial MyISAM update) */ + SHUTDOWN_WAIT_UPDATES= MYSQL_SHUTDOWN_KILLABLE_UPDATE, + /* flush InnoDB buffers and other storage engines' buffers*/ + SHUTDOWN_WAIT_ALL_BUFFERS= (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1), + /* don't flush InnoDB buffers, flush other storage engines' buffers*/ + SHUTDOWN_WAIT_CRITICAL_BUFFERS= (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1) + 1, + /* Now the 2 levels of the KILL command */ +#if MYSQL_VERSION_ID >= 50000 + KILL_QUERY= 254, +#endif + KILL_CONNECTION= 255 +}; + +/* options for mysql_set_option */ +enum enum_mysql_set_option +{ + MYSQL_OPTION_MULTI_STATEMENTS_ON, + MYSQL_OPTION_MULTI_STATEMENTS_OFF +}; + +#define net_new_transaction(net) ((net)->pkt_nr=0) + +#ifdef __cplusplus +extern "C" { +#endif + +my_bool my_net_init(NET *net, Vio* vio); +void my_net_local_init(NET *net); +void net_end(NET *net); +void net_clear(NET *net); +my_bool net_realloc(NET *net, unsigned long length); +my_bool net_flush(NET *net); +my_bool my_net_write(NET *net,const char *packet,unsigned long len); +my_bool net_write_command(NET *net,unsigned char command, + const char *header, unsigned long head_len, + const char *packet, unsigned long len); +int net_real_write(NET *net,const char *packet,unsigned long len); +unsigned long my_net_read(NET *net); + +/* + The following function is not meant for normal usage + Currently it's used internally by manager.c +*/ +struct sockaddr; +int my_connect(my_socket s, const struct sockaddr *name, unsigned int namelen, + unsigned int timeout); + +struct rand_struct { + unsigned long seed1,seed2,max_value; + double max_value_dbl; +}; + +#ifdef __cplusplus +} +#endif + + /* The following is for user defined functions */ + +enum Item_result {STRING_RESULT, REAL_RESULT, INT_RESULT, ROW_RESULT}; + +typedef struct st_udf_args +{ + unsigned int arg_count; /* Number of arguments */ + enum Item_result *arg_type; /* Pointer to item_results */ + char **args; /* Pointer to argument */ + unsigned long *lengths; /* Length of string arguments */ + char *maybe_null; /* Set to 1 for all maybe_null args */ +} UDF_ARGS; + + /* This holds information about the result */ + +typedef struct st_udf_init +{ + my_bool maybe_null; /* 1 if function can return NULL */ + unsigned int decimals; /* for real functions */ + unsigned long max_length; /* For string functions */ + char *ptr; /* free pointer for function data */ + my_bool const_item; /* 0 if result is independent of arguments */ +} UDF_INIT; + + /* Constants when using compression */ +#define NET_HEADER_SIZE 4 /* standard header size */ +#define COMP_HEADER_SIZE 3 /* compression header extra size */ + + /* Prototypes to password functions */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + These functions are used for authentication by client and server and + implemented in sql/password.c +*/ + +void randominit(struct rand_struct *, unsigned long seed1, + unsigned long seed2); +double my_rnd(struct rand_struct *); +void create_random_string(char *to, unsigned int length, struct rand_struct *rand_st); + +void hash_password(unsigned long *to, const char *password, unsigned int password_len); +void make_scrambled_password_323(char *to, const char *password); +void scramble_323(char *to, const char *message, const char *password); +my_bool check_scramble_323(const char *, const char *message, + unsigned long *salt); +void get_salt_from_password_323(unsigned long *res, const char *password); +void make_password_from_salt_323(char *to, const unsigned long *salt); + +void make_scrambled_password(char *to, const char *password); +void scramble(char *to, const char *message, const char *password); +my_bool check_scramble(const char *reply, const char *message, + const unsigned char *hash_stage2); +void get_salt_from_password(unsigned char *res, const char *password); +void make_password_from_salt(char *to, const unsigned char *hash_stage2); + +/* end of password.c */ + +char *get_tty_password(char *opt_message); +const char *mysql_errno_to_sqlstate(unsigned int mysql_errno); + +/* Some other useful functions */ + +my_bool my_init(void); +int load_defaults(const char *conf_file, const char **groups, + int *argc, char ***argv); +my_bool my_thread_init(void); +void my_thread_end(void); + +#ifdef _global_h +ulong STDCALL net_field_length(uchar **packet); +my_ulonglong net_field_length_ll(uchar **packet); +char *net_store_length(char *pkg, ulonglong length); +#endif + +#ifdef __cplusplus +} +#endif + +#define NULL_LENGTH ((unsigned long) ~0) /* For net_store_length */ +#define MYSQL_STMT_HEADER 4 +#define MYSQL_LONG_DATA_HEADER 6 + +#endif diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Headers/mysql_embed.h b/trunk/MCPKit_bundled.framework/Versions/A/Headers/mysql_embed.h new file mode 100644 index 00000000..603af8e8 --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Headers/mysql_embed.h @@ -0,0 +1,33 @@ +/* Copyright (C) 2000 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +/* Defines that are unique to the embedded version of MySQL */ + +#ifdef EMBEDDED_LIBRARY + +/* Things we don't need in the embedded version of MySQL */ +/* TODO HF add #undef HAVE_VIO if we don't want client in embedded library */ + +#undef HAVE_PSTACK /* No stacktrace */ +#undef HAVE_DLOPEN /* No udf functions */ +#undef HAVE_OPENSSL +#undef HAVE_ISAM +#undef HAVE_SMEM /* No shared memory */ +#undef HAVE_NDBCLUSTER_DB /* No NDB cluster */ + +#define DONT_USE_RAID + +#endif /* EMBEDDED_LIBRARY */ diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Headers/mysql_time.h b/trunk/MCPKit_bundled.framework/Versions/A/Headers/mysql_time.h new file mode 100644 index 00000000..5f4fc12c --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Headers/mysql_time.h @@ -0,0 +1,56 @@ +/* Copyright (C) 2004 MySQL AB & MySQL Finland AB & TCX DataKonsult AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#ifndef _mysql_time_h_ +#define _mysql_time_h_ + +/* + Time declarations shared between the server and client API: + you should not add anything to this header unless it's used + (and hence should be visible) in mysql.h. + If you're looking for a place to add new time-related declaration, + it's most likely my_time.h. See also "C API Handling of Date + and Time Values" chapter in documentation. +*/ + +enum enum_mysql_timestamp_type +{ + MYSQL_TIMESTAMP_NONE= -2, MYSQL_TIMESTAMP_ERROR= -1, + MYSQL_TIMESTAMP_DATE= 0, MYSQL_TIMESTAMP_DATETIME= 1, MYSQL_TIMESTAMP_TIME= 2 +}; + + +/* + Structure which is used to represent datetime values inside MySQL. + + We assume that values in this structure are normalized, i.e. year <= 9999, + month <= 12, day <= 31, hour <= 23, hour <= 59, hour <= 59. Many functions + in server such as my_system_gmt_sec() or make_time() family of functions + rely on this (actually now usage of make_*() family relies on a bit weaker + restriction). Also functions that produce MYSQL_TIME as result ensure this. + There is one exception to this rule though if this structure holds time + value (time_type == MYSQL_TIMESTAMP_TIME) days and hour member can hold + bigger values. +*/ +typedef struct st_mysql_time +{ + unsigned int year, month, day, hour, minute, second; + unsigned long second_part; + my_bool neg; + enum enum_mysql_timestamp_type time_type; +} MYSQL_TIME; + +#endif /* _mysql_time_h_ */ diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Headers/mysql_version.h b/trunk/MCPKit_bundled.framework/Versions/A/Headers/mysql_version.h new file mode 100644 index 00000000..9f38c100 --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Headers/mysql_version.h @@ -0,0 +1,29 @@ +/* Copyright Abandoned 1996, 1999, 2001 MySQL AB + This file is public domain and comes with NO WARRANTY of any kind */ + +/* Version numbers for protocol & mysqld */ + +#ifndef _mysql_version_h +#define _mysql_version_h +#ifdef _CUSTOMCONFIG_ +#include +#else +#define PROTOCOL_VERSION 10 +#define MYSQL_SERVER_VERSION "4.1.12" +#define MYSQL_BASE_VERSION "mysqld-4.1" +#define MYSQL_SERVER_SUFFIX_DEF "" +#define FRM_VER 6 +#define MYSQL_VERSION_ID 40112 +#define MYSQL_PORT 3306 +#define MYSQL_UNIX_ADDR "/tmp/mysql.sock" +#define MYSQL_CONFIG_NAME "my" +#define MYSQL_COMPILATION_COMMENT "Source distribution" + +/* mysqld compile time options */ +#endif /* _CUSTOMCONFIG_ */ + +#ifndef LICENSE +#define LICENSE GPL +#endif /* LICENSE */ + +#endif /* _mysql_version_h */ diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Headers/typelib.h b/trunk/MCPKit_bundled.framework/Versions/A/Headers/typelib.h new file mode 100644 index 00000000..4d6a90ad --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Headers/typelib.h @@ -0,0 +1,34 @@ +/* Copyright (C) 2000 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + +#ifndef _typelib_h +#define _typelib_h + +typedef struct st_typelib { /* Different types saved here */ + unsigned int count; /* How many types */ + const char *name; /* Name of typelib */ + const char **type_names; + unsigned int *type_lengths; +} TYPELIB; + +extern int find_type(char *x,TYPELIB *typelib,unsigned int full_name); +extern void make_type(char *to,unsigned int nr,TYPELIB *typelib); +extern const char *get_type(TYPELIB *typelib,unsigned int nr); + +extern TYPELIB sql_protocol_typelib; + +#endif /* _typelib_h */ diff --git a/trunk/MCPKit_bundled.framework/Versions/A/MCPKit_bundled b/trunk/MCPKit_bundled.framework/Versions/A/MCPKit_bundled new file mode 100755 index 00000000..160ce713 Binary files /dev/null and b/trunk/MCPKit_bundled.framework/Versions/A/MCPKit_bundled differ diff --git a/trunk/MCPKit_bundled.framework/Versions/A/PrivateHeaders/MCPAttribute+Private.h b/trunk/MCPKit_bundled.framework/Versions/A/PrivateHeaders/MCPAttribute+Private.h new file mode 100644 index 00000000..2426b16a --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/PrivateHeaders/MCPAttribute+Private.h @@ -0,0 +1,35 @@ +// +// MCPAttribute+Private.h +// MCPModeler +// +// Created by Serge Cohen (serge.cohen@m4x.org) on 09/08/04. +// Copyright 2004 Serge Cohen. All rights reserved. +// +// This code is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2 of the License, or any later version. +// +// This code is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// For a copy of the GNU General Public License, visit or +// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330, +// Boston, MA 02111-1307, USA. +// +// More info at +// + +#import "MCPAttribute.h" + +@interface MCPAttribute (Private) + + +#pragma mark Setters +- (void) setValueClassName:(NSString *) iClassName; + +#pragma mark Pseudo-getters + +@end + diff --git a/trunk/MCPKit_bundled.framework/Versions/A/PrivateHeaders/MCPClassDescription+Private.h b/trunk/MCPKit_bundled.framework/Versions/A/PrivateHeaders/MCPClassDescription+Private.h new file mode 100644 index 00000000..fa4ffab3 --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/PrivateHeaders/MCPClassDescription+Private.h @@ -0,0 +1,41 @@ +// +// MCPClassDescription+Private.h +// MCPModeler +// +// Created by Serge Cohen (serge.cohen@m4x.org) on 09/08/04. +// Copyright 2004 Serge Cohen. All rights reserved. +// +// This code is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2 of the License, or any later version. +// +// This code is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// For a copy of the GNU General Public License, visit or +// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330, +// Boston, MA 02111-1307, USA. +// +// More info at +// + + +#import "MCPClassDescription.h" + +@interface MCPClassDescription (Private) + +#pragma mark Setters +- (void) setAttributes:(NSArray *) iAttributes; +- (void) setRelations:(NSArray *) iRelations; +- (void) insertObject:(MCPRelation *) iRelation inIncomingsAtIndex:(unsigned int) index; +- (void) removeObjectFromIncomingsAtIndex:(unsigned int) index; + +#pragma mark Getters +- (NSArray *) incomings; +- (unsigned int) countOfIncomings; +- (MCPRelation *) objectInIncomingsAtIndex:(unsigned int) index; +- (unsigned int) indexOfIncoming:(id) iRelation; + +@end diff --git a/trunk/MCPKit_bundled.framework/Versions/A/PrivateHeaders/MCPRelation+Private.h b/trunk/MCPKit_bundled.framework/Versions/A/PrivateHeaders/MCPRelation+Private.h new file mode 100644 index 00000000..aa286787 --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/PrivateHeaders/MCPRelation+Private.h @@ -0,0 +1,41 @@ +// +// MCPRelation+Private.h +// MCPModeler +// +// Created by Serge Cohen (serge.cohen@m4x.org) on 11/08/04. +// Copyright 2004 Serge Cohen. All rights reserved. +// +// This code is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2 of the License, or any later version. +// +// This code is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// For a copy of the GNU General Public License, visit or +// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330, +// Boston, MA 02111-1307, USA. +// +// More info at +// + +#import "MCPRelation.h" + +@interface MCPRelation (Private) + +#pragma mark Making some work +- (void) invalidateJoins; // Check that the joins are realistics. + +#pragma mark Setters +- (void) setOrigin:(MCPClassDescription *) iOrigin; +//- (void) setJoins:(NSArray *) iJoins; + +#pragma mark Getters +- (MCPModel *) model; + +#pragma mark Fro the controller layer and the UI +- (void) addNewDefaultJoin; + +@end diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/InfoPlist.strings b/trunk/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/InfoPlist.strings new file mode 100644 index 00000000..8177d470 Binary files /dev/null and b/trunk/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/InfoPlist.strings differ diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/JavaCompiling.plist b/trunk/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/JavaCompiling.plist new file mode 100644 index 00000000..e0a16f9b --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/JavaCompiling.plist @@ -0,0 +1,8 @@ + + + + + JavaSourceSubpath + _MCPConnectionWindow_EOArchive_English.java + + diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/_MCPConnectionWindow_EOArchive_English.java b/trunk/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/_MCPConnectionWindow_EOArchive_English.java new file mode 100644 index 00000000..5ba619a6 --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/_MCPConnectionWindow_EOArchive_English.java @@ -0,0 +1,424 @@ +// _MCPConnectionWindow_EOArchive_English.java +// Generated by EnterpriseObjects palette at vendredi 14 mai 2004 11 h 08 Europe/Amsterdam + +import com.webobjects.eoapplication.*; +import com.webobjects.eocontrol.*; +import com.webobjects.eointerface.*; +import com.webobjects.eointerface.swing.*; +import com.webobjects.foundation.*; +import java.awt.*; +import javax.swing.*; +import javax.swing.border.*; +import javax.swing.table.*; +import javax.swing.text.*; + +public class _MCPConnectionWindow_EOArchive_English extends com.webobjects.eoapplication.EOArchive { + IBHelpConnector _iBHelpConnector0, _iBHelpConnector1, _iBHelpConnector2, _iBHelpConnector3; + com.webobjects.eointerface.swing.EOFrame _eoFrame0, _eoFrame1; + com.webobjects.eointerface.swing.EOTextField _nsTextField0, _nsTextField1, _nsTextField2, _nsTextField3, _nsTextField4, _nsTextField5, _nsTextField6, _nsTextField7, _nsTextField8, _nsTextField9; + com.webobjects.eointerface.swing.EOView _nsBox0, _nsBox1, _nsBox2, _nsBox3; + javax.swing.JButton _nsButton0, _nsButton1, _nsButton2, _nsButton3, _nsButton4; + javax.swing.JPanel _nsView0, _nsView1; + javax.swing.JPasswordField _nsSecureTextField0; + + public _MCPConnectionWindow_EOArchive_English(Object owner, NSDisposableRegistry registry) { + super(owner, registry); + } + + protected void _construct() { + Object owner = _owner(); + EOArchive._ObjectInstantiationDelegate delegate = (owner instanceof EOArchive._ObjectInstantiationDelegate) ? (EOArchive._ObjectInstantiationDelegate)owner : null; + Object replacement; + + super._construct(); + + _nsBox3 = (com.webobjects.eointerface.swing.EOView)_registered(new com.webobjects.eointerface.swing.EOView(), "NSView"); + _nsBox2 = (com.webobjects.eointerface.swing.EOView)_registered(new com.webobjects.eointerface.swing.EOView(), "NSBox1"); + + if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mCreateButton")) != null)) { + _nsButton4 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (javax.swing.JButton)replacement; + _replacedObjects.setObjectForKey(replacement, "_nsButton4"); + } else { + _nsButton4 = (javax.swing.JButton)_registered(new javax.swing.JButton("Create DB"), "NSButton2"); + } + + _nsButton3 = (javax.swing.JButton)_registered(new javax.swing.JButton("Cancel"), "NSButton1"); + _nsButton2 = (javax.swing.JButton)_registered(new javax.swing.JButton("Go"), "NSButton"); + _nsBox1 = (com.webobjects.eointerface.swing.EOView)_registered(new com.webobjects.eointerface.swing.EOView(), "NSView"); + _nsBox0 = (com.webobjects.eointerface.swing.EOView)_registered(new com.webobjects.eointerface.swing.EOView(), "NSBox1"); + _nsTextField9 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField23"); + _nsTextField8 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField22"); + _nsTextField7 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField21"); + _nsTextField6 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField2"); + + if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "window")) != null)) { + _eoFrame1 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (com.webobjects.eointerface.swing.EOFrame)replacement; + _replacedObjects.setObjectForKey(replacement, "_eoFrame1"); + } else { + _eoFrame1 = (com.webobjects.eointerface.swing.EOFrame)_registered(new com.webobjects.eointerface.swing.EOFrame(), "Window"); + } + + _nsView1 = (JPanel)_eoFrame1.getContentPane(); + _iBHelpConnector3 = (IBHelpConnector)_registered(new IBHelpConnector(), ""); + _iBHelpConnector2 = (IBHelpConnector)_registered(new IBHelpConnector(), ""); + _iBHelpConnector1 = (IBHelpConnector)_registered(new IBHelpConnector(), ""); + _iBHelpConnector0 = (IBHelpConnector)_registered(new IBHelpConnector(), ""); + + if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mHostField.nextFocusableComponent.nextFocusableComponent.nextFocusableComponent")) != null)) { + _nsTextField5 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (com.webobjects.eointerface.swing.EOTextField)replacement; + _replacedObjects.setObjectForKey(replacement, "_nsTextField5"); + } else { + _nsTextField5 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField12"); + } + + if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mHostField.nextFocusableComponent.nextFocusableComponent")) != null)) { + _nsTextField4 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (com.webobjects.eointerface.swing.EOTextField)replacement; + _replacedObjects.setObjectForKey(replacement, "_nsTextField4"); + } else { + _nsTextField4 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField11"); + } + + if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mHostField.nextFocusableComponent")) != null)) { + _nsTextField3 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (com.webobjects.eointerface.swing.EOTextField)replacement; + _replacedObjects.setObjectForKey(replacement, "_nsTextField3"); + } else { + _nsTextField3 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField1"); + } + + if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mHostField.nextFocusableComponent.nextFocusableComponent.nextFocusableComponent.nextFocusableComponent")) != null)) { + _nsTextField2 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (com.webobjects.eointerface.swing.EOTextField)replacement; + _replacedObjects.setObjectForKey(replacement, "_nsTextField2"); + } else { + _nsTextField2 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField"); + } + + _nsButton1 = (javax.swing.JButton)_registered(new javax.swing.JButton("Cancel"), "NSButton1"); + + if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mPasswordField.nextFocusableComponent")) != null)) { + _nsButton0 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (javax.swing.JButton)replacement; + _replacedObjects.setObjectForKey(replacement, "_nsButton0"); + } else { + _nsButton0 = (javax.swing.JButton)_registered(new javax.swing.JButton("OK"), "NSButton"); + } + + if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mPasswordField")) != null)) { + _nsSecureTextField0 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (javax.swing.JPasswordField)replacement; + _replacedObjects.setObjectForKey(replacement, "_nsSecureTextField0"); + } else { + _nsSecureTextField0 = (javax.swing.JPasswordField)_registered(new javax.swing.JPasswordField(), "NSTextField"); + } + + _nsTextField1 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField21"); + _nsTextField0 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField2"); + + if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mPasswordSheet")) != null)) { + _eoFrame0 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (com.webobjects.eointerface.swing.EOFrame)replacement; + _replacedObjects.setObjectForKey(replacement, "_eoFrame0"); + } else { + _eoFrame0 = (com.webobjects.eointerface.swing.EOFrame)_registered(new com.webobjects.eointerface.swing.EOFrame(), "Panel"); + } + + _nsView0 = (JPanel)_eoFrame0.getContentPane(); + } + + protected void _awaken() { + super._awaken(); + + if (_replacedObjects.objectForKey("_eoFrame0") == null) { + _connect(_eoFrame0, _owner(), "delegate"); + } + + _nsButton0.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "passwordClick", _nsButton0), "")); + + if (_replacedObjects.objectForKey("_eoFrame0") == null) { + _connect(_owner(), _eoFrame0, "mPasswordSheet"); + } + + if (_replacedObjects.objectForKey("_nsSecureTextField0") == null) { + _connect(_owner(), _nsSecureTextField0, "mPasswordField"); + } + + if (_replacedObjects.objectForKey("_nsButton4") == null) { + _connect(_owner(), _nsButton4, "mCreateButton"); + } + + _nsButton4.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "doCreate", _nsButton4), "")); + _nsButton3.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "doCancel", _nsButton3), "")); + _nsButton2.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "doGo", _nsButton2), "")); + + if (_replacedObjects.objectForKey("_eoFrame1") == null) { + _connect(_owner(), _eoFrame1, "window"); + } + + _nsTextField2.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "modifyInstance", _nsTextField2), "")); + + if (_replacedObjects.objectForKey("_nsTextField3") == null) { + _connect(_owner(), _nsTextField3, "mLoginField"); + } + + _nsTextField3.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "modifyInstance", _nsTextField3), "")); + + if (_replacedObjects.objectForKey("_nsTextField4") == null) { + _connect(_owner(), _nsTextField4, "mDatabaseField"); + } + + _nsTextField4.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "modifyInstance", _nsTextField4), "")); + + if (_replacedObjects.objectForKey("_nsTextField5") == null) { + _connect(_owner(), _nsTextField5, "mPortField"); + } + + _nsTextField5.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "modifyInstance", _nsTextField5), "")); + + if (_replacedObjects.objectForKey("_nsTextField2") == null) { + _connect(_owner(), _nsTextField2, "mHostField"); + } + + _nsButton1.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "passwordClick", _nsButton1), "")); + } + + protected void _init() { + super._init(); + if (!(_nsBox2.getLayout() instanceof EOViewLayout)) { _nsBox2.setLayout(new EOViewLayout()); } + _nsBox3.setSize(401, 1); + _nsBox3.setLocation(2, 2); + ((EOViewLayout)_nsBox2.getLayout()).setAutosizingMask(_nsBox3, EOViewLayout.MinYMargin); + _nsBox2.add(_nsBox3); + _nsBox2.setBorder(new com.webobjects.eointerface.swing._EODefaultBorder("", true, "Lucida Grande", 13, Font.PLAIN)); + + if (_replacedObjects.objectForKey("_nsButton4") == null) { + _setFontForComponent(_nsButton4, "Lucida Grande", 13, Font.PLAIN); + _nsButton4.setMargin(new Insets(0, 2, 0, 2)); + } + + _setFontForComponent(_nsButton3, "Lucida Grande", 13, Font.PLAIN); + _nsButton3.setMargin(new Insets(0, 2, 0, 2)); + _setFontForComponent(_nsButton2, "Lucida Grande", 13, Font.PLAIN); + _nsButton2.setMargin(new Insets(0, 2, 0, 2)); + if (!(_nsBox0.getLayout() instanceof EOViewLayout)) { _nsBox0.setLayout(new EOViewLayout()); } + _nsBox1.setSize(328, 1); + _nsBox1.setLocation(2, 2); + ((EOViewLayout)_nsBox0.getLayout()).setAutosizingMask(_nsBox1, EOViewLayout.MinYMargin); + _nsBox0.add(_nsBox1); + _nsBox0.setBorder(new com.webobjects.eointerface.swing._EODefaultBorder("", true, "Lucida Grande", 13, Font.PLAIN)); + _setFontForComponent(_nsTextField9, "Lucida Grande", 13, Font.PLAIN); + _nsTextField9.setEditable(false); + _nsTextField9.setOpaque(false); + _nsTextField9.setText("Port :"); + _nsTextField9.setHorizontalAlignment(javax.swing.JTextField.RIGHT); + _nsTextField9.setSelectable(true); + _nsTextField9.setEnabled(true); + _nsTextField9.setBorder(null); + _setFontForComponent(_nsTextField8, "Lucida Grande", 13, Font.PLAIN); + _nsTextField8.setEditable(false); + _nsTextField8.setOpaque(false); + _nsTextField8.setText("Database :"); + _nsTextField8.setHorizontalAlignment(javax.swing.JTextField.RIGHT); + _nsTextField8.setSelectable(true); + _nsTextField8.setEnabled(true); + _nsTextField8.setBorder(null); + _setFontForComponent(_nsTextField7, "Lucida Grande", 13, Font.PLAIN); + _nsTextField7.setEditable(false); + _nsTextField7.setOpaque(false); + _nsTextField7.setText("Login :"); + _nsTextField7.setHorizontalAlignment(javax.swing.JTextField.RIGHT); + _nsTextField7.setSelectable(true); + _nsTextField7.setEnabled(true); + _nsTextField7.setBorder(null); + _setFontForComponent(_nsTextField6, "Lucida Grande", 13, Font.PLAIN); + _nsTextField6.setEditable(false); + _nsTextField6.setOpaque(false); + _nsTextField6.setText("Host :"); + _nsTextField6.setHorizontalAlignment(javax.swing.JTextField.RIGHT); + _nsTextField6.setSelectable(true); + _nsTextField6.setEnabled(true); + _nsTextField6.setBorder(null); + if (!(_nsView1.getLayout() instanceof EOViewLayout)) { _nsView1.setLayout(new EOViewLayout()); } + _nsTextField6.setSize(72, 17); + _nsTextField6.setLocation(11, 17); + ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField6, EOViewLayout.MaxXMargin | EOViewLayout.MaxYMargin); + _nsView1.add(_nsTextField6); + _nsTextField7.setSize(72, 17); + _nsTextField7.setLocation(11, 47); + ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField7, EOViewLayout.MaxXMargin | EOViewLayout.MaxYMargin); + _nsView1.add(_nsTextField7); + _nsTextField8.setSize(72, 17); + _nsTextField8.setLocation(11, 77); + ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField8, EOViewLayout.MaxXMargin | EOViewLayout.MaxYMargin); + _nsView1.add(_nsTextField8); + _nsTextField9.setSize(72, 17); + _nsTextField9.setLocation(11, 107); + ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField9, EOViewLayout.MaxXMargin | EOViewLayout.MaxYMargin); + _nsView1.add(_nsTextField9); + _nsTextField2.setSize(242, 22); + _nsTextField2.setLocation(88, 14); + ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField2, EOViewLayout.MinXMargin | EOViewLayout.WidthSizable | EOViewLayout.MaxYMargin); + _nsView1.add(_nsTextField2); + _nsTextField3.setSize(242, 22); + _nsTextField3.setLocation(88, 44); + ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField3, EOViewLayout.MinXMargin | EOViewLayout.WidthSizable | EOViewLayout.MaxYMargin); + _nsView1.add(_nsTextField3); + _nsTextField4.setSize(242, 22); + _nsTextField4.setLocation(88, 74); + ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField4, EOViewLayout.MinXMargin | EOViewLayout.WidthSizable | EOViewLayout.MaxYMargin); + _nsView1.add(_nsTextField4); + _nsTextField5.setSize(242, 22); + _nsTextField5.setLocation(88, 104); + ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField5, EOViewLayout.MinXMargin | EOViewLayout.WidthSizable | EOViewLayout.MaxYMargin); + _nsView1.add(_nsTextField5); + _nsBox0.setSize(332, 5); + _nsBox0.setLocation(5, 130); + ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsBox0, EOViewLayout.WidthSizable | EOViewLayout.MaxYMargin); + _nsView1.add(_nsBox0); + _nsButton2.setSize(77, 26); + _nsButton2.setLocation(256, 144); + ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsButton2, EOViewLayout.MinXMargin | EOViewLayout.MinYMargin); + _nsView1.add(_nsButton2); + _nsButton3.setSize(77, 26); + _nsButton3.setLocation(172, 144); + ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsButton3, EOViewLayout.MinXMargin | EOViewLayout.MinYMargin); + _nsView1.add(_nsButton3); + _nsButton4.setSize(96, 26); + _nsButton4.setLocation(12, 144); + ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsButton4, EOViewLayout.MinYMargin); + _nsView1.add(_nsButton4); + + if (_replacedObjects.objectForKey("_eoFrame1") == null) { + _nsView1.setSize(342, 180); + _eoFrame1.setTitle("New Connection Parameters"); + _eoFrame1.setLocation(111, 492); + _eoFrame1.setSize(342, 180); + } + + if (_replacedObjects.objectForKey("_nsTextField5") == null) { + _connect(_nsTextField5, _nsTextField2, "nextFocusableComponent"); + } + + if (_replacedObjects.objectForKey("_nsTextField5") == null) { + _setFontForComponent(_nsTextField5, "Lucida Grande", 13, Font.PLAIN); + _nsTextField5.setEditable(true); + _nsTextField5.setOpaque(true); + _nsTextField5.setText(""); + _nsTextField5.setHorizontalAlignment(javax.swing.JTextField.LEFT); + _nsTextField5.setSelectable(true); + _nsTextField5.setEnabled(true); + } + + if (_replacedObjects.objectForKey("_nsTextField4") == null) { + _connect(_nsTextField4, _nsTextField5, "nextFocusableComponent"); + } + + if (_replacedObjects.objectForKey("_nsTextField4") == null) { + _setFontForComponent(_nsTextField4, "Lucida Grande", 13, Font.PLAIN); + _nsTextField4.setEditable(true); + _nsTextField4.setOpaque(true); + _nsTextField4.setText(""); + _nsTextField4.setHorizontalAlignment(javax.swing.JTextField.LEFT); + _nsTextField4.setSelectable(true); + _nsTextField4.setEnabled(true); + } + + if (_replacedObjects.objectForKey("_nsTextField3") == null) { + _connect(_nsTextField3, _nsTextField4, "nextFocusableComponent"); + } + + if (_replacedObjects.objectForKey("_nsTextField3") == null) { + _setFontForComponent(_nsTextField3, "Lucida Grande", 13, Font.PLAIN); + _nsTextField3.setEditable(true); + _nsTextField3.setOpaque(true); + _nsTextField3.setText(""); + _nsTextField3.setHorizontalAlignment(javax.swing.JTextField.LEFT); + _nsTextField3.setSelectable(true); + _nsTextField3.setEnabled(true); + } + + if (_replacedObjects.objectForKey("_nsTextField2") == null) { + _connect(_nsTextField2, _nsTextField3, "nextFocusableComponent"); + } + + if (_replacedObjects.objectForKey("_nsTextField2") == null) { + _setFontForComponent(_nsTextField2, "Lucida Grande", 13, Font.PLAIN); + _nsTextField2.setEditable(true); + _nsTextField2.setOpaque(true); + _nsTextField2.setText(""); + _nsTextField2.setHorizontalAlignment(javax.swing.JTextField.LEFT); + _nsTextField2.setSelectable(true); + _nsTextField2.setEnabled(true); + } + + _connect(_nsButton1, _nsSecureTextField0, "nextFocusableComponent"); + _setFontForComponent(_nsButton1, "Lucida Grande", 13, Font.PLAIN); + _nsButton1.setMargin(new Insets(0, 2, 0, 2)); + + if (_replacedObjects.objectForKey("_nsButton0") == null) { + _connect(_nsButton0, _nsButton1, "nextFocusableComponent"); + } + + if (_replacedObjects.objectForKey("_nsButton0") == null) { + _setFontForComponent(_nsButton0, "Lucida Grande", 13, Font.PLAIN); + _nsButton0.setMargin(new Insets(0, 2, 0, 2)); + } + + if (_replacedObjects.objectForKey("_nsSecureTextField0") == null) { + _connect(_nsSecureTextField0, _nsButton0, "nextFocusableComponent"); + } + + if (_replacedObjects.objectForKey("_nsSecureTextField0") == null) { + _setFontForComponent(_nsSecureTextField0, "Lucida Grande", 13, Font.PLAIN); + _nsSecureTextField0.setEditable(true); + _nsSecureTextField0.setOpaque(true); + _nsSecureTextField0.setText(""); + _nsSecureTextField0.setHorizontalAlignment(javax.swing.JTextField.LEFT); + _nsSecureTextField0.setEnabled(true); + } + + _setFontForComponent(_nsTextField1, "Lucida Grande", 13, Font.PLAIN); + _nsTextField1.setEditable(false); + _nsTextField1.setOpaque(false); + _nsTextField1.setText("Password :"); + _nsTextField1.setHorizontalAlignment(javax.swing.JTextField.RIGHT); + _nsTextField1.setSelectable(false); + _nsTextField1.setEnabled(true); + _nsTextField1.setBorder(null); + _setFontForComponent(_nsTextField0, "Lucida Grande", 13, Font.PLAIN); + _nsTextField0.setEditable(false); + _nsTextField0.setOpaque(false); + _nsTextField0.setText("Please enter your password for DB server "); + _nsTextField0.setHorizontalAlignment(javax.swing.JTextField.CENTER); + _nsTextField0.setSelectable(false); + _nsTextField0.setEnabled(true); + _nsTextField0.setBorder(null); + if (!(_nsView0.getLayout() instanceof EOViewLayout)) { _nsView0.setLayout(new EOViewLayout()); } + _nsTextField0.setSize(395, 17); + _nsTextField0.setLocation(11, 14); + ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsTextField0, EOViewLayout.WidthSizable | EOViewLayout.MaxYMargin); + _nsView0.add(_nsTextField0); + _nsTextField1.setSize(73, 17); + _nsTextField1.setLocation(11, 51); + ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsTextField1, EOViewLayout.MaxXMargin | EOViewLayout.MaxYMargin); + _nsView0.add(_nsTextField1); + _nsSecureTextField0.setSize(314, 22); + _nsSecureTextField0.setLocation(89, 48); + ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsSecureTextField0, EOViewLayout.WidthSizable | EOViewLayout.MinYMargin); + _nsView0.add(_nsSecureTextField0); + _nsBox2.setSize(405, 5); + _nsBox2.setLocation(5, 37); + ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsBox2, EOViewLayout.MinYMargin); + _nsView0.add(_nsBox2); + _nsButton0.setSize(77, 26); + _nsButton0.setLocation(329, 88); + ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton0, EOViewLayout.MinYMargin); + _nsView0.add(_nsButton0); + _nsButton1.setSize(77, 26); + _nsButton1.setLocation(245, 88); + ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton1, EOViewLayout.MinYMargin); + _nsView0.add(_nsButton1); + + if (_replacedObjects.objectForKey("_eoFrame0") == null) { + _nsView0.setSize(415, 124); + _eoFrame0.setTitle("Password"); + _eoFrame0.setLocation(95, 422); + _eoFrame0.setSize(415, 124); + } + } +} diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/classes.nib b/trunk/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/classes.nib new file mode 100644 index 00000000..e9dc7fa3 --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/classes.nib @@ -0,0 +1,28 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + { + ACTIONS = { + askPassword = id; + doCancel = id; + doCreate = id; + doGo = id; + modifyInstance = id; + passwordClick = id; + }; + CLASS = MCPConnectionWinCont; + LANGUAGE = ObjC; + OUTLETS = { + mCreateButton = NSButton; + mDatabaseField = NSTextField; + mHostField = NSTextField; + mLoginField = NSTextField; + mPasswordField = NSTextField; + mPasswordSheet = NSPanel; + mPortField = NSTextField; + }; + SUPERCLASS = NSWindowController; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/info.nib b/trunk/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/info.nib new file mode 100644 index 00000000..10b70ee6 --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/info.nib @@ -0,0 +1,16 @@ + + + + + IBDocumentLocation + 193 200 356 240 0 0 1280 832 + IBFramework Version + 364.0 + IBOpenObjects + + 5 + + IBSystem Version + 7F44 + + diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/keyedobjects.nib b/trunk/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/keyedobjects.nib new file mode 100644 index 00000000..d0ebc199 Binary files /dev/null and b/trunk/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/keyedobjects.nib differ diff --git a/trunk/MCPKit_bundled.framework/Versions/A/Resources/Info.plist b/trunk/MCPKit_bundled.framework/Versions/A/Resources/Info.plist new file mode 100644 index 00000000..c5731f54 --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + MCPKit_bundled + CFBundleIdentifier + net.chocolatnoir.MCPKit_bundled + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + FMWK + CFBundleSignature + ???? + CFBundleVersion + 1.0 + + diff --git a/trunk/MCPKit_bundled.framework/Versions/Current b/trunk/MCPKit_bundled.framework/Versions/Current new file mode 120000 index 00000000..8c7e5a66 --- /dev/null +++ b/trunk/MCPKit_bundled.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/trunk/MainController.h b/trunk/MainController.h new file mode 100644 index 00000000..5c02a75b --- /dev/null +++ b/trunk/MainController.h @@ -0,0 +1,110 @@ +// +// MainController.h +// sequel-pro +// +// Created by lorenz textor (lorenz@textor.ch) on Wed May 01 2002. +// Copyright (c) 2002-2003 Lorenz Textor. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at +// Or mail to + +#import +#import + + +@interface MainController : NSObject { + + IBOutlet id keyChainInstance; + + IBOutlet id preferencesWindow; + IBOutlet id favoriteSheet; + IBOutlet id reloadAfterAddingSwitch; + IBOutlet id reloadAfterEditingSwitch; + IBOutlet id reloadAfterRemovingSwitch; + IBOutlet id showErrorSwitch; + IBOutlet id dontShowBlobSwitch; + IBOutlet id useMonospacedFontsSwitch; + IBOutlet id fetchRowCountSwitch; + IBOutlet id limitRowsSwitch; + IBOutlet id limitRowsField; + IBOutlet id nullValueField; + IBOutlet id tableView; + IBOutlet id nameField; + IBOutlet id hostField; + IBOutlet id socketField; + IBOutlet id userField; + IBOutlet id passwordField; + IBOutlet id portField; + IBOutlet id databaseField; + IBOutlet id sshCheckbox; + IBOutlet id sshUserField; + IBOutlet id sshPasswordField; + IBOutlet id sshHostField; + IBOutlet id sshPortField; + IBOutlet id encodingPopUpButton; + + NSMutableArray *favorites; + NSUserDefaults *prefs; + + BOOL isNewFavorite; +} + +//IBAction methods +- (IBAction)openPreferences:(id)sender; +- (IBAction)addFavorite:(id)sender; +- (IBAction)removeFavorite:(id)sender; +- (IBAction)copyFavorite:(id)sender; +- (IBAction)chooseLimitRows:(id)sender; +- (IBAction)closeFavoriteSheet:(id)sender; +- (IBAction)toggleUseSSH:(id)sender; + +//services menu methods +- (void)doPerformQueryService:(NSPasteboard *)pboard userData:(NSString *)data error:(NSString **)error; + +//menu methods +- (IBAction)donate:(id)sender; +- (IBAction)visitWebsite:(id)sender; +- (IBAction)visitHelpWebsite:(id)sender; +- (IBAction)checkForUpdates:(id)sender; + +//tableView datasource methods +- (int)numberOfRowsInTableView:(NSTableView *)aTableView; +- (id)tableView:(NSTableView *)aTableView + objectValueForTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex; + +//tableView drag&drop datasource methods +- (BOOL)tableView:(NSTableView *)tv writeRows:(NSArray*)rows toPasteboard:(NSPasteboard*)pboard; +- (NSDragOperation)tableView:(NSTableView*)tv validateDrop:(id )info proposedRow:(int)row + proposedDropOperation:(NSTableViewDropOperation)operation; +- (BOOL)tableView:(NSTableView*)tv acceptDrop:(id )info row:(int)row + dropOperation:(NSTableViewDropOperation)operation; + +//tableView delegate methods +- (BOOL)tableView:(NSTableView *)aTableView shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex; + +//window delegate methods +- (BOOL)windowShouldClose:(id)sender; + +//other methods +- (void)awakeFromNib; + +//SSHTunnel methods +- (id)authenticate:(NSScriptCommand *)command; +- (id)handleQuitScriptCommand:(NSScriptCommand *)command; + +@end diff --git a/trunk/MainController.m b/trunk/MainController.m new file mode 100644 index 00000000..548c0434 --- /dev/null +++ b/trunk/MainController.m @@ -0,0 +1,829 @@ +// +// MainController.m +// sequel-pro +// +// Created by lorenz textor (lorenz@textor.ch) on Wed May 01 2002. +// Copyright (c) 2002-2003 Lorenz Textor. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at +// Or mail to + +#import "MainController.h" +#import "KeyChain.h" +#import "TableDocument.h" + + +@implementation MainController + +- (IBAction)openPreferences:(id)sender +/* +opens the preferences window +*/ +{ +//get favorites if they exist + [favorites release]; + if ( [prefs objectForKey:@"favorites"] != nil ) { + favorites = [[NSMutableArray alloc] initWithArray:[prefs objectForKey:@"favorites"]]; + } else { + favorites = [[NSMutableArray array] retain]; + } + [tableView reloadData]; + + if ( [prefs boolForKey:@"reloadAfterAdding"] ) { + [reloadAfterAddingSwitch setState:NSOnState]; + } else { + [reloadAfterAddingSwitch setState:NSOffState]; + } + if ( [prefs boolForKey:@"reloadAfterEditing"] ) { + [reloadAfterEditingSwitch setState:NSOnState]; + } else { + [reloadAfterEditingSwitch setState:NSOffState]; + } + if ( [prefs boolForKey:@"reloadAfterRemoving"] ) { + [reloadAfterRemovingSwitch setState:NSOnState]; + } else { + [reloadAfterRemovingSwitch setState:NSOffState]; + } + if ( [prefs boolForKey:@"showError"] ) { + [showErrorSwitch setState:NSOnState]; + } else { + [showErrorSwitch setState:NSOffState]; + } + if ( [prefs boolForKey:@"dontShowBlob"] ) { + [dontShowBlobSwitch setState:NSOnState]; + } else { + [dontShowBlobSwitch setState:NSOffState]; + } + if ( [prefs boolForKey:@"limitRows"] ) { + [limitRowsSwitch setState:NSOnState]; + } else { + [limitRowsSwitch setState:NSOffState]; + } + if ( [prefs boolForKey:@"useMonospacedFonts"] ) { + [useMonospacedFontsSwitch setState:NSOnState]; + } else { + [useMonospacedFontsSwitch setState:NSOffState]; + } + if ( [prefs boolForKey:@"fetchRowCount"] ) { + [fetchRowCountSwitch setState:NSOnState]; + } else { + [fetchRowCountSwitch setState:NSOffState]; + } + [nullValueField setStringValue:[prefs stringForKey:@"nullValue"]]; + [limitRowsField setStringValue:[prefs stringForKey:@"limitRowsValue"]]; + [self chooseLimitRows:self]; + [encodingPopUpButton selectItemWithTitle:[prefs stringForKey:@"encoding"]]; + + [preferencesWindow makeKeyAndOrderFront:self]; +} + +- (IBAction)addFavorite:(id)sender +/* +adds a favorite +*/ +{ + int code; + + isNewFavorite = YES; + + [nameField setStringValue:@""]; + [hostField setStringValue:@""]; + [socketField setStringValue:@""]; + [userField setStringValue:@""]; + [passwordField setStringValue:@""]; + [portField setStringValue:@""]; + [databaseField setStringValue:@""]; + [sshCheckbox setState:NSOffState]; + [sshUserField setEnabled:NO]; + [sshPasswordField setEnabled:NO]; + [sshHostField setEnabled:NO]; + [sshPortField setEnabled:NO]; + [sshHostField setStringValue:@""]; + [sshUserField setStringValue:@""]; + [sshPortField setStringValue:@"8888"]; + [sshPasswordField setStringValue:@""]; + + [NSApp beginSheet:favoriteSheet + modalForWindow:preferencesWindow modalDelegate:self + didEndSelector:nil contextInfo:nil]; + code = [NSApp runModalForWindow:favoriteSheet]; + + [NSApp endSheet:favoriteSheet]; + [favoriteSheet orderOut:nil]; + + if ( code == 1 ) { + if ( ![[socketField stringValue] isEqualToString:@""] ) { + //set host to localhost if socket is used + [hostField setStringValue:@"localhost"]; + } + // get ssh settings + NSString *sshHost, *sshUser, *sshPassword, *sshPort; + NSNumber *ssh; + if ( [sshCheckbox state] == NSOnState ) { + if ( [[sshHostField stringValue] isEqualToString:@""] ) { + sshHost = [hostField stringValue]; + } else { + sshHost = [sshHostField stringValue]; + } + if ( [[sshUserField stringValue] isEqualToString:@""] ) { + sshUser = [userField stringValue]; + } else { + sshUser = [sshUserField stringValue]; + } + if ( [[sshPasswordField stringValue] isEqualToString:@""] ) { + sshPassword = [passwordField stringValue]; + } else { + sshPassword = [sshPasswordField stringValue]; + } + if ( [[sshPortField stringValue] isEqualToString:@""] ) { + sshPort = [portField stringValue]; + } else { + sshPort = [sshPortField stringValue]; + } + ssh = [NSNumber numberWithInt:1]; + } else { + sshHost = @""; + sshUser = @""; + sshPassword = @""; + sshPort = @""; + ssh = [NSNumber numberWithInt:0]; + } + NSDictionary *favorite = [NSDictionary + dictionaryWithObjects:[NSArray arrayWithObjects:[nameField stringValue], [hostField stringValue], [socketField stringValue], [userField stringValue], [portField stringValue], [databaseField stringValue], ssh, sshHost, sshUser, sshPort, nil] + forKeys:[NSArray arrayWithObjects:@"name", @"host", @"socket", @"user", @"port", @"database", @"useSSH", @"sshHost", @"sshUser", @"sshPort", nil]]; + [favorites addObject:favorite]; + if ( ![[passwordField stringValue] isEqualToString:@""] ) + [keyChainInstance addPassword:[passwordField stringValue] + forName:[NSString stringWithFormat:@"Sequel Pro : %@", [nameField stringValue]] + account:[NSString stringWithFormat:@"%@@%@/%@", [userField stringValue], [hostField stringValue], + [databaseField stringValue]]]; + if ( ![sshPassword isEqualToString:@""] ) + [keyChainInstance addPassword:sshPassword + forName:[NSString stringWithFormat:@"Sequel Pro SSHTunnel : %@", [nameField stringValue]] + account:[NSString stringWithFormat:@"%@@%@/%@", [userField stringValue], [hostField stringValue], + [databaseField stringValue]]]; + [tableView reloadData]; + [tableView selectRow:[tableView numberOfRows]-1 byExtendingSelection:NO]; + } + + isNewFavorite = NO; +} + +- (IBAction)removeFavorite:(id)sender +/* +removes a favorite +*/ +{ + if ( ![tableView numberOfSelectedRows] ) + return; + + NSString *name = [[favorites objectAtIndex:[tableView selectedRow]] objectForKey:@"name"]; + NSString *user = [[favorites objectAtIndex:[tableView selectedRow]] objectForKey:@"user"]; + NSString *host = [[favorites objectAtIndex:[tableView selectedRow]] objectForKey:@"host"]; + NSString *database = [[favorites objectAtIndex:[tableView selectedRow]] objectForKey:@"database"]; + [keyChainInstance deletePasswordForName:[NSString stringWithFormat:@"Sequel Pro : %@", name] + account:[NSString stringWithFormat:@"%@@%@/%@", user, host, database]]; + [keyChainInstance deletePasswordForName:[NSString stringWithFormat:@"Sequel Pro SSHTunnel : %@", name] + account:[NSString stringWithFormat:@"%@@%@/%@", user, host, database]]; + [favorites removeObjectAtIndex:[tableView selectedRow]]; + [tableView reloadData]; +} + +- (IBAction)copyFavorite:(id)sender +/* +copies a favorite +*/ +{ + if ( ![tableView numberOfSelectedRows] ) + return; + + NSMutableDictionary *tempDictionary = [NSMutableDictionary dictionaryWithDictionary:[favorites objectAtIndex:[tableView selectedRow]]]; + [tempDictionary setObject:[NSString stringWithFormat:@"%@Copy", [tempDictionary objectForKey:@"name"]] forKey:@"name"]; +// [tempDictionary setObject:[NSString stringWithFormat:@"%@Copy", [tempDictionary objectForKey:@"user"]] forKey:@"user"]; + + [favorites insertObject:tempDictionary atIndex:[tableView selectedRow]+1]; + [tableView selectRow:[tableView selectedRow]+1 byExtendingSelection:NO]; + + [tableView reloadData]; +} + +- (IBAction)chooseLimitRows:(id)sender +/* +enables or disables limitRowsField (depending on the state of limitRowsSwitch) +*/ +{ + if ( [limitRowsSwitch state] == NSOnState ) { + [limitRowsField setEnabled:YES]; + [limitRowsField selectText:self]; + } else { + [limitRowsField setEnabled:NO]; + } +} + +- (IBAction)closeFavoriteSheet:(id)sender +/* +close the favoriteSheet and save favorite if user hit save +*/ +{ + NSEnumerator *enumerator = [favorites objectEnumerator]; + id favorite; + int count; + +//test if user has entered at least name and host/socket + if ( [sender tag] && + ([[nameField stringValue] isEqualToString:@""] || + ([[hostField stringValue] isEqualToString:@""] && [[socketField stringValue] isEqualToString:@""])) ) { + NSRunAlertPanel(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"Please enter at least name and host or socket!", @"message of panel when name/host/socket are missing"), NSLocalizedString(@"OK", @"OK button"), nil, nil); + return; + } + +//test if favorite name isn't used by another favorite + count = 0; + if ( [sender tag] ) { + while ( (favorite = [enumerator nextObject]) ) { + if ( [[favorite objectForKey:@"name"] isEqualToString:[nameField stringValue]] ) + { + if ( isNewFavorite || (!isNewFavorite && (count != [tableView selectedRow])) ) { + NSRunAlertPanel(NSLocalizedString(@"Error", @"error"), [NSString stringWithFormat:NSLocalizedString(@"Favorite %@ has already been saved!\nPlease specify another name.", @"message of panel when favorite name has already been used"), [nameField stringValue]], NSLocalizedString(@"OK", @"OK button"), nil, nil); + return; + } + } +/* + if ( [[favorite objectForKey:@"host"] isEqualToString:[hostField stringValue]] && + [[favorite objectForKey:@"user"] isEqualToString:[userField stringValue]] && + [[favorite objectForKey:@"database"] isEqualToString:[databaseField stringValue]] ) { + if ( isNewFavorite || (!isNewFavorite && (count != [tableView selectedRow])) ) { + NSRunAlertPanel(@"Error", @"There is already a favorite with the same host, user and database!", @"OK", nil, nil); + return; + } + } +*/ + count++; + } + } + + [NSApp stopModalWithCode:[sender tag]]; +} + +- (IBAction)toggleUseSSH:(id)sender +/* +enables/disables ssh tunneling +*/ +{ + if ( [sshCheckbox state] == NSOnState ) { + [sshUserField setEnabled:YES]; + [sshPasswordField setEnabled:YES]; + [sshHostField setEnabled:YES]; + [sshPortField setEnabled:YES]; + } else { + [sshUserField setEnabled:NO]; + [sshPasswordField setEnabled:NO]; + [sshHostField setEnabled:NO]; + [sshPortField setEnabled:NO]; + } +} + +//services menu methods +- (void)doPerformQueryService:(NSPasteboard *)pboard userData:(NSString *)data error:(NSString **)error +/* +passes the query to the last created document +*/ +{ + NSString *pboardString; + NSArray *types; + + types = [pboard types]; + + if (![types containsObject:NSStringPboardType] || !(pboardString = [pboard stringForType:NSStringPboardType])) { + *error = @"Pasteboard couldn't give string."; + return; + } + +//check if there exists a document + if ( ![[[NSDocumentController sharedDocumentController] documents] count] ) { + *error = @"No Documents open!"; + return; + } + +//pass query to last created document +// [[[NSDocumentController sharedDocumentController] currentDocument] doPerformQueryService:pboardString]; + [[[[NSDocumentController sharedDocumentController] documents] objectAtIndex:[[[NSDocumentController sharedDocumentController] documents] count]-1] doPerformQueryService:pboardString]; + + return; +} + + +//menu methods +- (IBAction)donate:(id)sender +/* +opens donate link in default browser +*/ +{ + [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://code.google.com/p/sequel-pro/wiki/Donations"]]; +} + +//menu methods +- (IBAction)visitWebsite:(id)sender +/* +opens donate link in default browser +*/ +{ + [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://code.google.com/p/sequel-pro"]]; +} + +- (IBAction)visitHelpWebsite:(id)sender +/* +opens donate link in default browser +*/ +{ + [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://code.google.com/p/sequel-pro/wiki/FAQ"]]; +} + +- (IBAction)checkForUpdates:(id)sender +/* +checks for updates and opens download page in default browser +*/ +{ + NSLog(@"[MainController checkForUpdates:] is not currently functional."); +// CMMCPConnection *tempConnection = [[CMMCPConnection alloc] initToHost:@"com.google.code.sequel-pro" +// withLogin:@"sequel-pro" +// password:@"" +// usingPort:nil]; +// CMMCPResult *tempResult; +// NSString *version; +// int code; +// +// //connect to db +// if ( ![tempConnection isConnected] ) { +// //no connection +// NSRunAlertPanel(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"Error while trying to get the current version number!\nBe sure that you are connected to the internet and try again later.", @"message of panel when check for current version number failed"), NSLocalizedString(@"OK", @"OK button"), nil, nil); +// return; +// } +// if ( ![tempConnection selectDB:@"usr_web8_1"] ) { +// //db not found +// NSRunAlertPanel(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"Error while trying to get the current version number!\nBe sure that you are connected to the internet and try again later.", @"message of panel when check for current version number failed"), NSLocalizedString(@"OK", @"OK button"), nil, nil); +// return; +// } +// //get current version +// tempResult = [tempConnection queryString:@"SELECT * FROM sequel-pro"]; +// if ( ![tempResult numOfRows] ) { +// //error in query +// NSRunAlertPanel(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"Error while trying to get the current version number!\nBe sure that you are connected to the internet and try again later.", @"message of panel when check for current version number failed"), NSLocalizedString(@"OK", @"OK button"), nil, nil); +// return; +// } +// version = [[tempResult fetchRowAsArray] objectAtIndex:0]; +// //check versions +// if ( [version isEqualToString:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]] ) { +// //no new version +// NSRunInformationalAlertPanel(NSLocalizedString(@"No update available", @"title of panel when no update is available"), NSLocalizedString(@"There is no newer version available!", @"message of panel when no update is available"), NSLocalizedString(@"OK", @"OK button"), nil, nil); +// } else { +// //new version available +// code = NSRunInformationalAlertPanel(NSLocalizedString(@"Update available", @"title of panel when update is available"), [NSString stringWithFormat:NSLocalizedString(@"There is a newer version available (version %@)!\nClick OK to open the download site.", @"message of panel when update is available"), version], NSLocalizedString(@"OK", @"OK button"), NSLocalizedString(@"Cancel", @"cancel button"), nil); +// if ( code == NSAlertDefaultReturn ) { +// [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://code.google.com/p/sequel-pro/download.php"]]; +// } +// } +// [tempConnection disconnect]; +// [tempConnection release]; +} + + +//tableView datasource methods +- (int)numberOfRowsInTableView:(NSTableView *)aTableView +{ + return [favorites count]; +} + +- (id)tableView:(NSTableView *)aTableView + objectValueForTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex +{ + return [[favorites objectAtIndex:rowIndex] objectForKey:[aTableColumn identifier]]; +} + + +//tableView drag&drop datasource methods +- (BOOL)tableView:(NSTableView *)tv writeRows:(NSArray*)rows toPasteboard:(NSPasteboard*)pboard +{ + int originalRow; + NSArray *pboardTypes; + + if ( [rows count] == 1 ) { + pboardTypes=[NSArray arrayWithObjects:@"SequelProPreferencesPasteboard", nil]; + originalRow = [[rows objectAtIndex:0] intValue]; + + [pboard declareTypes:pboardTypes owner:nil]; + [pboard setString:[[NSNumber numberWithInt:originalRow] stringValue] forType:@"SequelProPreferencesPasteboard"]; + + return YES; + } else { + return NO; + } +} + +- (NSDragOperation)tableView:(NSTableView*)tv validateDrop:(id )info proposedRow:(int)row + proposedDropOperation:(NSTableViewDropOperation)operation +{ + NSArray *pboardTypes = [[info draggingPasteboard] types]; + int originalRow; + + if ([pboardTypes count] == 1 && row != -1) + { + if ([[pboardTypes objectAtIndex:0] isEqualToString:@"SequelProPreferencesPasteboard"]==YES && operation==NSTableViewDropAbove) + { + originalRow = [[[info draggingPasteboard] stringForType:@"SequelProPreferencesPasteboard"] intValue]; + + if (row != originalRow && row != (originalRow+1)) + { + return NSDragOperationMove; + } + } + } + + return NSDragOperationNone; +} + +- (BOOL)tableView:(NSTableView*)tv acceptDrop:(id )info row:(int)row dropOperation:(NSTableViewDropOperation)operation +{ + int originalRow; + int destinationRow; + NSMutableDictionary *draggedRow; + + originalRow = [[[info draggingPasteboard] stringForType:@"SequelProPreferencesPasteboard"] intValue]; + destinationRow = row; + + if ( destinationRow > originalRow ) + destinationRow--; + + draggedRow = [NSMutableDictionary dictionaryWithDictionary:[favorites objectAtIndex:originalRow]]; + [favorites removeObjectAtIndex:originalRow]; + [favorites insertObject:draggedRow atIndex:destinationRow]; + + [tableView reloadData]; + [tableView selectRow:destinationRow byExtendingSelection:NO]; + + return YES; +} + +- (BOOL)tableView:(NSTableView *)aTableView shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex +/* +opens sheet to edit favorite and saves favorite if user hit OK +*/ +{ + int code; + NSDictionary *favorite = [favorites objectAtIndex:rowIndex]; + +// set up fields + [nameField setStringValue:[favorite objectForKey:@"name"]]; + [hostField setStringValue:[favorite objectForKey:@"host"]]; + [socketField setStringValue:[favorite objectForKey:@"socket"]]; + [userField setStringValue:[favorite objectForKey:@"user"]]; + [portField setStringValue:[favorite objectForKey:@"port"]]; + [databaseField setStringValue:[favorite objectForKey:@"database"]]; + [passwordField setStringValue:[keyChainInstance + getPasswordForName:[NSString stringWithFormat:@"Sequel Pro : %@", [nameField stringValue]] + account:[NSString stringWithFormat:@"%@@%@/%@", [userField stringValue], [hostField stringValue], + [databaseField stringValue]]]]; +// set up ssh fields + if ( [[favorite objectForKey:@"useSSH"] intValue] == 1 ) { + [sshCheckbox setState:NSOnState]; + [sshUserField setEnabled:YES]; + [sshPasswordField setEnabled:YES]; + [sshHostField setEnabled:YES]; + [sshPortField setEnabled:YES]; + [sshHostField setStringValue:[favorite objectForKey:@"sshHost"]]; + [sshUserField setStringValue:[favorite objectForKey:@"sshUser"]]; + [sshPortField setStringValue:[favorite objectForKey:@"sshPort"]]; + [sshPasswordField setStringValue:[keyChainInstance + getPasswordForName:[NSString stringWithFormat:@"Sequel Pro SSHTunnel : %@", [nameField stringValue]] + account:[NSString stringWithFormat:@"%@@%@/%@", [userField stringValue], [hostField stringValue], + [databaseField stringValue]]]]; + } else { + [sshCheckbox setState:NSOffState]; + [sshUserField setEnabled:NO]; + [sshPasswordField setEnabled:NO]; + [sshHostField setEnabled:NO]; + [sshPortField setEnabled:NO]; + [sshHostField setStringValue:@""]; + [sshUserField setStringValue:@""]; + [sshPortField setStringValue:@""]; + [sshPasswordField setStringValue:@""]; + } + + +// run sheet + [NSApp beginSheet:favoriteSheet + modalForWindow:preferencesWindow modalDelegate:self + didEndSelector:nil contextInfo:nil]; + code = [NSApp runModalForWindow:favoriteSheet]; + + [NSApp endSheet:favoriteSheet]; + [favoriteSheet orderOut:nil]; + + if ( code == 1 ) { + if ( ![[socketField stringValue] isEqualToString:@""] ) { + //set host to localhost if socket is used + [hostField setStringValue:@"localhost"]; + } +//get ssh settings + NSString *sshHost, *sshUser, *sshPassword, *sshPort; + NSNumber *ssh; + if ( [sshCheckbox state] == NSOnState ) { + if ( [[sshHostField stringValue] isEqualToString:@""] ) { + sshHost = [hostField stringValue]; + } else { + sshHost = [sshHostField stringValue]; + } + if ( [[sshUserField stringValue] isEqualToString:@""] ) { + sshUser = [userField stringValue]; + } else { + sshUser = [sshUserField stringValue]; + } + if ( [[sshPasswordField stringValue] isEqualToString:@""] ) { + sshPassword = [passwordField stringValue]; + } else { + sshPassword = [sshPasswordField stringValue]; + } + if ( [[sshPortField stringValue] isEqualToString:@""] ) { + sshPort = [portField stringValue]; + } else { + sshPort = [sshPortField stringValue]; + } + ssh = [NSNumber numberWithInt:1]; + } else { + sshHost = @""; + sshUser = @""; + sshPassword = @""; + sshPort = @""; + ssh = [NSNumber numberWithInt:0]; + } +//replace password + [keyChainInstance deletePasswordForName:[NSString stringWithFormat:@"Sequel Pro : %@", [favorite objectForKey:@"name"]] + account:[NSString stringWithFormat:@"%@@%@/%@", [favorite objectForKey:@"user"], + [favorite objectForKey:@"host"], [favorite objectForKey:@"database"]]]; + if ( ![[passwordField stringValue] isEqualToString:@""] ) + [keyChainInstance addPassword:[passwordField stringValue] + forName:[NSString stringWithFormat:@"Sequel Pro : %@", [nameField stringValue]] + account:[NSString stringWithFormat:@"%@@%@/%@", [userField stringValue], [hostField stringValue], + [databaseField stringValue]]]; +//replace ssh password + [keyChainInstance deletePasswordForName:[NSString stringWithFormat:@"Sequel Pro SSHTunnel : %@", [favorite objectForKey:@"name"]] + account:[NSString stringWithFormat:@"%@@%@/%@", [favorite objectForKey:@"user"], + [favorite objectForKey:@"host"], [favorite objectForKey:@"database"]]]; + if ( ([sshCheckbox state] == NSOnState) && ![sshPassword isEqualToString:@""] ) { + [keyChainInstance addPassword:sshPassword + forName:[NSString stringWithFormat:@"Sequel Pro SSHTunnel : %@", [nameField stringValue]] + account:[NSString stringWithFormat:@"%@@%@/%@", [userField stringValue], [hostField stringValue], + [databaseField stringValue]]]; + } +//replace favorite + favorite = [NSDictionary + dictionaryWithObjects:[NSArray arrayWithObjects:[nameField stringValue], [hostField stringValue], [socketField stringValue], [userField stringValue], [portField stringValue], [databaseField stringValue], ssh, sshHost, sshUser, sshPort, nil] + forKeys:[NSArray arrayWithObjects:@"name", @"host", @"socket", @"user", @"port", @"database", @"useSSH", @"sshHost", @"sshUser", @"sshPort", nil]]; + [favorites replaceObjectAtIndex:rowIndex withObject:favorite]; + [tableView reloadData]; + } + + return NO; +} + + +//window delegate methods +- (BOOL)windowShouldClose:(id)sender +/* +saves the preferences +*/ +{ + if ( sender == preferencesWindow ) { + if ( [reloadAfterAddingSwitch state] == NSOnState ) { + [prefs setBool:YES forKey:@"reloadAfterAdding"]; + } else { + [prefs setBool:NO forKey:@"reloadAfterAdding"]; + } + if ( [reloadAfterEditingSwitch state] == NSOnState ) { + [prefs setBool:YES forKey:@"reloadAfterEditing"]; + } else { + [prefs setBool:NO forKey:@"reloadAfterEditing"]; + } + if ( [reloadAfterRemovingSwitch state] == NSOnState ) { + [prefs setBool:YES forKey:@"reloadAfterRemoving"]; + } else { + [prefs setBool:NO forKey:@"reloadAfterRemoving"]; + } + if ( [showErrorSwitch state] == NSOnState ) { + [prefs setBool:YES forKey:@"showError"]; + } else { + [prefs setBool:NO forKey:@"showError"]; + } + if ( [dontShowBlobSwitch state] == NSOnState ) { + [prefs setBool:YES forKey:@"dontShowBlob"]; + } else { + [prefs setBool:NO forKey:@"dontShowBlob"]; + } + if ( [limitRowsSwitch state] == NSOnState ) { + [prefs setBool:YES forKey:@"limitRows"]; + } else { + [prefs setBool:NO forKey:@"limitRows"]; + } + if ( [useMonospacedFontsSwitch state] == NSOnState ) { + [prefs setBool:YES forKey:@"useMonospacedFonts"]; + } else { + [prefs setBool:NO forKey:@"useMonospacedFonts"]; + } + if ( [fetchRowCountSwitch state] == NSOnState ) { + [prefs setBool:YES forKey:@"fetchRowCount"]; + } else { + [prefs setBool:NO forKey:@"fetchRowCount"]; + } + [prefs setObject:[nullValueField stringValue] forKey:@"nullValue"]; + if ( [limitRowsField intValue] > 0 ) { + [prefs setInteger:[limitRowsField intValue] forKey:@"limitRowsValue"]; + } else { + [prefs setInteger:1 forKey:@"limitRowsValue"]; + } + [prefs setObject:[encodingPopUpButton titleOfSelectedItem] forKey:@"encoding"]; + + [prefs setObject:favorites forKey:@"favorites"]; + } + return YES; +} + + +//other methods +- (void)awakeFromNib +/* +code that need to be executed when the nib file is loaded +*/ +{ + NSEnumerator *enumerator; + id favorite; + NSString *name, *host, *user, *database, *password; +// int code; + +//register MainController as services provider + [NSApp setServicesProvider:self]; + +//register MainController for AppleScript events + [[ NSScriptExecutionContext sharedScriptExecutionContext] setTopLevelObject: self ]; + + [GrowlApplicationBridge setGrowlDelegate:self]; + + prefs = [[NSUserDefaults standardUserDefaults] retain]; + isNewFavorite = NO; + [prefs registerDefaults:[NSDictionary dictionaryWithObjectsAndKeys: + [NSNumber numberWithBool:YES], @"limitRows", + [NSNumber numberWithInt:1000], @"limitRowsValue", + nil]]; + +//set standard preferences if no preferences are found + if ( [prefs objectForKey:@"reloadAfterAdding"] == nil ) + { + [prefs setObject:@"0.3" forKey:@"version"]; + [prefs setBool:YES forKey:@"reloadAfterAdding"]; + [prefs setBool:YES forKey:@"reloadAfterEditing"]; + [prefs setBool:NO forKey:@"reloadAfterRemoving"]; + [prefs setObject:@"NULL" forKey:@"nullValue"]; +// [prefs setBool:YES forKey:@"showError"]; +// [prefs setBool:NO forKey:@"dontShowBlob"]; +// [prefs setBool:NO forKey:@"limitRows"]; +// [prefs setInteger:100 forKey:@"limitRowsValue"]; +// [prefs setObject:[NSString stringWithString:NSHomeDirectory()] forKey:@"savePath"]; +// [prefs setObject:[NSString stringWithString:NSHomeDirectory()] forKey:@"openPath"]; + } + +//new preferences and changes in v0.4 + if ( [prefs objectForKey:@"showError"] == nil ) + { + [prefs setObject:@"0.4" forKey:@"version"]; + //set standard values for new preferences + [prefs setBool:YES forKey:@"showError"]; + [prefs setBool:NO forKey:@"dontShowBlob"]; +// [prefs setBool:NO forKey:@"limitRows"]; +// [prefs setInteger:100 forKey:@"limitRowsValue"]; + [prefs setObject:[NSString stringWithString:NSHomeDirectory()] forKey:@"savePath"]; + [prefs setObject:[NSString stringWithString:NSHomeDirectory()] forKey:@"openPath"]; + //remove old preferences + [prefs removeObjectForKey:@"allowDragAndDropReordering"]; + //rewrite passwords to keychain (with new format) + if ( [prefs objectForKey:@"favorites"] ) { + NSRunAlertPanel(NSLocalizedString(@"Warning", @"warning"), NSLocalizedString(@"With version 0.4 Sequel Pro has introduced a new format to save passwords in the Keychain.\nPlease allow Sequel Pro to decrypt all passwords of your favorites. Otherwise you have to reenter all passwords of your saved favorites in the Preferences.", @"message of panel when passwords have to be updated for v0.4"), NSLocalizedString(@"OK", @"OK button"), nil, nil); + enumerator = [[prefs objectForKey:@"favorites"] objectEnumerator]; + while ( (favorite = [enumerator nextObject]) ) { + //replace password + name = [favorite objectForKey:@"name"]; + host = [favorite objectForKey:@"host"]; + user = [favorite objectForKey:@"user"]; + database = [favorite objectForKey:@"database"]; + password = [keyChainInstance getPasswordForName:[NSString stringWithFormat:@"%@/%@", host, database] + account:user]; + [keyChainInstance deletePasswordForName:[NSString stringWithFormat:@"%@/%@", host, database] account:user]; + if ( ![password isEqualToString:@""] ) + [keyChainInstance addPassword:password + forName:[NSString stringWithFormat:@"Sequel Pro : %@", name] + account:[NSString stringWithFormat:@"%@@%@/%@", user, host, database]]; + } + } + } +//new preferences and changes in v0.5 + if ( [[prefs objectForKey:@"version"] isEqualToString:@"0.4"] ) + { + [prefs setObject:@"0.5" forKey:@"version"]; + //set standard values for new preferences + [prefs setObject:@"ISO Latin 1" forKey:@"encoding"]; + [prefs setBool:NO forKey:@"useMonospacedFonts"]; + //add socket field to favorites + if ( [prefs objectForKey:@"favorites"] ) { + NSMutableArray *tempFavorites = [NSMutableArray array]; + NSMutableDictionary *tempFavorite; + enumerator = [[prefs objectForKey:@"favorites"] objectEnumerator]; + while ( (favorite = [enumerator nextObject]) ) { + tempFavorite = [NSMutableDictionary dictionaryWithDictionary:favorite]; + [tempFavorite setObject:@"" forKey:@"socket"]; + [tempFavorites addObject:[NSDictionary dictionaryWithDictionary:tempFavorite]]; + } + [prefs setObject:tempFavorites forKey:@"favorites"]; + } + } +//new preferences and changes in v0.7 + if ( [[prefs objectForKey:@"version"] isEqualToString:@"0.5"] || + [[prefs objectForKey:@"version"] isEqualToString:@"0.6beta"] || + [[prefs objectForKey:@"version"] isEqualToString:@"0.7b2"] ) + { + [prefs setObject:@"0.7b3" forKey:@"version"]; + [prefs setObject:@"Autodetect" forKey:@"encoding"]; + [prefs setBool:YES forKey:@"fetchRowCount"]; + } + +//set up interface +/* + enumerator = [tableColumns objectEnumerator]; + while ( (column = [enumerator nextObject]) ) + { + [[column dataCell] setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; + } +*/ + [tableView registerForDraggedTypes:[NSArray arrayWithObjects:@"SequelProPreferencesPasteboard", nil]]; + [tableView reloadData]; +} + + +// SSHTunnel methods +- (id)authenticate:(NSScriptCommand *)command { + NSDictionary *args = [command evaluatedArguments]; + NSString *givenQuery = [ args objectForKey:@"query"]; + NSString *tunnelName = [ args objectForKey:@"tunnelName"]; + NSString *fifo = [ args objectForKey:@"fifo"]; +NSLog(@"tunnel: %@ / query: %@ / fifo: %@",tunnelName,givenQuery,fifo); + NSFileHandle *fh = [ NSFileHandle fileHandleForWritingAtPath: fifo ]; + [ fh writeData: [ @"xy" dataUsingEncoding: NSASCIIStringEncoding]]; + [ fh closeFile ]; +NSLog(@"password written"); + return @"OK"; + +/* + [ query setStringValue: givenQuery ]; + [NSApp beginSheet: alertSheet + modalForWindow: mainWindow + modalDelegate: nil + didEndSelector: nil + contextInfo: nil]; + [NSApp runModalForWindow: alertSheet]; + // Sheet is up here. + [NSApp endSheet: alertSheet]; + [alertSheet orderOut: self]; + if ( sheetStatus == 0) + { + password = [ passwd stringValue ]; + [ passwd setStringValue: @"" ]; + return password ; + } + else + { + [[tunnelTask objectForKey: @"task" ] terminate ]; + } + sheetStatus = nil; + return @""; +*/ +} + +- (id)handleQuitScriptCommand:(NSScriptCommand *)command +/* what exactly is this for? */ +{ + [ NSApp terminate: self ]; +} + +@end diff --git a/trunk/SPTableInfo.h b/trunk/SPTableInfo.h new file mode 100644 index 00000000..49e62d28 --- /dev/null +++ b/trunk/SPTableInfo.h @@ -0,0 +1,24 @@ +// +// SPTableInfo.h +// sequel-pro +// +// Created by Ben Perry on 6/05/08. +// Copyright 2008 Ben Perry. All rights reserved. +// + +#import + + +@interface SPTableInfo : NSObject { + IBOutlet id infoTable; + + IBOutlet id tableListInstance; + IBOutlet id tableDocumentInstance; + + NSMutableArray *info; +} + +- (NSString *)sizeFromBytes:(int)bytes; + + +@end diff --git a/trunk/SPTableInfo.m b/trunk/SPTableInfo.m new file mode 100644 index 00000000..0885e96f --- /dev/null +++ b/trunk/SPTableInfo.m @@ -0,0 +1,184 @@ +// +// SPTableInfo.m +// sequel-pro +// +// Created by Ben Perry on 6/05/08. +// Copyright 2008 Ben Perry. All rights reserved. +// + +#import "SPTableInfo.h" +#import "ImageAndTextCell.h" +#import +#import "CMMCPConnection.h" +#import "CMMCPResult.h" +#import "TableDocument.h" + +@implementation SPTableInfo + +- (id)init +{ + self = [super init]; + info = [[NSMutableArray alloc] init]; + return self; +} + +- (void)awakeFromNib +{ +// [[NSNotificationCenter defaultCenter] addObserver:self +// selector:@selector(tableChanged:) +// name:NSTableViewSelectionDidChangeNotification +// object:nil]; + [info addObject:NSLocalizedString(@"TABLE INFORMATION",@"header for table info pane")]; + [infoTable reloadData]; +} + + +- (void)dealloc +{ + //[[NSNotificationCenter defaultCenter] removeObserver:self]; + + [tableListInstance release]; + + [info release]; + [infoTable release]; + [tableDocumentInstance release]; + + [super dealloc]; +} + +- (int)numberOfRowsInTableView:(NSTableView *)aTableView +{ + return [info count]; +} + +- (id)tableView:(NSTableView *)aTableView +objectValueForTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex +{ + return [info objectAtIndex:rowIndex]; +} + +- (BOOL)tableView:(NSTableView *)aTableView shouldSelectRow:(int)rowIndex +{ + // row 1 and 6 should be editable - ie be able to rename the table and change the auto_increment value. + return NO;//(rowIndex == 1 || rowIndex == 6 ); +} + + +- (BOOL)tableView:(NSTableView *)aTableView isGroupRow:(int)row +{ + // This makes the top row (TABLE INFORMATION) have the diff styling + return (row == 0); +} + +- (void)tableView:(NSTableView *)aTableView + willDisplayCell:(id)aCell + forTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex +{ + if ((rowIndex > 0) && [[aTableColumn identifier] isEqualToString:@"info"]) { + [(ImageAndTextCell*)aCell setImage:[NSImage imageNamed:@"CodeAssistantProtocol"]]; + [(ImageAndTextCell*)aCell setIndentationLevel:1]; + } else { + [(ImageAndTextCell*)aCell setImage:nil]; + [(ImageAndTextCell*)aCell setIndentationLevel:0]; + } +} + +- (void)tableChanged:(NSNotification *)notification +{ + NSString *query; + CMMCPResult *theResult; + NSDictionary *theRow; + + [info removeAllObjects]; + [info addObject:@"TABLE INFORMATION"]; + + if ([tableListInstance table]) + { + if ([(NSString *)[tableListInstance table] isEqualToString:@""]) { + [info addObject:@"multiple tables"]; + + } else { + // Notify that we are about to perform a query + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self]; + + // Create the query and get results + query = [NSString stringWithFormat:@"SHOW TABLE STATUS LIKE '%@'", [tableListInstance table]]; + + // This line triggers a bug when opening a new window. but only after having closed a window + theResult = [[tableDocumentInstance sharedConnection] queryString:query]; + + // Check for errors + if (![[[tableDocumentInstance sharedConnection] getLastErrorMessage] isEqualToString:@""]) { + [info addObject:@"error occurred"]; + return; + } + + // Process result + theRow = [[theResult fetch2DResultAsType:MCPTypeDictionary] lastObject]; + + // Add the table name to the infoTable + [info addObject:[NSString stringWithFormat:@"name: %@", [tableListInstance table]]]; + + // Check for "Create_time" == NULL + if (![[theRow objectForKey:@"Create_time"] isNSNull]) { + // Setup our data formatter + NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] autorelease]; + [dateFormatter setDateStyle:NSDateFormatterShortStyle]; + [dateFormatter setTimeStyle:NSDateFormatterNoStyle]; + + // Convert our string dates from the results to NSDates. + NSDate *create_date = [NSDate dateWithNaturalLanguageString:[theRow objectForKey:@"Create_time"]]; + NSDate *update_date = [NSDate dateWithNaturalLanguageString:[theRow objectForKey:@"Update_time"]]; + + // Add the create date and update date to the infoTable + [info addObject:[NSString stringWithFormat:@"created: %@", [dateFormatter stringFromDate:create_date]]]; + [info addObject:[NSString stringWithFormat:@"updated: %@", [dateFormatter stringFromDate:update_date]]]; + } + + [info addObject:[NSString stringWithFormat:@"rows: %@", [theRow objectForKey:@"Rows"]]]; + [info addObject:[NSString stringWithFormat:@"size: %@", [self sizeFromBytes:[[theRow objectForKey:@"Data_length"] intValue]]]]; + [info addObject:[NSString stringWithFormat:@"auto_increment: %@", [theRow objectForKey:@"Auto_increment"]]]; + + // Notify that we've finished performing the query + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self]; + } + } + + [infoTable reloadData]; +} + +- (NSString *)sizeFromBytes:(int)theSize +{ + NSNumberFormatter *numberFormatter = [[[NSNumberFormatter alloc] init] autorelease]; + float floatSize = theSize; + + [numberFormatter setNumberStyle:NSNumberFormatterDecimalStyle]; + + if (theSize < 1023) { + [numberFormatter setFormat:@"#,##0 B"]; + return [numberFormatter stringFromNumber:[NSNumber numberWithInt:theSize]]; + } + + floatSize = floatSize / 1024; + + if (floatSize < 1023) { + [numberFormatter setFormat:@"#,##0.0 KB"]; + return [numberFormatter stringFromNumber:[NSNumber numberWithFloat:floatSize]]; + } + + floatSize = floatSize / 1024; + + if (floatSize < 1023) { + [numberFormatter setFormat:@"#,##0.0 MB"]; + return [numberFormatter stringFromNumber:[NSNumber numberWithFloat:floatSize]]; + } + + floatSize = floatSize / 1024; + + [numberFormatter setFormat:@"#,##0.0 GB"]; + return [numberFormatter stringFromNumber:[NSNumber numberWithFloat:floatSize]]; +} + +@end diff --git a/trunk/SSHTunnel.h b/trunk/SSHTunnel.h new file mode 100644 index 00000000..b945f205 --- /dev/null +++ b/trunk/SSHTunnel.h @@ -0,0 +1,57 @@ +#import + +@interface SSHTunnel : NSObject +{ + int code; + NSArray *tunnelsLocal; + NSArray *tunnelsRemote; + + BOOL shouldStop; + NSTask *task; + BOOL connAuth; + BOOL autoConnect; + NSPipe *stdErrPipe; + NSString *connName; + NSString *status; + NSString *connPort; + BOOL connRemote; + BOOL compression; + BOOL v1; + NSString * encryption; + BOOL socks4; + NSNumber *socks4p; + NSString *connUser; + NSString *connHost; +} +-(id)initWithName:(NSString*)aName; +-(id)initWithDictionary:(NSDictionary*)aDictionary; ++(id)tunnelWithName:(NSString*)aName; ++(NSArray*)tunnelsFromArray:(NSArray*)anArray; + +-(void)addLocalTunnel:(NSDictionary*)aDictionary; +- (void)removeLocal:(int)index; +-(void)addRemoteTunnel:(NSDictionary*)aDictionary; +- (void)removeRemote:(int)index; +- (void)setLocalValue:(NSString*)aValue ofTunnel:(int)index forKey:(NSString*)key; +- (void)setRemoteValue:(NSString*)aValue ofTunnel:(int)index forKey:(NSString*)key; + +#pragma mark - +#pragma mark Execution related +- (void)startTunnel; +- (void)stopTunnel; +- (void)toggleTunnel; +- (void)launchTunnel:(id)foo; +- (void)stdErr:(NSNotification*)aNotification; +- (BOOL)isRunning; + +#pragma mark - +#pragma mark Getting tunnel informations +- (NSString*)status; +- (NSArray*)arguments; +- (NSDictionary*)dictionary; + +#pragma mark - +#pragma mark Key/Value coding +- (NSImage*)icon; + +@end diff --git a/trunk/SSHTunnel.m b/trunk/SSHTunnel.m new file mode 100755 index 00000000..a2d8e1f7 --- /dev/null +++ b/trunk/SSHTunnel.m @@ -0,0 +1,531 @@ +// +// SSHTunnel.m +// SSH Tunnel Manager 2 +// +// Created by Yann Bizeul on Wed Nov 19 2003. +// Copyright (c) 2003 __MyCompanyName__. All rights reserved. +// + +#import "SSHTunnel.h" +#include + +// start diff lorenz textor +/* +#define T_START NSLocalizedString(@"T_START",@"") +#define T_STOP NSLocalizedString(@"T_STOP",@"") +#define S_IDLE NSLocalizedString(@"S_IDLE",@"") +#define S_CONNECTING NSLocalizedString(@"S_CONNECTING",@"") +#define S_CONNECTED NSLocalizedString(@"S_CONNECTED",@"") +#define S_AUTH NSLocalizedString(@"S_AUTH",@"") +#define S_PORT NSLocalizedString(@"S_PORT",@"") +*/ +#define T_START @"START: %@" +#define T_STOP @"STOP: %@" +#define S_IDLE @"Idle" +#define S_CONNECTING @"Connecting..." +#define S_CONNECTED @"Connected" +#define S_AUTH @"Authenticated" +#define S_PORT "Port %@ forwarded" +// end diff lorenz textor + +@implementation SSHTunnel + +#pragma mark - +#pragma mark Initialization +-(id)init +{ + return [ self initWithName:@"New Tunnel"]; +} +-(id)initWithName:(NSString*)aName +{ + NSDictionary *dictionary = [ NSDictionary dictionaryWithObjectsAndKeys: + [ NSNumber numberWithBool: NO ],@"compression", + [ NSNumber numberWithBool: YES ],@"connAuth", + @"", @"connHost", + aName, @"connName", + @"", @"connPort", + [ NSNumber numberWithBool: NO ],@"connRemote", + @"", @"connUser", + @"3des", @"encryption", + [ NSNumber numberWithBool: NO ],@"socks4", + [ NSNumber numberWithInt: 1080 ], @"socks4p", + [ NSArray array ], @"tunnelsLocal", + [ NSArray array ], @"tunnelsRemote", + [ NSNumber numberWithBool: NO ],@"v1", nil + ]; + return [ self initWithDictionary: dictionary ]; +} +-(id)initWithDictionary:(NSDictionary*)aDictionary +{ + NSEnumerator *e; + NSString *key; + + self = [ super init ]; + e = [[ aDictionary allKeys ] objectEnumerator ]; + while (key = [ e nextObject ]) + { + [ self setValue: [ aDictionary objectForKey: key ] forKey: key ]; + } + code = 0; + if ([[ self valueForKey: @"autoConnect" ] boolValue ]) + [ self startTunnel ]; + return self; +} ++(id)tunnelWithName:(NSString*)aName +{ + return [[ SSHTunnel alloc ] initWithName: aName ]; +} ++(SSHTunnel*)tunnelFromDictionary:(NSDictionary*)aDictionary +{ + return [[ SSHTunnel alloc ] initWithDictionary: aDictionary ]; +} ++(NSArray*)tunnelsFromArray:(NSArray*)anArray +{ + NSMutableArray *newArray; + SSHTunnel *currentTunnel; + NSEnumerator *e; + NSDictionary *currentTunnelDictionary; + + newArray = [ NSMutableArray array ]; + e = [ anArray objectEnumerator ]; + while (currentTunnelDictionary = [ e nextObject ]) + { + currentTunnel = [ SSHTunnel tunnelFromDictionary: currentTunnelDictionary ]; + [ newArray addObject: currentTunnel ]; + } + return [[ newArray copy ] autorelease ]; +} + +#pragma mark - +#pragma mark Adding and removing port redir. +-(void)addLocalTunnel:(NSDictionary*)aDictionary; +{ + NSMutableArray *tempTunnelsLocal = [ NSMutableArray arrayWithArray: tunnelsLocal ]; + [ tempTunnelsLocal addObject: aDictionary ]; + [ tunnelsLocal release ]; + tunnelsLocal = [ tempTunnelsLocal copy ]; +} +- (void)removeLocal:(int)index +{ + NSMutableArray *tempLocalTunnels = [ tunnelsLocal mutableCopy ]; + [ tempLocalTunnels removeObjectAtIndex: index ]; + [ tunnelsLocal release ]; + tunnelsLocal = [ tempLocalTunnels copy ]; + [ tempLocalTunnels release ]; +} +-(void)addRemoteTunnel:(NSDictionary*)aDictionary; +{ + NSMutableArray *tempTunnelsRemote = [ NSMutableArray arrayWithArray: tunnelsRemote ]; + [ tempTunnelsRemote addObject: aDictionary ]; + [ tunnelsRemote release ]; + tunnelsRemote = [ tempTunnelsRemote copy ]; +} +- (void)removeRemote:(int)index +{ + NSMutableArray *tempRemoteTunnels = [ tunnelsRemote mutableCopy ]; + [ tempRemoteTunnels removeObjectAtIndex: index ]; + [ tunnelsRemote release ]; + tunnelsRemote = [ tempRemoteTunnels copy ]; + [ tempRemoteTunnels release ]; +} +- (void)setLocalValue:(NSString*)aValue ofTunnel:(int)index forKey:(NSString*)key +{ + NSMutableArray *tempLocalTunnel; + NSMutableDictionary *tempCurrentTunnel; + + tempLocalTunnel = [tunnelsLocal mutableCopy]; + tempCurrentTunnel = [[ tempLocalTunnel objectAtIndex: index ] mutableCopy ]; + + [ tempCurrentTunnel setObject: aValue forKey: key ]; + [ tempLocalTunnel replaceObjectAtIndex:index withObject:[tempCurrentTunnel copy ]]; + [ tempCurrentTunnel release ]; + [ tunnelsLocal release ]; + tunnelsLocal = [ tempLocalTunnel copy ]; +} +- (void)setRemoteValue:(NSString*)aValue ofTunnel:(int)index forKey:(NSString*)key +{ + NSMutableArray *tempRemoteTunnel; + NSMutableDictionary *tempCurrentTunnel; + + tempRemoteTunnel = [tunnelsRemote mutableCopy]; + tempCurrentTunnel = [[ tempRemoteTunnel objectAtIndex: index ] mutableCopy ]; + + [ tempCurrentTunnel setObject: aValue forKey: key ]; + [ tempRemoteTunnel replaceObjectAtIndex:index withObject:[tempCurrentTunnel copy ]]; + [ tempCurrentTunnel release ]; + [ tunnelsRemote release ]; + tunnelsRemote = [ tempRemoteTunnel copy ]; +} + +#pragma mark - +#pragma mark Execution related +- (void)startTunnel +{ +// NSDictionary *t; +// NSEnumerator *e; +// BOOL asRoot = NO; + + if ([ self isRunning ]) + return; + + shouldStop = NO; + /* + [ arguments addObject: @"-N" ]; + [ arguments addObject: @"-v" ]; + [ arguments addObject: @"-p" ]; + if ([ connPort length ]) + [ arguments addObject: connPort]; + else + [ arguments addObject: @"22" ]; + + if (connRemote) + [ arguments addObject: @"-g" ]; + if (compression) + [ arguments addObject: @"-C" ]; + if (v1) + [ arguments addObject: @"-1" ]; + + [ arguments addObject: @"-c"]; + if (encryption) + [ arguments addObject: encryption]; + else + [ arguments addObject: @"3des"]; + + if (socks4 && socks4p != nil) + { + [ arguments addObject: @"-D" ]; + [ arguments addObject: [ socks4p stringValue ]]; + } + [ arguments addObject: [ NSString stringWithFormat: @"%@@%@", + connUser, connHost ] + ]; + + NSString *hostPort; + e = [ tunnelsLocal objectEnumerator ]; + while (t = [ e nextObject ]) + { + [ arguments addObject: @"-L" ]; + if ([[ t objectForKey:@"hostport"] isEqualTo: @"" ]) + hostPort = [ t objectForKey:@"port" ]; + else + hostPort = [ t objectForKey:@"hostport" ]; + [ arguments addObject: [NSString stringWithFormat:@"%@/%@/%@", + [ t objectForKey:@"port"], + [ t objectForKey:@"host"], + hostPort + ] ]; + if ([[ t objectForKey:@"port"] intValue] < 1024) + asRoot=YES; + } + + e = [ tunnelsRemote objectEnumerator ]; + while (t = [ e nextObject ]) + { + [ arguments addObject: @"-R" ]; + if ([[ t objectForKey:@"hostport"] isEqualTo: @"" ]) + hostPort = [ t objectForKey:@"port" ]; + else + hostPort = [ t objectForKey:@"hostport" ]; + [ arguments addObject: [NSString stringWithFormat:@"%@/%@/%@", + [ t objectForKey:@"port"], + [ t objectForKey:@"host"], + hostPort + ]]; + } + args = [ NSMutableDictionary dictionary ]; + [ args setObject: arguments forKey:@"arguments" ]; + [ args setObject: [ NSNumber numberWithBool: connAuth ] forKey: @"handleAuth" ]; + [ args setObject: connName forKey:@"tunnelName" ]; + [ args setObject: [ NSNumber numberWithBool: asRoot ] forKey: @"asRoot" ]; + + + [ NSThread detachNewThreadSelector:@selector(launchTunnel:) + toTarget: self + withObject: args ]; + */ + [ NSThread detachNewThreadSelector:@selector(launchTunnel:) + toTarget: self + withObject: nil ]; +// [ arguments release ]; + +} +- (void)stopTunnel +{ + if (! [ self isRunning ]) + return; + shouldStop=YES; + [ self setValue: nil forKey: @"status" ]; + [ task terminate ]; + code = 0; + [[ NSNotificationCenter defaultCenter] postNotificationName:@"STMStatusChanged" object:self ]; +} + +- (void)toggleTunnel +{ + if ([ self isRunning ]) + [ self stopTunnel ]; + else + [ self startTunnel ]; +} + +- (void)launchTunnel:(id)foo; +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + if (task) + [ task release ]; + task = [[ NSTask alloc ] init ]; + NSMutableDictionary *environment = [ NSMutableDictionary dictionaryWithDictionary: [[ NSProcessInfo processInfo ] environment ]]; + NSString *pathToAuthentifier = [[ NSBundle mainBundle ] pathForResource: @"askForPass" ofType: @"sh" ]; + if (socks4) + [ task setLaunchPath: [[ NSBundle mainBundle ] pathForResource: @"ssh" ofType: @"" ]]; + else + [ task setLaunchPath: @"/usr/bin/ssh" ]; + [ task setArguments: [ self arguments ]]; + if (connAuth) + { + [ environment removeObjectForKey: @"SSH_AGENT_PID" ]; + [ environment removeObjectForKey: @"SSH_AUTH_SOCK" ]; + [ environment setObject: pathToAuthentifier forKey: @"SSH_ASKPASS" ]; + [ environment setObject:@":0" forKey:@"DISPLAY" ]; + } + [ environment setObject: connName forKey: @"TUNNEL_NAME" ]; + [ task setEnvironment: environment ]; + + stdErrPipe = [[ NSPipe alloc ] init ]; + [ task setStandardError: stdErrPipe ]; + + [[ NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(stdErr:) + name: @"NSFileHandleDataAvailableNotification" + object:[ stdErrPipe fileHandleForReading]]; + + [[ stdErrPipe fileHandleForReading] waitForDataInBackgroundAndNotify ]; + + NSLog(T_START,connName); + [ self setValue: S_CONNECTING forKey: @"status" ]; + code = 1; + [ task launch ]; + [[ NSNotificationCenter defaultCenter] postNotificationName:@"STMStatusChanged" object:self ]; + [ task waitUntilExit ]; + sleep(1); + code = 0; + [ self setValue: S_IDLE forKey: @"status" ]; + NSLog(T_STOP,connName); + [[ NSNotificationCenter defaultCenter] removeObserver:self + name: @"NSFileHandleDataAvailableNotification" + object:[ stdErrPipe fileHandleForReading]]; + [ task release ]; + task = nil; + [ stdErrPipe release ]; + stdErrPipe = nil; + [[ NSNotificationCenter defaultCenter] postNotificationName:@"STMStatusChanged" object:self ]; + if (! shouldStop) + [ self startTunnel ]; + [ pool release ]; +} + +- (void)stdErr:(NSNotification*)aNotification +{ + NSData *data = [[ aNotification object ] availableData ]; + NSString *log = [[ NSString alloc ] initWithData: data encoding: NSASCIIStringEncoding ]; + BOOL wait = YES; + if ([ log length ]) + { + //NSLog(log); + NSArray *lines = [ log componentsSeparatedByString:@"\n" ]; + NSEnumerator *e = [ lines objectEnumerator ]; + NSString *line; + while (line = [ e nextObject ]) + { + if ([ line rangeOfString:@"Entering interactive session." ].location != NSNotFound) + { + code = 2; + [ self setValue: S_CONNECTED forKey: @"status"]; + } + if ([ line rangeOfString:@"Authentication succeeded" ].location != NSNotFound) + [ self setValue: S_AUTH forKey: @"status"]; + if ([ line rangeOfString:@"Connections to local port" ].location != NSNotFound) + { + NSScanner *s; + NSString *port; + s = [ NSScanner scannerWithString:log]; + [ s scanUpToString: @"Connections to local port " intoString: nil ]; + [ s scanString: @"Connections to local port " intoString: nil ]; + [ s scanUpToString: @"forwarded" intoString:&port]; + [ self setValue: [ NSString stringWithFormat: @"Port %@ forwarded", port ] forKey: @"status"]; + } + if ([ line rangeOfString:@"closed by remote host." ].location != NSNotFound) + { + [ task terminate]; + [ self setValue: @"Connection closed" forKey: @"status"]; + wait = NO; + } + [[ NSNotificationCenter defaultCenter] postNotificationName:@"STMStatusChanged" object:self ]; + } + if (wait) + [[ stdErrPipe fileHandleForReading ] waitForDataInBackgroundAndNotify ]; + } + [ log release] ; +} + +- (BOOL)isRunning +{ + if ([ task isRunning ]) + return YES; + return NO; +} + +#pragma mark - +#pragma mark Getting tunnel informations +- (NSString *)status +{ + if (status) + return status; + return S_IDLE; +} +- (NSArray*)arguments +{ + NSMutableArray *arguments; + NSEnumerator *e; + NSDictionary *t; + BOOL asRoot; + + arguments = [ NSMutableArray array ]; + [ arguments addObject: @"-N" ]; + [ arguments addObject: @"-v" ]; + [ arguments addObject: @"-p" ]; + if ([ connPort length ]) + [ arguments addObject: connPort]; + else + [ arguments addObject: @"22" ]; + + if (connRemote) + [ arguments addObject: @"-g" ]; + if (compression) + [ arguments addObject: @"-C" ]; + if (v1) + [ arguments addObject: @"-1" ]; + + [ arguments addObject: @"-c"]; + if (encryption) + [ arguments addObject: encryption]; + else + [ arguments addObject: @"3des"]; + + if (socks4 && socks4p != nil) + { + [ arguments addObject: @"-D" ]; + [ arguments addObject: [ socks4p stringValue ]]; + } + [ arguments addObject: [ NSString stringWithFormat: @"%@@%@", + connUser, connHost ] + ]; + + NSString *hostPort; + e = [ tunnelsLocal objectEnumerator ]; + while (t = [ e nextObject ]) + { + [ arguments addObject: @"-L" ]; + if ([[ t objectForKey:@"hostport"] isEqualTo: @"" ]) + hostPort = [ t objectForKey:@"port" ]; + else + hostPort = [ t objectForKey:@"hostport" ]; + [ arguments addObject: [NSString stringWithFormat:@"%@/%@/%@", + [ t objectForKey:@"port"], + [ t objectForKey:@"host"], + hostPort + ] ]; + if ([[ t objectForKey:@"port"] intValue] < 1024) + asRoot=YES; + } + + e = [ tunnelsRemote objectEnumerator ]; + while (t = [ e nextObject ]) + { + [ arguments addObject: @"-R" ]; + if ([[ t objectForKey:@"hostport"] isEqualTo: @"" ]) + hostPort = [ t objectForKey:@"port" ]; + else + hostPort = [ t objectForKey:@"hostport" ]; + [ arguments addObject: [NSString stringWithFormat:@"%@/%@/%@", + [ t objectForKey:@"port"], + [ t objectForKey:@"host"], + hostPort + ]]; + } + + return [[ arguments copy ] autorelease ]; +} + +- (NSDictionary*)dictionary +{ + return [ NSDictionary dictionaryWithObjectsAndKeys: + [ NSNumber numberWithBool: compression ],@"compression", + [ NSNumber numberWithBool: connAuth ],@"connAuth", + [ NSNumber numberWithBool: autoConnect ],@"autoConnect", + connHost, @"connHost", + connName, @"connName", + connPort, @"connPort", + [ NSNumber numberWithBool: connRemote ],@"connRemote", + connUser, @"connUser", + encryption, @"encryption", + [ NSNumber numberWithBool: socks4 ],@"socks4", + socks4p, @"socks4p", + tunnelsLocal, @"tunnelsLocal", + tunnelsRemote, @"tunnelsRemote", + [ NSNumber numberWithBool: v1 ],@"v1", nil + ]; +} + + +#pragma mark - +#pragma mark Key/Value coding +- (NSImage*)icon +{ + switch (code) + { + case 0: + return [ NSImage imageNamed: @"offState" ]; + break; + case 1: + return [ NSImage imageNamed: @"middleState" ]; + break; + case 2: + return [ NSImage imageNamed: @"onState" ]; + break; + } + return [ NSImage imageNamed: @"offState" ]; +} +- (void)setValue:(id)value forUndefinedKey:(NSString *)key +{ + NSLog(@"key %@ undefined",key); +} +- (id)valueForUndefinedKey:(NSString *)key +{ + return nil; +} + +#pragma mark - +#pragma mark Misc. +-(void)dealloc +{ + [ self stopTunnel ]; + [ tunnelsLocal release ]; + [ tunnelsRemote release ]; + + [ task release ]; + [ stdErrPipe release ]; + [ connName release ]; + [ status release ]; + [ connPort release ]; + [ encryption release ]; + [ socks4p release ]; + [ connUser release ]; + [ connHost release ]; + + // start diff lorenz textor + [super dealloc]; + // end diff lorenz textor +} +@end diff --git a/trunk/SSHTunnel_old.h b/trunk/SSHTunnel_old.h new file mode 100755 index 00000000..f70d3a52 --- /dev/null +++ b/trunk/SSHTunnel_old.h @@ -0,0 +1,41 @@ +/* + +SSHTunnel.h + +Original code by tynsoe.org, Copyright 2002 +Modified by Lorenz Textor for use with Sequel Pro + +*/ + +#import + +@interface SSHTunnel : NSObject +{ + BOOL shouldStop; + NSTask *task; + NSPipe *stdErrPipe; + NSString *status; + + NSDictionary *tunnelArguments; +} + +// initialization +- (id)init; + +// Getting tunnels informations +- (BOOL)isRunning; +- (NSString *)status; + +// starting & stopping the tunnel +- (void)startTunnel; +- (void)startTunnelWithArguments:(NSDictionary *)args; +- (void)stopTunnel; +- (void)launchTunnel:(NSArray*)arguments; +- (void)stdErr:(NSNotification*)aNotification; +- (id)authenticate:(NSScriptCommand *)command; +- (id)handleQuitScriptCommand:(NSScriptCommand *)command; + +// deallocation +- (void) dealloc; + +@end diff --git a/trunk/SSHTunnel_old.m b/trunk/SSHTunnel_old.m new file mode 100755 index 00000000..7657ba22 --- /dev/null +++ b/trunk/SSHTunnel_old.m @@ -0,0 +1,225 @@ +/* + +SSHTunnel.m + +Original code by tynsoe.org, Copyright 2002 +Modified by Lorenz Textor for use with Sequel Pro + +*/ + +#import "SSHTunnel.h" +#include + +// start diff lorenz textor +/* +#define T_START @"START: %@" +#define T_STOP @"STOP: %@" +#define S_IDLE @"Idle" +#define S_CONNECTING @"Connecting..." +#define S_CONNECTED @"Connected" +#define S_AUTH @"Authenticated" +#define S_PORT "Port %@ forwarded" +*/ +#define T_START @"START: %@" +#define T_STOP @"STOP: %@" +#define S_IDLE @"Idle" +#define S_CONNECTING @"Connecting..." +#define S_CONNECTED @"Connected" +#define S_AUTH @"Authenticated" +#define S_PORT "Port %@ forwarded" +// end diff lorenz textor + +@implementation SSHTunnel + +// initialization +- (id)init +{ + self = [super init]; + + // Make this class the root one for AppleEvent calls +// [[ NSScriptExecutionContext sharedScriptExecutionContext] setTopLevelObject: self ]; + + return self; +} + +// Getting tunnels informations +- (BOOL)isRunning +/* returns YES if tunnel is running */ +{ + return [ task isRunning ]; +} + +- (NSString*)status +{ + if (status) + return status; + return S_IDLE; +} + +// starting & stopping the tunnel +- (void)startTunnel +/* starts tunnel with saved arguments */ +{ + [self startTunnelWithArguments:tunnelArguments]; +} + +- (void)startTunnelWithArguments:(NSDictionary *)args +/* starts the tunnel */ +{ + NSMutableArray *arguments = [[ NSMutableArray alloc] init ]; + + if (tunnelArguments ) + [tunnelArguments release]; + tunnelArguments = [args retain]; + + // stop tunnel if already running + if ( [self isRunning] ) +// [self stopTunnel]; + return; + + shouldStop = NO; + +// get arguments + [ arguments addObject: @"-N" ]; + [ arguments addObject: @"-v" ]; + +// [ arguments addObject: @"-p" ]; +// [ arguments addObject: @"-p" ]; +// [ arguments addObject: @"22" ]; + +// [ arguments addObject: @"-c"]; +// [ arguments addObject: @"3des"]; + + [ arguments addObject: [ NSString stringWithFormat: @"%@@%@", [args objectForKey:@"connUser"], [args objectForKey:@"connHost"] ]]; + + [ arguments addObject: @"-L" ]; + [ arguments addObject: [NSString stringWithFormat:@"%@/%@/%@", [args objectForKey:@"localPort"], [args objectForKey:@"host"], [args objectForKey:@"remotePort"]] ]; + + [ NSThread detachNewThreadSelector:@selector(launchTunnel:) + toTarget: self + withObject: arguments ]; + + [ arguments release ]; +} + +- (void)stopTunnel +/* stops the tunnel */ +{ + if (! [ self isRunning ]) + return; + shouldStop=YES; + [ self setValue: nil forKey: @"status" ]; + [ task terminate ]; + [[ NSNotificationCenter defaultCenter] postNotificationName:@"STMStatusChanged" object:self ]; +} + +- (void)launchTunnel:(NSArray*)arguments +/* launches the tunnel in a separate thread */ +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + if (task) + [ task release ]; + task = [[ NSTask alloc ] init ]; + NSMutableDictionary *environment = [ NSMutableDictionary dictionaryWithDictionary: [[ NSProcessInfo processInfo ] environment ]]; + NSString *pathToAuthentifier = [[ NSBundle mainBundle ] pathForResource: @"askForPass" ofType: @"sh" ]; + + [ task setLaunchPath: @"/usr/bin/ssh" ]; + [ task setArguments: arguments ]; + +// really necessary??? + [ environment removeObjectForKey: @"SSH_AGENT_PID" ]; + [ environment removeObjectForKey: @"SSH_AUTH_SOCK" ]; + [ environment setObject: pathToAuthentifier forKey: @"SSH_ASKPASS" ]; + [ environment setObject:@":0" forKey:@"DISPLAY" ]; + + [ environment setObject: @"Sequel Pro Tunnel" forKey: @"TUNNEL_NAME" ]; + [ task setEnvironment: environment ]; + + stdErrPipe = [[ NSPipe alloc ] init ]; + [ task setStandardError: stdErrPipe ]; + + [[ NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(stdErr:) + name: @"NSFileHandleDataAvailableNotification" + object:[ stdErrPipe fileHandleForReading]]; + + [[ stdErrPipe fileHandleForReading] waitForDataInBackgroundAndNotify ]; + + NSLog(T_START,@"Sequel Pro Tunnel"); + [ self setValue: S_CONNECTING forKey: @"status" ]; + [ task launch ]; + [[ NSNotificationCenter defaultCenter] postNotificationName:@"STMStatusChanged" object:self ]; + [ task waitUntilExit ]; + sleep(1); + [ self setValue: S_IDLE forKey: @"status" ]; + NSLog(T_STOP,@"Sequel Pro Tunnel"); + [[ NSNotificationCenter defaultCenter] removeObserver:self + name: @"NSFileHandleDataAvailableNotification" + object:[ stdErrPipe fileHandleForReading]]; + [ task release ]; + task = nil; + [ stdErrPipe release ]; + stdErrPipe = nil; + [[ NSNotificationCenter defaultCenter] postNotificationName:@"STMStatusChanged" object:self ]; + if (! shouldStop) + [ self startTunnel ]; + [ pool release ]; +} + +- (void)stdErr:(NSNotification*)aNotification +{ + NSData *data = [[ aNotification object ] availableData ]; + NSString *log = [[ NSString alloc ] initWithData: data encoding: NSASCIIStringEncoding ]; + BOOL wait = YES; + if ([ log length ]) + { + NSLog(log); + NSArray *lines = [ log componentsSeparatedByString:@"\n" ]; + NSEnumerator *e = [ lines objectEnumerator ]; + NSString *line; + while (line = [ e nextObject ]) + { + if ([ line rangeOfString:@"Entering interactive session." ].location != NSNotFound) + { + [ self setValue: S_CONNECTED forKey: @"status"]; + } + if ([ line rangeOfString:@"Authentication succeeded" ].location != NSNotFound) + [ self setValue: S_AUTH forKey: @"status"]; + if ([ line rangeOfString:@"Connections to local port" ].location != NSNotFound) + { + NSScanner *s; + NSString *port; + s = [ NSScanner scannerWithString:log]; + [ s scanUpToString: @"Connections to local port " intoString: nil ]; + [ s scanString: @"Connections to local port " intoString: nil ]; + [ s scanUpToString: @"forwarded" intoString:&port]; + [ self setValue: [ NSString stringWithFormat: @"Port %@ forwarded", port ] forKey: @"status"]; + } + if ([ line rangeOfString:@"closed by remote host." ].location != NSNotFound) + { + [ task terminate]; + [ self setValue: @"Connection closed" forKey: @"status"]; + wait = NO; + } + [[ NSNotificationCenter defaultCenter] postNotificationName:@"STMStatusChanged" object:self ]; + } + if (wait) + [[ stdErrPipe fileHandleForReading ] waitForDataInBackgroundAndNotify ]; + } + [ log release] ; +} + +// deallocation +- (void) dealloc +{ + [self stopTunnel]; + + [task release]; + [stdErrPipe release]; + [status release]; + [tunnelArguments release]; + + [super dealloc]; +} + +@end diff --git a/trunk/Sparkle.framework/Headers b/trunk/Sparkle.framework/Headers new file mode 120000 index 00000000..a177d2a6 --- /dev/null +++ b/trunk/Sparkle.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/trunk/Sparkle.framework/Resources b/trunk/Sparkle.framework/Resources new file mode 120000 index 00000000..953ee36f --- /dev/null +++ b/trunk/Sparkle.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/trunk/Sparkle.framework/Sparkle b/trunk/Sparkle.framework/Sparkle new file mode 120000 index 00000000..b2c52731 --- /dev/null +++ b/trunk/Sparkle.framework/Sparkle @@ -0,0 +1 @@ +Versions/Current/Sparkle \ No newline at end of file diff --git a/trunk/Sparkle.framework/Versions/A/Headers/NSBundle+SUAdditions.h b/trunk/Sparkle.framework/Versions/A/Headers/NSBundle+SUAdditions.h new file mode 100644 index 00000000..38fc9238 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/NSBundle+SUAdditions.h @@ -0,0 +1,57 @@ +// +// NSBundle+SUAdditions.h +// Sparkle +// +// Created by Andy Matuschak on 12/21/07. +// Copyright 2007 Andy Matuschak. All rights reserved. +// + +#ifndef NSBUNDLE_PLUS_ADDITIONS_H +#define NSBUNDLE_PLUS_ADDITIONS_H + +@interface NSBundle (SUAdditions) +/*! + @method + @abstract Returns a name for the bundle suitable for display to the user. + @discussion This is performed by asking NSFileManager for the display name of the bundle. +*/ +- (NSString *)name; + +/*! + @method + @abstract Returns the current internal version of the bundle. + @discussion This uses the CFBundleVersion info value. This string is not appropriate for display to users: use -displayVersion instead. +*/ +- (NSString *)version; + +/*! + @method + @abstract Returns the bundle's version, suitable for display to the user. + @discussion If the CFBundleShortVersionString is available and different from the CFBundleVersion, this looks like CFBundleShortVersionString (CFBundleVersion). If the version strings are the same or CFBundleShortVersionString is not defined, this is equivalent to -version. +*/ +- (NSString *)displayVersion; + +/*! + @method + @abstract Returns a suitable icon for this bundle. + @discussion Uses the CFBundleIconFile icon if defined; otherwise, uses the default application icon. +*/ +- (NSImage *)icon; + +/*! + @method + @abstract Returns whether the application is running from a disk image. +*/ +- (BOOL)isRunningFromDiskImage; + +/*! + @method + @abstract Returns a profile of the users system useful for statistical purposes. + @discussion Returns an array of dictionaries; each dictionary represents a piece of data and has keys "key", "visibleKey", "value", and "visibleValue". +*/ +- (NSArray *)systemProfile; + +- (NSString *)publicDSAKey; +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/NSFileManager+Aliases.h b/trunk/Sparkle.framework/Versions/A/Headers/NSFileManager+Aliases.h new file mode 100644 index 00000000..76b2b501 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/NSFileManager+Aliases.h @@ -0,0 +1,18 @@ +// +// NSFileManager+Aliases.h +// Sparkle +// +// Created by Andy Matuschak on 2/4/08. +// Copyright 2008 Andy Matuschak. All rights reserved. +// + +#ifndef NSFILEMANAGER_PLUS_ALIASES_H +#define NSFILEMANAGER_PLUS_ALIASES_H + +#import + +@interface NSFileManager (Aliases) +- (BOOL)isAliasFolderAtPath:(NSString *)path; +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/NSFileManager+Authentication.h b/trunk/Sparkle.framework/Versions/A/Headers/NSFileManager+Authentication.h new file mode 100644 index 00000000..80b91a9b --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/NSFileManager+Authentication.h @@ -0,0 +1,16 @@ +// +// NSFileManager+Authentication.m +// Sparkle +// +// Created by Andy Matuschak on 3/9/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#ifndef NSFILEMANAGER_PLUS_AUTHENTICATION_H +#define NSFILEMANAGER_PLUS_AUTHENTICATION_H + +@interface NSFileManager (SUAuthenticationAdditions) +- (BOOL)copyPathWithAuthentication:(NSString *)src overPath:(NSString *)dst error:(NSError **)error; +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/NSFileManager+ExtendedAttributes.h b/trunk/Sparkle.framework/Versions/A/Headers/NSFileManager+ExtendedAttributes.h new file mode 100644 index 00000000..e541c300 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/NSFileManager+ExtendedAttributes.h @@ -0,0 +1,53 @@ +// +// NSFileManager+ExtendedAttributes.h +// Sparkle +// +// Created by Mark Mentovai on 2008-01-22. +// Copyright 2008 Mark Mentovai. All rights reserved. +// + +#ifndef NSFILEMANAGER_PLUS_EXTENDEDATTRIBUTES +#define NSFILEMANAGER_PLUS_EXTENDEDATTRIBUTES + +#import + +@interface NSFileManager (ExtendedAttributes) + +// Wraps the removexattr system call, allowing an AppKit-style NSString* to +// be used for the pathname argument. Note that the order of the arguments +// has changed from what removexattr accepts, so that code reads more +// naturally. +// +// removexattr is only available on Mac OS X 10.4 ("Tiger") and later. If +// built with an SDK that includes removexattr, this method will link against +// removexattr directly. When using earlier SDKs, this method will dynamically +// look up the removexattr symbol at runtime. If the symbol is not present, +// as will be the case when running on 10.3, this method returns -1 and sets +// errno to ENOSYS. +- (int)removeXAttr:(const char*)name + fromFile:(NSString*)file + options:(int)options; + +// Removes the directory tree rooted at |root| from the file quarantine. +// The quarantine was introduced on Mac OS X 10.5 and is described at: +// +// http://developer.apple.com/releasenotes/Carbon/RN-LaunchServices/index.html +//#apple_ref/doc/uid/TP40001369-DontLinkElementID_2 +// +// If |root| is not a directory, then it alone is removed from the quarantine. +// Symbolic links, including |root| if it is a symbolic link, will not be +// traversed. +// +// Ordinarily, the quarantine is managed by calling LSSetItemAttribute +// to set the kLSItemQuarantineProperties attribute to a dictionary specifying +// the quarantine properties to be applied. However, it does not appear to be +// possible to remove an item from the quarantine directly through any public +// Launch Services calls. Instead, this method takes advantage of the fact +// that the quarantine is implemented in part by setting an extended attribute, +// "com.apple.quarantine", on affected files. Removing this attribute is +// sufficient to remove files from the quarantine. +- (void)releaseFromQuarantine:(NSString*)root; + +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/NSFileManager+Verification.h b/trunk/Sparkle.framework/Versions/A/Headers/NSFileManager+Verification.h new file mode 100644 index 00000000..9a97eacd --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/NSFileManager+Verification.h @@ -0,0 +1,17 @@ +// +// NSFileManager+Verification.h +// Sparkle +// +// Created by Andy Matuschak on 3/16/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#ifndef NSFILEMANAGER_PLUS_VERIFICATION_H +#define NSFILEMANAGER_PLUS_VERIFICATION_H + +// For the paranoid folks! +@interface NSFileManager (SUVerification) +- (BOOL)validatePath:(NSString *)path withEncodedDSASignature:(NSString *)encodedSignature withPublicDSAKey:(NSString *)pkeyString; +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/NSString+extras.h b/trunk/Sparkle.framework/Versions/A/Headers/NSString+extras.h new file mode 100644 index 00000000..7d84b688 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/NSString+extras.h @@ -0,0 +1,66 @@ +/* + +BSD License + +Copyright (c) 2002, Brent Simmons +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +* Neither the name of ranchero.com or Brent Simmons nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, +OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +*/ + +#ifndef NSSTRING_PLUS_EXTRAS_H +#define NSSTRING_PLUS_EXTRAS_H + + +/* + NSString+extras.h + NetNewsWire + + Created by Brent Simmons on Fri Jun 14 2002. + Copyright (c) 2002 Brent Simmons. All rights reserved. +*/ + + +#import +#import +#import "SUConstants.h" // for NSInteger + +@interface NSString (extras) + +- (NSString *)stringWithSubstitute:(NSString *)subs forCharactersFromSet:(NSCharacterSet *)set; + +- (NSString *) trimWhiteSpace; + +- (NSString *) stripHTML; + +- (NSString *) ellipsizeAfterNWords: (NSInteger) n; + ++ (BOOL) stringIsEmpty: (NSString *) s; + + +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/NSURL+Parameters.h b/trunk/Sparkle.framework/Versions/A/Headers/NSURL+Parameters.h new file mode 100644 index 00000000..40b2f9e8 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/NSURL+Parameters.h @@ -0,0 +1,18 @@ +// +// NSURL+Parameters.h +// Sparkle +// +// Created by Andy Matuschak on 5/6/08. +// Copyright 2008 Andy Matuschak. All rights reserved. +// + +#ifndef NSURL_PLUS_PARAMETERS_H +#define NSURL_PLUS_PARAMETERS_H + +#import + +@interface NSURL (SUParameterAdditions) +- (NSURL *)URLWithParameters:(NSArray *)parameters; +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/NSWorkspace+SystemVersion.h b/trunk/Sparkle.framework/Versions/A/Headers/NSWorkspace+SystemVersion.h new file mode 100644 index 00000000..11194125 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/NSWorkspace+SystemVersion.h @@ -0,0 +1,18 @@ +// +// NSWorkspace+SystemVersion.h +// Sparkle +// +// Created by Andy Matuschak on 5/7/08. +// Copyright 2008 Andy Matuschak. All rights reserved. +// + +#ifndef NSWORKSPACE_PLUS_SYSTEMVERSION_H +#define NSWORKSPACE_PLUS_SYSTEMVERSION_H + +#import + +@interface NSWorkspace (SystemVersion) ++ (NSString *)systemVersionString; +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/NSWorkspace_RBAdditions.h b/trunk/Sparkle.framework/Versions/A/Headers/NSWorkspace_RBAdditions.h new file mode 100644 index 00000000..bd50fb13 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/NSWorkspace_RBAdditions.h @@ -0,0 +1,41 @@ +// +// NSWorkspace_RBAdditions.h +// PathProps +// +// Created by Rainer Brockerhoff on 10/04/2007. +// Copyright 2007 Rainer Brockerhoff. All rights reserved. +// + +#ifndef NSWORKSPACE_RBADDITIONS_H +#define NSWORKSPACE_RBADDITIONS_H + + +extern NSString* NSWorkspace_RBfstypename; +extern NSString* NSWorkspace_RBmntonname; +extern NSString* NSWorkspace_RBmntfromname; +extern NSString* NSWorkspace_RBdeviceinfo; +extern NSString* NSWorkspace_RBimagefilepath; +extern NSString* NSWorkspace_RBconnectiontype; +extern NSString* NSWorkspace_RBpartitionscheme; +extern NSString* NSWorkspace_RBserverURL; + +@interface NSWorkspace (NSWorkspace_RBAdditions) + +// This method will return nil if the input path is invalid. Otherwise, the returned NSDictionary may contain +// the following keys: +//- NSWorkspace_RBfstypename: will always be present.Shows the filesystem type (usually "hfs"), from statfs. +//- NSWorkspace_RBmntonname: will always be present. Shows the volume mount point. +//- NSWorkspace_RBmntfromname: will always be present. Shows the BSD device path for local volumes; info for +// remote volumes depends on the filesystem type. +//- NSWorkspace_RBconnectiontype: should always be present for local volumes. Shows the connection type ("SATA", "USB", etc.). +//- NSWorkspace_RBpartitionscheme: should always be present for local volumes. Shows the partition scheme. +//- NSWorkspace_RBdeviceinfo: should always be present for local volumes. Shows some information about the +// physical device; varies widely. +//- NSWorkspace_RBimagefilepath: should be present for disk images only. Shows the path of the disk image file. +//- NSWorkspace_RBserverURL: should be present for remote volumes only. Shows the server URL. + +- (NSDictionary*)propertiesForPath:(NSString*)path; + +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/NTSynchronousTask.h b/trunk/Sparkle.framework/Versions/A/Headers/NTSynchronousTask.h new file mode 100644 index 00000000..1cf5c04e --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/NTSynchronousTask.h @@ -0,0 +1,29 @@ +// +// NTSynchronousTask.h +// CocoatechCore +// +// Created by Steve Gehrman on 9/29/05. +// Copyright 2005 Steve Gehrman. All rights reserved. +// + +#ifndef NTSYNCHRONOUSTASK_H +#define NTSYNCHRONOUSTASK_H + +@interface NTSynchronousTask : NSObject +{ + NSTask *mv_task; + NSPipe *mv_outputPipe; + NSPipe *mv_inputPipe; + + NSData* mv_output; + BOOL mv_done; + int mv_result; +} + +// pass nil for directory if not needed +// returns the result ++ (NSData*)task:(NSString*)toolPath directory:(NSString*)currentDirectory withArgs:(NSArray*)args input:(NSData*)input; + +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/RSS.h b/trunk/Sparkle.framework/Versions/A/Headers/RSS.h new file mode 100644 index 00000000..38978b2b --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/RSS.h @@ -0,0 +1,77 @@ +/* + +BSD License + +Copyright (c) 2002, Brent Simmons +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +* Neither the name of ranchero.com or Brent Simmons nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, +OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +*/ + +#ifndef RSS_H +#define RSS_H + + +/* + RSS.h + A class for reading RSS feeds. + + Created by Brent Simmons on Wed Apr 17 2002. + Copyright (c) 2002 Brent Simmons. All rights reserved. +*/ + + +#import +#import +#import "NSString+extras.h" + + +@interface RSS : NSObject { + NSMutableData *incrementalData; + id delegate; + + NSDictionary *headerItems; + NSMutableArray *newsItems; + NSString *version; + + BOOL flRdf; + BOOL normalize; + } + +- (RSS *)initWithURL:(NSURL *) url userAgent:(NSString*)userAgent delegate:delegate; +- (BOOL)loadData:(NSData *)rssData normalize:(BOOL)fl; + +- (NSMutableArray *)newsItems; +- (NSDictionary *)newestItem; + +@end + +@interface NSObject (RSSDelegateProtocol) +- (void)feedDidFinishLoading:(RSS *)feed; +- (void)feed:(RSS *)feed didFailWithError:(NSError *)error; +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/SUAppcast.h b/trunk/Sparkle.framework/Versions/A/Headers/SUAppcast.h new file mode 100644 index 00000000..624f3f21 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/SUAppcast.h @@ -0,0 +1,32 @@ +// +// SUAppcast.h +// Sparkle +// +// Created by Andy Matuschak on 3/12/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#ifndef SUAPPCAST_H +#define SUAPPCAST_H + +@class RSS, SUAppcastItem; +@interface SUAppcast : NSObject { + NSArray *items; + NSString *userAgentString; + id delegate; +} + +- (void)fetchAppcastFromURL:(NSURL *)url; +- (void)setDelegate:delegate; +- (void)setUserAgentString:(NSString *)userAgentString; + +- (NSArray *)items; + +@end + +@interface NSObject (SUAppcastDelegate) +- (void)appcastDidFinishLoading:(SUAppcast *)appcast; +- (void)appcast:(SUAppcast *)appcast failedToLoadWithError:(NSError *)error; +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h b/trunk/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h new file mode 100644 index 00000000..d0c0523e --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h @@ -0,0 +1,48 @@ +// +// SUAppcastItem.h +// Sparkle +// +// Created by Andy Matuschak on 3/12/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#ifndef SUAPPCASTITEM_H +#define SUAPPCASTITEM_H + + +@interface SUAppcastItem : NSObject { + NSString *title; + NSDate *date; + NSString *description; + + NSURL *releaseNotesURL; + + NSString *DSASignature; + NSString *minimumSystemVersion; + + NSURL *fileURL; + NSString *versionString; + NSString *displayVersionString; + + NSDictionary *propertiesDictionary; +} + +// Initializes with data from a dictionary provided by the RSS class. +- initWithDictionary:(NSDictionary *)dict; + +- (NSString *)title; +- (NSString *)versionString; +- (NSString *)displayVersionString; +- (NSDate *)date; +- (NSString *)description; +- (NSURL *)releaseNotesURL; +- (NSURL *)fileURL; +- (NSString *)DSASignature; +- (NSString *)minimumSystemVersion; + +// Returns the dictionary provided in initWithDictionary; this might be useful later for extensions. +- (NSDictionary *)propertiesDictionary; + +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/SUAutomaticUpdateAlert.h b/trunk/Sparkle.framework/Versions/A/Headers/SUAutomaticUpdateAlert.h new file mode 100644 index 00000000..76fb35f4 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/SUAutomaticUpdateAlert.h @@ -0,0 +1,39 @@ +// +// SUAutomaticUpdateAlert.h +// Sparkle +// +// Created by Andy Matuschak on 3/18/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#ifndef SUAUTOMATICUPDATEALERT_H +#define SUAUTOMATICUPDATEALERT_H + +#import "SUWindowController.h" + +typedef enum +{ + SUInstallNowChoice, + SUInstallLaterChoice, + SUDoNotInstallChoice +} SUAutomaticInstallationChoice; + +@class SUAppcastItem; +@interface SUAutomaticUpdateAlert : SUWindowController { + SUAppcastItem *updateItem; + id delegate; + NSBundle *hostBundle; +} + +- (id)initWithAppcastItem:(SUAppcastItem *)item hostBundle:(NSBundle *)hostBundle delegate:delegate; +- (IBAction)installNow:sender; +- (IBAction)installLater:sender; +- (IBAction)doNotInstall:sender; + +@end + +@interface NSObject (SUAutomaticUpdateAlertDelegateProtocol) +- (void)automaticUpdateAlert:(SUAutomaticUpdateAlert *)aua finishedWithChoice:(SUAutomaticInstallationChoice)choice; +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/SUAutomaticUpdateDriver.h b/trunk/Sparkle.framework/Versions/A/Headers/SUAutomaticUpdateDriver.h new file mode 100644 index 00000000..f63c194e --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/SUAutomaticUpdateDriver.h @@ -0,0 +1,23 @@ +// +// SUAutomaticUpdateDriver.h +// Sparkle +// +// Created by Andy Matuschak on 5/6/08. +// Copyright 2008 Andy Matuschak. All rights reserved. +// + +#ifndef SUAUTOMATICUPDATEDRIVER_H +#define SUAUTOMATICUPDATEDRIVER_H + +#import +#import "SUBasicUpdateDriver.h" + +@class SUAutomaticUpdateAlert; +@interface SUAutomaticUpdateDriver : SUBasicUpdateDriver { + BOOL postponingInstallation, showErrors; + SUAutomaticUpdateAlert *alert; +} + +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/SUBasicUpdateDriver.h b/trunk/Sparkle.framework/Versions/A/Headers/SUBasicUpdateDriver.h new file mode 100644 index 00000000..bd0297c5 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/SUBasicUpdateDriver.h @@ -0,0 +1,59 @@ +// +// SUBasicUpdateDriver.h +// Sparkle, +// +// Created by Andy Matuschak on 4/23/08. +// Copyright 2008 Andy Matuschak. All rights reserved. +// + +#ifndef SUBASICUPDATEDRIVER_H +#define SUBASICUPDATEDRIVER_H + +#import +#import "SUUpdateDriver.h" + +@class SUAppcastItem, SUUnarchiver, SUAppcast, SUUnarchiver; +@interface SUBasicUpdateDriver : SUUpdateDriver { + NSBundle *hostBundle; + SUAppcastItem *updateItem; + + NSURLDownload *download; + NSString *downloadPath; + + SUUnarchiver *unarchiver; + + NSString *relaunchPath; +} + +- (void)checkForUpdatesAtURL:(NSURL *)appcastURL hostBundle:(NSBundle *)hb; + +- (void)appcastDidFinishLoading:(SUAppcast *)ac; +- (void)appcast:(SUAppcast *)ac failedToLoadWithError:(NSError *)error; + +- (BOOL)isItemNewer:(SUAppcastItem *)ui; +- (BOOL)hostSupportsItem:(SUAppcastItem *)ui; +- (BOOL)itemContainsSkippedVersion:(SUAppcastItem *)ui; +- (BOOL)itemContainsValidUpdate:(SUAppcastItem *)ui; +- (void)didFindValidUpdate; +- (void)didNotFindUpdate; + +- (void)downloadUpdate; +- (void)download:(NSURLDownload *)d decideDestinationWithSuggestedFilename:(NSString *)name; +- (void)downloadDidFinish:(NSURLDownload *)d; +- (void)download:(NSURLDownload *)download didFailWithError:(NSError *)error; + +- (void)extractUpdate; +- (void)unarchiverDidFinish:(SUUnarchiver *)ua; +- (void)unarchiverDidFail:(SUUnarchiver *)ua; + +- (void)installUpdate; +- (void)installerFinishedForHostBundle:(NSBundle *)hb; +- (void)installerForHostBundle:(NSBundle *)hb failedWithError:(NSError *)error; +- (void)relaunchHostApp; + +- (void)abortUpdate; +- (void)abortUpdateWithError:(NSError *)error; + +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/SUConstants.h b/trunk/Sparkle.framework/Versions/A/Headers/SUConstants.h new file mode 100644 index 00000000..c0c427af --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/SUConstants.h @@ -0,0 +1,72 @@ +// +// SUConstants.h +// Sparkle +// +// Created by Andy Matuschak on 3/16/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + + +#ifndef SUCONSTANTS_H +#define SUCONSTANTS_H + + +extern NSString *SUUpdaterWillRestartNotification; +extern NSString *SUTechnicalErrorInformationKey; + +extern NSString *SUFeedURLKey; +extern NSString *SUHasLaunchedBeforeKey; +extern NSString *SUShowReleaseNotesKey; +extern NSString *SUSkippedVersionKey; +extern NSString *SUScheduledCheckIntervalKey; +extern NSString *SULastCheckTimeKey; +extern NSString *SUExpectsDSASignatureKey; +extern NSString *SUPublicDSAKeyKey; +extern NSString *SUPublicDSAKeyFileKey; +extern NSString *SUAutomaticallyUpdateKey; +extern NSString *SUAllowsAutomaticUpdatesKey; +extern NSString *SUEnableAutomaticChecksKey; +extern NSString *SUEnableAutomaticChecksKeyOld; +extern NSString *SUEnableSystemProfilingKey; +extern NSString *SUSendProfileInfoKey; + +extern NSString *SUSparkleErrorDomain; +// Appcast phase errors. +extern OSStatus SUAppcastParseError; +extern OSStatus SUNoUpdateError; +extern OSStatus SUAppcastError; +extern OSStatus SURunningFromDiskImageError; + +// Downlaod phase errors. +extern OSStatus SUTemporaryDirectoryError; + +// Extraction phase errors. +extern OSStatus SUUnarchivingError; +extern OSStatus SUSignatureError; + +// Installation phase errors. +extern OSStatus SUFileCopyFailure; +extern OSStatus SUAuthenticationFailure; +extern OSStatus SUMissingUpdateError; +extern OSStatus SUMissingInstallerToolError; +extern OSStatus SURelaunchError; +extern OSStatus SUInstallationError; + +// NSInteger is a type that was added to Leopard. +// Here is some glue to ensure that NSInteger will work with pre-10.5 SDKs: +#ifndef NSINTEGER_DEFINED + #ifdef NS_BUILD_32_LIKE_64 + typedef long NSInteger; + typedef unsigned long NSUInteger; + #else + typedef int NSInteger; + typedef unsigned int NSUInteger; + #endif + #define NSIntegerMax LONG_MAX + #define NSIntegerMin LONG_MIN + #define NSUIntegerMax ULONG_MAX + #define NSINTEGER_DEFINED 1 +#endif + + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/SUInstaller.h b/trunk/Sparkle.framework/Versions/A/Headers/SUInstaller.h new file mode 100644 index 00000000..08bfc974 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/SUInstaller.h @@ -0,0 +1,24 @@ +// +// SUInstaller.h +// Sparkle +// +// Created by Andy Matuschak on 4/10/08. +// Copyright 2008 Andy Matuschak. All rights reserved. +// + +#ifndef SUINSTALLER_H +#define SUINSTALLER_H + +#import + +@interface SUInstaller : NSObject { } ++ (void)installFromUpdateFolder:(NSString *)updateFolder overHostBundle:(NSBundle *)hostBundle delegate:delegate synchronously:(BOOL)synchronously; ++ (void)_finishInstallationWithResult:(BOOL)result hostBundle:(NSBundle *)hostBundle error:(NSError *)error delegate:delegate; +@end + +@interface NSObject (SUInstallerDelegateInformalProtocol) +- (void)installerFinishedForHostBundle:(NSBundle *)hostBundle; +- (void)installerForHostBundle:(NSBundle *)hostBundle failedWithError:(NSError *)error; +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/SUPackageInstaller.h b/trunk/Sparkle.framework/Versions/A/Headers/SUPackageInstaller.h new file mode 100644 index 00000000..94bb3ad0 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/SUPackageInstaller.h @@ -0,0 +1,19 @@ +// +// SUPackageInstaller.h +// Sparkle +// +// Created by Andy Matuschak on 4/10/08. +// Copyright 2008 Andy Matuschak. All rights reserved. +// + +#ifndef SUPACKAGEINSTALLER_H +#define SUPACKAGEINSTALLER_H + +#import "Sparkle.h" +#import "SUPlainInstaller.h" + +@interface SUPackageInstaller : SUPlainInstaller { } ++ (void)installPath:(NSString *)path overHostBundle:(NSBundle *)bundle delegate:delegate; +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/SUPlainInstaller.h b/trunk/Sparkle.framework/Versions/A/Headers/SUPlainInstaller.h new file mode 100644 index 00000000..075ffe66 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/SUPlainInstaller.h @@ -0,0 +1,18 @@ +// +// SUPlainInstaller.h +// Sparkle +// +// Created by Andy Matuschak on 4/10/08. +// Copyright 2008 Andy Matuschak. All rights reserved. +// + +#ifndef SUPLAININSTALLER_H +#define SUPLAININSTALLER_H + +#import "Sparkle.h" + +@interface SUPlainInstaller : SUInstaller { } ++ (void)performInstallationWithPath:(NSString *)path hostBundle:(NSBundle *)hostBundle delegate:delegate synchronously:(BOOL)synchronously; +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/SUProbingUpdateDriver.h b/trunk/Sparkle.framework/Versions/A/Headers/SUProbingUpdateDriver.h new file mode 100644 index 00000000..c91c6a32 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/SUProbingUpdateDriver.h @@ -0,0 +1,24 @@ +// +// SUProbingUpdateDriver.h +// Sparkle +// +// Created by Andy Matuschak on 5/7/08. +// Copyright 2008 Andy Matuschak. All rights reserved. +// + +#ifndef SUPROBINGUPDATEDRIVER_H +#define SUPROBINGUPDATEDRIVER_H + +#import +#import "SUBasicUpdateDriver.h" + +// This replaces the old SUStatusChecker. +@interface SUProbingUpdateDriver : SUBasicUpdateDriver { } +@end + +@interface NSObject (SUProbeDriverDelegateProtocol) +- (void)didFindValidUpdate:(SUAppcastItem *)item toHostBundle:(NSBundle *)hb; +- (void)didNotFindUpdateToHostBundle:(NSBundle *)hb; +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/SUScheduledUpdateDriver.h b/trunk/Sparkle.framework/Versions/A/Headers/SUScheduledUpdateDriver.h new file mode 100644 index 00000000..892a6a74 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/SUScheduledUpdateDriver.h @@ -0,0 +1,21 @@ +// +// SUScheduledUpdateDriver.h +// Sparkle +// +// Created by Andy Matuschak on 5/6/08. +// Copyright 2008 Andy Matuschak. All rights reserved. +// + +#ifndef SUSCHEDULEDUPDATEDRIVER_H +#define SUSCHEDULEDUPDATEDRIVER_H + +#import +#import "SUUIBasedUpdateDriver.h" + +@interface SUScheduledUpdateDriver : SUUIBasedUpdateDriver { + BOOL showErrors; +} + +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/SUStandardVersionComparator.h b/trunk/Sparkle.framework/Versions/A/Headers/SUStandardVersionComparator.h new file mode 100644 index 00000000..0bc15706 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/SUStandardVersionComparator.h @@ -0,0 +1,36 @@ +// +// SUStandardVersionComparator.h +// Sparkle +// +// Created by Andy Matuschak on 12/21/07. +// Copyright 2007 Andy Matuschak. All rights reserved. +// + +#ifndef SUSTANDARDVERSIONCOMPARATOR_H +#define SUSTANDARDVERSIONCOMPARATOR_H + + +#import "SUVersionComparisonProtocol.h" + +/*! + @class + @abstract Sparkle's default version comparator. + @discussion This comparator is adapted from MacPAD, by Kevin Ballard. It's "dumb" in that it does essentially string comparison, in components split by character type. +*/ +@interface SUStandardVersionComparator : NSObject { } + +/*! + @method + @abstract Returns a singleton instance of the comparator. +*/ ++ (SUStandardVersionComparator *)defaultComparator; + +/*! + @method + @abstract Compares version strings through textual analysis. + @discussion See the implementation for more details. +*/ +- (NSComparisonResult)compareVersion:(NSString *)versionA toVersion:(NSString *)versionB; +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/SUStatusChecker.h b/trunk/Sparkle.framework/Versions/A/Headers/SUStatusChecker.h new file mode 100755 index 00000000..a1fca913 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/SUStatusChecker.h @@ -0,0 +1,30 @@ +// +// SUStatusChecker.h +// Sparkle +// +// Created by Evan Schoenberg on 7/6/06. +// + +#ifndef SUSTATUSCHECKER_H +#define SUSTATUSCHECKER_H + +#import "SUUpdater.h" + +@class SUStatusChecker; + +@protocol SUStatusCheckerDelegate +//versionString will be nil and isNewVersion will be NO if version checking fails. +- (void)statusChecker:(SUStatusChecker *)statusChecker foundVersion:(NSString *)versionString isNewVersion:(BOOL)isNewVersion; +@end + +@interface SUStatusChecker : SUUpdater { + id scDelegate; +} + +// Create a status checker which will notifiy delegate once the appcast version is determined. +// Notification occurs via the method defined in the SUStatusCheckerDelegate informal protocol. ++ (SUStatusChecker *)statusCheckerForDelegate:(id)delegate; + +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/SUStatusController.h b/trunk/Sparkle.framework/Versions/A/Headers/SUStatusController.h new file mode 100644 index 00000000..dc0c197f --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/SUStatusController.h @@ -0,0 +1,42 @@ +// +// SUStatusController.h +// Sparkle +// +// Created by Andy Matuschak on 3/14/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#ifndef SUSTATUSCONTROLLER_H +#define SUSTATUSCONTROLLER_H + +#import "SUWindowController.h" + +@interface SUStatusController : SUWindowController { + double progressValue, maxProgressValue; + NSString *title, *statusText, *buttonTitle; + IBOutlet NSButton *actionButton; + IBOutlet NSProgressIndicator* progressBar; + NSBundle *hostBundle; +} + +- (id)initWithHostBundle:(NSBundle *)hostBundle; + +// Pass 0 for the max progress value to get an indeterminate progress bar. +// Pass nil for the status text to not show it. +- (void)beginActionWithTitle:(NSString *)title maxProgressValue:(double)maxProgressValue statusText:(NSString *)statusText; + +// If isDefault is YES, the button's key equivalent will be \r. +- (void)setButtonTitle:(NSString *)buttonTitle target:target action:(SEL)action isDefault:(BOOL)isDefault; +- (void)setButtonEnabled:(BOOL)enabled; +- (void)setButtonHidden:(BOOL)hidden; + +- (double)progressValue; +- (void)setProgressValue:(double)value; +- (double)maxProgressValue; +- (void)setMaxProgressValue:(double)value; + +- (void)setStatusText:(NSString *)statusText; + +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/SUSystemProfiler.h b/trunk/Sparkle.framework/Versions/A/Headers/SUSystemProfiler.h new file mode 100644 index 00000000..8ce9f545 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/SUSystemProfiler.h @@ -0,0 +1,17 @@ +// +// SUSystemProfiler.h +// Sparkle +// +// Created by Andy Matuschak on 12/22/07. +// Copyright 2007 Andy Matuschak. All rights reserved. +// + +#ifndef SUSYSTEMPROFILER_H +#define SUSYSTEMPROFILER_H + +@interface SUSystemProfiler : NSObject {} ++ (SUSystemProfiler *)sharedSystemProfiler; +- (NSMutableArray *)systemProfileArrayForHostBundle:(NSBundle *)hostBundle; +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/SUUIBasedUpdateDriver.h b/trunk/Sparkle.framework/Versions/A/Headers/SUUIBasedUpdateDriver.h new file mode 100644 index 00000000..d3459801 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/SUUIBasedUpdateDriver.h @@ -0,0 +1,23 @@ +// +// SUUIBasedUpdateDriver.h +// Sparkle +// +// Created by Andy Matuschak on 5/5/08. +// Copyright 2008 Andy Matuschak. All rights reserved. +// + +#ifndef SUUIBASEDUPDATEDRIVER_H +#define SUUIBASEDUPDATEDRIVER_H + +#import +#import "SUBasicUpdateDriver.h" + +@class SUStatusController, SUUpdateAlert; +@interface SUUIBasedUpdateDriver : SUBasicUpdateDriver { + SUStatusController *statusController; + SUUpdateAlert *updateAlert; +} + +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/SUUnarchiver.h b/trunk/Sparkle.framework/Versions/A/Headers/SUUnarchiver.h new file mode 100644 index 00000000..337bf500 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/SUUnarchiver.h @@ -0,0 +1,29 @@ +// +// SUUnarchiver.h +// Sparkle +// +// Created by Andy Matuschak on 3/16/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#ifndef SUUNARCHIVER_H +#define SUUNARCHIVER_H + +@interface SUUnarchiver : NSObject { + id delegate; + NSString *archivePath; +} + +- (void)unarchivePath:(NSString *)path; +- (void)setDelegate:delegate; +- (void)cleanUp; + +@end + +@interface NSObject (SUUnarchiverDelegate) +- (void)unarchiver:(SUUnarchiver *)unarchiver extractedLength:(long)length; +- (void)unarchiverDidFinish:(SUUnarchiver *)unarchiver; +- (void)unarchiverDidFail:(SUUnarchiver *)unarchiver; +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/SUUpdateAlert.h b/trunk/Sparkle.framework/Versions/A/Headers/SUUpdateAlert.h new file mode 100644 index 00000000..a0288aba --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/SUUpdateAlert.h @@ -0,0 +1,46 @@ +// +// SUUpdateAlert.h +// Sparkle +// +// Created by Andy Matuschak on 3/12/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#ifndef SUUPDATEALERT_H +#define SUUPDATEALERT_H + +#import "SUWindowController.h" + +typedef enum +{ + SUInstallUpdateChoice, + SURemindMeLaterChoice, + SUSkipThisVersionChoice +} SUUpdateAlertChoice; + +@class WebView, SUAppcastItem; +@interface SUUpdateAlert : SUWindowController { + SUAppcastItem *updateItem; + NSBundle *hostBundle; + id delegate; + + IBOutlet WebView *releaseNotesView; + IBOutlet NSTextField *description; + NSProgressIndicator *releaseNotesSpinner; + BOOL webViewFinishedLoading; +} + +- (id)initWithAppcastItem:(SUAppcastItem *)item hostBundle:(NSBundle *)hostBundle; +- (void)setDelegate:delegate; + +- (IBAction)installUpdate:sender; +- (IBAction)skipThisVersion:sender; +- (IBAction)remindMeLater:sender; + +@end + +@interface NSObject (SUUpdateAlertDelegate) +- (void)updateAlert:(SUUpdateAlert *)updateAlert finishedWithChoice:(SUUpdateAlertChoice)updateChoice; +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/SUUpdateDriver.h b/trunk/Sparkle.framework/Versions/A/Headers/SUUpdateDriver.h new file mode 100644 index 00000000..f0c4413d --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/SUUpdateDriver.h @@ -0,0 +1,27 @@ +// +// SUUpdateDriver.h +// Sparkle +// +// Created by Andy Matuschak on 5/7/08. +// Copyright 2008 Andy Matuschak. All rights reserved. +// + +#ifndef SUUPDATEDRIVER_H +#define SUUPDATEDRIVER_H + +#import + +@interface SUUpdateDriver : NSObject +{ + BOOL finished; + id delegate; +} +- (void)checkForUpdatesAtURL:(NSURL *)appcastURL hostBundle:(NSBundle *)hb; +- (void)abortUpdate; +- (BOOL)finished; + +- delegate; +- (void)setDelegate:delegate; +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/SUUpdatePermissionPrompt.h b/trunk/Sparkle.framework/Versions/A/Headers/SUUpdatePermissionPrompt.h new file mode 100644 index 00000000..24959da7 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/SUUpdatePermissionPrompt.h @@ -0,0 +1,36 @@ +// +// SUUpdatePermissionPrompt.h +// Sparkle +// +// Created by Andy Matuschak on 1/24/08. +// Copyright 2008 Andy Matuschak. All rights reserved. +// + +#ifndef SUUPDATEPERMISSIONPROMPT_H +#define SUUPDATEPERMISSIONPROMPT_H + +#import "Sparkle.h" + +typedef enum { + SUAutomaticallyCheck, + SUDoNotAutomaticallyCheck +} SUPermissionPromptResult; + +@interface SUUpdatePermissionPrompt : SUWindowController { + NSBundle *hostBundle; + id delegate; + IBOutlet NSTextField *descriptionTextField; + IBOutlet NSView *moreInfoView; + IBOutlet NSButton *moreInfoButton; + BOOL isShowingMoreInfo, shouldSendProfile; +} ++ (void)promptWithHostBundle:(NSBundle *)hb delegate:(id)d; +- (IBAction)toggleMoreInfo:(id)sender; +- (IBAction)finishPrompt:(id)sender; +@end + +@interface NSObject (SUUpdatePermissionPromptDelegateInformalProtocol) +- (void)updatePermissionPromptFinishedWithResult:(SUPermissionPromptResult)result; +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/SUUpdater.h b/trunk/Sparkle.framework/Versions/A/Headers/SUUpdater.h new file mode 100644 index 00000000..80788728 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/SUUpdater.h @@ -0,0 +1,80 @@ +// +// SUUpdater.h +// Sparkle +// +// Created by Andy Matuschak on 1/4/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#ifndef SUUPDATER_H +#define SUUPDATER_H + +@class SUUpdateDriver; +@interface SUUpdater : NSObject { + NSTimer *checkTimer; + SUUpdateDriver *driver; + + NSBundle *hostBundle; + id delegate; +} + +- (void)setHostBundle:(NSBundle *)hostBundle; +- (void)setDelegate:(id)delegate; + +// This IBAction is meant for a main menu item. Hook up any menu item to this action, +// and Sparkle will check for updates and report back its findings verbosely. +- (IBAction)checkForUpdates:sender; + +// This forces an update to begin with a particular driver (see SU*UpdateDriver.h) +- (void)checkForUpdatesWithDriver:(SUUpdateDriver *)driver; + +- (BOOL)updateInProgress; + +@end + +@interface NSObject (SUUpdaterDelegateInformalProtocol) +// This method allows you to add extra parameters to the appcast URL, potentially based on whether or not +// Sparkle will also be sending along the system profile. This method should return an array of dictionaries with the following keys: +- (NSArray *)feedParametersForUpdater:(SUUpdater *)updater sendingSystemProfile:(BOOL)sendingProfile; + +// Use this to override the default behavior for Sparkle prompting the user about automatic update checks. +- (BOOL)shouldPromptForPermissionToCheckForUpdates; + +// Implement this if you want to do some special handling with the appcast once it finishes loading. +- (void)appcastDidFinishLoading:(SUAppcast *)appcast; + +// If you're using special logic or extensions in your appcast, implement this to use your own logic for finding +// a valid update, if any, in the given appcast. +- (SUAppcastItem *)bestValidUpdateInAppcast:(SUAppcast *)appcast; + +// Sent when a valid update is found by the update driver. +- (void)didFindValidUpdate:(SUAppcastItem *)update; + +// Sent when the user makes a choice in the update alert dialog (install now / remind me later / skip this version). +- (void)userChoseAction:(SUUpdateAlertChoice)action forUpdate:(SUAppcastItem *)update; + +// Sent immediately before installing the specified update. +- (void)updateWillInstall:(SUAppcastItem *)update; + +// Return YES to delay the relaunch until you do some processing; invoke the given NSInvocation to continue. +- (BOOL)shouldPostponeRelaunchForUpdate:(SUAppcastItem *)update untilInvoking:(NSInvocation *)invocation; + +// Called immediately before relaunching. +- (void)updaterWillRelaunchApplication; + +@end + +// Define some minimum intervals to avoid DOS-like checking attacks. These are in seconds. +#ifdef DEBUG +#define SU_MIN_CHECK_INTERVAL 60 +#else +#define SU_MIN_CHECK_INTERVAL 60*60 +#endif + +#ifdef DEBUG +#define SU_DEFAULT_CHECK_INTERVAL 60 +#else +#define SU_DEFAULT_CHECK_INTERVAL 60*60*24 +#endif + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/SUUserDefaults.h b/trunk/Sparkle.framework/Versions/A/Headers/SUUserDefaults.h new file mode 100644 index 00000000..ba2eedb2 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/SUUserDefaults.h @@ -0,0 +1,41 @@ +// +// SUUserDefaults.h +// Sparkle +// +// Created by Andy Matuschak on 12/21/07. +// Copyright 2007 Andy Matuschak. All rights reserved. +// + +#ifndef SUUSERDEFAULTS_H +#define SUUSERDEFAULTS_H + +/*! + @class + @abstract A substitute for NSUserDefaults that will work with arbitrary bundle identifiers. + @discussion Make sure you call -setIdentifier: before using SUUserDefaults. The other methods in this class work just like those in NSUserDefaults. +*/ + +@interface SUUserDefaults : NSObject { + NSString *identifier; +} + +/*! + @method + @abstract Returns a singleton instance of the user defaults class. +*/ ++ (SUUserDefaults *)standardUserDefaults; + +/*! + @method + @abstract Sets which bundle identifier to use when setting and retrieving defaults. + @discussion It is imperative that you set the identifier through this method before trying to set or retrieve defaults. +*/ +- (void)setIdentifier:(NSString *)identifier; + +- (id)objectForKey:(NSString *)defaultName; +- (void)setObject:(id)value forKey:(NSString *)defaultName; +- (BOOL)boolForKey:(NSString *)defaultName; +- (void)setBool:(BOOL)value forKey:(NSString *)defaultName; +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/SUUserInitiatedUpdateDriver.h b/trunk/Sparkle.framework/Versions/A/Headers/SUUserInitiatedUpdateDriver.h new file mode 100644 index 00000000..6849c91d --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/SUUserInitiatedUpdateDriver.h @@ -0,0 +1,21 @@ +// +// SUUserInitiatedUpdateDriver.h +// Sparkle +// +// Created by Andy Matuschak on 5/30/08. +// Copyright 2008 Andy Matuschak. All rights reserved. +// + +#ifndef SUUSERINITIATEDUPDATEDRIVER_H +#define SUUSERINITIATEDUPDATEDRIVER_H + +#import +#import "SUUIBasedUpdateDriver.h" + +@interface SUUserInitiatedUpdateDriver : SUUIBasedUpdateDriver { + SUStatusController *checkingController; +} + +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/SUVersionComparisonProtocol.h b/trunk/Sparkle.framework/Versions/A/Headers/SUVersionComparisonProtocol.h new file mode 100644 index 00000000..3d11ae87 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/SUVersionComparisonProtocol.h @@ -0,0 +1,27 @@ +// +// SUVersionComparisonProtocol.h +// Sparkle +// +// Created by Andy Matuschak on 12/21/07. +// Copyright 2007 Andy Matuschak. All rights reserved. +// + +#ifndef SUVERSIONCOMPARISONPROTOCOL_H +#define SUVERSIONCOMPARISONPROTOCOL_H + +/*! + @protocol + @abstract Implement this protocol to provide version comparison facilities for Sparkle. +*/ +@protocol SUVersionComparison + +/*! + @method + @abstract An abstract method to compare two version strings. + @discussion Should return NSOrderedAscending if b > a, NSOrderedDescending if b < a, and NSOrderedSame if they are equivalent. +*/ +- (NSComparisonResult)compareVersion:(NSString *)versionA toVersion:(NSString *)versionB; + +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/SUVersionComparisonTest.h b/trunk/Sparkle.framework/Versions/A/Headers/SUVersionComparisonTest.h new file mode 100644 index 00000000..b263a8d4 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/SUVersionComparisonTest.h @@ -0,0 +1,16 @@ +// +// SUVersionComparisonTest.h +// Sparkle +// +// Created by Andy Matuschak on 4/15/08. +// Copyright 2008 Andy Matuschak. All rights reserved. +// + +#import + + +@interface SUVersionComparisonTest : SenTestCase { + +} + +@end diff --git a/trunk/Sparkle.framework/Versions/A/Headers/SUWindowController.h b/trunk/Sparkle.framework/Versions/A/Headers/SUWindowController.h new file mode 100644 index 00000000..8b50a64c --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/SUWindowController.h @@ -0,0 +1,19 @@ +// +// SUWindowController.h +// Sparkle +// +// Created by Andy Matuschak on 2/13/08. +// Copyright 2008 Andy Matuschak. All rights reserved. +// + +#ifndef SUWINDOWCONTROLLER_H +#define SUWINDOWCONTROLLER_H + +#import + +@interface SUWindowController : NSWindowController { } +// We use this instead of plain old NSWindowController initWithWindowNibName so that we'll be able to find the right path when running in a bundle loaded from another app. +- (id)initWithHostBundle:(NSBundle *)hb windowNibName:(NSString *)nibName; +@end + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Headers/Sparkle.h b/trunk/Sparkle.framework/Versions/A/Headers/Sparkle.h new file mode 100644 index 00000000..924ce289 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Headers/Sparkle.h @@ -0,0 +1,63 @@ +// +// Sparkle.h +// Sparkle +// +// Created by Andy Matuschak on 3/16/06. (Modified by CDHW on 23/12/07) +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +// +// Prefix header for all source files of the 'Sparkle' target in the 'Sparkle' project. +// + +#ifndef SPARKLE_H +#define SPARKLE_H + +#define SULocalizedString(key,comment) NSLocalizedStringFromTableInBundle(key, @"Sparkle", [NSBundle bundleForClass:[self class]], comment) + +#ifdef __OBJC__ +#import +#import "SUConstants.h" +#endif + + +// This list should include the shared headers. It doesn't matter if some of them aren't shared (unless +// there are name-space collisions) so we can list all of them to start with: + +#import "NSBundle+SUAdditions.h" +#import "NSFileManager+Aliases.h" +#import "NSFileManager+Authentication.h" +#import "NSFileManager+Verification.h" +#import "NSString+extras.h" +#import "NSURL+Parameters.h" +#import "NSWorkspace_RBAdditions.h" +#import "NSWorkspace+SystemVersion.h" + +#import "NTSynchronousTask.h" + +#import "RSS.h" + +#import "SUAppcast.h" +#import "SUAppcastItem.h" +#import "SUAutomaticUpdateAlert.h" +#import "SUAutomaticUpdateDriver.h" +#import "SUBasicUpdateDriver.h" +#import "SUConstants.h" +#import "SUInstaller.h" +#import "SUProbingUpdateDriver.h" +#import "SUScheduledUpdateDriver.h" +#import "SUStandardVersionComparator.h" +#import "SUStatusController.h" +#import "SUSystemProfiler.h" +#import "SUUIBasedUpdateDriver.h" +#import "SUUnarchiver.h" +#import "SUUpdateAlert.h" +#import "SUUpdateDriver.h" +#import "SUUpdater.h" +#import "SUUpdatePermissionPrompt.h" +#import "SUUserInitiatedUpdateDriver.h" +#import "SUUserDefaults.h" +#import "SUVersionComparisonProtocol.h" +#import "SUWindowController.h" + +#endif diff --git a/trunk/Sparkle.framework/Versions/A/Resources/Info.plist b/trunk/Sparkle.framework/Versions/A/Resources/Info.plist new file mode 100644 index 00000000..2eb30510 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + Sparkle + CFBundleIdentifier + org.andymatuschak.Sparkle + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Sparkle + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.5 Beta 1 + CFBundleSignature + ???? + CFBundleVersion + 1.5 + + diff --git a/trunk/Sparkle.framework/Versions/A/Resources/SUModelTranslation.plist b/trunk/Sparkle.framework/Versions/A/Resources/SUModelTranslation.plist new file mode 100644 index 00000000..92ef9471 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Resources/SUModelTranslation.plist @@ -0,0 +1,174 @@ + + + + + ADP2,1 + Developer Transition Kit + MacBook1,1 + MacBook (Core Duo) + MacBook2,1 + MacBook (Core 2 Duo) + MacBook4,1 + MacBook (Core 2 Duo Feb 2008) + MacBookAir1,1 + MacBook Air (January 2008) + MacBookPro1,1 + MacBook Pro Core Duo (15-inch) + MacBookPro1,2 + MacBook Pro Core Duo (17-inch) + MacBookPro2,1 + MacBook Pro Core 2 Duo (17-inch) + MacBookPro2,2 + MacBook Pro Core 2 Duo (15-inch) + MacBookPro3,1 + MacBook Pro Core 2 Duo (15-inch LED, Core 2 Duo) + MacBookPro3,2 + MacBook Pro Core 2 Duo (17-inch HD, Core 2 Duo) + MacBookPro4,1 + MacBook Pro (Core 2 Duo Feb 2008) + MacPro1,1 + Mac Pro (four-core) + MacPro2,1 + Mac Pro (eight-core) + MacPro3,1 + Mac Pro (January 2008 4- or 8- core "Harpertown") + Macmini1,1 + Mac Mini (Core Solo/Duo) + PowerBook1,1 + PowerBook G3 + PowerBook2,1 + iBook G3 + PowerBook2,2 + iBook G3 (FireWire) + PowerBook2,3 + iBook G3 + PowerBook2,4 + iBook G3 + PowerBook3,1 + PowerBook G3 (FireWire) + PowerBook3,2 + PowerBook G4 + PowerBook3,3 + PowerBook G4 (Gigabit Ethernet) + PowerBook3,4 + PowerBook G4 (DVI) + PowerBook3,5 + PowerBook G4 (1GHz / 867MHz) + PowerBook4,1 + iBook G3 (Dual USB, Late 2001) + PowerBook4,2 + iBook G3 (16MB VRAM) + PowerBook4,3 + iBook G3 Opaque 16MB VRAM, 32MB VRAM, Early 2003) + PowerBook5,1 + PowerBook G4 (17 inch) + PowerBook5,2 + PowerBook G4 (15 inch FW 800) + PowerBook5,3 + PowerBook G4 (17-inch 1.33GHz) + PowerBook5,4 + PowerBook G4 (15 inch 1.5/1.33GHz) + PowerBook5,5 + PowerBook G4 (17-inch 1.5GHz) + PowerBook5,6 + PowerBook G4 (15 inch 1.67GHz/1.5GHz) + PowerBook5,7 + PowerBook G4 (17-inch 1.67GHz) + PowerBook5,8 + PowerBook G4 (Double layer SD, 15 inch) + PowerBook5,9 + PowerBook G4 (Double layer SD, 17 inch) + PowerBook6,1 + PowerBook G4 (12 inch) + PowerBook6,2 + PowerBook G4 (12 inch, DVI) + PowerBook6,3 + iBook G4 + PowerBook6,4 + PowerBook G4 (12 inch 1.33GHz) + PowerBook6,5 + iBook G4 (Early-Late 2004) + PowerBook6,7 + iBook G4 (Mid 2005) + PowerBook6,8 + PowerBook G4 (12 inch 1.5GHz) + PowerMac1,1 + Power Macintosh G3 (Blue & White) + PowerMac1,2 + Power Macintosh G4 (PCI Graphics) + PowerMac10,1 + Mac Mini G4 + PowerMac10,2 + Mac Mini (Late 2005) + PowerMac11,2 + Power Macintosh G5 (Late 2005) + PowerMac12,1 + iMac G5 (iSight) + PowerMac2,1 + iMac G3 (Slot-loading CD-ROM) + PowerMac2,2 + iMac G3 (Summer 2000) + PowerMac3,1 + Power Macintosh G4 (AGP Graphics) + PowerMac3,2 + Power Macintosh G4 (AGP Graphics) + PowerMac3,3 + Power Macintosh G4 (Gigabit Ethernet) + PowerMac3,4 + Power Macintosh G4 (Digital Audio) + PowerMac3,5 + Power Macintosh G4 (Quick Silver) + PowerMac3,6 + Power Macintosh G4 (Mirrored Drive Door) + PowerMac4,1 + iMac G3 (Early/Summer 2001) + PowerMac4,2 + iMac G4 (Flat Panel) + PowerMac4,4 + eMac + PowerMac4,5 + iMac G4 (17-inch Flat Panel) + PowerMac5,1 + Power Macintosh G4 Cube + PowerMac6,1 + iMac G4 (USB 2.0) + PowerMac6,3 + iMac G4 (20-inch Flat Panel) + PowerMac6,4 + eMac (USB 2.0, 2005) + PowerMac7,2 + Power Macintosh G5 + PowerMac7,3 + Power Macintosh G5 + PowerMac8,1 + iMac G5 + PowerMac8,2 + iMac G5 (Ambient Light Sensor) + PowerMac9,1 + Power Macintosh G5 (Late 2005) + RackMac1,1 + Xserve G4 + RackMac1,2 + Xserve G4 (slot-loading, cluster node) + RackMac3,1 + Xserve G5 + Xserve1,1 + Xserve (Intel Xeon) + Xserve2,1 + Xserve (January 2008 quad-core) + iMac1,1 + iMac G3 (Rev A-D) + iMac4,1 + iMac (Core Duo) + iMac4,2 + iMac for Education (17-inch, Core Duo) + iMac5,1 + iMac (Core 2 Duo, 17 or 20 inch, SuperDrive) + iMac5,2 + iMac (Core 2 Duo, 17 inch, Combo Drive) + iMac6,1 + iMac (Core 2 Duo, 24 inch, SuperDrive) + iMac8,1 + iMac (April 2008) + + diff --git a/trunk/Sparkle.framework/Versions/A/Resources/SUStatus.nib/classes.nib b/trunk/Sparkle.framework/Versions/A/Resources/SUStatus.nib/classes.nib new file mode 100644 index 00000000..3c6ae83f --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Resources/SUStatus.nib/classes.nib @@ -0,0 +1,48 @@ + + + + + IBClasses + + + CLASS + NSApplication + LANGUAGE + ObjC + SUPERCLASS + NSResponder + + + CLASS + FirstResponder + LANGUAGE + ObjC + SUPERCLASS + NSObject + + + CLASS + NSObject + LANGUAGE + ObjC + + + CLASS + SUStatusController + LANGUAGE + ObjC + OUTLETS + + actionButton + NSButton + progressBar + NSProgressIndicator + + SUPERCLASS + NSWindowController + + + IBVersion + 1 + + diff --git a/trunk/Sparkle.framework/Versions/A/Resources/SUStatus.nib/info.nib b/trunk/Sparkle.framework/Versions/A/Resources/SUStatus.nib/info.nib new file mode 100644 index 00000000..4318cb1b --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Resources/SUStatus.nib/info.nib @@ -0,0 +1,20 @@ + + + + + IBFramework Version + 629 + IBLastKnownRelativeProjectPath + ../Sparkle.xcodeproj + IBOldestOS + 5 + IBOpenObjects + + 6 + + IBSystem Version + 9C31 + targetFramework + IBCocoaFramework + + diff --git a/trunk/Sparkle.framework/Versions/A/Resources/SUStatus.nib/keyedobjects.nib b/trunk/Sparkle.framework/Versions/A/Resources/SUStatus.nib/keyedobjects.nib new file mode 100644 index 00000000..4bdc9d67 Binary files /dev/null and b/trunk/Sparkle.framework/Versions/A/Resources/SUStatus.nib/keyedobjects.nib differ diff --git a/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/classes.nib new file mode 100644 index 00000000..4b1ab30e --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/classes.nib @@ -0,0 +1,50 @@ + + + + + IBClasses + + + CLASS + SUWindowController + LANGUAGE + ObjC + SUPERCLASS + NSWindowController + + + ACTIONS + + doNotInstall + id + installLater + id + installNow + id + + CLASS + SUAutomaticUpdateAlert + LANGUAGE + ObjC + SUPERCLASS + SUWindowController + + + CLASS + FirstResponder + LANGUAGE + ObjC + SUPERCLASS + NSObject + + + CLASS + NSObject + LANGUAGE + ObjC + + + IBVersion + 1 + + diff --git a/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/info.nib b/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/info.nib new file mode 100644 index 00000000..ab36d310 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/info.nib @@ -0,0 +1,20 @@ + + + + + IBFramework Version + 658 + IBLastKnownRelativeProjectPath + ../Sparkle.xcodeproj + IBOldestOS + 5 + IBOpenObjects + + 6 + + IBSystem Version + 9C7010 + targetFramework + IBCocoaFramework + + diff --git a/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 00000000..7630390c Binary files /dev/null and b/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ diff --git a/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/classes.nib b/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/classes.nib new file mode 100644 index 00000000..994d4c36 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/classes.nib @@ -0,0 +1,67 @@ + + + + + IBClasses + + + CLASS + SUWindowController + LANGUAGE + ObjC + SUPERCLASS + NSWindowController + + + CLASS + NSApplication + LANGUAGE + ObjC + SUPERCLASS + NSResponder + + + ACTIONS + + installUpdate + id + remindMeLater + id + skipThisVersion + id + + CLASS + SUUpdateAlert + LANGUAGE + ObjC + OUTLETS + + delegate + id + description + NSTextField + releaseNotesView + WebView + + SUPERCLASS + SUWindowController + + + CLASS + FirstResponder + LANGUAGE + ObjC + SUPERCLASS + NSObject + + + CLASS + NSObject + LANGUAGE + ObjC + + + IBVersion + 1 + + diff --git a/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/info.nib b/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/info.nib new file mode 100644 index 00000000..d9b82f55 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/info.nib @@ -0,0 +1,20 @@ + + + + + IBFramework Version + 649 + IBLastKnownRelativeProjectPath + ../Sparkle.xcodeproj + IBOldestOS + 5 + IBOpenObjects + + 6 + + IBSystem Version + 9C7010 + targetFramework + IBCocoaFramework + + diff --git a/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/keyedobjects.nib b/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 00000000..b3a80995 Binary files /dev/null and b/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/keyedobjects.nib differ diff --git a/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdatePermissionPrompt.nib/classes.nib b/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdatePermissionPrompt.nib/classes.nib new file mode 100644 index 00000000..5220a221 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdatePermissionPrompt.nib/classes.nib @@ -0,0 +1,59 @@ + + + + + IBClasses + + + CLASS + SUWindowController + LANGUAGE + ObjC + SUPERCLASS + NSWindowController + + + ACTIONS + + finishPrompt + id + toggleMoreInfo + id + + CLASS + SUUpdatePermissionPrompt + LANGUAGE + ObjC + OUTLETS + + delegate + id + descriptionTextField + NSTextField + moreInfoButton + NSButton + moreInfoView + NSView + + SUPERCLASS + SUWindowController + + + CLASS + FirstResponder + LANGUAGE + ObjC + SUPERCLASS + NSObject + + + CLASS + NSObject + LANGUAGE + ObjC + + + IBVersion + 1 + + diff --git a/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdatePermissionPrompt.nib/info.nib b/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdatePermissionPrompt.nib/info.nib new file mode 100644 index 00000000..cee1fbcc --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdatePermissionPrompt.nib/info.nib @@ -0,0 +1,21 @@ + + + + + IBFramework Version + 644 + IBLastKnownRelativeProjectPath + ../../Sparkle.xcodeproj + IBOldestOS + 5 + IBOpenObjects + + 6 + 42 + + IBSystem Version + 9C7010 + targetFramework + IBCocoaFramework + + diff --git a/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib b/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib new file mode 100644 index 00000000..6df9ce74 Binary files /dev/null and b/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib differ diff --git a/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/Sparkle.strings b/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/Sparkle.strings new file mode 100644 index 00000000..34cf8170 Binary files /dev/null and b/trunk/Sparkle.framework/Versions/A/Resources/en.lproj/Sparkle.strings differ diff --git a/trunk/Sparkle.framework/Versions/A/Resources/relaunch b/trunk/Sparkle.framework/Versions/A/Resources/relaunch new file mode 100755 index 00000000..91525fe6 Binary files /dev/null and b/trunk/Sparkle.framework/Versions/A/Resources/relaunch differ diff --git a/trunk/Sparkle.framework/Versions/A/Sparkle b/trunk/Sparkle.framework/Versions/A/Sparkle new file mode 100755 index 00000000..05c8dab2 Binary files /dev/null and b/trunk/Sparkle.framework/Versions/A/Sparkle differ diff --git a/trunk/Sparkle.framework/Versions/A/relaunch.app/Contents/Info.plist b/trunk/Sparkle.framework/Versions/A/relaunch.app/Contents/Info.plist new file mode 100644 index 00000000..150493ef --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/relaunch.app/Contents/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + relaunch + CFBundleIdentifier + org.andymatuschak.Sparkle.relaunch + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.5 + NSPrincipalClass + NSApplication + NSUIElement + 1 + + diff --git a/trunk/Sparkle.framework/Versions/A/relaunch.app/Contents/MacOS/relaunch b/trunk/Sparkle.framework/Versions/A/relaunch.app/Contents/MacOS/relaunch new file mode 100755 index 00000000..45b57f0d Binary files /dev/null and b/trunk/Sparkle.framework/Versions/A/relaunch.app/Contents/MacOS/relaunch differ diff --git a/trunk/Sparkle.framework/Versions/A/relaunch.app/Contents/PkgInfo b/trunk/Sparkle.framework/Versions/A/relaunch.app/Contents/PkgInfo new file mode 100644 index 00000000..bd04210f --- /dev/null +++ b/trunk/Sparkle.framework/Versions/A/relaunch.app/Contents/PkgInfo @@ -0,0 +1 @@ +APPL???? \ No newline at end of file diff --git a/trunk/Sparkle.framework/Versions/Current b/trunk/Sparkle.framework/Versions/Current new file mode 120000 index 00000000..8c7e5a66 --- /dev/null +++ b/trunk/Sparkle.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/trunk/Sparkle.framework/relaunch.app b/trunk/Sparkle.framework/relaunch.app new file mode 120000 index 00000000..d2b01a5e --- /dev/null +++ b/trunk/Sparkle.framework/relaunch.app @@ -0,0 +1 @@ +Versions/Current/relaunch.app \ No newline at end of file diff --git a/trunk/TableContent.h b/trunk/TableContent.h new file mode 100644 index 00000000..3115a1a6 --- /dev/null +++ b/trunk/TableContent.h @@ -0,0 +1,136 @@ +// +// TableDocument.h +// sequel-pro +// +// Created by lorenz textor (lorenz@textor.ch) on Wed May 01 2002. +// Copyright (c) 2002-2003 Lorenz Textor. All rights reserved. +// +// Forked by Abhi Beckert (abhibeckert.com) 2008-04-04 +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at + + +#import +#import +#import "CMCopyTable.h" +#import "CMMCPConnection.h" +#import "CMMCPResult.h" + + +@interface TableContent : NSObject { + + IBOutlet id tableDocumentInstance; + IBOutlet id tablesListInstance; + IBOutlet id tableSourceInstance; + + IBOutlet id tableWindow; + IBOutlet CMCopyTable *tableContentView; + IBOutlet id editSheet; + IBOutlet id editImage; + IBOutlet id editTextView; + IBOutlet id hexTextView; + IBOutlet id fieldField; + IBOutlet id compareField; + IBOutlet id argumentField; + IBOutlet id filterButton; + IBOutlet id addButton; + IBOutlet id copyButton; + IBOutlet id removeButton; + IBOutlet id multipleLineEditingButton; + IBOutlet id countText; + IBOutlet id limitRowsField; + IBOutlet id limitRowsButton; + IBOutlet id limitRowsStepper; + IBOutlet id limitRowsText; + + CMMCPConnection *mySQLConnection; + + id editData; + NSString *selectedTable; + NSMutableArray *fullResult, *filteredResult, *keys; + NSMutableDictionary *oldRow; + NSArray *fieldNames, *fieldTypes; + NSString *compareType, *sortField; + BOOL isEditingRow, isEditingNewRow, isDesc, setLimit; + NSUserDefaults *prefs; + int numRows; + bool areShowingAllRows; + +} + +//table methods +- (void)loadTable:(NSString *)aTable; +- (IBAction)reloadTable:(id)sender; +- (IBAction)reloadTableValues:(id)sender; +- (IBAction)filterTable:(id)sender; +- (IBAction)showAll:(id)sender; + +//edit methods +- (IBAction)addRow:(id)sender; +- (IBAction)copyRow:(id)sender; +- (IBAction)removeRow:(id)sender; + +//editSheet methods +- (IBAction)closeEditSheet:(id)sender; +- (IBAction)openEditSheet:(id)sender; +- (IBAction)saveEditSheet:(id)sender; +- (IBAction)dropImage:(id)sender; +- (void)textDidChange:(NSNotification *)notification; +- (NSString *)dataToHex:(NSData *)data; + +//getter methods +- (NSArray *)currentResult; + +//additional methods +- (void)setConnection:(CMMCPConnection *)theConnection; +- (IBAction)setCompareTypes:(id)sender; +- (IBAction)stepLimitRows:(id)sender; +- (NSArray *)fetchResultAsArray:(CMMCPResult *)theResult; +- (BOOL)addRowToDB; +- (NSString *)argumentForRow:(int)row; +- (BOOL)isBlobOrText:(NSString *)fieldType; +- (NSString *)fieldListForQuery; +- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo; +- (int)getNumberOfRows; +- (int)fetchNumberOfRows; + +//tableView datasource methods +- (int)numberOfRowsInTableView:(NSTableView *)aTableView; +- (id)tableView:(NSTableView *)aTableView +objectValueForTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex; +- (void)tableView:(NSTableView *)aTableView + setObjectValue:(id)anObject + forTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex; + +//tableView delegate methods +- (void)tableView:(NSTableView*)tableView didClickTableColumn:(NSTableColumn *)tableColumn; +- (BOOL)selectionShouldChangeInTableView:(NSTableView *)aTableView; +- (void)tableViewColumnDidResize:(NSNotification *)aNotification; +- (BOOL)tableView:(NSTableView *)aTableView shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex; +- (BOOL)tableView:(NSTableView *)tableView writeRows:(NSArray*)rows toPasteboard:(NSPasteboard*)pboard; +- (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)command; + +//textView delegate methods +- (BOOL)textView:(NSTextView *)aTextView doCommandBySelector:(SEL)aSelector; + +//last but not least +- (id)init; +- (void)dealloc; + +@end diff --git a/trunk/TableContent.m b/trunk/TableContent.m new file mode 100644 index 00000000..70775a11 --- /dev/null +++ b/trunk/TableContent.m @@ -0,0 +1,1910 @@ +// +// TableDocument.h +// sequel-pro +// +// Created by lorenz textor (lorenz@textor.ch) on Wed May 01 2002. +// Copyright (c) 2002-2003 Lorenz Textor. All rights reserved. +// +// Forked by Abhi Beckert (abhibeckert.com) 2008-04-04 +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at + +#import "TableContent.h" +#import "TableDocument.h" +#import "TablesList.h" +#import "TableSource.h" +#import "CMImageView.h" + + +@implementation TableContent + +- (id)init +{ + if (![super init]) + return nil; + + fullResult = [[NSMutableArray alloc] init]; + filteredResult = [[NSMutableArray alloc] init]; + oldRow = [[NSMutableDictionary alloc] init]; + areShowingAllRows = false; + + return self; +} + +- (void)awakeFromNib +{ +} + +- (void)loadTable:(NSString *)aTable +/* + loads aTable, put it in an array, update the tableViewColumns and reload the tableView + */ +{ + int i; + NSNumber *colWidth; + NSArray *theColumns; + NSTableColumn *theCol; + // NSNumberFormatter *numberFormatter; + NSString *query; + CMMCPResult *queryResult; + + selectedTable = aTable; + [tableContentView deselectAll:self]; + if ( isEditingRow ) + return; + + //query started + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self]; + + [limitRowsField setStringValue:@"1"]; + + //reset keys + if ( keys ) { + keys = nil; + } + + [tableContentView scrollRowToVisible:0]; + [tableContentView scrollColumnToVisible:0]; + + if ( [aTable isEqualToString:@""] || !aTable ) { + //no table selected + //free tableView + theColumns = [tableContentView tableColumns]; + while ([theColumns count]) { + [tableContentView removeTableColumn:[theColumns objectAtIndex:0]]; + } + // theCol = [[NSTableColumn alloc] initWithIdentifier:@""]; + // [[theCol headerCell] setStringValue:@""]; + // [tableContentView addTableColumn:theCol]; + // [tableContentView sizeLastColumnToFit]; + [fullResult removeAllObjects]; + [filteredResult removeAllObjects]; + [tableContentView reloadData]; + // [theCol release]; + + //disable filter options + [fieldField setEnabled:NO]; + [fieldField removeAllItems]; + [fieldField addItemWithTitle:NSLocalizedString(@"field", @"popup menuitem for field (showing only if disabled)")]; + [compareField setEnabled:NO]; + [compareField removeAllItems]; + [compareField addItemWithTitle:NSLocalizedString(@"is", @"popup menuitem for field IS value")]; + [argumentField setEnabled:NO]; + [argumentField setStringValue:@""]; + [filterButton setEnabled:NO]; + areShowingAllRows = YES; + + //disable limit fields + if ( [prefs boolForKey:@"limitRows"] ) { + [limitRowsText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Limited to %d rows starting with row", @"text showing the number of rows the result is limited to"), + [prefs integerForKey:@"limitRowsValue"]]]; + } else { + [limitRowsField setStringValue:@""]; + [limitRowsText setStringValue:NSLocalizedString(@"No limit", @"text showing that the result isn't limited")]; + } + [limitRowsField setEnabled:NO]; + [limitRowsButton setEnabled:NO]; + [limitRowsStepper setEnabled:NO]; + + //disable buttons + [addButton setEnabled:NO]; + [copyButton setEnabled:NO]; + [removeButton setEnabled:NO]; + + [countText setStringValue:@""]; + + //query finished + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self]; + + return; + } + + //make a fast query to get fieldNames and fieldTypes (used in fieldListForQuery method) + queryResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SELECT * FROM `%@` LIMIT 0", selectedTable]]; + fieldTypes = [[queryResult fetchTypesAsArray] retain]; + fieldNames = [[queryResult fetchFieldNames] retain]; + + //perform query and load result in array (each row as a dictionary) + // queryResult = [mySQLConnection queryString:[@"SELECT * FROM " stringByAppendingString:selectedTable]]; + query = [NSString stringWithFormat:@"SELECT %@ FROM `%@`", [self fieldListForQuery], selectedTable]; + if ( [prefs boolForKey:@"limitRows"] ) { + if ( [limitRowsField intValue] <= 0 ) { + [limitRowsField setStringValue:@"1"]; + } + query = [query stringByAppendingString: + [NSString stringWithFormat:@" LIMIT %d,%d", + [limitRowsField intValue]-1, [prefs integerForKey:@"limitRowsValue"]]]; + } + // [queryResult release]; + queryResult = [mySQLConnection queryString:query]; + // [fullResult setArray:[[self fetchResultAsArray:queryResult] retain]]; + [fullResult setArray:[self fetchResultAsArray:queryResult]]; + [filteredResult setArray:fullResult]; + // fieldTypes = [[queryResult fetchTypesAsArray] retain]; + // fieldNames = [[queryResult fetchFieldNames] retain]; + + //set count text + numRows = [self getNumberOfRows]; + [countText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%d rows in table", @"text showing how many rows are in the result"), numRows]]; + + //clear sorting + sortField = nil; + isDesc = NO; + + if ( queryResult == nil ) { + NSLog(@"Loading table %@ failed, query string was: %@", aTable, query); + return; + } + + //enable and initialize filter fields (with tags for position of menu item and field position) + [fieldField setEnabled:YES]; + [fieldField removeAllItems]; + [fieldField addItemsWithTitles:fieldNames]; + for ( i = 0 ; i < [fieldField numberOfItems] ; i++ ) { + [[fieldField itemAtIndex:i] setTag:i]; + } + [compareField setEnabled:YES]; + [self setCompareTypes:self]; + [argumentField setEnabled:YES]; + [argumentField setStringValue:@""]; + [filterButton setEnabled:YES]; + areShowingAllRows = YES; + + //enable or disable limit fields + if ( [prefs boolForKey:@"limitRows"] ) { + [limitRowsField setEnabled:YES]; + [limitRowsButton setEnabled:YES]; + [limitRowsStepper setEnabled:YES]; + [limitRowsText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Limited to %d rows starting with row", @"text showing the number of rows the result is limited to"), + [prefs integerForKey:@"limitRowsValue"]]]; + } else { + [limitRowsField setEnabled:NO]; + [limitRowsButton setEnabled:NO]; + [limitRowsStepper setEnabled:NO]; + [limitRowsField setStringValue:@""]; + [limitRowsText setStringValue:NSLocalizedString(@"No limit", @"text showing that the result isn't limited")]; + } + + //enable buttons + [addButton setEnabled:YES]; + [copyButton setEnabled:YES]; + [removeButton setEnabled:YES]; + + //set columns + //remove all columns from table + theColumns = [tableContentView tableColumns]; + i=0; + while ([theColumns count]) { + [tableContentView removeTableColumn:[theColumns objectAtIndex:0]]; + i++; + } + + //add columns, corresponding to the query result + theColumns = fieldNames; + for ( i = 0 ; i < [theColumns count] ; i++ ) { + theCol = [[NSTableColumn alloc] initWithIdentifier:[theColumns objectAtIndex:i]]; + [theCol setEditable:YES]; + if ( [theCol respondsToSelector:@selector(setResizingMask:)] ) { + // os 10.4 + [theCol setResizingMask:NSTableColumnUserResizingMask]; + } else { + // os pre-10.4 + [theCol setResizable:YES]; + } + NSComboBoxCell *dataCell; + if ( [[tableSourceInstance enumFields] objectForKey:[theColumns objectAtIndex:i]] ) { + dataCell = [[[NSComboBoxCell alloc] initTextCell:@""] autorelease]; + [dataCell setButtonBordered:NO]; + [dataCell setBezeled:NO]; + [dataCell setDrawsBackground:NO]; + [dataCell setCompletes:YES]; + [dataCell setControlSize:NSSmallControlSize]; + [dataCell addItemWithObjectValue:@"NULL"]; + [dataCell addItemsWithObjectValues:[[tableSourceInstance enumFields] objectForKey:[theColumns objectAtIndex:i]]]; + } else { + dataCell = [[[NSTextFieldCell alloc] initTextCell:@""] autorelease]; + } + [dataCell setEditable:YES]; + // [[theCol dataCell] setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; + if ( [prefs boolForKey:@"useMonospacedFonts"] ) { + // [[theCol dataCell] setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]]; + [dataCell setFont:[NSFont fontWithName:@"Monaco" size:10]]; + } else { + [dataCell setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; + } + if ( [dataCell respondsToSelector:@selector(setLineBreakMode:)] ) { + // os 10.4 + [dataCell setLineBreakMode:NSLineBreakByTruncatingTail]; + } + [theCol setDataCell:dataCell]; + //set date and number formatters + /* + if ([[fieldTypes objectAtIndex:i] isEqualToString:@"timestamp"]) { + [[theCol dataCell] setFormatter:[[NSDateFormatter alloc] + initWithDateFormat:@"%Y-%m-%d %H:%M:%S" allowNaturalLanguage:YES]]; + } + if ([[fieldTypes objectAtIndex:i] isEqualToString:@"datetime"]) { + [[theCol dataCell] setFormatter:[[NSDateFormatter alloc] initWithDateFormat:@"%Y-%m-%d %H:%M:%S" allowNaturalLanguage:YES]]; + } + if ([[fieldTypes objectAtIndex:i] isEqualToString:@"date"]) { + [[theCol dataCell] setFormatter:[[NSDateFormatter alloc] initWithDateFormat:@"%Y-%m-%d" allowNaturalLanguage:YES]]; + } + if ([[fieldTypes objectAtIndex:i] isEqualToString:@"time"]) { + [[theCol dataCell] setFormatter:[[NSDateFormatter alloc] initWithDateFormat:@"%H:%M:%S" allowNaturalLanguage:YES]]; + } + if ([[fieldTypes objectAtIndex:i] isEqualToString:@"year"]) { + [[theCol dataCell] setFormatter:[[NSDateFormatter alloc] initWithDateFormat:@"%Y" allowNaturalLanguage:YES]]; + } + if ([[fieldTypes objectAtIndex:i] isEqualToString:@"tiny"] || [[fieldTypes objectAtIndex:i] isEqualToString:@"short"] + || [[fieldTypes objectAtIndex:i] isEqualToString:@"long"] || [[fieldTypes objectAtIndex:i] isEqualToString:@"int24"] + || [[fieldTypes objectAtIndex:i] isEqualToString:@"longlong"] ) { + numberFormatter = [[[NSNumberFormatter alloc] init] autorelease]; + [numberFormatter setFormat:@"0"]; + [numberFormatter setAttributedStringForNil:[[NSAttributedString alloc] initWithString:[prefs stringForKey:@"nullValue"]]]; + [numberFormatter setAllowsFloats:NO]; + [[theCol dataCell] setFormatter:numberFormatter]; + } + if ( [[fieldTypes objectAtIndex:i] isEqualToString:@"decimal"] || [[fieldTypes objectAtIndex:i] isEqualToString:@"float"] + || [[fieldTypes objectAtIndex:i] isEqualToString:@"double"] ) { + numberFormatter = [[[NSNumberFormatter alloc] init] autorelease]; + //here we should allow any number of decimal values (after the comma) + //problem with float-numbers like 2.13231e+08 + //double numbers doesn't have all decimal values + //-> bugs in the framework? + [numberFormatter setFormat:@"0.####################"]; + [numberFormatter setAttributedStringForNil:[[NSAttributedString alloc] initWithString:[prefs stringForKey:@"nullValue"]]]; + [[theCol dataCell] setFormatter:numberFormatter]; + } + */ + [[theCol headerCell] setStringValue:[theColumns objectAtIndex:i]]; + // set width of column to saved value if exists + colWidth = [[[[prefs objectForKey:@"tableColumnWidths"] objectForKey:[NSString stringWithFormat:@"%@@%@", [tableDocumentInstance database], [tableDocumentInstance host]]] objectForKey:[tablesListInstance table]] objectForKey:[theColumns objectAtIndex:i]]; + if ( colWidth ) { + [theCol setWidth:[colWidth floatValue]]; + } + [tableContentView addTableColumn:theCol]; + [theCol release]; + } + + // [tableContentView sizeLastColumnToFit]; + //tries to fix problem with last row (otherwise to small) + //sets last column to width of the first if smaller than 30 + //problem not fixed for resizing window + // if ( [[tableContentView tableColumnWithIdentifier:[theColumns objectAtIndex:[theColumns count]-1]] width] < 30 ) + // [[tableContentView tableColumnWithIdentifier:[theColumns objectAtIndex:[theColumns count]-1]] + // setWidth:[[tableContentView tableColumnWithIdentifier:[theColumns objectAtIndex:0]] width]]; + + [tableContentView reloadData]; + + //query finished + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self]; +} + +- (IBAction)reloadTable:(id)sender +/* + reloads the table (performing a new mysql-query) + */ +{ + [self loadTable:selectedTable]; +} + +- (IBAction)reloadTableValues:(id)sender +/* + reload the table values without reconfiguring the tableView (with filter and limit if set) + */ +{ + NSString *queryString; + CMMCPResult *queryResult; + + //query started + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self]; + + //enable or disable limit fields + if ( [prefs boolForKey:@"limitRows"] ) { + [limitRowsField setEnabled:YES]; + [limitRowsButton setEnabled:YES]; + [limitRowsStepper setEnabled:YES]; + [limitRowsText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Limited to %d rows starting with row", @"text showing the number of rows the result is limited to"), + [prefs integerForKey:@"limitRowsValue"]]]; + } else { + [limitRowsField setEnabled:NO]; + [limitRowsButton setEnabled:NO]; + [limitRowsStepper setEnabled:NO]; + [limitRowsText setStringValue:NSLocalizedString(@"No limit", @"text showing that the result isn't limited")]; + [limitRowsField setStringValue:@""]; + } + + // queryString = [@"SELECT * FROM " stringByAppendingString:selectedTable]; + queryString = [NSString stringWithFormat:@"SELECT %@ FROM `%@`", [self fieldListForQuery], selectedTable]; + if ( sortField ) { + queryString = [NSString stringWithFormat:@"%@ ORDER BY `%@`", queryString, sortField]; + // queryString = [queryString stringByAppendingString:[NSString stringWithFormat:@" ORDER BY `%@`", sortField]]; + if ( isDesc ) + queryString = [queryString stringByAppendingString:@" DESC"]; + } + if ( [prefs boolForKey:@"limitRows"] ) { + if ( [limitRowsField intValue] <= 0 ) { + [limitRowsField setStringValue:@"1"]; + } + queryString = [queryString stringByAppendingString: + [NSString stringWithFormat:@" LIMIT %d,%d", + [limitRowsField intValue]-1, [prefs integerForKey:@"limitRowsValue"]]]; + [limitRowsField selectText:self]; + } + queryResult = [mySQLConnection queryString:queryString]; + // [fullResult setArray:[[self fetchResultAsArray:queryResult] retain]]; + [fullResult setArray:[self fetchResultAsArray:queryResult]]; + numRows = [self getNumberOfRows]; + if ( !areShowingAllRows ) { + [self filterTable:self]; + [countText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%d rows of %d selected", @"text showing how many rows are in the filtered result"), [filteredResult count], numRows]]; + } else { + [filteredResult setArray:fullResult]; + [countText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%d rows in table", @"text showing how many rows are in the result"), numRows]]; + } + [tableContentView reloadData]; + + //query finished + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self]; +} + +/** + * filter the table with arguments given by the user + */ +- (IBAction)filterTable:(id)sender +{ + CMMCPResult *theResult; + int tag = [[compareField selectedItem] tag]; + NSString *compareOperator = @""; + NSMutableString *argument = [[NSMutableString alloc] initWithString:[argumentField stringValue]]; + NSString *queryString; + int i; + + if ([argument length] == 0) { + [argument release]; + [self showAll:sender]; + return; + } + + //query started + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self]; + + BOOL doQuote = YES; + + if ( ![compareType isEqualToString:@""] ) { + if ( [compareType isEqualToString:@"string"] ) { + //string comparision + switch ( tag ) { + case 0: + compareOperator = @"LIKE"; + break; + case 1: + compareOperator = @"NOT LIKE"; + break; + case 2: + compareOperator = @"LIKE"; + [argument setString:[[@"%" stringByAppendingString:argument] stringByAppendingString:@"%"]]; + break; + case 3: + compareOperator = @"NOT LIKE"; + [argument setString:[[@"%" stringByAppendingString:argument] stringByAppendingString:@"%"]]; + break; + case 4: + compareOperator = @"IN"; + doQuote = NO; + [argument setString:[[@"(" stringByAppendingString:argument] stringByAppendingString:@")"]]; + break; + } + } else if ( [compareType isEqualToString:@"number"] ) { + //number comparision + switch ( tag ) { + case 0: + compareOperator = @"="; + break; + case 1: + compareOperator = @"!="; + break; + case 2: + compareOperator = @">"; + break; + case 3: + compareOperator = @"<"; + break; + case 4: + compareOperator = @">="; + break; + case 5: + compareOperator = @"<="; + break; + case 6: + compareOperator = @"IN"; + doQuote = NO; + [argument setString:[[@"(" stringByAppendingString:argument] stringByAppendingString:@")"]]; + break; + } + } else if ( [compareType isEqualToString:@"date"] ) { + //date comparision + switch ( tag ) { + case 0: + compareOperator = @"="; + break; + case 1: + compareOperator = @"!="; + break; + case 2: + compareOperator = @"<"; + break; + case 3: + compareOperator = @">"; + break; + case 4: + compareOperator = @"<="; + break; + case 5: + compareOperator = @">="; + break; + } + } + + // queryString = [NSString stringWithFormat:@"SELECT %@ FROM `%@` WHERE `%@` %@ '%@'", + // [self fieldListForQuery], selectedTable, [fieldField titleOfSelectedItem], + // compareOperator, argument]; + if (doQuote) { + //escape special characters + for ( i = 0 ; i < [argument length] ; i++ ) { + if ( [argument characterAtIndex:i] == '\\' ) { + [argument insertString:@"\\" atIndex:i]; + i++; + } + } + [argument setString:[mySQLConnection prepareString:argument]]; + queryString = [NSString stringWithFormat:@"SELECT %@ FROM `%@` WHERE `%@` %@ \"%@\"", + [self fieldListForQuery], selectedTable, [fieldField titleOfSelectedItem], + compareOperator, argument]; + } else { + queryString = [NSString stringWithFormat:@"SELECT %@ FROM `%@` WHERE `%@` %@ %@", + [self fieldListForQuery], selectedTable, [fieldField titleOfSelectedItem], + compareOperator, argument]; + } + if ( sortField ) { + // queryString = [queryString stringByAppendingString:[NSString stringWithFormat:@" ORDER BY `%@`", sortField]]; + queryString = [NSString stringWithFormat:@"%@ ORDER BY `%@`", queryString, sortField]; + if ( isDesc ) + queryString = [queryString stringByAppendingString:@" DESC"]; + } + if ( [prefs boolForKey:@"limitRows"] ) { + if ( [limitRowsField intValue] <= 0 ) { + [limitRowsField setStringValue:@"1"]; + } + queryString = [queryString stringByAppendingString: + [NSString stringWithFormat:@" LIMIT %d,%d", + [limitRowsField intValue]-1, [prefs integerForKey:@"limitRowsValue"]]]; + } + } else { + NSLog(@"ERROR: unknown compare type %@", compareType); + queryString = @""; + } + + theResult = [mySQLConnection queryString:queryString]; + [filteredResult setArray:[self fetchResultAsArray:theResult]]; + + [countText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%d rows of %d selected", @"text showing how many rows are in the filtered result"), [filteredResult count], numRows]]; + + [tableContentView reloadData]; + areShowingAllRows = NO; + + //query finished + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self]; + [argument release]; +} + +/** + * reload tableView with all results shown (no new mysql-query, it uses simply the fullResult array) + */ +- (IBAction)showAll:(id)sender +{ + [filteredResult setArray:fullResult]; + [tableContentView reloadData]; + areShowingAllRows = YES; + + [countText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%d rows in table", @"text showing how many rows are in the result"), numRows]]; +} + + +//edit methods +- (IBAction)addRow:(id)sender +/* + adds an empty row to the table-array and goes into edit mode + */ +{ + NSMutableDictionary *newRow = [NSMutableDictionary dictionary]; + int i; + + if ( ![self selectionShouldChangeInTableView:nil] ) + return; + + for ( i = 0 ; i < [fieldNames count] ; i++ ) { + // [newRow setObject:[prefs stringForKey:@"nullValue"] forKey:[fieldNames objectAtIndex:i]]; + [newRow setObject:[tableSourceInstance defaultValueForField:[fieldNames objectAtIndex:i]] + forKey:[fieldNames objectAtIndex:i]]; + } + [filteredResult addObject:newRow]; + + isEditingRow = YES; + isEditingNewRow = YES; + [tableContentView reloadData]; + [tableContentView selectRow:[tableContentView numberOfRows]-1 byExtendingSelection:NO]; + if ( [multipleLineEditingButton state] == NSOffState ) + [tableContentView editColumn:0 row:[tableContentView numberOfRows]-1 withEvent:nil select:YES]; +} + +- (IBAction)copyRow:(id)sender +/* + copies a row of the table-array and goes into edit mode + */ +{ + NSMutableDictionary *tempRow; + CMMCPResult *queryResult; + NSDictionary *row; + int i; + + if ( ![self selectionShouldChangeInTableView:nil] ) + return; + if ( [tableContentView numberOfSelectedRows] < 1 ) + return; + if ( [tableContentView numberOfSelectedRows] > 1 ) { + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, NSLocalizedString(@"You can only copy single rows.", @"message of panel when trying to copy multiple rows")); + return; + } + + //copy row + tempRow = [NSMutableDictionary dictionaryWithDictionary:[filteredResult objectAtIndex:[tableContentView selectedRow]]]; + [filteredResult insertObject:tempRow atIndex:[tableContentView selectedRow]+1]; + isEditingRow = YES; + isEditingNewRow = YES; + //set autoincrement fields to NULL + queryResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SHOW COLUMNS FROM `%@`", selectedTable]]; + for ( i = 0 ; i < [queryResult numOfRows] ; i++ ) { + [queryResult dataSeek:i]; + row = [queryResult fetchRowAsDictionary]; + if ( [[row objectForKey:@"Extra"] isEqualToString:@"auto_increment"] ) { + [tempRow setObject:[prefs stringForKey:@"nullValue"] forKey:[row objectForKey:@"Field"]]; + } + } + //select row and go in edit mode + [tableContentView reloadData]; + [tableContentView selectRow:[tableContentView selectedRow]+1 byExtendingSelection:NO]; + if ( [multipleLineEditingButton state] == NSOffState ) + [tableContentView editColumn:0 row:[tableContentView selectedRow] withEvent:nil select:YES]; +} + +- (IBAction)removeRow:(id)sender +/* + asks user if he really wants to delete the selected rows + */ +{ + if ( ![self selectionShouldChangeInTableView:nil] ) + return; + if ( ![tableContentView numberOfSelectedRows] ) + return; + /* + if ( ([tableContentView numberOfSelectedRows] == [self numberOfRowsInTableView:tableContentView]) && + areShowingAllRows && + (![prefs boolForKey:@"limitRows"] || ([tableContentView numberOfSelectedRows] < [prefs integerForKey:@"limitRowsValue"])) ) { + */ + if ( ([tableContentView numberOfSelectedRows] == [tableContentView numberOfRows]) && + (([prefs boolForKey:@"limitRows"] && [tableContentView numberOfSelectedRows] == [self fetchNumberOfRows]) || + (![prefs boolForKey:@"limitRows"] && [tableContentView numberOfSelectedRows] == [self getNumberOfRows])) ) { + NSBeginAlertSheet(NSLocalizedString(@"Warning", @"warning"), NSLocalizedString(@"Delete", @"delete button"), NSLocalizedString(@"Cancel", @"cancel button"), nil, tableWindow, self, @selector(sheetDidEnd:returnCode:contextInfo:), + nil, @"removeallrows", NSLocalizedString(@"Do you really want to delete all rows?", @"message of panel asking for confirmation for deleting all rows")); + } else if ( [tableContentView numberOfSelectedRows] == 1 ) { + NSBeginAlertSheet(NSLocalizedString(@"Warning", @"warning"), NSLocalizedString(@"Delete", @"delete button"), NSLocalizedString(@"Cancel", @"cancel button"), nil, tableWindow, self, @selector(sheetDidEnd:returnCode:contextInfo:), + nil, @"removerow", NSLocalizedString(@"Do you really want to delete the selected row?", @"message of panel asking for confirmation for deleting the selected row")); + } else { + NSBeginAlertSheet(NSLocalizedString(@"Warning", @"warning"), NSLocalizedString(@"Delete", @"delete button"), NSLocalizedString(@"Cancel", @"cancel button"), nil, tableWindow, self, @selector(sheetDidEnd:returnCode:contextInfo:), + nil, @"removerow", + [NSString stringWithFormat:NSLocalizedString(@"Do you really want to delete the selected %d rows?", @"message of panel asking for confirmation for deleting the selected rows"), [tableContentView numberOfSelectedRows]]); + } +} + + +//editSheet methods +- (IBAction)closeEditSheet:(id)sender +{ + [NSApp stopModalWithCode:[sender tag]]; +} + +- (IBAction)openEditSheet:(id)sender +/* + loads a file into the editSheet + */ +{ + NSOpenPanel *panel = [NSOpenPanel openPanel]; + + if ( [panel runModal] == NSOKButton ) { + NSString *fileName = [panel filename]; + + // free old data + if ( editData != nil ) { + [editData release]; + } + + // load new data/images + editData = [[NSData alloc] initWithContentsOfFile:fileName]; + NSImage *image = [[[NSImage alloc] initByReferencingFile:fileName] autorelease]; + NSString *contents = [[NSString stringWithContentsOfFile:fileName] autorelease]; + + // set the image preview, string contents and hex representation + [editImage setImage:image]; + [editTextView setString:contents]; + [hexTextView setString:[self dataToHex:editData]]; + } +} + +- (IBAction)saveEditSheet:(id)sender +/* + saves a file containing the content of the editSheet + */ +{ + NSSavePanel *panel = [NSSavePanel savePanel]; + + if ( [panel runModal] == NSOKButton ) { + NSString *fileName = [panel filename]; + NSString *data; + + if ( [editData isKindOfClass:[NSData class]] ) { + data = editData; + } else { + data = [editData description]; + } + if ( [editData respondsToSelector:@selector(writeToFile:atomically:encoding:error:)] ) { + // mac os 10.4 or later + [editData writeToFile:fileName atomically:YES encoding:[CMMCPConnection encodingForMySQLEncoding:[(NSString *)[tableDocumentInstance encoding] cString]] error:NULL]; + } else { + // mac os pre 10.4 + [editData writeToFile:fileName atomically:YES]; + } + } +} + +- (IBAction)dropImage:(id)sender +/* + invoked when user drag&drops image on imageView + */ +{ + // load new data/images + if (nil != editData) + { + [editData release]; + } + editData = [[[NSData alloc] initWithContentsOfFile:[sender draggedFilePath]] retain]; + NSString *contents = [NSString stringWithContentsOfFile:[sender draggedFilePath]]; + + // set the string contents and hex representation + [editTextView setString:contents]; + [hexTextView setString:[self dataToHex:editData]]; +} + +- (void)textDidChange:(NSNotification *)notification +/* + invoked when the user changes the string in the editSheet + */ +{ + // clear the image and hex (since i doubt someone can "type" a gif) + [editImage setImage:nil]; + [hexTextView setString:@""]; + + // free old data + if ( editData != nil ) { + [editData release]; + } + + // set edit data to text + editData = [[editTextView string] retain]; +} + +- (NSString *)dataToHex:(NSData *)data +/* + returns the hex representation of the given data + */ +{ + unsigned i; + unsigned totalLength = [data length]; + int bytesPerLine = 16; + NSMutableString *retVal = [NSMutableString string]; + unsigned char *nodisplay = "\t\n\r\f"; + + // get the length of the longest location + int longest = [(NSString *)[NSString stringWithFormat:@"%X", totalLength - ( totalLength % bytesPerLine )] length]; + + for ( i = 0; i < totalLength; i += bytesPerLine ) { + int j; + NSMutableString *hex = [[NSMutableString alloc] initWithCapacity:(3 * bytesPerLine - 1)]; + NSMutableString *location = [[NSMutableString alloc] initWithCapacity:(longest + 2)]; + NSMutableString *chars = [[NSMutableString alloc] init]; + unsigned char *buffer; + int buffLength = bytesPerLine; + + // add hex value of location + [location appendString:[NSString stringWithFormat:@"%X", i]]; + + // pad it + while( longest > [location length] ) { + [location insertString:@"0" atIndex:0]; + } + + // get the chars from the NSData obj + if ( i + buffLength >= totalLength ) { + buffLength = totalLength - i; + } + buffer = (unsigned char*) malloc( sizeof( unsigned char ) * buffLength ); + NSRange range = { i, buffLength }; + [data getBytes:buffer range:range]; + + // build the hex string + for ( j = 0; j < buffLength; j++ ) { + unsigned char byte = *(buffer + j); + if ( byte < 16 ) { + [hex appendString:@"0"]; + } + [hex appendString:[NSString stringWithFormat:@"%X", byte]]; + [hex appendString:@" "]; + + // if the char is undisplayable, replace it with "." + unsigned char current; + int count = 0; + while ( ( current = *(nodisplay + count++) ) > 0 ) { + if ( current == byte ) { + *(buffer + j) = '.'; + break; + } + } + } + + // add padding to missing hex values. + for ( j = 0; j < bytesPerLine - buffLength; j++ ) { + [hex appendString:@" "]; + } + + // remove extra ghost characters + [chars appendString:[NSString stringWithCString:buffer]]; + if ( [chars length] > bytesPerLine ) { + [chars deleteCharactersInRange:NSMakeRange( bytesPerLine, [chars length] - bytesPerLine )]; + } + + // build line + [retVal appendString:location]; + [retVal appendString:@" "]; + [retVal appendString:hex]; + [retVal appendString:@" "]; + [retVal appendString:chars]; + [retVal appendString:@"\n"]; + + // clean up + [hex release]; + [chars release]; + [location release]; + free( buffer ); + } + + return retVal; +} + +//getter methods +- (NSArray *)currentResult +/* + returns the current result (as shown in table content view) as array, the first object containing the field names as array, the following objects containing the rows as array + */ +{ + NSArray *tableColumns; + NSEnumerator *enumerator; + id tableColumn; + NSMutableArray *currentResult = [NSMutableArray array]; + NSMutableArray *tempRow = [NSMutableArray array]; + int i; + + //load table if not already done + if ( ![tablesListInstance contentLoaded] ) { + [self loadTable:(NSString *)[tablesListInstance table]]; + } + + tableColumns = [tableContentView tableColumns]; + enumerator = [tableColumns objectEnumerator]; + + //set field names as first line + while ( (tableColumn = [enumerator nextObject]) ) { + [tempRow addObject:[[tableColumn headerCell] stringValue]]; + } + [currentResult addObject:[NSArray arrayWithArray:tempRow]]; + + //add rows + for ( i = 0 ; i < [self numberOfRowsInTableView:nil] ; i++) { + [tempRow removeAllObjects]; + enumerator = [tableColumns objectEnumerator]; + while ( (tableColumn = [enumerator nextObject]) ) { + [tempRow addObject:[self tableView:nil objectValueForTableColumn:tableColumn row:i]]; + } + [currentResult addObject:[NSArray arrayWithArray:tempRow]]; + } + return currentResult; +} + + +//additional methods +- (void)setConnection:(CMMCPConnection *)theConnection +/* + sets the connection (received from TableDocument) and makes things that have to be done only once + */ +{ + mySQLConnection = theConnection; + + [tableContentView setVerticalMotionCanBeginDrag:NO]; + + prefs = [[NSUserDefaults standardUserDefaults] retain]; + if ( [prefs boolForKey:@"useMonospacedFonts"] ) { + [argumentField setFont:[NSFont fontWithName:@"Monaco" size:10]]; + [limitRowsField setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]]; + [editTextView setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]]; + } else { + [editTextView setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; + } + [hexTextView setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]]; + [limitRowsStepper setEnabled:NO]; + if ( [prefs boolForKey:@"limitRows"] ) { + [limitRowsText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Limited to %d rows starting with row", @"text showing the number of rows the result is limited to"), + [prefs integerForKey:@"limitRowsValue"]]]; + } else { + [limitRowsText setStringValue:NSLocalizedString(@"No limit", @"text showing that the result isn't limited")]; + [limitRowsField setStringValue:@""]; + } +} + +- (IBAction)setCompareTypes:(id)sender +/* + sets the compare types for the filter and the appropriate formatter for the textField + */ +{ + NSArray *stringFields = [NSArray arrayWithObjects:@"varstring", @"string", @"tinyblob", @"blob", @"mediumblob", @"longblob", @"set", @"enum", nil]; + NSArray *stringTypes = [NSArray arrayWithObjects:NSLocalizedString(@"is", @"popup menuitem for field IS value"), NSLocalizedString(@"is not", @"popup menuitem for field IS NOT value"), NSLocalizedString(@"contains", @"popup menuitem for field CONTAINS value"), NSLocalizedString(@"contains not", @"popup menuitem for field CONTAINS NOT value"), @"IN", nil]; + NSArray *numberFields = [NSArray arrayWithObjects:@"tiny", @"short", @"long", @"int24", @"longlong", @"decimal", @"float", @"double", nil]; + NSArray *numberTypes = [NSArray arrayWithObjects:@"=", @"­", @">", @"<", @"³", @"²", @"IN", nil]; + NSArray *dateFields = [NSArray arrayWithObjects:@"timestamp", @"date", @"time", @"datetime", @"year", nil]; + NSArray *dateTypes = [NSArray arrayWithObjects:NSLocalizedString(@"is", @"popup menuitem for field IS value"), NSLocalizedString(@"is not", @"popup menuitem for field IS NOT value"), NSLocalizedString(@"older than", @"popup menuitem for field OLDER THAN value"), NSLocalizedString(@"younger than", @"popup menuitem for field YOUNGER THAN value"), NSLocalizedString(@"older than or equal to", @"popup menuitem for field OLDER THAN OR EQUAL TO value"), NSLocalizedString(@"younger than or equal to", @"popup menuitem for field YOUNGER THAN OR EQUAL TO value"), nil]; + NSString *fieldType = [NSString stringWithString:[fieldTypes objectAtIndex:[[fieldField selectedItem] tag]]]; + // NSNumberFormatter *numberFormatter; + int i; + + // numberFormatter = [[[NSNumberFormatter alloc] init] autorelease]; + // [numberFormatter setFormat:@"0.####################"]; + + [compareField removeAllItems]; + // [argumentField setStringValue:@""]; + + //why do we get "string" for enum fields? (error in framework?) + if ( [stringFields containsObject:fieldType] ) { + [compareField addItemsWithTitles:stringTypes]; + compareType = @"string"; + // [argumentField setFormatter:nil]; + } else if ( [numberFields containsObject:fieldType] ) { + [compareField addItemsWithTitles:numberTypes]; + compareType = @"number"; + // [argumentField setFormatter:numberFormatter]; + } else if ( [dateFields containsObject:fieldType] ) { + [compareField addItemsWithTitles:dateTypes]; + compareType = @"date"; + /* + if ([fieldType isEqualToString:@"timestamp"]) { + [argumentField setFormatter:[[NSDateFormatter alloc] + initWithDateFormat:@"%Y-%m-%d %H:%M:%S" allowNaturalLanguage:YES]]; + } + if ([fieldType isEqualToString:@"datetime"]) { + [argumentField setFormatter:[[NSDateFormatter alloc] initWithDateFormat:@"%Y-%m-%d %H:%M:%S" allowNaturalLanguage:YES]]; + } + if ([fieldType isEqualToString:@"date"]) { + [argumentField setFormatter:[[NSDateFormatter alloc] initWithDateFormat:@"%Y-%m-%d" allowNaturalLanguage:YES]]; + } + if ([fieldType isEqualToString:@"time"]) { + [argumentField setFormatter:[[NSDateFormatter alloc] initWithDateFormat:@"%H:%M:%S" allowNaturalLanguage:YES]]; + } + if ([fieldType isEqualToString:@"year"]) { + [argumentField setFormatter:[[NSDateFormatter alloc] initWithDateFormat:@"%Y" allowNaturalLanguage:YES]]; + } + */ + } else { + NSLog(@"ERROR: unknown type for comparision: %@", fieldType); + } + + for ( i = 0 ; i < [compareField numberOfItems] ; i++ ) { + [[compareField itemAtIndex:i] setTag:i]; + } + + // set focus on argumentField + [argumentField selectText:self]; +} + +- (IBAction)stepLimitRows:(id)sender +/* + steps the start row up or down (+/- limitRowsValue) + */ +{ + if ( [limitRowsStepper intValue] > 0 ) { + [limitRowsField setIntValue:[limitRowsField intValue]+[prefs integerForKey:@"limitRowsValue"]]; + } else { + if ( ([limitRowsField intValue]-[prefs integerForKey:@"limitRowsValue"]) < 1 ) { + [limitRowsField setIntValue:1]; + } else { + [limitRowsField setIntValue:[limitRowsField intValue]-[prefs integerForKey:@"limitRowsValue"]]; + } + } + [limitRowsStepper setIntValue:0]; +} + +- (NSArray *)fetchResultAsArray:(CMMCPResult *)theResult +/* + fetches the result as an array with a dictionary for each row in it + */ +{ + NSMutableArray *tempResult = [NSMutableArray array]; + NSDictionary *tempRow; + NSMutableDictionary *modifiedRow = [NSMutableDictionary dictionary]; + NSEnumerator *enumerator; + id key; + int i,j; + + for ( i = 0 ; i < [theResult numOfRows] ; i++ ) { + [theResult dataSeek:i]; + tempRow = [theResult fetchRowAsDictionary]; + enumerator = [tempRow keyEnumerator]; + while ( key = [enumerator nextObject] ) { + if ( [[tempRow objectForKey:key] isMemberOfClass:[NSNull class]] ) { + [modifiedRow setObject:[prefs stringForKey:@"nullValue"] forKey:key]; + /* + //NSData objects now decoded in tableView:objectValueForTableColumn:row + //object in result remains a NSData object + } else if ( [[tempRow objectForKey:key] isKindOfClass:[NSData class]] ) { + [modifiedRow setObject:[[NSString alloc] initWithData:[tempRow objectForKey:key] encoding:[mySQLConnection encoding]] + forKey:key]; + */ + } else { + [modifiedRow setObject:[tempRow objectForKey:key] forKey:key]; + } + //add values for hidden blob and text fields + if ( [prefs boolForKey:@"dontShowBlob"] ) { + for ( j = 0 ; j < [fieldTypes count] ; j++ ) { + if ( [self isBlobOrText:[fieldTypes objectAtIndex:j]] ) { + [modifiedRow setObject:NSLocalizedString(@"- blob or text -", @"value shown for hidden blob and text fields") forKey:[fieldNames objectAtIndex:j]]; + } + } + } + } + [tempResult addObject:[NSMutableDictionary dictionaryWithDictionary:modifiedRow]]; + } + return tempResult; +} + +- (BOOL)addRowToDB +/* + tries to write row to mysql-db + returns YES if row written to db, otherwies NO + returns YES if no row is beeing edited and nothing has to be written to db + */ +{ + int rowIndex = [tableContentView selectedRow]; + NSMutableArray *fieldValues = [[NSMutableArray alloc] init]; + NSMutableString *queryString; + NSString *query; + CMMCPResult *queryResult; + id rowObject; + NSMutableString *rowValue = [NSMutableString string]; + NSString *currentTime = [[NSDate date] descriptionWithCalendarFormat:@"%H:%M:%S" timeZone:nil locale:nil]; + int i; + + if ( !isEditingRow || rowIndex == -1) { + [fieldValues release]; + return YES; + } + + //get field values + for ( i=0 ; i < [fieldNames count] ; i++) { + rowObject = [[filteredResult objectAtIndex:rowIndex] objectForKey:[fieldNames objectAtIndex:i]]; + //convert the object to a string (here we can add special treatment for date-, number- and data-fields) + if ( [[rowObject description] isEqualToString:[prefs stringForKey:@"nullValue"]] || + ([rowObject isMemberOfClass:[NSConstantString class]] && [[rowObject description] isEqualToString:@""]) ) { + //NULL when user entered the nullValue string defined in the prefs or when a number field isn't set + // problem: when a number isn't set, sequel-pro enters 0 + // -> second if argument isn't necessary! + [rowValue setString:@"NULL"]; + } else { + if ( [rowObject isKindOfClass:[NSCalendarDate class]] ) { + // [rowValue setString:[NSString stringWithFormat:@"\"%@\"", [mySQLConnection prepareString:[rowObject description]]]]; + [rowValue setString:[NSString stringWithFormat:@"'%@'", [mySQLConnection prepareString:[rowObject description]]]]; + } else if ( [rowObject isKindOfClass:[NSNumber class]] ) { + [rowValue setString:[rowObject stringValue]]; + } else if ( [rowObject isKindOfClass:[NSData class]] ) { + //problem: if a blob field is edited, it becomes a string and is not more prepared as binary data + // but probably blob fields are corrupted before, when they decoded in the tableView method + // [rowValue setString:[NSString stringWithFormat:@"\"%@\"", [mySQLConnection prepareBinaryData:rowObject]]]; + [rowValue setString:[NSString stringWithFormat:@"'%@'", [mySQLConnection prepareBinaryData:rowObject]]]; + } else { + // [rowValue setString:[NSString stringWithFormat:@"\"%@\"", [mySQLConnection prepareString:[rowObject description]]]]; + if ( [[rowObject description] isEqualToString:@"CURRENT_TIMESTAMP"] ) { + [rowValue setString:@"CURRENT_TIMESTAMP"]; + } else { + [rowValue setString:[NSString stringWithFormat:@"'%@'", [mySQLConnection prepareString:[rowObject description]]]]; + } + } + } + //escape special characters -> now escaped by framework + /* + for ( j = 0 ; j < [rowValue length] ; j++ ) { + if ( [rowValue characterAtIndex:j] == '\\' ) { + [rowValue insertString:@"\\" atIndex:j]; + j++; + } else if ( [rowValue characterAtIndex:j] == '"' ) { + [rowValue insertString:@"\\" atIndex:j]; + j++; + } + } + */ + [fieldValues addObject:[NSString stringWithString:rowValue]]; + } + + if ( isEditingNewRow ) { + //INSERT syntax + queryString = [NSString stringWithFormat:@"INSERT INTO `%@` (`%@`) VALUES (%@)", + selectedTable, [fieldNames componentsJoinedByString:@"`,`"], [fieldValues componentsJoinedByString:@","]]; + } else { + //UPDATE syntax + queryString = [NSMutableString stringWithFormat:@"UPDATE `%@` SET ", selectedTable]; + for ( i = 0 ; i < [fieldNames count] ; i++ ) { + if ( i > 0 ) { + [queryString appendString:@", "]; + } + [queryString appendString:[NSString stringWithFormat:@"`%@`=%@", + [fieldNames objectAtIndex:i], [fieldValues objectAtIndex:i]]]; + } + [fieldValues release]; + [queryString appendString:[NSString stringWithFormat:@" WHERE %@", [self argumentForRow:-2]]]; + } + [mySQLConnection queryString:queryString]; + + //NSLog( @"%@", queryString ); + + if ( ![mySQLConnection affectedRows] ) { + //no rows changed + if ( [prefs boolForKey:@"showError"] ) { + NSBeginAlertSheet(NSLocalizedString(@"Warning", @"warning"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, + NSLocalizedString(@"The row was not written to the MySQL database. You probably haven't changed anything.\nReload the table to be sure that the row exists and use a primary key for your table.\n(This error can be turned off in the preferences.)", @"message of panel when no rows have been affected after writing to the db")); + } else { + NSBeep(); + } + [filteredResult replaceObjectAtIndex:rowIndex withObject:[NSMutableDictionary dictionaryWithDictionary:oldRow]]; + isEditingRow = NO; + isEditingNewRow = NO; + [tableDocumentInstance showErrorInConsole:[NSString stringWithFormat:NSLocalizedString(@"/* WARNING %@ No rows have been affected */\n", @"warning shown in the console when no rows have been affected after writing to the db"), currentTime]]; + return YES; + } else if ( [[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) { + //added new row with success + isEditingRow = NO; + if ( isEditingNewRow ) { + if ( [prefs boolForKey:@"reloadAfterAdding"] ) { + [self reloadTableValues:self]; + // if ( sortField ) + [tableContentView deselectAll:self]; + } else { + //set insertId for fields with auto_increment + queryResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SHOW COLUMNS FROM `%@`", selectedTable]]; + for ( i = 0 ; i < [queryResult numOfRows] ; i++ ) { + [queryResult dataSeek:i]; + rowObject = [queryResult fetchRowAsDictionary]; + if ( [[rowObject objectForKey:@"Extra"] isEqualToString:@"auto_increment"] ) { + [[filteredResult objectAtIndex:rowIndex] setObject:[NSNumber numberWithLong:[mySQLConnection insertId]] + forKey:[rowObject objectForKey:@"Field"]]; + } + } + [fullResult addObject:[filteredResult objectAtIndex:rowIndex]]; + } + isEditingNewRow = NO; + } else { + //updated row with success + if ( [prefs boolForKey:@"reloadAfterEditing"] ) { + [self reloadTableValues:self]; + // if ( sortField ) + [tableContentView deselectAll:self]; + } else { + // query = [@"SELECT * FROM " stringByAppendingString:selectedTable]; + query = [NSString stringWithFormat:@"SELECT %@ FROM `%@`", [self fieldListForQuery], selectedTable]; + if ( sortField ) { + // query = [query stringByAppendingString:[NSString stringWithFormat:@" ORDER BY `%@`", sortField]]; + query = [NSString stringWithFormat:@"%@ ORDER BY `%@`", query, sortField]; + if ( isDesc ) + query = [query stringByAppendingString:@" DESC"]; + } + if ( [prefs boolForKey:@"limitRows"] ) { + if ( [limitRowsField intValue] <= 0 ) { + [limitRowsField setStringValue:@"1"]; + } + query = [query stringByAppendingString: + [NSString stringWithFormat:@" LIMIT %d,%d", + [limitRowsField intValue]-1, [prefs integerForKey:@"limitRowsValue"]]]; + } + queryResult = [mySQLConnection queryString:query]; + // [fullResult setArray:[[self fetchResultAsArray:queryResult] retain]]; + [fullResult setArray:[self fetchResultAsArray:queryResult]]; + } + } + return YES; + } else { + //error in mysql-query + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), NSLocalizedString(@"Cancel", @"cancel button"), nil, tableWindow, self, @selector(sheetDidEnd:returnCode:contextInfo:), nil, @"addrow", + [NSString stringWithFormat:NSLocalizedString(@"Couldn't write row.\nMySQL said: %@", @"message of panel when error while adding row to db"), [mySQLConnection getLastErrorMessage]]); + return NO; + } +} + +- (NSString *)argumentForRow:(int)row +/* + returns the WHERE argument to identify a row + if row is -2, it uses the oldRow + if there is one, it uses the primary key, otherwise uses all fields as argument and sets LIMIT to 1 + */ +{ + CMMCPResult *theResult; + NSDictionary *theRow; + id tempValue; + NSMutableString *value = [NSMutableString string]; + NSMutableString *argument = [NSMutableString string]; + int i,j; + NSEnumerator *enumerator; + id type; + BOOL blob = NO; + NSArray *numberFields = [NSArray arrayWithObjects:@"tiny", @"short", @"long", @"int24", @"longlong", @"decimal", @"float", @"double", nil]; + + if ( row == -1 ) + return @""; + + //get primary key if there is one + /* + theResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SHOW INDEX FROM `%@`", selectedTable]]; + for ( i = 0 ; i < [theResult numOfRows] ; i++ ) { + [theResult dataSeek:i]; + theRow = [theResult fetchRowAsDictionary]; + if ( [[theRow objectForKey:@"Key_name"] isEqualToString:@"PRIMARY"] ) { + [keys addObject:[theRow objectForKey:@"Column_name"]]; + } + } + */ + if ( !keys ) { + setLimit = NO; + keys = [[NSMutableArray alloc] init]; + theResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SHOW COLUMNS FROM `%@`", selectedTable]]; + for ( i = 0 ; i < [theResult numOfRows] ; i++ ) { + [theResult dataSeek:i]; + theRow = [theResult fetchRowAsDictionary]; + if ( [[theRow objectForKey:@"Key"] isEqualToString:@"PRI"] ) { + [keys addObject:[theRow objectForKey:@"Field"]]; + } + } + } + + if ( ![keys count] ) { + //if there is no primary key, take all fields as argument + //here we have a problem when dontShowBlob == YES (we don't have the right values to use in the WHERE statement) + [keys setArray:fieldNames]; + setLimit = YES; + enumerator = [fieldTypes objectEnumerator]; + while ( (type = [enumerator nextObject]) ) { + if ( [self isBlobOrText:type] ) { + blob = YES; + } + } + if ( [prefs boolForKey:@"dontShowBlob"] && blob ) { + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, + NSLocalizedString(@"You can't hide blob and text fields when working with tables without index.", @"message of panel when trying to edit tables without index and with hidden blob/text fields")); + [keys removeAllObjects]; + [tableContentView deselectAll:self]; + return @""; + } + } + for ( i = 0 ; i < [keys count] ; i++ ) { + if ( i ) + [argument appendString:@" AND "]; + if ( row >= 0 ) { + //use selected row + tempValue = [[filteredResult objectAtIndex:row] objectForKey:[keys objectAtIndex:i]]; + } else { + //use oldRow + tempValue = [oldRow objectForKey:[keys objectAtIndex:i]]; + } + if ( [tempValue isKindOfClass:[NSData class]] ) { + [value setString:[[NSString alloc] initWithData:tempValue encoding:[mySQLConnection encoding]]]; + } else { + [value setString:[tempValue description]]; + } + + if ( [value isEqualToString:[prefs stringForKey:@"nullValue"]] ) { + [value setString:@"NULL"]; + } else { + //escape special characters (in WHERE statement!) + for ( j = 0 ; j < [value length] ; j++ ) { + if ( [value characterAtIndex:j] == '\\' ) { + [value insertString:@"\\" atIndex:j]; + j++; + } + } + [value setString:[mySQLConnection prepareString:value]]; + for ( j = 0 ; j < [value length] ; j++ ) { + if ( [value characterAtIndex:j] == '%' || + [value characterAtIndex:j] == '_' ) { + [value insertString:@"\\" atIndex:j]; + j++; + } + } + // [value setString:[NSString stringWithFormat:@"\"%@\"", value]]; + [value setString:[NSString stringWithFormat:@"'%@'", value]]; + } + if ( [value isEqualToString:@"NULL"] ) { + [argument appendString:[NSString stringWithFormat:@"`%@` IS NULL", [keys objectAtIndex:i]]]; + } else { + if ( [numberFields containsObject:[fieldTypes objectAtIndex:[fieldNames indexOfObject:[keys objectAtIndex:i]]]] ) { + [argument appendString:[NSString stringWithFormat:@"`%@` = %@", [keys objectAtIndex:i], value]]; + } else { + [argument appendString:[NSString stringWithFormat:@"`%@` LIKE %@", [keys objectAtIndex:i], value]]; + } + } + } + if ( setLimit ) + [argument appendString:@" LIMIT 1"]; + return argument; +} + +- (BOOL)isBlobOrText:(NSString *)fieldType +/* + returns YES if fieldType is some kind of blob or text. afaik the type of this fields is always blob, but better we test it... + it would be nice to know if it is blob or text, but mysql doesn't want to tell it... + */ +{ + if ( [fieldType isEqualToString:@"tinyblob"] || [fieldType isEqualToString:@"blob"] || + [fieldType isEqualToString:@"mediumblob"] || [fieldType isEqualToString:@"longblob"] ) { + return YES; + } else { + return NO; + } +} + +- (NSString *)fieldListForQuery +/* + returns * if dontShowBlob == NO + returns a comma-separated list of all fields which aren't of type blob or text if dontShowBlob == YES + */ +{ + int i; + NSMutableArray *fields = [NSMutableArray array]; + + if ( [prefs boolForKey:@"dontShowBlob"] ) { + for ( i = 0 ; i < [fieldTypes count] ; i++ ) { + if ( ![self isBlobOrText:[fieldTypes objectAtIndex:i]] ) { + [fields addObject:[fieldNames objectAtIndex:i]]; + } + } + if ( [fields count] == 0 ) { + return [NSString stringWithFormat:@"`%@`", [fieldNames objectAtIndex:0]]; + } else { + return [NSString stringWithFormat:@"`%@`", [fields componentsJoinedByString:@"`,`"]]; + } + } else { + return @"*"; + } +} + +- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo +/* + if contextInfo == addrow: remain in edit-mode if user hits OK, otherwise cancel editing + if contextInfo == removerow: removes row if user hits OK + */ +{ + NSEnumerator *enumerator = [tableContentView selectedRowEnumerator]; + NSNumber *index; + NSMutableArray *tempArray = [NSMutableArray array]; + NSMutableArray *tempResult = [NSMutableArray array]; + NSString *queryString; + CMMCPResult *queryResult; + int i, errors; + + [sheet orderOut:self]; + + if ( [contextInfo isEqualToString:@"addrow"] ) { + if ( returnCode == NSAlertDefaultReturn ) { + //problem: reenter edit mode doesn't function + [tableContentView editColumn:0 row:[tableContentView selectedRow] withEvent:nil select:YES]; + } else { + if ( !isEditingNewRow ) { + [filteredResult replaceObjectAtIndex:[tableContentView selectedRow] + withObject:[NSMutableDictionary dictionaryWithDictionary:oldRow]]; + isEditingRow = NO; + } else { + [filteredResult removeObjectAtIndex:[tableContentView selectedRow]]; + isEditingRow = NO; + isEditingNewRow = NO; + } + } + [tableContentView reloadData]; + } else if ( [contextInfo isEqualToString:@"removeallrows"] ) { + if ( returnCode == NSAlertDefaultReturn ) { + /* + if ( ([tableContentView numberOfSelectedRows] == [self numberOfRowsInTableView:tableContentView]) && + areShowingAllRows && + ([tableContentView numberOfSelectedRows] < [prefs integerForKey:@"limitRowsValue"]) ) { + */ + [mySQLConnection queryString:[NSString stringWithFormat:@"DELETE FROM `%@`", selectedTable]]; + if ( [[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) { + [self reloadTable:self]; + } else { + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, + [NSString stringWithFormat:NSLocalizedString(@"Couldn't remove rows.\nMySQL said: %@", @"message of panel when field cannot be removed"), + [mySQLConnection getLastErrorMessage]]); + } + } + } else if ( [contextInfo isEqualToString:@"removerow"] ) { + if ( returnCode == NSAlertDefaultReturn ) { + errors = 0; + + while ( (index = [enumerator nextObject]) ) { + [mySQLConnection queryString:[NSString stringWithFormat:@"DELETE FROM `%@` WHERE %@", + selectedTable, [self argumentForRow:[index intValue]]]]; + if ( ![mySQLConnection affectedRows] ) { + //no rows deleted + errors++; + } else if ( [[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) { + //rows deleted with success + [tempArray addObject:index]; + } else { + //error in mysql-query + errors++; + } + } + + if ( errors ) { + NSBeginAlertSheet(NSLocalizedString(@"Warning", @"warning"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, [NSString stringWithFormat:NSLocalizedString(@"%d rows have not been removed. Reload the table to be sure that the rows exist and use a primary key for your table.", @"message of panel when not all selected fields have been deleted"), errors]); + } + + //do deleting (after enumerating) + if ( [prefs boolForKey:@"reloadAfterRemoving"] ) { + [self reloadTableValues:self]; + } else { + for ( i = 0 ; i < [filteredResult count] ; i++ ) { + if ( ![tempArray containsObject:[NSNumber numberWithInt:i]] ) + [tempResult addObject:[filteredResult objectAtIndex:i]]; + } + [filteredResult setArray:tempResult]; + numRows = [self getNumberOfRows]; + if ( !areShowingAllRows ) { + // queryString = [@"SELECT * FROM " stringByAppendingString:selectedTable]; + queryString = [NSString stringWithFormat:@"SELECT %@ FROM `%@`", [self fieldListForQuery], selectedTable]; + if ( sortField ) { + // queryString = [queryString stringByAppendingString:[NSString stringWithFormat:@" ORDER BY `%@`", sortField]]; + queryString = [NSString stringWithFormat:@"%@ ORDER BY `%@`", queryString, sortField]; + if ( isDesc ) + queryString = [queryString stringByAppendingString:@" DESC"]; + } + if ( [prefs boolForKey:@"limitRows"] ) { + if ( [limitRowsField intValue] <= 0 ) { + [limitRowsField setStringValue:@"1"]; + } + queryString = [queryString stringByAppendingString: + [NSString stringWithFormat:@" LIMIT %d,%d", + [limitRowsField intValue]-1, [prefs integerForKey:@"limitRowsValue"]]]; + } + queryResult = [mySQLConnection queryString:queryString]; + // [fullResult setArray:[[self fetchResultAsArray:queryResult] retain]]; + [fullResult setArray:[self fetchResultAsArray:queryResult]]; + [tableContentView reloadData]; + [countText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%d rows of %d selected", @"text showing how many rows are in the filtered result"), + [filteredResult count], numRows]]; + } else { + [fullResult setArray:filteredResult]; + [tableContentView reloadData]; + [countText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%d rows in table", @"text showing how many rows are in the result"), numRows]]; + } + } + [tableContentView deselectAll:self]; + } + } +} + +- (int)getNumberOfRows +/* + returns the number of rows in the selected table + queries the number from mysql if enabled in prefs and result is limited, otherwise just return the fullResult count + */ +{ + if ( [prefs boolForKey:@"limitRows"] && [prefs boolForKey:@"fetchRowCount"] ) { + numRows = [self fetchNumberOfRows]; + } else { + numRows = [fullResult count]; + } + return numRows; +} + +- (int)fetchNumberOfRows +/* + fetches the number of rows in the selected table using a "SELECT COUNT(*)" query and return it + */ +{ + return [[[[mySQLConnection queryString:[NSString stringWithFormat:@"SELECT COUNT(*) FROM `%@`", selectedTable]] fetchRowAsArray] objectAtIndex:0] intValue]; +} + + +//tableView datasource methods +- (int)numberOfRowsInTableView:(NSTableView *)aTableView +{ + return [filteredResult count]; +} + +- (id)tableView:(NSTableView *)aTableView +objectValueForTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex +{ + id theRow, theValue; + + theRow = [filteredResult objectAtIndex:rowIndex]; + theValue = [theRow objectForKey:[aTableColumn identifier]]; + + if ( [theValue isKindOfClass:[NSData class]] ) { + theValue = [[NSString alloc] initWithData:theValue encoding:[mySQLConnection encoding]]; + //show only first 50 characters to speed up interface (but return everything when this method is used to return the current result) + // if ( ([theValue length] > 100) && aTableView ) { + } + +// if ( ([(NSString *)theValue length] > 100) && aTableView ) { +// theValue = [NSString stringWithFormat:@"%@(...)", [theValue substringToIndex:100]]; +// } + + return theValue; +} + +- (void)tableView:(NSTableView *)aTableView + setObjectValue:(id)anObject + forTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex +{ + if ( !isEditingRow ) { + [oldRow setDictionary:[filteredResult objectAtIndex:rowIndex]]; + isEditingRow = YES; + } + if ( anObject ) { + [[filteredResult objectAtIndex:rowIndex] setObject:anObject forKey:[aTableColumn identifier]]; + } else { + [[filteredResult objectAtIndex:rowIndex] setObject:@"" forKey:[aTableColumn identifier]]; + } +} + +//tableView delegate methods +- (void)tableView:(NSTableView*)tableView didClickTableColumn:(NSTableColumn *)tableColumn +/* + sorts the tableView by the clicked column + if clicked twice, order is descending + */ +{ + NSString *queryString; + NSImage *upSortImage; + NSImage *downSortImage; + CMMCPResult *queryResult; + + if ( [selectedTable isEqualToString:@""] || !selectedTable ) + return; + if ( ![self selectionShouldChangeInTableView:nil] ) + return; + + //query started + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self]; + + upSortImage = [[NSImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"sort-up" ofType:@"tiff"]]; + [upSortImage autorelease]; + downSortImage = [[NSImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"sort-down" ofType:@"tiff"]]; + [downSortImage autorelease]; + + //sets order descending if a header is clicked twice + if ( [[tableColumn identifier] isEqualTo:sortField] ) { + if ( isDesc ) { + isDesc = NO; + } else { + isDesc = YES; + } + } else { + isDesc = NO; + [tableContentView setIndicatorImage:nil inTableColumn:[tableContentView tableColumnWithIdentifier:sortField]]; + } + sortField = [tableColumn identifier]; + + //make queryString and perform query + queryString = [NSString stringWithFormat:@"SELECT %@ FROM `%@` ORDER BY `%@`", [self fieldListForQuery], + selectedTable, sortField]; + if ( isDesc ) + queryString = [queryString stringByAppendingString:@" DESC"]; + if ( [prefs boolForKey:@"limitRows"] ) { + if ( [limitRowsField intValue] <= 0 ) { + [limitRowsField setStringValue:@"1"]; + } + queryString = [queryString stringByAppendingString: + [NSString stringWithFormat:@" LIMIT %d,%d", + [limitRowsField intValue]-1, [prefs integerForKey:@"limitRowsValue"]]]; + } + queryResult = [mySQLConnection queryString:queryString]; + + // [fullResult setArray:[[self fetchResultAsArray:queryResult] retain]]; + [fullResult setArray:[self fetchResultAsArray:queryResult]]; + + if ( ![[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) { + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, + [NSString stringWithFormat:NSLocalizedString(@"Couldn't sort table. MySQL said: %@", @"message of panel when sorting of table failed"), [mySQLConnection getLastErrorMessage]]); + return; + } + + //sets highlight and indicatorImage + [tableContentView setHighlightedTableColumn:tableColumn]; + if ( isDesc ) { + [tableContentView setIndicatorImage:downSortImage inTableColumn:tableColumn]; + } else { + [tableContentView setIndicatorImage:upSortImage inTableColumn:tableColumn]; + } + + //query finished + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self]; + + //if filter is activated filters the result, otherwise shows fullResult + if ( !areShowingAllRows ) { + [self filterTable:self]; + } else { + [filteredResult setArray:fullResult]; + [tableContentView reloadData]; + } +} + +- (BOOL)selectionShouldChangeInTableView:(NSTableView *)aTableView +{ + /* + int row = [tableContentView editedRow]; + int column = [tableContentView editedColumn]; + NSTableColumn *tableColumn; + NSCell *cell; + + if ( row != -1 ) { + tableColumn = [[tableContentView tableColumns] objectAtIndex:column]; + cell = [tableColumn dataCellForRow:row]; + [cell endEditing:[tableContentView currentEditor]]; + } + */ + //end editing (otherwise problems when user hits reload button) + [tableWindow endEditingFor:nil]; + + return [self addRowToDB]; +} + +- (void)tableViewColumnDidResize:(NSNotification *)aNotification +/* + saves the new column size in the preferences + */ +{ + // sometimes the column has no identifier. I can't figure out what is causing it, so we just skip over this item + if (![[[aNotification userInfo] objectForKey:@"NSTableColumn"] identifier]) + return; + + NSMutableDictionary *tableColumnWidths; + NSString *database = [NSString stringWithFormat:@"%@@%@", [tableDocumentInstance database], [tableDocumentInstance host]]; + NSString *table = (NSString *)[tablesListInstance table]; + + // get tableColumnWidths object + if ( [prefs objectForKey:@"tableColumnWidths"] != nil ) { + tableColumnWidths = [NSMutableDictionary dictionaryWithDictionary:[prefs objectForKey:@"tableColumnWidths"]]; + } else { + tableColumnWidths = [NSMutableDictionary dictionary]; + } + // get database object + if ( [tableColumnWidths objectForKey:database] == nil ) { + [tableColumnWidths setObject:[NSMutableDictionary dictionary] forKey:database]; + } else { + [tableColumnWidths setObject:[[tableColumnWidths objectForKey:database] mutableCopy] forKey:database]; + } + // get table object + if ( [[tableColumnWidths objectForKey:database] objectForKey:table] == nil ) { + [[tableColumnWidths objectForKey:database] setObject:[NSMutableDictionary dictionary] forKey:table]; + } else { + [[tableColumnWidths objectForKey:database] setObject:[[[tableColumnWidths objectForKey:database] objectForKey:table] mutableCopy] forKey:table]; + } + // save column size + [[[tableColumnWidths objectForKey:database] objectForKey:table] setObject:[NSNumber numberWithFloat:[[[aNotification userInfo] objectForKey:@"NSTableColumn"] width]] forKey:[[[aNotification userInfo] objectForKey:@"NSTableColumn"] identifier]]; + [prefs setObject:tableColumnWidths forKey:@"tableColumnWidths"]; +} + +- (BOOL)tableView:(NSTableView *)aTableView shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex +/* + opens sheet if multipleLineEditingButton is clicked or field is a hidden blob or text field + */ +{ + NSEnumerator *enumerator; + id type; + BOOL blob = NO; + NSDictionary *tempRow; + NSMutableDictionary *modifiedRow = [NSMutableDictionary dictionary]; + id key; + int code; + NSString *query; + CMMCPResult *tempResult; + id theValue; + BOOL columnIsBlob = NO; + // int i; + // NSArray *columns = [aTableView tableColumns]; + + if ( [prefs boolForKey:@"dontShowBlob"] && !isEditingRow ) { + //get all row values if dontShowBlob == YES and table contains blob or text field and isEditingRow = NO + enumerator = [fieldTypes objectEnumerator]; + while ( (type = [enumerator nextObject]) ) { + if ( [self isBlobOrText:type] ) { + blob = YES; + } + } + + if ( blob ) { + query = [NSString stringWithFormat:@"SELECT * FROM `%@` WHERE %@", + selectedTable, [self argumentForRow:[tableContentView selectedRow]]]; + tempResult = [mySQLConnection queryString:query]; + if ( ![tempResult numOfRows] ) { + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, + NSLocalizedString(@"Couldn't load the row. Reload the table to be sure that the row exists and use a primary key for your table.", @"message of panel when loading of row failed")); + return NO; + } + tempRow = [tempResult fetchRowAsDictionary]; + enumerator = [tempRow keyEnumerator]; + while ( key = [enumerator nextObject] ) { + if ( [[tempRow objectForKey:key] isMemberOfClass:[NSNull class]] ) { + [modifiedRow setObject:[prefs stringForKey:@"nullValue"] forKey:key]; + } else { + [modifiedRow setObject:[tempRow objectForKey:key] forKey:key]; + } + } + [filteredResult replaceObjectAtIndex:rowIndex + withObject:[NSMutableDictionary dictionaryWithDictionary:modifiedRow]]; + [tableContentView reloadData]; + } + } + + /* + // find the column we're trying to edit + for ( i = 0; i < [columns count]; i++ ) { + if ( [columns objectAtIndex:i] == aTableColumn ) { + // this flag will let us determine if we should "force" multi-line edit. + columnIsBlob = [self isBlobOrText:[fieldTypes objectAtIndex:i]]; + break; + } + } + */ + //is the column a blob field -> if YES force sheet editing + if ( [self isBlobOrText:[fieldTypes objectAtIndex:[fieldNames indexOfObject:[aTableColumn identifier]]]] ) { + columnIsBlob = YES; + } + + if ( [multipleLineEditingButton state] == NSOnState || columnIsBlob ) { + theValue = [[filteredResult objectAtIndex:rowIndex] objectForKey:[aTableColumn identifier]]; + NSImage *image = nil; + editData = [theValue retain]; + + if ( [theValue isKindOfClass:[NSData class]] ) { + image = [[NSImage alloc] initWithData:theValue]; + [hexTextView setString:[self dataToHex:theValue]]; + /* + // update displayed font to monospace + NSFont *font = [NSFont fontWithName:@"Courier" size:12.0f]; + NSRange hexRange = { 0, [[hexTextView string] length] - 1 }; + [hexTextView setFont:font range:hexRange]; + */ + theValue = [[NSString alloc] initWithData:theValue encoding:[mySQLConnection encoding]]; + } else { + [hexTextView setString:@""]; + theValue = [theValue description]; + } + + [editImage setImage:image]; + [editTextView setString:theValue]; + [editTextView setSelectedRange:NSMakeRange(0,[[editTextView string] length])]; + //different sheets for date (with up/down arrows), number and text + [NSApp beginSheet:editSheet + modalForWindow:tableWindow modalDelegate:self + didEndSelector:nil contextInfo:nil]; + code = [NSApp runModalForWindow:editSheet]; + + [NSApp endSheet:editSheet]; + [editSheet orderOut:nil]; + + if ( code ) { + if ( !isEditingRow ) { + [oldRow setDictionary:[filteredResult objectAtIndex:rowIndex]]; + isEditingRow = YES; + } + + [[filteredResult objectAtIndex:rowIndex] setObject:[editData copy] + forKey:[aTableColumn identifier]]; + + // clean up + [editImage setImage:nil]; + [editTextView setString:@""]; + [hexTextView setString:@""]; + if ( editData ) { + [editData release]; + } + } + return NO; + } else { + return YES; + } +} + +- (BOOL)tableView:(NSTableView *)tableView writeRows:(NSArray*)rows + toPasteboard:(NSPasteboard*)pboard +/* + enable drag from tableview + */ +{ + if ( tableView == tableContentView ) + { + NSString *tmp = [tableContentView draggedRowsAsTabString:rows]; + + if ( nil != tmp ) + { + [pboard declareTypes:[NSArray arrayWithObjects: NSTabularTextPboardType, + NSStringPboardType, nil] + owner:nil]; + + [pboard setString:tmp forType:NSStringPboardType]; + [pboard setString:tmp forType:NSTabularTextPboardType]; + return YES; + } + } + return NO; +} + +- (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)command +/* + traps enter and esc an make/cancel editing without entering next row + */ +{ + int row, column, i; + + row = [tableContentView editedRow]; + column = [tableContentView editedColumn]; + + if ( [textView methodForSelector:command] == [textView methodForSelector:@selector(insertNewline:)] || + [textView methodForSelector:command] == [textView methodForSelector:@selector(insertTab:)] ) //trap enter and tab + { + //save current line + [[control window] makeFirstResponder:control]; + if ( column == ( [tableContentView numberOfColumns] - 1 ) ) { + [self addRowToDB]; + /* + if ( [self addRowToDB] && + ( [textView methodForSelector:command] == [textView methodForSelector:@selector(insertTab:)] ) && + !(sortField && ([prefs boolForKey:@"reloadAfterAdding"] || [prefs boolForKey:@"reloadAfterEditing"])) ) { + //get in edit-mode of next row if user hit tab (and result isn't sorted and reloaded) + if ( row < ([tableContentView numberOfRows] - 1) ) { + [tableContentView selectRow:row+1 byExtendingSelection:NO]; + [tableContentView editColumn:0 row:row+1 withEvent:nil select:YES]; + } else { + [tableContentView selectRow:0 byExtendingSelection:NO]; + [tableContentView editColumn:0 row:0 withEvent:nil select:YES]; + } + } + */ + } else { + //check if next column is a blob column + i = 1; + while ( [self isBlobOrText:[fieldTypes objectAtIndex:[fieldNames indexOfObject:[[[tableContentView tableColumns] objectAtIndex:column+i] identifier]]]] ) { + i++; + if ( (column+i) >= [tableContentView numberOfColumns] ) { + //there is no other column after the blob column + [self addRowToDB]; + return TRUE; + } + } + //edit the column after the blob column + [tableContentView editColumn:column+i row:row withEvent:nil select:YES]; + } + return TRUE; + } + else if ( [[control window] methodForSelector:command] == [[control window] methodForSelector:@selector(_cancelKey:)] || + [textView methodForSelector:command] == [textView methodForSelector:@selector(complete:)] ) //trap esc + { + //abort editing + [control abortEditing]; + if ( isEditingRow && !isEditingNewRow ) { + isEditingRow = NO; + [filteredResult replaceObjectAtIndex:row withObject:[NSMutableDictionary dictionaryWithDictionary:oldRow]]; + } else if ( isEditingNewRow ) { + isEditingRow = NO; + isEditingNewRow = NO; + [filteredResult removeObjectAtIndex:row]; + [tableContentView reloadData]; + } + return TRUE; + } + else + { + return FALSE; + } +} + + +//textView delegate methods +- (BOOL)textView:(NSTextView *)aTextView doCommandBySelector:(SEL)aSelector +/* + traps enter and return key and closes editSheet instead of inserting a linebreak when user hits return + */ +{ + if ( aTextView == editTextView ) { + if ( [aTextView methodForSelector:aSelector] == [aTextView methodForSelector:@selector(insertNewline:)] && + [[[NSApp currentEvent] characters] isEqualToString:@"\003"] ) + { + [NSApp stopModalWithCode:1]; + return YES; + } else { + return NO; + } + } + return NO; +} + + +//last but not least + +- (void)dealloc +{ + // NSLog(@"TableContent dealloc"); + + [editData release]; + [fullResult release]; + [filteredResult release]; + [keys release]; + [oldRow release]; + [fieldNames release]; + [fieldTypes release]; + [compareType release]; + [sortField release]; + [prefs release]; + + [super dealloc]; +} + +@end diff --git a/trunk/TableDocument.h b/trunk/TableDocument.h new file mode 100644 index 00000000..5ade5ec1 --- /dev/null +++ b/trunk/TableDocument.h @@ -0,0 +1,223 @@ +// +// TableDocument.h +// sequel-pro +// +// Created by lorenz textor (lorenz@textor.ch) on Wed May 01 2002. +// Copyright (c) 2002-2003 Lorenz Textor. All rights reserved. +// +// Forked by Abhi Beckert (abhibeckert.com) 2008-04-04 +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at + +#import +#import +#import "CMMCPConnection.h" +#import "CMMCPResult.h" + +/** + * The TableDocument class controls the primary database view window. + */ + +@interface TableDocument : NSDocument +{ + //IBOutlets + IBOutlet id keyChainInstance; + IBOutlet id tablesListInstance; + IBOutlet id tableSourceInstance; + IBOutlet id tableContentInstance; + IBOutlet id customQueryInstance; + IBOutlet id tableDumpInstance; + IBOutlet id tableStatusInstance; + + IBOutlet id tableWindow; + IBOutlet id connectSheet; + IBOutlet id databaseSheet; + IBOutlet id variablesSheet; + IBOutlet id consoleDrawer; + + IBOutlet id queryProgressBar; + IBOutlet id favoritesButton; + IBOutlet NSTableView *connectFavoritesTableView; + IBOutlet NSArrayController *favoritesController; + IBOutlet id hostField; + IBOutlet id socketField; + IBOutlet id userField; + IBOutlet id passwordField; + IBOutlet id portField; + IBOutlet id databaseField; + + IBOutlet id connectProgressBar; + IBOutlet id connectProgressStatusText; + IBOutlet id databaseNameField; + IBOutlet id chooseDatabaseButton; + IBOutlet id consoleTextView; + IBOutlet id variablesTableView; + IBOutlet NSTabView *tableTabView; + + IBOutlet id sidebarGrabber; + + IBOutlet NSTableView *dbTablesTableView; + + IBOutlet id syntaxView; + IBOutlet id syntaxViewContent; + IBOutlet NSWindow *createTableSyntaxWindow; + + CMMCPConnection *mySQLConnection; + + NSMutableArray *favorites; + NSArray *variables; + NSString *selectedDatabase; + NSString *selectedFavorite; + NSString *mySQLVersion; + NSUserDefaults *prefs; + + NSMenu *selectEncodingMenu; + BOOL _supportsEncoding; + NSString *_encoding; + + NSToolbar *mainToolbar; + NSToolbarItem *chooseDatabaseToolbarItem; +} + +//start sheet +- (IBAction)connectToDB:(id)sender; +- (IBAction)connect:(id)sender; +- (IBAction)closeSheet:(id)sender; +- (IBAction)chooseFavorite:(id)sender; +- (id)selectedFavorite; +- (NSString *)selectedFavoritePassword; +- (void)connectSheetAddToFavorites:(id)sender; +- (void)addToFavoritesHost:(NSString *)host socket:(NSString *)socket + user:(NSString *)user password:(NSString *)password + port:(NSString *)port database:(NSString *)database + useSSH:(BOOL)useSSH // no-longer in use + sshHost:(NSString *)sshHost // no-longer in use + sshUser:(NSString *)sshUser // no-longer in use + sshPassword:(NSString *)sshPassword // no-longer in use + sshPort:(NSString *)sshPort; // no-longer in use +- (NSMutableArray *)favorites; + +//alert sheets method +- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo; + +//connection getter +- (CMMCPConnection *)sharedConnection; + +//database methods +- (IBAction)setDatabases:(id)sender; +- (IBAction)chooseDatabase:(id)sender; +- (IBAction)addDatabase:(id)sender; +- (IBAction)closeDatabaseSheet:(id)sender; +- (IBAction)removeDatabase:(id)sender; + +//console methods +- (void)toggleConsole:(id)sender; +- (void)clearConsole:(id)sender; +- (BOOL)consoleIsOpened; +- (void)showMessageInConsole:(NSString *)message; +- (void)showErrorInConsole:(NSString *)error; + +//encoding methods +- (void)setEncoding:(NSString *)encoding; +- (void)detectEncoding; +- (IBAction)chooseEncoding:(id)sender; +- (BOOL)supportsEncoding; +- (void)updateEncodingMenuWithSelectedEncoding:(NSString *)encoding; +- (NSString *)encodingNameFromMySQLEncoding:(NSString *)mysqlEncoding; +- (NSString *)mysqlEncodingFromDisplayEncoding:(NSString *)encodingName; + +//table methods +- (IBAction)showCreateTableSyntax:(id)sender; +- (IBAction)copyCreateTableSyntax:(id)sender; +- (IBAction)checkTable:(id)sender; +- (IBAction)analyzeTable:(id)sender; +- (IBAction)optimizeTable:(id)sender; +- (IBAction)repairTable:(id)sender; +- (IBAction)flushTable:(id)sender; +- (IBAction)checksumTable:(id)sender; + +//other methods +- (NSString *)host; +- (void)doPerformQueryService:(NSString *)query; +- (void)flushPrivileges:(id)sender; +- (void)showVariables:(id)sender; +- (void)closeConnection; + +//getter methods +- (NSString *)database; +- (NSString *)table; +- (NSString *)mySQLVersion; +- (NSString *)user; + +//notification center methods +- (void)willPerformQuery:(NSNotification *)notification; +- (void)hasPerformedQuery:(NSNotification *)notification; +- (void)applicationWillTerminate:(NSNotification *)notification; +- (void)tunnelStatusChanged:(NSNotification *)notification; + +//menu methods +- (BOOL)validateMenuItem:(NSMenuItem *)anItem; +- (IBAction)import:(id)sender; +- (IBAction)importCSV:(id)sender; +- (IBAction)export:(id)sender; +- (IBAction)exportTable:(id)sender; +- (IBAction)exportMultipleTables:(id)sender; +- (IBAction)viewStructure:(id)sender; +- (IBAction)viewContent:(id)sender; +- (IBAction)viewQuery:(id)sender; +- (IBAction)viewStatus:(id)sender; + +//toolbar methods +- (void)setupToolbar; +- (NSToolbarItem *)toolbar:(NSToolbar *)toolbar itemForItemIdentifier:(NSString *)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag; +- (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar*)toolbar; +- (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar*)toolbar; +- (BOOL)validateToolbarItem:(NSToolbarItem *)toolbarItem; +- (void)updateChooseDatabaseToolbarItemWidth; + +//NSDocument methods +- (NSString *)windowNibName; +- (void)windowControllerDidLoadNib:(NSWindowController *)aController; +- (void)windowWillClose:(NSNotification *)aNotification; + +//NSWindow delegate methods +- (BOOL)windowShouldClose:(id)sender; + +//SMySQL delegate methods +- (void)willQueryString:(NSString *)query; +- (void)queryGaveError:(NSString *)error; + +//splitView delegate methods +- (BOOL)splitView:(NSSplitView *)sender canCollapseSubview:(NSView *)subview; +- (float)splitView:(NSSplitView *)sender constrainMaxCoordinate:(float)proposedMax ofSubviewAt:(int)offset; +- (float)splitView:(NSSplitView *)sender constrainMinCoordinate:(float)proposedMin ofSubviewAt:(int)offset; +- (NSRect)splitView:(NSSplitView *)splitView additionalEffectiveRectOfDividerAtIndex:(int)dividerIndex; + + +//tableView datasource methods +- (int)numberOfRowsInTableView:(NSTableView *)aTableView; +- (id)tableView:(NSTableView *)aTableView + objectValueForTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex; + +//for freeing up memory +- (void)dealloc; + +@end + +extern NSString *TableDocumentFavoritesControllerSelectionIndexDidChange; +extern NSString *TableDocumentFavoritesControllerFavoritesDidChange; diff --git a/trunk/TableDocument.m b/trunk/TableDocument.m new file mode 100644 index 00000000..5ecc75b2 --- /dev/null +++ b/trunk/TableDocument.m @@ -0,0 +1,1583 @@ +// +// TableDocument.m +// sequel-pro +// +// Created by lorenz textor (lorenz@textor.ch) on Wed May 01 2002. +// Copyright (c) 2002-2003 Lorenz Textor. All rights reserved. +// +// Forked by Abhi Beckert (abhibeckert.com) 2008-04-04 +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at + +#import "TableDocument.h" +#import "KeyChain.h" +#import "TablesList.h" +#import "TableSource.h" +#import "TableContent.h" +#import "CustomQuery.h" +#import "TableDump.h" +#import "TableStatus.h" +#import "ImageAndTextCell.h" +#import + +NSString *TableDocumentFavoritesControllerSelectionIndexDidChange = @"TableDocumentFavoritesControllerSelectionIndexDidChange"; +NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFavoritesControllerFavoritesDidChange"; + +@implementation TableDocument + +- (id)init +{ + if (![super init]) + return nil; + + _encoding = [@"utf8" retain]; + chooseDatabaseButton = nil; + chooseDatabaseToolbarItem = nil; + + return self; +} + +- (void)awakeFromNib +{ + // register selection did change handler for favorites controller (used in connect sheet) + [favoritesController addObserver:self forKeyPath:@"selectionIndex" options:NSKeyValueChangeInsertion context:TableDocumentFavoritesControllerSelectionIndexDidChange]; + + // register value change handler for favourites, so we can save them to preferences + [self addObserver:self forKeyPath:@"favorites" options:0 context:TableDocumentFavoritesControllerFavoritesDidChange]; + + // register double click for the favorites view (double click favorite to connect) + [connectFavoritesTableView setTarget:self]; + + // find the Database -> Database Encoding menu (it's not in our nib, so we can't use interface builder) + selectEncodingMenu = [[[[[NSApp mainMenu] itemWithTag:1] submenu] itemWithTag:1] submenu]; + + // hide the tabs in the tab view (we only show them to allow switching tabs in interface builder) + [tableTabView setTabViewType:NSNoTabsNoBorder]; +} + +- (void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context +{ + if (context == TableDocumentFavoritesControllerSelectionIndexDidChange) { + [self chooseFavorite:self]; + return; + } + + if (context == TableDocumentFavoritesControllerFavoritesDidChange) { + [prefs setObject:[self favorites] forKey:@"favorites"]; + return; + } + + [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; +} + + +- (CMMCPConnection *)sharedConnection +{ + return mySQLConnection; +} + + +//start sheet + +/** + * tries to connect to a database server, shows connect sheet prompting user to + * enter details/select favorite and shoows alert sheets on failure. + */ +- (IBAction)connectToDB:(id)sender +{ + CMMCPResult *theResult; + id version; + + // load the details of the curretnly selected favorite into the text boxes in connect sheet + [self chooseFavorite:self]; + + // run the connect sheet (modal) + [NSApp beginSheet:connectSheet + modalForWindow:tableWindow + modalDelegate:self + didEndSelector:nil + contextInfo:nil]; + int code = [NSApp runModalForWindow:connectSheet]; + + [NSApp endSheet:connectSheet]; + [connectSheet orderOut:nil]; + + if ( code == 1) { + //connected with success + //register as delegate + [mySQLConnection setDelegate:self]; + // set encoding + NSString *encodingName = [prefs objectForKey:@"encoding"]; + if ( [encodingName isEqualToString:@"Autodetect"] ) { + [self detectEncoding]; + } else { + [self setEncoding:[self mysqlEncodingFromDisplayEncoding:encodingName]]; + } + //get mysql version + // theResult = [mySQLConnection queryString:@"SHOW VARIABLES LIKE \"version\""]; + theResult = [mySQLConnection queryString:@"SHOW VARIABLES LIKE 'version'"]; + version = [[theResult fetchRowAsArray] objectAtIndex:1]; + if ( [version isKindOfClass:[NSData class]] ) { + // starting with MySQL 4.1.14 the mysql variables are returned as nsdata + mySQLVersion = [[NSString alloc] initWithData:version encoding:[mySQLConnection encoding]]; + } else { + mySQLVersion = [[NSString stringWithString:version] retain]; + } + [self setDatabases:self]; + [tablesListInstance setConnection:mySQLConnection]; + [tableSourceInstance setConnection:mySQLConnection]; + [tableContentInstance setConnection:mySQLConnection]; + [customQueryInstance setConnection:mySQLConnection]; + [tableDumpInstance setConnection:mySQLConnection]; + [tableStatusInstance setConnection:mySQLConnection]; + [self setFileName:[NSString stringWithFormat:@"(MySQL %@) %@@%@ %@", mySQLVersion, [userField stringValue], + [hostField stringValue], [databaseField stringValue]]]; + [tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@@%@/%@", mySQLVersion, [userField stringValue], + [hostField stringValue], [databaseField stringValue]]]; + + // Connected Growl Notification + [GrowlApplicationBridge notifyWithTitle:@"Connected" + description:[NSString stringWithFormat:NSLocalizedString(@"Connected to %@",@"description for connected growl notification"), [tableWindow title]] + notificationName:@"Connected" + iconData:nil + priority:0 + isSticky:NO + clickContext:nil + ]; + + + } else if (code == 2) { + //can't connect to host + NSBeginAlertSheet(NSLocalizedString(@"Connection failed!", @"connection failed"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, + @selector(sheetDidEnd:returnCode:contextInfo:), @"connect", + [NSString stringWithFormat:NSLocalizedString(@"Unable to connect to host %@.\nBe sure that the address is correct and that you have the necessary privileges.\nMySQL said: %@", @"message of panel when connection to host failed"), [hostField stringValue], [mySQLConnection getLastErrorMessage]]); + } else if (code == 3) { + //can't connect to db + NSBeginAlertSheet(NSLocalizedString(@"Connection failed!", @"connection failed"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, + @selector(sheetDidEnd:returnCode:contextInfo:), @"connect", + [NSString stringWithFormat:NSLocalizedString(@"Unable to connect to database %@.\nBe sure that the database exists and that you have the necessary privileges.\nMySQL said: %@", @"message of panel when connection to db failed"), [databaseField stringValue], [mySQLConnection getLastErrorMessage]]); + } else if (code == 4) { + //no host is given + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, + @selector(sheetDidEnd:returnCode:contextInfo:), @"connect", NSLocalizedString(@"Please enter at least a host or socket.", @"message of panel when host/socket are missing")); + } else { + //cancel button was pressed + //since the window is getting ready to be toast ignore events for awhile + //so as not to crash, this happens to me when hitten esc key instead of + //cancel button, but with this code it does not crash + [[NSApplication sharedApplication] discardEventsMatchingMask:NSAnyEventMask + beforeEvent:[[NSApplication sharedApplication] nextEventMatchingMask:NSLeftMouseDownMask | NSLeftMouseUpMask |NSRightMouseDownMask | NSRightMouseUpMask | NSFlagsChangedMask | NSKeyDownMask | NSKeyUpMask untilDate:[NSDate distantPast] inMode:NSEventTrackingRunLoopMode dequeue:YES]]; + [tableWindow close]; + } +} + +/* +invoked when user hits the connect-button of the connectSheet +stops modal session with code: +1 when connected with success +2 when no connection to host +3 when no connection to db +4 when hostField and socketField are empty +*/ +- (IBAction)connect:(id)sender +{ + int code; + + [connectProgressBar startAnimation:self]; + [connectProgressStatusText setHidden:NO]; + [connectProgressStatusText display]; + + [selectedDatabase autorelease]; + selectedDatabase = nil; + + code = 0; + if ( [[hostField stringValue] isEqualToString:@""] && [[socketField stringValue] isEqualToString:@""] ) { + code = 4; + } else { + if ( ![[socketField stringValue] isEqualToString:@""] ) { + //connect to socket + mySQLConnection = [[CMMCPConnection alloc] initToSocket:[socketField stringValue] + withLogin:[userField stringValue] + password:[passwordField stringValue]]; + [hostField setStringValue:@"localhost"]; + } else { + //connect to host + mySQLConnection = [[CMMCPConnection alloc] initToHost:[hostField stringValue] + withLogin:[userField stringValue] + password:[passwordField stringValue] + usingPort:[portField intValue]]; + } + if ( ![mySQLConnection isConnected] ) + code = 2; + if ( !code && ![[databaseField stringValue] isEqualToString:@""] ) { + if ([mySQLConnection selectDB:[databaseField stringValue]]) { + selectedDatabase = [[databaseField stringValue] retain]; + } else { + code = 3; + } + } + if ( !code ) + code = 1; + } + + // close sheet + [NSApp stopModalWithCode:code]; + [connectProgressBar stopAnimation:self]; + [connectProgressStatusText setHidden:YES]; +} + +- (IBAction)closeSheet:(id)sender +/* +invoked when user hits the cancel button of the connectSheet +stops modal session with code 0 +reused when user hits the close button of the variablseSheet or of the createTableSyntaxSheet +*/ +{ + [NSApp stopModalWithCode:0]; +} + +/** + * sets fields for the chosen favorite. + */ +- (IBAction)chooseFavorite:(id)sender +{ + if (![self selectedFavorite]) + return; + + [hostField setStringValue:[self valueForKeyPath:@"selectedFavorite.host"]]; + [socketField setStringValue:[self valueForKeyPath:@"selectedFavorite.socket"]]; + [userField setStringValue:[self valueForKeyPath:@"selectedFavorite.user"]]; + [portField setStringValue:[self valueForKeyPath:@"selectedFavorite.port"]]; + [databaseField setStringValue:[self valueForKeyPath:@"selectedFavorite.database"]]; + [passwordField setStringValue:[self selectedFavoritePassword]]; + + [selectedFavorite release]; + selectedFavorite = [[favoritesButton titleOfSelectedItem] retain]; +} + +- (NSMutableArray *)favorites +{ + // if no favorites, load from user defaults + if (!favorites) { + favorites = [[NSMutableArray alloc] initWithArray:[[NSUserDefaults standardUserDefaults] objectForKey:@"favorites"]]; + } + + // if no favorites in user defaults, load empty ones + if (!favorites) { + favorites = [[NSMutableArray array] retain]; + } + + return favorites; +} + +/** + * returns a KVC-compliant proxy to the currently selected favorite, or nil if nothing selected. + * + * see [NSObjectController selection] + */ +- (id)selectedFavorite +{ + if ([favoritesController selectionIndex] == NSNotFound) + return nil; + + return [favoritesController selection]; +} + +/** + * fetches the password [self selectedFavorite] from the keychain, returns nil if no selection. + */ +- (NSString *)selectedFavoritePassword +{ + if (![self selectedFavorite]) + return nil; + + NSString *keychainName = [NSString stringWithFormat:@"Sequel Pro : %@", [self valueForKeyPath:@"selectedFavorite.name"]]; + NSString *keychainAccount = [NSString stringWithFormat:@"%@@%@/%@", + [self valueForKeyPath:@"selectedFavorite.user"], + [self valueForKeyPath:@"selectedFavorite.host"], + [self valueForKeyPath:@"selectedFavorite.database"]]; + + return [keyChainInstance getPasswordForName:keychainName account:keychainAccount]; +} + +- (void)connectSheetAddToFavorites:(id)sender +{ + [self addToFavoritesHost:[hostField stringValue] socket:[socketField stringValue] user:[userField stringValue] password:[passwordField stringValue] port:[portField stringValue] database:[databaseField stringValue] useSSH:false sshHost:@"" sshUser:@"" sshPassword:@"" sshPort:@""]; +} + +/** + * add actual connection to favorites + */ +- (void)addToFavoritesHost:(NSString *)host socket:(NSString *)socket + user:(NSString *)user password:(NSString *)password + port:(NSString *)port database:(NSString *)database + useSSH:(BOOL)useSSH // no-longer in use + sshHost:(NSString *)sshHost // no-longer in use + sshUser:(NSString *)sshUser // no-longer in use + sshPassword:(NSString *)sshPassword // no-longer in use + sshPort:(NSString *)sshPort // no-longer in use +{ + NSString *favoriteName = [NSString stringWithFormat:@"%@@%@", user, host]; + if (![database isEqualToString:@""]) + favoriteName = [NSString stringWithFormat:@"%@ %@", database, favoriteName]; + + // test if host and socket are not nil + if ([host isEqualToString:@""] && [socket isEqualToString:@""]) { + NSRunAlertPanel(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"Please enter at least a host or socket.", @"message of panel when host/socket are missing"), NSLocalizedString(@"OK", @"OK button"), nil, nil); + return; + } + + [self willChangeValueForKey:@"favorites"]; + + // write favorites and password + NSDictionary *newFavorite = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:favoriteName, host, socket, user, port, database, nil] + forKeys:[NSArray arrayWithObjects:@"name", @"host", @"socket", @"user", @"port", @"database", nil]]; + [favorites addObject:newFavorite]; + + if (![password isEqualToString:@""]) { + [keyChainInstance addPassword:password + forName:[NSString stringWithFormat:@"Sequel Pro : %@", favoriteName] + account:[NSString stringWithFormat:@"%@@%@/%@", user, host, database]]; + } + + // select new favorite + selectedFavorite = [favoriteName retain]; + + [self didChangeValueForKey:@"favorites"]; +} + +/** + * alert sheets method + * invoked when alertSheet get closed + * if contextInfo == connect -> reopens the connectSheet + * if contextInfo == removedatabase -> tries to remove the selected database + */ +- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo +{ + [sheet orderOut:self]; + + if ([contextInfo isEqualToString:@"connect"]) { + [self connectToDB:nil]; + return; + } + + if ([contextInfo isEqualToString:@"removedatabase"]) { + if (returnCode != NSAlertDefaultReturn) + return; + + [mySQLConnection queryString:[NSString stringWithFormat:@"DROP DATABASE `%@`", [self database]]]; + if (![[mySQLConnection getLastErrorMessage] isEqualToString:@""]) { + // error while deleting db + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, [NSString stringWithFormat:NSLocalizedString(@"Couldn't remove database.\nMySQL said: %@", @"message of panel when removing db failed"), [mySQLConnection getLastErrorMessage]]); + return; + } + + // db deleted with success + selectedDatabase = nil; + [self setDatabases:self]; + [tablesListInstance setConnection:mySQLConnection]; + [tableDumpInstance setConnection:mySQLConnection]; + [tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@@%@/", mySQLVersion, [userField stringValue], [hostField stringValue]]]; + } +} + + +#pragma mark database methods + +/** + * sets up the database select toolbar item + */ +- (IBAction)setDatabases:(id)sender; +{ + if (!chooseDatabaseButton) + return; + + [chooseDatabaseButton removeAllItems]; + [chooseDatabaseButton addItemWithTitle:NSLocalizedString(@"Choose Database...", @"menu item for choose db")]; + [[chooseDatabaseButton menu] addItem:[NSMenuItem separatorItem]]; + [[chooseDatabaseButton menu] addItemWithTitle:NSLocalizedString(@"Add Database...", @"menu item to add db") action:@selector(addDatabase:) keyEquivalent:@""]; + [[chooseDatabaseButton menu] addItem:[NSMenuItem separatorItem]]; + + + MCPResult *queryResult = [mySQLConnection listDBs]; + int i; + for ( i = 0 ; i < [queryResult numOfRows] ; i++ ) { + [queryResult dataSeek:i]; + [chooseDatabaseButton addItemWithTitle:[[queryResult fetchRowAsArray] objectAtIndex:0]]; + } + if ( ![self database] ) { + [chooseDatabaseButton selectItemAtIndex:0]; + } else { + [chooseDatabaseButton selectItemWithTitle:[self database]]; + } +} + +/** + * selects the database choosen by the user + * errorsheet if connection failed + */ +- (IBAction)chooseDatabase:(id)sender +{ + if (![tablesListInstance selectionShouldChangeInTableView:nil]) { + [chooseDatabaseButton selectItemWithTitle:[self database]]; + return; + } + + if ( [chooseDatabaseButton indexOfSelectedItem] == 0 ) { + if ([self database]) { + [chooseDatabaseButton selectItemWithTitle:[self database]]; + } + return; + } + + // show error on connection failed + if ( ![mySQLConnection selectDB:[chooseDatabaseButton titleOfSelectedItem]] ) { + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, [NSString stringWithFormat:NSLocalizedString(@"Unable to connect to database %@.\nBe sure that you have the necessary privileges.", @"message of panel when connection to db failed after selecting from popupbutton"), [chooseDatabaseButton titleOfSelectedItem]]); + [self setDatabases:self]; + return; + } + + //setConnection of TablesList and TablesDump to reload tables in db + [selectedDatabase release]; + selectedDatabase = nil; + selectedDatabase = [[chooseDatabaseButton titleOfSelectedItem] retain]; + [tablesListInstance setConnection:mySQLConnection]; + [tableDumpInstance setConnection:mySQLConnection]; + [tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@@%@/%@", mySQLVersion, [userField stringValue], [hostField stringValue], [self database]]]; +} + +/** + * opens the add-db sheet and creates the new db + */ +- (IBAction)addDatabase:(id)sender +{ + int code = 0; + + if (![tablesListInstance selectionShouldChangeInTableView:nil]) + return; + + [databaseNameField setStringValue:@""]; + [NSApp beginSheet:databaseSheet + modalForWindow:tableWindow + modalDelegate:self + didEndSelector:nil + contextInfo:nil]; + code = [NSApp runModalForWindow:databaseSheet]; + + [NSApp endSheet:databaseSheet]; + [databaseSheet orderOut:nil]; + + if (!code) + return; + + if ([[databaseNameField stringValue] isEqualToString:@""]) { + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, NSLocalizedString(@"Database must have a name.", @"message of panel when no db name is given")); + return; + } + + [mySQLConnection queryString:[NSString stringWithFormat:@"CREATE DATABASE `%@`", [databaseNameField stringValue]]]; + if (![[mySQLConnection getLastErrorMessage] isEqualToString:@""]) { + //error while creating db + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, [NSString stringWithFormat:NSLocalizedString(@"Couldn't create database.\nMySQL said: %@", @"message of panel when creation of db failed"), [mySQLConnection getLastErrorMessage]]); + return; + } + + if (![mySQLConnection selectDB:[databaseNameField stringValue]] ) { //error while selecting new db (is this possible?!) + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, [NSString stringWithFormat:NSLocalizedString(@"Unable to connect to database %@.\nBe sure that you have the necessary privileges.", @"message of panel when connection to db failed after selecting from popupbutton"), + [databaseNameField stringValue]]); + [self setDatabases:self]; + return; + } + + //select new db + [selectedDatabase release]; + selectedDatabase = nil; + selectedDatabase = [[databaseNameField stringValue] retain]; + [self setDatabases:self]; + [tablesListInstance setConnection:mySQLConnection]; + [tableDumpInstance setConnection:mySQLConnection]; + [tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@@%@/%@", mySQLVersion, [userField stringValue], [hostField stringValue], selectedDatabase]]; +} + +/** + * closes the add-db sheet and stops modal session + */ +- (IBAction)closeDatabaseSheet:(id)sender +{ + [NSApp stopModalWithCode:[sender tag]]; +} + +/** + * opens sheet to ask user if he really wants to delete the db + */ +- (IBAction)removeDatabase:(id)sender +{ + if ([chooseDatabaseButton indexOfSelectedItem] == 0) + return; + if (![tablesListInstance selectionShouldChangeInTableView:nil]) + return; + + NSBeginAlertSheet(NSLocalizedString(@"Warning", @"warning"), NSLocalizedString(@"Delete", @"delete button"), NSLocalizedString(@"Cancel", @"cancel button"), nil, tableWindow, self, nil, @selector(sheetDidEnd:returnCode:contextInfo:), @"removedatabase", [NSString stringWithFormat:NSLocalizedString(@"Do you really want to delete the database %@?", @"message of panel asking for confirmation for deleting db"), [self database]]); +} + +#pragma mark console methods + +//console methods +/** + * shows or hides the console + */ +- (void)toggleConsole:(id)sender +{ + NSDrawerState state = [consoleDrawer state]; + if (NSDrawerOpeningState == state || NSDrawerOpenState == state) { + [consoleDrawer close]; + } else { + [consoleTextView scrollRangeToVisible:[consoleTextView selectedRange]]; + [consoleDrawer openOnEdge:NSMinYEdge]; + } +} + +/** + * clears the console + */ +- (void)clearConsole:(id)sender +{ + [consoleTextView setString:@""]; +} + +/** + * returns YES if the console is visible + */ +- (BOOL)consoleIsOpened +{ + return ([consoleDrawer state] == NSDrawerOpeningState || [consoleDrawer state] == NSDrawerOpenState); +} + +/** + * shows a message in the console + */ +- (void)showMessageInConsole:(NSString *)message +{ + int begin, end; + + [consoleTextView setSelectedRange:NSMakeRange([[consoleTextView string] length],0)]; + begin = [[consoleTextView string] length]; + [consoleTextView replaceCharactersInRange:NSMakeRange(begin,0) withString:message]; + end = [[consoleTextView string] length]; + [consoleTextView setTextColor:[NSColor blackColor] range:NSMakeRange(begin,end-begin)]; + if ([self consoleIsOpened]) { + [consoleTextView displayIfNeeded]; + [consoleTextView scrollRangeToVisible:[consoleTextView selectedRange]]; + } +} + +/** + * shows an error in the console (red) + */ +- (void)showErrorInConsole:(NSString *)error +{ + int begin, end; + + [consoleTextView setSelectedRange:NSMakeRange([[consoleTextView string] length],0)]; + begin = [[consoleTextView string] length]; + [consoleTextView replaceCharactersInRange:NSMakeRange(begin,0) withString:error]; + end = [[consoleTextView string] length]; + [consoleTextView setTextColor:[NSColor redColor] range:NSMakeRange(begin,end-begin)]; + if ([self consoleIsOpened]) { + [consoleTextView displayIfNeeded]; + [consoleTextView scrollRangeToVisible:[consoleTextView selectedRange]]; + } +} + +#pragma mark Encoding Methods + +/** + * Set the encoding for the database connection + */ +- (void)setEncoding:(NSString *)mysqlEncoding +{ + // set encoding of connection and client + [mySQLConnection queryString:[NSString stringWithFormat:@"SET NAMES '%@'", mysqlEncoding]]; + if ( [[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) { + [mySQLConnection setEncoding:[CMMCPConnection encodingForMySQLEncoding:[mysqlEncoding cString]]]; + [_encoding autorelease]; + _encoding = [mysqlEncoding retain]; + } else { + [self detectEncoding]; + } + + // update the selected menu item + [self updateEncodingMenuWithSelectedEncoding:[self encodingNameFromMySQLEncoding:mysqlEncoding]]; + + // reload stuff + [tableSourceInstance reloadTable:self]; + [tableContentInstance reloadTable:self]; + [tableStatusInstance reloadTable:self]; +} + +/** + * returns the current mysql encoding for this object + */ +- (NSString *)encoding +{ + return _encoding; +} + +/** + * updates the currently selected item in the encoding menu + * + * @param NSString *encoding - the title of the menu item which will be selected + */ +- (void)updateEncodingMenuWithSelectedEncoding:(NSString *)encoding +{ + NSEnumerator *dbEncodingMenuEn = [[selectEncodingMenu itemArray] objectEnumerator]; + id menuItem; + int correctStateForMenuItem; + while (menuItem = [dbEncodingMenuEn nextObject]) { + correctStateForMenuItem = [[menuItem title] isEqualToString:encoding] ? NSOnState : NSOffState; + + if ([menuItem state] == correctStateForMenuItem) // don't re-apply state incase it causes performance issues + continue; + + [menuItem setState:correctStateForMenuItem]; + } +} + +/** + * Returns the display name for a mysql encoding + */ +- (NSString *)encodingNameFromMySQLEncoding:(NSString *)mysqlEncoding +{ + NSDictionary *translationMap = [NSDictionary dictionaryWithObjectsAndKeys: + @"UCS-2 Unicode (ucs2)", @"ucs2", + @"UTF-8 Unicode (utf8)", @"utf8", + @"US ASCII (ascii)", @"ascii", + @"ISO Latin 1 (latin1)", @"latin1", + @"Mac Roman (macroman)", @"macroman", + @"Windows Latin 2 (cp1250)", @"cp1250", + @"ISO Latin 2 (latin2)", @"latin2", + @"Windows Arabic (cp1256)", @"cp1256", + @"ISO Greek (greek)", @"greek", + @"ISO Hebrew (hebrew)", @"hebrew", + @"ISO Turkish (latin5)", @"latin5", + @"Windows Baltic (cp1257)", @"cp1257", + @"Windows Cyrillic (cp1251)", @"cp1251", + @"Big5 Traditional Chinese (big5)", @"big5", + @"Shift-JIS Japanese (sjis)", @"sjis", + @"EUC-JP Japanese (ujis)", @"ujis", + nil]; + NSString *encodingName = [translationMap valueForKey:mysqlEncoding]; + + if (!encodingName) + return [NSString stringWithFormat:@"Unknown Encoding (%@)", mysqlEncoding, nil]; + + return encodingName; +} + +/** + * Returns the mysql encoding for an encoding string that is displayed to the user + */ +- (NSString *)mysqlEncodingFromDisplayEncoding:(NSString *)encodingName +{ + NSDictionary *translationMap = [NSDictionary dictionaryWithObjectsAndKeys: + @"ucs2", @"UCS-2 Unicode (ucs2)", + @"utf8", @"UTF-8 Unicode (utf8)", + @"ascii", @"US ASCII (ascii)", + @"latin1", @"ISO Latin 1 (latin1)", + @"macroman", @"Mac Roman (macroman)", + @"cp1250", @"Windows Latin 2 (cp1250)", + @"latin2", @"ISO Latin 2 (latin2)", + @"cp1256", @"Windows Arabic (cp1256)", + @"greek", @"ISO Greek (greek)", + @"hebrew", @"ISO Hebrew (hebrew)", + @"latin5", @"ISO Turkish (latin5)", + @"cp1257", @"Windows Baltic (cp1257)", + @"cp1251", @"Windows Cyrillic (cp1251)", + @"big5", @"Big5 Traditional Chinese (big5)", + @"sjis", @"Shift-JIS Japanese (sjis)", + @"ujis", @"EUC-JP Japanese (ujis)", + nil]; + NSString *mysqlEncoding = [translationMap valueForKey:encodingName]; + + if (!mysqlEncoding) + return @"utf8"; + + return mysqlEncoding; +} + +/** + * Autodetect the connection encoding and select the relevant encoding menu item in Database -> Database Encoding + */ +- (void)detectEncoding +{ + // mysql > 4.0 + id mysqlEncoding = [[[mySQLConnection queryString:@"SHOW VARIABLES LIKE 'character_set_connection'"] fetchRowAsDictionary] objectForKey:@"Value"]; + _supportsEncoding = (mysqlEncoding != nil); + + if ( [mysqlEncoding isKindOfClass:[NSData class]] ) { // MySQL 4.1.14 returns the mysql variables as nsdata + mysqlEncoding = [mySQLConnection stringWithText:mysqlEncoding]; + } + if ( !mysqlEncoding ) { // mysql 4.0 or older -> only default character set possible, cannot choose others using "set names xy" + mysqlEncoding = [[[mySQLConnection queryString:@"SHOW VARIABLES LIKE 'character_set'"] fetchRowAsDictionary] objectForKey:@"Value"]; + } + if ( !mysqlEncoding ) { // older version? -> set encoding to mysql default encoding latin1 + NSLog(@"error: no character encoding found, mysql version is %@", [self mySQLVersion]); + mysqlEncoding = @"latin1"; + } + [mySQLConnection setEncoding:[CMMCPConnection encodingForMySQLEncoding:[mysqlEncoding cString]]]; + + // save the encoding + [_encoding autorelease]; + _encoding = [mysqlEncoding retain]; + + // update the selected menu item + [self updateEncodingMenuWithSelectedEncoding:[self encodingNameFromMySQLEncoding:mysqlEncoding]]; +} + +/** + * when sent by an NSMenuItem, will set the encoding based on the title of the menu item + */ +- (IBAction)chooseEncoding:(id)sender +{ + [self setEncoding:[self mysqlEncodingFromDisplayEncoding:[(NSMenuItem *)sender title]]]; +} + +/** + * return YES if MySQL server supports choosing connection and table encodings (MySQL 4.1 and newer) + */ +- (BOOL)supportsEncoding +{ + return _supportsEncoding; +} + + +#pragma mark Table Methods + +- (IBAction)showCreateTableSyntax:(id)sender +{ + //Create the query and get results + NSString *query = [NSString stringWithFormat:@"SHOW CREATE TABLE `%@`", [self table]]; + CMMCPResult *theResult = [mySQLConnection queryString:query]; + + // Check for errors + if (![[mySQLConnection getLastErrorMessage] isEqualToString:@""]) { + NSRunAlertPanel(@"Error", [NSString stringWithFormat:@"An error occured while creating table syntax.\n\n: %@",[mySQLConnection getLastErrorMessage]], @"OK", nil, nil); + return; + } + + id tableSyntax = [[theResult fetchRowAsArray] objectAtIndex:1]; + + if ([tableSyntax isKindOfClass:[NSData class]]) + tableSyntax = [[NSString alloc] initWithData:tableSyntax encoding:[mySQLConnection encoding]]; + + [syntaxViewContent setString:tableSyntax]; + [createTableSyntaxWindow makeKeyAndOrderFront:self]; +} + +- (IBAction)copyCreateTableSyntax:(id)sender +{ + // Create the query and get results + NSString *query = [NSString stringWithFormat:@"SHOW CREATE TABLE `%@`", [self table]]; + CMMCPResult *theResult = [mySQLConnection queryString:query]; + + // Check for errors + if (![[mySQLConnection getLastErrorMessage] isEqualToString:@""]) { + NSRunAlertPanel(@"Error", [NSString stringWithFormat:@"An error occured while creating table syntax.\n\n: %@",[mySQLConnection getLastErrorMessage]], @"OK", nil, nil); + return; + } + + id tableSyntax = [[theResult fetchRowAsArray] objectAtIndex:1]; + + if ([tableSyntax isKindOfClass:[NSData class]]) + tableSyntax = [[NSString alloc] initWithData:tableSyntax encoding:[mySQLConnection encoding]]; + + // copy to the clipboard + NSPasteboard *pb = [NSPasteboard generalPasteboard]; + [pb declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:self]; + [pb setString:tableSyntax forType:NSStringPboardType]; + + // Table Syntax Copied Growl Notification + [GrowlApplicationBridge notifyWithTitle:@"Table Syntax Copied" + description:[NSString stringWithFormat:NSLocalizedString(@"Syntax for %@ table copied",@"description for table syntax copied growl notification"), [self table]] + notificationName:@"Table Syntax Copied" + iconData:nil + priority:0 + isSticky:NO + clickContext:nil + ]; +} + +- (IBAction)checkTable:(id)sender +{ + NSString *query; + CMMCPResult *theResult; + NSDictionary *theRow; + + //Create the query and get results + query = [NSString stringWithFormat:@"CHECK TABLE `%@`", [self table]]; + theResult = [mySQLConnection queryString:query]; + + // Check for errors + if (![[mySQLConnection getLastErrorMessage] isEqualToString:@""]) { + NSRunAlertPanel(@"Error", [NSString stringWithFormat:@"An error occured while checking table.\n\n: %@",[mySQLConnection getLastErrorMessage]], @"OK", nil, nil); + return; + } + + // Process result + theRow = [[theResult fetch2DResultAsType:MCPTypeDictionary] lastObject]; + NSRunInformationalAlertPanel([NSString stringWithFormat:@"Check '%@' table", [self table]], [NSString stringWithFormat:@"Check: %@", [theRow objectForKey:@"Msg_text"]], @"OK", nil, nil); +} + +- (IBAction)analyzeTable:(id)sender +{ + NSString *query; + CMMCPResult *theResult; + NSDictionary *theRow; + + //Create the query and get results + query = [NSString stringWithFormat:@"ANALYZE TABLE `%@`", [self table]]; + theResult = [mySQLConnection queryString:query]; + + // Check for errors + if (![[mySQLConnection getLastErrorMessage] isEqualToString:@""]) { + NSRunAlertPanel(@"Error", [NSString stringWithFormat:@"An error occured while analyzing table.\n\n: %@",[mySQLConnection getLastErrorMessage]], @"OK", nil, nil); + return; + } + + // Process result + theRow = [[theResult fetch2DResultAsType:MCPTypeDictionary] lastObject]; + NSRunInformationalAlertPanel([NSString stringWithFormat:@"Analyze '%@' table", [self table]], [NSString stringWithFormat:@"Analyze: %@", [theRow objectForKey:@"Msg_text"]], @"OK", nil, nil); +} + +- (IBAction)optimizeTable:(id)sender +{ + NSString *query; + CMMCPResult *theResult; + NSDictionary *theRow; + + //Create the query and get results + query = [NSString stringWithFormat:@"OPTIMIZE TABLE `%@`", [self table]]; + theResult = [mySQLConnection queryString:query]; + + // Check for errors + if (![[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) { + NSRunAlertPanel(@"Error", [NSString stringWithFormat:@"An error occured while optimizing table.\n\n: %@",[mySQLConnection getLastErrorMessage]], @"OK", nil, nil); + } + + // Process result + theRow = [[theResult fetch2DResultAsType:MCPTypeDictionary] lastObject]; + NSRunInformationalAlertPanel([NSString stringWithFormat:@"Optimize '%@' table", [self table]], [NSString stringWithFormat:@"Optimize: %@", [theRow objectForKey:@"Msg_text"]], @"OK", nil, nil); +} + +- (IBAction)repairTable:(id)sender +{ + NSString *query; + CMMCPResult *theResult; + NSDictionary *theRow; + + //Create the query and get results + query = [NSString stringWithFormat:@"REPAIR TABLE `%@`", [self table]]; + theResult = [mySQLConnection queryString:query]; + + // Check for errors + if (![[mySQLConnection getLastErrorMessage] isEqualToString:@""]) { + NSRunAlertPanel(@"Error", [NSString stringWithFormat:@"An error occured while repairing table.\n\n: %@",[mySQLConnection getLastErrorMessage]], @"OK", nil, nil); + } + + // Process result + theRow = [[theResult fetch2DResultAsType:MCPTypeDictionary] lastObject]; + NSRunInformationalAlertPanel([NSString stringWithFormat:@"Repair '%@' table", [self table]], [NSString stringWithFormat:@"Repair: %@", [theRow objectForKey:@"Msg_text"]], @"OK", nil, nil); +} + +- (IBAction)flushTable:(id)sender +{ + NSString *query; + CMMCPResult *theResult; + + //Create the query and get results + query = [NSString stringWithFormat:@"FLUSH TABLE `%@`", [self table]]; + theResult = [mySQLConnection queryString:query]; + + // Check for errors + if (![[mySQLConnection getLastErrorMessage] isEqualToString:@""]) { + NSRunAlertPanel(@"Error", [NSString stringWithFormat:@"An error occured while flushing table.\n\n: %@",[mySQLConnection getLastErrorMessage]], @"OK", nil, nil); + return; + } + + // Process result + NSRunInformationalAlertPanel([NSString stringWithFormat:@"Flush '%@' table", [self table]], @"Flushed", @"OK", nil, nil); +} + +- (IBAction)checksumTable:(id)sender +{ + NSString *query; + CMMCPResult *theResult; + NSDictionary *theRow; + + //Create the query and get results + query = [NSString stringWithFormat:@"CHECKSUM TABLE `%@`", [self table]]; + theResult = [mySQLConnection queryString:query]; + + // Check for errors + if (![[mySQLConnection getLastErrorMessage] isEqualToString:@""]) { + NSRunAlertPanel(@"Error", [NSString stringWithFormat:@"An error occured while performming checksum on table.\n\n: %@",[mySQLConnection getLastErrorMessage]], @"OK", nil, nil); + } + + // Process result + theRow = [[theResult fetch2DResultAsType:MCPTypeDictionary] lastObject]; + NSRunInformationalAlertPanel([NSString stringWithFormat:@"Checksum '%@' table", [self table]], [NSString stringWithFormat:@"Checksum: %@", [theRow objectForKey:@"Checksum"]], @"OK", nil, nil); +} + +#pragma mark Other Methods +/** + * returns the host + */ +- (NSString *)host +{ + return [hostField stringValue]; +} + +/** + * passes query to tablesListInstance + */ +- (void)doPerformQueryService:(NSString *)query +{ + [tableWindow makeKeyAndOrderFront:self]; + [tablesListInstance doPerformQueryService:query]; +} + +/** + * flushes the mysql privileges + */ +- (void)flushPrivileges:(id)sender +{ + [mySQLConnection queryString:@"FLUSH PRIVILEGES"]; + + if ( [[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) { + //flushed privileges without errors + NSBeginAlertSheet(NSLocalizedString(@"Flushed Privileges", @"title of panel when successfully flushed privs"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, NSLocalizedString(@"Succesfully flushed privileges.", @"message of panel when successfully flushed privs")); + } else { + //error while flushing privileges + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, [NSString stringWithFormat:NSLocalizedString(@"Couldn't flush privileges.\nMySQL said: %@", @"message of panel when flushing privs failed"), + [mySQLConnection getLastErrorMessage]]); + } +} + +- (void)showVariables:(id)sender +/* +shows the mysql variables +*/ +{ + CMMCPResult *theResult; + NSMutableArray *tempResult = [NSMutableArray array]; + int i; + + if ( variables ) { + [variables release]; + variables = nil; + } + //get variables + theResult = [mySQLConnection queryString:@"SHOW VARIABLES"]; + for ( i = 0 ; i < [theResult numOfRows] ; i++ ) { + [theResult dataSeek:i]; + [tempResult addObject:[theResult fetchRowAsDictionary]]; + } + variables = [[NSArray arrayWithArray:tempResult] retain]; + [variablesTableView reloadData]; + //show variables sheet + [NSApp beginSheet:variablesSheet + modalForWindow:tableWindow modalDelegate:self + didEndSelector:nil contextInfo:nil]; + [NSApp runModalForWindow:variablesSheet]; + + [NSApp endSheet:variablesSheet]; + [variablesSheet orderOut:nil]; +} + +- (void)closeConnection +{ + [mySQLConnection disconnect]; + + // Disconnected Growl Notification + [GrowlApplicationBridge notifyWithTitle:@"Disconnected" + description:[NSString stringWithFormat:NSLocalizedString(@"Disconnected from %@",@"description for disconnected growl notification"), [tableWindow title]] + notificationName:@"Disconnected" + iconData:nil + priority:0 + isSticky:NO + clickContext:nil + ]; +} + + +//getter methods +- (NSString *)database +/* +returns the currently selected database +*/ +{ + return selectedDatabase; +} + +- (NSString *)table +/* +returns the currently selected table (passing the request to TablesList) +*/ +{ + return (NSString *)[tablesListInstance table]; +} + +- (NSString *)mySQLVersion +/* +returns the mysql version +*/ +{ + return mySQLVersion; +} + +- (NSString *)user +/* +returns the mysql version +*/ +{ + return [userField stringValue]; +} + + +//notification center methods +- (void)willPerformQuery:(NSNotification *)notification +/* +invoked before a query is performed +*/ +{ + [queryProgressBar startAnimation:self]; +} + +- (void)hasPerformedQuery:(NSNotification *)notification +/* +invoked after a query has been performed +*/ +{ + [queryProgressBar stopAnimation:self]; +} + +- (void)applicationWillTerminate:(NSNotification *)notification +/* +invoked when the application will terminate +*/ +{ + [tablesListInstance selectionShouldChangeInTableView:nil]; +} + +- (void)tunnelStatusChanged:(NSNotification *)notification +/* +the status of the tunnel has changed +*/ +{ +} + +//menu methods +- (IBAction)import:(id)sender +/* +passes the request to the tableDump object +*/ +{ + [tableDumpInstance importFile:[sender tag]]; +} + +- (IBAction)importCSV:(id)sender +{ + return [self import:sender]; +} + +- (IBAction)export:(id)sender +/* +passes the request to the tableDump object +*/ +{ + [tableDumpInstance exportFile:[sender tag]]; +} + +- (IBAction)exportTable:(id)sender +{ + return [self export:sender]; +} + +- (IBAction)exportMultipleTables:(id)sender +{ + return [self export:sender]; +} + +/** + * Menu validation + */ +- (BOOL)validateMenuItem:(NSMenuItem *)menuItem +{ + if ([menuItem action] == @selector(import:)) { + return ([self database] != nil); + } + + if ([menuItem action] == @selector(importCSV:)) { + return ([self database] != nil && [self table] != nil); + } + + if ([menuItem action] == @selector(export:)) { + return ([self database] != nil); + } + + if ([menuItem action] == @selector(exportTable:)) { + return ([self database] != nil && [self table] != nil); + } + + if ([menuItem action] == @selector(exportMultipleTables:)) { + return ([self database] != nil); + } + + if ([menuItem action] == @selector(chooseEncoding:)) { + return [self supportsEncoding]; + } + + // table menu items + if ([menuItem action] == @selector(showCreateTableSyntax:) || + [menuItem action] == @selector(copyCreateTableSyntax:) || + [menuItem action] == @selector(checkTable:) || + [menuItem action] == @selector(analyzeTable:) || + [menuItem action] == @selector(optimizeTable:) || + [menuItem action] == @selector(repairTable:) || + [menuItem action] == @selector(flushTable:) || + [menuItem action] == @selector(checksumTable:)) + { + return ([self table] != nil && [[self table] isNotEqualTo:@""]); + } + return [super validateMenuItem:menuItem]; +} + +- (IBAction)viewStructure:(id)sender +{ + [tableTabView selectTabViewItemAtIndex:0]; + [mainToolbar setSelectedItemIdentifier:@"SwitchToTableStructureToolbarItemIdentifier"]; +} + +- (IBAction)viewContent:(id)sender +{ + [tableTabView selectTabViewItemAtIndex:1]; + [mainToolbar setSelectedItemIdentifier:@"SwitchToTableContentToolbarItemIdentifier"]; +} + +- (IBAction)viewQuery:(id)sender +{ + [tableTabView selectTabViewItemAtIndex:2]; + [mainToolbar setSelectedItemIdentifier:@"SwitchToRunQueryToolbarItemIdentifier"]; +} + +- (IBAction)viewStatus:(id)sender +{ + [tableTabView selectTabViewItemAtIndex:3]; + [mainToolbar setSelectedItemIdentifier:@"SwitchToTableStatusToolbarItemIdentifier"]; +} + + +#pragma mark Toolbar Methods + +/** + * set up the standard toolbar + */ +- (void)setupToolbar +{ + // create a new toolbar instance, and attach it to our document window + mainToolbar = [[[NSToolbar alloc] initWithIdentifier:@"TableWindowToolbar"] autorelease]; + + // set up toolbar properties + [mainToolbar setAllowsUserCustomization: YES]; + [mainToolbar setAutosavesConfiguration: YES]; + [mainToolbar setDisplayMode:NSToolbarDisplayModeIconAndLabel]; + + // set ourself as the delegate + [mainToolbar setDelegate:self]; + + // attach the toolbar to the document window + [tableWindow setToolbar:mainToolbar]; + + // select the structure toolbar item + [self viewStructure:self]; + + // update the toolbar item size + [self updateChooseDatabaseToolbarItemWidth]; +} + +/** + * toolbar delegate method + */ +- (NSToolbarItem *)toolbar:(NSToolbar *)toolbar itemForItemIdentifier:(NSString *)itemIdentifier willBeInsertedIntoToolbar:(BOOL)willBeInsertedIntoToolbar +{ + NSToolbarItem *toolbarItem = [[[NSToolbarItem alloc] initWithItemIdentifier:itemIdentifier] autorelease]; + + if ([itemIdentifier isEqualToString:@"DatabaseSelectToolbarItemIdentifier"]) { + [toolbarItem setLabel:NSLocalizedString(@"Select Database", @"toolbar item for selecting a db")]; + [toolbarItem setPaletteLabel:[toolbarItem label]]; + [toolbarItem setView:chooseDatabaseButton]; + [toolbarItem setMinSize:NSMakeSize(200,26)]; + [toolbarItem setMaxSize:NSMakeSize(200,32)]; + [chooseDatabaseButton setTarget:self]; + [chooseDatabaseButton setAction:@selector(chooseDatabase:)]; + + if (willBeInsertedIntoToolbar) { + chooseDatabaseToolbarItem = toolbarItem; + [self updateChooseDatabaseToolbarItemWidth]; + } + + } else if ([itemIdentifier isEqualToString:@"ToggleConsoleIdentifier"]) { + //set the text label to be displayed in the toolbar and customization palette + [toolbarItem setPaletteLabel:NSLocalizedString(@"Show/Hide Console", @"toolbar item for show/hide console")]; + //set up tooltip and image + [toolbarItem setToolTip:NSLocalizedString(@"Show or hide the console which shows all MySQL commands performed by Sequel Pro", @"tooltip for toolbar item for show/hide console")]; + if ( [self consoleIsOpened] ) { + [toolbarItem setLabel:NSLocalizedString(@"Hide Console", @"toolbar item for hide console")]; + [toolbarItem setImage:[NSImage imageNamed:@"hideconsole"]]; + } else { + [toolbarItem setLabel:NSLocalizedString(@"Show Console", @"toolbar item for showconsole")]; + [toolbarItem setImage:[NSImage imageNamed:@"showconsole"]]; + } + //set up the target action + [toolbarItem setTarget:self]; + [toolbarItem setAction:@selector(toggleConsole:)]; + + } else if ([itemIdentifier isEqualToString:@"ClearConsoleIdentifier"]) { + //set the text label to be displayed in the toolbar and customization palette + [toolbarItem setLabel:NSLocalizedString(@"Clear Console", @"toolbar item for clear console")]; + [toolbarItem setPaletteLabel:NSLocalizedString(@"Clear Console", @"toolbar item for clear console")]; + //set up tooltip and image + [toolbarItem setToolTip:NSLocalizedString(@"Clear the console which shows all MySQL commands performed by Sequel Pro", @"tooltip for toolbar item for clear console")]; + [toolbarItem setImage:[NSImage imageNamed:@"clearconsole"]]; + //set up the target action + [toolbarItem setTarget:self]; + [toolbarItem setAction:@selector(clearConsole:)]; + + } else if ([itemIdentifier isEqualToString:@"SwitchToTableStructureToolbarItemIdentifier"]) { + [toolbarItem setLabel:NSLocalizedString(@"Table", @"toolbar item label for switching to the Table Structure tab")]; + [toolbarItem setPaletteLabel:NSLocalizedString(@"Table Structure", @"toolbar item label for switching to the Table Structure tab")]; + //set up tooltip and image + [toolbarItem setToolTip:NSLocalizedString(@"Switch to the Table Structure tab", @"tooltip for toolbar item for switching to the Table Structure tab")]; + [toolbarItem setImage:[NSImage imageNamed:@"toolbar-switch-to-structure"]]; + //set up the target action + [toolbarItem setTarget:self]; + [toolbarItem setAction:@selector(viewStructure:)]; + + } else if ([itemIdentifier isEqualToString:@"SwitchToTableContentToolbarItemIdentifier"]) { + [toolbarItem setLabel:NSLocalizedString(@"Browse", @"toolbar item label for switching to the Table Content tab")]; + [toolbarItem setPaletteLabel:NSLocalizedString(@"Table Content", @"toolbar item label for switching to the Table Content tab")]; + //set up tooltip and image + [toolbarItem setToolTip:NSLocalizedString(@"Switch to the Table Content tab", @"tooltip for toolbar item for switching to the Table Content tab")]; + [toolbarItem setImage:[NSImage imageNamed:@"toolbar-switch-to-browse"]]; + //set up the target action + [toolbarItem setTarget:self]; + [toolbarItem setAction:@selector(viewContent:)]; + + } else if ([itemIdentifier isEqualToString:@"SwitchToRunQueryToolbarItemIdentifier"]) { + [toolbarItem setLabel:NSLocalizedString(@"SQL", @"toolbar item label for switching to the Run Query tab")]; + [toolbarItem setPaletteLabel:NSLocalizedString(@"Run Query", @"toolbar item label for switching to the Run Query tab")]; + //set up tooltip and image + [toolbarItem setToolTip:NSLocalizedString(@"Switch to the Run Query tab", @"tooltip for toolbar item for switching to the Run Query tab")]; + [toolbarItem setImage:[NSImage imageNamed:@"toolbar-switch-to-sql"]]; + //set up the target action + [toolbarItem setTarget:self]; + [toolbarItem setAction:@selector(viewQuery:)]; + + } else if ([itemIdentifier isEqualToString:@"SwitchToTableStatusToolbarItemIdentifier"]) { + [toolbarItem setLabel:NSLocalizedString(@"Table Status", @"toolbar item label for switching to the Table Status tab")]; + [toolbarItem setPaletteLabel:NSLocalizedString(@"Table Status", @"toolbar item label for switching to the Table Status tab")]; + //set up tooltip and image + [toolbarItem setToolTip:NSLocalizedString(@"Switch to the Table Status tab", @"tooltip for toolbar item for switching to the Table Status tab")]; + [toolbarItem setImage:[NSImage imageNamed:@"toolbar-switch-to-table-info"]]; + //set up the target action + [toolbarItem setTarget:self]; + [toolbarItem setAction:@selector(viewStatus:)]; + + } else { + //itemIdentifier refered to a toolbar item that is not provided or supported by us or cocoa + toolbarItem = nil; + } + + return toolbarItem; +} + +/** + * toolbar delegate method + */ +- (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar*)toolbar +{ + return [NSArray arrayWithObjects: + @"DatabaseSelectToolbarItemIdentifier", + @"ToggleConsoleIdentifier", + @"ClearConsoleIdentifier", + @"FlushPrivilegesIdentifier", + @"SwitchToTableStructureToolbarItemIdentifier", + @"SwitchToTableContentToolbarItemIdentifier", + @"SwitchToRunQueryToolbarItemIdentifier", + @"SwitchToTableStatusToolbarItemIdentifier", + NSToolbarCustomizeToolbarItemIdentifier, + NSToolbarFlexibleSpaceItemIdentifier, + NSToolbarSpaceItemIdentifier, + NSToolbarSeparatorItemIdentifier, + nil]; +} + +/** + * toolbar delegate method + */ +- (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar*)toolbar +{ + return [NSArray arrayWithObjects: + @"DatabaseSelectToolbarItemIdentifier", + NSToolbarFlexibleSpaceItemIdentifier, + @"SwitchToTableStructureToolbarItemIdentifier", + @"SwitchToTableContentToolbarItemIdentifier", + @"SwitchToRunQueryToolbarItemIdentifier", + NSToolbarFlexibleSpaceItemIdentifier, + nil]; +} + +- (NSArray *)toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar +{ + return [NSArray arrayWithObjects: + @"SwitchToTableStructureToolbarItemIdentifier", + @"SwitchToTableContentToolbarItemIdentifier", + @"SwitchToRunQueryToolbarItemIdentifier", + @"SwitchToTableStatusToolbarItemIdentifier", + nil]; + +} + +/** + * validates the toolbar items + */ +- (BOOL)validateToolbarItem:(NSToolbarItem *)toolbarItem; +{ + if ( [[toolbarItem itemIdentifier] isEqualToString:@"ToggleConsoleIdentifier"] ) { + if ( [self consoleIsOpened] ) { + [toolbarItem setLabel:@"Hide Console"]; + [toolbarItem setImage:[NSImage imageNamed:@"hideconsole"]]; + } else { + [toolbarItem setLabel:@"Show Console"]; + [toolbarItem setImage:[NSImage imageNamed:@"showconsole"]]; + } + } + + return YES; +} + + +//NSDocument methods +- (NSString *)windowNibName +/* +returns the name of the nib file +*/ +{ + return @"DBView"; +} + +- (void)windowControllerDidLoadNib:(NSWindowController *) aController +/* +code that need to be executed once the windowController has loaded the document's window +sets upt the interface (small fonts) +*/ +{ + [aController setShouldCascadeWindows:YES]; + [super windowControllerDidLoadNib:aController]; + + NSEnumerator *theCols = [[variablesTableView tableColumns] objectEnumerator]; + NSTableColumn *theCol; + +// [tableWindow makeKeyAndOrderFront:self]; + + prefs = [[NSUserDefaults standardUserDefaults] retain]; + selectedFavorite = [[NSString alloc] initWithString:NSLocalizedString(@"Custom", @"menu item for custom connection")]; + + //register for notifications + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(willPerformQuery:) + name:@"SMySQLQueryWillBePerformed" object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(hasPerformedQuery:) + name:@"SMySQLQueryHasBeenPerformed" object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillTerminate:) + name:@"NSApplicationWillTerminateNotification" object:nil]; + + //set up interface + if ( [prefs boolForKey:@"useMonospacedFonts"] ) { + [consoleTextView setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]]; + [syntaxViewContent setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]]; + + while ( (theCol = [theCols nextObject]) ) { + [[theCol dataCell] setFont:[NSFont fontWithName:@"Monaco" size:10]]; + } + } else { + [consoleTextView setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; + [syntaxViewContent setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; + while ( (theCol = [theCols nextObject]) ) { + [[theCol dataCell] setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; + } + } + [consoleDrawer setContentSize:NSMakeSize(110,110)]; + + //set up toolbar + [self setupToolbar]; + [self connectToDB:nil]; +} + +- (void)windowWillClose:(NSNotification *)aNotification +{ + [self closeConnection]; + + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + + +//NSWindow delegate methods +- (BOOL)windowShouldClose:(id)sender +/* +invoked when the document window should close +*/ +{ + if ( ![tablesListInstance selectionShouldChangeInTableView:nil] ) { + return NO; + } else { + return YES; + } + +} + + +//SMySQL delegate methods +- (void)willQueryString:(NSString *)query +/* +invoked when framework will perform a query +*/ +{ + NSString *currentTime = [[NSDate date] descriptionWithCalendarFormat:@"%H:%M:%S" timeZone:nil locale:nil]; + + [self showMessageInConsole:[NSString stringWithFormat:@"/* MySQL %@ */ %@;\n", currentTime, query]]; +} + +- (void)queryGaveError:(NSString *)error +/* +invoked when query gave an error +*/ +{ + NSString *currentTime = [[NSDate date] descriptionWithCalendarFormat:@"%H:%M:%S" timeZone:nil locale:nil]; + + [self showErrorInConsole:[NSString stringWithFormat:@"/* ERROR %@ */ %@;\n", currentTime, error]]; +} + +#pragma mark SplitView delegate methods + +/** + * tells the splitView that it can collapse views + */ +- (BOOL)splitView:(NSSplitView *)sender canCollapseSubview:(NSView *)subview +{ + return YES; +} + +/** + * defines max position of splitView + */ +- (float)splitView:(NSSplitView *)sender constrainMaxCoordinate:(float)proposedMax ofSubviewAt:(int)offset +{ + return proposedMax - 600; +} + +/** + * defines min position of splitView + */ +- (float)splitView:(NSSplitView *)sender constrainMinCoordinate:(float)proposedMin ofSubviewAt:(int)offset +{ + return proposedMin + 160; +} + +- (void)splitViewDidResizeSubviews:(NSNotification *)notification +{ + [self updateChooseDatabaseToolbarItemWidth]; +} + +- (NSRect)splitView:(NSSplitView *)splitView additionalEffectiveRectOfDividerAtIndex:(int)dividerIndex +{ + if (sidebarGrabber != nil) { + return [sidebarGrabber convertRect:[sidebarGrabber bounds] toView:splitView]; + } else { + return NSZeroRect; + } +} + +- (void)updateChooseDatabaseToolbarItemWidth +{ + // make sure the toolbar item is actually in the toolbar + if (!chooseDatabaseToolbarItem) + return; + + // grab the width of the left pane + float leftPaneWidth = [dbTablesTableView frame].size.width; + + // subtract some pixels to allow for misc stuff + leftPaneWidth -= 12; + + // make sure it's not too small or to big + if (leftPaneWidth < 130) + leftPaneWidth = 130; + if (leftPaneWidth > 360) + leftPaneWidth = 360; + + // apply the size + [chooseDatabaseToolbarItem setMinSize:NSMakeSize(leftPaneWidth, 26)]; + [chooseDatabaseToolbarItem setMaxSize:NSMakeSize(leftPaneWidth, 32)]; +} + + +//tableView datasource methods +- (int)numberOfRowsInTableView:(NSTableView *)aTableView +{ + return [variables count]; +} + +- (id)tableView:(NSTableView *)aTableView + objectValueForTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex +{ + id theValue; + + theValue = [[variables objectAtIndex:rowIndex] objectForKey:[aTableColumn identifier]]; + + if ( [theValue isKindOfClass:[NSData class]] ) { + theValue = [[NSString alloc] initWithData:theValue encoding:[mySQLConnection encoding]]; + } + + return theValue; +} + +- (void)dealloc +{ + [chooseDatabaseButton release]; + [mySQLConnection release]; + [favorites release]; + [variables release]; + [selectedDatabase release]; + [selectedFavorite release]; + [mySQLVersion release]; + [prefs release]; + + [super dealloc]; +} + +@end diff --git a/trunk/TableDocumentSplitView.h b/trunk/TableDocumentSplitView.h new file mode 100644 index 00000000..798e8088 --- /dev/null +++ b/trunk/TableDocumentSplitView.h @@ -0,0 +1,35 @@ +// +// TableDocumentSplitView.h +// sequel-pro +// +// Created by Abhi Beckert (abhibeckert.com) on 2008-04-24. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at +// + +#import + +/** + * This is the main split view in the main database window (left col tables list + * right col main window content) + */ + +@interface TableDocumentSplitView : NSSplitView { + +} + +@end diff --git a/trunk/TableDocumentSplitView.m b/trunk/TableDocumentSplitView.m new file mode 100644 index 00000000..f8784d0e --- /dev/null +++ b/trunk/TableDocumentSplitView.m @@ -0,0 +1,39 @@ +// +// TableDocumentSplitView.m +// sequel-pro +// +// Created by Abhi Beckert (abhibeckert.com) on 2008-04-24. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at +// + +#import "TableDocumentSplitView.h" + +@implementation TableDocumentSplitView + +- (float)dividerThickness +{ + return 1; +} + +- (void)drawDividerInRect:(NSRect)rect +{ + [[NSColor controlShadowColor] set]; + NSRectFill(rect); +} + +@end diff --git a/trunk/TableDump.h b/trunk/TableDump.h new file mode 100644 index 00000000..80492492 --- /dev/null +++ b/trunk/TableDump.h @@ -0,0 +1,136 @@ +// +// TableDump.h +// sequel-pro +// +// Created by lorenz textor (lorenz@textor.ch) on Wed May 01 2002. +// Copyright (c) 2002-2003 Lorenz Textor. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at +// Or mail to + +#import +#import +#import "CMMCPConnection.h" +#import "CMMCPResult.h" + + +@interface TableDump : NSObject { + + IBOutlet id tableDocumentInstance; + IBOutlet id tablesListInstance; + IBOutlet id tableSourceInstance; + IBOutlet id tableContentInstance; + IBOutlet id customQueryInstance; + + IBOutlet id tableWindow; + IBOutlet id exportDumpView; + IBOutlet id exportCSVView; + IBOutlet id exportMultipleCSVView; + IBOutlet id exportMultipleXMLView; + IBOutlet id exportDumpTableView; + IBOutlet id exportMultipleCSVTableView; + IBOutlet id exportMultipleXMLTableView; + IBOutlet id exportFieldNamesSwitch; + IBOutlet id exportFieldsTerminatedField; + IBOutlet id exportFieldsEnclosedField; + IBOutlet id exportFieldsEscapedField; + IBOutlet id exportLinesTerminatedField; + IBOutlet id exportMultipleFieldNamesSwitch; + IBOutlet id exportMultipleFieldsTerminatedField; + IBOutlet id exportMultipleFieldsEnclosedField; + IBOutlet id exportMultipleFieldsEscapedField; + IBOutlet id exportMultipleLinesTerminatedField; + IBOutlet id importCSVView; + IBOutlet id importFieldNamesSwitch; + IBOutlet id importFieldsTerminatedField; + IBOutlet id importFieldsEnclosedField; + IBOutlet id importFieldsEscapedField; + IBOutlet id importLinesTerminatedField; + IBOutlet id addDropTableSwitch; + IBOutlet id addCreateTableSwitch; + IBOutlet id addTableContentSwitch; + IBOutlet id addErrorsSwitch; + IBOutlet id errorsSheet; + IBOutlet id errorsView; + IBOutlet id singleProgressSheet; + IBOutlet id singleProgressBar; + IBOutlet id singleProgressText; + IBOutlet id fieldMappingSheet; + IBOutlet id rowUpButton; + IBOutlet id rowDownButton; + IBOutlet id fieldMappingTableView; + + CMMCPConnection *mySQLConnection; + + NSMutableArray *tables; + NSArray *importArray; + NSMutableArray *fieldMappingArray; + int currentRow; + NSString *savePath; + NSString *openPath; + NSUserDefaults *prefs; +} + +//IBAction methods +- (IBAction)reloadTables:(id)sender; +- (IBAction)selectTables:(id)sender; +- (IBAction)closeSheet:(id)sender; +- (IBAction)stepRow:(id)sender; +//- (IBAction)chooseDumpType:(id)sender; + +//export methods +//- (IBAction)saveDump:(id)sender; +- (void)exportFile:(int)tag; +- (void)savePanelDidEnd:(NSSavePanel *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo; + +//import methods +//- (IBAction)openDump:(id)sender; +- (void)importFile:(int)tag; +- (void)openPanelDidEnd:(NSOpenPanel *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo; +- (void)setupFieldMappingArray; + +//format methods +- (NSString *)dumpForSelectedTables; +- (NSString *)csvForArray:(NSArray *)array useFirstLine:(BOOL)firstLine terminatedBy:(NSString *)terminated + enclosedBy:(NSString *)enclosed escapedBy:(NSString *)escaped lineEnds:(NSString *)lineEnds silently:(BOOL)silently; +- (NSArray *)arrayForCSV:(NSString *)csv terminatedBy:(NSString *)terminated + enclosedBy:(NSString *)enclosed escapedBy:(NSString *)escaped lineEnds:(NSString *)lineEnds; +- (NSString *)xmlForArray:(NSArray *)array tableName:(NSString *)table withHeader:(BOOL)header silently:(BOOL)silently; +- (NSString *)stringForSelectedTablesWithType:(NSString *)type; +- (NSString *)htmlEscapeString:(NSString *)string; +- (NSArray *)arrayForString:(NSString *)string enclosed:(NSString *)enclosed + escaped:(NSString *)escaped terminated:(NSString *)terminated; +- (NSArray *)splitQueries:(NSString *)query; + +//additional methods +- (void)setConnection:(CMMCPConnection *)theConnection; + +//tableView datasource methods +- (int)numberOfRowsInTableView:(NSTableView *)aTableView; +- (id)tableView:(NSTableView *)aTableView + objectValueForTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex; +- (void)tableView:(NSTableView *)aTableView + setObjectValue:(id)anObject + forTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex; + +//last but not least +- (id)init; +- (void)dealloc; + +@end diff --git a/trunk/TableDump.m b/trunk/TableDump.m new file mode 100644 index 00000000..d5d0eaa3 --- /dev/null +++ b/trunk/TableDump.m @@ -0,0 +1,1473 @@ +// +// TableDump.m +// sequel-pro +// +// Created by lorenz textor (lorenz@textor.ch) on Wed May 01 2002. +// Copyright (c) 2002-2003 Lorenz Textor. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at +// Or mail to + +#import "TableDump.h" +#import "TableDocument.h" +#import "TablesList.h" +#import "TableSource.h" +#import "TableContent.h" +#import "CustomQuery.h" +#import + + +@implementation TableDump + +//IBAction methods +- (IBAction)reloadTables:(id)sender +/* +get the tables in db +*/ +{ + CMMCPResult *queryResult; + int i; + +//get tables + [tables removeAllObjects]; + queryResult = [mySQLConnection listTables]; + for ( i = 0 ; i < [queryResult numOfRows] ; i++ ) { + [queryResult dataSeek:i]; + [tables addObject:[NSMutableArray arrayWithObjects: + [NSNumber numberWithBool:YES], [[queryResult fetchRowAsArray] objectAtIndex:0], nil]]; + } + + [exportDumpTableView reloadData]; + [exportMultipleCSVTableView reloadData]; + [exportMultipleXMLTableView reloadData]; +/* +//disable buttons if there are no tables in db (or no db is selected) + if ( ![tables count] ) { + [dumpButton setEnabled:NO]; + } else { + [dumpButton setEnabled:YES]; + } + if ( ![tableDocumentInstance database] ) { + [readButton setEnabled:NO]; + } else { + [readButton setEnabled:YES]; + } +*/ +} + +- (IBAction)selectTables:(id)sender +/* +selects or deselects all tables +*/ +{ + NSEnumerator *enumerator; + id theObject; + + [self reloadTables:self]; + + enumerator = [tables objectEnumerator]; + while ( (theObject = [enumerator nextObject]) ) { + if ( [sender tag] ) { + [theObject replaceObjectAtIndex:0 withObject:[NSNumber numberWithBool:YES]]; + } else { + [theObject replaceObjectAtIndex:0 withObject:[NSNumber numberWithBool:NO]]; + } + } + + [exportDumpTableView reloadData]; + [exportMultipleCSVTableView reloadData]; + [exportMultipleXMLTableView reloadData]; +} + +- (IBAction)closeSheet:(id)sender +/* +ends the modal session +*/ +{ + [NSApp stopModalWithCode:[sender tag]]; +} + +- (IBAction)stepRow:(id)sender +/* +displays next/previous row in fieldMapping tableView +*/ +{ + if ( [sender tag] == 0 ) { + currentRow--; + [self setupFieldMappingArray]; + } else { + currentRow++; + [self setupFieldMappingArray]; + } + + //enable/disable buttons + if ( currentRow == 0 ) { + [rowDownButton setEnabled:NO]; + [rowUpButton setEnabled:YES]; + } else if ( currentRow == ([importArray count]-1) ) { + [rowDownButton setEnabled:YES]; + [rowUpButton setEnabled:NO]; + } else { + [rowDownButton setEnabled:YES]; + [rowUpButton setEnabled:YES]; + } +} + + +//export methods +- (void)exportFile:(int)tag +/* +invoked when user clicks on an export menuItem +*/ +{ + NSString *file; + NSString *contextInfo; + NSSavePanel *savePanel = [NSSavePanel savePanel]; + NSString *currentDate = [[NSDate date] descriptionWithCalendarFormat:@"%d.%m.%Y" timeZone:nil locale:nil]; + + switch ( tag ) { + case 5: + //export dump + [self reloadTables:self]; + file = [NSString stringWithFormat:@"%@_dump %@.sql", [tableDocumentInstance database], currentDate]; + [savePanel setAccessoryView:exportDumpView]; + contextInfo = @"exportDump"; + break; + case 6: + //export table content as CSV + file = [NSString stringWithFormat:@"%@.csv", [tableDocumentInstance table]]; + [savePanel setAccessoryView:exportCSVView]; + contextInfo = @"exportTableContentAsCSV"; + break; + case 7: + //export table content as XML + file = [NSString stringWithFormat:@"%@.xml", [tableDocumentInstance table]]; + contextInfo = @"exportTableContentAsXML"; + break; + case 8: + //export custom result as CSV + file = @"customresult.csv"; + [savePanel setAccessoryView:exportCSVView]; + contextInfo = @"exportCustomResultAsCSV"; + break; + case 9: + //export custom result as XML + file = @"customresult.xml"; + contextInfo = @"exportCustomResultAsXML"; + break; + case 10: + //export multiple tables as CSV + [self reloadTables:self]; + file = [NSString stringWithFormat:@"%@.csv", [tableDocumentInstance database]]; + [savePanel setAccessoryView:exportMultipleCSVView]; + contextInfo = @"exportMultipleTablesAsCSV"; + break; + case 11: + //export multiple tables as XML + [self reloadTables:self]; + file = [NSString stringWithFormat:@"%@.xml", [tableDocumentInstance database]]; + [savePanel setAccessoryView:exportMultipleXMLView]; + contextInfo = @"exportMultipleTablesAsXML"; + break; + default: + NSLog(@"ERROR: unknown export item with tag %d", tag); + return; + break; + } + //open savePanel + [savePanel beginSheetForDirectory:[prefs objectForKey:@"savePath"] + file:file modalForWindow:tableWindow modalDelegate:self + didEndSelector:@selector(savePanelDidEnd:returnCode:contextInfo:) contextInfo:contextInfo]; +} + +- (void)savePanelDidEnd:(NSSavePanel *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo +/* +saves the export file +*/ +{ + NSString *testString = @""; + NSError **errorStr; + id fileContent; + BOOL success; + + [sheet orderOut:self]; + if ( returnCode != NSOKButton ) + return; +//save path to preferences + [prefs setObject:[sheet directory] forKey:@"savePath"]; + +//error if file exists and is not writable + if ( [[NSFileManager defaultManager] fileExistsAtPath:[sheet filename]] ) { + if ( ![[NSFileManager defaultManager] isWritableFileAtPath:[sheet filename]] ) { + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, + NSLocalizedString(@"Couldn't replace the file. Be sure that you have the necessary privileges.", @"message of panel when file cannot be replaced")); + return; + } + } else { +//error if file cannot be written + if ( ![testString writeToFile:[sheet filename] atomically:YES] ) { + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, + NSLocalizedString(@"Couldn't write to file. Be sure that you have the necessary privileges.", @"message of panel when file cannot be written")); + return; + } + } + + if ( [contextInfo isEqualToString:@"exportDump"] ) { + //export dump of selected database + fileContent = [self dumpForSelectedTables]; + } else if ( [contextInfo isEqualToString:@"exportCustomResultAsCSV"] ) { + //export custom query result as csv + fileContent = [self csvForArray:[customQueryInstance currentResult] useFirstLine:[exportFieldNamesSwitch state] + terminatedBy:[exportFieldsTerminatedField stringValue] + enclosedBy:[exportFieldsEnclosedField stringValue] + escapedBy:[exportFieldsEscapedField stringValue] + lineEnds:[exportLinesTerminatedField stringValue] + silently:NO]; + } else if ( [contextInfo isEqualToString:@"exportTableContentAsCSV"] ) { + //export table content as csv + fileContent = [self csvForArray:[tableContentInstance currentResult] useFirstLine:[exportFieldNamesSwitch state] + terminatedBy:[exportFieldsTerminatedField stringValue] + enclosedBy:[exportFieldsEnclosedField stringValue] + escapedBy:[exportFieldsEscapedField stringValue] + lineEnds:[exportLinesTerminatedField stringValue] + silently:NO]; + } else if ( [contextInfo isEqualToString:@"exportMultipleTablesAsCSV"] ) { + //export multiple tables as CSV + fileContent = [self stringForSelectedTablesWithType:@"csv"]; + } else if ( [contextInfo isEqualToString:@"exportCustomResultAsXML"] ) { + //export custom query result as XML + fileContent = [self xmlForArray:[customQueryInstance currentResult] + tableName:@"custom" + withHeader:YES + silently:NO]; + } else if ( [contextInfo isEqualToString:@"exportTableContentAsXML"] ) { + //export table content as XML + fileContent = [self xmlForArray:[tableContentInstance currentResult] + tableName:[tableDocumentInstance table] + withHeader:YES + silently:NO]; + } else if ( [contextInfo isEqualToString:@"exportMultipleTablesAsXML"] ) { + //export multiple tables as XML + fileContent = [self stringForSelectedTablesWithType:@"xml"]; + } else { + //unknown operation + NSLog(@"unknown operation %@", [contextInfo description]); + fileContent = @""; + } + + if ( [fileContent respondsToSelector:@selector(writeToFile:atomically:encoding:error:)] ) { + // mac os 10.4 or later + success = [fileContent writeToFile:[sheet filename] atomically:YES encoding:[CMMCPConnection encodingForMySQLEncoding:[[tableDocumentInstance encoding] cString]] error:errorStr]; + } else { + // mac os pre 10.4 + success = [fileContent writeToFile:[sheet filename] atomically:YES]; + } + if ( !success ) { + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, + NSLocalizedString(@"Couldn't write to file. Be sure that you have the necessary privileges.", @"message of panel when file cannot be written")); + } + + // Export Finished Growl Notification + [GrowlApplicationBridge notifyWithTitle:@"Export Finished" + description:[NSString stringWithFormat:NSLocalizedString(@"Finished exporting to %@",@"description for finished exporting growl notification"), [[sheet filename] lastPathComponent]] + notificationName:@"Export Finished" + iconData:nil + priority:0 + isSticky:NO + clickContext:nil + ]; + +} + +//import methods +/* +- (IBAction)openDump:(id)sender + +opens the NSOpenPanel + +{ + [[NSOpenPanel openPanel] beginSheetForDirectory:[prefs objectForKey:@"openPath"] file:nil types:nil + modalForWindow:tableWindow modalDelegate:self + didEndSelector:@selector(openPanelDidEnd:returnCode:contextInfo:) contextInfo:nil]; +} +*/ + +- (void)importFile:(int)tag +/* +invoked when user clicks on an export menuItem +*/ +{ + NSString *contextInfo; + NSOpenPanel *openPanel = [NSOpenPanel openPanel]; + + switch ( tag ) { + case 1: + //import dump + contextInfo = @"importDump"; + break; + case 2: + //import CSV file + [openPanel setAccessoryView:importCSVView]; + contextInfo = @"importCSVFile"; + break; + default: + NSLog(@"ERROR: unknown import item with tag %d", tag); + return; + break; + } + //open savePanel + [openPanel beginSheetForDirectory:[prefs objectForKey:@"openPath"] + file:nil modalForWindow:tableWindow modalDelegate:self + didEndSelector:@selector(openPanelDidEnd:returnCode:contextInfo:) contextInfo:contextInfo]; +} + +- (void)openPanelDidEnd:(NSOpenPanel *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo +/* +reads mysql-dumpfile +*/ +{ + NSString *dumpFile; + NSError **errorStr; + NSMutableString *errors = [NSMutableString string]; + + [sheet orderOut:self]; + if ( returnCode != NSOKButton ) + return; +//save path to preferences + [prefs setObject:[sheet directory] forKey:@"openPath"]; + +//load file into string + if ( [NSString respondsToSelector:@selector(stringWithContentsOfFile:encoding:error:)] ) { + // mac os 10.4 or later + dumpFile = [NSString stringWithContentsOfFile:[sheet filename] encoding:[CMMCPConnection encodingForMySQLEncoding:[[tableDocumentInstance encoding] cString]] error:errorStr]; + } else { + // mac os pre 10.4 + dumpFile = [NSString stringWithContentsOfFile:[sheet filename]]; + } + if ( !dumpFile ) { + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, + NSLocalizedString(@"Couldn't open file. Be sure that the path is correct and that you have the necessary privileges.", @"message of panel when file cannot be opened")); + return; + } + +//reset interface + [errorsView setString:@""]; + [errorsView displayIfNeeded]; + [singleProgressText setStringValue:NSLocalizedString(@"Reading...", @"text showing that app is reading dump")]; + [singleProgressText displayIfNeeded]; + [singleProgressBar setDoubleValue:0]; + [singleProgressBar displayIfNeeded]; + + if ( [contextInfo isEqualToString:@"importDump"] ) { +//import dump file + NSArray *queries; + int i; + + //open progress sheet + [NSApp beginSheet:singleProgressSheet + modalForWindow:tableWindow modalDelegate:self + didEndSelector:nil contextInfo:nil]; + [singleProgressBar setIndeterminate:YES]; + [singleProgressBar setUsesThreadedAnimation:YES]; + [singleProgressBar startAnimation:self]; + //get array with an object for each mysql-query +// queries = [dumpFile componentsSeparatedByString:@";\n"]; + queries = [self splitQueries:dumpFile]; + + [singleProgressBar stopAnimation:self]; + [singleProgressBar setUsesThreadedAnimation:NO]; + [singleProgressBar setIndeterminate:NO]; + //perform all mysql-queries + for ( i = 0 ; i < [queries count] ; i++ ) { + [singleProgressBar setDoubleValue:((i+1)*100/[queries count])]; + [singleProgressBar displayIfNeeded]; + [mySQLConnection queryString:[queries objectAtIndex:i]]; + if ( ![[mySQLConnection getLastErrorMessage] isEqualToString:@""] + && ![[mySQLConnection getLastErrorMessage] isEqualToString:@"Query was empty"]) + [errors appendString:[NSString stringWithFormat:NSLocalizedString(@"[ERROR in query %d] %@\n", @"error text when multiple custom query failed"), (i+1),[mySQLConnection getLastErrorMessage]]]; + } + //close progress sheet + [NSApp endSheet:singleProgressSheet]; + [singleProgressSheet orderOut:nil]; + //display errors + if ( [errors length] ) { + [errorsView setString:errors]; + [NSApp beginSheet:errorsSheet + modalForWindow:tableWindow modalDelegate:self + didEndSelector:nil contextInfo:nil]; + [NSApp runModalForWindow:errorsSheet]; + + [NSApp endSheet:errorsSheet]; + [errorsSheet orderOut:nil]; + } + } else if ( [contextInfo isEqualToString:@"importCSVFile"] ) { +//import csv file + int code; + NSPopUpButtonCell *buttonCell = [[NSPopUpButtonCell alloc] init]; + + //open progress sheet + [NSApp beginSheet:singleProgressSheet + modalForWindow:tableWindow modalDelegate:self + didEndSelector:nil contextInfo:nil]; + [singleProgressBar setIndeterminate:YES]; + [singleProgressBar setUsesThreadedAnimation:YES]; + [singleProgressBar startAnimation:self]; + //put file in array + if ( importArray ) + [importArray release]; + importArray = [[self arrayForCSV:dumpFile + terminatedBy:[importFieldsTerminatedField stringValue] + enclosedBy:[importFieldsEnclosedField stringValue] + escapedBy:[importFieldsEscapedField stringValue] + lineEnds:[importLinesTerminatedField stringValue]] retain]; + //close progress sheet + [NSApp endSheet:singleProgressSheet]; + [singleProgressSheet orderOut:nil]; + [singleProgressBar stopAnimation:self]; + [singleProgressBar setUsesThreadedAnimation:NO]; + [singleProgressBar setIndeterminate:NO]; + //show fieldMapping sheet + //set up tableView + currentRow = 0; + fieldMappingArray = nil; + [self setupFieldMappingArray]; + [rowDownButton setEnabled:NO]; + if ( [importArray count] > 1 ) { + [rowUpButton setEnabled:YES]; + } else { + [rowUpButton setEnabled:NO]; + } + //set up tableView buttons + [buttonCell setControlSize:NSSmallControlSize]; + [buttonCell setFont:[NSFont labelFontOfSize:[NSFont smallSystemFontSize]]]; + [buttonCell addItemWithTitle:NSLocalizedString(@"Do not import", @"text for csv import drop downs")]; + [buttonCell addItemsWithTitles:[tableSourceInstance fieldNames]]; + [[fieldMappingTableView tableColumnWithIdentifier:@"1"] setDataCell:buttonCell]; + [NSApp beginSheet:fieldMappingSheet + modalForWindow:tableWindow modalDelegate:self + didEndSelector:nil contextInfo:nil]; + code = [NSApp runModalForWindow:fieldMappingSheet]; + + [NSApp endSheet:fieldMappingSheet]; + [fieldMappingSheet orderOut:nil]; + + if ( code ) { + //import array into db + NSMutableString *fNames = [NSMutableString string]; + NSMutableArray *fValuesIndexes = [NSMutableArray array]; + NSMutableString *fValues = [NSMutableString string]; + int i,j; + + //open progress sheet + [NSApp beginSheet:singleProgressSheet + modalForWindow:tableWindow modalDelegate:self + didEndSelector:nil contextInfo:nil]; + + //get fields to be imported + for ( i = 0 ; i < [fieldMappingArray count] ; i++ ) { + if ( [[[fieldMappingArray objectAtIndex:i] objectAtIndex:1] intValue] > 0 ) { + //field marked for import + if ( [fNames length] ) + [fNames appendString:@","]; + [fNames appendString:[NSString stringWithFormat:@"`%@`", + [[tableSourceInstance fieldNames] objectAtIndex:([[[fieldMappingArray objectAtIndex:i] objectAtIndex:1] intValue]-1)]]]; + [fValuesIndexes addObject:[NSNumber numberWithInt:i]]; + } + } + //import array + for ( i = 0 ; i < [importArray count] ; i++ ) { + //show progress bar + [singleProgressBar setDoubleValue:((i+1)*100/[importArray count])]; + [singleProgressBar displayIfNeeded]; + if ( ![importFieldNamesSwitch state] || (i != 0) ) { + //put values in string + [fValues setString:@""]; + for ( j = 0 ; j < [fValuesIndexes count] ; j++ ) { + if ( [fValues length] ) + [fValues appendString:@","]; + if ( [[[importArray objectAtIndex:i] objectAtIndex:[[fValuesIndexes objectAtIndex:j] intValue]] + isMemberOfClass:[NSNull class]] ) { + [fValues appendString:@"NULL"]; + } else { + [fValues appendString:[NSString stringWithFormat:@"'%@'", + [mySQLConnection prepareString: + [[importArray objectAtIndex:i] objectAtIndex:[[fValuesIndexes objectAtIndex:j] intValue]]]]]; +// [fValues appendString:[NSString stringWithFormat:@"\"%@\"", +// [mySQLConnection prepareString: +// [[importArray objectAtIndex:i] objectAtIndex:[[fValuesIndexes objectAtIndex:j] intValue]]]]]; + } + } + //perform query + [mySQLConnection queryString:[NSString stringWithFormat:@"INSERT INTO `%@` (%@) VALUES (%@)", + [tablesListInstance table], + fNames, + fValues]]; + if ( ![[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) + [errors appendString:[NSString stringWithFormat:NSLocalizedString(@"[ERROR in line %d] %@\n", @"error text when reading of csv file gave errors"), (i+1),[mySQLConnection getLastErrorMessage]]]; + } + } + //close progress sheet + [NSApp endSheet:singleProgressSheet]; + [singleProgressSheet orderOut:nil]; + } + //display errors + if ( [errors length] ) { + [errorsView setString:errors]; + [NSApp beginSheet:errorsSheet + modalForWindow:tableWindow modalDelegate:self + didEndSelector:nil contextInfo:nil]; + [NSApp runModalForWindow:errorsSheet]; + + [NSApp endSheet:errorsSheet]; + [errorsSheet orderOut:nil]; + } + //free arrays + fieldMappingArray = nil; + importArray = nil; + } + + // Import Finished Growl Notification + [GrowlApplicationBridge notifyWithTitle:@"Import Finished" + description:[NSString stringWithFormat:NSLocalizedString(@"Finished importing %@",@"description for finished importing growl notification"), [[sheet filename] lastPathComponent]] + notificationName:@"Import Finished" + iconData:nil + priority:0 + isSticky:NO + clickContext:nil + ]; + +} + +- (void)setupFieldMappingArray +/* +sets up the fieldMapping array to be shown in the tableView +*/ +{ + int i, value; + + if ( fieldMappingArray ) { + for ( i = 0 ; i < [fieldMappingArray count] ; i++ ) { + if ( [[[importArray objectAtIndex:currentRow] objectAtIndex:i] isKindOfClass:[NSNull class]] ) { + [[fieldMappingArray objectAtIndex:i] replaceObjectAtIndex:0 withObject:@"NULL"]; + } else { + [[fieldMappingArray objectAtIndex:i] replaceObjectAtIndex:0 withObject:[[importArray objectAtIndex:currentRow] objectAtIndex:i]]; + } + } + } else { + fieldMappingArray = [NSMutableArray array]; + for ( i = 0 ; i < [[importArray objectAtIndex:currentRow] count] ; i++ ) { + if ( i < [[tableSourceInstance fieldNames] count] ) { + value = i + 1; + } else { + value = 0; + } + if ( [[[importArray objectAtIndex:currentRow] objectAtIndex:i] isKindOfClass:[NSNull class]] ) { + [fieldMappingArray addObject:[NSMutableArray arrayWithObjects:@"NULL", [NSNumber numberWithInt:value], nil]]; + } else { + [fieldMappingArray addObject:[NSMutableArray arrayWithObjects:[[importArray objectAtIndex:currentRow] objectAtIndex:i], [NSNumber numberWithInt:value], nil]]; + } + } + [fieldMappingArray retain]; + } + [fieldMappingTableView reloadData]; +} + + +//format methods +- (NSString *)dumpForSelectedTables +/* +returns a dump string for the selected tables +*/ +{ + int i,j,k,t,rowCount,tableCount; + CMMCPResult *queryResult; + NSString *tableName; + NSArray *fieldNames; + NSArray *theRow; + NSMutableString *rowValue = [NSMutableString string]; + NSMutableArray *fieldValues; + NSMutableString *dump = [NSMutableString string]; + NSMutableString *errors = [NSMutableString string]; + id createTableSyntax; + +//reset interface + [errorsView setString:@""]; + [errorsView displayIfNeeded]; + [singleProgressText setStringValue:NSLocalizedString(@"Dumping...", @"text showing that app is writing dump")]; + [singleProgressText displayIfNeeded]; + [singleProgressBar setDoubleValue:0]; + [singleProgressBar displayIfNeeded]; + +//open progress sheet + [NSApp beginSheet:singleProgressSheet + modalForWindow:tableWindow modalDelegate:self + didEndSelector:nil contextInfo:nil]; + +//count tables + tableCount = 0; + for ( i = 0 ; i < [tables count] ; i++ ) { + if ( [[[tables objectAtIndex:i] objectAtIndex:0] boolValue] ) { + tableCount++; + } + } + k = 0; + +//add header of dump-file +// [dump appendString:[NSString stringWithFormat:@"# Tables dumped %@\n# Created by Sequel Pro (Copyright (c) 2002-2003 Lorenz Textor)\n#\n# Host: %@ Database: %@\n# ******************************\n\n", [NSDate date], [tableDocumentInstance host], [tableDocumentInstance database]]]; + [dump appendString:@"# Sequel Pro dump\n"]; + [dump appendString:[NSString stringWithFormat:@"# Version %@\n", + [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]]]; + [dump appendString:@"# http://code.google.com/p/sequel-pro\n#\n"]; + [dump appendString:[NSString stringWithFormat:@"# Host: %@ (MySQL %@)\n", + [tableDocumentInstance host], [tableDocumentInstance mySQLVersion]]]; + [dump appendString:[NSString stringWithFormat:@"# Database: %@\n", [tableDocumentInstance database]]]; + [dump appendString:[NSString stringWithFormat:@"# Generation Time: %@\n", [NSDate date]]]; + [dump appendString:@"# ************************************************************\n\n"]; + + for ( i = 0 ; i < [tables count] ; i++ ) { + if ( [[[tables objectAtIndex:i] objectAtIndex:0] boolValue] ) { + k++; +//set progressbar and text + tableName = [[tables objectAtIndex:i] objectAtIndex:1]; + [singleProgressText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Dumping table %@...", @"text showing that app is dumping table"), tableName]]; + [singleProgressText displayIfNeeded]; +//add name of table + [dump appendString:[NSString stringWithFormat:@"# Dump of table %@\n# ------------------------------------------------------------\n\n", tableName]]; +//add drop table + if ( [addDropTableSwitch state] == NSOnState ) + [dump appendString:[NSString stringWithFormat:@"DROP TABLE IF EXISTS `%@`;\n\n", tableName]]; +//add create syntax for table + if ( [addCreateTableSwitch state] == NSOnState ) { + queryResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SHOW CREATE TABLE `%@`", tableName]]; + if ( [queryResult numOfRows] ) { + createTableSyntax = [[queryResult fetchRowAsDictionary] objectForKey:@"Create Table"]; + if ( [createTableSyntax isKindOfClass:[NSData class]] ) { + createTableSyntax = [[[NSString alloc] initWithData:createTableSyntax encoding:[mySQLConnection encoding]] autorelease]; + } + [dump appendString:[NSString stringWithFormat:@"%@;\n\n", createTableSyntax]]; + } + if ( ![[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) { + [errors appendString:[NSString stringWithFormat:@"%@\n", [mySQLConnection getLastErrorMessage]]]; + if ( [addErrorsSwitch state] == NSOnState ) { + [dump appendString:[NSString stringWithFormat:@"# Error: %@\n", [mySQLConnection getLastErrorMessage]]]; + } + } + } +//add table content + if ( [addTableContentSwitch state] == NSOnState ) { + queryResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SELECT * FROM `%@`", tableName]]; + fieldNames = [queryResult fetchFieldNames]; + rowCount = [queryResult numOfRows]; + for ( j = 0 ; j < rowCount ; j++ ) { + [queryResult dataSeek:j]; + theRow = [queryResult fetchRowAsArray]; + fieldValues = [NSMutableArray array]; + for ( t = 0 ; t < [theRow count] ; t++ ) { + if ( [[theRow objectAtIndex:t] isKindOfClass:[NSData class]] ) { + //escape special characters + [rowValue setString:[mySQLConnection prepareBinaryData:[theRow objectAtIndex:t]]]; + } else { + [rowValue setString:[[theRow objectAtIndex:t] description]]; + //escape special characters + [rowValue setString:[mySQLConnection prepareString:rowValue]]; + } + if ( [[theRow objectAtIndex:t] isMemberOfClass:[NSNull class]] ) { + [fieldValues addObject:@"NULL"]; + } else { +// [fieldValues addObject:[NSString stringWithFormat:@"\"%@\"", rowValue]]; + [fieldValues addObject:[NSString stringWithFormat:@"'%@'", rowValue]]; + } + } + [dump appendString:[NSString stringWithFormat:@"INSERT INTO `%@` (`%@`) VALUES (%@);\n", + tableName, [fieldNames componentsJoinedByString:@"`,`"], + [fieldValues componentsJoinedByString:@","]]]; + } + if ( ![[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) { + [errors appendString:[NSString stringWithFormat:@"%@\n", [mySQLConnection getLastErrorMessage]]]; + if ( [addErrorsSwitch state] == NSOnState ) { + [dump appendString:[NSString stringWithFormat:@"# Error: %@\n", [mySQLConnection getLastErrorMessage]]]; + } + } + } +//set progressbar and text + [singleProgressBar setDoubleValue:(k*100/tableCount)]; + [singleProgressBar displayIfNeeded]; + [dump appendString:@"\n\n"]; + } + } + +//close progress sheet + [NSApp endSheet:singleProgressSheet]; + [singleProgressSheet orderOut:nil]; + +//show errors sheet if there have been errors + if ( [errors length] ) { + [errorsView setString:errors]; + [NSApp beginSheet:errorsSheet + modalForWindow:tableWindow modalDelegate:self + didEndSelector:nil contextInfo:nil]; + [NSApp runModalForWindow:errorsSheet]; + + [NSApp endSheet:errorsSheet]; + [errorsSheet orderOut:nil]; + } + + return [NSString stringWithString:dump]; +} + +- (NSString *)csvForArray:(NSArray *)array useFirstLine:(BOOL)firstLine terminatedBy:(NSString *)terminated + enclosedBy:(NSString *)enclosed escapedBy:(NSString *)escaped lineEnds:(NSString *)lineEnds silently:(BOOL)silently; +/* +takes an array and returns it as a csv string +*/ +{ + NSMutableString *string = [NSMutableString string]; + NSMutableString *rowValue = [NSMutableString string]; + NSMutableArray *tempRow = [NSMutableArray array]; + NSMutableString *tempTerminated, *tempLineEnds; + int i,j; + +//repare tabs and line ends + tempTerminated = [NSMutableString stringWithString:terminated]; + [tempTerminated replaceOccurrencesOfString:@"\\t" withString:@"\t" + options:NSLiteralSearch + range:NSMakeRange(0, [tempTerminated length])]; + [tempTerminated replaceOccurrencesOfString:@"\\n" withString:@"\n" + options:NSLiteralSearch + range:NSMakeRange(0, [tempTerminated length])]; + [tempTerminated replaceOccurrencesOfString:@"\\r" withString:@"\r" + options:NSLiteralSearch + range:NSMakeRange(0, [tempTerminated length])]; + terminated = [NSString stringWithString:tempTerminated]; + tempLineEnds = [NSMutableString stringWithString:lineEnds]; + [tempLineEnds replaceOccurrencesOfString:@"\\t" withString:@"\t" + options:NSLiteralSearch + range:NSMakeRange(0, [tempLineEnds length])]; + [tempLineEnds replaceOccurrencesOfString:@"\\n" withString:@"\n" + options:NSLiteralSearch + range:NSMakeRange(0, [tempLineEnds length])]; + [tempLineEnds replaceOccurrencesOfString:@"\\r" withString:@"\r" + options:NSLiteralSearch + range:NSMakeRange(0, [tempLineEnds length])]; + lineEnds = [NSString stringWithString:tempLineEnds]; + + if ( !silently ) { + //reset interface + [singleProgressText setStringValue:NSLocalizedString(@"Writing...", @"text showing that app is writing text file")]; + [singleProgressText displayIfNeeded]; + [singleProgressBar setDoubleValue:0]; + [singleProgressBar displayIfNeeded]; + //open progress sheet + [NSApp beginSheet:singleProgressSheet + modalForWindow:tableWindow modalDelegate:self + didEndSelector:nil contextInfo:nil]; + } + + for ( i = 0 ; i < [array count] ; i++ ) { + if ( !silently ) { +// [singleProgressText setStringValue:[NSString stringWithFormat:@"Writing row %d of %d", i+1, [array count]]]; +// [singleProgressText displayIfNeeded]; + [singleProgressBar setDoubleValue:((i+1)*100/[array count])]; + [singleProgressBar displayIfNeeded]; + } + if ( (i > 0) || ((i == 0) && firstLine) ) { + [tempRow removeAllObjects]; + for ( j = 0 ; j < [[array objectAtIndex:i] count] ; j++ ) { + //escape "enclosed by" character +/* + [rowValue setString:@""]; + scanner = [NSScanner scannerWithString:[[[array objectAtIndex:i] objectAtIndex:j] description]]; + [scanner setCharactersToBeSkipped:nil]; + while ( ![scanner isAtEnd] ) { + if ( [scanner scanUpToString:enclosed intoString:&tempString] ) { + [rowValue appendString:tempString]; + } + if ( [scanner scanString:enclosed intoString:nil] ) { + [rowValue appendString:[NSString stringWithFormat:@"%@%@", escaped, enclosed]]; + } + } +*/ + [rowValue setString:[[[array objectAtIndex:i] objectAtIndex:j] description]]; + if ( [rowValue isEqualToString:[prefs objectForKey:@"nullValue"]] ) { + [tempRow addObject:@"NULL"]; + } else { + [rowValue replaceOccurrencesOfString:escaped + withString:[NSString stringWithFormat:@"%@%@", escaped, escaped] + options:NSLiteralSearch + range:NSMakeRange(0,[rowValue length])]; + if ( ![escaped isEqualToString:enclosed] ) { + [rowValue replaceOccurrencesOfString:enclosed + withString:[NSString stringWithFormat:@"%@%@", escaped, enclosed] + options:NSLiteralSearch + range:NSMakeRange(0,[rowValue length])]; + } + [rowValue replaceOccurrencesOfString:lineEnds + withString:[NSString stringWithFormat:@"%@%@", escaped, lineEnds] + options:NSLiteralSearch + range:NSMakeRange(0,[rowValue length])]; + if ( [enclosed isEqualToString:@""] ) { + [rowValue replaceOccurrencesOfString:terminated + withString:[NSString stringWithFormat:@"%@%@", escaped, terminated] + options:NSLiteralSearch + range:NSMakeRange(0,[rowValue length])]; + } + [tempRow addObject:[NSString stringWithFormat:@"%@%@%@", enclosed, rowValue, enclosed]]; + } + } + [string appendString:[tempRow componentsJoinedByString:terminated]]; + [string appendString:lineEnds]; + } + } +/* + //remove last line end + [string deleteCharactersInRange:NSMakeRange(([string length]-[lineEnds length]),([lineEnds length]))]; +*/ + if ( !silently ) { + //close progress sheet + [NSApp endSheet:singleProgressSheet]; + [singleProgressSheet orderOut:nil]; + } + + return [NSString stringWithString:string]; +} + +- (NSArray *)arrayForCSV:(NSString *)csv terminatedBy:(NSString *)terminated + enclosedBy:(NSString *)enclosed escapedBy:(NSString *)escaped lineEnds:(NSString *)lineEnds +/* +loads a csv string into an array +*/ +{ + NSMutableString *tempTerminated, *tempLineEnds; + NSMutableArray *tempArray = [NSMutableArray array]; + NSMutableArray *tempRowArray = [NSMutableArray array]; + NSMutableString *mutableField; + NSScanner *scanner; + NSString *scanString; + NSMutableString *tempString = [NSMutableString string]; + NSMutableArray *linesArray = [NSMutableArray array]; + BOOL isEscaped, br; + int fieldCount = nil; + int x,i,j; + +//repare tabs and line ends + tempTerminated = [NSMutableString stringWithString:terminated]; + [tempTerminated replaceOccurrencesOfString:@"\\t" withString:@"\t" + options:NSLiteralSearch + range:NSMakeRange(0, [tempTerminated length])]; + [tempTerminated replaceOccurrencesOfString:@"\\n" withString:@"\n" + options:NSLiteralSearch + range:NSMakeRange(0, [tempTerminated length])]; + [tempTerminated replaceOccurrencesOfString:@"\\r" withString:@"\r" + options:NSLiteralSearch + range:NSMakeRange(0, [tempTerminated length])]; + terminated = [NSString stringWithString:tempTerminated]; + tempLineEnds = [NSMutableString stringWithString:lineEnds]; + [tempLineEnds replaceOccurrencesOfString:@"\\t" withString:@"\t" + options:NSLiteralSearch + range:NSMakeRange(0, [tempLineEnds length])]; + [tempLineEnds replaceOccurrencesOfString:@"\\n" withString:@"\n" + options:NSLiteralSearch + range:NSMakeRange(0, [tempLineEnds length])]; + [tempLineEnds replaceOccurrencesOfString:@"\\r" withString:@"\r" + options:NSLiteralSearch + range:NSMakeRange(0, [tempLineEnds length])]; + lineEnds = [NSString stringWithString:tempLineEnds]; + +//array with one line per object + scanner = [NSScanner scannerWithString:csv]; + [scanner setCharactersToBeSkipped:nil]; + while ( ![scanner isAtEnd] ) { + [tempString setString:@""]; + br = NO; + while ( !br ) { + scanString = @""; + [scanner scanUpToString:lineEnds intoString:&scanString]; + [tempString appendString:scanString]; + [scanner scanString:lineEnds intoString:&scanString]; + //test if lineEnds-character is escaped + isEscaped = NO; + j = 1; + if ( ![escaped isEqualToString:enclosed] && ![escaped isEqualToString:@""] ) { + while ( ((j*[escaped length])<=[tempString length]) && + ([[tempString substringWithRange:NSMakeRange(([tempString length]-(j*[escaped length])),[escaped length])] isEqualToString:escaped]) ) { + isEscaped = !isEscaped; + j++; + } + } + if ( !isEscaped || [scanner isAtEnd] ) { + //end of row + br = YES; + } else { + //lineEnds-character was escaped + [tempString appendString:scanString]; + } + } + //add line to array + [linesArray addObject:[NSString stringWithString:tempString]]; + } + for ( x = 0 ; x < [linesArray count] ; x++ ) { + //separate fields + [tempRowArray removeAllObjects]; + [tempRowArray addObjectsFromArray:[self arrayForString:[linesArray objectAtIndex:x] enclosed:enclosed escaped:escaped terminated:terminated]]; + if ( x == 0 ) { + fieldCount = [tempRowArray count]; + } else { + while ( [tempRowArray count] < fieldCount ) { + [tempRowArray addObject:@"NULL"]; + } + } + for ( i = 0 ; i < [tempRowArray count] ; i++ ) { + if ( [[tempRowArray objectAtIndex:i] isEqualToString:@"NULL"] || [[tempRowArray objectAtIndex:i] isEqualToString:@"\\N"] || [[tempRowArray objectAtIndex:i] isEqualToString:[prefs objectForKey:@"nullValue"]] ) { + //put nsnull object to array if field contains un-enclosed NULL string + [tempRowArray replaceObjectAtIndex:i withObject:[NSNull null]]; + } else { + //strip enclosed and escaped characters + mutableField = [NSMutableString stringWithString:[tempRowArray objectAtIndex:i]]; + //strip enclosed characters + if ( [mutableField length] >= (2*[enclosed length]) ) { + if ( [[mutableField substringToIndex:[enclosed length]] isEqualToString:enclosed] ) { + [mutableField deleteCharactersInRange:NSMakeRange(0,[enclosed length])]; + } + if ( [[mutableField substringFromIndex:([mutableField length]-[enclosed length])] isEqualToString:enclosed] ) { + [mutableField deleteCharactersInRange:NSMakeRange(([mutableField length]-[enclosed length]),[enclosed length])]; + } + } + //strip escaped characters + if ( ![enclosed isEqualToString:@""] ) { + [mutableField replaceOccurrencesOfString:[NSString stringWithFormat:@"%@%@", escaped, enclosed] withString:enclosed options:NSLiteralSearch range:NSMakeRange(0, [mutableField length])]; + } else { + [mutableField replaceOccurrencesOfString:[NSString stringWithFormat:@"%@%@", escaped, terminated] withString:terminated options:NSLiteralSearch range:NSMakeRange(0, [mutableField length])]; + } + if ( ![lineEnds isEqualToString:@""] ) { + [mutableField replaceOccurrencesOfString:[NSString stringWithFormat:@"%@%@", escaped, lineEnds] withString:lineEnds options:NSLiteralSearch range:NSMakeRange(0, [mutableField length])]; + } + if ( ![escaped isEqualToString:@""] && ![escaped isEqualToString:enclosed] ) { + [mutableField replaceOccurrencesOfString:[NSString stringWithFormat:@"%@%@", escaped, escaped] withString:escaped options:NSLiteralSearch range:NSMakeRange(0, [mutableField length])]; + } + //add field to tempRowArray + [tempRowArray replaceObjectAtIndex:i withObject:[NSString stringWithString:mutableField]]; + } + } + //add row to tempArray + [tempArray addObject:[NSArray arrayWithArray:tempRowArray]]; + } + + return [NSArray arrayWithArray:tempArray]; +} + + +- (NSString *)xmlForArray:(NSArray *)array tableName:(NSString *)table withHeader:(BOOL)header silently:(BOOL)silently +/* +takes an array and returns it as a xml string +*/ +{ + NSMutableString *string = [NSMutableString string]; + int i,j; + + if ( !silently ) { + //reset interface + [singleProgressText setStringValue:NSLocalizedString(@"Writing...", @"text showing that app is writing text file")]; + [singleProgressText displayIfNeeded]; + [singleProgressBar setDoubleValue:0]; + [singleProgressBar displayIfNeeded]; + //open progress sheet + [NSApp beginSheet:singleProgressSheet + modalForWindow:tableWindow modalDelegate:self + didEndSelector:nil contextInfo:nil]; + } + + if ( header ) { +//add header + [string appendString:@"\n\n"]; + [string appendString:@"\n\n"]; + } +//add table name + [string appendString:[NSString stringWithFormat:@"\t<%@>\n", [self htmlEscapeString:table]]]; + + for ( i = 1 ; i < [array count] ; i++ ) { + if ( !silently ) { + [singleProgressBar setDoubleValue:((i+1)*100/[array count])]; + [singleProgressBar displayIfNeeded]; + } +//add rows + [string appendString:@"\t\n"]; + for ( j = 0 ; j < [[array objectAtIndex:i] count] ; j++ ) { + [string appendString:[NSString stringWithFormat:@"\t\t<%@>%@\n", + [self htmlEscapeString:[[[array objectAtIndex:0] objectAtIndex:j] description]], + [self htmlEscapeString:[[[array objectAtIndex:i] objectAtIndex:j] description]], + [self htmlEscapeString:[[[array objectAtIndex:0] objectAtIndex:j] description]]]]; + } + [string appendString:@"\t\n"]; + } +//end table name + [string appendString:[NSString stringWithFormat:@"\t", [self htmlEscapeString:table]]]; + + if ( !silently ) { + //close progress sheet + [NSApp endSheet:singleProgressSheet]; + [singleProgressSheet orderOut:nil]; + } + + return [NSString stringWithString:string]; +} + +- (NSString *)stringForSelectedTablesWithType:(NSString *)type +/* +returns a csv/xml string for the selected tables +type has to be "csv" or "xml" +*/ +{ + int i,j,k,t,rowCount,tableCount; + CMMCPResult *queryResult; + NSString *tableName; + NSArray *fieldNames; + NSArray *theRow; + NSMutableArray *tableArray = [NSMutableArray array]; + NSMutableString *rowValue = [NSMutableString string]; + NSMutableArray *fieldValues; + NSMutableString *dump = [NSMutableString string]; + NSMutableString *errors = [NSMutableString string]; + +//reset interface + [errorsView setString:@""]; + [errorsView displayIfNeeded]; + [singleProgressText setStringValue:NSLocalizedString(@"Writing...", @"text showing that app is writing text file")]; + [singleProgressText displayIfNeeded]; + [singleProgressBar setDoubleValue:0]; + [singleProgressBar displayIfNeeded]; + +//open progress sheet + [NSApp beginSheet:singleProgressSheet + modalForWindow:tableWindow modalDelegate:self + didEndSelector:nil contextInfo:nil]; + +//count tables + tableCount = 0; + for ( i = 0 ; i < [tables count] ; i++ ) { + if ( [[[tables objectAtIndex:i] objectAtIndex:0] boolValue] ) { + tableCount++; + } + } + k = 0; + +//add header of dump-file + if ( [type isEqualToString:@"csv"] ) { + [dump appendString:[NSString stringWithFormat:@"Host: %@ Database: %@ Generation Time: %@\n\n", + [tableDocumentInstance host], [tableDocumentInstance database], [NSDate date]]]; + } else if ( [type isEqualToString:@"xml"] ) { + [dump appendString:@"\n\n"]; + [dump appendString:@"\n\n\n"]; + [dump appendString:[NSString stringWithFormat:@"<%@>\n\n\n", + [self htmlEscapeString:[tableDocumentInstance database]]]]; + } + for ( i = 0 ; i < [tables count] ; i++ ) { + if ( [[[tables objectAtIndex:i] objectAtIndex:0] boolValue] ) { + k++; +//set progressbar and text + tableName = [[tables objectAtIndex:i] objectAtIndex:1]; + [singleProgressText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Writing table %@...", @"text showing that app is writing table to text file"), tableName]]; + [singleProgressText displayIfNeeded]; +//add name of table + if ( [type isEqualToString:@"csv"] ) { + [dump appendString:[NSString stringWithFormat:@"Table %@\n\n", tableName]]; + } +//add table content + queryResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SELECT * FROM `%@`", tableName]]; + fieldNames = [queryResult fetchFieldNames]; + rowCount = [queryResult numOfRows]; + [tableArray removeAllObjects]; + //add field names + [tableArray addObject:fieldNames]; + for ( j = 0 ; j < rowCount ; j++ ) { + [queryResult dataSeek:j]; + theRow = [queryResult fetchRowAsArray]; + fieldValues = [NSMutableArray array]; + for ( t = 0 ; t < [theRow count] ; t++ ) { + if ( [[theRow objectAtIndex:t] isKindOfClass:[NSData class]] ) { + //convert data to string + [rowValue setString:[[NSString alloc] initWithData:[theRow objectAtIndex:t] + encoding:[mySQLConnection encoding]]]; + } else if ( [[theRow objectAtIndex:t] isMemberOfClass:[NSNull class]] ) { + [rowValue setString:[prefs objectForKey:@"nullValue"]]; + } else { + [rowValue setString:[[theRow objectAtIndex:t] description]]; + } + [fieldValues addObject:[NSString stringWithString:rowValue]]; + } + [tableArray addObject:[NSArray arrayWithArray:fieldValues]]; + } + if ( ![[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) { + [errors appendString:[NSString stringWithFormat:@"%@\n", [mySQLConnection getLastErrorMessage]]]; + } + if ( [type isEqualToString:@"csv"] ) { + [dump appendString:[self csvForArray:tableArray + useFirstLine:[exportMultipleFieldNamesSwitch state] + terminatedBy:[exportMultipleFieldsTerminatedField stringValue] + enclosedBy:[exportMultipleFieldsEnclosedField stringValue] + escapedBy:[exportMultipleFieldsEscapedField stringValue] + lineEnds:[exportMultipleLinesTerminatedField stringValue] + silently:YES]]; + } else if ( [type isEqualToString:@"xml"] ) { + [dump appendString:[self xmlForArray:tableArray tableName:tableName withHeader:NO silently:YES]]; + } +//set progressbar and text + [singleProgressBar setDoubleValue:(k*100/tableCount)]; + [singleProgressBar displayIfNeeded]; + [dump appendString:@"\n\n\n"]; + } + } + +//write xml end + if ( [type isEqualToString:@"xml"] ) { + [dump appendString:[NSString stringWithFormat:@"", + [self htmlEscapeString:[tableDocumentInstance database]]]]; + } + +//close progress sheet + [NSApp endSheet:singleProgressSheet]; + [singleProgressSheet orderOut:nil]; + +//show errors sheet if there have been errors + if ( [errors length] ) { + [errorsView setString:errors]; + [NSApp beginSheet:errorsSheet + modalForWindow:tableWindow modalDelegate:self + didEndSelector:nil contextInfo:nil]; + [NSApp runModalForWindow:errorsSheet]; + + [NSApp endSheet:errorsSheet]; + [errorsSheet orderOut:nil]; + } + + return [NSString stringWithString:dump]; +} + +- (NSString *)htmlEscapeString:(NSString *)string +/* +html escapes a string +*/ +{ + NSMutableString *mutableString = [NSMutableString stringWithString:string]; + + [mutableString replaceOccurrencesOfString:@"&" withString:@"&" + options:NSLiteralSearch + range:NSMakeRange(0, [mutableString length])]; + [mutableString replaceOccurrencesOfString:@"<" withString:@"<" + options:NSLiteralSearch + range:NSMakeRange(0, [mutableString length])]; + [mutableString replaceOccurrencesOfString:@">" withString:@">" + options:NSLiteralSearch + range:NSMakeRange(0, [mutableString length])]; + [mutableString replaceOccurrencesOfString:@"\"" withString:@""" + options:NSLiteralSearch + range:NSMakeRange(0, [mutableString length])]; + + return [NSString stringWithString:mutableString]; +} + +- (NSArray *)arrayForString:(NSString *)string enclosed:(NSString *)enclosed + escaped:(NSString *)escaped terminated:(NSString *)terminated +/* +split a string by the terminated-character if this is not escaped +if enclosed-character is given, ignores characters inside enclosed-characters +*/ +{ + NSMutableArray *tempArray = [NSMutableArray array]; + BOOL inString = NO; + BOOL isEscaped = NO; + BOOL br = NO; + unsigned i, j, start; + char enc = nil; + char esc = nil; + char ter = nil; + + //we take only first character by now (too complicated otherwise) + if ( [enclosed length] ) { + enc = [enclosed characterAtIndex:0]; + } + if ( [escaped length] ) { + esc = [escaped characterAtIndex:0]; + } + if ( [terminated length] ) { + ter = [terminated characterAtIndex:0]; + } + + start = 0; + + for ( i = 0 ; i < [string length] ; i++ ) { + if ( inString ) { + //we are in a string + br = NO; + while ( !br ) { + if ( i >= [string length] ) { + //end of string -> no second enclose character found + br = YES; + } else if ( [string characterAtIndex:i] == enc ) { + //second enclose-character found + //enclose-character escaped? + isEscaped = NO; + j = 1; + while ( (i-j>0) && ([string characterAtIndex:(i-j)] == esc) ) { + isEscaped = !isEscaped; + j++; + } + if ( !isEscaped ) { + inString = NO; + br = YES; + } + } + if ( !br ) + i++; + } + } else if ( [string characterAtIndex:i] == ter ) { + //terminated-character found + if ( [enclosed isEqualToString:@""] ) { + //check if terminated character is escaped + isEscaped = NO; + j = 1; + while ( (i-j>0) && ([string characterAtIndex:(i-j)] == esc) ) { + isEscaped = !isEscaped; + j++; + } + if ( !isEscaped ) { + [tempArray addObject:[string substringWithRange:NSMakeRange(start,(i-start))]]; + start = i + 1; + } + } else { + //add object to array +//NSLog([string substringWithRange:NSMakeRange(start,(i-start))]); + [tempArray addObject:[string substringWithRange:NSMakeRange(start,(i-start))]]; + start = i + 1; + } + } else if ( [string characterAtIndex:i] == enc ) { + //enclosed-character found + inString = YES; + } + } +//add rest of string to array + [tempArray addObject:[string substringWithRange:NSMakeRange(start,([string length]-start))]]; + + return [NSArray arrayWithArray:tempArray]; +} + +- (NSArray *)splitQueries:(NSString *)query +/* +splits the queries by ;'s which aren't inside any ", ' or ` characters +*/ +{ + NSMutableString *queries = [NSMutableString stringWithString:query]; + NSMutableArray *queryArray = [NSMutableArray array]; + char stringType = nil; + BOOL inString = NO; + BOOL escaped; + unsigned lineStart = 0; + unsigned i, j, x, currentLineLength; + + //parse string + for ( i = 0 ; i < [queries length] ; i++ ) { + if ( inString ) { + //we are in a string + //look for end of string + for ( ; i < [queries length] ; i++ ) { + if ( (([queries characterAtIndex:i] == '`') && (stringType == '`')) || + (([queries characterAtIndex:i] == stringType) && ([queries characterAtIndex:i-1] != '\\')) ) { + //back-tick or no backslash before string end -> end of string + inString = NO; + break; + } else if ( [queries characterAtIndex:i] == stringType ) { + //check if string end isn't escaped + escaped = YES; + j = 2; + currentLineLength = i - lineStart; + while ( ((currentLineLength-j)>0) && ([queries characterAtIndex:i-j] == '\\') ) { + escaped = !escaped; + j++; + } + if ( !escaped ) { + //it's really the end of the string + inString = NO; + } + } + } + } else if ( ([queries characterAtIndex:i] == '#') || + ((i+2<[queries length]) && + ([queries characterAtIndex:i] == '-') && + ([queries characterAtIndex:i+1] == '-') && + ([queries characterAtIndex:i+2] == ' ')) ) { + //it's a comment -> delete it + x = i; + while ( (x<[queries length]) && ([queries characterAtIndex:x] != '\r') && ([queries characterAtIndex:x] != '\n') ) { + x++; + } + [queries deleteCharactersInRange:NSMakeRange(i,x-i)]; + } else if ( [queries characterAtIndex:i] == ';' ) { + //we are at the end of a query + [queryArray addObject:[queries substringWithRange:NSMakeRange(lineStart, (i-lineStart))]]; + while ( ((i+1)<[queries length]) && (([queries characterAtIndex:i+1]=='\n') || ([queries characterAtIndex:i+1]=='\r') || ([queries characterAtIndex:i+1]==' ')) ) { + i++; + } + lineStart = i + 1; + } else if ( ([queries characterAtIndex:i] == '\'') || + ([queries characterAtIndex:i] == '"') || + ([queries characterAtIndex:i] == '`') ) { + //we are entering a string + inString = YES; + stringType = [queries characterAtIndex:i]; + } + } + //add rest of string to array (if last line has not ended with a ";") + if ( lineStart < [queries length] ) { + [queryArray addObject:[queries substringWithRange:NSMakeRange(lineStart, ([queries length]-lineStart))]]; + } + //return array + return [NSArray arrayWithArray:queryArray]; +} + + +//additional methods +- (void)setConnection:(CMMCPConnection *)theConnection +/* +sets the connection (received from TableDocument) and makes things that have to be done only once +*/ +{ + NSButtonCell *switchButton = [[NSButtonCell alloc] init]; + + prefs = [[NSUserDefaults standardUserDefaults] retain]; + + mySQLConnection = theConnection; + +//set up the interface + [switchButton setButtonType:NSSwitchButton]; + [switchButton setControlSize:NSSmallControlSize]; + [[exportDumpTableView tableColumnWithIdentifier:@"switch"] setDataCell:switchButton]; + [[exportMultipleCSVTableView tableColumnWithIdentifier:@"switch"] setDataCell:switchButton]; + [[exportMultipleXMLTableView tableColumnWithIdentifier:@"switch"] setDataCell:switchButton]; + if ( [prefs boolForKey:@"useMonospacedFonts"] ) { + [[[exportDumpTableView tableColumnWithIdentifier:@"tables"] dataCell] + setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]]; + [[[exportMultipleCSVTableView tableColumnWithIdentifier:@"tables"] dataCell] + setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]]; + [[[exportMultipleXMLTableView tableColumnWithIdentifier:@"tables"] dataCell] + setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]]; + [[[fieldMappingTableView tableColumnWithIdentifier:@"0"] dataCell] + setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]]; + [errorsView setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]]; + } else { + [[[exportDumpTableView tableColumnWithIdentifier:@"tables"] dataCell] + setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; + [[[exportMultipleCSVTableView tableColumnWithIdentifier:@"tables"] dataCell] + setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; + [[[exportMultipleXMLTableView tableColumnWithIdentifier:@"tables"] dataCell] + setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; + [[[fieldMappingTableView tableColumnWithIdentifier:@"0"] dataCell] + setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; + [errorsView setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; + } +// [self reloadTables:self]; +} + +//tableView datasource methods +- (int)numberOfRowsInTableView:(NSTableView *)aTableView; +{ + if ( aTableView == fieldMappingTableView ) { + return [fieldMappingArray count]; + } else { + return [tables count]; + } +} + +- (id)tableView:(NSTableView *)aTableView + objectValueForTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex +{ + if ( aTableView == fieldMappingTableView ) { + return [[fieldMappingArray objectAtIndex:rowIndex] objectAtIndex:[[aTableColumn identifier] intValue]]; + } else { + if ( [[aTableColumn identifier] isEqualToString:@"switch"] ) { + return [[tables objectAtIndex:rowIndex] objectAtIndex:0]; + } else { + return [[tables objectAtIndex:rowIndex] objectAtIndex:1]; + } + } +} + +- (void)tableView:(NSTableView *)aTableView + setObjectValue:(id)anObject + forTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex +{ + if ( aTableView == fieldMappingTableView ) { + int i; + for ( i = 0 ; i < [fieldMappingArray count] ; i++ ) { + //check that field isn't already used + if ( [[[fieldMappingArray objectAtIndex:i] objectAtIndex:1] isEqualToNumber:anObject] + && (rowIndex != i) + && ![anObject isEqualToNumber:[NSNumber numberWithInt:0]] ) { + return; + } + } + [[fieldMappingArray objectAtIndex:rowIndex] replaceObjectAtIndex:[[aTableColumn identifier] intValue] withObject:anObject]; + } else { + [[tables objectAtIndex:rowIndex] replaceObjectAtIndex:0 withObject:anObject]; + } +} + + +//last but not least +- (id)init; +{ + self = [super init]; + + tables = [[NSMutableArray alloc] init]; + + return self; +} + +- (void)dealloc +{ +// NSLog(@"TableDump dealloc"); + + [tables release]; + [importArray release]; + [fieldMappingArray release]; + [savePath release]; + [openPath release]; + [prefs release]; + + [super dealloc]; +} + + +@end diff --git a/trunk/TableSource.h b/trunk/TableSource.h new file mode 100644 index 00000000..dc051239 --- /dev/null +++ b/trunk/TableSource.h @@ -0,0 +1,127 @@ +// +// TableSource.h +// sequel-pro +// +// Created by lorenz textor (lorenz@textor.ch) on Wed May 01 2002. +// Copyright (c) 2002-2003 Lorenz Textor. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at +// Or mail to + +#import +#import +#import "CMMCPConnection.h" +#import "CMMCPResult.h" + + +@interface TableSource : NSObject { + + IBOutlet id tablesListInstance; + + IBOutlet id tableWindow; + IBOutlet id indexSheet; + IBOutlet id keySheet; + IBOutlet id tableSourceView; + IBOutlet id indexView; + IBOutlet id addFieldButton; + IBOutlet id copyFieldButton; + IBOutlet id removeFieldButton; + IBOutlet id addIndexButton; + IBOutlet id removeIndexButton; + IBOutlet id indexTypeField; + IBOutlet id indexNameField; + IBOutlet id indexedColumnsField; + IBOutlet id chooseKeyButton; + IBOutlet id tableTypeButton; + IBOutlet id structureGrabber; + + CMMCPConnection *mySQLConnection; + CMMCPResult *tableSourceResult; + CMMCPResult *indexResult; + + NSString *selectedTable; + NSString *tableType; + NSMutableArray *tableFields, *indexes; + NSMutableDictionary *oldRow, *enumFields; + NSDictionary *defaultValues; + BOOL isEditingRow, isEditingNewRow, alertSheetOpened; + NSUserDefaults *prefs; +} + +//table methods +- (void)loadTable:(NSString *)aTable; +- (IBAction)reloadTable:(id)sender; + +//edit methods +- (IBAction)addField:(id)sender; +- (IBAction)copyField:(id)sender; +- (IBAction)addIndex:(id)sender; +- (IBAction)removeField:(id)sender; +- (IBAction)removeIndex:(id)sender; +- (IBAction)typeChanged:(id)sender; + +//index sheet methods +- (IBAction)openIndexSheet:(id)sender; +- (IBAction)closeIndexSheet:(id)sender; +- (IBAction)chooseIndexType:(id)sender; +- (void)closeAlertSheet; + +//key sheet methods +- (IBAction)closeKeySheet:(id)sender; + +//additional methods +- (void)setConnection:(CMMCPConnection *)theConnection; +- (NSArray *)fetchResultAsArray:(CMMCPResult *)theResult; +- (BOOL)addRowToDB; +- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo; + +//getter methods +- (NSString *)defaultValueForField:(NSString *)field; +- (NSArray *)fieldNames; +- (NSDictionary *)enumFields; + +//tableView datasource methods +- (int)numberOfRowsInTableView:(NSTableView *)aTableView; +- (id)tableView:(NSTableView *)aTableView + objectValueForTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex; +- (void)tableView:(NSTableView *)aTableView + setObjectValue:(id)anObject + forTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex; + +//tableView drag&drop datasource methods +- (BOOL)tableView:(NSTableView *)tv writeRows:(NSArray*)rows toPasteboard:(NSPasteboard*)pboard; +- (NSDragOperation)tableView:(NSTableView*)tv validateDrop:(id )info proposedRow:(int)row + proposedDropOperation:(NSTableViewDropOperation)operation; +- (BOOL)tableView:(NSTableView*)tv acceptDrop:(id )info row:(int)row dropOperation:(NSTableViewDropOperation)operation; + +//tableView delegate methods +- (BOOL)selectionShouldChangeInTableView:(NSTableView *)aTableView; +- (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)command; + +//slitView delegate methods +- (BOOL)splitView:(NSSplitView *)sender canCollapseSubview:(NSView *)subview; +- (float)splitView:(NSSplitView *)sender constrainMaxCoordinate:(float)proposedMax ofSubviewAt:(int)offset; +- (float)splitView:(NSSplitView *)sender constrainMinCoordinate:(float)proposedMin ofSubviewAt:(int)offset; +- (NSRect)splitView:(NSSplitView *)splitView additionalEffectiveRectOfDividerAtIndex:(int)dividerIndex; + +//last but not least +- (id)init; +- (void)dealloc; + +@end diff --git a/trunk/TableSource.m b/trunk/TableSource.m new file mode 100644 index 00000000..69fb3758 --- /dev/null +++ b/trunk/TableSource.m @@ -0,0 +1,1160 @@ +// +// TableSource.m +// sequel-pro +// +// Created by lorenz textor (lorenz@textor.ch) on Wed May 01 2002. +// Copyright (c) 2002-2003 Lorenz Textor. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at +// Or mail to + +#import "TableSource.h" +#import "TablesList.h" + + +@implementation TableSource + +- (void)loadTable:(NSString *)aTable +/* + loads aTable, put it in an array, update the tableViewColumns and reload the tableView + */ +{ + NSEnumerator *enumerator; + id field; + NSScanner *scanner = [NSScanner alloc]; + NSArray *extrasArray; + NSMutableDictionary *tempDefaultValues; + NSEnumerator *extrasEnumerator; + id extra; + int i; + + selectedTable = aTable; + [tableSourceView deselectAll:self]; + if ( isEditingRow ) + return; + + // empty variables + [enumFields removeAllObjects]; + + //query started + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self]; + + if ( [aTable isEqualToString:@""] || !aTable ) { + [tableFields removeAllObjects]; + [indexes removeAllObjects]; + [tableSourceView reloadData]; + [indexView reloadData]; + [addFieldButton setEnabled:NO]; + [copyFieldButton setEnabled:NO]; + [removeFieldButton setEnabled:NO]; + [addIndexButton setEnabled:NO]; + [removeIndexButton setEnabled:NO]; + + // set the table type menu back to the default, and disable it + [tableTypeButton selectItemAtIndex:0]; + [tableTypeButton setEnabled:NO]; + tableType = nil; + + //query finished + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self]; + + [scanner release]; + + return; + } + + //perform queries and load results in array (each row as a dictionary) + tableSourceResult = [[mySQLConnection queryString:[NSString stringWithFormat:@"SHOW COLUMNS FROM `%@`", selectedTable]] retain]; + // listFieldsFromTable is broken in the current version of the framework (no back-ticks for table name)! + // tableSourceResult = [[mySQLConnection listFieldsFromTable:selectedTable] retain]; + // [tableFields setArray:[[self fetchResultAsArray:tableSourceResult] retain]]; + [tableFields setArray:[self fetchResultAsArray:tableSourceResult]]; + [tableSourceResult release]; + indexResult = [[mySQLConnection queryString:[NSString stringWithFormat:@"SHOW INDEX FROM `%@`", selectedTable]] retain]; + // [indexes setArray:[[self fetchResultAsArray:indexResult] retain]]; + [indexes setArray:[self fetchResultAsArray:indexResult]]; + [indexResult release]; + CMMCPResult *tableStatusResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SHOW TABLE STATUS LIKE '%@'", selectedTable]]; + [tableType release]; + NSDictionary *tempRow = [tableStatusResult fetchRowAsDictionary]; + if ( [tempRow objectForKey:@"Type"]) { + tableType = [tempRow objectForKey:@"Type"]; + } else { + tableType = [tempRow objectForKey:@"Engine"]; + } + [tableType retain]; + //get table default values + if ( defaultValues ) { + [defaultValues release]; + defaultValues = nil; + } + tempDefaultValues = [NSMutableDictionary dictionary]; + for ( i = 0 ; i < [tableFields count] ; i++ ) { + [tempDefaultValues setObject:[[tableFields objectAtIndex:i] objectForKey:@"Default"] forKey:[[tableFields objectAtIndex:i] objectForKey:@"Field"]]; + } + defaultValues = [[NSDictionary dictionaryWithDictionary:tempDefaultValues] retain]; + //put field length and extras in separate key + enumerator = [tableFields objectEnumerator]; + while ( (field = [enumerator nextObject]) ) { + NSString *type; + NSString *length; + NSString *extras; + // scan for length and extras like unsigned + [scanner initWithString:[field objectForKey:@"Type"]]; + [scanner scanUpToString:@"(" intoString:&type]; + [scanner scanString:@"(" intoString:nil]; + if ( ![scanner scanUpToString:@")" intoString:&length] ) + length = @""; + [scanner scanString:@")" intoString:nil]; + if ( ![scanner scanUpToString:@"" intoString:&extras] ) { + extras = @""; + } + // get possible values if field is enum or set + if ( [type isEqualToString:@"enum"] || [type isEqualToString:@"set"] ) { + NSMutableArray *possibleValues = [[[length substringWithRange:NSMakeRange(1,[length length]-2)] componentsSeparatedByString:@"','"] mutableCopy]; + NSMutableString *possibleValue = [NSMutableString string]; + for ( i = 0 ; i < [possibleValues count] ; i++ ) { + [possibleValue setString:[possibleValues objectAtIndex:i]]; + [possibleValue replaceOccurrencesOfString:@"''" withString:@"'" options:nil range:NSMakeRange(0,[possibleValue length])]; + [possibleValue replaceOccurrencesOfString:@"\\\\" withString:@"\\" options:nil range:NSMakeRange(0,[possibleValue length])]; + [possibleValues replaceObjectAtIndex:i withObject:[NSString stringWithString:possibleValue]]; + } + [enumFields setObject:[NSArray arrayWithArray:possibleValues] forKey:[field objectForKey:@"Field"]]; + [possibleValues release]; + } + + // scan extras for values like unsigned, zerofill, binary + extrasArray = [extras componentsSeparatedByString:@" "]; + extrasEnumerator = [extrasArray objectEnumerator]; + while ( (extra = [extrasEnumerator nextObject]) ) { + if ( [extra isEqualToString:@"unsigned"] ) { + [field setObject:@"1" forKey:@"unsigned"]; + } else if ( [extra isEqualToString:@"zerofill"] ) { + [field setObject:@"1" forKey:@"zerofill"]; + } else if ( [extra isEqualToString:@"binary"] ) { + [field setObject:@"1" forKey:@"binary"]; + } else { + if ( ![extra isEqualToString:@""] ) + NSLog(@"ERROR: unknown option in field definition: %@", extra); + } + } + [field setObject:type forKey:@"Type"]; + [field setObject:length forKey:@"Length"]; + } + + // Determine the table type + if ( ![tableType isKindOfClass:[NSNull class]] ) { + [tableTypeButton selectItemWithTitle:tableType]; + [tableTypeButton setEnabled:YES]; + } else { + [tableTypeButton selectItemWithTitle:@"--"]; + [tableTypeButton setEnabled:NO]; + } + + //enable buttons + [addFieldButton setEnabled:YES]; + [copyFieldButton setEnabled:YES]; + [removeFieldButton setEnabled:YES]; + [addIndexButton setEnabled:YES]; + [removeIndexButton setEnabled:YES]; + + //add columns to indexedColumnsField + [indexedColumnsField removeAllItems]; + enumerator = [tableFields objectEnumerator]; + while ( (field = [enumerator nextObject]) ) { + [indexedColumnsField addItemWithObjectValue:[field objectForKey:@"Field"]]; + } + if ( [tableFields count] < 10 ) { + [indexedColumnsField setNumberOfVisibleItems:[tableFields count]]; + } else { + [indexedColumnsField setNumberOfVisibleItems:10]; + } + + [tableSourceView reloadData]; + [indexView reloadData]; + + // display and *then* tile to force scroll bars to be in the correct position + [[tableSourceView enclosingScrollView] display]; + [[tableSourceView enclosingScrollView] tile]; + + //query finished + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self]; + + [scanner release]; +} + +- (IBAction)reloadTable:(id)sender +/* +reloads the table (performing a new mysql-query) +*/ +{ + [self loadTable:selectedTable]; +} + + +//edit methods +- (IBAction)addField:(id)sender +/* +adds an empty row to the tableSource-array and goes into edit mode +*/ +{ +/* + if ( ![self addRowToDB] ) + return; +*/ + if ( ![self selectionShouldChangeInTableView:nil] ) + return; + + [tableFields addObject:[NSMutableDictionary + dictionaryWithObjects:[NSArray arrayWithObjects:@"",@"int",@"",@"0",@"0",@"0",@"YES",@"",[prefs stringForKey:@"nullValue"],@"None",nil] + forKeys:[NSArray arrayWithObjects:@"Field",@"Type",@"Length",@"unsigned",@"zerofill",@"binary",@"Null",@"Key",@"Default",@"Extra",nil]]]; + + isEditingRow = YES; + isEditingNewRow = YES; + [tableSourceView reloadData]; + [tableSourceView selectRow:[tableSourceView numberOfRows]-1 byExtendingSelection:NO]; + [tableSourceView editColumn:0 row:[tableSourceView numberOfRows]-1 withEvent:nil select:YES]; +} + +- (IBAction)copyField:(id)sender +/* +copies a field and goes in edit mode for the new field +*/ +{ + NSMutableDictionary *tempRow; + + if ( ![tableSourceView numberOfSelectedRows] ) + return; + if ( ![self selectionShouldChangeInTableView:nil] ) + return; + + //add copy of selected row and go in edit mode + tempRow = [NSMutableDictionary dictionaryWithDictionary:[tableFields objectAtIndex:[tableSourceView selectedRow]]]; + [tempRow setObject:[[tempRow objectForKey:@"Field"] stringByAppendingString:@"Copy"] forKey:@"Field"]; + [tempRow setObject:@"" forKey:@"Key"]; + [tempRow setObject:@"None" forKey:@"Extra"]; + [tableFields addObject:tempRow]; + isEditingRow = YES; + isEditingNewRow = YES; + [tableSourceView reloadData]; + [tableSourceView selectRow:[tableSourceView numberOfRows]-1 byExtendingSelection:NO]; + [tableSourceView editColumn:0 row:[tableSourceView numberOfRows]-1 withEvent:nil select:YES]; +} + +- (IBAction)addIndex:(id)sender +/* +adds the index to the mysql-db and stops modal session with code 1 when success, 0 when error and -1 when no columns specified +*/ +{ + NSString *indexName; + NSArray *indexedColumns; + NSMutableArray *tempIndexedColumns = [NSMutableArray array]; + NSEnumerator *enumerator; + NSString *string; + + if ( [[indexedColumnsField stringValue] isEqualToString:@""] ) { + [NSApp stopModalWithCode:-1]; + } else { + if ( [[indexNameField stringValue] isEqualToString:@"PRIMARY"] ) { + indexName = @""; + } else { + if ( [[indexNameField stringValue] isEqualToString:@""] ) + { + indexName = @""; + } else { + indexName = [NSString stringWithFormat:@"`%@`", [indexNameField stringValue]]; + } + } + indexedColumns = [[indexedColumnsField stringValue] componentsSeparatedByString:@","]; + enumerator = [indexedColumns objectEnumerator]; + while ( (string = [enumerator nextObject]) ) { + if ( ([string characterAtIndex:0] == ' ') ) { + [tempIndexedColumns addObject:[string substringWithRange:NSMakeRange(1,([string length]-1))]]; + } else { + [tempIndexedColumns addObject:[NSString stringWithString:string]]; + } + } + + [mySQLConnection queryString:[NSString stringWithFormat:@"ALTER TABLE `%@` ADD %@ %@ (`%@`)", + selectedTable, [indexTypeField titleOfSelectedItem], indexName, + [tempIndexedColumns componentsJoinedByString:@"`,`"]]]; + +/* +NSLog([NSString stringWithFormat:@"ALTER TABLE `%@` ADD %@ %@ (`%@`)", + selectedTable, [indexTypeField titleOfSelectedItem], indexName, + [[[indexedColumnsField stringValue] componentsSeparatedByString:@","] componentsJoinedByString:@"`,`"]]); +*/ + + if ( [[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) { + [self loadTable:selectedTable]; + [NSApp stopModalWithCode:1]; + } else { + [NSApp stopModalWithCode:0]; + } + } +} + +- (IBAction)removeField:(id)sender +/* +opens alertsheet and asks for confirmation +*/ +{ + if ( ![tableSourceView numberOfSelectedRows] ) + return; + if ( ![self selectionShouldChangeInTableView:nil] ) + return; + + NSBeginAlertSheet(NSLocalizedString(@"Warning", @"warning"), NSLocalizedString(@"Delete", @"delete button"), NSLocalizedString(@"Cancel", @"cancel button"), nil, tableWindow, self, @selector(sheetDidEnd:returnCode:contextInfo:), + nil, @"removefield", [NSString stringWithFormat:NSLocalizedString(@"Do you really want to delete the field %@?", @"message of panel asking for confirmation for deleting field"), + [[tableFields objectAtIndex:[tableSourceView selectedRow]] objectForKey:@"Field"]] ); +} + +- (IBAction)removeIndex:(id)sender +/* +opens alertsheet and asks for confirmation +*/ +{ + if ( ![indexView numberOfSelectedRows] ) + return; + if ( ![self selectionShouldChangeInTableView:nil] ) + return; + + NSBeginAlertSheet(NSLocalizedString(@"Warning", @"warning"), NSLocalizedString(@"Delete", @"delete button"), NSLocalizedString(@"Cancel", @"cancel button"), nil, tableWindow, self, @selector(sheetDidEnd:returnCode:contextInfo:), + nil, @"removeindex", [NSString stringWithFormat:NSLocalizedString(@"Do you really want to delete the index %@?", @"message of panel asking for confirmation for deleting index"), + [[indexes objectAtIndex:[indexView selectedRow]] objectForKey:@"Key_name"]] ); +} + +- (IBAction)typeChanged:(id)sender +{ + NSString* selectedItem = [sender titleOfSelectedItem]; + if([selectedItem isEqualToString:@"--"] || [tableType isEqualToString:selectedItem]) { + [sender selectItemWithTitle:tableType]; + } else { + // alert any listeners that we are about to perform a query. + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self]; + + NSString *query = [NSString stringWithFormat:@"ALTER TABLE `%@` TYPE = %@",selectedTable,selectedItem]; + [mySQLConnection queryString:query]; + + // The query is now complete. + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self]; + + // Did the alter work? If so, we need to record the new data. If not, we must revert back to + // the previous state. + if([mySQLConnection getLastErrorID] == 0) + { + // Make sure "tableType" is changed and the status tab is flagged for reload... + [tableType release]; + tableType = selectedItem; + [tableType retain]; + +// [[NSNotificationCenter defaultCenter] postNotificationName:@"SelectedTableStatusHasChanged" object:self]; + } else { + [sender selectItemWithTitle:tableType]; + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, + [NSString stringWithFormat:NSLocalizedString(@"Couldn't change table type.\nMySQL said: %@", @"message of panel when table type cannot be removed"), [mySQLConnection getLastErrorMessage]]); + } + } +} + + +//index sheet methods +- (IBAction)openIndexSheet:(id)sender +/* +opens the indexSheet +*/ +{ + int code = 0; + + if ( ![self selectionShouldChangeInTableView:nil] ) + return; + + [indexTypeField selectItemAtIndex:0]; + [indexNameField setEnabled:NO]; + [indexNameField setStringValue:@"PRIMARY"]; + [indexedColumnsField setStringValue:@""]; + + [NSApp beginSheet:indexSheet + modalForWindow:tableWindow modalDelegate:self + didEndSelector:nil contextInfo:nil]; + code = [NSApp runModalForWindow:indexSheet]; + + [NSApp endSheet:indexSheet]; + [indexSheet orderOut:nil]; + +//code == -1 -> no columns specified +//code == 0 -> error while adding index +//code == 1 -> index added with succes OR sheet closed without adding index + if ( code == 0 ) { + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, + [NSString stringWithFormat:NSLocalizedString(@"Couldn't add index.\nMySQL said: %@", @"message of panel when index cannot be created"), [mySQLConnection getLastErrorMessage]]); + } else if ( code == -1 ) { + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, @selector(closeAlertSheet), nil, + NSLocalizedString(@"Please insert the columns you want to index.", @"message of panel when no columns are specified to be indexed")); + } +} + +- (IBAction)closeIndexSheet:(id)sender +/* +closes the indexSheet without adding the index (stops modal session with code 1) +*/ +{ + [NSApp stopModalWithCode:1]; +} + +- (IBAction)chooseIndexType:(id)sender +/* +invoked when user chooses an index type +*/ +{ + if ( [[indexTypeField titleOfSelectedItem] isEqualToString:@"PRIMARY KEY"] ) { + [indexNameField setEnabled:NO]; + [indexNameField setStringValue:@"PRIMARY"]; + } else { + [indexNameField setEnabled:YES]; + if ( [[indexNameField stringValue] isEqualToString:@"PRIMARY"] ) + [indexNameField setStringValue:@""]; + } +} + +- (void)closeAlertSheet +/* +reopens indexSheet after errorSheet (no columns specified) +*/ +{ + [self openIndexSheet:self]; +} + +//key sheet methods +- (IBAction)closeKeySheet:(id)sender +/* +closes the keySheet +*/ +{ + [NSApp stopModalWithCode:[sender tag]]; +} + + +//additional methods +- (void)setConnection:(CMMCPConnection *)theConnection +/* +sets the connection (received from TableDocument) and makes things that have to be done only once +*/ +{ + NSEnumerator *indexColumnsEnumerator = [[indexView tableColumns] objectEnumerator]; + NSEnumerator *fieldColumnsEnumerator = [[tableSourceView tableColumns] objectEnumerator]; + id indexColumn; + id fieldColumn; + + mySQLConnection = theConnection; + + prefs = [[NSUserDefaults standardUserDefaults] retain]; + +//set up tableView + [tableSourceView registerForDraggedTypes:[NSArray arrayWithObjects:@"SequelProPasteboard", nil]]; + + while ( (indexColumn = [indexColumnsEnumerator nextObject]) ) { + if ( [prefs boolForKey:@"useMonospacedFonts"] ) { + [[indexColumn dataCell] setFont:[NSFont fontWithName:@"Monaco" size:10]]; + } + } + while ( (fieldColumn = [fieldColumnsEnumerator nextObject]) ) { + if ( [prefs boolForKey:@"useMonospacedFonts"] ) { + [[fieldColumn dataCell] setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]]; + } + } +} + +- (NSArray *)fetchResultAsArray:(CMMCPResult *)theResult +/* +fetches the result as an array with a dictionary for each row in it +*/ +{ + NSMutableArray *tempResult = [NSMutableArray array]; + NSMutableDictionary *tempRow; + NSEnumerator *enumerator; + id key; + int i; + + for ( i = 0 ; i < [theResult numOfRows] ; i++ ) { + [theResult dataSeek:i]; + tempRow = [NSMutableDictionary dictionaryWithDictionary:[theResult fetchRowAsDictionary]]; + + //use NULL string from preferences instead of the NSNull oject returned by the framework + enumerator = [tempRow keyEnumerator]; + while ( (key = [enumerator nextObject]) ) { + if ( [[tempRow objectForKey:key] isMemberOfClass:[NSNull class]] ) + [tempRow setObject:[prefs objectForKey:@"nullValue"] forKey:key]; + } + // change some fields to be more human-readable or GUI compatible + if ( [[tempRow objectForKey:@"Extra"] isEqualToString:@""] ) { + [tempRow setObject:@"None" forKey:@"Extra"]; + } + if ( [[tempRow objectForKey:@"Null"] isEqualToString:@"YES"] ) { +// [tempRow setObject:[NSNumber numberWithInt:0] forKey:@"Null"]; + [tempRow setObject:@"YES" forKey:@"Null"]; + } else { +// [tempRow setObject:[NSNumber numberWithInt:1] forKey:@"Null"]; + [tempRow setObject:@"NO" forKey:@"Null"]; + } + [tempResult addObject:tempRow]; + } + + return tempResult; +} + +- (BOOL)addRowToDB; +/* +tries to write row to mysql-db +returns YES if row written to db, otherwies NO +returns YES if no row is beeing edited and nothing has to be written to db +*/ +{ + NSDictionary *theRow; + NSMutableString *queryString; + int code; + + if ( !isEditingRow || ![tableSourceView numberOfSelectedRows] ) + return YES; + if ( alertSheetOpened ) + return NO; + + theRow = [tableFields objectAtIndex:[tableSourceView selectedRow]]; + + if ( isEditingNewRow ) { +//ADD syntax + if ( [[theRow objectForKey:@"Length"] isEqualToString:@""] || ![theRow objectForKey:@"Length"] ) { + queryString = [NSMutableString stringWithFormat:@"ALTER TABLE `%@` ADD `%@` %@", + selectedTable, [theRow objectForKey:@"Field"], [theRow objectForKey:@"Type"]]; + } else { + queryString = [NSMutableString stringWithFormat:@"ALTER TABLE `%@` ADD `%@` %@(%@)", + selectedTable, [theRow objectForKey:@"Field"], [theRow objectForKey:@"Type"], + [theRow objectForKey:@"Length"]]; + } + } else { +//CHANGE syntax + if ( [[theRow objectForKey:@"Length"] isEqualToString:@""] || ![theRow objectForKey:@"Length"] ) { + queryString = [NSMutableString stringWithFormat:@"ALTER TABLE `%@` CHANGE `%@` `%@` %@", + selectedTable, [oldRow objectForKey:@"Field"], [theRow objectForKey:@"Field"], + [theRow objectForKey:@"Type"]]; + } else { + queryString = [NSMutableString stringWithFormat:@"ALTER TABLE `%@` CHANGE `%@` `%@` %@(%@)", + selectedTable, [oldRow objectForKey:@"Field"], [theRow objectForKey:@"Field"], + [theRow objectForKey:@"Type"], [theRow objectForKey:@"Length"]]; + } + } +//field specification + if ( [[theRow objectForKey:@"unsigned"] intValue] == 1 ) { + [queryString appendString:@" UNSIGNED"]; + } + if ( [[theRow objectForKey:@"zerofill"] intValue] == 1 ) { + [queryString appendString:@" ZEROFILL"]; + } + if ( [[theRow objectForKey:@"binary"] intValue] == 1 ) { + [queryString appendString:@" BINARY"]; + } +// if ( [[theRow objectForKey:@"Null"] isEqualToString:@"NO"] || [[theRow objectForKey:@"Null"] isEqualToString:@"NOT NULL"] +// || [[theRow objectForKey:@"Null"] isEqualToString:@"no"] || [[theRow objectForKey:@"Null"] isEqualToString:@"not null"]) + if ( [[theRow objectForKey:@"Null"] isEqualToString:@"NO"] ) + [queryString appendString:@" NOT NULL"]; + if ( ![[theRow objectForKey:@"Extra"] isEqualToString:@"auto_increment"] && !([[theRow objectForKey:@"Type"] isEqualToString:@"timestamp"] && [[theRow objectForKey:@"Default"] isEqualToString:@"NULL"]) ) { + if ( [[theRow objectForKey:@"Default"] isEqualToString:[prefs objectForKey:@"nullValue"]] ) { + if ([[theRow objectForKey:@"Null"] isEqualToString:@"YES"] ) { + [queryString appendString:@" DEFAULT NULL "]; + } + } else if ( [[theRow objectForKey:@"Type"] isEqualToString:@"timestamp"] && ([[theRow objectForKey:@"Default"] isEqualToString:@"CURRENT_TIMESTAMP"] || [[theRow objectForKey:@"Default"] isEqualToString:@"current_timestamp"]) ) { + [queryString appendString:@" DEFAULT CURRENT_TIMESTAMP "]; + } else { + // [queryString appendString:[NSString stringWithFormat:@" DEFAULT \"%@\" ", [theRow objectForKey:@"Default"]]]; + [queryString appendString:[NSString stringWithFormat:@" DEFAULT '%@' ", [mySQLConnection prepareString:[theRow objectForKey:@"Default"]]]]; + } + } else { + [queryString appendString:@" "]; + } + if ( ![[theRow objectForKey:@"Extra"] isEqualToString:@""] && + ![[theRow objectForKey:@"Extra"] isEqualToString:@"None"] && + [theRow objectForKey:@"Extra"] ) + [queryString appendString:[theRow objectForKey:@"Extra"]]; +//asks to add an index to query if auto_increment is set and field isn't indexed + if ( [[theRow objectForKey:@"Extra"] isEqualToString:@"auto_increment"] + && ([[theRow objectForKey:@"Key"] isEqualToString:@""] || ![theRow objectForKey:@"Key"]) ) { + [chooseKeyButton selectItemAtIndex:0]; + [NSApp beginSheet:keySheet + modalForWindow:tableWindow modalDelegate:self + didEndSelector:nil contextInfo:nil]; + code = [NSApp runModalForWindow:keySheet]; + + [NSApp endSheet:keySheet]; + [keySheet orderOut:nil]; + if ( code ) { + if ( [chooseKeyButton indexOfSelectedItem] == 0 ) { + [queryString appendString:@" PRIMARY KEY"]; + } else { + [queryString appendString:[NSString stringWithFormat:@", ADD %@ (`%@`)", + [chooseKeyButton titleOfSelectedItem], [theRow objectForKey:@"Field"]]]; + } + } + } + [mySQLConnection queryString:queryString]; + +//NSLog(queryString); + + if ( [[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) { + isEditingRow = NO; + isEditingNewRow = NO; + [self loadTable:selectedTable]; + return YES; + } else { + alertSheetOpened = YES; +//problem: alert sheet doesn't respond to first click + if ( isEditingNewRow ) { + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), NSLocalizedString(@"Cancel", @"cancel button"), nil, tableWindow, self, @selector(sheetDidEnd:returnCode:contextInfo:), + nil, @"addrow", [NSString stringWithFormat:NSLocalizedString(@"Couldn't add field %@.\nMySQL said: %@", @"message of panel when field cannot be added"), + [theRow objectForKey:@"Field"], [mySQLConnection getLastErrorMessage]]); + } else { + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), NSLocalizedString(@"Cancel", @"cancel button"), nil, tableWindow, self, @selector(sheetDidEnd:returnCode:contextInfo:), + nil, @"addrow", [NSString stringWithFormat:NSLocalizedString(@"Couldn't change field %@.\nMySQL said: %@", @"message of panel when field cannot be changed"), + [theRow objectForKey:@"Field"], [mySQLConnection getLastErrorMessage]]); + } + return NO; + } +} + +- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo +/* +if contextInfo == addrow: remain in edit-mode if user hits OK, otherwise cancel editing +if contextInfo == removefield: removes row from mysql-db if user hits ok +if contextInfo == removeindex: removes index from mysql-db if user hits ok +*/ +{ + [sheet orderOut:self]; + + if ( [contextInfo isEqualToString:@"addrow"] ) { + alertSheetOpened = NO; + if ( returnCode == NSAlertDefaultReturn ) { + //problem: reentering edit mode for first cell doesn't function + [tableSourceView editColumn:0 row:[tableSourceView selectedRow] withEvent:nil select:YES]; + } else { + if ( !isEditingNewRow ) { + [tableFields replaceObjectAtIndex:[tableSourceView selectedRow] + withObject:[NSMutableDictionary dictionaryWithDictionary:oldRow]]; + isEditingRow = NO; + } else { + [tableFields removeObjectAtIndex:[tableSourceView selectedRow]]; + isEditingRow = NO; + isEditingNewRow = NO; + } + } + [tableSourceView reloadData]; + } else if ( [contextInfo isEqualToString:@"removefield"] ) { + if ( returnCode == NSAlertDefaultReturn ) { +//remove row + [mySQLConnection queryString:[NSString stringWithFormat:@"ALTER TABLE `%@` DROP `%@`", + selectedTable, [[tableFields objectAtIndex:[tableSourceView selectedRow]] objectForKey:@"Field"]]]; + + if ( [[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) { + [self loadTable:selectedTable]; + } else { + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, + [NSString stringWithFormat:NSLocalizedString(@"Couldn't remove field %@.\nMySQL said: %@", @"message of panel when field cannot be removed"), + [[tableFields objectAtIndex:[tableSourceView selectedRow]] objectForKey:@"Field"], + [mySQLConnection getLastErrorMessage]]); + } + } + } else if ( [contextInfo isEqualToString:@"removeindex"] ) { + if ( returnCode == NSAlertDefaultReturn ) { +//remove index + if ( [[[indexes objectAtIndex:[indexView selectedRow]] objectForKey:@"Key_name"] isEqualToString:@"PRIMARY"] ) { + [mySQLConnection queryString:[NSString stringWithFormat:@"ALTER TABLE `%@` DROP PRIMARY KEY", selectedTable]]; + } else { + [mySQLConnection queryString:[NSString stringWithFormat:@"ALTER TABLE `%@` DROP INDEX `%@`", + selectedTable, [[indexes objectAtIndex:[indexView selectedRow]] objectForKey:@"Key_name"]]]; + } + + if ( [[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) { + [self loadTable:selectedTable]; + } else { + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, + [NSString stringWithFormat:NSLocalizedString(@"Couldn't remove index.\nMySQL said: %@", @"message of panel when index cannot be removed"), [mySQLConnection getLastErrorMessage]]); + } + } + } +} + + +//getter methods +- (NSString *)defaultValueForField:(NSString *)field +/* +get the default value for a specified field +*/ +{ + if ( ![defaultValues objectForKey:field] ) { + return [prefs objectForKey:@"nullValue"]; + } else if ( [[defaultValues objectForKey:field] isMemberOfClass:[NSNull class]] ) { + return [prefs objectForKey:@"nullValue"]; + } else { + return [defaultValues objectForKey:field]; + } +} + +- (NSArray *)fieldNames +/* + returns an array containing the field names of the selected table + */ +{ + NSMutableArray *tempArray = [NSMutableArray array]; + NSEnumerator *enumerator; + id field; + + //load table if not already done + if ( ![tablesListInstance structureLoaded] ) { + [self loadTable:(NSString *)[tablesListInstance table]]; + } + //get field names + enumerator = [tableFields objectEnumerator]; + while ( (field = [enumerator nextObject]) ) { + [tempArray addObject:[field objectForKey:@"Field"]]; + } + + return [NSArray arrayWithArray:tempArray]; +} + +- (NSDictionary *)enumFields +/* +returns a dictionary containing enum/set field names as key and possible values as array +*/ +{ + return [NSDictionary dictionaryWithDictionary:enumFields]; +} + + +//tableView datasource methods +- (int)numberOfRowsInTableView:(NSTableView *)aTableView +{ + if ( aTableView == tableSourceView ) { + return [tableFields count]; + } else { + return [indexes count]; + } +} + +- (id)tableView:(NSTableView *)aTableView + objectValueForTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex +{ + id theRow, theValue; + + if ( aTableView == tableSourceView ) { + theRow = [tableFields objectAtIndex:rowIndex]; + } else { + theRow = [indexes objectAtIndex:rowIndex]; + } + theValue = [theRow objectForKey:[aTableColumn identifier]]; + + return theValue; +} + +- (void)tableView:(NSTableView *)aTableView + setObjectValue:(id)anObject + forTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex +{ + if ( !isEditingRow ) { + [oldRow setDictionary:[tableFields objectAtIndex:rowIndex]]; + isEditingRow = YES; + } + if ( anObject ) { + [[tableFields objectAtIndex:rowIndex] setObject:anObject forKey:[aTableColumn identifier]]; + } else { + [[tableFields objectAtIndex:rowIndex] setObject:@"" forKey:[aTableColumn identifier]]; + } +} + +//tableView drag&drop datasource methods +- (BOOL)tableView:(NSTableView *)tableView writeRows:(NSArray*)rows toPasteboard:(NSPasteboard*)pboard +{ + int originalRow; + NSArray *pboardTypes; + + if ( ![self selectionShouldChangeInTableView:nil] ) + return NO; + + if ( ([rows count] == 1) && (tableView == tableSourceView) ) { + pboardTypes=[NSArray arrayWithObjects:@"SequelProPasteboard", nil]; + originalRow = [[rows objectAtIndex:0] intValue]; + + [pboard declareTypes:pboardTypes owner:nil]; + [pboard setString:[[NSNumber numberWithInt:originalRow] stringValue] forType:@"SequelProPasteboard"]; + + return YES; + } else { + return NO; + } +} + +- (NSDragOperation)tableView:(NSTableView*)tableView validateDrop:(id )info proposedRow:(int)row + proposedDropOperation:(NSTableViewDropOperation)operation +{ + NSArray *pboardTypes = [[info draggingPasteboard] types]; + int originalRow; + + if ([pboardTypes count] == 1 && row != -1) + { + if ([[pboardTypes objectAtIndex:0] isEqualToString:@"SequelProPasteboard"]==YES && operation==NSTableViewDropAbove) + { + originalRow = [[[info draggingPasteboard] stringForType:@"SequelProPasteboard"] intValue]; + + if (row != originalRow && row != (originalRow+1)) + { + return NSDragOperationMove; + } + } + } + + return NSDragOperationNone; +} + +- (BOOL)tableView:(NSTableView*)tableView acceptDrop:(id )info row:(int)row dropOperation:(NSTableViewDropOperation)operation +{ + int originalRow; + int destinationRow; + NSString *tempColName; + NSMutableString *queryString; + NSEnumerator *enumerator = [tableFields objectEnumerator]; + id field; + NSMutableArray *fieldNames = [NSMutableArray array]; + int i; + + + originalRow = [[[info draggingPasteboard] stringForType:@"SequelProPasteboard"] intValue]; + destinationRow = row; + + if ( ![[[tableFields objectAtIndex:originalRow] objectForKey:@"Key"] isEqualToString:@""] ) { + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, NSLocalizedString(@"Indexed fields cannot be moved!", @"message of panel when trying to move indexed field")); + return NO; + } + +/* +//alertSheet would be better... +//try to fix problem of lost values + if ( NSRunAlertPanel(@"Warning", [NSString stringWithFormat:@"All values for this field will be lost!\nField will be removed and a new field with the same options will be inserted at the desired position.\nThis is recommended only for empty columns!", + [[tableFields objectAtIndex:originalRow] objectForKey:@"Field"]], + @"Don't Move", @"Move", nil) + == NSAlertDefaultReturn ) { + return NO; + } +*/ + +//drop dragged column + //query started + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self]; + //find free column name + while ( (field = [enumerator nextObject]) ) { + [fieldNames addObject:[field objectForKey:@"Field"]]; + } + i = 1; + while ( [fieldNames containsObject:[NSString stringWithFormat:@"%@_temp%d", + [[tableFields objectAtIndex:originalRow] objectForKey:@"Field"], i]] ) { + i++; + } + tempColName = [NSString stringWithFormat:@"%@_temp%d", [[tableFields objectAtIndex:originalRow] objectForKey:@"Field"], i]; + //add new column with temp name at desired position + if ( [[[tableFields objectAtIndex:originalRow] objectForKey:@"Length"] isEqualToString:@""] || + ![[tableFields objectAtIndex:originalRow] objectForKey:@"Length"] ) + { + queryString = [NSMutableString stringWithFormat:@"ALTER TABLE `%@` ADD `%@` %@", + selectedTable, + tempColName, + [[tableFields objectAtIndex:originalRow] objectForKey:@"Type"]]; + } else { + queryString = [NSMutableString stringWithFormat:@"ALTER TABLE `%@` ADD `%@` %@(%@)", + selectedTable, + tempColName, + [[tableFields objectAtIndex:originalRow] objectForKey:@"Type"], + [[tableFields objectAtIndex:originalRow] objectForKey:@"Length"]]; + } + if ( [[[tableFields objectAtIndex:originalRow] objectForKey:@"unsigned"] intValue] == 1 ) { + [queryString appendString:@" UNSIGNED"]; + } + if ( [[[tableFields objectAtIndex:originalRow] objectForKey:@"zerofill"] intValue] == 1 ) { + [queryString appendString:@" ZEROFILL"]; + } + if ( [[[tableFields objectAtIndex:originalRow] objectForKey:@"binary"] intValue] == 1 ) { + [queryString appendString:@" BINARY"]; + } + if ( [[[tableFields objectAtIndex:originalRow] objectForKey:@"Null"] isEqualToString:@"NO"] ) + [queryString appendString:@" NOT NULL"]; + if ( [[[tableFields objectAtIndex:originalRow] objectForKey:@"Default"] isEqualToString:[prefs objectForKey:@"nullValue"]] ) { + [queryString appendString:@" DEFAULT NULL "]; + } else { +// [queryString appendString:[NSString stringWithFormat:@" DEFAULT \"%@\" ", +// [[tableFields objectAtIndex:originalRow] objectForKey:@"Default"]]]; + [queryString appendString:[NSString stringWithFormat:@" DEFAULT '%@' ", + [mySQLConnection prepareString:[[tableFields objectAtIndex:originalRow] objectForKey:@"Default"]]]]; + } +/* + if ( ![[[tableFields objectAtIndex:originalRow] objectForKey:@"Default"] isEqualToString:@""] ) + [queryString appendString:[NSString stringWithFormat:@" DEFAULT '%@'", + [[tableFields objectAtIndex:originalRow] objectForKey:@"Default"]]]; + [queryString appendString:@" "]; +*/ + if ( [[tableFields objectAtIndex:originalRow] objectForKey:@"Extra"] && + ![[[tableFields objectAtIndex:originalRow] objectForKey:@"Extra"] isEqualToString:@"None"] ) + [queryString appendString:[[tableFields objectAtIndex:originalRow] objectForKey:@"Extra"]]; + if ( destinationRow == 0 ) { + [queryString appendString:@" FIRST"]; + } else { + [queryString appendString:[NSString stringWithFormat:@" AFTER `%@`", + [[tableFields objectAtIndex:destinationRow-1] objectForKey:@"Field"]]]; + } + [mySQLConnection queryString:queryString]; + if ( ![[mySQLConnection getLastErrorMessage] isEqualTo:@""] ) { + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, + [NSString stringWithFormat:NSLocalizedString(@"Couldn't add field. MySQL said: %@", @"message of panel when field cannot be added in drag&drop operation"), [mySQLConnection getLastErrorMessage]]); + //query finished + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self]; + return NO; + } + //copy field values from old to new column + queryString = [NSString stringWithFormat:@"UPDATE `%@` SET `%@`=`%@`", + selectedTable, + tempColName, + [[tableFields objectAtIndex:originalRow] objectForKey:@"Field"]]; + [mySQLConnection queryString:queryString]; + if ( ![[mySQLConnection getLastErrorMessage] isEqualTo:@""] ) { + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, + [NSString stringWithFormat:NSLocalizedString(@"Couldn't copy field values. MySQL said: %@", @"message of panel when field content cannot be copied in drag&drop operation"), [mySQLConnection getLastErrorMessage]]); + //query finished + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self]; + return NO; + } + //drop old column + [mySQLConnection queryString:[NSString stringWithFormat:@"ALTER TABLE `%@` DROP `%@`", + selectedTable, [[tableFields objectAtIndex:originalRow] objectForKey:@"Field"]]]; + if ( ![[mySQLConnection getLastErrorMessage] isEqualTo:@""] ) { + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, + [NSString stringWithFormat:NSLocalizedString(@"Couldn't remove field. MySQL said: %@", @"message of panel when old field cannot be removed in drag&drop operation"), [mySQLConnection getLastErrorMessage]]); + //query finished + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self]; + return NO; + } + //rename column to original name + if ( [[[tableFields objectAtIndex:originalRow] objectForKey:@"Length"] isEqualToString:@""] || + ![[tableFields objectAtIndex:originalRow] objectForKey:@"Length"] ) + { + queryString = [NSMutableString stringWithFormat:@"ALTER TABLE `%@` CHANGE `%@` `%@` %@", + selectedTable, + tempColName, + [[tableFields objectAtIndex:originalRow] objectForKey:@"Field"], + [[tableFields objectAtIndex:originalRow] objectForKey:@"Type"]]; + } else { + queryString = [NSMutableString stringWithFormat:@"ALTER TABLE `%@` CHANGE `%@` `%@` %@(%@)", + selectedTable, + tempColName, + [[tableFields objectAtIndex:originalRow] objectForKey:@"Field"], + [[tableFields objectAtIndex:originalRow] objectForKey:@"Type"], + [[tableFields objectAtIndex:originalRow] objectForKey:@"Length"]]; + } + if ( [[[tableFields objectAtIndex:originalRow] objectForKey:@"unsigned"] intValue] == 1 ) { + [queryString appendString:@" UNSIGNED"]; + } + if ( [[[tableFields objectAtIndex:originalRow] objectForKey:@"zerofill"] intValue] == 1 ) { + [queryString appendString:@" ZEROFILL"]; + } + if ( [[[tableFields objectAtIndex:originalRow] objectForKey:@"binary"] intValue] == 1 ) { + [queryString appendString:@" BINARY"]; + } + if ( [[[tableFields objectAtIndex:originalRow] objectForKey:@"Null"] isEqualToString:@"NO"] ) + [queryString appendString:@" NOT NULL"]; +/* + if ( ![[[tableFields objectAtIndex:originalRow] objectForKey:@"Default"] isEqualToString:@""] ) + [queryString appendString:[NSString stringWithFormat:@" DEFAULT '%@'", + [[tableFields objectAtIndex:originalRow] objectForKey:@"Default"]]]; + [queryString appendString:@" "]; +*/ + if ( [[[tableFields objectAtIndex:originalRow] objectForKey:@"Default"] isEqualToString:[prefs objectForKey:@"nullValue"]] ) { + [queryString appendString:@" DEFAULT NULL "]; + } else { +// [queryString appendString:[NSString stringWithFormat:@" DEFAULT \"%@\" ", +// [[tableFields objectAtIndex:originalRow] objectForKey:@"Default"]]]; + [queryString appendString:[NSString stringWithFormat:@" DEFAULT '%@' ", + [mySQLConnection prepareString:[[tableFields objectAtIndex:originalRow] objectForKey:@"Default"]]]]; + + } + if ( [[tableFields objectAtIndex:originalRow] objectForKey:@"Extra"] && + ![[[tableFields objectAtIndex:originalRow] objectForKey:@"Extra"] isEqualToString:@"None"] ) + [queryString appendString:[[tableFields objectAtIndex:originalRow] objectForKey:@"Extra"]]; + [mySQLConnection queryString:queryString]; + if ( ![[mySQLConnection getLastErrorMessage] isEqualTo:@""] ) { + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, + [NSString stringWithFormat:NSLocalizedString(@"Couldn't rename field. MySQL said: %@", @"message of panel when field cannot be renamed in drag&drop operation"), [mySQLConnection getLastErrorMessage]]); + //query finished + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self]; + return NO; + } + + [self loadTable:selectedTable]; + if ( originalRow < destinationRow ) { + [tableSourceView selectRow:destinationRow-1 byExtendingSelection:NO]; + } else { + [tableSourceView selectRow:destinationRow byExtendingSelection:NO]; + } + + //query finished + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self]; + + return YES; +} + +//tableView delegate methods +- (BOOL)selectionShouldChangeInTableView:(NSTableView *)aTableView +{ +/* + int row = [tableSourceView editedRow]; + int column = [tableSourceView editedColumn]; + NSTableColumn *tableColumn; + NSCell *cell; + + if ( row != -1 ) { + tableColumn = [[tableSourceView tableColumns] objectAtIndex:column]; + cell = [tableColumn dataCellForRow:row]; + [cell endEditing:[tableSourceView currentEditor]]; + } +*/ +//end editing (otherwise problems when user hits reload button) + [tableWindow endEditingFor:nil]; + + return [self addRowToDB]; +} + +- (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)command +/* +traps enter and esc and make/cancel editing without entering next row +*/ +{ + int row, column; + + row = [tableSourceView editedRow]; + column = [tableSourceView editedColumn]; + + if ( [textView methodForSelector:command] == [textView methodForSelector:@selector(insertNewline:)] || + [textView methodForSelector:command] == [textView methodForSelector:@selector(insertTab:)] ) //trap enter and tab + { + //save current line + [[control window] makeFirstResponder:control]; + if ( column == 9 ) { + if ( [self addRowToDB] && [textView methodForSelector:command] == [textView methodForSelector:@selector(insertTab:)] ) { + if ( row < ([tableSourceView numberOfRows] - 1) ) { + [tableSourceView selectRow:row+1 byExtendingSelection:NO]; + [tableSourceView editColumn:0 row:row+1 withEvent:nil select:YES]; + } else { + [tableSourceView selectRow:0 byExtendingSelection:NO]; + [tableSourceView editColumn:0 row:0 withEvent:nil select:YES]; + } + } + } else { + if ( column == 2 ) { + [tableSourceView editColumn:column+4 row:row withEvent:nil select:YES]; + } else if ( column == 6 ) { + [tableSourceView editColumn:column+2 row:row withEvent:nil select:YES]; + } else { + [tableSourceView editColumn:column+1 row:row withEvent:nil select:YES]; + } + } + return TRUE; + } + else if ( [[control window] methodForSelector:command] == [[control window] methodForSelector:@selector(_cancelKey:)] || + [textView methodForSelector:command] == [textView methodForSelector:@selector(complete:)] ) //trap esc + { + //abort editing + [control abortEditing]; + if ( isEditingRow && !isEditingNewRow ) { + isEditingRow = NO; + [tableFields replaceObjectAtIndex:row withObject:[NSMutableDictionary dictionaryWithDictionary:oldRow]]; + } else if ( isEditingNewRow ) { + isEditingRow = NO; + isEditingNewRow = NO; + [tableFields removeObjectAtIndex:row]; + [tableSourceView reloadData]; + } + return TRUE; + } + else + { + return FALSE; + } +} + + +//slitView delegate methods +- (BOOL)splitView:(NSSplitView *)sender canCollapseSubview:(NSView *)subview +/* +tells the splitView that it can collapse views +*/ +{ + return YES; +} + +- (float)splitView:(NSSplitView *)sender constrainMaxCoordinate:(float)proposedMax ofSubviewAt:(int)offset +/* +defines max position of splitView +*/ +{ + return proposedMax - 150; +} + +- (float)splitView:(NSSplitView *)sender constrainMinCoordinate:(float)proposedMin ofSubviewAt:(int)offset +/* +defines min position of splitView +*/ +{ + return proposedMin + 150; +} + +- (NSRect)splitView:(NSSplitView *)splitView additionalEffectiveRectOfDividerAtIndex:(int)dividerIndex +{ + return [structureGrabber convertRect:[structureGrabber bounds] toView:splitView]; +} + +//last but not least +- (id)init +{ + self = [super init]; + + tableFields = [[NSMutableArray alloc] init]; + indexes = [[NSMutableArray alloc] init]; + oldRow = [[NSMutableDictionary alloc] init]; + enumFields = [[NSMutableDictionary alloc] init]; + + return self; +} + +- (void)dealloc +{ +// NSLog(@"TableSource dealloc"); + + [tableFields release]; + [indexes release]; + [oldRow release]; + [defaultValues release]; + [prefs release]; + [enumFields release]; + + [super dealloc]; +} + +@end diff --git a/trunk/TableStatus.h b/trunk/TableStatus.h new file mode 100644 index 00000000..13442db2 --- /dev/null +++ b/trunk/TableStatus.h @@ -0,0 +1,63 @@ +// +// TableContent.h +// sequel-pro +// +// Created by Jason Hallford (jason.hallford@byu.edu) on Th July 08 2004. +// sequel-pro Copyright (c) 2002-2003 Lorenz Textor. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at +// Or mail to + +#import +#import +#import "CMMCPConnection.h" +#import "CMMCPResult.h" + +@interface TableStatus : NSObject +{ + IBOutlet id commentsBox; + IBOutlet id rowsNumber; + IBOutlet id rowsFormat; + IBOutlet id rowsAvgLength; + IBOutlet id rowsAutoIncrement; + IBOutlet id sizeData; + IBOutlet id sizeFree; + IBOutlet id sizeIndex; + IBOutlet id sizeMaxData; + IBOutlet id tableCreatedAt; + IBOutlet id tableName; + IBOutlet id tableType; + IBOutlet id tableUpdatedAt; + + CMMCPConnection *mySQLConnection; + CMMCPResult *tableStatusResult; + + NSString *selectedTable; + NSDictionary* statusFields; +} + +// Table methods +- (void)loadTable:(NSString *)aTable; +- (IBAction)reloadTable:(id)sender; + +// Additional methods +- (void)setConnection:(CMMCPConnection *)theConnection; +- (void)awakeFromNib; + +// Initialization +- (id)init; +@end diff --git a/trunk/TableStatus.m b/trunk/TableStatus.m new file mode 100644 index 00000000..f2ad1244 --- /dev/null +++ b/trunk/TableStatus.m @@ -0,0 +1,113 @@ +#import "TableStatus.h" + +@implementation TableStatus + +- (void)awakeFromNib +{ + // TODO: implement awake code. +} + +- (void)setConnection:(CMMCPConnection *)theConnection +{ + mySQLConnection = theConnection; + [mySQLConnection retain]; +} + +- (NSString*)getSQLColumnValue:(NSString *)withName usingFields:(NSDictionary*)fields withLabel:(NSString*)label +{ + NSString* value = [fields objectForKey:withName]; + if([value isKindOfClass:[NSNull class]]) + { + value = @"--"; + } + + NSString* labelVal = [NSString stringWithFormat:@"%@: %@",label,value]; + + return labelVal; +} + +- (void)loadTable:(NSString *)aTable +{ + // Store the table name away for future use... + selectedTable = aTable; + + // Notify any listeners that a query is about to begin... + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self]; + + // no table selected + if([aTable isEqualToString:@""] || !aTable) { + [tableName setStringValue:@"Name: --"]; + [tableType setStringValue:@"Type: --"]; + [tableCreatedAt setStringValue:@"Created At: --"]; + [tableUpdatedAt setStringValue:@"Updated At: --"]; + + // Assign the row values... + [rowsNumber setStringValue:@"Number Of: --"]; + [rowsFormat setStringValue:@"Format: --"]; + [rowsAvgLength setStringValue:@"Avg. Length: --"]; + [rowsAutoIncrement setStringValue:@"Auto Increment: --"]; + + // Assign the size values... + [sizeData setStringValue:@"Data: --"]; + [sizeMaxData setStringValue:@"Max Data: --"]; + [sizeIndex setStringValue:@"Index: --"]; + [sizeFree setStringValue:@"Free: --"]; + + // Finally, set the value of the comments box + [commentsBox setStringValue:@"--"]; + + // Tell everyone we've finished with our query... + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self]; + return; + } + + // Run the query to retrieve the status of the selected table. We'll then use this information to populate + // the associated view's controls. + tableStatusResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SHOW TABLE STATUS LIKE '%@'", selectedTable]]; + + statusFields = [tableStatusResult fetchRowAsDictionary]; + + // Assign the table values... + [tableName setStringValue:[NSString stringWithFormat:@"Name: %@",selectedTable]]; + if ( [statusFields objectForKey:@"Type"] ) { + [tableType setStringValue:[self getSQLColumnValue:@"Type" usingFields:statusFields withLabel:@"Type"]]; + } else { + // mysql > 4.1 + [tableType setStringValue:[self getSQLColumnValue:@"Engine" usingFields:statusFields withLabel:@"Type"]]; + } + [tableCreatedAt setStringValue:[self getSQLColumnValue:@"Create_time" usingFields:statusFields withLabel:@"Created At"]]; + [tableUpdatedAt setStringValue:[self getSQLColumnValue:@"Update_time" usingFields:statusFields withLabel:@"Updated At"]]; + + // Assign the row values... + [rowsNumber setStringValue:[self getSQLColumnValue:@"Rows" usingFields:statusFields withLabel:@"Number Of"]]; + [rowsFormat setStringValue:[self getSQLColumnValue:@"Row_format" usingFields:statusFields withLabel:@"Format"]]; + [rowsAvgLength setStringValue:[self getSQLColumnValue:@"Avg_row_length" usingFields:statusFields withLabel:@"Avg. Length"]]; + [rowsAutoIncrement setStringValue:[self getSQLColumnValue:@"Auto_increment" usingFields:statusFields withLabel:@"Auto Increment"]]; + + // Assign the size values... + [sizeData setStringValue:[self getSQLColumnValue:@"Data_length" usingFields:statusFields withLabel:@"Data"]]; + [sizeMaxData setStringValue:[self getSQLColumnValue:@"Max_data_length" usingFields:statusFields withLabel:@"Max Data"]]; + [sizeIndex setStringValue:[self getSQLColumnValue:@"Index_length" usingFields:statusFields withLabel:@"Index"]]; + [sizeFree setStringValue:[self getSQLColumnValue:@"Data_free" usingFields:statusFields withLabel:@"Free"]]; + + // Finally, assign the comments... + [commentsBox setStringValue:[statusFields objectForKey:@"Comment"]]; + + // Tell everyone we've finished with our query... + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self]; + + return; +} + +- (IBAction)reloadTable:(id)sender +{ + [self loadTable:selectedTable]; +} + +- (id)init +{ + self = [super init]; + + return self; +} +@end diff --git a/trunk/TablesList.h b/trunk/TablesList.h new file mode 100644 index 00000000..2641bd86 --- /dev/null +++ b/trunk/TablesList.h @@ -0,0 +1,95 @@ +// +// TablesList.h +// sequel-pro +// +// Created by lorenz textor (lorenz@textor.ch) on Wed May 01 2002. +// Copyright (c) 2002-2003 Lorenz Textor. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at +// Or mail to + +#import +#import +#import "CMMCPConnection.h" +#import "CMMCPResult.h" + + +@interface TablesList : NSObject { + + IBOutlet id tableDocumentInstance; + IBOutlet id tableSourceInstance; + IBOutlet id tableContentInstance; + IBOutlet id customQueryInstance; + IBOutlet id tableDumpInstance; + IBOutlet id tableStatusInstance; + + IBOutlet id tableWindow; + IBOutlet id copyTableSheet; + IBOutlet id tablesListView; + IBOutlet id copyTableNameField; + IBOutlet id copyTableContentSwitch; + IBOutlet id tabView; + + CMMCPConnection *mySQLConnection; + NSMutableArray *tables; +// NSUserDefaults *prefs; + BOOL structureLoaded, contentLoaded, statusLoaded, alertSheetOpened; +} + +//IBAction methods +- (IBAction)updateTables:(id)sender; +- (IBAction)addTable:(id)sender; +- (IBAction)removeTable:(id)sender; +- (IBAction)copyTable:(id)sender; + +//alert sheet methods +- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo; + +//copyTableSheet methods +- (IBAction)closeCopyTableSheet:(id)sender; + +//additional methods +- (void)removeTable; +- (void)setConnection:(CMMCPConnection *)theConnection; +- (void)doPerformQueryService:(NSString *)query; + +//getter methods +- (NSString *)table; +- (BOOL)structureLoaded; +- (BOOL)contentLoaded; +- (BOOL)statusLoaded; + +//tableView datasource methods +- (int)numberOfRowsInTableView:(NSTableView *)aTableView; +- (id)tableView:(NSTableView *)aTableView + objectValueForTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex; +- (void)tableView:(NSTableView *)aTableView + setObjectValue:(id)anObject + forTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex; + +//tableView delegate methods +- (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)command; +- (BOOL)selectionShouldChangeInTableView:(NSTableView *)aTableView; +- (void)tableViewSelectionDidChange:(NSNotification *)aNotification; + +//last but not least +- (id)init; +- (void)dealloc; + +@end diff --git a/trunk/TablesList.m b/trunk/TablesList.m new file mode 100644 index 00000000..19b9362f --- /dev/null +++ b/trunk/TablesList.m @@ -0,0 +1,694 @@ +// +// TablesList.m +// sequel-pro +// +// Created by lorenz textor (lorenz@textor.ch) on Wed May 01 2002. +// Copyright (c) 2002-2003 Lorenz Textor. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at +// Or mail to + +#import "TablesList.h" +#import "TableDocument.h" +#import "TableSource.h" +#import "TableContent.h" +#import "TableDump.h" +#import "ImageAndTextCell.h" + +@implementation TablesList + +//IBAction methods +- (IBAction)updateTables:(id)sender +/* +loads all table names in array tables and reload the tableView +*/ +{ + CMMCPResult *theResult; + int i; + + //query started + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self]; + + [tablesListView deselectAll:self]; + [tables removeAllObjects]; + [tables addObject:@"TABLES"]; + + theResult = [mySQLConnection listTables]; + for ( i = 0 ; i < [theResult numOfRows] ; i++ ) { + [theResult dataSeek:i]; + [tables addObject:[[theResult fetchRowAsArray] objectAtIndex:0]]; + } + + [tablesListView reloadData]; + + //query finished + [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self]; +} + +- (IBAction)addTable:(id)sender +/* +adds a new table to the tables-array (no changes in mysql-db) +*/ +{ + if ( ![tableSourceInstance selectionShouldChangeInTableView:nil] || + ![tableContentInstance selectionShouldChangeInTableView:nil] || + ![tableDocumentInstance database] ) + return; + [tableWindow endEditingFor:nil]; + + [tables addObject:@""]; + [tablesListView reloadData]; + [tablesListView selectRow:[tables count]-1 byExtendingSelection:NO]; + [tablesListView editColumn:0 row:[tables count]-1 withEvent:nil select:YES]; +} + +- (IBAction)removeTable:(id)sender +/* +invoked when user hits the remove button +alert sheet to ask user if he really wants to delete the table +*/ +{ + if ( ![tablesListView numberOfSelectedRows] ) + return; + [tableWindow endEditingFor:nil]; + + if ( [tablesListView numberOfSelectedRows] == 1 ) { + NSBeginAlertSheet(NSLocalizedString(@"Warning", @"warning"), NSLocalizedString(@"Delete", @"delete button"), NSLocalizedString(@"Cancel", @"cancel button"), nil, tableWindow, self, + @selector(sheetDidEnd:returnCode:contextInfo:), nil, + @"removeRow", [NSString stringWithFormat:NSLocalizedString(@"Do you really want to delete the table %@?", @"message of panel asking for confirmation for deleting table"), + [tables objectAtIndex:[tablesListView selectedRow]]]); + } else { + NSBeginAlertSheet(NSLocalizedString(@"Warning", @"warning"), NSLocalizedString(@"Delete", @"delete button"), NSLocalizedString(@"Cancel", @"cancel button"), nil, tableWindow, self, + @selector(sheetDidEnd:returnCode:contextInfo:), nil, + @"removeRow", [NSString stringWithFormat:NSLocalizedString(@"Do you really want to delete the selected tables?", @"message of panel asking for confirmation for deleting tables"), + [tables objectAtIndex:[tablesListView selectedRow]]]); + } +} + +- (IBAction)copyTable:(id)sender +/* +copies a table, if desired with content +*/ +{ + CMMCPResult *queryResult; + NSScanner *scanner = [NSScanner alloc]; + NSString *scanString; +// NSArray *fieldNames; +// NSArray *theRow; +// NSMutableString *rowValue = [NSMutableString string]; +// NSMutableArray *fieldValues; + int code; +// int rowCount, i, j; +// BOOL errors = NO; + + if ( [tablesListView numberOfSelectedRows] != 1 ) + return; + if ( ![tableSourceInstance selectionShouldChangeInTableView:nil] || ![tableContentInstance selectionShouldChangeInTableView:nil] ) + return; + [tableWindow endEditingFor:nil]; + +//open copyTableSheet + [copyTableNameField setStringValue:[NSString stringWithFormat:@"%@Copy", [tables objectAtIndex:[tablesListView selectedRow]]]]; + [copyTableContentSwitch setState:NSOffState]; + [NSApp beginSheet:copyTableSheet + modalForWindow:tableWindow modalDelegate:self + didEndSelector:nil contextInfo:nil]; + code = [NSApp runModalForWindow:copyTableSheet]; + + [NSApp endSheet:copyTableSheet]; + [copyTableSheet orderOut:nil]; + + if ( !code ) + return; + if ( [[copyTableNameField stringValue] isEqualToString:@""] ) { + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, NSLocalizedString(@"Table must have a name.", @"message of panel when no name is given for table")); + return; + } + +//get table structure + queryResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SHOW CREATE TABLE `%@`", + [tables objectAtIndex:[tablesListView selectedRow]]]]; + if ( ![queryResult numOfRows] ) { +//error while getting table structure + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, + [NSString stringWithFormat:NSLocalizedString(@"Couldn't get table information.\nMySQL said: %@", @"message of panel when table information cannot be retrieved"), [mySQLConnection getLastErrorMessage]]); + } else { +//insert new table name in create syntax and create new table + [scanner initWithString:[[queryResult fetchRowAsDictionary] objectForKey:@"Create Table"]]; + [scanner scanUpToString:@"(" intoString:nil]; + [scanner scanUpToString:@"" intoString:&scanString]; + [mySQLConnection queryString:[NSString stringWithFormat:@"CREATE TABLE `%@` %@", [copyTableNameField stringValue], scanString]]; + if ( ![[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) { +//error while creating new table + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, + [NSString stringWithFormat:NSLocalizedString(@"Couldn't create table.\nMySQL said: %@", @"message of panel when table cannot be created"), [mySQLConnection getLastErrorMessage]]); + } else { + if ( [copyTableContentSwitch state] == NSOnState ) { +//copy table content +/* + queryResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SELECT * FROM `%@`", + [tables objectAtIndex:[tablesListView selectedRow]]]]; + fieldNames = [queryResult fetchFieldNames]; + rowCount = [queryResult numOfRows]; + for ( i = 0 ; i < rowCount ; i++ ) { + [queryResult dataSeek:i]; + theRow = [queryResult fetchRowAsArray]; + fieldValues = [NSMutableArray array]; + for ( j = 0 ; j < [theRow count] ; j++ ) { + if ( [[theRow objectAtIndex:j] isKindOfClass:[NSData class]] ) { +// [rowValue setString:[[NSString alloc] initWithData:[theRow objectAtIndex:j] +// encoding:[mySQLConnection encoding]]]; + [rowValue setString:[mySQLConnection prepareBinaryData:[theRow objectAtIndex:j]]]; + } else { + [rowValue setString:[mySQLConnection prepareString:[[theRow objectAtIndex:j] description]]]; + } +*/ +/* + //escape special characters + for ( u = 0 ; u < [rowValue length] ; u++ ) { + if ( [rowValue characterAtIndex:u] == '\\' ) { + [rowValue insertString:@"\\" atIndex:u]; + u++; + } else if ( [rowValue characterAtIndex:u] == '"' ) { + [rowValue insertString:@"\\" atIndex:u]; + u++; + } + } +*/ +/* + if ( [[theRow objectAtIndex:j] isKindOfClass:[NSNull class]] ) { + [fieldValues addObject:@"NULL"]; + } else { +// [fieldValues addObject:[NSString stringWithFormat:@"\"%@\"", [mySQLConnection prepareString:rowValue]]]; +// [fieldValues addObject:[NSString stringWithFormat:@"\"%@\"", rowValue]]; +// [fieldValues addObject:[NSString stringWithFormat:@"'%@'", [mySQLConnection prepareString:rowValue]]]; + [fieldValues addObject:[NSString stringWithFormat:@"'%@'", rowValue]]; + + } + } + [mySQLConnection queryString:[NSString stringWithFormat:@"INSERT INTO `%@` (`%@`) VALUES (%@)", + [copyTableNameField stringValue], [fieldNames componentsJoinedByString:@"`,`"], + [fieldValues componentsJoinedByString:@","]]]; + if ( ![[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) { + errors = YES; + } + } + if ( errors ) + NSBeginAlertSheet(@"Warning", @"OK", nil, nil, tableWindow, self, nil, nil, nil, + @"There have been errors while copying table content. Please control the new table."); +*/ + [mySQLConnection queryString:[NSString stringWithFormat:@"INSERT INTO `%@` SELECT * FROM `%@`", + [copyTableNameField stringValue], [tables objectAtIndex:[tablesListView selectedRow]]]]; + if ( ![[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) { + NSBeginAlertSheet(NSLocalizedString(@"Warning", @"warning"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, + NSLocalizedString(@"There have been errors while copying table content. Please control the new table.", @"message of panel when table content cannot be copied")); + } + } + [tables insertObject:[copyTableNameField stringValue] atIndex:[tablesListView selectedRow]+1]; + [tablesListView reloadData]; + [tablesListView selectRow:[tablesListView selectedRow]+1 byExtendingSelection:NO]; + [tablesListView scrollRowToVisible:[tablesListView selectedRow]]; + } + } +} + + +//alert sheet methods +- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo +/* +method for alert sheets +invoked when user wants to delete a table +*/ +{ + if ( [contextInfo isEqualToString:@"addRow"] ) { + alertSheetOpened = NO; + } else if ( [contextInfo isEqualToString:@"removeRow"] ) { + if ( returnCode == NSAlertDefaultReturn ) { + [sheet orderOut:self]; + [self removeTable]; + } + } +} + +//copyTableSheet methods +- (IBAction)closeCopyTableSheet:(id)sender +/* +closes copyTableSheet and stops modal session +*/ +{ + [NSApp stopModalWithCode:[sender tag]]; +} + +//additional methods +- (void)removeTable; +/* +removes selected table(s) from mysql-db and tableView +*/ +{ + NSIndexSet *indexes = [tablesListView selectedRowIndexes]; + NSString *errorText; + BOOL error = FALSE; + // get last index + unsigned currentIndex = [indexes lastIndex]; + while (currentIndex != NSNotFound) + { + [mySQLConnection queryString:[NSString stringWithFormat:@"DROP TABLE `%@`", [tables objectAtIndex:currentIndex]]]; + + if ( [[mySQLConnection getLastErrorMessage] isEqualTo:@""] ) { + //dropped table with success + [tables removeObjectAtIndex:currentIndex]; + } else { + //couldn't drop table + error = TRUE; + errorText = [mySQLConnection getLastErrorMessage]; + } + // get next index (beginning from the end) + currentIndex = [indexes indexLessThanIndex:currentIndex]; + } + [tablesListView deselectAll:self]; +// [tableSourceInstance loadTable:nil]; +// [tableContentInstance loadTable:nil]; +// [tableStatusInstance loadTable:nil]; + [tablesListView reloadData]; + // set window title + [tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@@%@/%@", [tableDocumentInstance mySQLVersion], [tableDocumentInstance user], + [tableDocumentInstance host], [tableDocumentInstance database]]]; + if ( error ) + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, + [NSString stringWithFormat:NSLocalizedString(@"Couldn't remove table.\nMySQL said: %@", @"message of panel when table cannot be removed"), errorText]); +} + +- (void)setConnection:(CMMCPConnection *)theConnection +/* +sets the connection (received from TableDocument) and makes things that have to be done only once +*/ +{ + mySQLConnection = theConnection; + +// prefs = [[NSUserDefaults standardUserDefaults] retain]; + +//set smallSystemFonts +// [[[tablesListView tableColumnWithIdentifier:@"tables"] dataCell] setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; +// [copyTableNameField setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; +// if ( [prefs boolForKey:@"useMonospacedFonts"] ) { + if ( [[NSUserDefaults standardUserDefaults] boolForKey:@"useMonospacedFonts"] ) { + [[[tablesListView tableColumnWithIdentifier:@"tables"] dataCell] + setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]]; + } + + [self updateTables:self]; +} + +- (void)doPerformQueryService:(NSString *)query +/* +selects customQuery tab and passes query to customQueryInstance +*/ +{ + [tabView selectTabViewItemAtIndex:2]; + [customQueryInstance doPerformQueryService:query]; +} + + +//getter methods +- (NSString *)table +/* +returns the currently selected table or nil if no table or mulitple tables are selected +*/ +{ + if ( [tablesListView numberOfSelectedRows] == 1 ) { + return [tables objectAtIndex:[tablesListView selectedRow]]; + } else if ([tablesListView numberOfSelectedRows] > 1) { + return @""; + } else { + return nil; + } +} + +- (BOOL)structureLoaded +/* +returns YES if table source has already been loaded +*/ +{ + return structureLoaded; +} + +- (BOOL)contentLoaded +/* +returns YES if table content has already been loaded +*/ +{ + return contentLoaded; +} + +- (BOOL)statusLoaded +/* +returns YES if table status has already been loaded +*/ +{ + return statusLoaded; +} + + +//tableView datasource methods +- (int)numberOfRowsInTableView:(NSTableView *)aTableView +{ + return [tables count]; +} + +- (id)tableView:(NSTableView *)aTableView + objectValueForTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex +{ + return [tables objectAtIndex:rowIndex]; +} + +/** + * adds or renames a table (in tables-array and mysql-db) + * removes new table from table-array if renaming had no success + */ +- (void)tableView:(NSTableView *)aTableView + setObjectValue:(id)anObject + forTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex +{ + if ( [[tables objectAtIndex:rowIndex] isEqualToString:@""] ) { + //new table + if ( [anObject isEqualToString:@""] ) { + //table has no name + alertSheetOpened = YES; + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, + @selector(sheetDidEnd:returnCode:contextInfo:), nil, @"addRow", NSLocalizedString(@"Table must have a name.", @"message of panel when no name is given for table")); + [tables removeObjectAtIndex:rowIndex]; + [tablesListView reloadData]; + } else { + if ( [tableDocumentInstance supportsEncoding] ) { + [mySQLConnection queryString:[NSString stringWithFormat:@"CREATE TABLE `%@` (id int) DEFAULT CHARACTER SET %@", anObject, [tableDocumentInstance encoding]]]; + } else { + [mySQLConnection queryString:[NSString stringWithFormat:@"CREATE TABLE `%@` (id int)", anObject]]; + } + if ( [[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) { + //added table with success + // NSLog(@"added new table with success"); + [tables replaceObjectAtIndex:rowIndex withObject:anObject]; + if ( [tabView indexOfTabViewItem:[tabView selectedTabViewItem]] == 0 ) { + [tableSourceInstance loadTable:anObject]; + structureLoaded = YES; + contentLoaded = NO; + statusLoaded = NO; + } else if ( [tabView indexOfTabViewItem:[tabView selectedTabViewItem]] == 1 ) { + [tableSourceInstance loadTable:anObject]; + [tableContentInstance loadTable:anObject]; + structureLoaded = YES; + contentLoaded = YES; + statusLoaded = NO; + } else if ( [tabView indexOfTabViewItem:[tabView selectedTabViewItem]] == 3 ) { + [tableStatusInstance loadTable:anObject]; + statusLoaded = YES; + structureLoaded = NO; + contentLoaded = NO; + } else { + statusLoaded = NO; + structureLoaded = NO; + contentLoaded = NO; + } + // set window title + [tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@@%@/%@/%@", [tableDocumentInstance mySQLVersion], [tableDocumentInstance user], + [tableDocumentInstance host], [tableDocumentInstance database], anObject]]; + } else { + //error while adding new table + // NSLog(@"couldn't add new table"); + alertSheetOpened = YES; + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, + @selector(sheetDidEnd:returnCode:contextInfo:), nil, @"addRow", + [NSString stringWithFormat:NSLocalizedString(@"Couldn't add table %@.\nMySQL said: %@", @"message of panel when table cannot be created with the given name"), + anObject, [mySQLConnection getLastErrorMessage]]); + [tables removeObjectAtIndex:rowIndex]; + [tablesListView reloadData]; + } + } + } else { + //table modification + if ( [[tables objectAtIndex:rowIndex] isEqualToString:anObject] ) { + //no changes in table name + // NSLog(@"no changes in table name"); + } else if ( [anObject isEqualToString:@""] ) { + //table has no name + // NSLog(@"name is nil"); + alertSheetOpened = YES; + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, + @selector(sheetDidEnd:returnCode:contextInfo:), nil, @"addRow", NSLocalizedString(@"Table must have a name.", @"message of panel when no name is given for table")); + } else { + [mySQLConnection queryString:[NSString stringWithFormat:@"RENAME TABLE `%@` TO `%@`", [tables objectAtIndex:rowIndex], anObject]]; + if ( [[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) { + // NSLog(@"renamed table with success"); + //renamed with success + [tables replaceObjectAtIndex:rowIndex withObject:anObject]; + if ( [tabView indexOfTabViewItem:[tabView selectedTabViewItem]] == 0 ) { + [tableSourceInstance loadTable:anObject]; + structureLoaded = YES; + contentLoaded = NO; + statusLoaded = NO; + } else if ( [tabView indexOfTabViewItem:[tabView selectedTabViewItem]] == 1 ) { + [tableSourceInstance loadTable:anObject]; + [tableContentInstance loadTable:anObject]; + structureLoaded = YES; + contentLoaded = YES; + statusLoaded = NO; + } else if ( [tabView indexOfTabViewItem:[tabView selectedTabViewItem]] == 3 ) { + [tableStatusInstance loadTable:anObject]; + structureLoaded = NO; + contentLoaded = NO; + statusLoaded = YES; + } else { + statusLoaded = NO; + structureLoaded = NO; + contentLoaded = NO; + } + // set window title + [tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@@%@/%@/%@", [tableDocumentInstance mySQLVersion], [tableDocumentInstance user], + [tableDocumentInstance host], [tableDocumentInstance database], anObject]]; + } else { + //error while renaming + // NSLog(@"couldn't rename table"); + alertSheetOpened = YES; + NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, + @selector(sheetDidEnd:returnCode:contextInfo:), nil, @"addRow", + [NSString stringWithFormat:NSLocalizedString(@"Couldn't rename table.\nMySQL said: %@", @"message of panel when table cannot be renamed"), + [mySQLConnection getLastErrorMessage]]); + } + } + } +} + +//tableView delegate methods +- (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)command +/* +traps enter and esc and edit/cancel without entering next row +*/ +{ + if ( [textView methodForSelector:command] == [textView methodForSelector:@selector(insertNewline:)] ) //trap enter + { + //save current line + [[control window] makeFirstResponder:control]; + return TRUE; + } + else if ( [[control window] methodForSelector:command] == [[control window] methodForSelector:@selector(_cancelKey:)] || + [textView methodForSelector:command] == [textView methodForSelector:@selector(complete:)] ) //trap esc + { + //abort editing + [control abortEditing]; + if ( [[tables objectAtIndex:[tablesListView selectedRow]] isEqualToString:@""] ) { + //user added new table and then pressed escape + [tables removeObjectAtIndex:[tablesListView selectedRow]]; + [tablesListView reloadData]; + } + return TRUE; + } + else + { + return FALSE; + } +} + +- (BOOL)selectionShouldChangeInTableView:(NSTableView *)aTableView +{ +/* + int row = [tablesListView editedRow]; + int column = [tablesListView editedColumn]; + NSTableColumn *tableColumn; + NSCell *cell; + + if ( row != -1 ) { + tableColumn = [[tablesListView tableColumns] objectAtIndex:column]; + cell = [tableColumn dataCellForRow:row]; + [cell endEditing:[tablesListView currentEditor]]; + } +*/ +//end editing (otherwise problems when user hits reload button) + [tableWindow endEditingFor:nil]; + if ( alertSheetOpened ) { + return NO; + } + +//we have to be sure that TableSource and TableContent have finished editing +// if ( ![tableSourceInstance addRowToDB] || ![tableContentInstance addRowToDB] ) { + if ( ![tableSourceInstance selectionShouldChangeInTableView:nil] || + ![tableContentInstance selectionShouldChangeInTableView:nil] ) { + return NO; + } else { + return YES; + } +} + +- (void)tableViewSelectionDidChange:(NSNotification *)aNotification +/* +loads a table in content or source view (if tab selected) +*/ +{ + if ( [tablesListView numberOfSelectedRows] == 1 ) { + if ( [tabView indexOfTabViewItem:[tabView selectedTabViewItem]] == 0 ) { + [tableSourceInstance loadTable:[tables objectAtIndex:[tablesListView selectedRow]]]; + structureLoaded = YES; + contentLoaded = NO; + statusLoaded = NO; + } else if ( [tabView indexOfTabViewItem:[tabView selectedTabViewItem]] == 1 ) { + [tableSourceInstance loadTable:[tables objectAtIndex:[tablesListView selectedRow]]]; + [tableContentInstance loadTable:[tables objectAtIndex:[tablesListView selectedRow]]]; + structureLoaded = YES; + contentLoaded = YES; + statusLoaded = NO; + } else if ( [tabView indexOfTabViewItem:[tabView selectedTabViewItem]] == 3 ) { + [tableStatusInstance loadTable:[tables objectAtIndex:[tablesListView selectedRow]]]; + structureLoaded = NO; + contentLoaded = NO; + statusLoaded = YES; + } else { + structureLoaded = NO; + contentLoaded = NO; + statusLoaded = NO; + } + // set window title + [tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@@%@/%@/%@", [tableDocumentInstance mySQLVersion], [tableDocumentInstance user], + [tableDocumentInstance host], [tableDocumentInstance database], [tables objectAtIndex:[tablesListView selectedRow]]]]; + + } else { + [tableSourceInstance loadTable:nil]; + [tableContentInstance loadTable:nil]; + [tableStatusInstance loadTable:nil]; + structureLoaded = NO; + contentLoaded = NO; + statusLoaded = NO; + // set window title + [tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@@%@/%@", [tableDocumentInstance mySQLVersion], [tableDocumentInstance user], + [tableDocumentInstance host], [tableDocumentInstance database]]]; + } +} + +//tabView delegate methods +- (void)tabView:(NSTabView *)aTabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem +/* +loads structure or source if tab selected the first time +*/ +{ + if ( [tablesListView numberOfSelectedRows] == 1 ) + { + if ( ([tabView indexOfTabViewItem:[tabView selectedTabViewItem]] == 0) && !structureLoaded ) + { + [tableSourceInstance loadTable:[tables objectAtIndex:[tablesListView selectedRow]]]; + structureLoaded = YES; + } + if ( ([tabView indexOfTabViewItem:[tabView selectedTabViewItem]] == 1) && !contentLoaded ) + { + if ( !structureLoaded ) { + [tableSourceInstance loadTable:[tables objectAtIndex:[tablesListView selectedRow]]]; + structureLoaded = YES; + } + [tableContentInstance loadTable:[tables objectAtIndex:[tablesListView selectedRow]]]; + contentLoaded = YES; + } + if ( ([tabView indexOfTabViewItem:[tabView selectedTabViewItem]] == 3) && !statusLoaded ) + { + [tableStatusInstance loadTable:[tables objectAtIndex:[tablesListView selectedRow]]]; + statusLoaded = YES; + } + } +/* + if ( [tabView indexOfTabViewItem:[tabView selectedTabViewItem]] == 3 ) + { + [tableDumpInstance reloadTables:self]; + } +*/ +} + +- (BOOL)tableView:(NSTableView *)aTableView shouldSelectRow:(int)rowIndex +{ + return (rowIndex != 0); +} + + +- (BOOL)tableView:(NSTableView *)aTableView isGroupRow:(int)row +{ + return (row == 0); +} + +- (void)tableView:(NSTableView *)aTableView + willDisplayCell:(id)aCell + forTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex +{ + if (rowIndex > 0 && [[aTableColumn identifier] isEqualToString:@"tables"]) { + [(ImageAndTextCell*)aCell setImage:[NSImage imageNamed:@"table-small"]]; + [(ImageAndTextCell*)aCell setIndentationLevel:1]; + + } else { + [(ImageAndTextCell*)aCell setImage:nil]; + [(ImageAndTextCell*)aCell setIndentationLevel:0]; + } +} + +- (float)tableView:(NSTableView *)tableView heightOfRow:(int)row +{ + if (row == 0) { + return 25; + } else { + return 17; + } +} + +//last but not least +- (id)init +{ + self = [super init]; + + tables = [[NSMutableArray alloc] init]; + structureLoaded = NO; + contentLoaded = NO; + [tables addObject:NSLocalizedString(@"TABLES",@"header for table list")]; + return self; +} + +- (void)dealloc +{ +// NSLog(@"TableList dealloc"); + + [tables release]; + + [super dealloc]; +} + + +@end diff --git a/trunk/askForPass.sh b/trunk/askForPass.sh new file mode 100755 index 00000000..9dc68933 --- /dev/null +++ b/trunk/askForPass.sh @@ -0,0 +1,12 @@ +#!/bin/sh +PF=$* +UUID=`uuidgen` +mkfifo /tmp/$UUID +SCRIPT=`echo tell application \"Sequel Pro\" to authenticate tunnel \"$TUNNEL_NAME\" query phrase \"$PF\" fifo \"/tmp/$UUID\"` +echo $SCRIPT > /tmp/test +#PASS=`osascript -e "$SCRIPT"`; +osascript -e "$SCRIPT" > /dev/null 2>&1 +#echo $PASS; +PASS=`cat /tmp/$UUID` +echo $PASS +rm -f /tmp/$UUID \ No newline at end of file diff --git a/trunk/gpl.html b/trunk/gpl.html new file mode 100644 index 00000000..43277aa1 --- /dev/null +++ b/trunk/gpl.html @@ -0,0 +1 @@ + GNU General Public License - GNU Project - Free Software Foundation (FSF)

GNU General Public License


Table of Contents


GNU GENERAL PUBLIC LICENSE

Version 2, June 1991

Copyright (C) 1989, 1991 Free Software Foundation, Inc.  
59 Temple Place - Suite 330, Boston, MA  02111-1307, USA

Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

Preamble

The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.

When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.

To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.

For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.

We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.

Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.

Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.

The precise terms and conditions for copying, distribution and modification follow.

TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.

1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.

You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.

2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:

  • a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.

  • b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.

  • c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.

In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.

3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:

  • a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,

  • b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,

  • c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.

If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.

4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.

5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.

6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.

7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.

It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.

This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.

8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.

9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.

10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.

NO WARRANTY

11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.

one line to give the program's name and an idea of what it does.
Copyright (C) yyyy  name of author

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this when it starts in an interactive mode:

Gnomovision version 69, Copyright (C) yyyy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
type `show w'.  This is free software, and you are welcome
to redistribute it under certain conditions; type `show c' 
for details.

The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:

Yoyodyne, Inc., hereby disclaims all copyright
interest in the program `Gnomovision'
(which makes passes at compilers) written 
by James Hacker.

signature of Ty Coon, 1 April 1989
Ty Coon, President of Vice

This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.


Return to GNU's home page.

FSF & GNU inquiries & questions to gnu@gnu.org. Other ways to contact the FSF.

Comments on these web pages to webmasters@www.gnu.org, send other questions to gnu@gnu.org.

Copyright notice above.
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA

Updated: 16 Feb 1998 tower


This page's HTML was slightly modified for offline use by Gordon Worley on 6.25.1999. No modifications were made to the GNU GPL itself.

\ No newline at end of file diff --git a/trunk/gpl.txt b/trunk/gpl.txt new file mode 100644 index 00000000..5b6e7c66 --- /dev/null +++ b/trunk/gpl.txt @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/trunk/images/CodeAssistantProtocol.tiff b/trunk/images/CodeAssistantProtocol.tiff new file mode 100644 index 00000000..5e701423 Binary files /dev/null and b/trunk/images/CodeAssistantProtocol.tiff differ diff --git a/trunk/images/appicon.icns b/trunk/images/appicon.icns new file mode 100755 index 00000000..a4c1523c Binary files /dev/null and b/trunk/images/appicon.icns differ diff --git a/trunk/images/clearconsole.tiff b/trunk/images/clearconsole.tiff new file mode 100644 index 00000000..ec7d181a Binary files /dev/null and b/trunk/images/clearconsole.tiff differ diff --git a/trunk/images/columnadd.tiff b/trunk/images/columnadd.tiff new file mode 100644 index 00000000..1eaa8822 Binary files /dev/null and b/trunk/images/columnadd.tiff differ diff --git a/trunk/images/columncopy.tiff b/trunk/images/columncopy.tiff new file mode 100644 index 00000000..55848ac1 Binary files /dev/null and b/trunk/images/columncopy.tiff differ diff --git a/trunk/images/columndelete.tiff b/trunk/images/columndelete.tiff new file mode 100644 index 00000000..5ddee6ff Binary files /dev/null and b/trunk/images/columndelete.tiff differ diff --git a/trunk/images/columnrefresh.tiff b/trunk/images/columnrefresh.tiff new file mode 100644 index 00000000..37ba5d75 Binary files /dev/null and b/trunk/images/columnrefresh.tiff differ diff --git a/trunk/images/connectionadd.tiff b/trunk/images/connectionadd.tiff new file mode 100644 index 00000000..73437571 Binary files /dev/null and b/trunk/images/connectionadd.tiff differ diff --git a/trunk/images/connectioncopy.tiff b/trunk/images/connectioncopy.tiff new file mode 100644 index 00000000..1072e270 Binary files /dev/null and b/trunk/images/connectioncopy.tiff differ diff --git a/trunk/images/connectiondelete.tiff b/trunk/images/connectiondelete.tiff new file mode 100644 index 00000000..edd40a9e Binary files /dev/null and b/trunk/images/connectiondelete.tiff differ diff --git a/trunk/images/connectionrefresh.tiff b/trunk/images/connectionrefresh.tiff new file mode 100644 index 00000000..4dd27062 Binary files /dev/null and b/trunk/images/connectionrefresh.tiff differ diff --git a/trunk/images/createtablesyntax.tiff b/trunk/images/createtablesyntax.tiff new file mode 100644 index 00000000..0bf7f1a2 Binary files /dev/null and b/trunk/images/createtablesyntax.tiff differ diff --git a/trunk/images/databases.tiff b/trunk/images/databases.tiff new file mode 100644 index 00000000..f535fb2c Binary files /dev/null and b/trunk/images/databases.tiff differ diff --git a/trunk/images/dbadd.tiff b/trunk/images/dbadd.tiff new file mode 100644 index 00000000..8b5a71ca Binary files /dev/null and b/trunk/images/dbadd.tiff differ diff --git a/trunk/images/dbdelete.tiff b/trunk/images/dbdelete.tiff new file mode 100644 index 00000000..0b1c1eaf Binary files /dev/null and b/trunk/images/dbdelete.tiff differ diff --git a/trunk/images/dbrefresh.tiff b/trunk/images/dbrefresh.tiff new file mode 100644 index 00000000..e85c6d1e Binary files /dev/null and b/trunk/images/dbrefresh.tiff differ diff --git a/trunk/images/flushprivileges.tiff b/trunk/images/flushprivileges.tiff new file mode 100644 index 00000000..94c4fca1 Binary files /dev/null and b/trunk/images/flushprivileges.tiff differ diff --git a/trunk/images/grabber-horizontal.png b/trunk/images/grabber-horizontal.png new file mode 100644 index 00000000..2604c89a Binary files /dev/null and b/trunk/images/grabber-horizontal.png differ diff --git a/trunk/images/grabber-vertical.png b/trunk/images/grabber-vertical.png new file mode 100644 index 00000000..b93c1211 Binary files /dev/null and b/trunk/images/grabber-vertical.png differ diff --git a/trunk/images/hideconsole.tiff b/trunk/images/hideconsole.tiff new file mode 100644 index 00000000..d6c116ea Binary files /dev/null and b/trunk/images/hideconsole.tiff differ diff --git a/trunk/images/indexadd.tiff b/trunk/images/indexadd.tiff new file mode 100644 index 00000000..b985d693 Binary files /dev/null and b/trunk/images/indexadd.tiff differ diff --git a/trunk/images/indexdelete.tiff b/trunk/images/indexdelete.tiff new file mode 100644 index 00000000..d692adf7 Binary files /dev/null and b/trunk/images/indexdelete.tiff differ diff --git a/trunk/images/logo-48.png b/trunk/images/logo-48.png new file mode 100644 index 00000000..ca8ddbcf Binary files /dev/null and b/trunk/images/logo-48.png differ diff --git a/trunk/images/optimizetable.tiff b/trunk/images/optimizetable.tiff new file mode 100644 index 00000000..761e44cd Binary files /dev/null and b/trunk/images/optimizetable.tiff differ diff --git a/trunk/images/query.tiff b/trunk/images/query.tiff new file mode 100644 index 00000000..4d7d23e1 Binary files /dev/null and b/trunk/images/query.tiff differ diff --git a/trunk/images/queryadd.tiff b/trunk/images/queryadd.tiff new file mode 100644 index 00000000..e174b9b0 Binary files /dev/null and b/trunk/images/queryadd.tiff differ diff --git a/trunk/images/querycopy.tiff b/trunk/images/querycopy.tiff new file mode 100644 index 00000000..54f43e93 Binary files /dev/null and b/trunk/images/querycopy.tiff differ diff --git a/trunk/images/querydelete.tiff b/trunk/images/querydelete.tiff new file mode 100644 index 00000000..98e5a0c1 Binary files /dev/null and b/trunk/images/querydelete.tiff differ diff --git a/trunk/images/queryrefresh.tiff b/trunk/images/queryrefresh.tiff new file mode 100644 index 00000000..5d233769 Binary files /dev/null and b/trunk/images/queryrefresh.tiff differ diff --git a/trunk/images/reload.tiff b/trunk/images/reload.tiff new file mode 100644 index 00000000..40d020e5 Binary files /dev/null and b/trunk/images/reload.tiff differ diff --git a/trunk/images/rowadd.tiff b/trunk/images/rowadd.tiff new file mode 100644 index 00000000..9cc750b6 Binary files /dev/null and b/trunk/images/rowadd.tiff differ diff --git a/trunk/images/rowcopy.tiff b/trunk/images/rowcopy.tiff new file mode 100644 index 00000000..348a53ce Binary files /dev/null and b/trunk/images/rowcopy.tiff differ diff --git a/trunk/images/rowdelete.tiff b/trunk/images/rowdelete.tiff new file mode 100644 index 00000000..8f5cd340 Binary files /dev/null and b/trunk/images/rowdelete.tiff differ diff --git a/trunk/images/rowrefresh.tiff b/trunk/images/rowrefresh.tiff new file mode 100644 index 00000000..09231808 Binary files /dev/null and b/trunk/images/rowrefresh.tiff differ diff --git a/trunk/images/selectall.tiff b/trunk/images/selectall.tiff new file mode 100644 index 00000000..17b35cad Binary files /dev/null and b/trunk/images/selectall.tiff differ diff --git a/trunk/images/selectnone.tiff b/trunk/images/selectnone.tiff new file mode 100644 index 00000000..de505f10 Binary files /dev/null and b/trunk/images/selectnone.tiff differ diff --git a/trunk/images/sheettotable.tiff b/trunk/images/sheettotable.tiff new file mode 100644 index 00000000..90f7ccb7 Binary files /dev/null and b/trunk/images/sheettotable.tiff differ diff --git a/trunk/images/showconsole.tiff b/trunk/images/showconsole.tiff new file mode 100644 index 00000000..861be377 Binary files /dev/null and b/trunk/images/showconsole.tiff differ diff --git a/trunk/images/showvariables.tiff b/trunk/images/showvariables.tiff new file mode 100644 index 00000000..4c4b3400 Binary files /dev/null and b/trunk/images/showvariables.tiff differ diff --git a/trunk/images/sort-down.tiff b/trunk/images/sort-down.tiff new file mode 100644 index 00000000..3091b605 Binary files /dev/null and b/trunk/images/sort-down.tiff differ diff --git a/trunk/images/sort-up.tiff b/trunk/images/sort-up.tiff new file mode 100644 index 00000000..8c354ef4 Binary files /dev/null and b/trunk/images/sort-up.tiff differ diff --git a/trunk/images/spyglass.tiff b/trunk/images/spyglass.tiff new file mode 100644 index 00000000..0a561926 Binary files /dev/null and b/trunk/images/spyglass.tiff differ diff --git a/trunk/images/table-small.tif b/trunk/images/table-small.tif new file mode 100644 index 00000000..d3c3a705 Binary files /dev/null and b/trunk/images/table-small.tif differ diff --git a/trunk/images/tableadd.tiff b/trunk/images/tableadd.tiff new file mode 100644 index 00000000..792277d9 Binary files /dev/null and b/trunk/images/tableadd.tiff differ diff --git a/trunk/images/tablecopy.tiff b/trunk/images/tablecopy.tiff new file mode 100644 index 00000000..39e8bbdd Binary files /dev/null and b/trunk/images/tablecopy.tiff differ diff --git a/trunk/images/tabledelete.tiff b/trunk/images/tabledelete.tiff new file mode 100644 index 00000000..a915bf8e Binary files /dev/null and b/trunk/images/tabledelete.tiff differ diff --git a/trunk/images/tablerefresh.tiff b/trunk/images/tablerefresh.tiff new file mode 100644 index 00000000..f452b4bb Binary files /dev/null and b/trunk/images/tablerefresh.tiff differ diff --git a/trunk/images/tables.tiff b/trunk/images/tables.tiff new file mode 100644 index 00000000..217dcd07 Binary files /dev/null and b/trunk/images/tables.tiff differ diff --git a/trunk/images/tabletosheet.tiff b/trunk/images/tabletosheet.tiff new file mode 100644 index 00000000..a35755e5 Binary files /dev/null and b/trunk/images/tabletosheet.tiff differ diff --git a/trunk/images/textencode.tiff b/trunk/images/textencode.tiff new file mode 100644 index 00000000..671ade4d Binary files /dev/null and b/trunk/images/textencode.tiff differ diff --git a/trunk/images/toolbar-switch-to-browse.png b/trunk/images/toolbar-switch-to-browse.png new file mode 100644 index 00000000..762659f8 Binary files /dev/null and b/trunk/images/toolbar-switch-to-browse.png differ diff --git a/trunk/images/toolbar-switch-to-sql.png b/trunk/images/toolbar-switch-to-sql.png new file mode 100644 index 00000000..9c1a58a1 Binary files /dev/null and b/trunk/images/toolbar-switch-to-sql.png differ diff --git a/trunk/images/toolbar-switch-to-structure.png b/trunk/images/toolbar-switch-to-structure.png new file mode 100644 index 00000000..0e2c819a Binary files /dev/null and b/trunk/images/toolbar-switch-to-structure.png differ diff --git a/trunk/images/toolbar-switch-to-table-info.png b/trunk/images/toolbar-switch-to-table-info.png new file mode 100644 index 00000000..3a72aecf Binary files /dev/null and b/trunk/images/toolbar-switch-to-table-info.png differ diff --git a/trunk/main.m b/trunk/main.m new file mode 100644 index 00000000..b849d407 --- /dev/null +++ b/trunk/main.m @@ -0,0 +1,6 @@ +#import + +int main(int argc, const char *argv[]) +{ + return NSApplicationMain(argc, argv); +} diff --git a/trunk/sequel-pro.scriptSuite b/trunk/sequel-pro.scriptSuite new file mode 100755 index 00000000..49a48f1b --- /dev/null +++ b/trunk/sequel-pro.scriptSuite @@ -0,0 +1,37 @@ +{ + "Name" = "Sequel Pro"; + "AppleEventCode" = "cmec"; + + "Classes" = { + "MainController" = { + "Superclass" = "NSCoreSuite.NSAbstractObject"; + "AppleEventCode" = "capp"; + "SupportedCommands" = { + "authenticate" = "authenticate:"; + "NSCoreSuite.Quit" = "handleQuitScriptCommand:"; + }; + }; + }; + "Commands" = { + "authenticate" = { + "CommandClass" = "NSScriptCommand"; + "AppleEventCode" = "auth"; + "Class" = "NSString"; + "ResultAppleEventCode" = "****"; + "Arguments" = { + "query" = { + "Type" = "NSString"; + "AppleEventCode" = "qery"; + }; + "fifo" = { + "Type" = "NSString"; + "AppleEventCode" = "fifo"; + }; + "tunnelName" = { + "Type" = "NSString"; + "AppleEventCode" = "tunn"; + }; + }; + }; + }; +} \ No newline at end of file diff --git a/trunk/sequel-pro.scriptTerminology b/trunk/sequel-pro.scriptTerminology new file mode 100755 index 00000000..764e451a --- /dev/null +++ b/trunk/sequel-pro.scriptTerminology @@ -0,0 +1,31 @@ +{ + "Name" = "Sequel Pro suite"; + "Description" = "Suite for handling tunnel management"; + "Classes" = { + "MainController" = { + "Name" = "application"; + "PluralName" = "applications"; + "Description" = "Sequel Pro application"; + }; + }; + "Commands" = { + "authenticate" = { + "Name" = "authenticate"; + "Description" = "Open the dialog asking for password or passphrase"; + "Arguments" = { + "query" = { + "Name" = "query phrase"; + "Description" = "The string to show in the dialog"; + }; + "fifo" = { + "Name" = "fifo"; + "Description" = "The FIFO file where expecting the passphrase"; + }; + "tunnelName" = { + "Name" = "tunnel"; + "Description" = "Tunnel's name"; + }; + }; + }; + }; +} \ No newline at end of file diff --git a/trunk/sequel-pro.xcodeproj/ide.pbxuser b/trunk/sequel-pro.xcodeproj/ide.pbxuser new file mode 100644 index 00000000..f7e43106 --- /dev/null +++ b/trunk/sequel-pro.xcodeproj/ide.pbxuser @@ -0,0 +1,222 @@ +// !$*UTF8*$! +{ + 2A37F4A9FDCFA73011CA2CEA = { + activeBuildStyle = 4A9504D1FFE6A4CB11CA0CBA; + activeExecutable = F548086C027F826801DDA526; + activeTarget = 2A37F4C6FDCFA73011CA2CEA; + addToTargets = ( + 2A37F4C6FDCFA73011CA2CEA, + ); + breakpoints = ( + ); + executables = ( + F548086C027F826801DDA526, + ); + perUserDictionary = { + PBXPerProjectTemplateStateSaveDate = 93297208; + PBXWorkspaceContents = ( + { + LeftSlideOut = { + Split0 = { + Split0 = { + NavCount = 1; + NavGeometry0 = { + Frame = "{{0, 0}, {761, 595}}"; + NavBarVisible = YES; + }; + }; + SplitCount = 1; + Tab0 = { + Debugger = { + Split0 = { + SplitCount = 2; + }; + SplitCount = 1; + TabCount = 2; + }; + LauncherConfigVersion = 7; + }; + Tab1 = { + LauncherConfigVersion = 3; + Runner = { + }; + }; + TabCount = 4; + }; + SplitCount = 1; + Tab1 = { + OptionsSetName = "Hierarchy, all classes"; + }; + TabCount = 5; + }; + }, + ); + PBXWorkspaceGeometries = ( + { + ContentSize = "{1045, 618}"; + LeftSlideOut = { + ActiveTab = 0; + Collapsed = NO; + Frame = "{{0, 23}, {1045, 595}}"; + Split0 = { + Collapsed = NO; + Frame = "{{284, 0}, {761, 595}}"; + Split0 = { + Frame = "{{0, 0}, {761, 595}}"; + }; + SplitCount = 1; + Tab0 = { + Debugger = { + Collapsed = NO; + Frame = "{{0, 0}, {681, 289}}"; + Split0 = { + Frame = "{{0, 24}, {681, 265}}"; + Split0 = { + Frame = "{{0, 0}, {333, 265}}"; + }; + Split1 = { + DebugVariablesTableConfiguration = ( + Name, + 123, + Value, + 85, + Summary, + 105.123, + ); + Frame = "{{342, 0}, {339, 265}}"; + }; + SplitCount = 2; + }; + SplitCount = 1; + Tab0 = { + Frame = "{{0, 0}, {100, 50}}"; + }; + Tab1 = { + Frame = "{{0, 0}, {100, 50}}"; + }; + TabCount = 2; + TabsVisible = YES; + }; + Frame = "{{0, 0}, {681, 289}}"; + LauncherConfigVersion = 7; + }; + Tab1 = { + Frame = "{{0, 0}, {681, 120}}"; + LauncherConfigVersion = 3; + Runner = { + Frame = "{{0, 0}, {681, 120}}"; + }; + }; + Tab2 = { + BuildMessageFrame = "{{0, 0}, {683, 127}}"; + BuildTranscriptFrame = "{{0, 136}, {683, 100}}"; + Frame = "{{0, 0}, {681, 234}}"; + }; + Tab3 = { + Frame = "{{0, 0}, {681, 238}}"; + }; + TabCount = 4; + TabsVisible = NO; + }; + SplitCount = 1; + Tab0 = { + Frame = "{{0, 0}, {260, 595}}"; + GroupTreeTableConfiguration = ( + TargetStatusColumn, + 18, + MainColumn, + 227, + ); + }; + Tab1 = { + ClassesFrame = "{{0, 0}, {250, 326}}"; + ClassesTreeTableConfiguration = ( + PBXBookColumnIdentifier, + 20, + PBXClassColumnIdentifier, + 207, + ); + Frame = "{{0, 0}, {248, 544}}"; + MembersFrame = "{{0, 335}, {250, 209}}"; + MembersTreeTableConfiguration = ( + PBXBookColumnIdentifier, + 20, + PBXMethodColumnIdentifier, + 206, + ); + }; + Tab2 = { + Frame = "{{0, 0}, {217, 544}}"; + }; + Tab3 = { + Frame = "{{0, 0}, {239, 595}}"; + TargetTableConfiguration = ( + ActiveObject, + 16, + ObjectNames, + 206.296, + ); + }; + Tab4 = { + BreakpointsTreeTableConfiguration = ( + breakpointColumn, + 197, + enabledColumn, + 31, + ); + Frame = "{{0, 0}, {250, 544}}"; + }; + TabCount = 5; + TabsVisible = YES; + }; + StatusViewVisible = YES; + Template = 64ABBB4501FA494900185B06; + ToolbarVisible = YES; + WindowLocation = "{53, 61}"; + }, + ); + PBXWorkspaceStateSaveDate = 93297208; + }; + projectwideBuildSettings = { + }; + wantsIndex = 1; + wantsSCM = -1; + }; + 2A37F4C6FDCFA73011CA2CEA = { + activeExec = 0; + executables = ( + F548086C027F826801DDA526, + ); + }; + F548086C027F826801DDA526 = { + activeArgIndex = 2147483647; + argumentStrings = ( + ); + debuggerPlugin = GDBDebugging; + dylibVariantSuffix = ""; + enableDebugStr = 1; + environmentEntries = ( + ); + isa = PBXExecutable; + name = "Sequel Pro"; + shlibInfoDictList = ( + ); + sourceDirectories = ( + ); + }; + F548087B027F870A01DDA526 = { + uiCtxt = { + sepNavWindowFrame = "{{3, 239}, {750, 502}}"; + }; + }; + F570FC9502A05DFD0127F14A = { + uiCtxt = { + sepNavWindowFrame = "{{38, 218}, {750, 502}}"; + }; + }; + F5A1A33B02A16816018594E7 = { + uiCtxt = { + sepNavWindowFrame = "{{15, 239}, {750, 502}}"; + }; + }; +} diff --git a/trunk/sequel-pro.xcodeproj/project.pbxproj b/trunk/sequel-pro.xcodeproj/project.pbxproj new file mode 100644 index 00000000..03bc3b85 --- /dev/null +++ b/trunk/sequel-pro.xcodeproj/project.pbxproj @@ -0,0 +1,860 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 42; + objects = { + +/* Begin PBXBuildFile section */ + 383DAC110DCACB4B000499B6 /* logo-48.png in Resources */ = {isa = PBXBuildFile; fileRef = 383DAC100DCACB4B000499B6 /* logo-48.png */; }; + 383DAC160DCACE1D000499B6 /* toolbar-switch-to-browse.png in Resources */ = {isa = PBXBuildFile; fileRef = 383DAC130DCACE1D000499B6 /* toolbar-switch-to-browse.png */; }; + 383DAC180DCACE1D000499B6 /* toolbar-switch-to-sql.png in Resources */ = {isa = PBXBuildFile; fileRef = 383DAC150DCACE1D000499B6 /* toolbar-switch-to-sql.png */; }; + 383DAC1A0DCACE68000499B6 /* toolbar-switch-to-table-info.png in Resources */ = {isa = PBXBuildFile; fileRef = 383DAC190DCACE68000499B6 /* toolbar-switch-to-table-info.png */; }; + 3861DD760DA78690003236DE /* sequel-pro.scriptTerminology in Resources */ = {isa = PBXBuildFile; fileRef = 3861DD740DA78690003236DE /* sequel-pro.scriptTerminology */; }; + 3861DD770DA78690003236DE /* sequel-pro.scriptSuite in Resources */ = {isa = PBXBuildFile; fileRef = 3861DD750DA78690003236DE /* sequel-pro.scriptSuite */; }; + 3863D2EE0E845D47004172E9 /* toolbar-switch-to-structure.png in Resources */ = {isa = PBXBuildFile; fileRef = 3863D2ED0E845D47004172E9 /* toolbar-switch-to-structure.png */; }; + 38E9C92D0DBF71C5009E9395 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 38E9C92B0DBF71C5009E9395 /* MainMenu.xib */; }; + 38E9C9320DBF7293009E9395 /* DBView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 38E9C9300DBF7293009E9395 /* DBView.xib */; }; + 38F42AE00DBFF16500B58FFB /* TableDocumentSplitView.h in Headers */ = {isa = PBXBuildFile; fileRef = 38F42ADE0DBFF16500B58FFB /* TableDocumentSplitView.h */; }; + 38F42AE10DBFF16500B58FFB /* TableDocumentSplitView.m in Sources */ = {isa = PBXBuildFile; fileRef = 38F42ADF0DBFF16500B58FFB /* TableDocumentSplitView.m */; }; + 4B370C660E699C3D0002ABD0 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B370C650E699C3D0002ABD0 /* Sparkle.framework */; }; + 4B370C770E699D9E0002ABD0 /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4B370C650E699C3D0002ABD0 /* Sparkle.framework */; }; + 9B9ACE9208DEBE70009E313E /* TableDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A37F4AEFDCFA73011CA2CEA /* TableDocument.h */; }; + 9B9ACE9308DEBE70009E313E /* TableContent.h in Headers */ = {isa = PBXBuildFile; fileRef = F548087A027F870A01DDA526 /* TableContent.h */; }; + 9B9ACE9408DEBE70009E313E /* TableSource.h in Headers */ = {isa = PBXBuildFile; fileRef = F548087C027F870A01DDA526 /* TableSource.h */; }; + 9B9ACE9508DEBE70009E313E /* CustomQuery.h in Headers */ = {isa = PBXBuildFile; fileRef = F5C810CE0281C5A20139D141 /* CustomQuery.h */; }; + 9B9ACE9608DEBE70009E313E /* TablesList.h in Headers */ = {isa = PBXBuildFile; fileRef = F548087E027F870A01DDA526 /* TablesList.h */; }; + 9B9ACE9708DEBE70009E313E /* MainController.h in Headers */ = {isa = PBXBuildFile; fileRef = F5FB320C029E966601566C24 /* MainController.h */; }; + 9B9ACE9808DEBE70009E313E /* TableDump.h in Headers */ = {isa = PBXBuildFile; fileRef = F5A1A33A02A16816018594E7 /* TableDump.h */; }; + 9B9ACE9908DEBE70009E313E /* KeyChain.h in Headers */ = {isa = PBXBuildFile; fileRef = F52BA08003BA16430100012B /* KeyChain.h */; }; + 9B9ACE9A08DEBE70009E313E /* CMImageView.h in Headers */ = {isa = PBXBuildFile; fileRef = F51B8773050A8A1701000103 /* CMImageView.h */; }; + 9B9ACE9B08DEBE70009E313E /* CMCopyTable.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B40F86207461DC500D81DFB /* CMCopyTable.h */; }; + 9B9ACE9C08DEBE70009E313E /* TableStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B220E640751EE2700DA3E19 /* TableStatus.h */; }; + 9B9ACE9D08DEBE70009E313E /* CMMCPConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 9BDFCCE408D4285100891F07 /* CMMCPConnection.h */; }; + 9B9ACE9E08DEBE70009E313E /* CMMCPResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 9BDFCD1208D42B1900891F07 /* CMMCPResult.h */; }; + 9B9ACEA008DEBE70009E313E /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 2A37F4B9FDCFA73011CA2CEA /* Credits.rtf */; }; + 9B9ACEA408DEBE70009E313E /* sort-down.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F570FC9502A05DFD0127F14A /* sort-down.tiff */; }; + 9B9ACEA508DEBE70009E313E /* sort-up.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F570FC9602A05DFD0127F14A /* sort-up.tiff */; }; + 9B9ACEA608DEBE70009E313E /* selectall.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5E57A3902B2B518018C3E81 /* selectall.tiff */; }; + 9B9ACEA708DEBE70009E313E /* appicon.icns in Resources */ = {isa = PBXBuildFile; fileRef = F503C88F02B387CB01C66673 /* appicon.icns */; }; + 9B9ACEA808DEBE70009E313E /* gpl.txt in Resources */ = {isa = PBXBuildFile; fileRef = F55ECCBE02C6156601738522 /* gpl.txt */; }; + 9B9ACEA908DEBE70009E313E /* selectnone.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F51547F604E8E9B901000103 /* selectnone.tiff */; }; + 9B9ACEAA08DEBE70009E313E /* rowcopy.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5EC12FC04EE385401FE0D2B /* rowcopy.tiff */; }; + 9B9ACEAB08DEBE70009E313E /* columncopy.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5EC12FD04EE385401FE0D2B /* columncopy.tiff */; }; + 9B9ACEAC08DEBE70009E313E /* tablecopy.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5EC130004EE444801FE0D2B /* tablecopy.tiff */; }; + 9B9ACEAD08DEBE70009E313E /* databases.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5EC130104EE444801FE0D2B /* databases.tiff */; }; + 9B9ACEAE08DEBE70009E313E /* dbadd.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5EC130204EE444801FE0D2B /* dbadd.tiff */; }; + 9B9ACEAF08DEBE70009E313E /* dbdelete.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5EC130304EE444801FE0D2B /* dbdelete.tiff */; }; + 9B9ACEB008DEBE70009E313E /* dbrefresh.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5EC130404EE444801FE0D2B /* dbrefresh.tiff */; }; + 9B9ACEB108DEBE70009E313E /* indexadd.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5EC130704EE444801FE0D2B /* indexadd.tiff */; }; + 9B9ACEB208DEBE70009E313E /* indexdelete.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5EC130804EE444801FE0D2B /* indexdelete.tiff */; }; + 9B9ACEB308DEBE70009E313E /* tableadd.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5EC130B04EE444801FE0D2B /* tableadd.tiff */; }; + 9B9ACEB408DEBE70009E313E /* tabledelete.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5EC130C04EE444801FE0D2B /* tabledelete.tiff */; }; + 9B9ACEB508DEBE70009E313E /* tablerefresh.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5EC130D04EE444801FE0D2B /* tablerefresh.tiff */; }; + 9B9ACEB608DEBE70009E313E /* tables.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5EC130E04EE444801FE0D2B /* tables.tiff */; }; + 9B9ACEB708DEBE70009E313E /* clearconsole.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5A1F6DB04EE666101FE0D2B /* clearconsole.tiff */; }; + 9B9ACEB808DEBE70009E313E /* createtablesyntax.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5A1F6DC04EE666101FE0D2B /* createtablesyntax.tiff */; }; + 9B9ACEB908DEBE70009E313E /* flushprivileges.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5A1F6DD04EE666101FE0D2B /* flushprivileges.tiff */; }; + 9B9ACEBA08DEBE70009E313E /* optimizetable.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5A1F6DE04EE666101FE0D2B /* optimizetable.tiff */; }; + 9B9ACEBB08DEBE70009E313E /* showvariables.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5A1F6E004EE666101FE0D2B /* showvariables.tiff */; }; + 9B9ACEBC08DEBE70009E313E /* columnadd.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4AC0509EF6201000103 /* columnadd.tiff */; }; + 9B9ACEBD08DEBE70009E313E /* columndelete.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4AE0509F05101000103 /* columndelete.tiff */; }; + 9B9ACEBE08DEBE70009E313E /* columnrefresh.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4B00509F0CA01000103 /* columnrefresh.tiff */; }; + 9B9ACEBF08DEBE70009E313E /* connectionadd.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4B40509F1B801000103 /* connectionadd.tiff */; }; + 9B9ACEC008DEBE70009E313E /* connectiondelete.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4B50509F1B801000103 /* connectiondelete.tiff */; }; + 9B9ACEC108DEBE70009E313E /* hideconsole.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4BA0509F6C601000103 /* hideconsole.tiff */; }; + 9B9ACEC208DEBE70009E313E /* showconsole.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4BB0509F6C601000103 /* showconsole.tiff */; }; + 9B9ACEC308DEBE70009E313E /* queryadd.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4BF0509FB3E01000103 /* queryadd.tiff */; }; + 9B9ACEC408DEBE70009E313E /* querydelete.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4C00509FB3E01000103 /* querydelete.tiff */; }; + 9B9ACEC508DEBE70009E313E /* rowadd.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4C90509FDDF01000103 /* rowadd.tiff */; }; + 9B9ACEC608DEBE70009E313E /* rowdelete.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4CA0509FDDF01000103 /* rowdelete.tiff */; }; + 9B9ACEC708DEBE70009E313E /* rowrefresh.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4CB0509FDDF01000103 /* rowrefresh.tiff */; }; + 9B9ACEC808DEBE70009E313E /* sheettotable.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4CF0509FF6401000103 /* sheettotable.tiff */; }; + 9B9ACEC908DEBE70009E313E /* tabletosheet.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4D00509FF6401000103 /* tabletosheet.tiff */; }; + 9B9ACECA08DEBE70009E313E /* textencode.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4D10509FF6401000103 /* textencode.tiff */; }; + 9B9ACECB08DEBE70009E313E /* connectioncopy.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F51B86B3050A4E4F01000103 /* connectioncopy.tiff */; }; + 9B9ACECC08DEBE70009E313E /* querycopy.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F51B86B4050A4E4F01000103 /* querycopy.tiff */; }; + 9B9ACECD08DEBE70009E313E /* english_help in Resources */ = {isa = PBXBuildFile; fileRef = F5DB91380510F4B60186457F /* english_help */; }; + 9B9ACECE08DEBE70009E313E /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = F58CAF13052C84EB01B3ED40 /* Localizable.strings */; }; + 9B9ACED008DEBE70009E313E /* TableDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */; settings = {ATTRIBUTES = (); }; }; + 9B9ACED108DEBE70009E313E /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A37F4B0FDCFA73011CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; + 9B9ACED208DEBE70009E313E /* TableContent.m in Sources */ = {isa = PBXBuildFile; fileRef = F548087B027F870A01DDA526 /* TableContent.m */; }; + 9B9ACED308DEBE70009E313E /* TableSource.m in Sources */ = {isa = PBXBuildFile; fileRef = F548087D027F870A01DDA526 /* TableSource.m */; }; + 9B9ACED408DEBE70009E313E /* TablesList.m in Sources */ = {isa = PBXBuildFile; fileRef = F548087F027F870A01DDA526 /* TablesList.m */; }; + 9B9ACED508DEBE70009E313E /* CustomQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = F5C810CF0281C5A20139D141 /* CustomQuery.m */; }; + 9B9ACED608DEBE70009E313E /* MainController.m in Sources */ = {isa = PBXBuildFile; fileRef = F5FB320D029E966601566C24 /* MainController.m */; }; + 9B9ACED708DEBE70009E313E /* TableDump.m in Sources */ = {isa = PBXBuildFile; fileRef = F5A1A33B02A16816018594E7 /* TableDump.m */; }; + 9B9ACED808DEBE70009E313E /* KeyChain.m in Sources */ = {isa = PBXBuildFile; fileRef = F52BA45F03BA3D0B0100012B /* KeyChain.m */; }; + 9B9ACED908DEBE70009E313E /* CMImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = F51B8774050A8A1701000103 /* CMImageView.m */; }; + 9B9ACEDA08DEBE70009E313E /* CMCopyTable.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B40F86307461DC500D81DFB /* CMCopyTable.m */; }; + 9B9ACEDB08DEBE70009E313E /* TableStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B220E650751EE2700DA3E19 /* TableStatus.m */; }; + 9B9ACEDC08DEBE70009E313E /* CMMCPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BDFCCE508D4285100891F07 /* CMMCPConnection.m */; }; + 9B9ACEDD08DEBE70009E313E /* CMMCPResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BDFCD1308D42B1900891F07 /* CMMCPResult.m */; }; + 9B9ACEE108DEBE70009E313E /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A37F4C4FDCFA73011CA2CEA /* AppKit.framework */; }; + 9B9ACEE208DEBE70009E313E /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5981AA203BA574A0100012B /* Carbon.framework */; }; + 9B9ACEE308DEBE70009E313E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A37F4C5FDCFA73011CA2CEA /* Foundation.framework */; }; + 9BC3EEBA09AC6EE100F6B295 /* CMTextView.h in Headers */ = {isa = PBXBuildFile; fileRef = 9BC3EEB809AC6EE100F6B295 /* CMTextView.h */; }; + 9BC3EEBB09AC6EE100F6B295 /* CMTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BC3EEB909AC6EE100F6B295 /* CMTextView.m */; }; + 9BE828B70908269400A18070 /* SSHTunnel.h in Headers */ = {isa = PBXBuildFile; fileRef = 9BE828B50908269400A18070 /* SSHTunnel.h */; }; + 9BE828B80908269400A18070 /* SSHTunnel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BE828B60908269400A18070 /* SSHTunnel.m */; }; + 9BFF53B208F44B40004D6BCB /* askForPass.sh in Resources */ = {isa = PBXBuildFile; fileRef = 9BFF53AF08F44B40004D6BCB /* askForPass.sh */; }; + B51C20700DCFEA4F00A9A004 /* SPTableInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = B51C206E0DCFEA4F00A9A004 /* SPTableInfo.h */; }; + B51C20710DCFEA4F00A9A004 /* SPTableInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = B51C206F0DCFEA4F00A9A004 /* SPTableInfo.m */; }; + B550AF9E0DD1795C006CFEF0 /* CodeAssistantProtocol.tiff in Resources */ = {isa = PBXBuildFile; fileRef = B550AF9D0DD1795C006CFEF0 /* CodeAssistantProtocol.tiff */; }; + B55D81380E7A4E3F00FF337B /* MCPKit_bundled.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B55D81370E7A4E3F00FF337B /* MCPKit_bundled.framework */; }; + B5A78E700E4AC08D00684D3F /* grabber-horizontal.png in Resources */ = {isa = PBXBuildFile; fileRef = B5A78E6C0E4AC08D00684D3F /* grabber-horizontal.png */; }; + B5A78E710E4AC08D00684D3F /* grabber-vertical.png in Resources */ = {isa = PBXBuildFile; fileRef = B5A78E6D0E4AC08D00684D3F /* grabber-vertical.png */; }; + B5A78E720E4AC08D00684D3F /* spyglass.tiff in Resources */ = {isa = PBXBuildFile; fileRef = B5A78E6E0E4AC08D00684D3F /* spyglass.tiff */; }; + B5A78E730E4AC08D00684D3F /* table-small.tif in Resources */ = {isa = PBXBuildFile; fileRef = B5A78E6F0E4AC08D00684D3F /* table-small.tif */; }; + B5BD35050DCF31CB005723A7 /* ImageAndTextCell.h in Headers */ = {isa = PBXBuildFile; fileRef = B5BD35030DCF31CB005723A7 /* ImageAndTextCell.h */; }; + B5BD35060DCF31CB005723A7 /* ImageAndTextCell.m in Sources */ = {isa = PBXBuildFile; fileRef = B5BD35040DCF31CB005723A7 /* ImageAndTextCell.m */; }; + B5C801AC0E7210030011253E /* Growl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B5C801AB0E7210030011253E /* Growl.framework */; }; + B5C801B60E7211BD0011253E /* Growl.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = B5C801AB0E7210030011253E /* Growl.framework */; }; + B5C801C60E7212E00011253E /* Growl Registration Ticket.growlRegDict in Resources */ = {isa = PBXBuildFile; fileRef = B5C801C50E7212E00011253E /* Growl Registration Ticket.growlRegDict */; }; + B5ED4AF90E7A7D6800928118 /* MCPKit_bundled.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = B55D81370E7A4E3F00FF337B /* MCPKit_bundled.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 4B370C6C0E699D230002ABD0 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9B9ACEDE08DEBE70009E313E /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 12; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + B5ED4AF90E7A7D6800928118 /* MCPKit_bundled.framework in CopyFiles */, + B5C801B60E7211BD0011253E /* Growl.framework in CopyFiles */, + 4B370C770E699D9E0002ABD0 /* Sparkle.framework in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = TableDocument.m; sourceTree = ""; }; + 2A37F4AEFDCFA73011CA2CEA /* TableDocument.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TableDocument.h; sourceTree = ""; }; + 2A37F4B0FDCFA73011CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 2A37F4BAFDCFA73011CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = English; path = English.lproj/Credits.rtf; sourceTree = ""; }; + 2A37F4C4FDCFA73011CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 2A37F4C5FDCFA73011CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 383DAC100DCACB4B000499B6 /* logo-48.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "logo-48.png"; path = "images/logo-48.png"; sourceTree = ""; }; + 383DAC130DCACE1D000499B6 /* toolbar-switch-to-browse.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "toolbar-switch-to-browse.png"; path = "images/toolbar-switch-to-browse.png"; sourceTree = ""; }; + 383DAC150DCACE1D000499B6 /* toolbar-switch-to-sql.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "toolbar-switch-to-sql.png"; path = "images/toolbar-switch-to-sql.png"; sourceTree = ""; }; + 383DAC190DCACE68000499B6 /* toolbar-switch-to-table-info.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "toolbar-switch-to-table-info.png"; path = "images/toolbar-switch-to-table-info.png"; sourceTree = ""; }; + 3861DD740DA78690003236DE /* sequel-pro.scriptTerminology */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.scriptTerminology; path = "sequel-pro.scriptTerminology"; sourceTree = ""; }; + 3861DD750DA78690003236DE /* sequel-pro.scriptSuite */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.scriptSuite; path = "sequel-pro.scriptSuite"; sourceTree = ""; }; + 3863D2ED0E845D47004172E9 /* toolbar-switch-to-structure.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "toolbar-switch-to-structure.png"; path = "images/toolbar-switch-to-structure.png"; sourceTree = ""; }; + 38E9C92C0DBF71C5009E9395 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; + 38E9C9310DBF7293009E9395 /* English */ = {isa = PBXFileReference; languageSpecificationIdentifier = html; lastKnownFileType = file.xib; name = English; path = English.lproj/DBView.xib; sourceTree = ""; }; + 38F42ADE0DBFF16500B58FFB /* TableDocumentSplitView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableDocumentSplitView.h; sourceTree = ""; }; + 38F42ADF0DBFF16500B58FFB /* TableDocumentSplitView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TableDocumentSplitView.m; sourceTree = ""; }; + 4B370C650E699C3D0002ABD0 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Sparkle.framework; sourceTree = ""; }; + 9B220E640751EE2700DA3E19 /* TableStatus.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TableStatus.h; sourceTree = ""; }; + 9B220E650751EE2700DA3E19 /* TableStatus.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = TableStatus.m; sourceTree = ""; }; + 9B40F86207461DC500D81DFB /* CMCopyTable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CMCopyTable.h; sourceTree = ""; }; + 9B40F86307461DC500D81DFB /* CMCopyTable.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = CMCopyTable.m; sourceTree = ""; }; + 9B9ACEE908DEBE70009E313E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 9B9ACEEA08DEBE70009E313E /* Sequel Pro.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Sequel Pro.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 9BC3EEB809AC6EE100F6B295 /* CMTextView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CMTextView.h; sourceTree = ""; }; + 9BC3EEB909AC6EE100F6B295 /* CMTextView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = CMTextView.m; sourceTree = ""; }; + 9BDFCCE408D4285100891F07 /* CMMCPConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CMMCPConnection.h; sourceTree = ""; }; + 9BDFCCE508D4285100891F07 /* CMMCPConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CMMCPConnection.m; sourceTree = ""; }; + 9BDFCD1208D42B1900891F07 /* CMMCPResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CMMCPResult.h; sourceTree = ""; }; + 9BDFCD1308D42B1900891F07 /* CMMCPResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CMMCPResult.m; sourceTree = ""; }; + 9BE828B50908269400A18070 /* SSHTunnel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SSHTunnel.h; sourceTree = ""; }; + 9BE828B60908269400A18070 /* SSHTunnel.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = SSHTunnel.m; sourceTree = ""; }; + 9BFF536B08F43B9D004D6BCB /* SSHTunnel_old.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SSHTunnel_old.h; sourceTree = ""; }; + 9BFF536C08F43B9E004D6BCB /* SSHTunnel_old.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = SSHTunnel_old.m; sourceTree = ""; }; + 9BFF53AF08F44B40004D6BCB /* askForPass.sh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = askForPass.sh; sourceTree = ""; }; + B51C206E0DCFEA4F00A9A004 /* SPTableInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPTableInfo.h; sourceTree = ""; }; + B51C206F0DCFEA4F00A9A004 /* SPTableInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPTableInfo.m; sourceTree = ""; }; + B550AF9D0DD1795C006CFEF0 /* CodeAssistantProtocol.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = CodeAssistantProtocol.tiff; path = images/CodeAssistantProtocol.tiff; sourceTree = ""; }; + B55D81370E7A4E3F00FF337B /* MCPKit_bundled.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = MCPKit_bundled.framework; sourceTree = ""; }; + B5A78E6C0E4AC08D00684D3F /* grabber-horizontal.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "grabber-horizontal.png"; path = "images/grabber-horizontal.png"; sourceTree = ""; }; + B5A78E6D0E4AC08D00684D3F /* grabber-vertical.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "grabber-vertical.png"; path = "images/grabber-vertical.png"; sourceTree = ""; }; + B5A78E6E0E4AC08D00684D3F /* spyglass.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = spyglass.tiff; path = images/spyglass.tiff; sourceTree = ""; }; + B5A78E6F0E4AC08D00684D3F /* table-small.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = "table-small.tif"; path = "images/table-small.tif"; sourceTree = ""; }; + B5BD35030DCF31CB005723A7 /* ImageAndTextCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageAndTextCell.h; sourceTree = ""; }; + B5BD35040DCF31CB005723A7 /* ImageAndTextCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageAndTextCell.m; sourceTree = ""; }; + B5C801AB0E7210030011253E /* Growl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Growl.framework; sourceTree = ""; }; + B5C801C50E7212E00011253E /* Growl Registration Ticket.growlRegDict */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Growl Registration Ticket.growlRegDict"; sourceTree = ""; }; + F503C88F02B387CB01C66673 /* appicon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = appicon.icns; path = images/appicon.icns; sourceTree = ""; }; + F51547F604E8E9B901000103 /* selectnone.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = selectnone.tiff; path = images/selectnone.tiff; sourceTree = ""; }; + F51B86B3050A4E4F01000103 /* connectioncopy.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = connectioncopy.tiff; path = images/connectioncopy.tiff; sourceTree = ""; }; + F51B86B4050A4E4F01000103 /* querycopy.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = querycopy.tiff; path = images/querycopy.tiff; sourceTree = ""; }; + F51B8773050A8A1701000103 /* CMImageView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CMImageView.h; sourceTree = ""; }; + F51B8774050A8A1701000103 /* CMImageView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = CMImageView.m; sourceTree = ""; }; + F52BA08003BA16430100012B /* KeyChain.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = KeyChain.h; sourceTree = ""; }; + F52BA45F03BA3D0B0100012B /* KeyChain.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = KeyChain.m; sourceTree = ""; }; + F52FA4AC0509EF6201000103 /* columnadd.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = columnadd.tiff; path = images/columnadd.tiff; sourceTree = ""; }; + F52FA4AE0509F05101000103 /* columndelete.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = columndelete.tiff; path = images/columndelete.tiff; sourceTree = ""; }; + F52FA4B00509F0CA01000103 /* columnrefresh.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = columnrefresh.tiff; path = images/columnrefresh.tiff; sourceTree = ""; }; + F52FA4B40509F1B801000103 /* connectionadd.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = connectionadd.tiff; path = images/connectionadd.tiff; sourceTree = ""; }; + F52FA4B50509F1B801000103 /* connectiondelete.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = connectiondelete.tiff; path = images/connectiondelete.tiff; sourceTree = ""; }; + F52FA4B60509F1B801000103 /* connectionrefresh.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = connectionrefresh.tiff; path = images/connectionrefresh.tiff; sourceTree = ""; }; + F52FA4BA0509F6C601000103 /* hideconsole.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = hideconsole.tiff; path = images/hideconsole.tiff; sourceTree = ""; }; + F52FA4BB0509F6C601000103 /* showconsole.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = showconsole.tiff; path = images/showconsole.tiff; sourceTree = ""; }; + F52FA4BE0509FB3E01000103 /* query.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = query.tiff; path = images/query.tiff; sourceTree = ""; }; + F52FA4BF0509FB3E01000103 /* queryadd.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = queryadd.tiff; path = images/queryadd.tiff; sourceTree = ""; }; + F52FA4C00509FB3E01000103 /* querydelete.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = querydelete.tiff; path = images/querydelete.tiff; sourceTree = ""; }; + F52FA4C10509FB3E01000103 /* queryrefresh.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = queryrefresh.tiff; path = images/queryrefresh.tiff; sourceTree = ""; }; + F52FA4C90509FDDF01000103 /* rowadd.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = rowadd.tiff; path = images/rowadd.tiff; sourceTree = ""; }; + F52FA4CA0509FDDF01000103 /* rowdelete.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = rowdelete.tiff; path = images/rowdelete.tiff; sourceTree = ""; }; + F52FA4CB0509FDDF01000103 /* rowrefresh.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = rowrefresh.tiff; path = images/rowrefresh.tiff; sourceTree = ""; }; + F52FA4CF0509FF6401000103 /* sheettotable.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = sheettotable.tiff; path = images/sheettotable.tiff; sourceTree = ""; }; + F52FA4D00509FF6401000103 /* tabletosheet.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = tabletosheet.tiff; path = images/tabletosheet.tiff; sourceTree = ""; }; + F52FA4D10509FF6401000103 /* textencode.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = textencode.tiff; path = images/textencode.tiff; sourceTree = ""; }; + F548087A027F870A01DDA526 /* TableContent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TableContent.h; sourceTree = ""; }; + F548087B027F870A01DDA526 /* TableContent.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = TableContent.m; sourceTree = ""; }; + F548087C027F870A01DDA526 /* TableSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TableSource.h; sourceTree = ""; }; + F548087D027F870A01DDA526 /* TableSource.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = TableSource.m; sourceTree = ""; }; + F548087E027F870A01DDA526 /* TablesList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TablesList.h; sourceTree = ""; }; + F548087F027F870A01DDA526 /* TablesList.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = TablesList.m; sourceTree = ""; }; + F55ECCBE02C6156601738522 /* gpl.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = gpl.txt; sourceTree = ""; }; + F570FC9502A05DFD0127F14A /* sort-down.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = "sort-down.tiff"; path = "images/sort-down.tiff"; sourceTree = ""; }; + F570FC9602A05DFD0127F14A /* sort-up.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = "sort-up.tiff"; path = "images/sort-up.tiff"; sourceTree = ""; }; + F58CAF14052C84EB01B3ED40 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = ""; }; + F5981AA203BA574A0100012B /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; + F5A1A33A02A16816018594E7 /* TableDump.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TableDump.h; sourceTree = ""; }; + F5A1A33B02A16816018594E7 /* TableDump.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = TableDump.m; sourceTree = ""; }; + F5A1F6DB04EE666101FE0D2B /* clearconsole.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = clearconsole.tiff; path = images/clearconsole.tiff; sourceTree = ""; }; + F5A1F6DC04EE666101FE0D2B /* createtablesyntax.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = createtablesyntax.tiff; path = images/createtablesyntax.tiff; sourceTree = ""; }; + F5A1F6DD04EE666101FE0D2B /* flushprivileges.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = flushprivileges.tiff; path = images/flushprivileges.tiff; sourceTree = ""; }; + F5A1F6DE04EE666101FE0D2B /* optimizetable.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = optimizetable.tiff; path = images/optimizetable.tiff; sourceTree = ""; }; + F5A1F6E004EE666101FE0D2B /* showvariables.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = showvariables.tiff; path = images/showvariables.tiff; sourceTree = ""; }; + F5C810CE0281C5A20139D141 /* CustomQuery.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CustomQuery.h; sourceTree = ""; }; + F5C810CF0281C5A20139D141 /* CustomQuery.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = CustomQuery.m; sourceTree = ""; }; + F5DB91390510F4B60186457F /* English */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = folder; name = English; path = English.lproj/english_help; sourceTree = ""; }; + F5E57A3702B2B518018C3E81 /* reload.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = reload.tiff; path = images/reload.tiff; sourceTree = ""; }; + F5E57A3902B2B518018C3E81 /* selectall.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = selectall.tiff; path = images/selectall.tiff; sourceTree = ""; }; + F5EC12FC04EE385401FE0D2B /* rowcopy.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = rowcopy.tiff; path = images/rowcopy.tiff; sourceTree = ""; }; + F5EC12FD04EE385401FE0D2B /* columncopy.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = columncopy.tiff; path = images/columncopy.tiff; sourceTree = ""; }; + F5EC130004EE444801FE0D2B /* tablecopy.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = tablecopy.tiff; path = images/tablecopy.tiff; sourceTree = ""; }; + F5EC130104EE444801FE0D2B /* databases.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = databases.tiff; path = images/databases.tiff; sourceTree = ""; }; + F5EC130204EE444801FE0D2B /* dbadd.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = dbadd.tiff; path = images/dbadd.tiff; sourceTree = ""; }; + F5EC130304EE444801FE0D2B /* dbdelete.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = dbdelete.tiff; path = images/dbdelete.tiff; sourceTree = ""; }; + F5EC130404EE444801FE0D2B /* dbrefresh.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = dbrefresh.tiff; path = images/dbrefresh.tiff; sourceTree = ""; }; + F5EC130704EE444801FE0D2B /* indexadd.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = indexadd.tiff; path = images/indexadd.tiff; sourceTree = ""; }; + F5EC130804EE444801FE0D2B /* indexdelete.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = indexdelete.tiff; path = images/indexdelete.tiff; sourceTree = ""; }; + F5EC130B04EE444801FE0D2B /* tableadd.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = tableadd.tiff; path = images/tableadd.tiff; sourceTree = ""; }; + F5EC130C04EE444801FE0D2B /* tabledelete.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = tabledelete.tiff; path = images/tabledelete.tiff; sourceTree = ""; }; + F5EC130D04EE444801FE0D2B /* tablerefresh.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = tablerefresh.tiff; path = images/tablerefresh.tiff; sourceTree = ""; }; + F5EC130E04EE444801FE0D2B /* tables.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = tables.tiff; path = images/tables.tiff; sourceTree = ""; }; + F5FB320C029E966601566C24 /* MainController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MainController.h; sourceTree = ""; }; + F5FB320D029E966601566C24 /* MainController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = MainController.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 9B9ACEE008DEBE70009E313E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 9B9ACEE108DEBE70009E313E /* AppKit.framework in Frameworks */, + 9B9ACEE208DEBE70009E313E /* Carbon.framework in Frameworks */, + 9B9ACEE308DEBE70009E313E /* Foundation.framework in Frameworks */, + 4B370C660E699C3D0002ABD0 /* Sparkle.framework in Frameworks */, + B5C801AC0E7210030011253E /* Growl.framework in Frameworks */, + B55D81380E7A4E3F00FF337B /* MCPKit_bundled.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 1058C7A6FEA54F5311CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + B55D81370E7A4E3F00FF337B /* MCPKit_bundled.framework */, + B5C801AB0E7210030011253E /* Growl.framework */, + 4B370C650E699C3D0002ABD0 /* Sparkle.framework */, + 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */, + ); + name = "Linked Frameworks"; + sourceTree = ""; + }; + 1058C7A8FEA54F5311CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 2A37F4C5FDCFA73011CA2CEA /* Foundation.framework */, + 2A37F4C4FDCFA73011CA2CEA /* AppKit.framework */, + F5981AA203BA574A0100012B /* Carbon.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 19C28FB0FE9D524F11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 9B9ACEEA08DEBE70009E313E /* Sequel Pro.app */, + ); + name = Products; + sourceTree = ""; + }; + 2A37F4AAFDCFA73011CA2CEA /* Sequel Pro */ = { + isa = PBXGroup; + children = ( + 38F42AC20DBFEEA000B58FFB /* Controllers */, + 38F42AD90DBFF03E00B58FFB /* Model */, + 38F42ADD0DBFF14A00B58FFB /* Views */, + 38F42ADA0DBFF0EE00B58FFB /* Other */, + 2A37F4B8FDCFA73011CA2CEA /* Resources */, + 2A37F4C3FDCFA73011CA2CEA /* Frameworks */, + 19C28FB0FE9D524F11CA2CBB /* Products */, + F55ECCBE02C6156601738522 /* gpl.txt */, + ); + name = "Sequel Pro"; + sourceTree = ""; + }; + 2A37F4B8FDCFA73011CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + B5C801C50E7212E00011253E /* Growl Registration Ticket.growlRegDict */, + F503C88F02B387CB01C66673 /* appicon.icns */, + 9B9ACEE908DEBE70009E313E /* Info.plist */, + F5E4F1AC03C8B2CB01000125 /* images */, + 38E9C92B0DBF71C5009E9395 /* MainMenu.xib */, + 38E9C9300DBF7293009E9395 /* DBView.xib */, + F58CAF13052C84EB01B3ED40 /* Localizable.strings */, + 2A37F4B9FDCFA73011CA2CEA /* Credits.rtf */, + F5DB91380510F4B60186457F /* english_help */, + ); + name = Resources; + sourceTree = ""; + }; + 2A37F4C3FDCFA73011CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A6FEA54F5311CA2CBB /* Linked Frameworks */, + 1058C7A8FEA54F5311CA2CBB /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + 38F42AC20DBFEEA000B58FFB /* Controllers */ = { + isa = PBXGroup; + children = ( + 2A37F4AEFDCFA73011CA2CEA /* TableDocument.h */, + 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */, + F5FB320C029E966601566C24 /* MainController.h */, + F5FB320D029E966601566C24 /* MainController.m */, + F548087C027F870A01DDA526 /* TableSource.h */, + F548087D027F870A01DDA526 /* TableSource.m */, + F548087A027F870A01DDA526 /* TableContent.h */, + F548087B027F870A01DDA526 /* TableContent.m */, + F5C810CE0281C5A20139D141 /* CustomQuery.h */, + F5C810CF0281C5A20139D141 /* CustomQuery.m */, + F5A1A33A02A16816018594E7 /* TableDump.h */, + F5A1A33B02A16816018594E7 /* TableDump.m */, + ); + name = Controllers; + sourceTree = ""; + }; + 38F42AD90DBFF03E00B58FFB /* Model */ = { + isa = PBXGroup; + children = ( + 9B220E640751EE2700DA3E19 /* TableStatus.h */, + 9B220E650751EE2700DA3E19 /* TableStatus.m */, + F548087E027F870A01DDA526 /* TablesList.h */, + F548087F027F870A01DDA526 /* TablesList.m */, + B51C206E0DCFEA4F00A9A004 /* SPTableInfo.h */, + B51C206F0DCFEA4F00A9A004 /* SPTableInfo.m */, + ); + name = Model; + sourceTree = ""; + }; + 38F42ADA0DBFF0EE00B58FFB /* Other */ = { + isa = PBXGroup; + children = ( + 2A37F4B0FDCFA73011CA2CEA /* main.m */, + 38F42ADB0DBFF11100B58FFB /* KeyChain */, + 9BC3EEB409AC6EAB00F6B295 /* MCPKit */, + 9BC3EEB509AC6EBB00F6B295 /* GUI */, + 9BFF53AE08F44AFF004D6BCB /* SSHTunnel */, + ); + name = Other; + sourceTree = ""; + }; + 38F42ADB0DBFF11100B58FFB /* KeyChain */ = { + isa = PBXGroup; + children = ( + F52BA08003BA16430100012B /* KeyChain.h */, + F52BA45F03BA3D0B0100012B /* KeyChain.m */, + ); + name = KeyChain; + sourceTree = ""; + }; + 38F42ADD0DBFF14A00B58FFB /* Views */ = { + isa = PBXGroup; + children = ( + B5BD35030DCF31CB005723A7 /* ImageAndTextCell.h */, + B5BD35040DCF31CB005723A7 /* ImageAndTextCell.m */, + 38F42ADE0DBFF16500B58FFB /* TableDocumentSplitView.h */, + 38F42ADF0DBFF16500B58FFB /* TableDocumentSplitView.m */, + ); + name = Views; + sourceTree = ""; + }; + 9BC3EEB409AC6EAB00F6B295 /* MCPKit */ = { + isa = PBXGroup; + children = ( + 9BDFCCE408D4285100891F07 /* CMMCPConnection.h */, + 9BDFCCE508D4285100891F07 /* CMMCPConnection.m */, + 9BDFCD1208D42B1900891F07 /* CMMCPResult.h */, + 9BDFCD1308D42B1900891F07 /* CMMCPResult.m */, + ); + name = MCPKit; + sourceTree = ""; + }; + 9BC3EEB509AC6EBB00F6B295 /* GUI */ = { + isa = PBXGroup; + children = ( + 9B40F86207461DC500D81DFB /* CMCopyTable.h */, + 9B40F86307461DC500D81DFB /* CMCopyTable.m */, + F51B8773050A8A1701000103 /* CMImageView.h */, + F51B8774050A8A1701000103 /* CMImageView.m */, + 9BC3EEB809AC6EE100F6B295 /* CMTextView.h */, + 9BC3EEB909AC6EE100F6B295 /* CMTextView.m */, + ); + name = GUI; + sourceTree = ""; + }; + 9BFF53AE08F44AFF004D6BCB /* SSHTunnel */ = { + isa = PBXGroup; + children = ( + 9BE828B50908269400A18070 /* SSHTunnel.h */, + 9BE828B60908269400A18070 /* SSHTunnel.m */, + 9BFF53AF08F44B40004D6BCB /* askForPass.sh */, + 3861DD740DA78690003236DE /* sequel-pro.scriptTerminology */, + 3861DD750DA78690003236DE /* sequel-pro.scriptSuite */, + 9BFF536B08F43B9D004D6BCB /* SSHTunnel_old.h */, + 9BFF536C08F43B9E004D6BCB /* SSHTunnel_old.m */, + ); + name = SSHTunnel; + sourceTree = ""; + }; + F5E4F1AC03C8B2CB01000125 /* images */ = { + isa = PBXGroup; + children = ( + B550AF9D0DD1795C006CFEF0 /* CodeAssistantProtocol.tiff */, + 383DAC100DCACB4B000499B6 /* logo-48.png */, + F52FA4B40509F1B801000103 /* connectionadd.tiff */, + F52FA4B50509F1B801000103 /* connectiondelete.tiff */, + F51B86B3050A4E4F01000103 /* connectioncopy.tiff */, + F52FA4B60509F1B801000103 /* connectionrefresh.tiff */, + F5EC130104EE444801FE0D2B /* databases.tiff */, + F5EC130204EE444801FE0D2B /* dbadd.tiff */, + F5EC130304EE444801FE0D2B /* dbdelete.tiff */, + F5EC130404EE444801FE0D2B /* dbrefresh.tiff */, + F5EC130E04EE444801FE0D2B /* tables.tiff */, + F5EC130B04EE444801FE0D2B /* tableadd.tiff */, + F5EC130C04EE444801FE0D2B /* tabledelete.tiff */, + F5EC130004EE444801FE0D2B /* tablecopy.tiff */, + F5EC130D04EE444801FE0D2B /* tablerefresh.tiff */, + F52FA4D10509FF6401000103 /* textencode.tiff */, + F52FA4AC0509EF6201000103 /* columnadd.tiff */, + F52FA4AE0509F05101000103 /* columndelete.tiff */, + F52FA4B00509F0CA01000103 /* columnrefresh.tiff */, + F5EC12FD04EE385401FE0D2B /* columncopy.tiff */, + F5EC130704EE444801FE0D2B /* indexadd.tiff */, + F5EC130804EE444801FE0D2B /* indexdelete.tiff */, + F52FA4C90509FDDF01000103 /* rowadd.tiff */, + F5EC12FC04EE385401FE0D2B /* rowcopy.tiff */, + F52FA4CA0509FDDF01000103 /* rowdelete.tiff */, + F52FA4CB0509FDDF01000103 /* rowrefresh.tiff */, + F52FA4BE0509FB3E01000103 /* query.tiff */, + F52FA4BF0509FB3E01000103 /* queryadd.tiff */, + F52FA4C00509FB3E01000103 /* querydelete.tiff */, + F51B86B4050A4E4F01000103 /* querycopy.tiff */, + F52FA4C10509FB3E01000103 /* queryrefresh.tiff */, + F5E57A3902B2B518018C3E81 /* selectall.tiff */, + F51547F604E8E9B901000103 /* selectnone.tiff */, + F570FC9502A05DFD0127F14A /* sort-down.tiff */, + F570FC9602A05DFD0127F14A /* sort-up.tiff */, + F5E57A3702B2B518018C3E81 /* reload.tiff */, + F52FA4CF0509FF6401000103 /* sheettotable.tiff */, + F52FA4D00509FF6401000103 /* tabletosheet.tiff */, + F52FA4BB0509F6C601000103 /* showconsole.tiff */, + F52FA4BA0509F6C601000103 /* hideconsole.tiff */, + F5A1F6DB04EE666101FE0D2B /* clearconsole.tiff */, + F5A1F6E004EE666101FE0D2B /* showvariables.tiff */, + F5A1F6DD04EE666101FE0D2B /* flushprivileges.tiff */, + F5A1F6DE04EE666101FE0D2B /* optimizetable.tiff */, + B5A78E6C0E4AC08D00684D3F /* grabber-horizontal.png */, + B5A78E6D0E4AC08D00684D3F /* grabber-vertical.png */, + B5A78E6E0E4AC08D00684D3F /* spyglass.tiff */, + B5A78E6F0E4AC08D00684D3F /* table-small.tif */, + F5A1F6DC04EE666101FE0D2B /* createtablesyntax.tiff */, + 383DAC130DCACE1D000499B6 /* toolbar-switch-to-browse.png */, + 383DAC150DCACE1D000499B6 /* toolbar-switch-to-sql.png */, + 3863D2ED0E845D47004172E9 /* toolbar-switch-to-structure.png */, + 383DAC190DCACE68000499B6 /* toolbar-switch-to-table-info.png */, + ); + name = images; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 9B9ACE9108DEBE70009E313E /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 9B9ACE9208DEBE70009E313E /* TableDocument.h in Headers */, + 9B9ACE9308DEBE70009E313E /* TableContent.h in Headers */, + 9B9ACE9408DEBE70009E313E /* TableSource.h in Headers */, + 9B9ACE9508DEBE70009E313E /* CustomQuery.h in Headers */, + 9B9ACE9608DEBE70009E313E /* TablesList.h in Headers */, + 9B9ACE9708DEBE70009E313E /* MainController.h in Headers */, + 9B9ACE9808DEBE70009E313E /* TableDump.h in Headers */, + 9B9ACE9908DEBE70009E313E /* KeyChain.h in Headers */, + 9B9ACE9A08DEBE70009E313E /* CMImageView.h in Headers */, + 9B9ACE9B08DEBE70009E313E /* CMCopyTable.h in Headers */, + 9B9ACE9C08DEBE70009E313E /* TableStatus.h in Headers */, + 9B9ACE9D08DEBE70009E313E /* CMMCPConnection.h in Headers */, + 9B9ACE9E08DEBE70009E313E /* CMMCPResult.h in Headers */, + 9BE828B70908269400A18070 /* SSHTunnel.h in Headers */, + 9BC3EEBA09AC6EE100F6B295 /* CMTextView.h in Headers */, + 38F42AE00DBFF16500B58FFB /* TableDocumentSplitView.h in Headers */, + B5BD35050DCF31CB005723A7 /* ImageAndTextCell.h in Headers */, + B51C20700DCFEA4F00A9A004 /* SPTableInfo.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 9B9ACE9008DEBE70009E313E /* Sequel Pro */ = { + isa = PBXNativeTarget; + buildConfigurationList = 9B9ACEE508DEBE70009E313E /* Build configuration list for PBXNativeTarget "Sequel Pro" */; + buildPhases = ( + 9B9ACE9108DEBE70009E313E /* Headers */, + 9B9ACE9F08DEBE70009E313E /* Resources */, + 9B9ACECF08DEBE70009E313E /* Sources */, + 9B9ACEDE08DEBE70009E313E /* CopyFiles */, + 9B9ACEE008DEBE70009E313E /* Frameworks */, + 4B370C6C0E699D230002ABD0 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Sequel Pro"; + productName = "Sequel Pro"; + productReference = 9B9ACEEA08DEBE70009E313E /* Sequel Pro.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2A37F4A9FDCFA73011CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 9BED648908C0E73200C18B6E /* Build configuration list for PBXProject "sequel-pro" */; + compatibilityVersion = "Xcode 2.4"; + hasScannedForEncodings = 1; + mainGroup = 2A37F4AAFDCFA73011CA2CEA /* Sequel Pro */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 9B9ACE9008DEBE70009E313E /* Sequel Pro */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 9B9ACE9F08DEBE70009E313E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B5C801C60E7212E00011253E /* Growl Registration Ticket.growlRegDict in Resources */, + 9B9ACEA008DEBE70009E313E /* Credits.rtf in Resources */, + 9B9ACEA408DEBE70009E313E /* sort-down.tiff in Resources */, + 9B9ACEA508DEBE70009E313E /* sort-up.tiff in Resources */, + 9B9ACEA608DEBE70009E313E /* selectall.tiff in Resources */, + 9B9ACEA708DEBE70009E313E /* appicon.icns in Resources */, + 9B9ACEA808DEBE70009E313E /* gpl.txt in Resources */, + 9B9ACEA908DEBE70009E313E /* selectnone.tiff in Resources */, + 9B9ACEAA08DEBE70009E313E /* rowcopy.tiff in Resources */, + 9B9ACEAB08DEBE70009E313E /* columncopy.tiff in Resources */, + 9B9ACEAC08DEBE70009E313E /* tablecopy.tiff in Resources */, + 9B9ACEAD08DEBE70009E313E /* databases.tiff in Resources */, + 9B9ACEAE08DEBE70009E313E /* dbadd.tiff in Resources */, + 9B9ACEAF08DEBE70009E313E /* dbdelete.tiff in Resources */, + 9B9ACEB008DEBE70009E313E /* dbrefresh.tiff in Resources */, + 9B9ACEB108DEBE70009E313E /* indexadd.tiff in Resources */, + 9B9ACEB208DEBE70009E313E /* indexdelete.tiff in Resources */, + 9B9ACEB308DEBE70009E313E /* tableadd.tiff in Resources */, + 9B9ACEB408DEBE70009E313E /* tabledelete.tiff in Resources */, + 9B9ACEB508DEBE70009E313E /* tablerefresh.tiff in Resources */, + 9B9ACEB608DEBE70009E313E /* tables.tiff in Resources */, + 9B9ACEB708DEBE70009E313E /* clearconsole.tiff in Resources */, + 9B9ACEB808DEBE70009E313E /* createtablesyntax.tiff in Resources */, + 9B9ACEB908DEBE70009E313E /* flushprivileges.tiff in Resources */, + 9B9ACEBA08DEBE70009E313E /* optimizetable.tiff in Resources */, + 9B9ACEBB08DEBE70009E313E /* showvariables.tiff in Resources */, + 9B9ACEBC08DEBE70009E313E /* columnadd.tiff in Resources */, + 9B9ACEBD08DEBE70009E313E /* columndelete.tiff in Resources */, + 9B9ACEBE08DEBE70009E313E /* columnrefresh.tiff in Resources */, + 9B9ACEBF08DEBE70009E313E /* connectionadd.tiff in Resources */, + 9B9ACEC008DEBE70009E313E /* connectiondelete.tiff in Resources */, + 9B9ACEC108DEBE70009E313E /* hideconsole.tiff in Resources */, + 9B9ACEC208DEBE70009E313E /* showconsole.tiff in Resources */, + 9B9ACEC308DEBE70009E313E /* queryadd.tiff in Resources */, + 9B9ACEC408DEBE70009E313E /* querydelete.tiff in Resources */, + 9B9ACEC508DEBE70009E313E /* rowadd.tiff in Resources */, + 9B9ACEC608DEBE70009E313E /* rowdelete.tiff in Resources */, + 9B9ACEC708DEBE70009E313E /* rowrefresh.tiff in Resources */, + 9B9ACEC808DEBE70009E313E /* sheettotable.tiff in Resources */, + 9B9ACEC908DEBE70009E313E /* tabletosheet.tiff in Resources */, + 9B9ACECA08DEBE70009E313E /* textencode.tiff in Resources */, + 9B9ACECB08DEBE70009E313E /* connectioncopy.tiff in Resources */, + 9B9ACECC08DEBE70009E313E /* querycopy.tiff in Resources */, + 9B9ACECD08DEBE70009E313E /* english_help in Resources */, + 9B9ACECE08DEBE70009E313E /* Localizable.strings in Resources */, + 9BFF53B208F44B40004D6BCB /* askForPass.sh in Resources */, + 3861DD760DA78690003236DE /* sequel-pro.scriptTerminology in Resources */, + 3861DD770DA78690003236DE /* sequel-pro.scriptSuite in Resources */, + 38E9C92D0DBF71C5009E9395 /* MainMenu.xib in Resources */, + 38E9C9320DBF7293009E9395 /* DBView.xib in Resources */, + 383DAC110DCACB4B000499B6 /* logo-48.png in Resources */, + 383DAC160DCACE1D000499B6 /* toolbar-switch-to-browse.png in Resources */, + 383DAC180DCACE1D000499B6 /* toolbar-switch-to-sql.png in Resources */, + 383DAC1A0DCACE68000499B6 /* toolbar-switch-to-table-info.png in Resources */, + B550AF9E0DD1795C006CFEF0 /* CodeAssistantProtocol.tiff in Resources */, + B5A78E700E4AC08D00684D3F /* grabber-horizontal.png in Resources */, + B5A78E710E4AC08D00684D3F /* grabber-vertical.png in Resources */, + B5A78E720E4AC08D00684D3F /* spyglass.tiff in Resources */, + B5A78E730E4AC08D00684D3F /* table-small.tif in Resources */, + 3863D2EE0E845D47004172E9 /* toolbar-switch-to-structure.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 9B9ACECF08DEBE70009E313E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9B9ACED008DEBE70009E313E /* TableDocument.m in Sources */, + 9B9ACED108DEBE70009E313E /* main.m in Sources */, + 9B9ACED208DEBE70009E313E /* TableContent.m in Sources */, + 9B9ACED308DEBE70009E313E /* TableSource.m in Sources */, + 9B9ACED408DEBE70009E313E /* TablesList.m in Sources */, + 9B9ACED508DEBE70009E313E /* CustomQuery.m in Sources */, + 9B9ACED608DEBE70009E313E /* MainController.m in Sources */, + 9B9ACED708DEBE70009E313E /* TableDump.m in Sources */, + 9B9ACED808DEBE70009E313E /* KeyChain.m in Sources */, + 9B9ACED908DEBE70009E313E /* CMImageView.m in Sources */, + 9B9ACEDA08DEBE70009E313E /* CMCopyTable.m in Sources */, + 9B9ACEDB08DEBE70009E313E /* TableStatus.m in Sources */, + 9B9ACEDC08DEBE70009E313E /* CMMCPConnection.m in Sources */, + 9B9ACEDD08DEBE70009E313E /* CMMCPResult.m in Sources */, + 9BE828B80908269400A18070 /* SSHTunnel.m in Sources */, + 9BC3EEBB09AC6EE100F6B295 /* CMTextView.m in Sources */, + 38F42AE10DBFF16500B58FFB /* TableDocumentSplitView.m in Sources */, + B5BD35060DCF31CB005723A7 /* ImageAndTextCell.m in Sources */, + B51C20710DCFEA4F00A9A004 /* SPTableInfo.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 2A37F4B9FDCFA73011CA2CEA /* Credits.rtf */ = { + isa = PBXVariantGroup; + children = ( + 2A37F4BAFDCFA73011CA2CEA /* English */, + ); + name = Credits.rtf; + sourceTree = ""; + }; + 38E9C92B0DBF71C5009E9395 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 38E9C92C0DBF71C5009E9395 /* English */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; + 38E9C9300DBF7293009E9395 /* DBView.xib */ = { + isa = PBXVariantGroup; + children = ( + 38E9C9310DBF7293009E9395 /* English */, + ); + name = DBView.xib; + sourceTree = ""; + }; + F58CAF13052C84EB01B3ED40 /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + F58CAF14052C84EB01B3ED40 /* English */, + ); + name = Localizable.strings; + sourceTree = ""; + }; + F5DB91380510F4B60186457F /* english_help */ = { + isa = PBXVariantGroup; + children = ( + F5DB91390510F4B60186457F /* English */, + ); + name = english_help; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 9B9ACEE608DEBE70009E313E /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH)"; + COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS = ( + ., + "$(SRCROOT)", + ); + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VALUE = NO; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ""; + INFOPLIST_FILE = Info.plist; + LIBRARY_SEARCH_PATHS = ""; + MACOSX_DEPLOYMENT_TARGET = 10.4; + PRODUCT_NAME = "Sequel Pro"; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + WRAPPER_EXTENSION = app; + ZERO_LINK = YES; + }; + name = Development; + }; + 9B9ACEE708DEBE70009E313E /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + COPY_PHASE_STRIP = YES; + FRAMEWORK_SEARCH_PATHS = ( + ., + "$(SRCROOT)", + ); + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_OPTIMIZATION_LEVEL = 3; + HEADER_SEARCH_PATHS = ""; + INFOPLIST_FILE = Info.plist; + LIBRARY_SEARCH_PATHS = ""; + MACOSX_DEPLOYMENT_TARGET = 10.4; + MACOSX_DEPLOYMENT_TARGET_i386 = 10.4; + MACOSX_DEPLOYMENT_TARGET_ppc = 10.3; + PRODUCT_NAME = "Sequel Pro"; + SECTORDER_FLAGS = ""; + VALID_ARCHS = "i386 ppc64 ppc7400 ppc970 ppc"; + VERSIONING_SYSTEM = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Deployment; + }; + 9B9ACEE808DEBE70009E313E /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + FRAMEWORK_SEARCH_PATHS = ( + ., + "$(SRCROOT)", + ); + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_OPTIMIZATION_LEVEL = 0; + HEADER_SEARCH_PATHS = ""; + INFOPLIST_FILE = Info.plist; + LIBRARY_SEARCH_PATHS = ""; + MACOSX_DEPLOYMENT_TARGET = 10.4; + PRODUCT_NAME = "Sequel Pro"; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + WRAPPER_EXTENSION = app; + }; + name = Default; + }; + 9BED648A08C0E73200C18B6E /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + }; + name = Development; + }; + 9BED648B08C0E73200C18B6E /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)"; + ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386"; + SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + }; + name = Deployment; + }; + 9BED648C08C0E73200C18B6E /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + }; + name = Default; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 9B9ACEE508DEBE70009E313E /* Build configuration list for PBXNativeTarget "Sequel Pro" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9B9ACEE608DEBE70009E313E /* Development */, + 9B9ACEE708DEBE70009E313E /* Deployment */, + 9B9ACEE808DEBE70009E313E /* Default */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Default; + }; + 9BED648908C0E73200C18B6E /* Build configuration list for PBXProject "sequel-pro" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9BED648A08C0E73200C18B6E /* Development */, + 9BED648B08C0E73200C18B6E /* Deployment */, + 9BED648C08C0E73200C18B6E /* Default */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Default; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2A37F4A9FDCFA73011CA2CEA /* Project object */; +} -- cgit v1.2.3