r15945 by jghali - #9509: removing an open .sla makes scribus crash
scribus-commit
scribus-commit at lists.scribus.net
Mon Nov 22 00:27:58 CET 2010
Author: jghali
Date: Sun Nov 21 23:27:58 2010
New Revision: 15945
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=15945
Log:
#9509: removing an open .sla makes scribus crash
Modified:
branches/Version135/Scribus/scribus/scribus.cpp
branches/Version135/Scribus/scribus/scribus.h
branches/Version135/Scribus/scribus/scribuscore.cpp
Modified: branches/Version135/Scribus/scribus/scribus.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15945&path=/branches/Version135/Scribus/scribus/scribus.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/scribus.cpp (original)
+++ branches/Version135/Scribus/scribus/scribus.cpp Sun Nov 21 23:27:58 2010
@@ -361,7 +361,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(removeRecentFromFileWatcher(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)));
@@ -3408,14 +3408,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::removeRecentFromFileWatcher(QString fn)
+{
+ removeRecent(fn, true);
}
void ScribusMainWindow::loadRecent(QString fn)
Modified: branches/Version135/Scribus/scribus/scribus.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15945&path=/branches/Version135/Scribus/scribus/scribus.h
==============================================================================
--- branches/Version135/Scribus/scribus/scribus.h (original)
+++ branches/Version135/Scribus/scribus/scribus.h Sun Nov 21 23:27:58 2010
@@ -305,7 +305,8 @@
*/
void slotFileAppend();
- void removeRecent(QString fn);
+ void removeRecent(QString fn, bool fromFileWatcher = false);
+ void removeRecentFromFileWatcher(QString fn);
void loadRecent(QString fn);
void rebuildRecentFileMenu();
void rebuildRecentPasteMenu();
Modified: branches/Version135/Scribus/scribus/scribuscore.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15945&path=/branches/Version135/Scribus/scribus/scribuscore.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/scribuscore.cpp (original)
+++ branches/Version135/Scribus/scribus/scribuscore.cpp Sun Nov 21 23:27:58 2010
@@ -200,35 +200,6 @@
m_HaveCMS = false;
getCMSProfiles(showProfileInfo);
initCMS();
- /*
- 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