r15502 by fschmid - Fixed bug #9366: "New Scrapbook pages are only available after relaunching Scribus"
scribus-commit
scribus-commit at lists.scribus.net
Thu Oct 7 22:23:23 CEST 2010
Author: fschmid
Date: Thu Oct 7 20:23:23 2010
New Revision: 15502
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=15502
Log:
Fixed bug #9366: "New Scrapbook pages are only available after relaunching Scribus"
Modified:
trunk/Scribus/scribus/ui/scrapbookpalette.cpp
Modified: trunk/Scribus/scribus/ui/scrapbookpalette.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15502&path=/trunk/Scribus/scribus/ui/scrapbookpalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/scrapbookpalette.cpp (original)
+++ trunk/Scribus/scribus/ui/scrapbookpalette.cpp Thu Oct 7 20:23:23 2010
@@ -839,11 +839,19 @@
disconnect(Frame3, SIGNAL(currentChanged(int)), this, SLOT(libChanged(int )));
QDir d(fileName);
activeBView = new BibView(this);
- Frame3->addItem(activeBView, d.dirName());
+ QFileInfo fd(fileName);
+ activeBView->canWrite = fd.isWritable();
+ activeBView->setAcceptDrops(activeBView->canWrite);
+ if (activeBView->canWrite)
+ Frame3->addItem(activeBView, d.dirName());
+ else
+ Frame3->addItem(activeBView, QIcon(loadIcon("16/lock.png")), d.dirName());
+ activeBView->ReadContents(fileName);
activeBView->ScFilename = fileName;
Frame3->setCurrentWidget(activeBView);
d.cdUp();
dirs->set("scrap_load", d.absolutePath());
+ activeBView->scrollToTop();
connect(Frame3, SIGNAL(currentChanged(int)), this, SLOT(libChanged(int )));
connect(activeBView, SIGNAL(objDropped(QString)), this, SLOT(ObjFromMenu(QString)));
connect(activeBView, SIGNAL(fileDropped(QString, int)), this, SLOT(ObjFromFile(QString, int)));
More information about the scribus-commit
mailing list