CA-178243: The Refresh button was not working correctly because of the restore button. Automatic check for updates works now when certain boxes are checked, showing the updates when the user opens XenCenter, but, the list has duplicates.

Improves the centering of the warning messages in the Updates Tab, making the picture align with the text.
Corrects bug related to the visibility of the warning about automatic checks for updates.
This commit is contained in:
Carmen Agimof 2015-07-30 14:58:23 +01:00
parent bb5c2078dc
commit b7a010b5f0
4 changed files with 156 additions and 146 deletions

View File

@ -468,8 +468,10 @@ namespace XenAdmin.Core
}
if (other_config.ContainsKey(IgnoreServerAction.LAST_SEEN_SERVER_VERSION_KEY))
{
other_config.Remove(IgnorePatchAction.IgnorePatchKey);
other_config.Remove(IgnoreServerAction.LAST_SEEN_SERVER_VERSION_KEY);
}
XenAPI.Pool.set_other_config(_connection.Session, pool.opaque_ref, other_config);
}
Properties.Settings.Default.LatestXenCenterSeen = "";

View File

@ -60,10 +60,10 @@
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
this.pictureBoxProgress = new System.Windows.Forms.PictureBox();
this.labelProgress = new System.Windows.Forms.Label();
this.checkForUpdatesNowButton = new System.Windows.Forms.Button();
this.flickerFreePanel1 = new XenAdmin.Controls.FlickerFreePanel();
this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel();
this.labelProgress = new System.Windows.Forms.Label();
this.pictureBoxProgress = new System.Windows.Forms.PictureBox();
this.dataGridViewUpdates = new XenAdmin.Controls.DataGridViewEx.DataGridViewEx();
this.ColumnExpand = new System.Windows.Forms.DataGridViewImageColumn();
this.ColumnMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
@ -76,6 +76,7 @@
this.toolStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.tableLayoutPanel3.SuspendLayout();
this.tableLayoutPanel4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxProgress)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewUpdates)).BeginInit();
this.SuspendLayout();
@ -241,22 +242,10 @@
// tableLayoutPanel3
//
resources.ApplyResources(this.tableLayoutPanel3, "tableLayoutPanel3");
this.tableLayoutPanel3.Controls.Add(this.pictureBoxProgress, 0, 0);
this.tableLayoutPanel3.Controls.Add(this.labelProgress, 0, 1);
this.tableLayoutPanel3.Controls.Add(this.checkForUpdatesNowButton, 0, 2);
this.tableLayoutPanel3.Controls.Add(this.checkForUpdatesNowButton, 0, 1);
this.tableLayoutPanel3.Controls.Add(this.tableLayoutPanel4, 0, 0);
this.tableLayoutPanel3.Name = "tableLayoutPanel3";
//
// pictureBoxProgress
//
resources.ApplyResources(this.pictureBoxProgress, "pictureBoxProgress");
this.pictureBoxProgress.Name = "pictureBoxProgress";
this.pictureBoxProgress.TabStop = false;
//
// labelProgress
//
resources.ApplyResources(this.labelProgress, "labelProgress");
this.labelProgress.Name = "labelProgress";
//
// checkForUpdatesNowButton
//
resources.ApplyResources(this.checkForUpdatesNowButton, "checkForUpdatesNowButton");
@ -264,13 +253,24 @@
this.checkForUpdatesNowButton.UseVisualStyleBackColor = true;
this.checkForUpdatesNowButton.Click += new System.EventHandler(this.checkForUpdatesNowButton_Click);
//
// flickerFreePanel1
// tableLayoutPanel4
//
resources.ApplyResources(this.flickerFreePanel1, "flickerFreePanel1");
this.flickerFreePanel1.BackColor = System.Drawing.Color.WhiteSmoke;
this.flickerFreePanel1.BorderColor = System.Drawing.Color.Black;
this.flickerFreePanel1.BorderWidth = 1;
this.flickerFreePanel1.Name = "flickerFreePanel1";
resources.ApplyResources(this.tableLayoutPanel4, "tableLayoutPanel4");
this.tableLayoutPanel4.Controls.Add(this.labelProgress, 1, 0);
this.tableLayoutPanel4.Controls.Add(this.pictureBoxProgress, 0, 0);
this.tableLayoutPanel4.Cursor = System.Windows.Forms.Cursors.Arrow;
this.tableLayoutPanel4.Name = "tableLayoutPanel4";
//
// labelProgress
//
resources.ApplyResources(this.labelProgress, "labelProgress");
this.labelProgress.Name = "labelProgress";
//
// pictureBoxProgress
//
resources.ApplyResources(this.pictureBoxProgress, "pictureBoxProgress");
this.pictureBoxProgress.Name = "pictureBoxProgress";
this.pictureBoxProgress.TabStop = false;
//
// dataGridViewUpdates
//
@ -352,7 +352,6 @@
this.BackColor = System.Drawing.SystemColors.Control;
this.Controls.Add(this.tableLayoutPanel3);
this.Controls.Add(this.tableLayoutPanel2);
this.Controls.Add(this.flickerFreePanel1);
this.Controls.Add(this.tableLayoutPanel1);
this.Controls.Add(this.dataGridViewUpdates);
this.Name = "ManageUpdatesPage";
@ -366,6 +365,8 @@
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.tableLayoutPanel3.ResumeLayout(false);
this.tableLayoutPanel3.PerformLayout();
this.tableLayoutPanel4.ResumeLayout(false);
this.tableLayoutPanel4.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxProgress)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewUpdates)).EndInit();
this.ResumeLayout(false);
@ -396,7 +397,6 @@
private System.Windows.Forms.ToolStripMenuItem dismissAllToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem dismissSelectedToolStripMenuItem;
private System.Windows.Forms.ToolStripButton toolStripButtonRestoreDismissed;
private Controls.FlickerFreePanel flickerFreePanel1;
private System.Windows.Forms.Label AutoCheckForUpdatesDisabledLabel;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.DataGridViewImageColumn ColumnExpand;
@ -407,5 +407,6 @@
private System.Windows.Forms.LinkLabel checkForUpdatesNowButton2;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
private System.Windows.Forms.Button checkForUpdatesNowButton;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4;
}
}

