From e895f8dcba0784e2fee9ba855ee0de12e8deaefb Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Tue, 15 Dec 2009 14:40:34 +0000 Subject: - 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 --- Interfaces/English.lproj/DBView.xib | 8 ++++---- Resources/Images/button_pagination.png | Bin 311 -> 717 bytes 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 @@ 290 - {{166, 6}, {327, 22}} + {{166, 6}, {415, 22}} YES @@ -2833,7 +2833,7 @@ 289 - {{493, 9}, {32, 25}} + {{586, 9}, {32, 25}} YES @@ -2857,7 +2857,7 @@ 289 - {{524, 9}, {125, 25}} + {{617, 9}, {32, 25}} YES @@ -17956,9 +17956,9 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 - + diff --git a/Resources/Images/button_pagination.png b/Resources/Images/button_pagination.png index 89c612df..ed61c791 100644 Binary files a/Resources/Images/button_pagination.png and b/Resources/Images/button_pagination.png differ 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]]; -- cgit v1.2.3