diff --git a/README.md b/README.md index 86c4d525..aed2c297 100644 --- a/README.md +++ b/README.md @@ -29,17 +29,17 @@ If you find a bug, [help squash it](https://github.com/phw198/OutlookGoogleCalen      ![](https://img.shields.io/github/downloads/phw198/outlookgooglecalendarsync/v2.8.0-beta/OutlookGoogleCalendarSync-2.8.0-beta-full.nupkg.svg)      ![](https://img.shields.io/github/downloads/phw198/outlookgooglecalendarsync/v2.8.0-beta/OutlookGoogleCalendarSync-2.8.0-beta-delta.nupkg.svg) -### Latest Alpha Release: [![Latest Release](https://img.shields.io/github/release/phw198/OutlookGoogleCalendarSync/all.svg)](https://github.com/phw198/OutlookGoogleCalendarSync/releases/tag/v2.8.5-alpha) [![Latest Release downloads](https://img.shields.io/github/downloads/phw198/outlookgooglecalendarsync/v2.8.5-alpha/total.svg)](https://github.com/phw198/OutlookGoogleCalendarSync/releases/v2.8.5-alpha) +### Latest Alpha Release: [![Latest Release](https://img.shields.io/github/release/phw198/OutlookGoogleCalendarSync/all.svg)](https://github.com/phw198/OutlookGoogleCalendarSync/releases/tag/v2.8.6-alpha) [![Latest Release downloads](https://img.shields.io/github/downloads/phw198/outlookgooglecalendarsync/v2.8.6-alpha/total.svg)](https://github.com/phw198/OutlookGoogleCalendarSync/releases/v2.8.6-alpha) -:floppy_disk: [Installer](https://github.com/phw198/OutlookGoogleCalendarSync/releases/download/v2.8.5-alpha/Setup.exe) -      [![](https://img.shields.io/github/downloads/phw198/outlookgooglecalendarsync/v2.8.5-alpha/Setup.exe.svg)](https://github.com/phw198/OutlookGoogleCalendarSync/releases/download/v2.8.5-alpha/Setup.exe) +:floppy_disk: [Installer](https://github.com/phw198/OutlookGoogleCalendarSync/releases/download/v2.8.6-alpha/Setup.exe) +      [![](https://img.shields.io/github/downloads/phw198/outlookgooglecalendarsync/v2.8.6-alpha/Setup.exe.svg)](https://github.com/phw198/OutlookGoogleCalendarSync/releases/download/v2.8.6-alpha/Setup.exe) -:package: [Portable ZIP](https://github.com/phw198/OutlookGoogleCalendarSync/releases/download/v2.8.5-alpha/Portable_OGCS_v2.8.5.zip) -      [![](https://img.shields.io/github/downloads/phw198/outlookgooglecalendarsync/v2.8.5-alpha/Portable_OGCS_v2.8.5.zip.svg)](https://github.com/phw198/OutlookGoogleCalendarSync/releases/download/v2.8.5-alpha/Portable_OGCS_v2.8.5.zip) +:package: [Portable ZIP](https://github.com/phw198/OutlookGoogleCalendarSync/releases/download/v2.8.6-alpha/Portable_OGCS_v2.8.6.zip) +      [![](https://img.shields.io/github/downloads/phw198/outlookgooglecalendarsync/v2.8.6-alpha/Portable_OGCS_v2.8.6.zip.svg)](https://github.com/phw198/OutlookGoogleCalendarSync/releases/download/v2.8.6-alpha/Portable_OGCS_v2.8.6.zip) :information_source: Upgrades to this release -      ![](https://img.shields.io/github/downloads/phw198/outlookgooglecalendarsync/v2.8.5-alpha/OutlookGoogleCalendarSync-2.8.5-alpha-full.nupkg.svg) -      ![](https://img.shields.io/github/downloads/phw198/outlookgooglecalendarsync/v2.8.5-alpha/OutlookGoogleCalendarSync-2.8.5-alpha-delta.nupkg.svg) +      ![](https://img.shields.io/github/downloads/phw198/outlookgooglecalendarsync/v2.8.6-alpha/OutlookGoogleCalendarSync-2.8.6-alpha-full.nupkg.svg) +      ![](https://img.shields.io/github/downloads/phw198/outlookgooglecalendarsync/v2.8.6-alpha/OutlookGoogleCalendarSync-2.8.6-alpha-delta.nupkg.svg) ## Functionality - Supports all versions of Outlook from 2003 to 2019 64-bit! diff --git a/docs/Release Notes.md b/docs/Release Notes.md index dfd712d7..96c60bcb 100644 --- a/docs/Release Notes.md +++ b/docs/Release Notes.md @@ -1,6 +1,25 @@ | Release Notes | |:---| +# v2.8.6.0 - Alpha + +**Enhancements** +- Optionally exclude declined Google invitiations from sync +- Additional colour sync setting to only sync single category to Outlook +- Don't set Outlook category to default Google calendar colour (unless mapped) +- Retrieve all Google calendars, not just first 30 + +**Bugfix** +- Outlook 2003: Retain recurring items starting before, but spanning sync date range +- Cater for nothing being returned when getting Google item recurrences +- Handle Google error code 410 [Gone] +- Correctly delay next sync when quota exhausted +- Google calendar colours in dropdown may be offset incorrectly by 1 +- Handle failure to get email address from Exchange meeting attendee +- Fixed regression of network failure preventing future automated sync +- Telemetry popup box every time OGCS starts in system tray +- Default Google reminder errors if only email notification set on event + # v2.8.5.0 - Alpha **Enhancements** diff --git a/docs/latest_zip_release.md b/docs/latest_zip_release.md index ec4e7f2f..a66d019b 100644 --- a/docs/latest_zip_release.md +++ b/docs/latest_zip_release.md @@ -1,3 +1,3 @@ # Latest ZIP Release -**Alpha**: [v2.8.5.0](https://github.com/phw198/OutlookGoogleCalendarSync/releases/tag/v2.8.5-alpha) +**Alpha**: [v2.8.6.0](https://github.com/phw198/OutlookGoogleCalendarSync/releases/tag/v2.8.6-alpha) **Beta**: [v2.8.0.0](https://github.com/phw198/OutlookGoogleCalendarSync/releases/latest) diff --git a/nuget-build.bat b/nuget-build.bat index 984925b3..3c015f45 100644 --- a/nuget-build.bat +++ b/nuget-build.bat @@ -1,4 +1,4 @@ -set RELEASE=2.8.5-alpha +set RELEASE=2.8.6-alpha cd src del Releases\OutlookGoogleCalendarSync-%RELEASE%-full.nupkg @@ -11,7 +11,7 @@ REM src\packages\squirrel.windows.1.9.0\tools\signtool.exe sign /n "Open Source REM In VS Package Manager REM PM> Install-Package squirrel.windows -Version 1.9.0 -REM PM> packages\squirrel.windows.1.9.0\tools\Squirrel --releasify OutlookGoogleCalendarSync.2.8.5-alpha.nupkg --no-msi --loadingGif=..\docs\images\ogcs128x128-animated.gif +REM PM> packages\squirrel.windows.1.9.0\tools\Squirrel --releasify OutlookGoogleCalendarSync.2.8.6-alpha.nupkg --no-msi --loadingGif=..\docs\images\ogcs128x128-animated.gif REM Sign the Squirrel install executable REM src\packages\squirrel.windows.1.9.0\tools\signtool.exe sign /n "Open Source Developer, Paul Woolcock" /tr http://time.certum.pl/ /td sha256 /fd sha256 /v src\Releases\Setup.exe @@ -19,14 +19,14 @@ REM src\packages\squirrel.windows.1.9.0\tools\signtool.exe sign /n "Open Source REM Build ZIP PAUSE cd src\OutlookGoogleCalendarSync\bin\Release -"c:\Program Files\7-Zip\7z.exe" u Portable_OGCS_v2.8.4.zip -u- -up0q0r2x2y2z1w2!Portable_OGCS_v2.8.5.zip *.dll *.ps1 ErrorReportingTemplate.json logger.xml tzdb.nzd OutlookGoogleCalendarSync.exe OutlookGoogleCalendarSync.exe.config OutlookGoogleCalendarSync.pdb Console\* +"c:\Program Files\7-Zip\7z.exe" u Portable_OGCS_v2.8.5.zip -u- -up0q0r2x2y2z1w2!Portable_OGCS_v2.8.6.zip *.dll *.ps1 ErrorReportingTemplate.json logger.xml tzdb.nzd OutlookGoogleCalendarSync.exe OutlookGoogleCalendarSync.exe.config OutlookGoogleCalendarSync.pdb Console\* -"c:\Program Files\7-Zip\7z.exe" e Portable_OGCS_v2.8.4.zip Microsoft.Office.Interop.Outlook.DLL -"c:\Program Files\7-Zip\7z.exe" e Portable_OGCS_v2.8.4.zip stdole.dll -"c:\Program Files\7-Zip\7z.exe" e Portable_OGCS_v2.8.4.zip "Windows Defender SmartScreen Unblock.ps1" +"c:\Program Files\7-Zip\7z.exe" e -y Portable_OGCS_v2.8.5.zip Microsoft.Office.Interop.Outlook.DLL +"c:\Program Files\7-Zip\7z.exe" e -y Portable_OGCS_v2.8.5.zip stdole.dll +"c:\Program Files\7-Zip\7z.exe" e -y Portable_OGCS_v2.8.5.zip "Windows Defender SmartScreen Unblock.ps1" -"c:\Program Files\7-Zip\7z.exe" a Portable_OGCS_v2.8.5.zip Microsoft.Office.Interop.Outlook.DLL -"c:\Program Files\7-Zip\7z.exe" a Portable_OGCS_v2.8.5.zip stdole.dll -"c:\Program Files\7-Zip\7z.exe" a Portable_OGCS_v2.8.5.zip "Windows Defender SmartScreen Unblock.ps1" +"c:\Program Files\7-Zip\7z.exe" a Portable_OGCS_v2.8.6.zip Microsoft.Office.Interop.Outlook.DLL +"c:\Program Files\7-Zip\7z.exe" a Portable_OGCS_v2.8.6.zip stdole.dll +"c:\Program Files\7-Zip\7z.exe" a Portable_OGCS_v2.8.6.zip "Windows Defender SmartScreen Unblock.ps1" cd ..\..\..\.. diff --git a/src/OutlookGoogleCalendarSync/Forms/ColourMap.cs b/src/OutlookGoogleCalendarSync/Forms/ColourMap.cs index 0297a874..641d8078 100644 --- a/src/OutlookGoogleCalendarSync/Forms/ColourMap.cs +++ b/src/OutlookGoogleCalendarSync/Forms/ColourMap.cs @@ -23,6 +23,7 @@ public ColourMap() { InitializeComponent(); loadConfig(); + OutlookOgcs.Calendar.Disconnect(true); } private void loadConfig() { diff --git a/src/OutlookGoogleCalendarSync/Forms/MainForm.cs b/src/OutlookGoogleCalendarSync/Forms/MainForm.cs index d7f0f287..d04ae29b 100644 --- a/src/OutlookGoogleCalendarSync/Forms/MainForm.cs +++ b/src/OutlookGoogleCalendarSync/Forms/MainForm.cs @@ -788,6 +788,7 @@ void Save_Click(object sender, EventArgs e) { } finally { bSave.Enabled = true; bSave.Text = "Save"; + OutlookOgcs.Calendar.Disconnect(true); } } @@ -1077,6 +1078,7 @@ private void tbOutlookDateFormat_Leave(object sender, EventArgs e) { private void btTestOutlookFilter_Click(object sender, EventArgs e) { log.Debug("Testing the Outlook filter string."); int filterCount = OutlookOgcs.Calendar.Instance.FilterCalendarEntries(OutlookOgcs.Calendar.Instance.UseOutlookCalendar.Items, false).Count(); + OutlookOgcs.Calendar.Disconnect(true); String msg = "The format '" + tbOutlookDateFormat.Text + "' returns " + filterCount + " calendar items within the date range "; msg += Settings.Instance.SyncStart.ToString(System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern); msg += " and " + Settings.Instance.SyncEnd.ToString(System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern); diff --git a/src/OutlookGoogleCalendarSync/GoogleOgcs/GoogleCalendar.cs b/src/OutlookGoogleCalendarSync/GoogleOgcs/GoogleCalendar.cs index 7ff7b989..9e1c7c5b 100644 --- a/src/OutlookGoogleCalendarSync/GoogleOgcs/GoogleCalendar.cs +++ b/src/OutlookGoogleCalendarSync/GoogleOgcs/GoogleCalendar.cs @@ -193,8 +193,8 @@ public List GetCalendarEntriesInRecurrence(String recurringEventId) { return result; } catch (System.Exception ex) { - Forms.Main.Instance.Console.UpdateWithError("Failed to retrieve recurring events", OGCSexception.LogAsFail(ex)); - OGCSexception.Analyse(ex); + Forms.Main.Instance.Console.UpdateWithError("Failed to retrieve recurring events.", OGCSexception.LogAsFail(ex)); + OGCSexception.Analyse("recurringEventId: " + recurringEventId, ex); return null; } } diff --git a/src/OutlookGoogleCalendarSync/OutlookGoogleCalendarSync.nuspec b/src/OutlookGoogleCalendarSync/OutlookGoogleCalendarSync.nuspec index 96aafd00..125b6310 100644 --- a/src/OutlookGoogleCalendarSync/OutlookGoogleCalendarSync.nuspec +++ b/src/OutlookGoogleCalendarSync/OutlookGoogleCalendarSync.nuspec @@ -2,7 +2,7 @@ OutlookGoogleCalendarSync - 2.8.5-alpha + 2.8.6-alpha Outlook Google Calendar Sync Paul Woolcock phw198 @@ -12,28 +12,27 @@ false Sync Outlook and Google calendars. -# What's New In v2.8.5? +# What's New In v2.8.6? <i class="em em-high_brightness"></i> **Enhancements** -- Improved detection of Outlook versions after 2016 -- Option to exclude sync of Google 'goals' -- Option to set exact type of availablity in Outlook (eg Out of Office) -- Sync deletion in Outlook on first two-way sync (not second) -- Log exact code location of any errors -- Log Google 500 errors as `FAIL` to avoid error reporting -- Further masking of Outlook profile email address in log file +**Enhancements** +- Optionally exclude declined Google invitiations from sync +- Additional colour sync setting to only sync single category to Outlook +- Don't set Outlook category to default Google calendar colour (unless mapped) +- Retrieve all Google calendars, not just first 30 <i class="em em-beetle"></i> **Bugfix** -- Quota limit error updated to match changed Google error -- Reclaim calendar entries in both Google _and_ Outlook at start of sync -- Proper calculation of recurrence end time from organiser's local time -- Compare recurrence rule if number of elements have changed -- Compare attendee cloaked email addresses properly after config change -- Handle configured category mappings for categories that no longer exist in Outlook -- Don't error if log file deletion fails -- Improved support for Outlook2003 +- Outlook 2003: Retain recurring items starting before, but spanning sync date range +- Cater for nothing being returned when getting Google item recurrences +- Handle Google error code 410 [Gone] +- Correctly delay next sync when quota exhausted +- Google calendar colours in dropdown may be offset incorrectly by 1 +- Handle failure to get email address from Exchange meeting attendee +- Fixed regression of network failure preventing future automated sync +- Telemetry popup box every time OGCS starts in system tray +- Default Google reminder errors if only email notification set on event Copyright 2020 Outlook Google Calendar Sync 2-way Two-way Bidirection diff --git a/src/OutlookGoogleCalendarSync/OutlookOgcs/OutlookCategories.cs b/src/OutlookGoogleCalendarSync/OutlookOgcs/OutlookCategories.cs index e8475841..6b1e21e4 100644 --- a/src/OutlookGoogleCalendarSync/OutlookOgcs/OutlookCategories.cs +++ b/src/OutlookGoogleCalendarSync/OutlookOgcs/OutlookCategories.cs @@ -156,15 +156,24 @@ public void BuildPicker(ref System.Windows.Forms.CheckedListBox clb) { public Outlook.OlCategoryColor? OutlookColour(String categoryName) { if (string.IsNullOrEmpty(categoryName)) log.Warn("Category name is empty."); - if (this.categories == null) - OutlookOgcs.Calendar.Instance.IOutlook.RefreshCategories(); + try { + if (this.categories != null && this.categories.Count > 0) { } + } catch (System.Exception ex) { + OGCSexception.Analyse("Categories are not accessible!", OGCSexception.LogAsFail(ex)); + this.categories = null; + } - foreach (Outlook.Category category in this.categories) { - if (category.Name == categoryName.Trim()) return category.Color; - } + if (this.categories == null || OutlookOgcs.Calendar.Categories == null) { + OutlookOgcs.Calendar.Instance.IOutlook.RefreshCategories(); + this.categories = Calendar.Categories.categories; + } + + foreach (Outlook.Category category in this.categories) { + if (category.Name == categoryName.Trim()) return category.Color; + } - log.Warn("Could not convert category name '" + categoryName + "' into Outlook category type."); - return null; + log.Warn("Could not convert category name '" + categoryName + "' into Outlook category type."); + return null; } /// @@ -186,6 +195,10 @@ private List getNames() { /// List to be used in dropdown, for example public List DropdownItems() { List items = new List(); + if (this.categories == null) { + OutlookOgcs.Calendar.Instance.IOutlook.RefreshCategories(); + this.categories = Calendar.Categories.categories; + } if (this.categories != null) { foreach (Outlook.Category category in this.categories) { items.Add(new OutlookOgcs.Categories.ColourInfo(category.Color, Categories.Map.RgbColour(category.Color), category.Name)); diff --git a/src/OutlookGoogleCalendarSync/OutlookOgcs/OutlookNew.cs b/src/OutlookGoogleCalendarSync/OutlookOgcs/OutlookNew.cs index bd58d6db..14fdec1d 100644 --- a/src/OutlookGoogleCalendarSync/OutlookOgcs/OutlookNew.cs +++ b/src/OutlookGoogleCalendarSync/OutlookOgcs/OutlookNew.cs @@ -645,7 +645,14 @@ public String GetGlobalApptID(AppointmentItem ai) { public void RefreshCategories() { log.Debug("Refreshing categories..."); - OutlookOgcs.Calendar.Categories.Get(oApp, useOutlookCalendar); + try { + OutlookOgcs.Calendar.Categories.Get(oApp, useOutlookCalendar); + } catch (System.Exception ex) { + if (OGCSexception.GetErrorCode(ex) == "0x800706BA") { //RPC Server Unavailable + OutlookOgcs.Calendar.AttachToOutlook(ref oApp); + OutlookOgcs.Calendar.Categories.Get(oApp, useOutlookCalendar); + } + } Forms.Main.Instance.ddOutlookColour.AddColourItems(); foreach (OutlookOgcs.Categories.ColourInfo cInfo in Forms.Main.Instance.ddOutlookColour.Items) { if (cInfo.OutlookCategory.ToString() == Settings.Instance.SetEntriesColourValue && diff --git a/src/OutlookGoogleCalendarSync/Program.cs b/src/OutlookGoogleCalendarSync/Program.cs index b6202cbc..7ddc990a 100644 --- a/src/OutlookGoogleCalendarSync/Program.cs +++ b/src/OutlookGoogleCalendarSync/Program.cs @@ -198,7 +198,7 @@ private static Dictionary parseArgument(String[] args, char arg) throw new ApplicationException("The /" + arg + " parameter must be used with a filename."); } details["Directory"] = System.IO.Path.GetDirectoryName(argVal.TrimStart(("/" + arg + ":").ToCharArray())); - if (!System.IO.Directory.Exists(details["Directory"])) { + if (!string.IsNullOrEmpty(details["Directory"]) && !System.IO.Directory.Exists(details["Directory"])) { throw new ApplicationException("The specified directory '" + details["Directory"] + "' does not exist.\r\n" + "Please correct the parameter value passed or create the directory."); } diff --git a/src/OutlookGoogleCalendarSync/Properties/AssemblyInfo.cs b/src/OutlookGoogleCalendarSync/Properties/AssemblyInfo.cs index 61a0975f..db6981c3 100644 --- a/src/OutlookGoogleCalendarSync/Properties/AssemblyInfo.cs +++ b/src/OutlookGoogleCalendarSync/Properties/AssemblyInfo.cs @@ -28,6 +28,6 @@ // You can specify all the values or you can use the default the Revision and // Build Numbers by using the '*' as shown below: [assembly: AssemblyVersion("2.8.*")] -[assembly: AssemblyFileVersion("2.8.5.0")] +[assembly: AssemblyFileVersion("2.8.6.0")] [assembly: AssemblyMetadata("SquirrelAwareVersion", "1")] \ No newline at end of file diff --git a/src/OutlookGoogleCalendarSync/Recurrence.cs b/src/OutlookGoogleCalendarSync/Recurrence.cs index 0ee7c4c3..71a73430 100644 --- a/src/OutlookGoogleCalendarSync/Recurrence.cs +++ b/src/OutlookGoogleCalendarSync/Recurrence.cs @@ -650,7 +650,7 @@ public static void UpdateGoogleExceptions(AppointmentItem ai, Event ev, Boolean } } } else { - log.Debug("No matching Google Event recurrence found."); + log.Warn("No matching Google Event recurrence found."); if (oIsDeleted) log.Debug("The Outlook appointment is deleted, so not a problem."); } } finally {