Show the shortcuts report at startup.

master
Pacman Ghost 5 years ago
parent 7da86a0dd8
commit 6d1c65ceda
  1. 22
      src/MainForm.cs

@ -107,16 +107,20 @@ public partial class MainForm : Form
string unconfiguredImages = Program.getStartupMsgs( "unconfigured-image", "WARNING: Found image files with no configuration:" ) ;
string badShortcuts = Program.getStartupMsgs( "bad-shortcut", "WARNING: Couldn't parse shortcuts:" ) ;
string otherMsgs = Program.getStartupMsgs( "", "" ) ;
string buf = "" ;
string fname = Path.Combine( Program.resourcesDir, "startup-msgs.html" ) ;
if ( File.Exists( fname ) ) {
buf = File.ReadAllText( fname ) ;
buf = buf.Replace( "{{UNUSED-CONFIGS}}", unusedConfigs ) ;
buf = buf.Replace( "{{UNCONFIGURED-IMAGES}}", unconfiguredImages ) ;
buf = buf.Replace( "{{BAD-SHORTCUTS}}", badShortcuts ) ;
buf = buf.Replace( "{{OTHER-MESSAGES}}", otherMsgs ) ;
if ( unusedConfigs != "" || unconfiguredImages != "" || badShortcuts != "" || otherMsgs != "" ) {
string fname = Path.Combine( Program.resourcesDir, "startup-msgs.html" ) ;
if ( File.Exists( fname ) ) {
string buf = File.ReadAllText( fname ) ;
buf = buf.Replace( "{{UNUSED-CONFIGS}}", unusedConfigs ) ;
buf = buf.Replace( "{{UNCONFIGURED-IMAGES}}", unconfiguredImages ) ;
buf = buf.Replace( "{{BAD-SHORTCUTS}}", badShortcuts ) ;
buf = buf.Replace( "{{OTHER-MESSAGES}}", otherMsgs ) ;
mWebBrowser.DocumentText = buf ;
}
} else {
// NOTE: Nothing bad happened, just show the shortcuts report.
showShortcuts() ;
}
mWebBrowser.DocumentText = buf ;
// allow searches
mSearchLabel.Enabled = true ;

Loading…
Cancel
Save