avoid that the internal Buffer used for cut&paste is visible in View menu.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25732 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-07-20 17:55:38 +00:00
parent d861ab947f
commit ba7e6e2b03
2 changed files with 6 additions and 1 deletions

View File

@ -367,7 +367,7 @@ void putClipboard(ParagraphList const & paragraphs,
// some kind of garbage collection there, or a shared_ptr, then this // some kind of garbage collection there, or a shared_ptr, then this
// would not be needed. // would not be needed.
static Buffer * buffer = theBufferList().newBuffer( static Buffer * buffer = theBufferList().newBuffer(
FileName::tempName().absFilename()); FileName::tempName().absFilename() + "_clipboard.internal");
buffer->setUnnamed(true); buffer->setUnnamed(true);
buffer->paragraphs() = paragraphs; buffer->paragraphs() = paragraphs;
buffer->params().setDocumentClass(docclass); buffer->params().setDocumentClass(docclass);

View File

@ -680,6 +680,11 @@ void MenuDefinition::expandDocuments()
// We cannot use a for loop as the buffer list cycles. // We cannot use a for loop as the buffer list cycles.
do { do {
QString label = toqstr(b->fileName().displayName(20)); QString label = toqstr(b->fileName().displayName(20));
if (b->isUnnamed() && label.endsWith(".internal")) {
// This is an internal Buffer (eg. for clipboard operations)
b = theBufferList().next(b);
continue;
}
if (!b->isClean()) if (!b->isClean())
label += "*"; label += "*";
if (ii < 10) if (ii < 10)