From a2f339ecc420468f54cbf55d70f380bbf0d64151 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Tue, 28 Apr 2009 12:38:04 +0000 Subject: =?UTF-8?q?=E2=80=A2=20MySQL=20Help=20improved:=20-=20added=20hist?= =?UTF-8?q?ory:=20go=20back/forward=20-=20window=20now=20has=20auto=20save?= =?UTF-8?q?=20name=20MYSQL=5FHELP=5FWINDOW=20-=20disabled=20contextual=20m?= =?UTF-8?q?enu=20for=20safety=20reasons=20(temporarily)=20-=20some=20minor?= =?UTF-8?q?=20stuff?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Interfaces/English.lproj/DBView.xib | 1255 +++++++++++++++++------------------ Source/CustomQuery.h | 3 +- Source/CustomQuery.m | 59 +- 3 files changed, 662 insertions(+), 655 deletions(-) diff --git a/Interfaces/English.lproj/DBView.xib b/Interfaces/English.lproj/DBView.xib index db0ac688..4af1525d 100644 --- a/Interfaces/English.lproj/DBView.xib +++ b/Interfaces/English.lproj/DBView.xib @@ -8,6 +8,7 @@ 353.00 YES + YES @@ -45,7 +46,7 @@ {3.40282e+38, 3.40282e+38} {780, 480} - + 256 YES @@ -79,7 +80,6 @@ 4352 {212, 393} - YES @@ -176,7 +176,6 @@ {{1, 1}, {212, 393}} - @@ -192,7 +191,6 @@ -2147483392 {{175, 1}, {15, 481}} - _doScroller: 9.979253e-01 @@ -202,7 +200,6 @@ 256 {{-100, -100}, {141, 11}} - 257 _doScroller: @@ -211,7 +208,6 @@ {214, 395} - 530 @@ -234,7 +230,6 @@ 4352 {212, 123} - YES @@ -298,7 +293,6 @@ {{1, 1}, {212, 123}} - @@ -309,7 +303,6 @@ -2147483392 {{175, 1}, {15, 481}} - _doScroller: 9.979253e-01 @@ -319,7 +312,6 @@ 256 {{-100, -100}, {141, 11}} - 257 _doScroller: @@ -328,7 +320,6 @@ {{0, 404}, {214, 125}} - 530 @@ -339,14 +330,12 @@ {{-1, 22}, {214, 529}} - 292 {{0, -1}, {32, 25}} - YES -2080244224 @@ -375,7 +364,6 @@ 292 {{20, 0}, {46, 25}} - YES -2076049856 @@ -473,7 +461,6 @@ {{197, 0}, {15, 23}} - YES 130560 @@ -506,7 +493,6 @@ {{93, 0}, {104, 23}} - YES 130560 @@ -527,7 +513,6 @@ 292 {{61, -1}, {32, 25}} - YES -2080244224 @@ -550,7 +535,6 @@ {212, 550} - NSView @@ -563,7 +547,6 @@ 274 {{-7, -10}, {735, 564}} - YES @@ -2595,7 +2578,6 @@ {688, 14} - @@ -2654,7 +2636,6 @@ {{1, 1}, {688, 155}} - @@ -2669,7 +2650,6 @@ -2147483392 {{598, 1}, {15, 68}} - _doScroller: 1.000000e+00 @@ -2679,7 +2659,6 @@ 256 {{-100, -100}, {601, 11}} - 257 _doScroller: @@ -2689,7 +2668,6 @@ {690, 157} - 530 @@ -2699,7 +2677,6 @@ {690, 156} - NSView @@ -2722,14 +2699,12 @@ 4352 {688, 228} - YES 256 {688, 17} - @@ -2737,7 +2712,6 @@ -2147483392 {{-26, 0}, {16, 17}} - YES @@ -2781,7 +2755,6 @@ {{1, 17}, {688, 228}} - @@ -2792,7 +2765,6 @@ -2147483392 {{611, 17}, {15, 30}} - _doScroller: 9.375000e-01 @@ -2802,7 +2774,6 @@ -2147483392 {{1, 47}, {610, 15}} - 1 _doScroller: @@ -2817,7 +2788,6 @@ {{1, 0}, {688, 17}} - @@ -2827,7 +2797,6 @@ {690, 246} - 562 @@ -2842,7 +2811,6 @@ 268 {{156, 246}, {98, 22}} - YES -2076049856 @@ -2893,7 +2861,6 @@ 264 {{38, 246}, {108, 22}} - YES -2076049856 @@ -2976,7 +2943,6 @@ 268 {{-10, 245}, {46, 25}} - YES -2076049856 @@ -3199,7 +3165,6 @@ 265 {{591, 248}, {90, 17}} - YES -2080244224 @@ -3221,7 +3186,6 @@ 265 {{473, 248}, {110, 17}} - YES 604110336 @@ -3254,7 +3218,6 @@ {{32, 246}, {658, 23}} - YES 130560 @@ -3270,7 +3233,6 @@ {{0, 165}, {690, 269}} - NSView @@ -3283,7 +3245,6 @@ 266 {{242, 64}, {431, 17}} - YES 67239424 @@ -3300,7 +3261,6 @@ 264 {{17, 67}, {143, 14}} - YES 67239424 @@ -3321,7 +3281,6 @@ 274 {{17, 20}, {656, 43}} - YES 67239424 @@ -3336,18 +3295,15 @@ {{0, 443}, {690, 87}} - NSView {{6, 10}, {690, 530}} - {{10, 7}, {700, 544}} - Custom Query @@ -3733,20 +3689,16 @@ {{221, 0}, {723, 550}} - NSView {944, 550} - YES DBViewSplitter {944, 550} - - {{0, 0}, {1440, 878}} {780, 502} @@ -6343,149 +6295,498 @@ {350, 272} {3.40282e+38, 3.40282e+38} - - 1 + + 31 2 - {{512, 379}, {262, 139}} - 1886912512 - indexSheet - NSWindow - - View - + {{196, 201}, {351, 309}} + -201325568 + MySQL Help + NSPanel + {3.40282e+38, 3.40282e+38} - {213, 107} - - - 256 + {351, 120} + + + 274 YES - - - 256 - {{17, 98}, {128, 22}} - - YES - - -2076049856 - 132096 - - - -2038284033 - 1 - - - - - - 400 - 75 - - - PRIMARY KEY - - 1048576 - 2147483647 - 1 - - - _popUpItemAction: - + + + 274 + + YES + + YES + Apple HTML pasteboard type + Apple PICT pasteboard type + Apple URL pasteboard type + Apple Web Archive pasteboard type + NSColor pasteboard type + NSFilenamesPboardType + NSStringPboardType + NeXT RTFD pasteboard type + NeXT Rich Text Format v1.0 pasteboard type + NeXT TIFF v4.0 pasteboard type + WebURLsWithTitlesPboardType + public.png + public.url + public.url-name - YES - - - OtherViews + + {351, 273} + + + + + + + + YES + + YES + WebKitDefaultFixedFontSize + WebKitDefaultFontSize + WebKitMinimumFontSize - + YES - - - - INDEX - - 1048576 - 2147483647 - - - _popUpItemAction: - - - - - UNIQUE - - 1048576 - 2147483647 - - - _popUpItemAction: - - - - - FULLTEXT - - 1048576 - 2147483647 - - - _popUpItemAction: - - + + + - 3 - YES - YES - 1 + YES + YES - - - 256 - {{20, 76}, {122, 19}} - + + + 266 + {{243, 282}, {98, 19}} + YES - - -1267597759 - 4326400 - PRIMARY + + 341966400 + 268568576 + - + search term + YES + 1 - + + + 130560 + 0 + search + _searchFieldSearch: + + + 138690815 + 0 + + 400 + 75 + + + 130560 + 0 + clear + + YES + + YES + + YES + AXDescription + NSAccessibilityEncodedAttributesValueType + + + YES + cancel + + + + + _searchFieldCancel: + + + 138690815 + 0 + + 400 + 75 + + 255 + YES - - - 256 - {{147, 77}, {58, 14}} - + + + 292 + {{81, -83}, {77, 32}} + YES - + 67239424 - 4194304 - Key Name - - - - + 134217728 + larger + + + -2038284033 + 268435585 + + + + 200 + 25 - - - 256 - {{147, 103}, {53, 14}} - + + + 292 + {{150, -83}, {86, 32}} + YES - + 67239424 - 4194304 - Key Type - - + 134217728 + smaller + + + -2038284033 + 268435585 + + - + 200 + 25 + + + + + 268 + {{12, 282}, {100, 19}} + + YES + + 67239424 + 131072 + + + + YES + + 3.200000e+01 + + NSImage + NSLeftFacingTriangleTemplate + + Go Back + 0 + + + 3.200000e+01 + + NSImage + NSListViewTemplate + + + MySQL Table of Content + 1 + 0 + + + 3.200000e+01 + + NSImage + NSRightFacingTriangleTemplate + + + Go Forward + 0 + + + 1 + 2 + 2 + + + + + 268 + {{193, 283}, {43, 17}} + + YES + + -2080244224 + 134479872 + MySQL + + LucidaGrande + 9.000000e+00 + 3614 + + + -930856705 + 402653357 + + m + 400 + 75 + + + + + 268 + {{158, 283}, {35, 17}} + + YES + + 67239424 + 134479872 + Page + + + -930856705 + 402653357 + + p + 400 + 75 + + + + + 268 + {{115, 283}, {43, 17}} + + YES + + 67239424 + 134479872 + Online + + + -930856705 + 402653357 + + o + 400 + 75 + + + + + 292 + {{157, -40}, {132, 32}} + + YES + + 67239424 + 134217728 + focusToSearch + + + -2038284033 + 268435585 + + f + 200 + 25 + + + + + 292 + {{71, -40}, {97, 32}} + + YES + + 67239424 + 134217728 + FindNext + + + -2038284033 + 268435585 + + g + 200 + 25 + + + + + 292 + {{72, -62}, {96, 32}} + + YES + + 67239424 + 134217728 + FindPrev + + + -2038284033 + 268435585 + + G + 200 + 25 + + + + {351, 309} + + + {{0, 0}, {1280, 1002}} + {351, 136} + {3.40282e+38, 3.40282e+38} + MYSQL_HELP_WINDOW + + + 1 + 2 + {{512, 379}, {262, 139}} + 1886912512 + indexSheet + NSWindow + + View + + {3.40282e+38, 3.40282e+38} + {213, 107} + + + 256 + + YES + + + 256 + {{17, 98}, {128, 22}} + + YES + + -2076049856 + 132096 + + + -2038284033 + 1 + + + + + + 400 + 75 + + + PRIMARY KEY + + 1048576 + 2147483647 + 1 + + + _popUpItemAction: + + + YES + + + OtherViews + + + YES + + + + INDEX + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + UNIQUE + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + FULLTEXT + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + 3 + YES + YES + 1 + + + + + 256 + {{20, 76}, {122, 19}} + + YES + + -1267597759 + 4326400 + PRIMARY + + + YES + + + + + + + 256 + {{147, 77}, {58, 14}} + + YES + + 67239424 + 4194304 + Key Name + + + + + + + + + 256 + {{147, 103}, {53, 14}} + + YES + + 67239424 + 4194304 + Key Type + + @@ -7671,101 +7972,9 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 _popUpItemAction: - - - US ASCII (ascii) - - 1048576 - 2147483647 - - - _popUpItemAction: - - - - - ISO Latin 1 (latin1) - - 1048576 - 2147483647 - - - _popUpItemAction: - - - - - Mac Roman (macroman) - - 1048576 - 2147483647 - - - _popUpItemAction: - - - - - YES - YES - - - 1048576 - 2147483647 - - - _popUpItemAction: - - - - - Windows Latin 2 (cp1250) - - 1048576 - 2147483647 - - - _popUpItemAction: - - - - - ISO Latin 2 (latin2) - - 1048576 - 2147483647 - - - _popUpItemAction: - - - - - YES - YES - - - 1048576 - 2147483647 - - - _popUpItemAction: - - - - - Windows Arabic (cp1256) - - 1048576 - 2147483647 - - - _popUpItemAction: - - - + - ISO Greek (greek) + US ASCII (ascii) 1048576 2147483647 @@ -7774,9 +7983,9 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 _popUpItemAction: - + - ISO Hebrew (hebrew) + ISO Latin 1 (latin1) 1048576 2147483647 @@ -7785,9 +7994,9 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 _popUpItemAction: - + - ISO Turkish (latin5) + Mac Roman (macroman) 1048576 2147483647 @@ -7796,7 +8005,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 _popUpItemAction: - + YES YES @@ -7809,9 +8018,9 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 _popUpItemAction: - + - Windows Baltic (cp1257) + Windows Latin 2 (cp1250) 1048576 2147483647 @@ -7820,11 +8029,9 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 _popUpItemAction: - + - YES - YES - + ISO Latin 2 (latin2) 1048576 2147483647 @@ -7833,9 +8040,11 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 _popUpItemAction: - + - Windows Cyrillic (cp1251) + YES + YES + 1048576 2147483647 @@ -7844,11 +8053,9 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 _popUpItemAction: - + - YES - YES - + Windows Arabic (cp1256) 1048576 2147483647 @@ -7857,9 +8064,9 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 _popUpItemAction: - + - Big5 Traditional Chinese (big5) + ISO Greek (greek) 1048576 2147483647 @@ -7868,9 +8075,9 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 _popUpItemAction: - + - Shift-JIS Japanese (sjis) + ISO Hebrew (hebrew) 1048576 2147483647 @@ -7879,9 +8086,9 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 _popUpItemAction: - + - EUC-JP Japanese (ujis) + ISO Turkish (latin5) 1048576 2147483647 @@ -7890,378 +8097,124 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 _popUpItemAction: - + - EUC-KR Korean (euckr) + YES + YES + + 1048576 2147483647 _popUpItemAction: - - - - - 3 - YES - YES - 1 - - - - {269, 112} - - {{0, 0}, {1680, 1028}} - {269, 134} - {292, 134} - - - 31 - 2 - {{196, 201}, {351, 309}} - -201325568 - MySQL Help - NSPanel - - {3.40282e+38, 3.40282e+38} - {351, 120} - - - 274 - - YES - - - 274 - - YES - - YES - Apple HTML pasteboard type - Apple PICT pasteboard type - Apple URL pasteboard type - Apple Web Archive pasteboard type - NSColor pasteboard type - NSFilenamesPboardType - NSStringPboardType - NeXT RTFD pasteboard type - NeXT Rich Text Format v1.0 pasteboard type - NeXT TIFF v4.0 pasteboard type - WebURLsWithTitlesPboardType - public.png - public.url - public.url-name - - - {351, 273} - - - - - - - YES - - YES - WebKitDefaultFixedFontSize - WebKitDefaultFontSize - WebKitMinimumFontSize - - - YES - - - - - - - YES - YES - - - - 266 - {{243, 282}, {98, 19}} - - YES - - 341966400 - 268568576 - - - search term - - YES - 1 - - - - 130560 - 0 - search - _searchFieldSearch: - - - 138690815 - 0 - - 400 - 75 - - - 130560 - 0 - clear - - YES - - YES - - YES - AXDescription - NSAccessibilityEncodedAttributesValueType - - - YES - cancel - - - - - _searchFieldCancel: - - - 138690815 - 0 - - 400 - 75 - - 255 - YES - - - - - 292 - {{81, -83}, {77, 32}} - - YES - - 67239424 - 134217728 - larger - - - -2038284033 - 268435585 - - + - 200 - 25 - - - - - 292 - {{150, -83}, {86, 32}} - - YES - - 67239424 - 134217728 - smaller - - - -2038284033 - 268435585 - - - - 200 - 25 - - - - - 268 - {{12, 282}, {100, 19}} - - YES - - 67239424 - 131072 - - - - YES - - 3.200000e+01 - - NSImage - NSLeftFacingTriangleTemplate + - Go Back - YES - 0 - - - 3.200000e+01 - - NSImage - NSListViewTemplate + + + Windows Baltic (cp1257) + + 1048576 + 2147483647 + + + _popUpItemAction: + - - MySQL Table of Content - 1 - 0 - - - 3.200000e+01 - - NSImage - NSRightFacingTriangleTemplate + + + YES + YES + + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + Windows Cyrillic (cp1251) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + YES + YES + + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + Big5 Traditional Chinese (big5) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + Shift-JIS Japanese (sjis) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + EUC-JP Japanese (ujis) + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + EUC-KR Korean (euckr) + + 2147483647 + + + _popUpItemAction: + - - Go Forward - YES - 0 - 1 - 2 - 2 - - - - - 268 - {{193, 283}, {43, 17}} - - YES - - -2080244224 - 134479872 - MySQL - - LucidaGrande - 9.000000e+00 - 3614 - - - -930856705 - 402653357 - - m - 400 - 75 - - - - - 268 - {{158, 283}, {35, 17}} - - YES - - 67239424 - 134479872 - Page - - - -930856705 - 402653357 - - p - 400 - 75 - - - - - 268 - {{115, 283}, {43, 17}} - - YES - - 67239424 - 134479872 - Online - - - -930856705 - 402653357 - - o - 400 - 75 - - - - - 292 - {{157, -40}, {132, 32}} - - YES - - 67239424 - 134217728 - focusToSearch - - - -2038284033 - 268435585 - - f - 200 - 25 - - - - - 292 - {{71, -40}, {97, 32}} - - YES - - 67239424 - 134217728 - FindNext - - - -2038284033 - 268435585 - - g - 200 - 25 - - - - - 292 - {{72, -62}, {96, 32}} - - YES - - 67239424 - 134217728 - FindPrev - - - -2038284033 - 268435585 - - G - 200 - 25 + 3 + YES + YES + 1 - {351, 309} + {269, 112} - {{0, 0}, {1280, 1002}} - {351, 136} - {3.40282e+38, 3.40282e+38} + {{0, 0}, {1680, 1028}} + {269, 134} + {292, 134} @@ -13291,6 +13244,14 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 5506 + + + UIDelegate + + + + 5508 + @@ -21537,8 +21498,8 @@ aGUgYWN0aXZlIHNlbGVjdGlvbiAo4oyl4oyYUik com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{547, 454}, {351, 309}} - {{547, 454}, {351, 309}} + {{792, 192}, {351, 309}} + {{792, 192}, {351, 309}} {351, 120} @@ -21859,7 +21820,7 @@ Y2hhbmdlIHRoZSBvcmRlcg - 5507 + 5508 diff --git a/Source/CustomQuery.h b/Source/CustomQuery.h index 66c5e965..3e3b51ea 100644 --- a/Source/CustomQuery.h +++ b/Source/CustomQuery.h @@ -80,6 +80,7 @@ int queryStartPosition; int helpTarget; + WebHistory *helpHistory; } @@ -116,7 +117,7 @@ - (NSArray *)currentResult; // MySQL Help -- (void)showHelpFor:(NSString *)aString; +- (void)showHelpFor:(NSString *)aString setHistory:(BOOL)setHistory; - (NSString *)getHTMLHelpFor:(NSString *)aString; - (void)helpTargetValidation; diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m index b7de8b76..b3602941 100644 --- a/Source/CustomQuery.m +++ b/Source/CustomQuery.m @@ -1366,7 +1366,7 @@ traps enter key and /* * Retrieve and show the data for "HELP 'aString'". */ -- (void)showHelpFor:(NSString *)aString +- (void)showHelpFor:(NSString *)aString setHistory:(BOOL)setHistory { NSString * helpString = [self getHTMLHelpFor:aString]; // Order out the Help window if not visible @@ -1384,8 +1384,18 @@ traps enter key and } else { mySQLversion = [[NSString stringWithString:version] retain]; } - + // init Help view [helpWebViewWindow setTitle:[NSString stringWithFormat:@"%@ (%@ %@)", NSLocalizedString(@"MySQL Help", @"mysql help"), NSLocalizedString(@"version", @"version"), [mySQLversion substringToIndex:3]]]; + [helpWebView setMaintainsBackForwardList:YES]; + [[helpWebView backForwardList] setCapacity:20]; + if([[helpWebView backForwardList] backListCount] < 1) + { + [helpNavigator setEnabled:NO forSegment:0]; + [helpNavigator setEnabled:NO forSegment:2]; + } else { + [helpNavigator setEnabled:[[helpWebView backForwardList] backListCount] forSegment:0]; + [helpNavigator setEnabled:[[helpWebView backForwardList] forwardListCount] forSegment:2]; + } [helpWebViewWindow orderFront:helpWebView]; helpTarget = 2; // set default to search in MySQL help [self helpTargetValidation]; @@ -1393,6 +1403,14 @@ traps enter key and if(![helpString length]) return; + if(setHistory) + { + WebHistoryItem *aWebHistoryItem = [[WebHistoryItem alloc] initWithURLString:[NSString stringWithFormat:@"applewebdata://%@", aString] title:aString lastVisitedTimeInterval:[[NSDate date] timeIntervalSinceDate:[NSDate distantFuture]]]; + [[helpWebView backForwardList] addItem:aWebHistoryItem]; + } + [helpNavigator setEnabled:[[helpWebView backForwardList] backListCount] forSegment:0]; + [helpNavigator setEnabled:[[helpWebView backForwardList] forwardListCount] forSegment:2]; + [[helpWebView mainFrame] loadHTMLString:helpString baseURL:nil]; @@ -1413,6 +1431,8 @@ traps enter key and break; case 1: // online // Open MySQL Documentation search in browser + if(![searchTerm length]) + break; [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString: [[NSString stringWithFormat: MYSQL_DEV_SEARCH_URL, @@ -1427,7 +1447,7 @@ traps enter key and // stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]]]]; break; case 2: // MySQL - [self showHelpFor:searchTerm]; + [self showHelpFor:searchTerm setHistory:YES]; break; } } @@ -1439,7 +1459,7 @@ traps enter key and { NSString *aString = [[textView string] substringWithRange:[textView getRangeForCurrentWord]]; // if(![aString length]) return; - [self showHelpFor:aString]; + [self showHelpFor:aString setHistory:YES]; } /* @@ -1464,10 +1484,25 @@ traps enter key and { switch([helpNavigator selectedSegment]) { + case 0: + if([[helpWebView backForwardList] backListCount]) { + [self showHelpFor:[[[[helpWebView backForwardList] backItem] URLString] lastPathComponent] setHistory:NO]; + [[helpWebView backForwardList] goBack]; + } + break; case 1: // TOC - [self showHelpFor:@"contents"]; - break; + [self showHelpFor:@"contents" setHistory:YES]; + break; + case 2: + if([[helpWebView backForwardList] forwardListCount]) { + [self showHelpFor:[[[[helpWebView backForwardList] forwardItem] URLString] lastPathComponent] setHistory:NO]; + [[helpWebView backForwardList] goForward]; + } + break; } + [helpNavigator setEnabled:[[helpWebView backForwardList] backListCount] forSegment:0]; + [helpNavigator setEnabled:[[helpWebView backForwardList] forwardListCount] forSegment:2]; + } /* @@ -1673,8 +1708,11 @@ traps enter key and { int navigationType = [[actionInformation objectForKey:WebActionNavigationTypeKey] intValue]; if([[[request URL] scheme] isEqualToString:@"applewebdata"]){ - [self showHelpFor:[[[request URL] path] substringWithRange:NSMakeRange(1,[[[request URL] path] length]-1)]]; + [self showHelpFor:[[[request URL] path] substringWithRange:NSMakeRange(1,[[[request URL] path] length]-1)] setHistory:YES]; [listener ignore]; + // WebHistoryItem *aWebHistoryItem = [[WebHistoryItem alloc] initWithURLString:[[request URL] absoluteString] title:[[request URL] path] lastVisitedTimeInterval:[[NSDate date] timeIntervalSinceDate:[NSDate distantFuture]]]; + // [[helpWebView backForwardList] addItem:aWebHistoryItem]; + } else { if (navigationType == WebNavigationTypeOther) { [listener use]; @@ -1689,6 +1727,13 @@ traps enter key and } } +/* + * Up to now no contextual menu in helpWebView + */ +- (NSArray *)webView:(WebView *)sender contextMenuItemsForElement:(NSDictionary *)element defaultMenuItems:(NSArray *)defaultMenuItems +{ + return nil; +} #pragma mark - -- cgit v1.2.3