+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.
#include "buffer.h"
#include "lyxfunc.h"
#include "bufferlist.h"
+#include "support/filetools.h" // MakeAbsPath, MakeDisplayPath
using SigC::slot;
using std::vector;
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();
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;
}