]> git.lyx.org Git - features.git/commitdiff
LyXErr and statusbar messages hsould have different routes.
authorPavel Sanda <sanda@lyx.org>
Sun, 3 Jan 2010 16:30:54 +0000 (16:30 +0000)
committerPavel Sanda <sanda@lyx.org>
Sun, 3 Jan 2010 16:30:54 +0000 (16:30 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32754 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiProgress.cpp
src/frontends/qt4/GuiProgress.h
src/frontends/qt4/GuiProgressView.cpp
src/frontends/qt4/GuiProgressView.h

index 7347f30ace4a5287a0786baddde2c95b2991a8e5..bcec51b4f073a538a2e0db9950a3087b102ad633 100644 (file)
@@ -98,7 +98,7 @@ void GuiProgress::doClearMessages()
 
 void GuiProgress::dolyxerrFlush()
 {
-       appendError(toqstr(lyxerr_stream_.str()));
+       appendLyXErrMessage(toqstr(lyxerr_stream_.str()));
        lyxerr_stream_.str("");
        // give the user a chance to disable debug messages because 
        // showing Debug::ANY messages completely blocks the GUI
index 23f47f7bcd3bcf176b8e4ff7cc3723eb2a69886c..4f5f5e7dd8fb9600dd053d317c8acb1d4424d125 100644 (file)
@@ -48,6 +48,7 @@ Q_SIGNALS:
        void appendError(QString const &);
        void clearMessages();
        void lyxerrFlush();
+       void appendLyXErrMessage(QString const & text);
 
        // Alert interface
        void warning(QString const & title, QString const & message);
index 06d53344aa5d614c26b24626e7e47ba82ce09640..cd6bac525558164cdcc6f9cea8d7c9f4af16754f 100644 (file)
@@ -84,6 +84,7 @@ GuiProgressView::GuiProgressView(GuiView & parent, Qt::DockWidgetArea area,
                connect(progress, SIGNAL(processStarted(QString const &)), this, SLOT(appendText(QString const &)));
                //connect(progress, SIGNAL(processFinished(QString const &)), this, SLOT(appendText(QString const &)));
                connect(progress, SIGNAL(appendMessage(QString const &)), this, SLOT(appendText(QString const &)));
+               connect(progress, SIGNAL(appendLyXErrMessage(QString const &)), this, SLOT(appendLyXErrText(QString const &)));
                connect(progress, SIGNAL(appendError(QString const &)), this, SLOT(appendText(QString const &)));
                connect(progress, SIGNAL(clearMessages()), this, SLOT(clearText()));
                progress->lyxerrConnect();
@@ -116,16 +117,23 @@ void GuiProgressView::clearText()
 }
 
 
+void GuiProgressView::appendLyXErrText(QString const & text)
+{
+       widget_->outTE->insertPlainText(text);
+       widget_->outTE->ensureCursorVisible();
+}
+
+
 void GuiProgressView::appendText(QString const & text)
 {
        if (text.isEmpty())
                return;
-       QString time = QTime::currentTime().toString();
-       if (text.endsWith("\n"))
-               widget_->outTE->insertPlainText(time + ": " + text);
-       else
-               widget_->outTE->insertPlainText(text);
+       QString str = QTime::currentTime().toString();
+       str += ": " + text;
+       if (!text.endsWith("\n"))
+               str += "\n";
 
+       widget_->outTE->insertPlainText(str);
        widget_->outTE->ensureCursorVisible();
 }
 
index 645ef6a1918884f9b4b2423f13a2b1a3fd2afd91..9a08dac133fbd49205ac96291db24dd1d939bcea 100644 (file)
@@ -70,6 +70,7 @@ public:
 
 private Q_SLOTS:
        void appendText(QString const & text);
+       void appendLyXErrText(QString const & text);
        void clearText();
 
        void levelChanged();