From 065d72ceb7e8213348490815f6f90ecf4de56061 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 28 Nov 2014 22:24:12 +0100 Subject: Change pagination popover to native type This commit switches our pagination popover to use native NSPopover on 10.7+ making it look more polished and modern. On 10.6 the old style will be used, *however* that one might still suffer from a bug caused by undefined overlapping view drawing behaviour. --- Interfaces/English.lproj/ContentPaginationView.xib | 3675 +++++++++++++++++--- Source/SPTableContent.h | 3 + Source/SPTableContent.m | 91 +- 3 files changed, 3212 insertions(+), 557 deletions(-) diff --git a/Interfaces/English.lproj/ContentPaginationView.xib b/Interfaces/English.lproj/ContentPaginationView.xib index 045a1370..7b5f5ed9 100644 --- a/Interfaces/English.lproj/ContentPaginationView.xib +++ b/Interfaces/English.lproj/ContentPaginationView.xib @@ -2,13 +2,13 @@ 1060 - 13B3116 - 4514 - 1265 - 696.00 + 13F34 + 5056 + 1265.21 + 698.00 com.apple.InterfaceBuilder.CocoaPlugin - 4514 + 5056 NSBox @@ -22,6 +22,7 @@ NSTextField NSTextFieldCell NSUserDefaultsController + NSViewController com.apple.InterfaceBuilder.CocoaPlugin @@ -41,7 +42,7 @@ NSApplication - + 289 @@ -51,360 +52,36 @@ 274 - - - - 268 - {{147, 109}, {52, 19}} - - YES - - -1804599231 - 67240960 - - - .LucidaGrandeUI - 11 - 3100 - - - - - - - - - - - -∞ - - - #,##1 - +∞ - - - #,##1 - #,##1 - - - - - - - - NaN - - - - - 0 - 0 - YES - NO - 1 - AAAAAAAAAAAAAAAAAAAAAA - - - 3 - YES - YES - YES - - . - , - YES - NO - NO - - - YES - - 6 - System - textBackgroundColor - - 3 - MQA - - - - 6 - System - textColor - - 3 - MAA - - - - NO - 1 - - - - 268 - {{201, 107}, {15, 22}} - - YES - - 67895328 - 131072 - - - 1 - 1 - 1000000 - 1 - YES - - NO - - - - 268 - {{12, 112}, {129, 14}} - - YES - - 68157504 - 71435264 - Jump to page: - - - - 6 - System - controlColor - - 3 - MC42NjY2NjY2NjY3AA - - - - 6 - System - controlTextColor - - - - NO - 1 - - - - 268 - {{222, 110}, {91, 17}} - - YES - - -2080374784 - 134348800 - Go - - - -2038153216 - 164 - - - 400 - 75 - - NO - - - - 12 - {{11, 98}, {302, 5}} - - {0, 0} - - 67108864 - 0 - Box - - .LucidaGrandeUI - 13 - 1044 - - - - 3 - MCAwLjgwMDAwMDAxMTkAA - - - 3 - 2 - 0 - NO - - - - 268 - {{12, 79}, {166, 18}} - - YES - - 67108864 - 131072 - Limit result to: - - - 1211912448 - 2 - - NSImage - NSSwitch - - - NSSwitch - - - - 200 - 25 - - NO - - - - 268 - {{184, 79}, {52, 19}} - - YES - - -1804599231 - -2076048384 - - - - - - . - - , - - - - - - - - -∞ - - - +∞ - - - - #,##1 - #,##1 - - - - - - - - NaN - - - - - - 3 - YES - YES - YES - - . - , - YES - NO - NO - - - YES - - - - NO - 1 - - - - 268 - {{238, 76}, {15, 22}} - - YES - - 67895328 - 131072 - - - 100 - 1 - 100000 - 1 - YES - YES - - NO - - - - 268 - {{256, 81}, {60, 14}} - - YES - - 68157504 - 272761856 - rows - - - - - - NO - 1 - - - - 268 - {{12, 54}, {303, 18}} - - YES - - 67108864 - 131072 - Defer loading of blobs and texts - - - 1211912448 - 2 - - - - - 200 - 25 - - NO - - + {{1, 1}, {328, 134}} + + {{0, -47}, {330, 136}} + + {0, 0} 67108864 0 - - + + .LucidaGrandeUI + 11 + 3100 + + + 6 + System + textBackgroundColor + + 3 + MQA + + 3 MCAwLjgwMDAwMDAxMTkAA @@ -429,27 +106,382 @@ 301 {{52, 0}, {278, 135}} + NSButton {330, 89} + + + NSView YES + + + + 268 + + + + 268 + {{15, 31}, {166, 18}} + + + + YES + + 67108864 + 131072 + Limit result to: + + + 1211912448 + 2 + + NSImage + NSSwitch + + + NSSwitch + + + + 200 + 25 + + NO + + + + 268 + {{187, 31}, {52, 19}} + + + + YES + + -1804599231 + -2076048384 + + + + + + . + + , + + + + + + + + + + -∞ + + + +∞ + + + + #,##1 + #,##1 + + + + + + + + NaN + + + + + + 3 + YES + YES + YES + + . + , + YES + NO + NO + + + YES + + + 6 + System + textColor + + 3 + MAA + + + + NO + 1 + + + + 268 + {{241, 28}, {15, 22}} + + + + YES + + 67895328 + 131072 + + + 100 + 1 + 100000 + 1 + YES + YES + + NO + + + + 12 + {{14, 50}, {302, 5}} + + + + {0, 0} + + 67108864 + 0 + Box + + .LucidaGrandeUI + 13 + 1044 + + + + 3 + MCAwLjgwMDAwMDAxMTkAA + + + 3 + 2 + 0 + NO + + + + 268 + {{204, 59}, {15, 22}} + + + + YES + + 67895328 + 131072 + + + 1 + 1 + 1000000 + 1 + YES + + NO + + + + 268 + {{259, 33}, {60, 14}} + + + + YES + + 68157504 + 272761856 + rows + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + + + NO + 1 + + + + 268 + {{15, 6}, {303, 18}} + + + YES + + 67108864 + 131072 + Defer loading of blobs and texts + + + 1211912448 + 2 + + + + + 200 + 25 + + NO + + + + 268 + {{15, 64}, {129, 14}} + + + + YES + + 68157504 + 71435264 + Jump to page: + + + + + + NO + 1 + + + + 268 + {{150, 61}, {52, 19}} + + + + YES + + -1804599231 + 67240960 + + + + + + + + + + -∞ + + + #,##1 + +∞ + + + #,##1 + #,##1 + + + + + + + + NaN + + + + + 0 + 0 + YES + NO + 1 + AAAAAAAAAAAAAAAAAAAAAA + + + 3 + YES + YES + YES + + . + , + YES + NO + NO + + + YES + + + + NO + 1 + + + + 268 + {{225, 62}, {91, 17}} + + + + YES + + -2080374784 + 134348800 + Go + + + -2038153216 + 164 + + + 400 + 75 + + NO + + + {330, 89} + + + + _NS:9 + NSView + NO - - - paginationPageField - - - - 45 - paginationView @@ -460,59 +492,67 @@ - paginationPageStepper + paginationViewController - + - 49 + yiZ-Ax-bVs navigatePaginationFromButton: - + - 57 + 28B-A6-zUZ - paginationGoButton + paginationBox - + - 58 + plQ-Ch-kaG - - takeIntValueFrom: - - + + paginationPageField + + + + cwZ-g9-Qbj + + + + paginationGoButton + + - 21 + tIC-S1-mTE - enabled: values.LimitResults - + value: values.LimitResultsValue + - + - enabled: values.LimitResults - enabled - values.LimitResults + value: values.LimitResultsValue + value + values.LimitResultsValue 2 - 28 + xuB-vx-nBA enabled: values.LimitResults - + - + enabled: values.LimitResults enabled @@ -520,15 +560,15 @@ 2 - 30 + T7i-fq-nKX enabled: values.LimitResults - + - + enabled: values.LimitResults enabled @@ -536,55 +576,63 @@ 2 - 32 + Nl1-31-oLD - performClick: - - + takeIntValueFrom: + + - 48 + JYr-Pw-YZ2 - value: values.LimitResults - + enabled: values.LimitResults + - + - value: values.LimitResults - value + enabled: values.LimitResults + enabled values.LimitResults 2 - 26 + rJH-8j-rCm - value: values.LimitResultsValue - + value: values.LoadBlobsAsNeeded + - + - value: values.LimitResultsValue + value: values.LoadBlobsAsNeeded value - values.LimitResultsValue + values.LoadBlobsAsNeeded 2 - 34 + 2GO-pS-eiH + + + + performClick: + + + + 4Uu-gW-Xhz enabled: values.LimitResults - + - + enabled: values.LimitResults enabled @@ -592,23 +640,31 @@ 2 - 41 + AkR-JA-LEs + + + + view + + + + zor-2S-MNt takeIntValueFrom: - - + + - 42 + 5tp-h8-JTG enabled: values.LimitResults - + - + enabled: values.LimitResults enabled @@ -616,15 +672,15 @@ 2 - 37 + 5gN-wc-XcR value: values.LimitResultsValue - + - + value: values.LimitResultsValue value @@ -632,23 +688,23 @@ 2 - 44 + Hq1-Wj-VOf - value: values.LoadBlobsAsNeeded - + value: values.LimitResults + - + - value: values.LoadBlobsAsNeeded + value: values.LimitResults value - values.LoadBlobsAsNeeded + values.LimitResults 2 - 39 + FAF-rW-5Nm @@ -700,157 +756,170 @@ 2 + + + + + hrG-95-pXC + + + Popover View Controller + + + ZlV-bd-j4D + - - - - - - - - - - + + + + + + + + + + - + + Popover Content View - 12 - + cXy-Rp-Edv + - + - + - 13 - - + Vtc-V2-j0v + + + + + - 16 - + CL3-K8-6Zg + - + - + - 17 - - + Wjm-0L-Yq6 + + + + + - 14 - + Uld-aI-QB9 + - + - + - 15 - + S7c-s1-KCT + - + - + - 53 - - + Gxx-kw-h7E + + - 7 - + OtF-Sn-bou + - + - - - - 8 - - + - 9 - + yLU-Zg-DTB + - + - + - 10 - - + zSR-LP-XEx + + + + + - 11 - - + UEh-iO-mvP + + - 5 - + ZXe-ev-5Hv + - + - + - 6 - - + Pxb-UY-tce + + - 18 - - - - - + 389-RH-6nn + + - 19 - - + l3y-yk-wE1 + + - 3 - - - - - + cTU-XP-iES + + - 4 - - - - - + Giv-Ah-MTQ + + - 20 - - + Wlh-Ec-wfF + + - 22 - + ctN-fm-6oy + - + - + + + + 7AG-Ve-mEh + + - 23 - - + hd2-jJ-ldo + + @@ -860,41 +929,2575 @@ 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 + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin - + + + + NSTextView + + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + + + + doDecomposedStringWithCanonicalMapping: + id + + + doDecomposedStringWithCompatibilityMapping: + id + + + doPrecomposedStringWithCanonicalMapping: + id + + + doPrecomposedStringWithCompatibilityMapping: + id + + + doRemoveDiacritics: + id + + + doSelectionLowerCase: + id + + + doSelectionTitleCase: + id + + + doSelectionUpperCase: + id + + + doTranspose: + id + + + executeBundleItemForInputField: + id + + + insertNULLvalue: + id + + + moveSelectionLineDown: + id + + + moveSelectionLineUp: + id + + + selectCurrentLine: + id + + + selectCurrentWord: + id + + + selectEnclosingBrackets: + id + + + + IBProjectSource + ./Classes/NSTextView.h + + + + SPCopyTable + SPTableView + + executeBundleItemForDataTable: + id + + + executeBundleItemForDataTable: + + executeBundleItemForDataTable: + id + + + + IBProjectSource + ./Classes/SPCopyTable.h + + + + SPCustomQuery + NSObject + + 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 + + + + chooseQueryFavorite: + id + + + chooseQueryHistory: + id + + + clearQueryHistory: + id + + + closeSheet: + id + + + copyQueryHistory: + id + + + filterQueryFavorites: + id + + + filterQueryHistory: + id + + + gearMenuItemSelected: + id + + + helpSearchFindNextInPage: + id + + + helpSearchFindPreviousInPage: + id + + + helpSegmentDispatcher: + id + + + helpSelectHelpTargetMySQL: + id + + + helpSelectHelpTargetPage: + id + + + helpSelectHelpTargetWeb: + id + + + helpTargetDispatcher: + id + + + runAllQueries: + id + + + runPrimaryQueryAction: + id + + + runSecondaryQueryAction: + id + + + runSelectedQueries: + id + + + saveQueryHistory: + id + + + searchInDocForWebViewSelection: + id + + + showCompletionList: + id + + + showHelpForCurrentWord: + id + + + showHelpForSearchString: + id + + + showHelpForWebViewSelection: + id + + + switchDefaultQueryAction: + id + + + + id + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSScrollView + SPCopyTable + NSMenuItem + NSPopUpButton + id + NSScrollView + NSTextField + NSSegmentedControl + NSSearchField + NSSearchFieldCell + NSSegmentedControl + WebView + NSWindow + NSMenuItem + NSMenuItem + SPSplitView + NSTextField + id + NSMenuItem + NSMenuItem + NSSearchField + id + NSMenuItem + NSWindow + id + NSSearchField + id + NSMenuItem + NSButton + SPSplitView + id + id + id + NSMenuItem + NSMenuItem + NSMenuItem + NSButton + NSButton + NSMenuItem + NSMenuItem + id + id + SPTextView + id + id + + + + affectedRowsText + id + + + autohelpMenuItem + NSMenuItem + + + autoindentMenuItem + NSMenuItem + + + autopairMenuItem + NSMenuItem + + + autouppercaseKeywordsMenuItem + NSMenuItem + + + clearHistoryMenuItem + NSMenuItem + + + commentCurrentQueryMenuItem + NSMenuItem + + + commentLineOrSelectionMenuItem + NSMenuItem + + + completionListMenuItem + NSMenuItem + + + copyHistoryMenuItem + NSMenuItem + + + customQueryScrollView + NSScrollView + + + customQueryView + SPCopyTable + + + editorFontMenuItem + NSMenuItem + + + encodingPopUp + NSPopUpButton + + + errorText + id + + + errorTextScrollView + NSScrollView + + + errorTextTitle + NSTextField + + + helpNavigator + NSSegmentedControl + + + helpSearchField + NSSearchField + + + helpSearchFieldCell + NSSearchFieldCell + + + helpTargetSelector + NSSegmentedControl + + + helpWebView + WebView + + + helpWebViewWindow + NSWindow + + + nextHistoryMenuItem + NSMenuItem + + + previousHistoryMenuItem + NSMenuItem + + + queryEditorSplitView + SPSplitView + + + queryFavoriteNameTextField + NSTextField + + + queryFavoritesButton + id + + + queryFavoritesSaveAllMenuItem + NSMenuItem + + + queryFavoritesSaveAsMenuItem + NSMenuItem + + + queryFavoritesSearchField + NSSearchField + + + queryFavoritesSearchFieldView + id + + + queryFavoritesSearchMenuItem + NSMenuItem + + + queryFavoritesSheet + NSWindow + + + queryHistoryButton + id + + + queryHistorySearchField + NSSearchField + + + queryHistorySearchFieldView + id + + + queryHistorySearchMenuItem + NSMenuItem + + + queryInfoButton + NSButton + + + queryInfoPaneSplitView + SPSplitView + + + runAllButton + id + + + runPrimaryActionButton + id + + + runPrimaryActionButtonAsSelection + id + + + runPrimaryActionMenuItem + NSMenuItem + + + runSecondaryActionMenuItem + NSMenuItem + + + saveHistoryMenuItem + NSMenuItem + + + saveQueryFavoriteButton + NSButton + + + saveQueryFavoriteGlobal + NSButton + + + shiftLeftMenuItem + NSMenuItem + + + shiftRightMenuItem + NSMenuItem + + + tableDocumentInstance + id + + + tablesListInstance + id + + + textView + SPTextView + + + valueSheet + id + + + valueTextField + id + + + + IBProjectSource + ./Classes/SPCustomQuery.h + + + + SPDatabaseData + NSObject + + IBProjectSource + ./Classes/SPDatabaseData.h + + + + SPDatabaseDocument + NSObject + + 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 + id + id + id + id + id + id + id + id + id + id + + + + addConnectionToFavorites: + id + + + addDatabase: + id + + + alterDatabase: + id + + + analyzeTable: + id + + + backForwardInHistory: + id + + + cancelTask: + id + + + checkTable: + id + + + checksumTable: + id + + + chooseDatabase: + id + + + chooseEncoding: + id + + + closeErrorConnectionSheet: + id + + + closePanelSheet: + id + + + closePasswordSheet: + id + + + closeSheet: + id + + + copyChecksumFromSheet: + id + + + copyCreateTableSyntax: + id + + + copyCreateTableSyntaxFromSheet: + id + + + copyDatabase: + id + + + export: + id + + + exportSelectedTablesAs: + id + + + flushTable: + id + + + focusOnTableContentFilter: + id + + + import: + id + + + importFromClipboard: + id + + + makeTableListFilterHaveFocus: + id + + + openCurrentConnectionInNewWindow: + id + + + openDatabaseInNewTab: + id + + + optimizeTable: + id + + + printDocument: + id + + + refreshTables: + id + + + removeDatabase: + id + + + renameDatabase: + id + + + repairTable: + id + + + saveConnectionSheet: + id + + + saveCreateSyntax: + id + + + setDatabases: + id + + + showCreateTableSyntax: + id + + + showFilterTable: + id + + + showGotoDatabase: + id + + + showMySQLHelp: + id + + + showNavigator: + id + + + showServerProcesses: + id + + + showServerVariables: + id + + + showUserManager: + id + + + toggleNavigator: + id + + + validateSaveConnectionAccessory: + id + + + viewContent: + id + + + viewQuery: + id + + + viewRelations: + id + + + viewStatus: + id + + + viewStructure: + id + + + viewTriggers: + id + + + + id + id + NSWindow + SPSplitView + id + NSButton + id + NSTextField + NSTextView + NSWindow + id + NSTextView + NSPopUpButton + NSPopUpButton + id + id + id + id + id + id + id + id + id + id + NSTableView + NSScrollView + NSPopUpButton + id + id + id + id + id + id + id + id + NSSearchField + NSView + NSProgressIndicator + id + id + id + NSButton + NSButton + NSSecureTextField + NSButton + NSButton + NSButton + id + id + id + id + id + SPTableContent + SPTableData + id + NSScrollView + NSTableView + id + SPTableStructure + NSTabView + id + SPTablesList + NSButton + id + id + NSBox + id + id + id + + + + addDatabaseButton + id + + + chooseDatabaseButton + id + + + connectionErrorDialog + NSWindow + + + contentViewSplitter + SPSplitView + + + copyDatabaseButton + id + + + copyDatabaseDataButton + NSButton + + + copyDatabaseMessageField + id + + + createTableSyntaxTextField + NSTextField + + + createTableSyntaxTextView + NSTextView + + + createTableSyntaxWindow + NSWindow + + + customQueryInstance + id + + + customQueryTextView + NSTextView + + + databaseAlterCollationButton + NSPopUpButton + + + databaseAlterEncodingButton + NSPopUpButton + + + databaseAlterSheet + id + + + databaseCollationButton + id + + + databaseCopyNameField + id + + + databaseCopySheet + id + + + databaseDataInstance + id + + + databaseEncodingButton + id + + + databaseNameField + id + + + databaseRenameNameField + id + + + databaseRenameSheet + id + + + databaseSheet + id + + + dbTablesTableView + NSTableView + + + documentActivityScrollView + NSScrollView + + + encodingPopUp + NSPopUpButton + + + exportControllerInstance + id + + + extendedTableInfoInstance + id + + + favoritesButton + id + + + historyControl + id + + + inputTextWindow + id + + + inputTextWindowHeader + id + + + inputTextWindowMessage + id + + + inputTextWindowSecureTextField + id + + + listFilterField + NSSearchField + + + parentView + NSView + + + queryProgressBar + NSProgressIndicator + + + renameDatabaseButton + id + + + renameDatabaseMessageField + id + + + saveConnectionAccessory + id + + + saveConnectionAutoConnect + NSButton + + + saveConnectionEncrypt + NSButton + + + saveConnectionEncryptString + NSSecureTextField + + + saveConnectionIncludeData + NSButton + + + saveConnectionIncludeQuery + NSButton + + + saveConnectionSavePassword + NSButton + + + saveConnectionSavePasswordAlert + id + + + spHistoryControllerInstance + id + + + statusTableAccessoryView + id + + + statusTableCopyChecksum + id + + + statusTableView + id + + + tableContentInstance + SPTableContent + + + tableDataInstance + SPTableData + + + tableDumpInstance + id + + + tableInfoScrollView + NSScrollView + + + tableInfoTable + NSTableView + + + tableRelationsInstance + id + + + tableSourceInstance + SPTableStructure + + + tableTabView + NSTabView + + + tableTriggersInstance + id + + + tablesListInstance + SPTablesList + + + taskCancelButton + NSButton + + + taskDescriptionText + id + + + taskProgressIndicator + id + + + taskProgressLayer + NSBox + + + titleAccessoryView + id + + + titleImageView + id + + + titleStringView + id + + + + IBProjectSource + ./Classes/SPDatabaseDocument.h + + + + SPExtendedTableInfo + NSObject + + id + id + id + id + id + id + + + + reloadTable: + id + + + resetAutoIncrement: + id + + + resetAutoIncrementValueWasEdited: + id + + + updateTableCollation: + id + + + updateTableEncoding: + id + + + updateTableType: + id + + + + SPDatabaseData + id + NSPopUpButton + NSTextView + NSTextView + NSTextField + SPTableData + NSTextField + id + NSPopUpButton + NSTextField + NSTextField + NSTextField + NSTextField + NSTextField + NSTextField + NSTextField + id + NSPopUpButton + NSTextField + SPTablesList + + + + databaseDataInstance + SPDatabaseData + + + resetAutoIncrementResetButton + id + + + tableCollationPopUpButton + NSPopUpButton + + + tableCommentsTextView + NSTextView + + + tableCreateSyntaxTextView + NSTextView + + + tableCreatedAt + NSTextField + + + tableDataInstance + SPTableData + + + tableDataSize + NSTextField + + + tableDocumentInstance + id + + + tableEncodingPopUpButton + NSPopUpButton + + + tableIndexSize + NSTextField + + + tableMaxDataSize + NSTextField + + + tableRowAutoIncrement + NSTextField + + + tableRowAvgLength + NSTextField + + + tableRowFormat + NSTextField + + + tableRowNumber + NSTextField + + + tableSizeFree + NSTextField + + + tableSourceInstance + id + + + tableTypePopUpButton + NSPopUpButton + + + tableUpdatedAt + NSTextField + + + tablesListInstance + SPTablesList + + + + IBProjectSource + ./Classes/SPExtendedTableInfo.h + + + + SPHistoryController + NSObject + + historyControlClicked: + NSSegmentedControl + + + historyControlClicked: + + historyControlClicked: + NSSegmentedControl + + + + NSSegmentedControl + SPDatabaseDocument + + + + historyControl + NSSegmentedControl + + + theDocument + SPDatabaseDocument + + + + IBProjectSource + ./Classes/SPHistoryController.h + + + + SPIndexesController + NSWindowController + + id + id + id + id + id + id + id + + + + addIndex: + id + + + addIndexedField: + id + + + chooseIndexType: + id + + + closeSheet: + id + + + removeIndex: + id + + + removeIndexedField: + id + + + toggleAdvancedIndexOptionsView: + id + + + + NSButton + NSButton + NSBox + NSButton + SPDatabaseDocument + NSView + NSButton + NSButton + NSTextField + NSTextField + NSTextField + NSTableColumn + NSPopUpButton + NSTextField + NSPopUpButton + NSScrollView + NSTableView + SPTableView + NSButton + NSButton + SPTableData + SPTableStructure + SPTablesList + + + + addIndexButton + NSButton + + + addIndexedColumnButton + NSButton + + + anchoredButtonBar + NSBox + + + confirmAddIndexButton + NSButton + + + dbDocument + SPDatabaseDocument + + + indexAdvancedOptionsView + NSView + + + indexAdvancedOptionsViewButton + NSButton + + + indexAdvancedOptionsViewLabelButton + NSButton + + + indexKeyBlockSizeTextField + NSTextField + + + indexNameLabel + NSTextField + + + indexNameTextField + NSTextField + + + indexSizeTableColumn + NSTableColumn + + + indexStorageTypePopUpButton + NSPopUpButton + + + indexTypeLabel + NSTextField + + + indexTypePopUpButton + NSPopUpButton + + + indexedColumnsScrollView + NSScrollView + + + indexedColumnsTableView + NSTableView + + + indexesTableView + SPTableView + + + removeIndexButton + NSButton + + + removeIndexedColumnButton + NSButton + + + tableData + SPTableData + + + tableStructure + SPTableStructure + + + tablesList + SPTablesList + + + + IBProjectSource + ./Classes/SPIndexesController.h + + + + SPSplitView + NSSplitView + + toggleCollapse: + id + + + toggleCollapse: + + toggleCollapse: + id + + + + NSView + NSButton + + + + additionalDragHandleView + NSView + + + collapseToggleButton + NSButton + + + + IBProjectSource + ./Classes/SPSplitView.h + + + + SPTableContent + NSObject + + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + NSButton + + + + addRow: + id + + + closeSheet: + id + + + duplicateRow: + id + + + filterTable: + id + + + navigatePaginationFromButton: + id + + + reloadTable: + id + + + removeRow: + id + + + setCompareTypes: + id + + + setDefaultOperator: + id + + + showDefaultOperaterHelp: + id + + + showFilterTable: + id + + + tableFilterClear: + id + + + toggleDistinctSelect: + id + + + toggleFilterField: + id + + + toggleLookAllFieldsMode: + id + + + toggleNegateClause: + id + + + togglePagination: + NSButton + + + + id + id + id + id + SPSplitView + NSView + id + id + NSPopUpButton + id + NSButton + NSButton + NSButton + NSButton + NSButton + NSTextField + NSButton + NSPanel + NSComboBox + SPSplitView + SPCopyTable + SPTextView + NSPanel + id + id + id + id + NSButton + NSBox + NSButton + NSButton + NSButton + NSTextField + NSStepper + NSButton + NSView + NSViewController + id + id + id + SPHistoryController + SPCopyTable + SPTableData + SPDatabaseDocument + SPTableInfo + id + id + + + + addButton + id + + + argumentField + id + + + betweenTextField + id + + + compareField + id + + + contentSplitView + SPSplitView + + + contentViewPane + NSView + + + countText + id + + + duplicateButton + id + + + fieldField + NSPopUpButton + + + filterButton + id + + + filterTableClearButton + NSButton + + + filterTableDistinctCheckbox + NSButton + + + filterTableFilterButton + NSButton + + + filterTableLiveSearchCheckbox + NSButton + + + filterTableNegateCheckbox + NSButton + + + filterTableQueryTitle + NSTextField + + + filterTableSearchAllFields + NSButton + + + filterTableSetDefaultOperatorSheet + NSPanel + + + filterTableSetDefaultOperatorValue + NSComboBox + + + filterTableSplitView + SPSplitView + + + filterTableView + SPCopyTable + + + filterTableWhereClause + SPTextView + + + filterTableWindow + NSPanel + + + firstBetweenField + id + + + limitRowsButton + id + + + limitRowsField + id + + + limitRowsStepper + id + + + multipleLineEditingButton + NSButton + + + paginationBox + NSBox + + + paginationButton + NSButton + + + paginationGoButton + NSButton + + + paginationNextButton + NSButton + + + paginationPageField + NSTextField + + + paginationPageStepper + NSStepper + + + paginationPreviousButton + NSButton + + + paginationView + NSView + + + paginationViewController + NSViewController + + + reloadButton + id + + + removeButton + id + + + secondBetweenField + id + + + spHistoryControllerInstance + SPHistoryController + + + tableContentView + SPCopyTable + + + tableDataInstance + SPTableData + + + tableDocumentInstance + SPDatabaseDocument + + + tableInfoInstance + SPTableInfo + + + tableSourceInstance + id + + + tablesListInstance + id + + + + IBProjectSource + ./Classes/SPTableContent.h + + + + SPTableData + NSObject + + SPDatabaseDocument + SPTablesList + + + + tableDocumentInstance + SPDatabaseDocument + + + tableListInstance + SPTablesList + + + + IBProjectSource + ./Classes/SPTableData.h + + + + SPTableInfo + NSObject + + NSTableView + id + id + id + NSScrollView + id + id + + + + activitiesTable + NSTableView + + + infoTable + id + + + tableDataInstance + id + + + tableDocumentInstance + id + + + tableInfoScrollView + NSScrollView + + + tableList + id + + + tableListInstance + id + + + + IBProjectSource + ./Classes/SPTableInfo.h + + + + SPTableStructure + NSObject + + id + id + id + id + id + id + id + NSMenuItem + id + + + + addField: + id + + + closeSheet: + id + + + duplicateField: + id + + + reloadTable: + id + + + removeField: + id + + + resetAutoIncrement: + id + + + showOptimizedFieldType: + id + + + toggleColumnView: + NSMenuItem + + + unhideIndexesView: + id + + + + id + id + id + SPDatabaseData + id + id + NSPopUpButtonCell + SPExtendedTableInfo + SPIndexesController + NSButton + SPTableView + id + id + id + id + id + id + id + id + id + SPTableData + SPDatabaseDocument + SPTableInfo + SPTableView + NSSplitView + SPTablesList + id + + + + addFieldButton + id + + + addIndexButton + id + + + chooseKeyButton + id + + + databaseDataInstance + SPDatabaseData + + + duplicateFieldButton + id + + + editTableButton + id + + + encodingPopupCell + NSPopUpButtonCell + + + extendedTableInfoInstance + SPExtendedTableInfo + + + indexesController + SPIndexesController + + + indexesShowButton + NSButton + + + indexesTableView + SPTableView + + + keySheet + id + + + refreshIndexesButton + id + + + reloadFieldsButton + id + + + removeFieldButton + id + + + removeIndexButton + id + + + resetAutoIncrementLine + id + + + resetAutoIncrementSheet + id + + + resetAutoIncrementValue + id + + + structureGrabber + id + + + tableDataInstance + SPTableData + + + tableDocumentInstance + SPDatabaseDocument + + + tableInfoInstance + SPTableInfo + + + tableSourceView + SPTableView + + + tablesIndexesSplitView + NSSplitView + + + tablesListInstance + SPTablesList + + + viewColumnsMenu + id + + + + IBProjectSource + ./Classes/SPTableStructure.h + + + + SPTableView + NSTableView + + IBProjectSource + ./Classes/SPTableView.h + + + + SPTablesList + NSObject + + id + id + id + id + id + id + id + id + id + id + id + id + + + + addTable: + id + + + closeSheet: + id + + + copyTable: + id + + + openTableInNewTab: + id + + + openTableInNewWindow: + id + + + removeTable: + id + + + renameTable: + id + + + tableEncodingButtonChanged: + id + + + togglePaneCollapse: + id + + + truncateTable: + id + + + updateFilter: + id + + + updateTables: + id + + + + id + NSMenuItem + NSMenuItem + id + NSButton + id + id + id + id + SPDatabaseData + NSMenuItem + NSMenuItem + id + NSSearchField + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + SPHistoryController + id + SPTableContent + id + SPDatabaseDocument + id + id + id + SPSplitView + SPSplitView + id + id + SPTableStructure + id + id + SPTableView + id + id + id + id + NSMenuItem + + + + addTableButton + id + + + copyCreateSyntaxContextMenuItem + NSMenuItem + + + copyCreateSyntaxMenuItem + NSMenuItem + + + copyTableButton + id + + + copyTableContentSwitch + NSButton + + + copyTableMessageField + id + + + copyTableNameField + id + + + copyTableSheet + id + + + customQueryInstance + id + + + databaseDataInstance + SPDatabaseData + + + duplicateTableContextMenuItem + NSMenuItem + + + duplicateTableMenuItem + NSMenuItem + + + extendedTableInfoInstance + id + + + listFilterField + NSSearchField + + + openTableInNewTabContextMenuItem + NSMenuItem + + + openTableInNewTabMenuItem + NSMenuItem + + + openTableInNewWindowContextMenuItem + NSMenuItem + + + openTableInNewWindowMenuItem + NSMenuItem + + + removeTableContextMenuItem + NSMenuItem + + + removeTableMenuItem + NSMenuItem + + + renameTableContextMenuItem + NSMenuItem + + + renameTableMenuItem + NSMenuItem + + + separatorTableContextMenuItem + NSMenuItem + + + separatorTableContextMenuItem2 + NSMenuItem + + + separatorTableContextMenuItem3 + NSMenuItem + + + separatorTableMenuItem + NSMenuItem + + + separatorTableMenuItem2 + NSMenuItem + + + separatorTableMenuItem3 + NSMenuItem + + + showCreateSyntaxContextMenuItem + NSMenuItem + + + showCreateSyntaxMenuItem + NSMenuItem + + + spHistoryControllerInstance + SPHistoryController + + + tableCollationButton + id + + + tableContentInstance + SPTableContent + + + tableDataInstance + id + + + tableDocumentInstance + SPDatabaseDocument + + + tableDumpInstance + id + + + tableEncodingButton + id + + + tableInfoInstance + id + + + tableListFilterSplitView + SPSplitView + + + tableListSplitView + SPSplitView + + + tableNameField + id + + + tableSheet + id + + + tableSourceInstance + SPTableStructure + + + tableTriggersInstance + id + + + tableTypeButton + id + + + tablesListView + SPTableView + + + toolbarActionsButton + id + + + toolbarAddButton + id + + + toolbarReloadButton + id + + + truncateTableButton + id + + + truncateTableContextMenuItem + NSMenuItem + + + + IBProjectSource + ./Classes/SPTablesList.h + + + + SPTextView + NSTextView + + id + id + + + + printDocument: + id + + + showMySQLHelpForCurrentWord: + id + + + + SPCustomQuery + NSScrollView + SPDatabaseDocument + SPTablesList + + + + customQueryInstance + SPCustomQuery + + + scrollView + NSScrollView + + + tableDocumentInstance + SPDatabaseDocument + + + tablesListInstance + SPTablesList + + + + IBProjectSource + ./Classes/SPTextView.h + + + + 0 IBCocoaFramework YES diff --git a/Source/SPTableContent.h b/Source/SPTableContent.h index 8f49b7de..fdb434e8 100644 --- a/Source/SPTableContent.h +++ b/Source/SPTableContent.h @@ -91,7 +91,10 @@ IBOutlet NSButton *paginationNextButton; #ifndef SP_CODA IBOutlet NSView *contentViewPane; + IBOutlet NSViewController *paginationViewController; IBOutlet NSView *paginationView; + IBOutlet NSBox *paginationBox; + NSPopover *paginationPopover; #endif IBOutlet NSTextField *paginationPageField; #ifndef SP_CODA diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m index dcf22d49..892fe30f 100644 --- a/Source/SPTableContent.m +++ b/Source/SPTableContent.m @@ -70,6 +70,10 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOperator"; #endif +#ifndef __MAC_10_7 +#define __MAC_10_7 1070 +#endif + @interface SPTableContent (SPTableContentDataSource_Private_API) - (id)_contentValueForTableColumn:(NSUInteger)columnIndex row:(NSUInteger)rowIndex asPreview:(BOOL)asPreview; @@ -136,6 +140,7 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper lastEditedFilterTableValue = nil; activeFilter = 0; schemeFilter = nil; + paginationPopover = nil; #endif selectedTable = nil; @@ -239,16 +244,33 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper } [nibLoader release]; - - // Add the pagination view to the content area - NSRect paginationViewFrame = [paginationView frame]; - NSRect paginationButtonFrame = [paginationButton frame]; - paginationViewHeight = paginationViewFrame.size.height; - paginationViewFrame.origin.x = paginationButtonFrame.origin.x + paginationButtonFrame.size.width - paginationViewFrame.size.width; - paginationViewFrame.origin.y = paginationButtonFrame.origin.y + paginationButtonFrame.size.height - 2; - paginationViewFrame.size.height = 0; - [paginationView setFrame:paginationViewFrame]; - [contentViewPane addSubview:paginationView]; + +#if __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_7 + //let's see if we can use the NSPopover (10.7+) or have to make do with our legacy clone. + //this is using reflection right now, as our SDK is 10.8 but our minimum supported version is 10.6 + Class popOverClass = NSClassFromString(@"NSPopover"); + if(popOverClass) + { + paginationPopover = [[popOverClass alloc] init]; + [paginationPopover setDelegate:(SPTableContent *)self]; + [paginationPopover setContentViewController:paginationViewController]; + [paginationPopover setBehavior:NSPopoverBehaviorTransient]; + } + else +#endif + { + [paginationBox setContentView:[paginationViewController view]]; + + // Add the pagination view to the content area + NSRect paginationViewFrame = [paginationView frame]; + NSRect paginationButtonFrame = [paginationButton frame]; + paginationViewHeight = paginationViewFrame.size.height; + paginationViewFrame.origin.x = paginationButtonFrame.origin.x + paginationButtonFrame.size.width - paginationViewFrame.size.width; + paginationViewFrame.origin.y = paginationButtonFrame.origin.y + paginationButtonFrame.size.height - 2; + paginationViewFrame.size.height = 0; + [paginationView setFrame:paginationViewFrame]; + [contentViewPane addSubview:paginationView]; + } // Modify the filter table split view sizes [filterTableSplitView setMinSize:135 ofSubviewAtIndex:1]; @@ -780,7 +802,7 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper NSInteger rowsToLoad = [[tableDataInstance statusValueForKey:@"Rows"] integerValue]; #ifndef SP_CODA - [countText setStringValue:NSLocalizedString(@"Loading table data...", @"Loading table data string")]; + [[countText onMainThread] setStringValue:NSLocalizedString(@"Loading table data...", @"Loading table data string")]; #endif // Notify any listeners that a query has started @@ -1520,7 +1542,7 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper } #ifndef SP_CODA - [self setPaginationViewVisibility:FALSE]; + [self setPaginationViewVisibility:NO]; #endif // Select the correct pagination value. @@ -1749,8 +1771,15 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper #ifndef SP_CODA - (IBAction) togglePagination:(NSButton *)sender { - if ([sender state] == NSOnState) [self setPaginationViewVisibility:YES]; - else [self setPaginationViewVisibility:NO]; + [self setPaginationViewVisibility:([sender state] == NSOnState)]; +} +#endif + +#if __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_7 +- (void)popoverDidClose:(NSNotification *)notification +{ + //not to hide the view, but to change the paginationButton + [self setPaginationViewVisibility:NO]; } #endif @@ -1761,16 +1790,13 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper { #ifndef SP_CODA NSRect paginationViewFrame = [paginationView frame]; - - if (makeVisible) { - if (paginationViewFrame.size.height == paginationViewHeight) return; - paginationViewFrame.size.height = paginationViewHeight; + + if(makeVisible) { [paginationButton setState:NSOnState]; [paginationButton setImage:[NSImage imageNamed:@"button_action"]]; [[paginationPageField window] makeFirstResponder:paginationPageField]; - } else { - if (paginationViewFrame.size.height == 0) return; - paginationViewFrame.size.height = 0; + } + else { [paginationButton setState:NSOffState]; [paginationButton setImage:[NSImage imageNamed:@"button_pagination"]]; if ([[paginationPageField window] firstResponder] == paginationPageField @@ -1782,6 +1808,28 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper [[paginationPageField window] makeFirstResponder:nil]; } } + +#if __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_7 + if(paginationPopover) { + if(makeVisible) { + [paginationPopover showRelativeToRect:[paginationButton bounds] ofView:paginationButton preferredEdge:NSMinYEdge]; + } + else if([paginationPopover isShown]) { + //usually this should not happen, as the popover will disappear once the user clicks somewhere + //else in the window (including the paginationButton). + [paginationPopover close]; + } + return; + } +#endif + + if (makeVisible) { + if (paginationViewFrame.size.height == paginationViewHeight) return; + paginationViewFrame.size.height = paginationViewHeight; + } else { + if (paginationViewFrame.size.height == 0) return; + paginationViewFrame.size.height = 0; + } [[paginationView animator] setFrame:paginationViewFrame]; #endif @@ -4278,6 +4326,7 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper #ifndef SP_CODA for (id retainedObject in nibObjectsToRelease) [retainedObject release]; [nibObjectsToRelease release]; + [paginationPopover release]; [filterTableData release]; if (lastEditedFilterTableValue) [lastEditedFilterTableValue release]; -- cgit v1.2.3