r15946 by jghali - #9509: removing an open .sla makes scribus crash
scribus-commit
scribus-commit at lists.scribus.net
Mon Nov 22 00:28:40 CET 2010
Author: jghali
Date: Sun Nov 21 23:28:40 2010
New Revision: 15946
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=15946
Log:
#9509: removing an open .sla makes scribus crash
Modified:
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/scribus.h
trunk/Scribus/scribus/scribuscore.cpp
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15946&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Sun Nov 21 23:28:40 2010
@@ -382,7 +382,7 @@
if (scrActions["SaveAsDocumentTemplate"])
scrActions["SaveAsDocumentTemplate"]->setEnabled(false);
- connect(ScCore->fileWatcher, SIGNAL(fileDeleted(QString )), this, SLOT(removeRecent(QString)));
+ connect(ScCore->fileWatcher, SIGNAL(fileDeleted(QString )), this, SLOT(removeRecentFromWatcher(QString)));
connect(this, SIGNAL(TextStyle(const ParagraphStyle&)), propertiesPalette, SLOT(updateStyle(const ParagraphStyle&)));
connect(this, SIGNAL(TextIFont(QString)), propertiesPalette, SLOT(setFontFace(QString)));
connect(this, SIGNAL(TextISize(double)), propertiesPalette, SLOT(setSize(double)));
@@ -3158,14 +3158,20 @@
rebuildRecentFileMenu();
}
-void ScribusMainWindow::removeRecent(QString fn)
+void ScribusMainWindow::removeRecent(QString fn, bool fromFileWatcher)
{
if (RecentDocs.indexOf(fn) != -1)
{
RecentDocs.removeAll(fn);
- ScCore->fileWatcher->removeFile(fn);
+ if (!fromFileWatcher)
+ ScCore->fileWatcher->removeFile(fn);
}
rebuildRecentFileMenu();
+}
+
+void ScribusMainWindow::removeRecentFromWatcher(QString fn)
+{
+ removeRecent(fn, true);
}
void ScribusMainWindow::loadRecent(QString fn)
Modified: trunk/Scribus/scribus/scribus.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15946&path=/trunk/Scribus/scribus/scribus.h
==============================================================================
--- trunk/Scribus/scribus/scribus.h (original)
+++ trunk/Scribus/scribus/scribus.h Sun Nov 21 23:28:40 2010
@@ -311,7 +311,8 @@
*/
void slotFileAppend();
- void removeRecent(QString fn);
+ void removeRecent(QString fn, bool fromFileWatcher = false);
+ void removeRecentFromWatcher(QString fn);
void loadRecent(QString fn);
void rebuildRecentFileMenu();
void rebuildRecentPasteMenu();
Modified: trunk/Scribus/scribus/scribuscore.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15946&path=/trunk/Scribus/scribus/scribuscore.cpp
==============================================================================
--- trunk/Scribus/scribus/scribuscore.cpp (original)
+++ trunk/Scribus/scribus/scribuscore.cpp Sun Nov 21 23:28:40 2010
@@ -204,36 +204,6 @@
icm.setCompressionLevel(prefsManager->appPrefs.imageCachePrefs.compressionLevel);
icm.initialize();
- /*
- initPalettes();
-
- setSplashStatus( tr("Initializing Hyphenator") );
- QString preLang = prefsManager->appPrefs.Language;
- initHyphenator();
- if (Sprachen.contains(preLang))
- prefsManager->appPrefs.Language = preLang;
- setSplashStatus( tr("Reading Scrapbook") );
- initScrapbook();
- setSplashStatus( tr("Setting up Shortcuts") );
- SetShortCut();
- scrActions["helpTooltips"]->setChecked(prefsManager->appPrefs.showToolTips);
- ToggleTips();
-
- connect(fileWatcher, SIGNAL(fileDeleted(QString )), this, SLOT(removeRecent(QString)));
- connect(this, SIGNAL(TextIFont(const QString&)), propertiesPalette, SLOT(setFontFace(const QString&)));
- connect(this, SIGNAL(TextISize(int)), propertiesPalette, SLOT(setSize(int)));
- connect(this, SIGNAL(TextUSval(int)), propertiesPalette, SLOT(setExtra(int)));
- connect(this, SIGNAL(TextStil(int)), propertiesPalette, SLOT(setStil(int)));
- connect(this, SIGNAL(TextScale(int)), propertiesPalette, SLOT(setTScale(int)));
- connect(this, SIGNAL(TextScaleV(int)), propertiesPalette, SLOT(setTScaleV(int)));
- connect(this, SIGNAL(TextBase(int)), propertiesPalette, SLOT(setTBase(int)));
- connect(this, SIGNAL(TextShadow(int, int )), propertiesPalette, SLOT(setShadowOffs(int, int )));
- connect(this, SIGNAL(TextOutline(int)), propertiesPalette, SLOT(setOutlineW(int)));
- connect(this, SIGNAL(TextUnderline(int, int)), propertiesPalette, SLOT(setUnderline(int, int)));
- connect(this, SIGNAL(TextStrike(int, int)), propertiesPalette, SLOT(setStrike(int, int)));
- connect(this, SIGNAL(TextFarben(QString, QString, int, int)), propertiesPalette, SLOT(setActFarben(QString, QString, int, int)));
- }*/
-
return retVal;
}
More information about the scribus-commit
mailing list