+
+
+void LyXFunc::initMiniBuffer()
+{
+ string text = _("Welcome to LyX!");
+
+ // When meta-fake key is pressed, show the key sequence so far + "M-".
+ if (wasMetaKey()) {
+ keyseqStr();
+ text += "M-";
+ }
+
+ // Else, when a non-complete key sequence is pressed,
+ // show the available options.
+ else if (keyseqUncomplete())
+ text = keyseqOptions();
+
+ // Else, show the buffer state.
+ else if (owner->view()->available()) {
+ Buffer * tmpbuf = owner->buffer();
+
+ string const nicename =
+ MakeDisplayPath(tmpbuf->fileName());
+ // Should we do this instead? (kindo like emacs)
+ // leaves more room for other information
+ text = "LyX: ";
+ text += nicename;
+ if (tmpbuf->lyxvc.inUse()) {
+ text += " [";
+ text += tmpbuf->lyxvc.version();
+ text += ' ';
+ text += tmpbuf->lyxvc.locker();
+ if (tmpbuf->isReadonly())
+ text += " (RO)";
+ text += ']';
+ } else if (tmpbuf->isReadonly())
+ text += " [RO]";
+ if (!tmpbuf->isLyxClean())
+ text += _(" (Changed)");
+ } else {
+ if (text != _("Welcome to LyX!")) // this is a hack
+ text = _("* No document open *");
+ }
+
+ owner->message(text);
+}
+