Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 80 → Rev 81

/trunk/Scribus/ChangeLogCVS
1,4 → 1,6
Changes since Version 1.1.1
17.10.2003 The AutoSave Option is now working again.
 
16.10.2003 Included Paul patches with only one small correction.
Updated the German translation.
 
/trunk/Scribus/scribus/libabout/about.cpp
32,7 → 32,7
tabLayout1->addWidget( PixmapLabel1 );
BuildID = new QLabel( tab, "BB" );
BuildID->setAlignment(Qt::AlignCenter);
QString bu = "16. October 2003 ";
QString bu = "17. October 2003 ";
#ifdef HAVE_CMS
bu += "C";
#else
/trunk/Scribus/scribus/scribuswin.h
55,9 → 55,12
int NrItems;
int First;
int Last;
public slots:
void slotAutoSave();
signals:
void Schliessen();
void SaveAndClose();
void AutoSaved();
};
 
#endif
/trunk/Scribus/scribus/scribus.cpp
175,7 → 175,7
SCFontsIterator it(Prefs.AvailFonts);
Prefs.DefFont = it.currentKey();
Prefs.DefSize = 12;
Prefs.AppFontSize = 12;
Prefs.AppFontSize = qApp->font().pointSize();
/** Default Farbenliste */
Prefs.DColors.clear();
Prefs.DColors.insert("White", CMYKColor(0, 0, 0, 0));
1537,7 → 1537,8
else
w->show();
view->show();
connect(doc->ASaveTimer, SIGNAL(timeout()), this, SLOT(slotAutoSave()));
connect(doc->ASaveTimer, SIGNAL(timeout()), w, SLOT(slotAutoSave()));
connect(w, SIGNAL(AutoSaved()), this, SLOT(slotAutoSaved()));
doc->AutoSave = Prefs.AutoSave;
if (doc->AutoSave)
doc->ASaveTimer->start(Prefs.AutoSaveTime);
1734,6 → 1735,7
DatNeu->setEnabled(true);
DatOpe->setEnabled(true);
DatClo->setEnabled(true);
DatSav->setEnabled(doc->isModified());
fileMenu->setItemEnabled(fid1, 1);
fileMenu->setItemEnabled(fid4, ActWin->MenuStat[2]);
fileMenu->setItemEnabled(fid5, ActWin->MenuStat[3]);
2448,7 → 2450,8
w->show();
view->show();
newActWin(w);
connect(doc->ASaveTimer, SIGNAL(timeout()), this, SLOT(slotAutoSave()));
connect(doc->ASaveTimer, SIGNAL(timeout()), w, SLOT(slotAutoSave()));
connect(w, SIGNAL(AutoSaved()), this, SLOT(slotAutoSaved()));
doc->AutoSave = Prefs.AutoSave;
if (doc->AutoSave)
doc->ASaveTimer->start(Prefs.AutoSaveTime);
2517,14 → 2520,14
}
}
 
void ScribusApp::slotAutoSave()
void ScribusApp::slotAutoSaved()
{
/* Disabled temporary because of some Problems, RaceCondition
if ((doc->hasName) && (doc->isModified()) && (!doc->TemplateMode))
{
system("mv -f " + doc->DocName + " " + doc->DocName+".bak");
DoFileSave(doc->DocName);
} */
if (ActWin == sender())
{
fileMenu->setItemEnabled(fid4, 0);
DatSav->setEnabled(false);
ActWin->setCaption(doc->DocName);
}
}
 
void ScribusApp::slotFileSave()
2617,7 → 2620,8
{
uint a;
doc->ASaveTimer->stop();
disconnect(doc->ASaveTimer, SIGNAL(timeout()), this, SLOT(slotAutoSave()));
disconnect(doc->ASaveTimer, SIGNAL(timeout()), doc->WinHan, SLOT(slotAutoSave()));
disconnect(doc->WinHan, SIGNAL(AutoSaved()), this, SLOT(slotAutoSaved()));
if ((doc->UnData.UnCode == 0) && (doc->UnDoValid))
delete doc->UnData.Item;
if (CMSavail)
6303,6 → 6307,9
switch (doc->UnData.UnCode)
{
case 0:
b->NextBox = 0;
b->BackBox = 0;
b->isAutoText = false;
view->Pages.at(doc->UnData.PageNr)->Items.insert(b->ItemNr, b);
for (a = 0; a < view->Pages.at(doc->UnData.PageNr)->Items.count(); ++a)
{
/trunk/Scribus/scribus/scribus.h
201,7 → 201,7
void LoadRecent(int id);
bool slotDocOpen();
bool LadeDoc(QString fileName);
void slotAutoSave();
void slotAutoSaved();
/** save a document */
void slotFileSave();
/** save a document under a different filename*/
/trunk/Scribus/scribus/scribuswin.cpp
14,9 → 14,11
* (at your option) any later version. *
* *
***************************************************************************/
 
#include <qfileinfo.h>
#include <qdir.h>
#include "scribuswin.h"
#include "scribuswin.moc"
#include "scribusXml.h"
extern QPixmap loadIcon(QString nam);
 
ScribusWin::ScribusWin(QWidget* parent, ScribusDoc* ddoc)
35,6 → 37,26
view = dview;
}
 
void ScribusWin::slotAutoSave()
{
if ((doc->hasName) && (doc->isModified()) && (!doc->TemplateMode))
{
system("mv -f " + doc->DocName + " " + doc->DocName+".bak");
QString fn = doc->DocName;
QFileInfo fi(fn);
QDir::setCurrent(fi.dirPath(true));
ScriXmlDoc *ss = new ScriXmlDoc();
if (ss->WriteDoc(fn, doc, view, 0))
{
doc->setUnModified();
setCaption(doc->DocName);
qApp->processEvents();
emit AutoSaved();
}
delete ss;
}
}
 
void ScribusWin::closeEvent(QCloseEvent *ce)
{
if (doc->isModified())
/trunk/Scribus/scribus/scribusXml.cpp
2054,7 → 2054,8
for(uint i=0;i<view->Pages.count();++i)
{
ObCount++;
dia2->setProgress(ObCount);
if (dia2 != 0)
dia2->setProgress(ObCount);
page = view->Pages.at(i);
QDomElement pg=docu.createElement("PAGE");
pg.setAttribute("NUM",page->PageNr);
2564,8 → 2565,11
pdf.appendChild(pdf3);
}
dc.appendChild(pdf);
dia2->setTotalSteps(view->Pages.count()+view->MasterPages.count());
dia2->setProgress(0);
if (dia2 != 0)
{
dia2->setTotalSteps(view->Pages.count()+view->MasterPages.count());
dia2->setProgress(0);
}
WritePages(view, docu, dc, dia2, 0);
view->DocPages = view->Pages;
view->Pages = view->MasterPages;