]> git.lyx.org Git - features.git/commitdiff
Bug Fix: Window title was not updated in new window.
authorAbdelrazak Younes <younes@lyx.org>
Sun, 5 Nov 2006 15:34:18 +0000 (15:34 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Sun, 5 Nov 2006 15:34:18 +0000 (15:34 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15750 a592a061-630c-0410-9148-cb99ea01b6c8

Status.15x
src/frontends/LyXView.C
src/frontends/qt4/GuiView.C

index 895b0737027051c0a9e69795fdc222eb4e9a276d..a2e2586a8622272920111575c1b1e26d31c097f0 100644 (file)
@@ -96,9 +96,6 @@ MULTIPLE WINDOWS / DOCUMENTS
   2) the easy way: disable the cursor on focus out event and re-enable it at
   focus in event and jump the saved position (at focus out).
 
-* The title bar does not contain the document name when a new window is opened
-  (Joost 4/11/06).
-
 * There should be a close button on the tabs (Joost 3/11/06).
 
 
@@ -240,12 +237,12 @@ CREDITS:
 * Performance on Windows is bad. On my system, scrolling the User Guide takes
   10 seconds with LyX 1.4 and more than 30 seconds with LyX 1.5. 
 
-  FIXED (Abdel 04/10/06): This was due to spurious message in QLPainter.C,
+  FIXED (Abdel 04/11/06): This was due to spurious message in QLPainter.C,
 
 * When I have the same document in two windows, only the last selected paragraph
   in one of the windows gets updated.
 
-  FIXED (Abdel 04/10/06): This was due my singlePar optimization. With my last
+  FIXED (Abdel 04/11/06): This was due my singlePar optimization. With my last
   commit, the optimization is enabled only if the WorkArea has the focus.
 
 * No icon for "note-next" in the "review" toolbar.
@@ -255,3 +252,11 @@ CREDITS:
 * Branches gui broken (buttons do nothing).
 
   FIXED (JSpitzm 2006-11-04).
+
+* The title bar does not contain the document name when a new window is opened
+  (Joost 4/11/06).
+
+  FIXED (Abdel 05/11/06): This was due to "last_title" being a static variable
+  in LyXView::updateWindowTitle() and also due to a potential bug in Qt:
+  an update command to the window title seems to be ignored up until the window
+  is shown.
index b5ad7531031a15cd22c946ab752d033c98fcdc52..fa6da758ada39808ba6f217ad806a71ab338950c 100644 (file)
@@ -375,7 +375,6 @@ void LyXView::updateLayoutChoice()
 
 void LyXView::updateWindowTitle()
 {
-       static docstring last_title = lyx::from_ascii("LyX");
        docstring maximize_title = lyx::from_ascii("LyX");
        docstring minimize_title = lyx::from_ascii("LyX");
 
@@ -393,10 +392,7 @@ void LyXView::updateWindowTitle()
                }
        }
 
-       if (maximize_title != last_title) {
-               setWindowTitle(maximize_title, minimize_title);
-               last_title = maximize_title;
-       }
+       setWindowTitle(maximize_title, minimize_title);
 }
 
 
index a74dc452ba5e1980e13e8f5c6230658a255ca8d2..6696e69f84f3ea7766c2ecb88f78bedab982a5e3 100644 (file)
@@ -220,6 +220,10 @@ void GuiView::setGeometry(unsigned int width,
        }
        
        show();
+
+       // For an unknown reason, the Window title update is not effective for
+       // the second windows up until it is shown on screen (Qt bug?).
+       updateWindowTitle();
 }
 
 
@@ -231,8 +235,12 @@ void GuiView::updateMenu(QAction * /*action*/)
 
 void GuiView::setWindowTitle(docstring const & t, docstring const & it)
 {
-       QMainWindow::setWindowTitle(toqstr(t));
-       QMainWindow::setWindowIconText(toqstr(it));
+       QString title = windowTitle();
+       QString new_title = toqstr(t);
+       if (title != new_title) {
+               QMainWindow::setWindowTitle(new_title);
+               QMainWindow::setWindowIconText(toqstr(it));
+       }
 }