switchKeyMap();
owner_->busy(false);
+ // reset the "Formatting..." message
+ owner_->clearMessage();
+
updateScrollbar();
return 0;
bv_->owner()->updateLayoutChoice();
bv_->fitCursor();
+ // slight hack: this is only called currently when
+ // we clicked somewhere, so we force through the display
+ // of the new status here.
+ bv_->owner()->clearMessage();
+
return res;
}
+2003-04-07 John Levon <levon@movementarian.org>
+
+ * BufferView_pimpl.C: clear message when doc finishes resizing,
+ and after a mouse event
+
+ * lyxfunc.C: clear message after exiting inset
+
2003-04-07 John Levon <levon@movementarian.org>
* bufferview_funcs.C: show math status not outside
/// display a message in the view
virtual void message(string const &) = 0;
+ /// clear any temporary message and replace with current status
+ virtual void clearMessage() = 0;
+
/// updates the title of the window
void updateWindowTitle();
+2003-04-07 John Levon <levon@movementarian.org>
+
+ * QtView.h:
+ * QtView.C: implement clearMessage()
+
2003-04-07 John Levon <levon@movementarian.org>
* QtView.h:
#include "MenuBackend.h"
#include "ToolbarBackend.h"
#include "lyxfunc.h"
-#include "bufferview_funcs.h"
#include "BufferView.h"
#include "frontends/Toolbar.h"
#include <qstatusbar.h>
using std::endl;
-using namespace bv_funcs;
namespace {
}
+void QtView::clearMessage()
+{
+ update_view_state_qt();
+}
+
+
void QtView::focus_command_widget()
{
commandbuffer_->focus_command();
void QtView::update_view_state_qt()
{
- statusBar()->message(toqstr(currentState(view().get())));
+ statusBar()->message(toqstr(getLyXFunc().view_status_message()));
statusbar_timer_.stop();
}
if (statusbar_timer_.isActive())
return;
- statusBar()->message(toqstr(currentState(view().get())));
+ statusBar()->message(toqstr(getLyXFunc().view_status_message()));
}
/// display a status message
virtual void message(string const & str);
+
+ /// clear status message
+ virtual void clearMessage();
+
public slots:
/// menu item has been selected
void activated(int id);
}
+void XFormsView::clearMessage()
+{
+ message(getLyXFunc().view_status_message());
+}
+
+
void XFormsView::show_view_state()
{
message(getLyXFunc().view_status_message());
/// display a status message
virtual void message(string const & str);
+ /// clear back to normal status message
+ virtual void clearMessage();
+
private:
/**
* setWindowTitle - set title of window
+2003-04-07 John Levon <levon@movementarian.org>
+
+ * insettabular.C:
+ * insettext.C: clear status message on inset exit
+
2003-04-03 John Levon <levon@movementarian.org>
* insetcommand.C: return dispatched on DIALOG_UPDATE
return result;
} else if (result == FINISHED_UP) {
action = LFUN_UP;
+ // Make sure to reset status message after
+ // exiting, e.g. math inset
+ bv->owner()->clearMessage();
} else if (result == FINISHED_DOWN) {
action = LFUN_DOWN;
+ bv->owner()->clearMessage();
} else if (result == FINISHED_RIGHT) {
action = LFUN_RIGHT;
+ bv->owner()->clearMessage();
+ } else if (result == FINISHED) {
+ bv->owner()->clearMessage();
}
}
}
the_locking_inset = 0;
updateLocal(bv, CURSOR, false);
+ // make sure status gets reset immediately
+ bv->owner()->clearMessage();
return result;
}
}
goto exit_with_message;
// If UNDISPATCHED, just soldier on
else if (result == FINISHED) {
+ owner->clearMessage();
goto exit_with_message;
// We do not need special RTL handling here:
// FINISHED means that the cursor should be
} else if (result == FINISHED_RIGHT) {
TEXT()->cursorRight(view());
moveCursorUpdate(true, false);
- owner->view_state_changed();
+ owner->clearMessage();
goto exit_with_message;
} else if (result == FINISHED_UP) {
if (TEXT()->cursor.irow() != TEXT()->rows().begin()) {
TEXT()->cursorUp(view());
#endif
moveCursorUpdate(true, false);
- owner->view_state_changed();
} else {
view()->update(TEXT(), BufferView::SELECT);
}
+ owner->clearMessage();
goto exit_with_message;
} else if (result == FINISHED_DOWN) {
if (boost::next(TEXT()->cursor.irow()) != TEXT()->rows().end()) {
TEXT()->cursorRight(view());
}
moveCursorUpdate(true, false);
- owner->view_state_changed();
+ owner->clearMessage();
goto exit_with_message;
}
#warning I am not sure this is still right, please have a look! (Jug 20020417)