r15511 by fschmid - Fixed Bug #9366: "New Scrapbook pages are only available after relaunching Scribus"

scribus-commit scribus-commit at lists.scribus.net
Fri Oct 8 20:57:12 CEST 2010


Author: fschmid
Date: Fri Oct  8 18:57:12 2010
New Revision: 15511

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=15511
Log:
Fixed Bug #9366: "New Scrapbook pages are only available after relaunching Scribus"

Modified:
    branches/Version135/Scribus/scribus/scrapbookpalette.cpp

Modified: branches/Version135/Scribus/scribus/scrapbookpalette.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15511&path=/branches/Version135/Scribus/scribus/scrapbookpalette.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/scrapbookpalette.cpp (original)
+++ branches/Version135/Scribus/scribus/scrapbookpalette.cpp Fri Oct  8 18:57:12 2010
@@ -680,11 +680,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(customContextMenuRequested (const QPoint &)), this, SLOT(HandleMouse(QPoint)));




More information about the scribus-commit mailing list