mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 14:27:26 +01:00
Merge pull request #204 from GaborApatiNagy/CA-145350
CA-145350: Hard to clear error notification
This commit is contained in:
commit
eb47ea7018
@ -434,16 +434,6 @@ namespace XenAdmin
|
||||
{
|
||||
if (meddlingAction == null)
|
||||
SetStatusBar(Properties.Resources._000_error_h32bit_16, action.Exception.Message);
|
||||
|
||||
IXenObject model =
|
||||
(IXenObject)action.VM ??
|
||||
(IXenObject)action.Host ??
|
||||
(IXenObject)action.Pool ??
|
||||
(IXenObject)action.SR;
|
||||
if (model != null)
|
||||
model.InError = true;
|
||||
|
||||
RequestRefreshTreeView();
|
||||
}
|
||||
else if (meddlingAction == null)
|
||||
{
|
||||
@ -2692,12 +2682,7 @@ namespace XenAdmin
|
||||
|
||||
if (eventsPage.Visible)
|
||||
{
|
||||
// Unmark node if user has now seen error in log tab
|
||||
if (SelectionManager.Selection.FirstAsXenObject != null)
|
||||
SelectionManager.Selection.FirstAsXenObject.InError = false;
|
||||
|
||||
eventsPage.RefreshDisplayedEvents();
|
||||
RequestRefreshTreeView();
|
||||
}
|
||||
|
||||
loggedInLabel1.Connection = null;
|
||||
|
@ -501,7 +501,6 @@ namespace XenAdmin
|
||||
_index++;
|
||||
|
||||
IXenObject xenObject = obj as IXenObject;
|
||||
bool error = xenObject != null && xenObject.InError;
|
||||
bool highlighted = _highlightedDragTarget != null && obj != null && _highlightedDragTarget.Equals(obj);
|
||||
|
||||
if (highlighted)
|
||||
@ -510,12 +509,6 @@ namespace XenAdmin
|
||||
result.ForeColor = SystemColors.HighlightText;
|
||||
result.NodeFont = Program.DefaultFont;
|
||||
}
|
||||
else if (error)
|
||||
{
|
||||
result.BackColor = Program.ErrorBackColor;
|
||||
result.ForeColor = Program.ErrorForeColor;
|
||||
result.NodeFont = Program.DefaultFont;
|
||||
}
|
||||
else if (grayed)
|
||||
{
|
||||
result.BackColor = _treeViewBackColor;
|
||||
|
@ -44,9 +44,6 @@ namespace XenAPI
|
||||
|
||||
string Name { get; }
|
||||
|
||||
bool InError { get; set; }
|
||||
|
||||
|
||||
IXenConnection Connection { get; set; }
|
||||
|
||||
bool Locked { get; set; }
|
||||
|
@ -100,7 +100,6 @@ namespace XenAPI
|
||||
IXenObject result = (IXenObject)MemberwiseClone();
|
||||
result.ClearEventListeners();
|
||||
result.Locked = false;
|
||||
result.InError = false;
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -264,17 +263,9 @@ namespace XenAPI
|
||||
return s != null && int.TryParse(s, out result) ? result : def;
|
||||
}
|
||||
|
||||
private bool in_error;
|
||||
|
||||
public virtual string Name
|
||||
{
|
||||
get { return ""; }
|
||||
}
|
||||
|
||||
public bool InError
|
||||
{
|
||||
get { return in_error; }
|
||||
set { in_error = value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user