]> git.lyx.org Git - lyx.git/commitdiff
rename a function
authorAndré Pönitz <poenitz@gmx.net>
Fri, 20 Feb 2004 08:44:11 +0000 (08:44 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Fri, 20 Feb 2004 08:44:11 +0000 (08:44 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8449 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/cursor.C
src/frontends/gtk/GView.C
src/frontends/qt2/QtView.C
src/frontends/xforms/XFormsView.C
src/lyxfunc.C
src/lyxfunc.h

index 36b96450c42ebd898d35d356b7e81458a7c5344f..da9c31955db901f9070c23e0a642258ae5d29842 100644 (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>
 
        * text2.C (setCursorFromCoordinates): switch to absolute coords
index 5cf84efe88dbdff45edae32ae7c938be32b5c5fe..50d630ec8501b1bb42a8129781f2fe6380658ebf 100644 (file)
@@ -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());
index aed312b427570176ae893c8b356f48126dac8659..9eaa217c0972757d40e84516dff391d7447c1520 100644 (file)
@@ -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<GView*>(this)->get_window()->set_cursor(cursor);
-               const_cast<GView*>(this)->set_sensitive(false);
+               const_cast<GView *>(this)->get_window()->set_cursor(cursor);
+               const_cast<GView *>(this)->set_sensitive(false);
        } else {
-               const_cast<GView*>(this)->get_window()->set_cursor();
-               const_cast<GView*>(this)->set_sensitive(true);
+               const_cast<GView *>(this)->get_window()->set_cursor();
+               const_cast<GView *>(this)->set_sensitive(true);
        }
 }
 
 
 void GView::clearMessage()
 {
-       message(getLyXFunc().view_status_message());
+       message(getLyXFunc().viewStatusMessage());
 }
index d4e055e561c917858d0ac7e1d19954fc8c79cfe2..6eb8197ea40d16e2c4d4d5003c47322218916478 100644 (file)
@@ -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();
 }
index 8a3409c5a42031f636d4ed684727d78eb4f878cc..e0b7208c1692f13299fc623ec013e5a9017436d6 100644 (file)
@@ -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());
 }
 
 
index c88a6208a6c613ddca72af3ee0abf08a4b4a5135..370560c4c21d6b5df7b44381fee234090b3ffb9a 100644 (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-".
-       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!");
index 399a64055a64d9d88b733f553238028630da52fa..63a690f2a0e667dc370305836241d49e7c3b5975 100644 (file)
@@ -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<LyXKeySym> LyXKeySymPtr;