Prettify the names of the buffers displayed in the list of buffers.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2798 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2001-09-24 16:55:45 +00:00
parent d0fb0834e3
commit 90f609a396
2 changed files with 15 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2001-09-24 Angus Leeming <a.leeming@ic.ac.uk>
* ControlRef.C (getBufferList): use MakeDisplayPath on the list.
* (getLabelList): use MakeAbsPath on the buffer name passed to it.
2001-09-21 Angus Leeming <a.leeming@ic.ac.uk>
* ControlRef.h (disconnectOnApply): new method. Set to true.

View File

@ -26,6 +26,7 @@
#include "buffer.h"
#include "lyxfunc.h"
#include "bufferlist.h"
#include "support/filetools.h" // MakeAbsPath, MakeDisplayPath
using SigC::slot;
using std::vector;
@ -43,7 +44,7 @@ ControlRef::ControlRef(LyXView & lv, Dialogs & d)
vector<string> const ControlRef::getLabelList(string const & name) const
{
Buffer * buffer = bufferlist.getBuffer(name);
Buffer * buffer = bufferlist.getBuffer(MakeAbsPath(name));
if (!buffer)
buffer = lv_.buffer();
return buffer->getLabelList();
@ -65,7 +66,14 @@ void ControlRef::gotoBookmark() const
vector<string> const ControlRef::getBufferList() const
{
return bufferlist.getFileNames();
vector<string> buffers = bufferlist.getFileNames();
for (vector<string>::iterator it = buffers.begin();
it != buffers.end(); ++it) {
*it = MakeDisplayPath(*it);
}
return buffers;
}