-
-
Notifications
You must be signed in to change notification settings - Fork 348
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
Show status bar text, add progress bar #2245
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just add some small changes that the designer code requires
@@ -124,7 +124,6 @@ private void InitializeComponent() | |||
this.splitContainer1.SuspendLayout(); | |||
((System.ComponentModel.ISupportInitialize)(this.ModList)).BeginInit(); | |||
this.ModListContextMenuStrip.SuspendLayout(); | |||
this.StatusPanel.SuspendLayout(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add this.statusStrip1.SuspendLayout();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -1054,7 +1048,6 @@ private void InitializeComponent() | |||
this.splitContainer1.ResumeLayout(false); | |||
((System.ComponentModel.ISupportInitialize)(this.ModList)).EndInit(); | |||
this.ModListContextMenuStrip.ResumeLayout(false); | |||
this.StatusPanel.ResumeLayout(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add
this.statusStrip1.ResumeLayout(false);
this.statusStrip1.PerformLayout();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
this.StatusProgress.Minimum = 0; | ||
this.StatusProgress.Maximum = 100; | ||
this.StatusProgress.Size = new System.Drawing.Size(300, 20); | ||
this.StatusProgress.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add this.StatusProgress.Name = "StatusProgress";
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
GUI/Main.Designer.cs
Outdated
this.StatusLabel.Name = "StatusLabel"; | ||
this.StatusLabel.Size = new System.Drawing.Size(1050, 29); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leave Size
in
GUI/Main.Designer.cs
Outdated
this.statusStrip1.Name = "statusStrip1"; | ||
this.statusStrip1.Padding = new System.Windows.Forms.Padding(2, 0, 21, 0); | ||
this.statusStrip1.Size = new System.Drawing.Size(1544, 22); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leave Size
in
// statusStrip1 | ||
// | ||
this.statusStrip1.ImageScalingSize = new System.Drawing.Size(24, 24); | ||
this.statusStrip1.Location = new System.Drawing.Point(0, 1016); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leave Location
in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, the IDE probably needs that stuff for the graphical editor, doesn't it? OK...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Problems
CKAN's GUI has a status bar that is always empty:
And some code that tries to set it:
CKAN/GUI/MainDialogs.cs
Lines 23 to 27 in 378d128
Currently they aren't connected.
Causes
Two different status bar controls are in use at the moment: the one that is visible, and the one that receives the status messages from code.
statusStrip1
is the control that's actually visible. It has no contained controls and none of its properties are set by code during downloads/installs.StatusPanel
is a panel which is technically added to the form but not visible.StatusLabel
is a label which is added to this and which receives the status messages from the application, but again is not visible.Changes
The status bar code is rewritten according to the documentation for StatusStrip.
StatusPanel
is removedStatusLabel
is changed to typeSystem.Windows.Forms.ToolStripStatusLabel
and added tostatuStrip1
insteadToolStripProgressBar
control is added to mirror the behavior of the progress bar on the install screenTogether, these changes make the status bar work as intended: