1
0
mirror of https://github.com/Kopano-dev/kopano-ol-extension.git synced 2023-10-10 13:37:40 +02:00

[KOE-24] Removed old resync buttons on settings dialog.

[KOE-112] Added sync fax number option to GAB settings, disabled by default.
This commit is contained in:
Patrick Simpson 2017-05-17 17:31:07 +02:00
parent edf48b595d
commit 4a222d45ca
8 changed files with 54 additions and 93 deletions

View File

@ -89,6 +89,14 @@ namespace Acacia.Features.GAB
return new GABSettings(this);
}
[AcaciaOption("If set, fax numbers are synchronised. This is normally disabled as Outlook interprets them as email addresses. ")]
public bool SyncFaxNumbers
{
get { return GetOption(OPTION_SYNC_FAX_NUMBERS); }
set { SetOption(OPTION_SYNC_FAX_NUMBERS, value); }
}
private static readonly BoolOption OPTION_SYNC_FAX_NUMBERS = new BoolOption("SyncFaxNumbers", false);
#endregion
#region Debug options

View File

@ -532,7 +532,10 @@ namespace Acacia.Features.GAB
if (Get<string>(value, "mobileTelephoneNumber") != null) contact.MobileTelephoneNumber = Get<string>(value, "mobileTelephoneNumber");
if (Get<string>(value, "homeTelephoneNumber") != null) contact.HomeTelephoneNumber = Get<string>(value, "homeTelephoneNumber");
if (Get<string>(value, "beeperTelephoneNumber") != null) contact.PagerNumber = Get<string>(value, "beeperTelephoneNumber");
if (Get<string>(value, "primaryFaxNumber") != null) contact.BusinessFaxNumber = Get<string>(value, "primaryFaxNumber");
if (_feature.SyncFaxNumbers)
if (Get<string>(value, "primaryFaxNumber") != null) contact.BusinessFaxNumber = Get<string>(value, "primaryFaxNumber");
if (Get<string>(value, "organizationalIdNumber") != null) contact.OrganizationalIDNumber = Get<string>(value, "organizationalIdNumber");
if (Get<string>(value, "postalAddress") != null) contact.BusinessAddress = Get<string>(value, "postalAddress");
if (Get<string>(value, "businessAddressCity") != null) contact.BusinessAddressCity = Get<string>(value, "businessAddressCity");

View File

@ -29,22 +29,22 @@
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GABSettings));
this.buttonGABResync = new System.Windows.Forms.Button();
this.checkFaxNumbers = new System.Windows.Forms.CheckBox();
this.SuspendLayout();
//
// buttonGABResync
// checkFaxNumbers
//
resources.ApplyResources(this.buttonGABResync, "buttonGABResync");
this.buttonGABResync.Name = "buttonGABResync";
this.buttonGABResync.UseVisualStyleBackColor = true;
this.buttonGABResync.Click += new System.EventHandler(this.buttonGABResync_Click);
resources.ApplyResources(this.checkFaxNumbers, "checkFaxNumbers");
this.checkFaxNumbers.Name = "checkFaxNumbers";
this.checkFaxNumbers.UseVisualStyleBackColor = true;
this.checkFaxNumbers.CheckedChanged += new System.EventHandler(this.checkFaxNumbers_CheckedChanged);
//
// GABSettings
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Window;
this.Controls.Add(this.buttonGABResync);
this.Controls.Add(this.checkFaxNumbers);
this.Name = "GABSettings";
this.ResumeLayout(false);
this.PerformLayout();
@ -53,6 +53,6 @@
#endregion
private System.Windows.Forms.Button buttonGABResync;
private System.Windows.Forms.CheckBox checkFaxNumbers;
}
}

View File

@ -43,15 +43,19 @@ namespace Acacia.Features.GAB
this._feature = feature;
InitializeComponent();
// Allow null feature for designer
if (feature != null)
{
checkFaxNumbers.Checked = feature.SyncFaxNumbers;
}
}
private void buttonGABResync_Click(object sender, EventArgs e)
private void checkFaxNumbers_CheckedChanged(object sender, EventArgs e)
{
// Allow null feature for designer
if (_feature != null)
{
_feature.FullResync(null, null);
}
_feature.SyncFaxNumbers = checkFaxNumbers.Checked;
}
}
}

View File