View File

@ -101,8 +101,10 @@ namespace XenAdmin.TabPages
return;
toolStripButtonRefresh.Enabled = false;
toolStripButtonRestoreDismissed.Enabled = false;
StoreSelectedUpdates();
dataGridViewUpdates.Rows.Clear();
dataGridViewUpdates.Refresh();
spinningTimer.Start();
tableLayoutPanel3.Visible = true;
labelProgress.Text = Messages.AVAILABLE_UPDATES_SEARCHING;
@ -115,6 +117,7 @@ namespace XenAdmin.TabPages
{
checksQueue--;
toolStripButtonRefresh.Enabled = true;
toolStripButtonRestoreDismissed.Enabled = true;
spinningTimer.Stop();
if (succeeded)
@ -220,6 +223,7 @@ namespace XenAdmin.TabPages
{
labelProgress.Text = Messages.DISABLED_UPDATE_AUTOMATIC_CHECK_WARNING;
checkForUpdatesNowButton.Visible = true;
MakeWarningInvisible();
}
else
{

View File

@ -214,7 +214,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.ZOrder" xml:space="preserve">
<value>3</value>
<value>2</value>
</data>
<data name="tableLayoutPanel1.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="informationLabelIcon" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="informationLabel" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="Percent,100,Absolute,37" /&gt;&lt;/TableLayoutSettings&gt;</value>
@ -600,84 +600,6 @@
<data name="tableLayoutPanel3.ColumnCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="pictureBoxProgress.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>None</value>
</data>
<data name="pictureBoxProgress.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="pictureBoxProgress.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="pictureBoxProgress.Location" type="System.Drawing.Point, System.Drawing">
<value>211, 3</value>
</data>
<data name="pictureBoxProgress.Size" type="System.Drawing.Size, System.Drawing">
<value>43, 30</value>
</data>
<data name="pictureBoxProgress.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
<value>AutoSize</value>
</data>
<data name="pictureBoxProgress.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;pictureBoxProgress.Name" xml:space="preserve">
<value>pictureBoxProgress</value>
</data>
<data name="&gt;&gt;pictureBoxProgress.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pictureBoxProgress.Parent" xml:space="preserve">
<value>tableLayoutPanel3</value>
</data>
<data name="&gt;&gt;pictureBoxProgress.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="labelProgress.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left, Right</value>
</data>
<data name="labelProgress.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelProgress.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9.5pt, style=Bold</value>
</data>
<data name="labelProgress.ImageAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="labelProgress.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labelProgress.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 36</value>
</data>
<data name="labelProgress.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>170, 0</value>
</data>
<data name="labelProgress.Size" type="System.Drawing.Size, System.Drawing">
<value>459, 17</value>
</data>
<data name="labelProgress.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="labelProgress.Text" xml:space="preserve">
<value>Searching for updates...</value>
</data>
<data name="labelProgress.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleCenter</value>
</data>
<data name="&gt;&gt;labelProgress.Name" xml:space="preserve">
<value>labelProgress</value>
</data>
<data name="&gt;&gt;labelProgress.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelProgress.Parent" xml:space="preserve">
<value>tableLayoutPanel3</value>
</data>
<data name="&gt;&gt;labelProgress.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="checkForUpdatesNowButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top</value>
</data>
@ -691,10 +613,10 @@
<value>NoControl</value>
</data>
<data name="checkForUpdatesNowButton.Location" type="System.Drawing.Point, System.Drawing">
<value>161, 56</value>
<value>219, 45</value>
</data>
<data name="checkForUpdatesNowButton.Size" type="System.Drawing.Size, System.Drawing">
<value>142, 25</value>
<value>142, 24</value>
</data>
<data name="checkForUpdatesNowButton.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
@ -715,16 +637,130 @@
<value>tableLayoutPanel3</value>
</data>
<data name="&gt;&gt;checkForUpdatesNowButton.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanel4.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>None</value>
</data>
<data name="tableLayoutPanel4.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="tableLayoutPanel4.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="tableLayoutPanel3.Location" type="System.Drawing.Point, System.Drawing">
<value>157, 147</value>
<data name="labelProgress.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left, Right</value>
</data>
<data name="tableLayoutPanel3.RowCount" type="System.Int32, mscorlib">
<data name="labelProgress.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelProgress.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9.5pt, style=Bold</value>
</data>
<data name="labelProgress.ImageAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="labelProgress.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labelProgress.Location" type="System.Drawing.Point, System.Drawing">
<value>49, 9</value>
</data>
<data name="labelProgress.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>170, 0</value>
</data>
<data name="labelProgress.Size" type="System.Drawing.Size, System.Drawing">
<value>170, 17</value>
</data>
<data name="labelProgress.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="labelProgress.Text" xml:space="preserve">
<value>Searching for updates...</value>
</data>
<data name="labelProgress.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="&gt;&gt;labelProgress.Name" xml:space="preserve">
<value>labelProgress</value>
</data>
<data name="&gt;&gt;labelProgress.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelProgress.Parent" xml:space="preserve">
<value>tableLayoutPanel4</value>
</data>
<data name="&gt;&gt;labelProgress.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="pictureBoxProgress.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Right</value>
</data>
<data name="pictureBoxProgress.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="pictureBoxProgress.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="pictureBoxProgress.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="pictureBoxProgress.Size" type="System.Drawing.Size, System.Drawing">
<value>40, 30</value>
</data>
<data name="pictureBoxProgress.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
<value>AutoSize</value>
</data>
<data name="pictureBoxProgress.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;pictureBoxProgress.Name" xml:space="preserve">
<value>pictureBoxProgress</value>
</data>
<data name="&gt;&gt;pictureBoxProgress.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pictureBoxProgress.Parent" xml:space="preserve">
<value>tableLayoutPanel4</value>
</data>
<data name="&gt;&gt;pictureBoxProgress.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tableLayoutPanel4.Location" type="System.Drawing.Point, System.Drawing">
<value>179, 3</value>
</data>
<data name="tableLayoutPanel4.RowCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="tableLayoutPanel4.Size" type="System.Drawing.Size, System.Drawing">
<value>222, 36</value>
</data>
<data name="tableLayoutPanel4.TabIndex" type="System.Int32, mscorlib">
<value>15</value>
</data>
<data name="&gt;&gt;tableLayoutPanel4.Name" xml:space="preserve">
<value>tableLayoutPanel4</value>
</data>
<data name="&gt;&gt;tableLayoutPanel4.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanel4.Parent" xml:space="preserve">
<value>tableLayoutPanel3</value>
</data>
<data name="&gt;&gt;tableLayoutPanel4.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tableLayoutPanel4.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="labelProgress" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="pictureBoxProgress" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100,AutoSize,0" /&gt;&lt;Rows Styles="AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="tableLayoutPanel3.Location" type="System.Drawing.Point, System.Drawing">
<value>102, 156</value>
</data>
<data name="tableLayoutPanel3.RowCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="tableLayoutPanel3.Size" type="System.Drawing.Size, System.Drawing">
<value>465, 90</value>
<value>580, 72</value>
</data>
<data name="tableLayoutPanel3.TabIndex" type="System.Int32, mscorlib">
<value>14</value>
@ -742,40 +778,7 @@
<value>0</value>
</data>
<data name="tableLayoutPanel3.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="pictureBoxProgress" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="labelProgress" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="checkForUpdatesNowButton" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,Absolute,20" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="flickerFreePanel1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="flickerFreePanel1.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="flickerFreePanel1.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="flickerFreePanel1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="flickerFreePanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>775, 272</value>
</data>
<data name="flickerFreePanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>0, 0</value>
</data>
<data name="flickerFreePanel1.TabIndex" type="System.Int32, mscorlib">
<value>13</value>
</data>
<data name="&gt;&gt;flickerFreePanel1.Name" xml:space="preserve">
<value>flickerFreePanel1</value>
</data>
<data name="&gt;&gt;flickerFreePanel1.Type" xml:space="preserve">
<value>XenAdmin.Controls.FlickerFreePanel, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;flickerFreePanel1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;flickerFreePanel1.ZOrder" xml:space="preserve">
<value>2</value>
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="checkForUpdatesNowButton" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="tableLayoutPanel4" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,Absolute,17" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="dataGridViewUpdates.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</value>
@ -873,7 +876,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;dataGridViewUpdates.ZOrder" xml:space="preserve">
<value>4</value>
<value>3</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>