if (keyseq.length() > 0 && !keyseq.deleted())
return keyseq.printOptions(true);
- LyXView * lv = theApp()->currentWindow();
- LASSERT(lv, /**/);
- if (!lv->currentBufferView())
- return _("Welcome to LyX!");
-
- return lv->currentBufferView()->cursor().currentState();
+ return docstring();
}
{
if (!hasFocus())
return;
- statusBar()->showMessage(toqstr(theLyXFunc().viewStatusMessage()));
+ showMessage();
d.statusbar_timer_.stop();
}
if (d.statusbar_timer_.isActive())
return;
- statusBar()->showMessage(toqstr(theLyXFunc().viewStatusMessage()));
+ showMessage();
+}
+
+
+void GuiView::showMessage()
+{
+ QString msg = toqstr(theLyXFunc().viewStatusMessage());
+ if (msg.isEmpty()) {
+ BufferView const * bv = currentBufferView();
+ if (bv)
+ msg = toqstr(bv->cursor().currentState());
+ else
+ msg = qt_("Welcome to LyX!");
+ }
+ statusBar()->showMessage(msg);
}