aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableContent.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-12-15 14:40:34 +0000
committerrowanbeentje <rowan@beent.je>2009-12-15 14:40:34 +0000
commite895f8dcba0784e2fee9ba855ee0de12e8deaefb (patch)
treea2c48d73e0459e3b300be8e2b42edd5eed03296e /Source/TableContent.m
parentb923ed2a9a4816ce9b7faf981950b4385023418a (diff)
downloadsequelpro-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
Diffstat (limited to 'Source/TableContent.m')
-rw-r--r--Source/TableContent.m15
1 files changed, 2 insertions, 13 deletions
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]];