mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-23 20:36:33 +01:00
Suggested UX enhancement: store the user's preferred updates view; note that
option to change this on the Options dialog has not been provided as deemed unnecessary. Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
parent
5f800f9816
commit
44d70e6867
14
XenAdmin/Properties/Settings.Designer.cs
generated
14
XenAdmin/Properties/Settings.Designer.cs
generated
@ -12,7 +12,7 @@ namespace XenAdmin.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
@ -825,5 +825,17 @@ namespace XenAdmin.Properties {
|
||||
this["EjectSharedIsoOnUpdate"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool ShowUpdatesByServer {
|
||||
get {
|
||||
return ((bool)(this["ShowUpdatesByServer"]));
|
||||
}
|
||||
set {
|
||||
this["ShowUpdatesByServer"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -191,5 +191,8 @@
|
||||
<Setting Name="EjectSharedIsoOnUpdate" Roaming="true" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="ShowUpdatesByServer" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
7
XenAdmin/TabPages/ManageUpdatesPage.Designer.cs
generated
7
XenAdmin/TabPages/ManageUpdatesPage.Designer.cs
generated
@ -121,6 +121,7 @@
|
||||
resources.ApplyResources(this.informationLabel, "informationLabel");
|
||||
this.informationLabel.Name = "informationLabel";
|
||||
this.informationLabel.TabStop = true;
|
||||
this.informationLabel.Click += new System.EventHandler(this.informationLabel_Click);
|
||||
//
|
||||
// tableLayoutPanel2
|
||||
//
|
||||
@ -164,13 +165,11 @@
|
||||
//
|
||||
// byUpdateToolStripMenuItem
|
||||
//
|
||||
this.byUpdateToolStripMenuItem.Checked = true;
|
||||
this.byUpdateToolStripMenuItem.CheckOnClick = true;
|
||||
this.byUpdateToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.byUpdateToolStripMenuItem.Image = global::XenAdmin.Properties.Resources.notif_updates_16;
|
||||
resources.ApplyResources(this.byUpdateToolStripMenuItem, "byUpdateToolStripMenuItem");
|
||||
this.byUpdateToolStripMenuItem.Name = "byUpdateToolStripMenuItem";
|
||||
this.byUpdateToolStripMenuItem.Click += new System.EventHandler(this.byUpdateToolStripMenuItem_Click);
|
||||
this.byUpdateToolStripMenuItem.CheckedChanged += new System.EventHandler(this.byUpdateToolStripMenuItem_CheckedChanged);
|
||||
//
|
||||
// byHostToolStripMenuItem
|
||||
//
|
||||
@ -178,7 +177,7 @@
|
||||
this.byHostToolStripMenuItem.Image = global::XenAdmin.Properties.Resources._000_TreeConnected_h32bit_16;
|
||||
resources.ApplyResources(this.byHostToolStripMenuItem, "byHostToolStripMenuItem");
|
||||
this.byHostToolStripMenuItem.Name = "byHostToolStripMenuItem";
|
||||
this.byHostToolStripMenuItem.Click += new System.EventHandler(this.byHostToolStripMenuItem_Click);
|
||||
this.byHostToolStripMenuItem.CheckedChanged += new System.EventHandler(this.byHostToolStripMenuItem_CheckedChanged);
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
|
@ -30,7 +30,6 @@
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
@ -62,7 +61,7 @@ namespace XenAdmin.TabPages
|
||||
private Timer spinningTimer = new Timer();
|
||||
private ImageList imageList = new ImageList();
|
||||
|
||||
Dictionary<string, bool> expandedState = new Dictionary<string, bool>();
|
||||
private Dictionary<string, bool> expandedState = new Dictionary<string, bool>();
|
||||
private List<string> selectedUpdates = new List<string>();
|
||||
private List<string> collapsedPoolRowsList = new List<string>();
|
||||
private int checksQueue;
|
||||
@ -75,11 +74,21 @@ namespace XenAdmin.TabPages
|
||||
InitializeProgressControls();
|
||||
tableLayoutPanel1.Visible = false;
|
||||
UpdateButtonEnablement();
|
||||
informationLabel.Click += informationLabel_Click;
|
||||
m_updateCollectionChangedWithInvoke = Program.ProgramInvokeHandler(UpdatesCollectionChanged);
|
||||
toolStripSplitButtonDismiss.DefaultItem = dismissAllToolStripMenuItem;
|
||||
toolStripSplitButtonDismiss.Text = dismissAllToolStripMenuItem.Text;
|
||||
toolStripButtonUpdate.Visible = false;
|
||||
|
||||
try
|
||||
{
|
||||
//ensure we won't try to rebuild the list while setting the initial view
|
||||
checksQueue++;
|
||||
byHostToolStripMenuItem.Checked = Properties.Settings.Default.ShowUpdatesByServer;
|
||||
byUpdateToolStripMenuItem.Checked = !Properties.Settings.Default.ShowUpdatesByServer;
|
||||
}
|
||||
finally
|
||||
{
|
||||
checksQueue--;
|
||||
}
|
||||
}
|
||||
|
||||
#region NotificationPage overrides
|
||||
@ -1416,42 +1425,43 @@ namespace XenAdmin.TabPages
|
||||
labelProgress.MaximumSize = new Size(tableLayoutPanel3.Width - 60, tableLayoutPanel3.Size.Height);
|
||||
}
|
||||
|
||||
private void byUpdateToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
private void byUpdateToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
// Adjust checked state
|
||||
byHostToolStripMenuItem.Checked = false;
|
||||
byUpdateToolStripMenuItem.Checked = true;
|
||||
|
||||
// buttons
|
||||
toolStripDropDownButtonDateFilter.Visible = true;
|
||||
toolStripSplitButtonDismiss.Visible = true;
|
||||
toolStripButtonRestoreDismissed.Visible = true;
|
||||
toolStripButtonUpdate.Visible = false;
|
||||
|
||||
// Switch the grid view
|
||||
dataGridViewUpdates.Visible = true;
|
||||
dataGridViewHosts.Visible = false;
|
||||
Rebuild();
|
||||
if (byUpdateToolStripMenuItem.Checked)
|
||||
{
|
||||
byHostToolStripMenuItem.Checked = false;
|
||||
ToggleView();
|
||||
}
|
||||
}
|
||||
|
||||
private void byHostToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
private void byHostToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
// Adjust checked state
|
||||
byUpdateToolStripMenuItem.Checked = false;
|
||||
byHostToolStripMenuItem.Checked = true;
|
||||
if (byHostToolStripMenuItem.Checked)
|
||||
{
|
||||
byUpdateToolStripMenuItem.Checked = false;
|
||||
ToggleView();
|
||||
}
|
||||
}
|
||||
|
||||
private void ToggleView()
|
||||
{
|
||||
//store the view
|
||||
Properties.Settings.Default.ShowUpdatesByServer = byHostToolStripMenuItem.Checked;
|
||||
|
||||
// buttons
|
||||
toolStripDropDownButtonDateFilter.Visible = false;
|
||||
toolStripSplitButtonDismiss.Visible = false;
|
||||
toolStripButtonRestoreDismissed.Visible = false;
|
||||
toolStripButtonUpdate.Visible = true;
|
||||
|
||||
// Turn off Date Filter
|
||||
toolStripDropDownButtonDateFilter.ResetFilterDates();
|
||||
toolStripDropDownButtonDateFilter.Visible = byUpdateToolStripMenuItem.Checked;
|
||||
toolStripSplitButtonDismiss.Visible = byUpdateToolStripMenuItem.Checked;
|
||||
toolStripButtonRestoreDismissed.Visible = byUpdateToolStripMenuItem.Checked;
|
||||
toolStripButtonUpdate.Visible = byHostToolStripMenuItem.Checked;
|
||||
|
||||
// Switch the grid view
|
||||
dataGridViewUpdates.Visible = false;
|
||||
dataGridViewHosts.Visible = true;
|
||||
dataGridViewUpdates.Visible = byUpdateToolStripMenuItem.Checked;
|
||||
dataGridViewHosts.Visible = byHostToolStripMenuItem.Checked;
|
||||
|
||||
// Turn off Date Filter for the updates-by-server view
|
||||
if (byHostToolStripMenuItem.Checked)
|
||||
toolStripDropDownButtonDateFilter.ResetFilterDates();
|
||||
|
||||
Rebuild();
|
||||
}
|
||||
|
||||
|
@ -186,6 +186,9 @@
|
||||
<setting name="EjectSharedIsoOnUpdate" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="ShowUpdatesByServer" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
</XenAdmin.Properties.Settings>
|
||||
</userSettings>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user