From a0692078a97a2ff67065fd7a40c9d8490ed45ee0 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Sun, 2 Aug 2009 15:52:31 +0000 Subject: =?UTF-8?q?=E2=80=A2=20button=20tooltip=20for=20"Show=20/=20Hide?= =?UTF-8?q?=20Table=20Information"=20toggles=20according=20to=20its=20stat?= =?UTF-8?q?us=20=E2=80=A2=20after=20editing=20a=20field=20in=20Custom=20Qu?= =?UTF-8?q?ery=20table=20scroll=20to=20last=20selected=20row=20after=20dat?= =?UTF-8?q?a=20refreshing=20-=20(TODO:=20should=20be=20improved=20in=20nea?= =?UTF-8?q?r=20future)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/CustomQuery.m | 5 +++++ Source/TablesList.m | 4 ++++ 2 files changed, 9 insertions(+) (limited to 'Source') diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m index d22d4cce..7616fb5d 100644 --- a/Source/CustomQuery.m +++ b/Source/CustomQuery.m @@ -710,7 +710,12 @@ [[customQueryView tableColumnWithIdentifier:[NSNumber numberWithInt:[theColumns count]-1]] setWidth:[[customQueryView tableColumnWithIdentifier:[NSNumber numberWithInt:0]] width]]; + } else { + // scroll to last edited row after refreshing data + // TODO: should be improved + [customQueryView scrollRowToVisible:[customQueryView selectedRow]]; } + [customQueryView reloadData]; // Init copyTable with necessary information for copying selected rows as SQL INSERT diff --git a/Source/TablesList.m b/Source/TablesList.m index 7986ab3e..19bafc78 100644 --- a/Source/TablesList.m +++ b/Source/TablesList.m @@ -804,6 +804,7 @@ { [tableListSplitView toggleCollapse:sender]; [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithBool:([tableInfoCollapseButton state] == NSOffState)] forKey:@"TableInformationPanelCollapsed"]; + [tableInfoCollapseButton setToolTip:([tableInfoCollapseButton state] == NSOffState) ? NSLocalizedString(@"Show Table Information", @"Show Table Information") : NSLocalizedString(@"Hide Table Information", @"Hide Table Information")]; } #pragma mark - @@ -1987,9 +1988,12 @@ if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"TableInformationPanelCollapsed"] boolValue] && [tableListSplitView collapsibleSubview]) { [tableInfoCollapseButton setNextState]; + [tableInfoCollapseButton setToolTip:NSLocalizedString(@"Show Table Information",@"Show Table Information")]; [tableListSplitView setValue:[NSNumber numberWithFloat:[tableListSplitView collapsibleSubview].frame.size.height] forKey:@"uncollapsedSize"]; [[tableListSplitView collapsibleSubview] setFrameSize:NSMakeSize([tableListSplitView collapsibleSubview].frame.size.width, 0)]; [tableListSplitView setCollapsibleSubviewCollapsed:YES]; + } else { + [tableInfoCollapseButton setToolTip:NSLocalizedString(@"Hide Table Information",@"Hide Table Information")]; } // Start the table filter list collapsed -- cgit v1.2.3