mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-05 13:26:21 +00:00
reset the status message on leaving an inset or clicking with the mous
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6727 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
83c29bbf28
commit
5d67f7c617
@ -337,6 +337,9 @@ int BufferView::Pimpl::resizeCurrentBuffer()
|
||||
switchKeyMap();
|
||||
owner_->busy(false);
|
||||
|
||||
// reset the "Formatting..." message
|
||||
owner_->clearMessage();
|
||||
|
||||
updateScrollbar();
|
||||
|
||||
return 0;
|
||||
@ -937,6 +940,11 @@ bool BufferView::Pimpl::workAreaDispatch(FuncRequest const & ev_in)
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,10 @@
|
||||
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
|
||||
|
@ -124,6 +124,9 @@ public:
|
||||
/// 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();
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2003-04-07 John Levon <levon@movementarian.org>
|
||||
|
||||
* QtView.h:
|
||||
* QtView.C: implement clearMessage()
|
||||
|
||||
2003-04-07 John Levon <levon@movementarian.org>
|
||||
|
||||
* QtView.h:
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "MenuBackend.h"
|
||||
#include "ToolbarBackend.h"
|
||||
#include "lyxfunc.h"
|
||||
#include "bufferview_funcs.h"
|
||||
#include "BufferView.h"
|
||||
|
||||
#include "frontends/Toolbar.h"
|
||||
@ -41,7 +40,6 @@
|
||||
#include <qstatusbar.h>
|
||||
|
||||
using std::endl;
|
||||
using namespace bv_funcs;
|
||||
|
||||
namespace {
|
||||
|
||||
@ -109,6 +107,12 @@ void QtView::message(string const & str)
|
||||
}
|
||||
|
||||
|
||||
void QtView::clearMessage()
|
||||
{
|
||||
update_view_state_qt();
|
||||
}
|
||||
|
||||
|
||||
void QtView::focus_command_widget()
|
||||
{
|
||||
commandbuffer_->focus_command();
|
||||
@ -117,7 +121,7 @@ void QtView::focus_command_widget()
|
||||
|
||||
void QtView::update_view_state_qt()
|
||||
{
|
||||
statusBar()->message(toqstr(currentState(view().get())));
|
||||
statusBar()->message(toqstr(getLyXFunc().view_status_message()));
|
||||
statusbar_timer_.stop();
|
||||
}
|
||||
|
||||
@ -128,7 +132,7 @@ void QtView::update_view_state()
|
||||
if (statusbar_timer_.isActive())
|
||||
return;
|
||||
|
||||
statusBar()->message(toqstr(currentState(view().get())));
|
||||
statusBar()->message(toqstr(getLyXFunc().view_status_message()));
|
||||
}
|
||||
|
||||
|
||||
|
@ -42,6 +42,10 @@ public:
|
||||
|
||||
/// 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);
|
||||
|
@ -189,6 +189,12 @@ void XFormsView::message(string const & str)
|
||||
}
|
||||
|
||||
|
||||
void XFormsView::clearMessage()
|
||||
{
|
||||
message(getLyXFunc().view_status_message());
|
||||
}
|
||||
|
||||
|
||||
void XFormsView::show_view_state()
|
||||
{
|
||||
message(getLyXFunc().view_status_message());
|
||||
|
@ -53,6 +53,9 @@ public:
|
||||
/// 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
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
@ -854,10 +854,17 @@ Inset::RESULT InsetTabular::localDispatch(FuncRequest const & cmd)
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1146,6 +1146,8 @@ Inset::RESULT InsetText::localDispatch(FuncRequest const & ev)
|
||||
}
|
||||
the_locking_inset = 0;
|
||||
updateLocal(bv, CURSOR, false);
|
||||
// make sure status gets reset immediately
|
||||
bv->owner()->clearMessage();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@ -818,6 +818,7 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
|
||||
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
|
||||
@ -825,7 +826,7 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
|
||||
} 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()) {
|
||||
@ -839,10 +840,10 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
|
||||
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()) {
|
||||
@ -860,7 +861,7 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user