From bb9586f8708f60d5f1b8cf753402453bb9d009e4 Mon Sep 17 00:00:00 2001 From: Antony Male Date: Mon, 20 Apr 2015 10:03:48 +0100 Subject: [PATCH 01/23] Fix typos on v1.0.15 changelog --- CHANGELOG.txt | 6 +++--- server/version_check.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index d59b8bd7..71d90692 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,9 +5,9 @@ v1.0.15 ------- - Fix crash on startup if Syncthing is slow to start (#55) - - Remember window size-position (#51) - - Zoom built-in borwser (#52) - - Add support for aribtrary environmental variables for Syncthing + - Remember window size/position (#51) + - Zoom built-in browser (#52) + - Add support for arbitrary environmental variables for Syncthing v1.0.14 ------- diff --git a/server/version_check.php b/server/version_check.php index 3c433519..56693919 100644 --- a/server/version_check.php +++ b/server/version_check.php @@ -73,7 +73,7 @@ function get_with_wildcard($src, $value, $default = null) ], ], 'release_page_url' => 'https://github.com/canton7/SyncTrayzor/releases/tag/v1.0.15', - 'release_notes' => "- Fix crash on startup if Syncthing is slow to start (#55)\n- Remember window size-position (#51)\n- Zoom built-in borwser (#52)\n- Add support for aribtrary environmental variables for Syncthing\n", + 'release_notes' => "- Fix crash on startup if Syncthing is slow to start (#55)\n- Remember window size/position (#51)\n- Zoom built-in browser (#52)\n- Add support for arbitrary environmental variables for Syncthing\n", ], '1.0.14' => [ 'installed' => [ From fcb74bde5e882adb066d7c13978f2d38b0b5c58b Mon Sep 17 00:00:00 2001 From: Antony Male Date: Mon, 20 Apr 2015 11:46:05 +0100 Subject: [PATCH 02/23] Update to CefSharp 39 --- src/SyncTrayzor/Pages/ViewerViewModel.cs | 10 +++++----- src/SyncTrayzor/SyncTrayzor.csproj | 22 +++++++++++----------- src/SyncTrayzor/packages.config | 8 ++++---- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/SyncTrayzor/Pages/ViewerViewModel.cs b/src/SyncTrayzor/Pages/ViewerViewModel.cs index 4d0aac60..b1b55dcf 100644 --- a/src/SyncTrayzor/Pages/ViewerViewModel.cs +++ b/src/SyncTrayzor/Pages/ViewerViewModel.cs @@ -173,17 +173,17 @@ bool IRequestHandler.GetAuthCredentials(IWebBrowser browser, bool isProxy, strin return false; } - bool IRequestHandler.OnBeforeBrowse(IWebBrowser browser, IRequest request, bool isRedirect) + bool IRequestHandler.OnBeforeBrowse(IWebBrowser browser, IRequest request, bool isRedirect, bool isMainFrame) { return false; } - bool IRequestHandler.OnBeforePluginLoad(IWebBrowser browser, string url, string policyUrl, IWebPluginInfo info) + bool IRequestHandler.OnBeforePluginLoad(IWebBrowser browser, string url, string policyUrl, WebPluginInfo info) { return false; } - bool IRequestHandler.OnBeforeResourceLoad(IWebBrowser browser, IRequest request, IResponse response) + bool IRequestHandler.OnBeforeResourceLoad(IWebBrowser browser, IRequest request, bool isMainFrame) { var uri = new Uri(request.Url); if ((uri.Scheme == "http" || uri.Scheme == "https") && uri.Host != this.syncThingManager.Address.NormalizeZeroHost().Host) @@ -224,9 +224,9 @@ void ILifeSpanHandler.OnBeforeClose(IWebBrowser browser) { } - bool ILifeSpanHandler.OnBeforePopup(IWebBrowser browser, string url, ref int x, ref int y, ref int width, ref int height) + bool ILifeSpanHandler.OnBeforePopup(IWebBrowser browser, string sourceUrl, string targetUrl, ref int x, ref int y, ref int width, ref int height) { - this.processStartProvider.StartDetached(url); + this.processStartProvider.StartDetached(targetUrl); return true; } diff --git a/src/SyncTrayzor/SyncTrayzor.csproj b/src/SyncTrayzor/SyncTrayzor.csproj index 2a9d8148..3cb12f8b 100644 --- a/src/SyncTrayzor/SyncTrayzor.csproj +++ b/src/SyncTrayzor/SyncTrayzor.csproj @@ -1,7 +1,7 @@  - - + + Debug @@ -15,7 +15,7 @@ 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 4 - 332867c0 + b679e5f7 publish\ true Disk @@ -459,16 +459,13 @@ - - - - - + + + + + - - - @@ -479,4 +476,7 @@ + + + \ No newline at end of file diff --git a/src/SyncTrayzor/packages.config b/src/SyncTrayzor/packages.config index 9dde970c..39070f8c 100644 --- a/src/SyncTrayzor/packages.config +++ b/src/SyncTrayzor/packages.config @@ -1,9 +1,9 @@  - - - - + + + + From f2c763f8158112cea979107bf498b6e18f5c0185 Mon Sep 17 00:00:00 2001 From: Antony Male Date: Mon, 20 Apr 2015 11:47:05 +0100 Subject: [PATCH 03/23] Work around issue where CefSharp ignores ZoomLevel if set too early Fixes #57 --- src/SyncTrayzor/Pages/ViewerViewModel.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/SyncTrayzor/Pages/ViewerViewModel.cs b/src/SyncTrayzor/Pages/ViewerViewModel.cs index b1b55dcf..c54a4b38 100644 --- a/src/SyncTrayzor/Pages/ViewerViewModel.cs +++ b/src/SyncTrayzor/Pages/ViewerViewModel.cs @@ -90,10 +90,18 @@ private void InitializeBrowser(IWpfWebBrowser webBrowser) webBrowser.RequestHandler = this; webBrowser.LifeSpanHandler = this; webBrowser.RegisterJsObject("callbackObject", this.callback); + webBrowser.FrameLoadEnd += (o, e) => { if (e.IsMainFrame && e.Url != "about:blank") { + Execute.OnUIThread(() => + { + // See https://github.com/cefsharp/CefSharp/issues/738#issuecomment-91099199 + // ... Except that FrameLoadStart doesn't appear to work for me. FrameLoadEnd does though + webBrowser.ZoomLevel = this.configurationProvider.Load().SyncthingWebBrowserZoomLevel; + }); + var script = @"$('#folders .panel-footer .pull-right').prepend(" + @"'