From 5ede7e4889b088219326a1d4a94a0a2a732a1379 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Fri, 20 Feb 2004 08:44:11 +0000 Subject: [PATCH] rename a function git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8449 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 5 +++++ src/cursor.C | 1 + src/frontends/gtk/GView.C | 12 ++++++------ src/frontends/qt2/QtView.C | 6 +++--- src/frontends/xforms/XFormsView.C | 13 ++++++++----- src/lyxfunc.C | 8 +++----- src/lyxfunc.h | 2 +- 7 files changed, 27 insertions(+), 20 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 36b96450c4..da9c31955d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ + +2004-02-20 André Pönitz + + * lyxfunc.[Ch]: rename view_status_message() to viewStatusMessage() + 2004-02-16 Alfredo Braunstein * text2.C (setCursorFromCoordinates): switch to absolute coords diff --git a/src/cursor.C b/src/cursor.C index 5cf84efe88..50d630ec85 100644 --- a/src/cursor.C +++ b/src/cursor.C @@ -1920,6 +1920,7 @@ string LCursor::currentState() void LCursor::replaceWord(string const & replacestring) { LyXText * t = text(); + BOOST_ASSERT(t); t->replaceSelectionWithString(*this, replacestring); t->setSelectionRange(*this, replacestring.length()); diff --git a/src/frontends/gtk/GView.C b/src/frontends/gtk/GView.C index aed312b427..9eaa217c09 100644 --- a/src/frontends/gtk/GView.C +++ b/src/frontends/gtk/GView.C @@ -97,7 +97,7 @@ void GView::message(string const & msg) void GView::showViewState() { - message(getLyXFunc().view_status_message()); + message(getLyXFunc().viewStatusMessage()); } @@ -112,16 +112,16 @@ void GView::busy(bool yes) const if (yes ) { view()->hideCursor(); Gdk::Cursor cursor(Gdk::WATCH); - const_cast(this)->get_window()->set_cursor(cursor); - const_cast(this)->set_sensitive(false); + const_cast(this)->get_window()->set_cursor(cursor); + const_cast(this)->set_sensitive(false); } else { - const_cast(this)->get_window()->set_cursor(); - const_cast(this)->set_sensitive(true); + const_cast(this)->get_window()->set_cursor(); + const_cast(this)->set_sensitive(true); } } void GView::clearMessage() { - message(getLyXFunc().view_status_message()); + message(getLyXFunc().viewStatusMessage()); } diff --git a/src/frontends/qt2/QtView.C b/src/frontends/qt2/QtView.C index d4e055e561..6eb8197ea4 100644 --- a/src/frontends/qt2/QtView.C +++ b/src/frontends/qt2/QtView.C @@ -116,7 +116,7 @@ void QtView::focus_command_widget() void QtView::update_view_state_qt() { - statusBar()->message(toqstr(getLyXFunc().view_status_message())); + statusBar()->message(toqstr(getLyXFunc().viewStatusMessage())); statusbar_timer_.stop(); } @@ -127,7 +127,7 @@ void QtView::update_view_state() if (statusbar_timer_.isActive()) 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) QApplication::setOverrideCursor(Qt::waitCursor); else - QApplication::restoreOverrideCursor(); + QApplication::restoreOverrideCursor(); } diff --git a/src/frontends/xforms/XFormsView.C b/src/frontends/xforms/XFormsView.C index 8a3409c5a4..e0b7208c16 100644 --- a/src/frontends/xforms/XFormsView.C +++ b/src/frontends/xforms/XFormsView.C @@ -55,12 +55,15 @@ XFormsView::XFormsView(int width, int height) create_form_form_main(width, height); fl_set_form_atclose(getForm(), C_XFormsView_atCloseMainFormCB, 0); - view_state_con = view_state_changed.connect(boost::bind(&XFormsView::show_view_state, this)); - focus_con = focus_command_buffer.connect(boost::bind(&XMiniBuffer::focus, minibuffer_.get())); + view_state_con = + 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. 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() { - message(getLyXFunc().view_status_message()); + message(getLyXFunc().viewStatusMessage()); } void XFormsView::show_view_state() { - message(getLyXFunc().view_status_message()); + message(getLyXFunc().viewStatusMessage()); } diff --git a/src/lyxfunc.C b/src/lyxfunc.C index c88a6208a6..370560c4c2 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -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-". - if (wasMetaKey()) { + if (wasMetaKey()) return keyseq.print() + "M-"; - } // Else, when a non-complete key sequence is pressed, // show the available options. - if (keyseq.length() > 0 && !keyseq.deleted()) { + if (keyseq.length() > 0 && !keyseq.deleted()) return keyseq.printOptions(); - } if (!view()->available()) return _("Welcome to LyX!"); diff --git a/src/lyxfunc.h b/src/lyxfunc.h index 399a64055a..63a690f2a0 100644 --- a/src/lyxfunc.h +++ b/src/lyxfunc.h @@ -45,7 +45,7 @@ public: void dispatch(FuncRequest const &, bool verbose = false); /// return the status bar state string - std::string const view_status_message(); + std::string const viewStatusMessage(); /// typedef boost::shared_ptr LyXKeySymPtr; -- 2.39.2