@ -118,36 +118,36 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="buttonGABResync.AutoSize" type="System.Boolean, mscorlib">
<data name="checkFaxNumbers.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="buttonGABResync.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="buttonGABResync.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>8, 0, 8, 0</value>
<data name="checkFaxNumbers.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="buttonGABResync.Size" type="System.Drawing.Size, System.Drawing">
<value>210, 23</value>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="checkFaxNumbers.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="buttonGABResync.TabIndex" type="System.Int32, mscorlib">
<data name="checkFaxNumbers.Size" type="System.Drawing.Size, System.Drawing">
<value>144, 17</value>
</data>
<data name="checkFaxNumbers.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="buttonGABResync.Text" xml:space="preserve">
<value>Resynchronise Global Address Books</value>
<data name="checkFaxNumbers.Text" xml:space="preserve">
<value>Synchronise fax numbers</value>
</data>
<data name="&gt;&gt;buttonGABResync.Name" xml:space="preserve">
<value>buttonGABResync</value>
<data name="&gt;&gt;checkFaxNumbers.Name" xml:space="preserve">
<value>checkFaxNumbers</value>
</data>
<data name="&gt;&gt;buttonGABResync.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<data name="&gt;&gt;checkFaxNumbers.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;buttonGABResync.Parent" xml:space="preserve">
<data name="&gt;&gt;checkFaxNumbers.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;buttonGABResync.ZOrder" xml:space="preserve">
<data name="&gt;&gt;checkFaxNumbers.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@ -160,12 +160,12 @@
<value>True</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>216, 31</value>
<value>144, 17</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>GABSettings</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>Acacia.UI.FeatureSettings, ZPush, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null</value>
<value>Acacia.UI.FeatureSettings, Kopano, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
</root>

View File

@ -31,7 +31,6 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SignaturesSettings));
this._layout = new System.Windows.Forms.TableLayoutPanel();
this.checkForceSet = new System.Windows.Forms.CheckBox();
this.buttonResync = new System.Windows.Forms.Button();
this._layout.SuspendLayout();
this.SuspendLayout();
//
@ -39,7 +38,6 @@
//
resources.ApplyResources(this._layout, "_layout");
this._layout.Controls.Add(this.checkForceSet, 0, 0);
this._layout.Controls.Add(this.buttonResync, 0, 1);
this._layout.Name = "_layout";
//
// checkForceSet
@ -49,13 +47,6 @@
this.checkForceSet.UseVisualStyleBackColor = true;
this.checkForceSet.CheckedChanged += new System.EventHandler(this.checkForceSet_CheckedChanged);
//
// buttonResync
//
resources.ApplyResources(this.buttonResync, "buttonResync");
this.buttonResync.Name = "buttonResync";
this.buttonResync.UseVisualStyleBackColor = true;
this.buttonResync.Click += new System.EventHandler(this.buttonResync_Click);
//
// SignaturesSettings
//
resources.ApplyResources(this, "$this");
@ -74,6 +65,5 @@
private System.Windows.Forms.TableLayoutPanel _layout;
private System.Windows.Forms.CheckBox checkForceSet;
private System.Windows.Forms.Button buttonResync;
}
}

View File

@ -61,20 +61,6 @@ namespace Acacia.Features.Signatures
Dirty = false;
}
private void buttonResync_Click(object sender, EventArgs e)
{
if (_feature != null)
{
ProgressDialog.Execute("SignaturesSync",
(ct) =>
{
_feature.ResyncAll();
return 0;
}
);
}
}
private void checkForceSet_CheckedChanged(object sender, EventArgs e)
{
if (_feature != null)

View File

@ -142,7 +142,7 @@
<value>4, 4, 4, 4</value>
</data>
<data name="checkForceSet.Size" type="System.Drawing.Size, System.Drawing">
<value>152, 17</value>
<value>142, 17</value>
</data>
<data name="checkForceSet.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -162,36 +162,6 @@
<data name="&gt;&gt;checkForceSet.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="buttonResync.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="buttonResync.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 28</value>
</data>
<data name="buttonResync.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>8, 0, 8, 0</value>
</data>
<data name="buttonResync.Size" type="System.Drawing.Size, System.Drawing">
<value>154, 23</value>
</data>
<data name="buttonResync.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="buttonResync.Text" xml:space="preserve">
<value>Resynchronise signatures</value>
</data>
<data name="&gt;&gt;buttonResync.Name" xml:space="preserve">
<value>buttonResync</value>
</data>
<data name="&gt;&gt;buttonResync.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;buttonResync.Parent" xml:space="preserve">
<value>_layout</value>
</data>
<data name="&gt;&gt;buttonResync.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="_layout.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
@ -202,10 +172,10 @@
<value>2, 2, 2, 2</value>
</data>
<data name="_layout.RowCount" type="System.Int32, mscorlib">
<value>2</value>
<value>1</value>
</data>
<data name="_layout.Size" type="System.Drawing.Size, System.Drawing">
<value>160, 54</value>
<value>150, 25</value>
</data>
<data name="_layout.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -223,7 +193,7 @@
<value>0</value>
</data>
<data name="_layout.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="checkForceSet" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="buttonResync" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100,Absolute,20" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="checkForceSet" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100,Absolute,20" /&gt;&lt;Rows Styles="AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
@ -241,7 +211,7 @@
<value>2, 2, 2, 2</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>160, 54</value>
<value>150, 25</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>SignaturesSettings</value>