rename a function

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8449 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2004-02-20 08:44:11 +00:00
parent c71c23dd78
commit 5ede7e4889
7 changed files with 27 additions and 20 deletions

View File

@ -1,3 +1,8 @@
2004-02-20 André Pönitz <poenitz@gmx.net>
* lyxfunc.[Ch]: rename view_status_message() to viewStatusMessage()
2004-02-16 Alfredo Braunstein <abraunst@lyx.org> 2004-02-16 Alfredo Braunstein <abraunst@lyx.org>
* text2.C (setCursorFromCoordinates): switch to absolute coords * text2.C (setCursorFromCoordinates): switch to absolute coords

View File

@ -1920,6 +1920,7 @@ string LCursor::currentState()
void LCursor::replaceWord(string const & replacestring) void LCursor::replaceWord(string const & replacestring)
{ {
LyXText * t = text(); LyXText * t = text();
BOOST_ASSERT(t);
t->replaceSelectionWithString(*this, replacestring); t->replaceSelectionWithString(*this, replacestring);
t->setSelectionRange(*this, replacestring.length()); t->setSelectionRange(*this, replacestring.length());

View File

@ -97,7 +97,7 @@ void GView::message(string const & msg)
void GView::showViewState() void GView::showViewState()
{ {
message(getLyXFunc().view_status_message()); message(getLyXFunc().viewStatusMessage());
} }
@ -112,16 +112,16 @@ void GView::busy(bool yes) const
if (yes ) { if (yes ) {
view()->hideCursor(); view()->hideCursor();
Gdk::Cursor cursor(Gdk::WATCH); Gdk::Cursor cursor(Gdk::WATCH);
const_cast<GView*>(this)->get_window()->set_cursor(cursor); const_cast<GView *>(this)->get_window()->set_cursor(cursor);
const_cast<GView*>(this)->set_sensitive(false); const_cast<GView *>(this)->set_sensitive(false);
} else { } else {
const_cast<GView*>(this)->get_window()->set_cursor(); const_cast<GView *>(this)->get_window()->set_cursor();
const_cast<GView*>(this)->set_sensitive(true); const_cast<GView *>(this)->set_sensitive(true);
} }
} }
void GView::clearMessage() void GView::clearMessage()
{ {
message(getLyXFunc().view_status_message()); message(getLyXFunc().viewStatusMessage());
} }

View File

@ -116,7 +116,7 @@ void QtView::focus_command_widget()
void QtView::update_view_state_qt() void QtView::update_view_state_qt()
{ {
statusBar()->message(toqstr(getLyXFunc().view_status_message())); statusBar()->message(toqstr(getLyXFunc().viewStatusMessage()));
statusbar_timer_.stop(); statusbar_timer_.stop();
} }
@ -127,7 +127,7 @@ void QtView::update_view_state()
if (statusbar_timer_.isActive()) if (statusbar_timer_.isActive())
return; return;
statusBar()->message(toqstr(getLyXFunc().view_status_message())); statusBar()->message(toqstr(getLyXFunc().viewStatusMessage()));
} }
@ -155,5 +155,5 @@ void QtView::busy(bool yes) const
if (yes) if (yes)
QApplication::setOverrideCursor(Qt::waitCursor); QApplication::setOverrideCursor(Qt::waitCursor);
else else
QApplication::restoreOverrideCursor(); QApplication::restoreOverrideCursor();
} }

View File

@ -55,12 +55,15 @@ XFormsView::XFormsView(int width, int height)
create_form_form_main(width, height); create_form_form_main(width, height);
fl_set_form_atclose(getForm(), C_XFormsView_atCloseMainFormCB, 0); fl_set_form_atclose(getForm(), C_XFormsView_atCloseMainFormCB, 0);
view_state_con = view_state_changed.connect(boost::bind(&XFormsView::show_view_state, this)); view_state_con =
focus_con = focus_command_buffer.connect(boost::bind(&XMiniBuffer::focus, minibuffer_.get())); view_state_changed.connect(boost::bind(&XFormsView::show_view_state, this));
focus_con =
focus_command_buffer.connect(boost::bind(&XMiniBuffer::focus, minibuffer_.get()));
// Make sure the buttons are disabled if needed. // Make sure the buttons are disabled if needed.
updateToolbar(); updateToolbar();
redraw_con = getDialogs().redrawGUI().connect(boost::bind(&XFormsView::redraw, this)); redraw_con =
getDialogs().redrawGUI().connect(boost::bind(&XFormsView::redraw, this));
} }
@ -188,13 +191,13 @@ void XFormsView::message(string const & str)
void XFormsView::clearMessage() void XFormsView::clearMessage()
{ {
message(getLyXFunc().view_status_message()); message(getLyXFunc().viewStatusMessage());
} }
void XFormsView::show_view_state() void XFormsView::show_view_state()
{ {
message(getLyXFunc().view_status_message()); message(getLyXFunc().viewStatusMessage());
} }

View File

@ -1729,18 +1729,16 @@ void LyXFunc::setStatusMessage(string const & m) const
} }
string const LyXFunc::view_status_message() string const LyXFunc::viewStatusMessage()
{ {
// When meta-fake key is pressed, show the key sequence so far + "M-". // When meta-fake key is pressed, show the key sequence so far + "M-".
if (wasMetaKey()) { if (wasMetaKey())
return keyseq.print() + "M-"; return keyseq.print() + "M-";
}
// Else, when a non-complete key sequence is pressed, // Else, when a non-complete key sequence is pressed,
// show the available options. // show the available options.
if (keyseq.length() > 0 && !keyseq.deleted()) { if (keyseq.length() > 0 && !keyseq.deleted())
return keyseq.printOptions(); return keyseq.printOptions();
}
if (!view()->available()) if (!view()->available())
return _("Welcome to LyX!"); return _("Welcome to LyX!");

View File

@ -45,7 +45,7 @@ public:
void dispatch(FuncRequest const &, bool verbose = false); void dispatch(FuncRequest const &, bool verbose = false);
/// return the status bar state string /// return the status bar state string
std::string const view_status_message(); std::string const viewStatusMessage();
/// ///
typedef boost::shared_ptr<LyXKeySym> LyXKeySymPtr; typedef boost::shared_ptr<LyXKeySym> LyXKeySymPtr;