Added a checkbox to hide the donate button.
git-svn-id: https://duplicati.googlecode.com/svn/trunk@447 59da171f-624f-0410-aa54-27559c288bec
This commit is contained in:
+34
-24
@@ -31,9 +31,12 @@ namespace Duplicati.GUI
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ApplicationSetup));
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.HideDonateButton = new System.Windows.Forms.CheckBox();
|
||||
this.StartupDelayDuration = new Duplicati.GUI.HelperControls.DurationEditor();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.LanguageSelection = new System.Windows.Forms.ComboBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.RecentDuration = new Duplicati.GUI.HelperControls.DurationEditor();
|
||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.CacheSizeLabel = new System.Windows.Forms.Label();
|
||||
this.ClearCacheButton = new System.Windows.Forms.Button();
|
||||
@@ -59,11 +62,9 @@ namespace Duplicati.GUI
|
||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
||||
this.groupBox4 = new System.Windows.Forms.GroupBox();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.StartupDelayDuration = new Duplicati.GUI.HelperControls.DurationEditor();
|
||||
this.RecentDuration = new Duplicati.GUI.HelperControls.DurationEditor();
|
||||
this.Bandwidth = new Duplicati.GUI.HelperControls.BandwidthLimit();
|
||||
this.ThreadPriorityPicker = new Duplicati.GUI.HelperControls.ThreadPriorityPicker();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.PasswordDefaultsGroup.SuspendLayout();
|
||||
@@ -82,6 +83,7 @@ namespace Duplicati.GUI
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.HideDonateButton);
|
||||
this.groupBox1.Controls.Add(this.StartupDelayDuration);
|
||||
this.groupBox1.Controls.Add(this.label7);
|
||||
this.groupBox1.Controls.Add(this.LanguageSelection);
|
||||
@@ -92,6 +94,20 @@ namespace Duplicati.GUI
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.TabStop = false;
|
||||
//
|
||||
// HideDonateButton
|
||||
//
|
||||
resources.ApplyResources(this.HideDonateButton, "HideDonateButton");
|
||||
this.HideDonateButton.Name = "HideDonateButton";
|
||||
this.HideDonateButton.UseVisualStyleBackColor = true;
|
||||
this.HideDonateButton.CheckedChanged += new System.EventHandler(this.HideDonateButton_CheckedChanged);
|
||||
//
|
||||
// StartupDelayDuration
|
||||
//
|
||||
resources.ApplyResources(this.StartupDelayDuration, "StartupDelayDuration");
|
||||
this.StartupDelayDuration.Name = "StartupDelayDuration";
|
||||
this.StartupDelayDuration.Value = "";
|
||||
this.StartupDelayDuration.ValueChanged += new System.EventHandler(this.StartupDelayDuration_ValueChanged);
|
||||
//
|
||||
// label7
|
||||
//
|
||||
resources.ApplyResources(this.label7, "label7");
|
||||
@@ -110,6 +126,13 @@ namespace Duplicati.GUI
|
||||
resources.ApplyResources(this.label3, "label3");
|
||||
this.label3.Name = "label3";
|
||||
//
|
||||
// RecentDuration
|
||||
//
|
||||
resources.ApplyResources(this.RecentDuration, "RecentDuration");
|
||||
this.RecentDuration.Name = "RecentDuration";
|
||||
this.RecentDuration.Value = "";
|
||||
this.RecentDuration.ValueChanged += new System.EventHandler(this.RecentDuration_ValueChanged);
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
this.groupBox2.Controls.Add(this.CacheSizeLabel);
|
||||
@@ -276,27 +299,6 @@ namespace Duplicati.GUI
|
||||
this.groupBox4.Name = "groupBox4";
|
||||
this.groupBox4.TabStop = false;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.OKBtn);
|
||||
this.panel1.Controls.Add(this.CancelBtn);
|
||||
resources.ApplyResources(this.panel1, "panel1");
|
||||
this.panel1.Name = "panel1";
|
||||
//
|
||||
// StartupDelayDuration
|
||||
//
|
||||
resources.ApplyResources(this.StartupDelayDuration, "StartupDelayDuration");
|
||||
this.StartupDelayDuration.Name = "StartupDelayDuration";
|
||||
this.StartupDelayDuration.Value = "";
|
||||
this.StartupDelayDuration.ValueChanged += new System.EventHandler(this.StartupDelayDuration_ValueChanged);
|
||||
//
|
||||
// RecentDuration
|
||||
//
|
||||
resources.ApplyResources(this.RecentDuration, "RecentDuration");
|
||||
this.RecentDuration.Name = "RecentDuration";
|
||||
this.RecentDuration.Value = "";
|
||||
this.RecentDuration.ValueChanged += new System.EventHandler(this.RecentDuration_ValueChanged);
|
||||
//
|
||||
// Bandwidth
|
||||
//
|
||||
this.Bandwidth.DownloadLimit = null;
|
||||
@@ -314,6 +316,13 @@ namespace Duplicati.GUI
|
||||
this.ThreadPriorityPicker.Name = "ThreadPriorityPicker";
|
||||
this.ThreadPriorityPicker.SelectedPriorityChanged += new System.EventHandler(this.ThreadPriorityPicker_SelectedPriorityChanged);
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.OKBtn);
|
||||
this.panel1.Controls.Add(this.CancelBtn);
|
||||
resources.ApplyResources(this.panel1, "panel1");
|
||||
this.panel1.Name = "panel1";
|
||||
//
|
||||
// ApplicationSetup
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
@@ -381,5 +390,6 @@ namespace Duplicati.GUI
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Label EncryptionMethod;
|
||||
private System.Windows.Forms.ComboBox EncryptionModule;
|
||||
private System.Windows.Forms.CheckBox HideDonateButton;
|
||||
}
|
||||
}
|
||||
@@ -228,6 +228,8 @@ namespace Duplicati.GUI
|
||||
Bandwidth.UploadLimit = m_settings.UploadSpeedLimit;
|
||||
Bandwidth.DownloadLimit = m_settings.DownloadSpeedLimit;
|
||||
|
||||
HideDonateButton.Checked = m_settings.HideDonateButton;
|
||||
|
||||
if (string.IsNullOrEmpty(m_settings.DisplayLanguage))
|
||||
LanguageSelection.SelectedIndex = 0;
|
||||
else
|
||||
@@ -477,5 +479,13 @@ namespace Duplicati.GUI
|
||||
foreach (Library.Interface.ISettingsControl ic in Library.DynamicLoader.SettingsControlLoader.Modules)
|
||||
ic.EndEdit(env, SettingExtension.GetExtensions(connection, ic.Key));
|
||||
}
|
||||
|
||||
private void HideDonateButton_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (m_isUpdating)
|
||||
return;
|
||||
|
||||
m_settings.HideDonateButton = HideDonateButton.Checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -148,13 +148,40 @@
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="HideDonateButton.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="HideDonateButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>8, 96</value>
|
||||
</data>
|
||||
<data name="HideDonateButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>253, 17</value>
|
||||
</data>
|
||||
<data name="HideDonateButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="HideDonateButton.Text" xml:space="preserve">
|
||||
<value>Hide the donate button on the main wizard page</value>
|
||||
</data>
|
||||
<data name=">>HideDonateButton.Name" xml:space="preserve">
|
||||
<value>HideDonateButton</value>
|
||||
</data>
|
||||
<data name=">>HideDonateButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>HideDonateButton.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>HideDonateButton.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="StartupDelayDuration.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Right</value>
|
||||
<value>Top, Right</value>
|
||||
</data>
|
||||
<data name="StartupDelayDuration.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>208, 72</value>
|
||||
<value>208, 71</value>
|
||||
</data>
|
||||
<data name="StartupDelayDuration.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>221, 21</value>
|
||||
@@ -172,7 +199,7 @@
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>StartupDelayDuration.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="label7.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -202,13 +229,13 @@
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>label7.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="LanguageSelection.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Right</value>
|
||||
<value>Top, Right</value>
|
||||
</data>
|
||||
<data name="LanguageSelection.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>208, 24</value>
|
||||
<value>208, 23</value>
|
||||
</data>
|
||||
<data name="LanguageSelection.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>223, 21</value>
|
||||
@@ -226,7 +253,7 @@
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>LanguageSelection.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -256,13 +283,13 @@
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>label3.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="RecentDuration.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Right</value>
|
||||
<value>Top, Right</value>
|
||||
</data>
|
||||
<data name="RecentDuration.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>208, 48</value>
|
||||
<value>208, 47</value>
|
||||
</data>
|
||||
<data name="RecentDuration.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>221, 21</value>
|
||||
@@ -280,7 +307,7 @@
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>RecentDuration.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Top</value>
|
||||
@@ -289,7 +316,7 @@
|
||||
<value>3, 3</value>
|
||||
</data>
|
||||
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>439, 104</value>
|
||||
<value>439, 125</value>
|
||||
</data>
|
||||
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
@@ -730,7 +757,7 @@
|
||||
<value>8, 40</value>
|
||||
</data>
|
||||
<data name="PasswordPanel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>424, 96</value>
|
||||
<value>424, 64</value>
|
||||
</data>
|
||||
<data name="PasswordPanel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
@@ -781,10 +808,10 @@
|
||||
<value>Top</value>
|
||||
</data>
|
||||
<data name="PasswordDefaultsGroup.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 107</value>
|
||||
<value>3, 128</value>
|
||||
</data>
|
||||
<data name="PasswordDefaultsGroup.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>439, 144</value>
|
||||
<value>439, 117</value>
|
||||
</data>
|
||||
<data name="PasswordDefaultsGroup.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>8</value>
|
||||
@@ -817,7 +844,7 @@
|
||||
<value>3, 3, 3, 3</value>
|
||||
</data>
|
||||
<data name="tabPage1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>445, 317</value>
|
||||
<value>445, 277</value>
|
||||
</data>
|
||||
<data name="tabPage1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
@@ -1493,9 +1520,6 @@
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAEAAA==
|
||||
</value>
|
||||
</data>
|
||||
<data name="$this.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterScreen</value>
|
||||
</data>
|
||||
|
||||
@@ -40,13 +40,12 @@ namespace Duplicati.Datamodel
|
||||
|
||||
private const string DISPLAY_LANGUAGE = "Display Language";
|
||||
|
||||
//This is only used on windows, on linux, it is assumed that the programs are in the path env.
|
||||
public const string PROGRAM_FILES = "%PROGRAMFILES%";
|
||||
private const string STARTUP_DELAY_DURATION = "Startup delay duration";
|
||||
private const string THREAD_PRIORITY_OVERRIDE = "Thread priority override";
|
||||
private const string UPLOAD_SPEED_LIMIT = "Upload speed limit";
|
||||
private const string DOWNLOAD_SPEED_LIMIT = "Download speed limit";
|
||||
|
||||
public const string STARTUP_DELAY_DURATION = "Startup delay duration";
|
||||
public const string THREAD_PRIORITY_OVERRIDE = "Thread priority override";
|
||||
public const string UPLOAD_SPEED_LIMIT = "Upload speed limit";
|
||||
public const string DOWNLOAD_SPEED_LIMIT = "Download speed limit";
|
||||
private const string HIDE_DONATE_BUTTON = "Hide donate button";
|
||||
|
||||
public ApplicationSettings(IDataFetcher dataparent)
|
||||
{
|
||||
@@ -253,5 +252,19 @@ namespace Duplicati.Datamodel
|
||||
set { m_appset[UPLOAD_SPEED_LIMIT] = value == null ? "" : value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating if the donate button in Duplicati should be hidden
|
||||
/// </summary>
|
||||
public bool HideDonateButton
|
||||
{
|
||||
get
|
||||
{
|
||||
string tmp;
|
||||
m_appset.TryGetValue(HIDE_DONATE_BUTTON, out tmp);
|
||||
|
||||
return Duplicati.Library.Core.Utility.ParseBool(tmp, false);
|
||||
}
|
||||
set { m_appset[HIDE_DONATE_BUTTON] = value.ToString(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,8 @@ namespace Duplicati.GUI.Wizard_pages
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
donate_panel.Visible = !new ApplicationSettings(Program.DataConnection).HideDonateButton;
|
||||
|
||||
base.PageEnter += new PageChangeHandler(MainPage_PageEnter);
|
||||
base.PageLeave += new PageChangeHandler(MainPage_PageLeave);
|
||||
base.PageDisplay += new PageChangeHandler(MainPage_PageDisplay);
|
||||
|
||||
Reference in New Issue
Block a user