Author: vfr
Date: Tue Jan 4 10:41:27 2011
New Revision: 37101
URL: http://www.lyx.org/trac/changeset/37101
Log:
Better fix for part 3 of bug #7182: LyX truncates file names to about 25 chars.
Now, when hovering the tabs, the full paths are shown as a tooltip.
see r37084.
Modified:
lyx-devel/trunk/src/frontends/qt4/GuiWorkArea.cpp
Modified: lyx-devel/trunk/src/frontends/qt4/GuiWorkArea.cpp
==============================================================================
--- lyx-devel/trunk/src/frontends/qt4/GuiWorkArea.cpp Tue Jan 4 10:21:18
2011 (r37100)
+++ lyx-devel/trunk/src/frontends/qt4/GuiWorkArea.cpp Tue Jan 4 10:41:27
2011 (r37101)
@@ -1578,8 +1578,7 @@
// when hiding it again below).
if (!(currentWorkArea() && currentWorkArea()->isFullScreen()))
showBar(count() > 0);
- int const index = addTab(wa, wa->windowTitle());
- setTabToolTip(index, wa->windowTitle());
+ addTab(wa, wa->windowTitle());
QObject::connect(wa, SIGNAL(titleChanged(GuiWorkArea *)),
this, SLOT(updateTabTexts()));
if (currentWorkArea() && currentWorkArea()->isFullScreen())
@@ -1868,12 +1867,13 @@
// set new tab titles
for (It it = paths.begin(); it != paths.end(); ++it) {
- GuiWorkArea * i_wa = workArea(it->tab());
- Buffer & buf = i_wa->bufferView().buffer();
+ int const tab_index = it->tab();
+ Buffer const & buf = workArea(tab_index)->bufferView().buffer();
+ QString tab_text = it->displayString();
if (!buf.fileName().empty() && !buf.isClean())
- setTabText(it->tab(), it->displayString() + "*");
- else
- setTabText(it->tab(), it->displayString());
+ tab_text += "*";
+ setTabText(tab_index, tab_text);
+ setTabToolTip(tab_index, it->abs());
}
}