diff options
author | rowanbeentje <rowan@beent.je> | 2009-12-15 14:40:34 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2009-12-15 14:40:34 +0000 |
commit | e895f8dcba0784e2fee9ba855ee0de12e8deaefb (patch) | |
tree | a2c48d73e0459e3b300be8e2b42edd5eed03296e | |
parent | b923ed2a9a4816ce9b7faf981950b4385023418a (diff) | |
download | sequelpro-e895f8dcba0784e2fee9ba855ee0de12e8deaefb.tar.gz sequelpro-e895f8dcba0784e2fee9ba855ee0de12e8deaefb.tar.bz2 sequelpro-e895f8dcba0784e2fee9ba855ee0de12e8deaefb.zip |
- Tweak the pagination interface - remove the text and replace with an icon, to reduce the overall space taken up in the bottom bar and to make it clearer a jump-to/options button is available
-rw-r--r-- | Interfaces/English.lproj/DBView.xib | 8 | ||||
-rw-r--r-- | Resources/Images/button_pagination.png | bin | 311 -> 717 bytes | |||
-rw-r--r-- | Source/TableContent.m | 15 |
3 files changed, 6 insertions, 17 deletions
diff --git a/Interfaces/English.lproj/DBView.xib b/Interfaces/English.lproj/DBView.xib index 0ef9900c..dc251b32 100644 --- a/Interfaces/English.lproj/DBView.xib +++ b/Interfaces/English.lproj/DBView.xib @@ -2448,7 +2448,7 @@ <object class="NSTextField" id="262235013"> <reference key="NSNextResponder" ref="1013108064"/> <int key="NSvFlags">290</int> - <string key="NSFrame">{{166, 6}, {327, 22}}</string> + <string key="NSFrame">{{166, 6}, {415, 22}}</string> <reference key="NSSuperview" ref="1013108064"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="665575636"> @@ -2833,7 +2833,7 @@ <object class="NSButton" id="434675603"> <reference key="NSNextResponder" ref="1013108064"/> <int key="NSvFlags">289</int> - <string key="NSFrame">{{493, 9}, {32, 25}}</string> + <string key="NSFrame">{{586, 9}, {32, 25}}</string> <reference key="NSSuperview" ref="1013108064"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="105847394"> @@ -2857,7 +2857,7 @@ <object class="NSButton" id="429029434"> <reference key="NSNextResponder" ref="1013108064"/> <int key="NSvFlags">289</int> - <string key="NSFrame">{{524, 9}, {125, 25}}</string> + <string key="NSFrame">{{617, 9}, {32, 25}}</string> <reference key="NSSuperview" ref="1013108064"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="843215079"> @@ -17956,9 +17956,9 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <reference ref="231622333"/> <reference ref="33038697"/> <reference ref="924091760"/> - <reference ref="434675603"/> <reference ref="429029434"/> <reference ref="983589239"/> + <reference ref="434675603"/> </object> <reference key="parent" ref="624106058"/> </object> diff --git a/Resources/Images/button_pagination.png b/Resources/Images/button_pagination.png Binary files differindex 89c612df..ed61c791 100644 --- a/Resources/Images/button_pagination.png +++ b/Resources/Images/button_pagination.png diff --git a/Source/TableContent.m b/Source/TableContent.m index 6b82d54b..cd780f5e 100644 --- a/Source/TableContent.m +++ b/Source/TableContent.m @@ -1149,11 +1149,13 @@ if (paginationViewFrame.size.height == paginationViewHeight) return; paginationViewFrame.size.height = paginationViewHeight; [paginationButton setState:NSOnState]; + [paginationButton setImage:[NSImage imageNamed:@"button_action"]]; [tableWindow makeFirstResponder:paginationPageField]; } else { if (paginationViewFrame.size.height == 0) return; paginationViewFrame.size.height = 0; [paginationButton setState:NSOffState]; + [paginationButton setImage:[NSImage imageNamed:@"button_pagination"]]; if ([tableWindow firstResponder] == paginationPageField || ([[tableWindow firstResponder] respondsToSelector:@selector(superview)] && [(id)[tableWindow firstResponder] superview] @@ -1196,19 +1198,6 @@ // As long as a table is selected (which it will be if this is called), enable pagination detail button [paginationButton setEnabled:enabledMode]; - // Update the pagination button text - if ([prefs boolForKey:SPLimitResults]) { - if (maxPage <= 1) { - [paginationButton setTitle:@""]; - } else if (isFiltered) { - [paginationButton setTitle:[NSString stringWithFormat:NSLocalizedString(@"Page %@", @"Filtered pagination button status text"), [numberFormatter stringFromNumber:[NSNumber numberWithUnsignedInteger:contentPage]]]]; - } else { - [paginationButton setTitle:[NSString stringWithFormat:NSLocalizedString(@"Page %@ of %@", @"Pagination button status text"), [numberFormatter stringFromNumber:[NSNumber numberWithUnsignedInteger:contentPage]], [numberFormatter stringFromNumber:[NSNumber numberWithUnsignedInteger:maxPage]]]]; - } - } else { - [paginationButton setTitle:NSLocalizedString(@"Pagination disabled", @"Pagination text shown when LIMIT is off")]; - } - // Set the values and maximums for the text field and associated pager [paginationPageField setStringValue:[numberFormatter stringFromNumber:[NSNumber numberWithUnsignedInteger:contentPage]]]; [[paginationPageField formatter] setMaximum:[NSNumber numberWithUnsignedInteger:maxPage]]; |