Add visual indicator for http failures
This commit is contained in:
parent
340c972a11
commit
308b2cbc87
4 changed files with 15 additions and 4 deletions
|
|
@ -43,7 +43,8 @@ namespace MatterHackers.MatterControl.CustomWidgets.LibrarySelector
|
|||
public class FolderBreadCrumbWidget : FlowLayoutWidget
|
||||
{
|
||||
private static TextImageButtonFactory navigationButtonFactory = new TextImageButtonFactory();
|
||||
Action<LibraryProvider> SwitchToLibraryProvider;
|
||||
|
||||
private Action<LibraryProvider> SwitchToLibraryProvider;
|
||||
|
||||
public FolderBreadCrumbWidget(Action<LibraryProvider> SwitchToLibraryProvider, LibraryProvider currentLibraryProvider)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ namespace MatterHackers.MatterControl.PrintLibrary
|
|||
public abstract class LibraryRowItem : GuiWidget
|
||||
{
|
||||
public static readonly string LoadingPlaceholderToken = "!Placeholder_ItemToken!";
|
||||
public static readonly string LoadFailedPlaceholderToken = "!Placeholder_LoadFailedToken!";
|
||||
|
||||
public bool IsSelectedItem
|
||||
{
|
||||
|
|
|
|||
|
|
@ -71,9 +71,18 @@ namespace MatterHackers.MatterControl.PrintLibrary
|
|||
}
|
||||
|
||||
this.ItemName = libraryProvider.GetPrintItemName(itemIndex);
|
||||
if(this.ItemName == LibraryRowItem.LoadingPlaceholderToken)
|
||||
if(this.ItemName == LibraryRowItem.LoadingPlaceholderToken
|
||||
|| this.ItemName == LibraryRowItem.LoadFailedPlaceholderToken)
|
||||
{
|
||||
this.ItemName = "Retrieving Contents...".Localize();
|
||||
if(this.ItemName == LibraryRowItem.LoadingPlaceholderToken)
|
||||
{
|
||||
this.ItemName = "Retrieving Contents...".Localize();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ItemName = "Error Loading Contents".Localize();
|
||||
}
|
||||
|
||||
this.IsViewHelperItem = true;
|
||||
this.EnableSlideInActions = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ namespace MatterHackers.MatterControl.PrintLibrary.Provider
|
|||
|
||||
public abstract void RemoveItem(int itemIndexToRemove);
|
||||
|
||||
// Base implmentation simply calls RemoveItem
|
||||
// Base implementation simply calls RemoveItem
|
||||
public virtual void RemoveItems(int[] indexes)
|
||||
{
|
||||
// Remove items in reverse order
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue