Skip to content

Commit a3d66cc

Browse files
author
David Kinder
committed
Slightly better information message after installing extensions
1 parent 346620a commit a3d66cc

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

Inform7/ExtensionFrame.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -889,9 +889,14 @@ void ExtensionFrame::SetDownloadProgress(CFrameWnd* parent, int total, int curre
889889
void ExtensionFrame::ShowInstalledMessage(CWnd* parent, int installed, int total, LPCWSTR lastExt)
890890
{
891891
CStringW head, msg;
892+
LPCWSTR icon = NULL;
893+
892894
if (total > installed)
893895
{
894896
// One or more errors
897+
head = L"Installation error.";
898+
icon = TD_ERROR_ICON;
899+
895900
if (installed > 0)
896901
{
897902
if (installed == 1)
@@ -911,11 +916,16 @@ void ExtensionFrame::ShowInstalledMessage(CWnd* parent, int installed, int total
911916
{
912917
// No errors
913918
head = L"Installation complete.";
914-
if (installed > 1)
919+
icon = TD_INFORMATION_ICON;
920+
921+
if (total == 0)
922+
msg = "Nothing to install.";
923+
else if (installed > 1)
915924
msg.Format(L"%d extensions installed successfully.",installed);
916925
else
917926
msg.Format(L"Extension %s installed successfully.",lastExt);
918927
}
928+
919929
::TaskDialog(parent->GetSafeHwnd(),0,
920930
L_INFORM_TITLE,head,msg,TDCBF_OK_BUTTON,TD_INFORMATION_ICON,NULL);
921931
}

0 commit comments

Comments
 (0)