Merge with default OUT-514
authorThomas
Fri, 19 Oct 2018 14:31:39 +0200
branchOUT-514
changeset 2415b0bc36808170
parent 2410 80c01cc1dec1
parent 2414 12ea12382cae
child 2416 588062bab6d6
Merge with default
Properties/Resources.Designer.cs
Properties/Resources.resx
Resources/ImageRatingGreen.png
Resources/ImageRatingRed.png
Resources/ImageRatingYellow.png
ThisAddIn.cs
UI/FormRegionPrivacyStatus.Designer.cs
UI/RibbonCustomizations.cs
UI/UserControlPrivacyStatus.xaml
pEpForOutlook.csproj
     1.1 --- a/Globals.cs	Thu Oct 18 13:38:58 2018 +0200
     1.2 +++ b/Globals.cs	Fri Oct 19 14:31:39 2018 +0200
     1.3 @@ -48,7 +48,7 @@
     1.4          public const int PHRASE_ID_TRUSTWORDS_LANGUAGE = 1000;
     1.5  
     1.6          // Timeout for sync messages
     1.7 -        public const int TIMEOUT_SYNC_MESSAGE          = 600; // 10 minutes in seconds
     1.8 +        public const int TIMEOUT_SYNC_MESSAGE          = 600000; // 10 minutes in milliseconds
     1.9  
    1.10          /// <summary>
    1.11          /// Enumeration to define the supported release modes.
     2.1 --- a/MsgProcessor.cs	Thu Oct 18 13:38:58 2018 +0200
     2.2 +++ b/MsgProcessor.cs	Fri Oct 19 14:31:39 2018 +0200
     2.3 @@ -776,6 +776,20 @@
     2.4                  {
     2.5                      src = sourceMessage.ToCOMType();
     2.6  
     2.7 +                    // If no Sent date has been set, add it before encryption
     2.8 +                    if (src.Sent == 0)
     2.9 +                    {
    2.10 +                        try
    2.11 +                        {
    2.12 +                            src.Sent = (long)(DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalSeconds;
    2.13 +                        }
    2.14 +                        catch (Exception ex)
    2.15 +                        {
    2.16 +                            src.Sent = 0;
    2.17 +                            Log.Error("Encrypt: Error setting Sent time. " + ex.ToString());
    2.18 +                        }
    2.19 +                    }
    2.20 +
    2.21                      ThisAddIn.PEPEngine.EncryptMessageAndAddPrivKey(src, out dst, toFingerprint, flags, encryptionFormat);
    2.22                      success = true;
    2.23                  }
    2.24 @@ -832,6 +846,20 @@
    2.25                  src = sourceMessage.ToCOMType();
    2.26                  targetId = targetIdentity.ToCOMType();
    2.27  
    2.28 +                // If no Sent date has been set, add it before encryption
    2.29 +                if (src.Sent == 0)
    2.30 +                {
    2.31 +                    try
    2.32 +                    {
    2.33 +                        src.Sent = (long)(DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalSeconds;
    2.34 +                    }
    2.35 +                    catch (Exception ex)
    2.36 +                    {
    2.37 +                        src.Sent = 0;
    2.38 +                        Log.Error("Encrypt: Error setting Sent time. " + ex.ToString());
    2.39 +                    }
    2.40 +                }
    2.41 +
    2.42                  ThisAddIn.PEPEngine.EncryptMessageForSelf(targetId, src, extraKeys, out dst);
    2.43                  success = true;
    2.44              }
     3.1 --- a/Properties/Resources.Designer.cs	Thu Oct 18 13:38:58 2018 +0200
     3.2 +++ b/Properties/Resources.Designer.cs	Fri Oct 19 14:31:39 2018 +0200
     3.3 @@ -783,36 +783,6 @@
     3.4          /// <summary>
     3.5          ///   Looks up a localized resource of type System.Drawing.Bitmap.
     3.6          /// </summary>
     3.7 -        public static System.Drawing.Bitmap ImageRatingGreen {
     3.8 -            get {
     3.9 -                object obj = ResourceManager.GetObject("ImageRatingGreen", resourceCulture);
    3.10 -                return ((System.Drawing.Bitmap)(obj));
    3.11 -            }
    3.12 -        }
    3.13 -        
    3.14 -        /// <summary>
    3.15 -        ///   Looks up a localized resource of type System.Drawing.Bitmap.
    3.16 -        /// </summary>
    3.17 -        public static System.Drawing.Bitmap ImageRatingRed {
    3.18 -            get {
    3.19 -                object obj = ResourceManager.GetObject("ImageRatingRed", resourceCulture);
    3.20 -                return ((System.Drawing.Bitmap)(obj));
    3.21 -            }
    3.22 -        }
    3.23 -        
    3.24 -        /// <summary>
    3.25 -        ///   Looks up a localized resource of type System.Drawing.Bitmap.
    3.26 -        /// </summary>
    3.27 -        public static System.Drawing.Bitmap ImageRatingYellow {
    3.28 -            get {
    3.29 -                object obj = ResourceManager.GetObject("ImageRatingYellow", resourceCulture);
    3.30 -                return ((System.Drawing.Bitmap)(obj));
    3.31 -            }
    3.32 -        }
    3.33 -        
    3.34 -        /// <summary>
    3.35 -        ///   Looks up a localized resource of type System.Drawing.Bitmap.
    3.36 -        /// </summary>
    3.37          public static System.Drawing.Bitmap ImageReaderSplash {
    3.38              get {
    3.39                  object obj = ResourceManager.GetObject("ImageReaderSplash", resourceCulture);
     4.1 --- a/Properties/Resources.resx	Thu Oct 18 13:38:58 2018 +0200
     4.2 +++ b/Properties/Resources.resx	Fri Oct 19 14:31:39 2018 +0200
     4.3 @@ -910,15 +910,6 @@
     4.4    <data name="KeySyncWizard_PGPPrivateKeyMessageBody" xml:space="preserve">
     4.5      <value>Please find attached the private key from your p≡p device. You can now import it into your keychain.</value>
     4.6    </data>
     4.7 -  <data name="ImageRatingGreen" type="System.Resources.ResXFileRef, System.Windows.Forms">
     4.8 -    <value>..\resources\imageratinggreen.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
     4.9 -  </data>
    4.10 -  <data name="ImageRatingRed" type="System.Resources.ResXFileRef, System.Windows.Forms">
    4.11 -    <value>..\resources\imageratingred.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
    4.12 -  </data>
    4.13 -  <data name="ImageRatingYellow" type="System.Resources.ResXFileRef, System.Windows.Forms">
    4.14 -    <value>..\resources\imageratingyellow.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
    4.15 -  </data>
    4.16    <data name="ImagePrivacyStatusGreenProtectionDisabled" type="System.Resources.ResXFileRef, System.Windows.Forms">
    4.17      <value>..\Resources\ImagePrivacyStatusGreenProtectionDisabled.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
    4.18    </data>
     5.1 Binary file Resources/ImageLogoGreen.png has changed
     6.1 Binary file Resources/ImageLogoWhite.png has changed
     7.1 Binary file Resources/ImagePrivacyStatusGreen.png has changed
     8.1 Binary file Resources/ImagePrivacyStatusGreenInvert.png has changed
     9.1 Binary file Resources/ImagePrivacyStatusGreenProtectionDisabled.png has changed
    10.1 Binary file Resources/ImagePrivacyStatusGreenProtectionDisabledInvert.png has changed
    11.1 Binary file Resources/ImagePrivacyStatusNoColor.png has changed
    12.1 Binary file Resources/ImagePrivacyStatusNoColorInvert.png has changed
    13.1 Binary file Resources/ImagePrivacyStatusRed.png has changed
    14.1 Binary file Resources/ImagePrivacyStatusRedInvert.png has changed
    15.1 Binary file Resources/ImagePrivacyStatusYellow.png has changed
    16.1 Binary file Resources/ImagePrivacyStatusYellowInvert.png has changed
    17.1 Binary file Resources/ImagePrivacyStatusYellowProtectionDisabled.png has changed
    18.1 Binary file Resources/ImagePrivacyStatusYellowProtectionDisabledInvert.png has changed
    19.1 Binary file Resources/ImageRatingGreen.png has changed
    20.1 Binary file Resources/ImageRatingRed.png has changed
    21.1 Binary file Resources/ImageRatingYellow.png has changed
    22.1 --- a/ThisAddIn.cs	Thu Oct 18 13:38:58 2018 +0200
    22.2 +++ b/ThisAddIn.cs	Fri Oct 19 14:31:39 2018 +0200
    22.3 @@ -2651,7 +2651,7 @@
    22.4              {
    22.5                  // Only enable if not yet enabled
    22.6                  inboxCleaner = new System.Windows.Forms.Timer();
    22.7 -                inboxCleaner.Interval = 600000; // 10 minutes in ms
    22.8 +                inboxCleaner.Interval = Globals.TIMEOUT_SYNC_MESSAGE;
    22.9                  inboxCleaner.Tick += InboxCleaner_Tick;
   22.10                  inboxCleaner.Start();
   22.11                  Log.Verbose("ToggleInboxCleaning: Automatic inbox cleaning enabled");
   22.12 @@ -2748,7 +2748,7 @@
   22.13                                              Log.Verbose("InboxCleaner_Tick: Processing 'pEp Internal' item " + j + "...");
   22.14  
   22.15                                              // Check if mail item has timed out and delete it if necessary
   22.16 -                                            if (DateTime.UtcNow - (mailItem.ReceivedTime.ToUniversalTime()) > TimeSpan.FromSeconds(Globals.TIMEOUT_SYNC_MESSAGE))
   22.17 +                                            if (DateTime.UtcNow - (mailItem.ReceivedTime.ToUniversalTime()) > TimeSpan.FromMilliseconds(Globals.TIMEOUT_SYNC_MESSAGE))
   22.18                                              {
   22.19                                                  mailItem.PermanentlyDelete();
   22.20                                                  deletedMessagesCounter++;
    23.1 --- a/UI/FormRegionPrivacyStatus.Designer.cs	Thu Oct 18 13:38:58 2018 +0200
    23.2 +++ b/UI/FormRegionPrivacyStatus.Designer.cs	Fri Oct 19 14:31:39 2018 +0200
    23.3 @@ -57,7 +57,7 @@
    23.4              this.PanelPrivacyStatus.Dock = System.Windows.Forms.DockStyle.Fill;
    23.5              this.PanelPrivacyStatus.Location = new System.Drawing.Point(0, 0);
    23.6              this.PanelPrivacyStatus.Name = "PanelPrivacyStatus";
    23.7 -            this.PanelPrivacyStatus.Size = new System.Drawing.Size(500, 36);
    23.8 +            this.PanelPrivacyStatus.Size = new System.Drawing.Size(500, 40);
    23.9              this.PanelPrivacyStatus.TabIndex = 0;
   23.10              // 
   23.11              // ElementHostFormControl
   23.12 @@ -65,7 +65,7 @@
   23.13              this.ElementHostFormControl.Dock = System.Windows.Forms.DockStyle.Fill;
   23.14              this.ElementHostFormControl.Location = new System.Drawing.Point(0, 0);
   23.15              this.ElementHostFormControl.Name = "ElementHostFormControl";
   23.16 -            this.ElementHostFormControl.Size = new System.Drawing.Size(500, 36);
   23.17 +            this.ElementHostFormControl.Size = new System.Drawing.Size(500, 40);
   23.18              this.ElementHostFormControl.TabIndex = 0;
   23.19              this.ElementHostFormControl.Child = this.UserControlPrivacyStatus;
   23.20              // 
   23.21 @@ -75,7 +75,7 @@
   23.22              this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
   23.23              this.Controls.Add(this.PanelPrivacyStatus);
   23.24              this.Name = "FormRegionPrivacyStatus";
   23.25 -            this.Size = new System.Drawing.Size(500, 36);
   23.26 +            this.Size = new System.Drawing.Size(500, 40);
   23.27              this.FormRegionShowing += new System.EventHandler(this.FormRegionPrivacyStatus_FormRegionShowing);
   23.28              this.FormRegionClosed += new System.EventHandler(this.FormRegionPrivacyStatus_FormRegionClosed);
   23.29              this.PanelPrivacyStatus.ResumeLayout(false);
    24.1 --- a/UI/UserControlPrivacyStatus.xaml	Thu Oct 18 13:38:58 2018 +0200
    24.2 +++ b/UI/UserControlPrivacyStatus.xaml	Fri Oct 19 14:31:39 2018 +0200
    24.3 @@ -4,7 +4,7 @@
    24.4               xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    24.5               xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    24.6               mc:Ignorable="d" 
    24.7 -             d:DesignHeight="36" d:DesignWidth="500">
    24.8 +             d:DesignHeight="40" d:DesignWidth="500">
    24.9      <Grid>
   24.10          <Grid.ColumnDefinitions>
   24.11              <ColumnDefinition Width="auto"/>
   24.12 @@ -14,9 +14,9 @@
   24.13  
   24.14          <!--The Privacy Status icon-->
   24.15          <Image Grid.Column="0" 
   24.16 -               Width="30"
   24.17 -               Height="30"
   24.18 -               Margin="10,3"
   24.19 +               Width="24"
   24.20 +               Height="24"
   24.21 +               Margin="8"
   24.22                 Source="{Binding Path=Icon}"/>
   24.23          
   24.24          <!--The Privacy Status text-->
   24.25 @@ -30,7 +30,7 @@
   24.26          <Image Grid.Column="2"
   24.27                 Width="36"
   24.28                 Height="36"
   24.29 -               Margin="10,0"
   24.30 +               Margin="8,2"
   24.31                 Source="{Binding Path=Logo}" />
   24.32      </Grid>
   24.33  </UserControl>
    25.1 --- a/pEpForOutlook.csproj	Thu Oct 18 13:38:58 2018 +0200
    25.2 +++ b/pEpForOutlook.csproj	Fri Oct 19 14:31:39 2018 +0200
    25.3 @@ -570,9 +570,6 @@
    25.4      <Resource Include="Resources\ImageLogoIcon.png" />
    25.5      <Resource Include="Resources\ImagePreviewContact.png" />
    25.6      <Resource Include="Resources\ImagePrivacyStatusRedInvert.png" />
    25.7 -    <Resource Include="Resources\ImageRatingGreen.png" />
    25.8 -    <Resource Include="Resources\ImageRatingRed.png" />
    25.9 -    <Resource Include="Resources\ImageRatingYellow.png" />
   25.10      <Resource Include="Resources\ImageLogoBlack.png" />
   25.11      <Resource Include="Resources\ImageLogoGreen.png" />
   25.12      <Resource Include="Resources\ImageLogoWhite.png" />