Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove newline from Done progress message #2580

Merged
merged 1 commit into from
Nov 21, 2018

Conversation

HebaruSan
Copy link
Member

Problem

I may be the only person bothered by this, but if you install mods in GUI, at the end the label above the progress bar says "(Done!" without a close parenthesis:

image

(I think you may even be able to see some of the rest of the message wrapped onto the next line in Mono.)

Cause

There's a "\r\n" in the RaiseProgress message at the end of the install flow:

User.RaiseProgress("Done!\r\n", 100);

GUI inserts this string into the middle of a larger formatted string, which is then split in half at that point:

Main.Instance.SetDescription($"{format} - {percent}%");

CKAN/GUI/MainWait.cs

Lines 99 to 102 in e5fc437

public void SetDescription(string message)
{
Util.Invoke(MessageTextBox, () => MessageTextBox.Text = "(" + message + ")");
}

The newline was probably included to make installing via CmdLine look better.

Changes

Now that newline sequence is removed and the close parenthesis appears:

image

A newline is added to the CmdLine install code to make it look the same as before.

@HebaruSan HebaruSan added Core (ckan.dll) Issues affecting the core part of CKAN Pull request labels Nov 17, 2018
@politas politas merged commit 495089c into KSP-CKAN:master Nov 21, 2018
@HebaruSan HebaruSan deleted the fix/progress-newline branch November 21, 2018 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core (ckan.dll) Issues affecting the core part of CKAN Pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants