diff options
Diffstat (limited to 'kde2')
| -rw-r--r-- | kde2/kpsion/Makefile.am | 3 | ||||
| -rw-r--r-- | kde2/kpsion/kpsion.cpp | 866 | ||||
| -rw-r--r-- | kde2/kpsion/kpsion.h | 140 | ||||
| -rw-r--r-- | kde2/kpsion/main.cpp | 121 | ||||
| -rw-r--r-- | kde2/kpsion/statusbarprogress.cpp | 438 | ||||
| -rw-r--r-- | kde2/kpsion/statusbarprogress.h | 169 | ||||
| -rw-r--r-- | kde2/po/de/kpsion.po | 392 | ||||
| -rw-r--r-- | kde2/po/de/libplpprops.po | 59 | ||||
| -rw-r--r-- | kde2/po/kpsion.pot | 365 | 
9 files changed, 2071 insertions, 482 deletions
| diff --git a/kde2/kpsion/Makefile.am b/kde2/kpsion/Makefile.am index 6cbc731..d0b27f4 100644 --- a/kde2/kpsion/Makefile.am +++ b/kde2/kpsion/Makefile.am @@ -12,7 +12,8 @@ lib_LTLIBRARIES = libkpsion.la  bin_PROGRAMS	= kpsion  libkpsion_la_LDFLAGS = $(LIBDEBUG) $(all_libraries) -module -version-info $(LIBVERSION) -libkpsion_la_SOURCES = kpsion.cpp setupdialog.cpp wizards.cpp +libkpsion_la_SOURCES = kpsion.cpp setupdialog.cpp wizards.cpp \ +	statusbarprogress.cpp  libkpsion_la_LIBADD = -L$(top_srcdir)/lib -lplp $(LIB_KFILE)  kpsion_SOURCES	= main.cpp diff --git a/kde2/kpsion/kpsion.cpp b/kde2/kpsion/kpsion.cpp index 808ed1a..2e605d9 100644 --- a/kde2/kpsion/kpsion.cpp +++ b/kde2/kpsion/kpsion.cpp @@ -41,16 +41,15 @@  #include <qtimer.h>  #include <qlayout.h>  #include <qiodevice.h> +#include <qheader.h>  #include <qdir.h> +#include <qmessagebox.h>  #include <ppsocket.h>  #include <rfsvfactory.h>  #include <rpcsfactory.h>  #include <bufferarray.h> -#include <iomanip> -#include <strstream> -  // internal use for developing offline without  // having a Psion connected.  // !!!!! set to 0 for production code !!!!! @@ -58,37 +57,88 @@  #define STID_CONNECTION 1 +class KPsionCheckListItem::KPsionCheckListItemMetaData { +    friend KPsionCheckListItem; + +private: +    KPsionCheckListItemMetaData(); +    ~KPsionCheckListItemMetaData() { }; + +    bool parentIsKPsionCheckListItem; +    bool dontPropagate; +    int backupType; +    int size; +    time_t when; +    u_int32_t timeHi; +    u_int32_t timeLo; +    u_int32_t attr; +    QString name; +}; + +KPsionCheckListItem::KPsionCheckListItemMetaData::KPsionCheckListItemMetaData() { +    when = 0; +    size = 0; +    timeHi = 0; +    timeLo = 0; +    attr = 0; +    name = QString::null; +    backupType = KPsionBackupListView::UNKNOWN; +} + +KPsionCheckListItem::~KPsionCheckListItem() { +    delete meta; +} + +KPsionCheckListItem *KPsionCheckListItem:: +firstChild() const { +    return (KPsionCheckListItem *)QListViewItem::firstChild(); +} + +KPsionCheckListItem *KPsionCheckListItem:: +nextSibling() const { +    return (KPsionCheckListItem *)QListViewItem::nextSibling(); +} +  void KPsionCheckListItem::  init(bool myparent) {      setSelectable(false); -    dontPropagate = false; -    parentIsKPsionCheckListItem = myparent; +    meta = new KPsionCheckListItemMetaData(); +    meta->dontPropagate = false; +    meta->parentIsKPsionCheckListItem = myparent;  }  void KPsionCheckListItem:: -setMetaData(int bType, time_t bWhen) { -	backupType = bType; -	when = bWhen; +setMetaData(int type, time_t when, QString name, int size, +	    u_int32_t tHi, u_int32_t tLo, u_int32_t attr) { +	meta->backupType = type; +	meta->when = when; +	meta->name = name; +	meta->size = size; +	meta->timeHi = tHi; +	meta->timeLo = tLo; +	meta->attr = attr;  }  void KPsionCheckListItem::  stateChange(bool state) {      QCheckListItem::stateChange(state); -    if (dontPropagate) +    if (meta->dontPropagate)  	return; -    if (parentIsKPsionCheckListItem) -	((KPsionCheckListItem *)parent())->propagateUp(state); +    if (meta->parentIsKPsionCheckListItem) +	((KPsionCheckListItem *)QListViewItem::parent())->propagateUp(state); +    else +	emit rootToggled();      propagateDown(state);  }  void KPsionCheckListItem::  propagateDown(bool state) {      setOn(state); -    KPsionCheckListItem *child = (KPsionCheckListItem *)firstChild(); +    KPsionCheckListItem *child = firstChild();      while (child) {  	child->propagateDown(state); -	child = (KPsionCheckListItem *)child->nextSibling(); +	child = child->nextSibling();      }  } @@ -96,15 +146,15 @@ void KPsionCheckListItem::  propagateUp(bool state) {      bool deactivateThis = false; -    KPsionCheckListItem *child = (KPsionCheckListItem *)firstChild(); +    KPsionCheckListItem *child = firstChild();      while (child) {  	if ((child->isOn() != state) || (!child->isEnabled())) {  	    deactivateThis = true;  	    break;  	} -	child = (KPsionCheckListItem *)child->nextSibling(); +	child = child->nextSibling();      } -    dontPropagate = true; +    meta->dontPropagate = true;      if (deactivateThis) {  	setOn(true);  	setEnabled(false); @@ -116,9 +166,68 @@ propagateUp(bool state) {      // enabled/disabled without activating.      // -> force it.      listView()->repaintItem(this); -    dontPropagate = false; -    if (parentIsKPsionCheckListItem) -	((KPsionCheckListItem *)parent())->propagateUp(state); +    meta->dontPropagate = false; +    if (meta->parentIsKPsionCheckListItem) +	((KPsionCheckListItem *)QListViewItem::parent())->propagateUp(state); +    else +	emit rootToggled(); +} + +QString KPsionCheckListItem:: +key(int column, bool ascending) const { +    if (meta->when) { +	QString tmp; +	tmp.sprintf("%08d", meta->when); +	return tmp; +    } +    return text(); +} + +QString KPsionCheckListItem:: +psionname() { +    if (meta->parentIsKPsionCheckListItem) +	return meta->name; +    else +	return QString::null; +} + +QString KPsionCheckListItem:: +unixname() { +    if (meta->parentIsKPsionCheckListItem) +	return KPsionMainWindow::psion2unix(meta->name); +    else +	return QString::null; +} + +QString KPsionCheckListItem:: +tarname() { +    if (meta->parentIsKPsionCheckListItem) +	return ((KPsionCheckListItem *)QListViewItem::parent())->tarname(); +    else +	return meta->name; +} + +int KPsionCheckListItem:: +backupType() { +    if (meta->parentIsKPsionCheckListItem) +	return ((KPsionCheckListItem *)QListViewItem::parent())->backupType(); +    else +	return meta->backupType; +} + +time_t KPsionCheckListItem:: +when() { +    if (meta->parentIsKPsionCheckListItem) +	return ((KPsionCheckListItem *)QListViewItem::parent())->when(); +    else +	return meta->when; +} + +PlpDirent KPsionCheckListItem:: +plpdirent() { +    assert(meta->parentIsKPsionCheckListItem); +    return PlpDirent(meta->size, meta->attr, meta->timeHi, meta->timeLo, +		     meta->name);  }  KPsionBackupListView::KPsionBackupListView(QWidget *parent, const char *name) @@ -133,17 +242,25 @@ KPsionBackupListView::KPsionBackupListView(QWidget *parent, const char *name)      setRootIsDecorated(true);  } +KPsionCheckListItem *KPsionBackupListView:: +firstChild() const { +    return (KPsionCheckListItem *)QListView::firstChild(); +} +  void KPsionBackupListView::  readBackups(QString uid) {      QString bdir(backupDir);      bdir += "/";      bdir += uid;      QDir d(bdir); +    kapp->processEvents();      const QFileInfoList *fil =  	d.entryInfoList("*.tar.gz", QDir::Files|QDir::Readable, QDir::Name);      QFileInfoListIterator it(*fil);      QFileInfo *fi;      while ((fi = it.current())) { +	kapp->processEvents(); +  	bool isValid = false;  	KTarGz tgz(fi->absFilePath());  	const KTarEntry *te; @@ -169,30 +286,51 @@ readBackups(QString uid) {  	}  	if (isValid) { -	    QString n =	i18n("%1 backup, created at %2").arg(bTypeName).arg(date.toString()); +	    QString n =	i18n("%1 backup, created at %2").arg(bTypeName).arg(KGlobal::locale()->formatDateTime(date, false)); +	    QByteArray a = ((KTarFile *)te)->data(); +	    QTextIStream indexData(a); + +	    indexData.readLine(); +	    indexData.flags(QTextStream::hex); +	    indexData.fill('0'); +	    indexData.width(8);  	    KPsionCheckListItem *i =  		new KPsionCheckListItem(this, n,  					KPsionCheckListItem::CheckBox); -	    i->setMetaData(bType, te->date()); -	    i->setPixmap(0, KGlobal::iconLoader()->loadIcon("mime_empty", KIcon::Small)); +	    i->setMetaData(bType, te->date(), tgz.fileName(), 0, 0, 0, 0); +	    i->setPixmap(0, KGlobal::iconLoader()->loadIcon("mime_empty", +							 KIcon::Small)); +	    connect(i, SIGNAL(rootToggled()), this, SLOT(slotRootToggled())); +  	    QStringList files = tgz.directory()->entries();  	    for (QStringList::Iterator f = files.begin();  		 f != files.end(); f++)  		if ((*f != "KPsionFullIndex") &&  		    (*f != "KPsionIncrementalIndex")) -		    listTree(i, tgz.directory()->entry(*f), 0); +		    listTree(i, tgz.directory()->entry(*f), indexData, 0);  	}  	tgz.close();  	++it;      } +    header()->setClickEnabled(false); +    header()->setResizeEnabled(false); +    header()->setMovingEnabled(false); +    setMinimumSize(columnWidth(0) + 4, height()); +    QWhatsThis::add(this, i18n( +			"<qt>Here, you can select the available backups." +			" Select the items you want to restore, the click" +			" on <b>Start</b> to start restoring these items." +			"</qt>"));  }  void KPsionBackupListView:: -listTree(KPsionCheckListItem *cli, const KTarEntry *te, int level) { +listTree(KPsionCheckListItem *cli, const KTarEntry *te, QTextIStream &idx, +	 int level) {      KPsionCheckListItem *i =  	new KPsionCheckListItem(cli, te->name(),  				KPsionCheckListItem::CheckBox); +    kapp->processEvents();      if (te->isDirectory()) {  	if (level)  	    i->setPixmap(0, KGlobal::iconLoader()->loadIcon("folder", @@ -200,17 +338,118 @@ listTree(KPsionCheckListItem *cli, const KTarEntry *te, int level) {  	else  	    i->setPixmap(0, KGlobal::iconLoader()->loadIcon("hdd_unmount",  							    KIcon::Small)); +	i->setMetaData(0, 0, QString::null, 0, 0, 0, 0);  	KTarDirectory *td = (KTarDirectory *)te;  	QStringList files = td->entries();  	for (QStringList::Iterator f = files.begin(); f != files.end(); f++) -	    listTree(i, td->entry(*f), level + 1); -    } else +	    listTree(i, td->entry(*f), idx, level + 1); +    } else { +	uint32_t timeHi; +	uint32_t timeLo; +	uint32_t size; +	uint32_t attr; +	QString  name; +  	i->setPixmap(0, KGlobal::iconLoader()->loadIcon("mime_empty",  							KIcon::Small)); +	idx >> timeHi >> timeLo >> size >> attr >> name; +	i->setMetaData(0, 0, name, size, timeHi, timeLo, attr); +    } +} + +void KPsionBackupListView:: +slotRootToggled() { +    bool anyOn = false; +    KPsionCheckListItem *i = firstChild(); +    while (i != 0L) { +	if (i->isOn()) { +	    anyOn = true; +	    break; +	} +	i = i->nextSibling(); +    } +    emit itemsEnabled(anyOn); +} + +QStringList KPsionBackupListView:: +getSelectedTars() { +    QStringList l; + +    KPsionCheckListItem *i = firstChild(); +    while (i != 0L) { +	if (i->isOn()) +	    l += i->tarname(); +	i = i->nextSibling(); +    } +    return l; +} + +bool KPsionBackupListView:: +autoSelect(QString drive) { +    KPsionCheckListItem *latest = NULL; +    time_t stamp = 0; +     +    drive += ":"; +    // Find latest full backup for given drive +    KPsionCheckListItem *i = firstChild(); +    while (i != 0L) { +	if ((i->backupType() == FULL) && (i->when() > stamp)) { +	    KPsionCheckListItem *c = i->firstChild(); +	    while (c != 0L) { +		if (c->text() == drive) { +		    latest = c; +		    stamp = i->when(); +		    break; +		} +		c = c->nextSibling(); +	    } +	} +	i = i->nextSibling(); +    } +    // Now find all incremental backups for given drive which are newer than +    // selected backup +    if (latest != 0) { +	latest->setOn(true); +	i = firstChild(); +	while (i != 0L) { +	    if ((i->backupType() == INCREMENTAL) && (i->when() >= stamp)) { +		KPsionCheckListItem *c = i->firstChild(); +		while (c != 0L) { +		    if (c->text() == drive) +			c->setOn(true); +		    c = c->nextSibling(); +		} +	    } +	    i = i->nextSibling(); +	} +    } +    return (latest != 0L); +} + +void KPsionBackupListView:: +collectEntries(KPsionCheckListItem *i) { +    while (i != 0L) { +	KPsionCheckListItem *c = i->firstChild(); +	if (c == 0L) { +	    if (i->isOn()) +		toRestore.push_back(i->plpdirent()); +	} else +	    collectEntries(c); +	i = i->nextSibling(); +    }  }  PlpDir &KPsionBackupListView:: -getRestoreList() { +getRestoreList(QString tarname) { +    toRestore.clear(); +    KPsionCheckListItem *i = firstChild(); +    while (i != 0L) { +	if ((i->tarname() == tarname) && (i->isOn())) { +	    collectEntries(i->firstChild()); +	    break; +	} +	i = i->nextSibling(); +    }      return toRestore;  } @@ -222,6 +461,18 @@ KPsionMainWindow::KPsionMainWindow()      statusBar()->setItemAlignment(STID_CONNECTION,  				  QLabel::AlignLeft|QLabel::AlignVCenter); +    progress = new KPsionStatusBarProgress(statusBar(), "progressBar"); +    statusBar()->addWidget(progress, 10); + +    connect(progress, SIGNAL(pressed()), this, SLOT(slotProgressBarPressed())); +    connect(this, SIGNAL(setProgress(int)), progress, SLOT(setValue(int))); +    connect(this, SIGNAL(setProgress(int, int)), progress, +			 SLOT(setValue(int, int))); +    connect(this, SIGNAL(setProgressText(const QString &)), progress, +			 SLOT(setText(const QString &))); +    connect(this, SIGNAL(enableProgressText(bool)), progress, +			 SLOT(setTextEnabled(bool))); +      backupRunning = false;      restoreRunning = false;      formatRunning = false; @@ -267,6 +518,11 @@ KPsionMainWindow::KPsionMainWindow()      connected = false;      shuttingDown = false; +    args = KCmdLineArgs::parsedArgs(); +    if (args->isSet("autobackup")) { +	firstTry = false; +	reconnectTime = 0; +    }      tryConnect();  } @@ -282,6 +538,24 @@ KPsionMainWindow::~KPsionMainWindow() {  	delete rpcsSocket;  } +QString KPsionMainWindow:: +unix2psion(const char * const path) { +    QString tmp = path; +    tmp.replace(QRegExp("/"), "\\"); +    tmp.replace(QRegExp("%2f"), "/"); +    tmp.replace(QRegExp("%25"), "%"); +    return tmp; +} + +QString KPsionMainWindow:: +psion2unix(const char * const path) { +    QString tmp = path; +    tmp.replace(QRegExp("%"), "%25"); +    tmp.replace(QRegExp("/"), "%2f"); +    tmp.replace(QRegExp("\\"), "/"); +    return tmp; +} +  void KPsionMainWindow::  setupActions() { @@ -447,6 +721,18 @@ queryPsion() {      }  #endif      if (!machineFound) { +	if (args->isSet("autobackup")) { +	    connected = false; +	    if (plpRfsv) +		delete plpRfsv; +	    if (plpRpcs) +		delete plpRpcs; +	    if (rfsvSocket) +		delete rfsvSocket; +	    if (rfsvSocket) +		delete rpcsSocket; +	    return; +	}  	NewPsionWizard *wiz = new NewPsionWizard(this, "newpsionwiz");  	wiz->exec();      } @@ -457,11 +743,9 @@ queryPsion() {  QString KPsionMainWindow::  getMachineUID() {      // ??! None of QString's formatting methods knows about long long. -    ostrstream s; -    s << hex << setw(16) << machineUID; -    QString ret = s.str(); -    ret = ret.left(16); -    return ret; +    char tmp[20]; +    sprintf(tmp, "%16llx", machineUID); +    return QString(tmp);  }  bool KPsionMainWindow:: @@ -506,28 +790,37 @@ tryConnect() {  	    nextTry = reconnectTime;  	    statusMsg += i18n(" (Retry in %1 seconds.)");  	    QTimer::singleShot(1000, this, SLOT(slotUpdateTimer())); + +	    statusBar()->changeItem(statusMsg.arg(reconnectTime), +				    STID_CONNECTION); +	    if (showMB) +		KMessageBox::error(this, statusMsg.arg(reconnectTime)); +	} else { +	    statusBar()->changeItem(statusMsg, STID_CONNECTION); +	    if (showMB) +		KMessageBox::error(this, statusMsg);  	} -	statusBar()->changeItem(statusMsg.arg(reconnectTime), -				STID_CONNECTION); -	if (showMB) -	    KMessageBox::error(this, statusMsg.arg(reconnectTime));  	return;      }      rfsvfactory factory(rfsvSocket);      plpRfsv = factory.create(false);      if (plpRfsv == 0L) { -	statusMsg = i18n("RFSV could not establish link: %1.").arg(factory.getError()); +	statusMsg = i18n("RFSV could not establish link: %1.").arg(KGlobal::locale()->translate(factory.getError()));  	delete rfsvSocket;  	rfsvSocket = 0L;  	if (reconnectTime) {  	    nextTry = reconnectTime;  	    statusMsg += i18n(" (Retry in %1 seconds.)");  	    QTimer::singleShot(1000, this, SLOT(slotUpdateTimer())); +	    statusBar()->changeItem(statusMsg.arg(reconnectTime), +				    STID_CONNECTION); +	    if (showMB) +		KMessageBox::error(this, statusMsg.arg(reconnectTime)); +	} else { +	    statusBar()->changeItem(statusMsg, STID_CONNECTION); +	    if (showMB) +		KMessageBox::error(this, statusMsg);  	} -	statusBar()->changeItem(statusMsg.arg(reconnectTime), -				STID_CONNECTION); -	if (showMB) -	    KMessageBox::error(this, statusMsg.arg(reconnectTime));  	return;      } @@ -542,17 +835,21 @@ tryConnect() {  	    nextTry = reconnectTime;  	    statusMsg += i18n(" (Retry in %1 seconds.)");  	    QTimer::singleShot(1000, this, SLOT(slotUpdateTimer())); +	    statusBar()->changeItem(statusMsg.arg(reconnectTime), +				    STID_CONNECTION); +	    if (showMB) +		KMessageBox::error(this, statusMsg.arg(reconnectTime)); +	} else { +	    statusBar()->changeItem(statusMsg, STID_CONNECTION); +	    if (showMB) +		KMessageBox::error(this, statusMsg);  	} -	statusBar()->changeItem(statusMsg.arg(reconnectTime), -				STID_CONNECTION); -	if (showMB) -	    KMessageBox::error(this, statusMsg.arg(reconnectTime));  	return;      }      rpcsfactory factory2(rpcsSocket);      plpRpcs = factory2.create(false);      if (plpRpcs == 0L) { -	statusMsg = i18n("RPCS could not establish link: %1.").arg(factory.getError()); +	statusMsg = i18n("RPCS could not establish link: %1.").arg(KGlobal::locale()->translate(factory2.getError()));  	delete plpRfsv;  	plpRfsv = 0L;  	delete rfsvSocket; @@ -563,11 +860,15 @@ tryConnect() {  	    nextTry = reconnectTime;  	    statusMsg += i18n(" (Retry in %1 seconds.)");  	    QTimer::singleShot(1000, this, SLOT(slotUpdateTimer())); +	    statusBar()->changeItem(statusMsg.arg(reconnectTime), +				    STID_CONNECTION); +	    if (showMB) +		KMessageBox::error(this, statusMsg.arg(reconnectTime)); +	} else { +	    statusBar()->changeItem(statusMsg, STID_CONNECTION); +	    if (showMB) +		KMessageBox::error(this, statusMsg);  	} -	statusBar()->changeItem(statusMsg.arg(reconnectTime), -				STID_CONNECTION); -	if (showMB) -	    KMessageBox::error(this, statusMsg.arg(reconnectTime));  	return;      }  #endif @@ -587,6 +888,10 @@ slotUpdateTimer() {  }  void KPsionMainWindow:: +slotProgressBarPressed() { +} + +void KPsionMainWindow::  slotStartFullBackup() {      fullBackup = true;      doBackup(); @@ -598,33 +903,40 @@ slotStartIncBackup() {      doBackup();  } +const KTarEntry *KPsionMainWindow:: +findTarEntry(const KTarEntry *te, QString path, QString rpath) { +    const KTarEntry *fte = NULL; +    if (te->isDirectory() && (path.left(rpath.length()) == rpath)) { +	KTarDirectory *td = (KTarDirectory *)te; +	QStringList files = td->entries(); +	for (QStringList::Iterator f = files.begin(); f != files.end(); f++) { +	    QString tmp = rpath; +	    if (tmp.length()) +		tmp += "/"; +	    tmp += *f; +	    fte = findTarEntry(td->entry(*f), path, tmp); +	    if (fte != 0L) +		break; +	} +    } else { +	if (path == rpath) +	    fte = te; +    } +    return fte; +} +  void KPsionMainWindow::  doBackup() {      backupRunning = true;      switchActions();      toBackup.clear(); -    KDialog *d = new KDialog(this, "backupDialog", false); -    d->setCaption(i18n("Backup")); -    QGridLayout *gl = new QGridLayout(d); -    progressLabel = new KSqueezedTextLabel(d); -    gl->addWidget(progressLabel, 1, 1); -    progress = new KProgress(0, 100, 0, KProgress::Horizontal, d, -			     "backupProgress"); - -    gl->addWidget(progress, 2, 1); -    gl->addRowSpacing(0, KDialog::marginHint()); -    gl->addRowSpacing(3, KDialog::marginHint()); -    gl->addColSpacing(0, KDialog::marginHint()); -    gl->addColSpacing(2, KDialog::marginHint()); -    gl->setColStretch(1, 1); -    gl->setRowStretch(1, 1); -    d->setMinimumSize(250, 80); -    d->show();      // Collect list of files to backup      backupSize = 0;      backupCount = 0;      progressTotal = 0; +    emit enableProgressText(true); +    emit setProgress(0);      for (QIconViewItem *i = view->firstItem(); i; i = i->nextItem()) {  	if (i->isSelected()) {  	    QString drv = i->key(); @@ -632,14 +944,16 @@ doBackup() {  	    int drvNum = *(drv.data()) - 'A';  	    PlpDrive drive;  	    if (plpRfsv->devinfo(drvNum, drive) != rfsv::E_PSI_GEN_NONE) { +		statusBar()->changeItem(i18n("Connected to %1").arg(machineName), +					STID_CONNECTION); +		emit enableProgressText(false); +		emit setProgress(0);  		KMessageBox::error(this, i18n("Could not retrieve drive details for drive %1").arg(drv)); -		d->hide(); -		delete d;  		backupRunning = false;  		switchActions();  		return;  	    } -	    progressLabel->setText(i18n("Scanning drive %1").arg(drv)); +	    emit setProgressText(i18n("Scanning drive %1").arg(drv));  	    progressLocal = drive.getSize() - drive.getSpace();  	    progressLocalCount = 0; @@ -648,17 +962,19 @@ doBackup() {  	    collectFiles(drv);  	}      } -    progressLabel->setText(i18n("%1 files need backup").arg(backupSize)); +    emit setProgressText(i18n("%1 files need backup").arg(backupSize));      if (backupCount == 0) { +	emit enableProgressText(false); +	emit setProgress(0); +	statusBar()->changeItem(i18n("Connected to %1").arg(machineName), +				STID_CONNECTION);  	KMessageBox::information(this, i18n("No files need backup")); -	d->hide(); -	delete d;  	backupRunning = false;  	switchActions();  	return;      } -    statusBar()->message(i18n("Backup")); +    // statusBar()->message(i18n("Backup"));      progressCount = 0;      progressTotal = backupSize;      progressPercent = -1; @@ -671,10 +987,12 @@ doBackup() {      QDir archiveDir(archiveName);      if (!archiveDir.exists())  	if (!archiveDir.mkdir(archiveName)) { +	    emit enableProgressText(false); +	    emit setProgress(0); +	    statusBar()->changeItem(i18n("Connected to %1").arg(machineName), +				    STID_CONNECTION);  	    KMessageBox::error(this, i18n("Could not create backup folder %1").arg(archiveName)); -	    d->hide(); -	    delete d; -	    statusBar()->clear(); +	    // statusBar()->clear();  	    backupRunning = false;  	    switchActions();  	    return; @@ -697,40 +1015,19 @@ doBackup() {      bool badBackup = false;      Enum<rfsv::errs> res;      // Now the real backup +    progressTotalText = i18n("Backup %1% done");      for (int i = 0; i < toBackup.size(); i++) {  	PlpDirent e = toBackup[i];  	const char *fn = e.getName(); -	const char *p; -	char *q; -	char unixname[1024]; - -	for (p = fn, q = unixname; *p; p++, q++) -	    switch (*p) { -		case '%': -		    *q++ = '%'; -		    *q++ = '2'; -		    *q = '5'; -		    break; -		case '/': -		    *q++ = '%'; -		    *q++ = '2'; -		    *q= 'f'; -		    break; -		case '\\': -		    *q = '/'; -		    break; -		default: -		    *q = *p; -	    } -	*q = '\0'; +	QString unixname = psion2unix(fn); +	QByteArray ba; +	QDataStream os(ba, IO_WriteOnly); -	ostrstream os; - -	progressLabel->setText(i18n("Backing up %1").arg(fn)); +	emit setProgressText(QString("%1").arg(fn));  	progressLocal = e.getSize();  	progressLocalCount = 0;  	progressLocalPercent = -1; -	progress->setValue(0); +	emit setProgress(0);  	u_int32_t handle; @@ -751,10 +1048,9 @@ doBackup() {  	do {  	    if ((res = plpRfsv->fread(handle, buff, RFSV_SENDLEN, len)) ==  		rfsv::E_PSI_GEN_NONE) { -		os.write(buff, len); +		os.writeRawBytes((char *)buff, len);  		updateProgress(len);  	    } -	    kapp->processEvents();  	} while ((len > 0) && (res == rfsv::E_PSI_GEN_NONE));  	delete[]buff;  	plpRfsv->fclose(handle); @@ -767,17 +1063,16 @@ doBackup() {  		continue;  	    }  	} -	backupTgz->writeFile(unixname, "root", "root", os.pcount(), -			     os.str()); +	backupTgz->writeFile(unixname, "root", "root", ba.size(), ba.data());      }      if (!badBackup) {  	// Reset archive attributes of all backuped files. -	progressLabel->setText(i18n("Resetting archive attributes ...")); +	emit setProgressText(i18n("Resetting archive attributes"));  	progressLocal = backupSize;  	progressLocalCount = 0;  	progressLocalPercent = -1; -	progress->setValue(0); +	emit setProgress(0);  	for (int i = 0; i < toBackup.size(); i++) {  	    PlpDirent e = toBackup[i];  	    const char *fn = e.getName(); @@ -802,41 +1097,327 @@ doBackup() {      delete backupTgz;      if (badBackup)  	unlink(archiveName.data()); -    d->hide(); -    delete d;      backupRunning = false;      switchActions(); +    statusBar()->changeItem(i18n("Connected to %1").arg(machineName), +			    STID_CONNECTION); +    emit enableProgressText(false); +    emit setProgress(0);      statusBar()->message(i18n("Backup done"), 2000);  } +KPsionRestoreDialog::KPsionRestoreDialog(QWidget *parent, QString uid) +    : KDialogBase(parent, "restoreDialog", true, i18n("Restore"), +		  KDialogBase::Cancel | KDialogBase::Ok, +		  KDialogBase::Ok, true) { + +    setButtonOKText(i18n("Start")); +    enableButtonOK(false); +    setButtonWhatsThis(KDialogBase::Ok, +		       i18n("Select items in the list of" +			    " available backups, then click" +			    " here to start restore of these" +			    " items.")); + +    QWidget *w = new QWidget(this); +    setMainWidget(w); +    QGridLayout *gl = new QGridLayout(w, 1, 1, KDialog::marginHint(), +				      KDialog::marginHint()); +    backupView = new KPsionBackupListView(w, "restoreSelector"); +    gl->addWidget(backupView, 0, 0); +    backupView->readBackups(uid); +    connect(backupView, SIGNAL(itemsEnabled(bool)), this, +	    SLOT(slotBackupsSelected(bool))); +} + +void KPsionRestoreDialog:: +slotBackupsSelected(bool any) { +    enableButtonOK(any); +} + +QStringList KPsionRestoreDialog:: +getSelectedTars() { +    return backupView->getSelectedTars(); +} + +bool KPsionRestoreDialog:: +autoSelect(QString drive) { +    return backupView->autoSelect(drive); +} + +PlpDir &KPsionRestoreDialog:: +getRestoreList(QString tarname) { +    return backupView->getRestoreList(tarname); +} + +bool KPsionMainWindow:: +askOverwrite(PlpDirent e) { +    if (overWriteAll) +	return true; +    const char *fn = e.getName(); +    if (overWriteList.contains(QString(fn))) +	return true; +    PlpDirent old; +    Enum<rfsv::errs> res = plpRfsv->fgeteattr(fn, old); +    if (res != rfsv::E_PSI_GEN_NONE) { +	KMessageBox::error(this, i18n( +	    "<QT>Could not get attributes of<BR/>" +	    "<B>%1</B><BR/>Reason: %2</QT>").arg(fn).arg(KGlobal::locale()->translate(res))); +	return false; +    } + +    // Don't ask if size and attribs are same +    if ((old.getSize() == e.getSize()) && +	((old.getAttr() & ~rfsv::PSI_A_ARCHIVE) == +	 (e.getAttr() & ~rfsv::PSI_A_ARCHIVE))) +	return true; + +    QDateTime odate; +    QDateTime ndate; + +    odate.setTime_t(old.getPsiTime().getTime()); +    ndate.setTime_t(e.getPsiTime().getTime()); + +    // Dates +    QString od = KGlobal::locale()->formatDateTime(odate, false); +    QString nd = KGlobal::locale()->formatDateTime(ndate, false); + +    // Sizes +    QString os = QString("%1 (%2)").arg(KIO::convertSize(old.getSize())).arg(KGlobal::locale()->formatNumber(old.getSize(), 0)); +    QString ns = QString("%1 (%2)").arg(KIO::convertSize(e.getSize())).arg(KGlobal::locale()->formatNumber(e.getSize(), 0)); + +    // Attributes +    QString oa(plpRfsv->attr2String(old.getAttr()).c_str()); +    QString na(plpRfsv->attr2String(e.getAttr()).c_str()); + +    KDialogBase dialog(i18n("Overwrite"), KDialogBase::Yes | KDialogBase::No | +		       KDialogBase::Cancel, KDialogBase::No, +		       KDialogBase::Cancel, this, "overwriteDialog", true, true, +		       QString::null, QString::null, i18n("Overwrite &All")); +     +    QWidget *contents = new QWidget(&dialog); +    QHBoxLayout * lay = new QHBoxLayout(contents); +    lay->setSpacing(KDialog::spacingHint()*2); +    lay->setMargin(KDialog::marginHint()*2); +     +    lay->addStretch(1); +    QLabel *label1 = new QLabel(contents); +    label1->setPixmap(QMessageBox::standardIcon(QMessageBox::Warning, +						kapp->style().guiStyle())); +    lay->add(label1); +    lay->add(new QLabel(i18n( +	"<QT>The file <B>%1</B> exists already on the Psion with " +	"different size and/or attributes." +	"<P><B>On the Psion:</B><BR/>" +	"  Size: %2<BR/>" +	"  Date: %3<BR/>" +	"  Attributes: %4</P>" +	"<P><B>In backup:</B><BR/>" +	"  Size: %5<BR/>" +	"  Date: %6<BR/>" +	"  Attributes: %7</P>" +	"Do you want to overwrite it?</QT>").arg(fn).arg(os).arg(od).arg(oa).arg(ns).arg(nd).arg(na), contents)); +    lay->addStretch(1); +  +    dialog.setMainWidget(contents); +    dialog.enableButtonSeparator(false); +  +    int result = dialog.exec(); +    switch (result) { +	case KDialogBase::Yes: +	    return true; +	case KDialogBase::No: +	    return false; +	case KDialogBase::Cancel: +	    overWriteAll = true; +	    return true; +	default: // Huh? +	    break; +    } +  +    return false; // Default +} +  void KPsionMainWindow::  slotStartRestore() {      restoreRunning = true;      switchActions(); -    KDialog *d = new KDialog(this, "restoreDialog", true); -    d->setCaption(i18n("Restore")); -    QGridLayout *gl = new QGridLayout(d); -    //progressLabel = new KSqueezedTextLabel(d); -    KPsionBackupListView *v = new KPsionBackupListView(d, "restoreSelector"); -    gl->addWidget(v, 1, 1); -    //progress = new KProgress(0, 100, 0, KProgress::Horizontal, d, "restoreProgress"); - -    //gl->addWidget(progress, 2, 1); -    gl->addRowSpacing(0, KDialog::marginHint()); -    gl->addRowSpacing(3, KDialog::marginHint()); -    gl->addColSpacing(0, KDialog::marginHint()); -    gl->addColSpacing(2, KDialog::marginHint()); -    gl->setColStretch(1, 1); -    gl->setRowStretch(1, 1); -    d->setMinimumSize(250, 80); -    v->readBackups(getMachineUID()); -    d->exec(); - -    d->hide(); -    delete d; +    kapp->setOverrideCursor(Qt::waitCursor); +    statusBar()->changeItem(i18n("Reading backups ..."), STID_CONNECTION); +    update(); +    kapp->processEvents(); +    KPsionRestoreDialog restoreDialog(this, getMachineUID()); +    kapp->restoreOverrideCursor(); +    statusBar()->changeItem(i18n("Selecting backups ..."), STID_CONNECTION); + +    for (QIconViewItem *i = view->firstItem(); i; i = i->nextItem()) { +	if (i->isSelected() && (i->key() != "Z")) +	    restoreDialog.autoSelect(i->key()); +    } + +    overWriteList.clear(); +    overWriteAll = false; + +    if (restoreDialog.exec() == KDialogBase::Accepted) { +	QStringList tars = restoreDialog.getSelectedTars(); +	QStringList::Iterator t; + +	backupSize = 0; +	backupCount = 0; +	for (t = tars.begin(); t != tars.end(); t++) { +	    PlpDir toRestore = restoreDialog.getRestoreList(*t); +	    for (int r = 0; r < toRestore.size(); r++) { +		PlpDirent e = toRestore[r]; +		backupSize += e.getSize(); +		backupCount++; +	    } +	} +	if (backupCount == 0) { +	    restoreRunning = false; +	    switchActions(); +	    statusBar()->changeItem(i18n("Connected to %1").arg(machineName), +				    STID_CONNECTION); +	    return; +	} + +	progressTotalText = i18n("Restore %1% done"); +	progressTotal = backupSize; +	progressCount = 0; +	progressPercent = -1; +	emit setProgressText(""); +	emit enableProgressText(true); +	emit setProgress(0); + +	// Kill all running applications on the Psion +	// and save their state. +	killSave(); + +	for (t = tars.begin(); t != tars.end(); t++) { +	    PlpDir toRestore = restoreDialog.getRestoreList(*t); +	    if (toRestore.size() > 0) { +		KTarGz tgz(*t); +		const KTarEntry *te; +		QString pDir(""); + +		tgz.open(IO_ReadOnly); +		for (int r = 0; r < toRestore.size(); r++) { +		    PlpDirent e = toRestore[r]; +		    PlpDirent olde; + +		    const char *fn = e.getName(); +		    QString unixname = psion2unix(fn); +		    Enum<rfsv::errs> res; + +		    progressLocal = e.getSize(); +		    progressLocalCount = 0; +		    progressLocalPercent = -1; +		    emit setProgressText(QString("%1").arg(fn)); +		    emit setProgress(0); + +		    te = findTarEntry(tgz.directory(), unixname); +		    if (te != 0L) { +			u_int32_t handle; +			QString cpDir(fn); +			QByteArray ba = ((KTarFile *)te)->data(); +			int bslash = cpDir.findRev('\\'); +			if (bslash > 0) +			    cpDir = cpDir.left(bslash); +			if (pDir != cpDir) { +			    pDir = cpDir; +			    res = plpRfsv->mkdir(pDir); +			    if ((res != rfsv::E_PSI_GEN_NONE) && +				(res != rfsv::E_PSI_FILE_EXIST)) { +				KMessageBox::error(this, i18n( +				    "<QT>Could not create directory<BR/>" +				    "<B>%1</B><BR/>Reason: %2</QT>").arg(pDir).arg(KGlobal::locale()->translate(res))); +				continue; +			    } +			} +			res = plpRfsv->fcreatefile( +			    plpRfsv->opMode(rfsv::PSI_O_RDWR), fn, handle); +			if (res == rfsv::E_PSI_FILE_EXIST) { +			    if (!askOverwrite(e)) +				continue; +			    res = plpRfsv->freplacefile( +				plpRfsv->opMode(rfsv::PSI_O_RDWR), fn, handle); +			} +			if (res != rfsv::E_PSI_GEN_NONE) { +			    KMessageBox::error(this, i18n( +				"<QT>Could not create<BR/>" +				"<B>%1</B><BR/>Reason: %2</QT>").arg(fn).arg(KGlobal::locale()->translate(res))); +			    continue; +			} +			const unsigned char *data = +			    (const unsigned char *)(ba.data()); +			long len = ba.size(); + +			do { +			    u_int32_t written; +			    u_int32_t count = +				(len > RFSV_SENDLEN) ? RFSV_SENDLEN : len; +			    res = plpRfsv->fwrite(handle, data, count, written); +			    if (res != rfsv::E_PSI_GEN_NONE) +				break; +			    len -= written; +			    data += written; +			    updateProgress(written); +			} while (len > 0); +			plpRfsv->fclose(handle); +			if (res != rfsv::E_PSI_GEN_NONE) { +			    KMessageBox::error(this, i18n( +				"<QT>Could not write to<BR/>" +				"<B>%1</B><BR/>Reason: %2</QT>").arg(fn).arg(KGlobal::locale()->translate(res))); +			    continue; +			} +			u_int32_t oldattr; +			res = plpRfsv->fgetattr(fn, oldattr); +			if (res != rfsv::E_PSI_GEN_NONE) { +			    KMessageBox::error(this, i18n( +				"<QT>Could not get attributes of<BR/>" +				"<B>%1</B><BR/>Reason: %2</QT>").arg(fn).arg(KGlobal::locale()->translate(res))); +			    continue; +			} +			u_int32_t mask = e.getAttr() ^ oldattr; +			u_int32_t sattr = e.getAttr() & mask; +			u_int32_t dattr = ~sattr & mask; +			res = plpRfsv->fsetattr(fn, sattr, dattr); +			if (res != rfsv::E_PSI_GEN_NONE) { +			    KMessageBox::error(this, i18n( +				"<QT>Could not set attributes of<BR/>" +				"<B>%1</B><BR/>Reason: %2</QT>").arg(fn).arg(KGlobal::locale()->translate(res))); +			    continue; +			} +			res = plpRfsv->fsetmtime(fn, e.getPsiTime()); +			if (res != rfsv::E_PSI_GEN_NONE) { +			    KMessageBox::error(this, i18n( +				"<QT>Could not set modification time of<BR/>" +				"<B>%1</B><BR/>Reason: %2</QT>").arg(fn).arg(KGlobal::locale()->translate(res))); +			    continue; +			} +			overWriteList += QString(fn); +		    } +		} +		tgz.close(); +	    } +	} +	// Restart previously running applications on the Psion +	// from saved state info. +	runRestore(); +    } else { +	restoreRunning = false; +	switchActions(); +	statusBar()->changeItem(i18n("Connected to %1").arg(machineName), +				STID_CONNECTION); +	return; +    } +      restoreRunning = false;      switchActions(); +    emit setProgress(0); +    emit enableProgressText(false); +    statusBar()->changeItem(i18n("Connected to %1").arg(machineName), +			    STID_CONNECTION);      statusBar()->message(i18n("Restore done"), 2000);  } @@ -885,7 +1466,7 @@ updateProgress(unsigned long amount) {      else  	progressLocalPercent = 100;      if (progressLocalPercent != lastPercent) -	progress->setValue(progressLocalPercent); +	emit setProgress(progressLocalPercent);      if (progressTotal > 0) {  	progressCount += amount;  	lastPercent = progressPercent; @@ -894,8 +1475,10 @@ updateProgress(unsigned long amount) {  	else  	    progressPercent = 100;  	if (progressPercent != lastPercent) -	    statusBar()->message(i18n("Backup %1% complete").arg(progressPercent)); +	    statusBar()->changeItem(progressTotalText.arg(progressPercent), +		STID_CONNECTION);      } +    kapp->processEvents();  }  void KPsionMainWindow:: @@ -920,7 +1503,6 @@ collectFiles(QString dir) {  	    if (attr & rfsv::PSI_A_DIR) {  		collectFiles(tmp);  	    } else { -		kapp->processEvents();  		updateProgress(e.getSize());  		if ((attr & rfsv::PSI_A_ARCHIVE) || fullBackup) {  		    backupCount++; @@ -959,7 +1541,7 @@ killSave() {  		cmdline += bs.getString(0);  		savedCommands += cmdline;  	    } -	    progressLabel->setText(i18n("Stopping %1").arg(cmdargs.getString(0))); +	    emit setProgressText(i18n("Stopping %1").arg(cmdargs.getString(0)));  	    kapp->processEvents();  	    plpRpcs->stopProgram(pbuf);  	} @@ -981,7 +1563,7 @@ runRestore() {  	    // These do not storethe full program path.  	    // In that case we try running the arg1 which  	    // results in starting the program via recog. facility. -	    progressLabel->setText(i18n("Starting %1").arg(cmd)); +	    emit setProgressText(i18n("Starting %1").arg(cmd));  	    kapp->processEvents();  	    if ((arg.length() > 2) && (arg[1] == ':') && (arg[0] >= 'A') &&  		(arg[0] <= 'Z')) @@ -1016,7 +1598,8 @@ runRestore() {  void KPsionMainWindow::  createIndex() { -    ostrstream os; +    QByteArray ba; +    QTextOStream os(ba);      os << "#plpbackup index " <<  	(fullBackup ? "F" : "I") << endl;      for (int i = 0; i < toBackup.size(); i++) { @@ -1036,7 +1619,10 @@ createIndex() {  	   << setw(0) << e.getName() << endl;  	kapp->processEvents();      } -    backupTgz->writeFile("Index", "root", "root", os.pcount(), os.str()); +    QString idxName = +	QString::fromLatin1("KPsion%1Index").arg(fullBackup ? +						 "Full" : "Incremental"); +    backupTgz->writeFile(idxName, "root", "root", ba.size(), ba.data());  }  /* diff --git a/kde2/kpsion/kpsion.h b/kde2/kpsion/kpsion.h index 86aeff4..2543fa6 100644 --- a/kde2/kpsion/kpsion.h +++ b/kde2/kpsion/kpsion.h @@ -1,15 +1,39 @@ +/*-*-c++-*- + * $Id$ + * + * This file is part of plptools. + * + *  Copyright (C) 1999-2001 Fritz Elfert <felfert@to.com> + * + *  This program is free software; you can redistribute it and/or modify + *  it under the terms of the GNU General Public License as published by + *  the Free Software Foundation; either version 2 of the License, or + *  (at your option) any later version. + * + *  This program is distributed in the hope that it will be useful, + *  but WITHOUT ANY WARRANTY; without even the implied warranty of + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + *  GNU General Public License for more details. + * + *  You should have received a copy of the GNU General Public License + *  along with this program; if not, write to the Free Software + *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA + * + */  #ifndef _KPSION_H_  #define _KPSION_H_  #include "setupdialog.h" +#include "statusbarprogress.h"  #include <kmainwindow.h> +#include <kcmdlineargs.h>  #include <kiconview.h> -#include <kprogress.h> -#include <ksqueezedtextlabel.h>  #include <klistview.h> +#include <kdialogbase.h>  #include <ktar.h> +#include <qtextstream.h>  #include <rfsv.h>  #include <rpcs.h>  #include <ppsocket.h> @@ -17,8 +41,10 @@  typedef QMap<char,QString> driveMap;  typedef QMap<QString,QString> psionMap; -class KPsionCheckListItem : public QCheckListItem { - public: +class KPsionCheckListItem : public QObject, public QCheckListItem { +    Q_OBJECT + +public:      KPsionCheckListItem(KPsionCheckListItem *parent, const QString &text,  			Type tt)  	: QCheckListItem(parent, text, tt) { init(true); } @@ -34,25 +60,43 @@ class KPsionCheckListItem : public QCheckListItem {      KPsionCheckListItem(QListView *parent, const QString &text,  			const QPixmap &p)  	: QCheckListItem(parent, text, p) { init(false); } -    void setMetaData(int, time_t); - protected: +    KPsionCheckListItem *firstChild() const; +    KPsionCheckListItem *nextSibling() const; + +    ~KPsionCheckListItem(); + +    virtual QString key(int column, bool ascending) const; +    void setMetaData(int bType, time_t bTime, QString tarName, int size, +		     u_int32_t tHi, u_int32_t tLo, u_int32_t attr); + +    QString unixname(); +    QString psionname(); +    QString tarname(); +    PlpDirent plpdirent(); +    int backupType(); +    int size(); +    time_t when(); +    bool isPathChecked(QString path); + +signals: +    void rootToggled(void); + +protected:      virtual void stateChange(bool);      void propagateUp(bool);      void propagateDown(bool); - private: +private:      void init(bool); - -    bool parentIsKPsionCheckListItem; -    bool dontPropagate; -    int backupType; -    time_t when; +    class KPsionCheckListItemMetaData; +    KPsionCheckListItemMetaData *meta;  };  class KPsionBackupListView : public KListView {      Q_OBJECT - public: + +public:      enum backupTypes {  	UNKNOWN = 0,  	FULL = 1, @@ -60,21 +104,50 @@ class KPsionBackupListView : public KListView {      };      KPsionBackupListView(QWidget *parent = 0, const char *name = 0); +    KPsionCheckListItem *firstChild() const; +      void readBackups(QString uid); -    PlpDir &getRestoreList(); +    PlpDir &getRestoreList(QString tarname); +    QStringList getSelectedTars(); +    bool autoSelect(QString drive); + +signals: +    void itemsEnabled(bool); - private: -    void listTree(KPsionCheckListItem *cli, const KTarEntry *te, int level); +private slots: +    void slotRootToggled(void); + +private: +    void collectEntries(KPsionCheckListItem *i); +    void listTree(KPsionCheckListItem *cli, const KTarEntry *te, +		  QTextIStream &idx, int level);      QString uid;      QString backupDir;      PlpDir toRestore;  }; +class KPsionRestoreDialog : public KDialogBase { +    Q_OBJECT + +public: +    KPsionRestoreDialog(QWidget *parent, QString uid); + +    PlpDir &getRestoreList(QString tarname); +    QStringList getSelectedTars(); +    bool autoSelect(QString drive); + +private slots: +    void slotBackupsSelected(bool); + +private: +    KPsionBackupListView *backupView; +}; +  class KPsionMainWindow : public KMainWindow {      Q_OBJECT -  - public: + +public:      KPsionMainWindow();      ~KPsionMainWindow();      void setMachineName(QString &_name) { machineName = _name; } @@ -83,8 +156,20 @@ class KPsionMainWindow : public KMainWindow {      psionMap &getMachines() { return machines; }      QString &getMachineName() { return machineName; }      QString &getBackupDir() { return backupDir; } +    bool isConnected() { return connected; } +    const KTarEntry *findTarEntry(const KTarEntry *te, QString path, +				  QString rpath = ""); - public slots: +    static QString unix2psion(const char * const); +    static QString psion2unix(const char * const); + +signals: +    void setProgress(int); +    void setProgress(int, int); +    void setProgressText(const QString &); +    void enableProgressText(bool); + +public slots:      void slotStartRestore();      void slotStartFullBackup();      void slotStartIncBackup(); @@ -93,20 +178,21 @@ class KPsionMainWindow : public KMainWindow {      void slotToggleStatusbar();      void slotSaveOptions();      void slotPreferences(); -  - protected: +    void slotProgressBarPressed(); + +protected:      virtual bool queryClose();      void setupActions();      void switchActions();      void queryPsion();      void insertDrive(char letter, const char * const name); - private slots: +private slots:      void iconClicked(QIconViewItem *i);      void iconOver(QIconViewItem *i);      void slotUpdateTimer(); - private: +private:      void doBackup();      void tryConnect();      void updateProgress(unsigned long); @@ -114,6 +200,7 @@ class KPsionMainWindow : public KMainWindow {      void killSave();      void runRestore();      void createIndex(); +    bool askOverwrite(PlpDirent e);      rfsv *plpRfsv;      rpcs *plpRpcs; @@ -121,18 +208,20 @@ class KPsionMainWindow : public KMainWindow {      ppsocket *rpcsSocket;      SetupDialog *setupDialog;      KIconView *view; -    KProgress *progress; -    KSqueezedTextLabel *progressLabel; +    KPsionStatusBarProgress *progress;      KTarGz *backupTgz; +    KCmdLineArgs *args;      driveMap drives;      psionMap machines; +    QStringList overWriteList;      QStringList backupDrives;      QStringList savedCommands;      QString backupDir;      QString machineName;      QString statusMsg;      QString ncpdDevice; +    QString progressTotalText;      bool S5mx;      bool backupRunning;      bool restoreRunning; @@ -142,6 +231,7 @@ class KPsionMainWindow : public KMainWindow {      bool firstTry;      bool shuttingDown;      bool fullBackup; +    bool overWriteAll;      int reconnectTime;      int nextTry;      int ncpdSpeed; diff --git a/kde2/kpsion/main.cpp b/kde2/kpsion/main.cpp index df909ef..c9c0a0f 100644 --- a/kde2/kpsion/main.cpp +++ b/kde2/kpsion/main.cpp @@ -1,3 +1,25 @@ +/*-*-c++-*- + * $Id$ + * + * This file is part of plptools. + * + *  Copyright (C) 1999-2001 Fritz Elfert <felfert@to.com> + * + *  This program is free software; you can redistribute it and/or modify + *  it under the terms of the GNU General Public License as published by + *  the Free Software Foundation; either version 2 of the License, or + *  (at your option) any later version. + * + *  This program is distributed in the hope that it will be useful, + *  but WITHOUT ANY WARRANTY; without even the implied warranty of + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + *  GNU General Public License for more details. + * + *  You should have received a copy of the GNU General Public License + *  along with this program; if not, write to the Free Software + *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA + * + */  #ifdef HAVE_CONFIG_H  #include "config.h"  #endif @@ -10,46 +32,71 @@  #include <kcmdlineargs.h>  #include <kaboutdata.h> +namespace LIBPLP { +extern "C" { +#include <intl.h> +	void init_libplp_i18n() { +		bind_textdomain_codeset(PACKAGE, "latin1"); +		textdomain(PACKAGE); +	} +}; +}; + +  static KCmdLineOptions options[] = { -	{"b", 0, 0}, -	{"backup", I18N_NOOP("perform backup"), 0}, -	{"r", 0, 0}, -	{"restore", I18N_NOOP("perform restore"), 0}, -	{"f", 0, 0}, -	{"format", I18N_NOOP("format drive"), 0}, -	{"+[DriveLetter]", I18N_NOOP("The drive letter to backup/restore or format."), 0}, -	{ 0, 0, 0}, +    {"a", 0, 0}, +    {"autobackup", I18N_NOOP("perform scheduled backup"), 0}, +    {"b <drive>", 0, 0}, +    {"backup <drive>", I18N_NOOP("perform backup"), 0}, +    {"r <drive>", 0, 0}, +    {"restore <drive>", I18N_NOOP("perform restore"), 0}, +    {"f <drive>", 0, 0}, +    {"format <drive>", I18N_NOOP("format drive"), 0}, +    {"+drive", I18N_NOOP("The drive letter to backup/restore or format."), 0}, +    { 0, 0, 0},  };  int main(int argc, char **argv) { -	KAboutData *about = new KAboutData("kpsion", I18N_NOOP("KPsion"), -					   VERSION, I18N_NOOP("Psion connectivity utility"), -					   KAboutData::License_GPL, -					   "(C) 2001, Fritz Elfert", 0L, -					   "http://plptools.sourceforge.net", -					   "plptools-developers@sourceforge.net"); -	about->addAuthor("Fritz Elfert", I18N_NOOP("Original Developer/Maintainer"), -			 "felfert@users.sourceforge.net", -			 "http://plptools.sourceforge.net"); -	KCmdLineArgs::init(argc, argv, about); -	KCmdLineArgs::addCmdLineOptions(options); - -	KApplication a; - -	KConfig *config = kapp->config(); -	config->setGroup("Settings"); -	QString backupDir = config->readEntry("BackupDir"); -	 -	if (backupDir.isEmpty()) { -		FirstTimeWizard *wiz = new FirstTimeWizard(0L, "firsttimewizard"); -		wiz->exec(); -	} +    KAboutData *about = new KAboutData("kpsion", I18N_NOOP("KPsion"), +				       VERSION, I18N_NOOP("Psion connectivity utility"), +				       KAboutData::License_GPL, +				       "(C) 2001, Fritz Elfert", 0L, +				       "http://plptools.sourceforge.net", +				       "plptools-developers@sourceforge.net"); +    about->addAuthor("Fritz Elfert", I18N_NOOP("Original Developer/Maintainer"), +		     "felfert@users.sourceforge.net", +		     "http://plptools.sourceforge.net"); +    KCmdLineArgs::init(argc, argv, about); +    KCmdLineArgs::addCmdLineOptions(options); -	KPsionMainWindow *w = new KPsionMainWindow(); -	w->resize(300, 150); -	a.setMainWidget(w); -	w->show(); -	return a.exec(); +    KApplication a; + +    // Install additional translations +    LIBPLP::init_libplp_i18n(); +    KGlobal::locale()->insertCatalogue(QString::fromLatin1("plptools")); + +    KConfig *config = kapp->config(); +    config->setGroup("Settings"); +    QString backupDir = config->readEntry("BackupDir"); + +    if (backupDir.isEmpty()) { +	FirstTimeWizard *wiz = new FirstTimeWizard(0L, "firsttimewizard"); +	wiz->exec(); +    } + +    KPsionMainWindow *w = new KPsionMainWindow(); + +    KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); +    if (args->isSet("autobackup") && (!w->isConnected())) +	return 0; +    w->resize(300, 170); +    a.setMainWidget(w); +    w->show(); +    return a.exec();  } -					    -					    + +/* + * Local variables: + * c-basic-offset: 4 + * End: + */ diff --git a/kde2/kpsion/statusbarprogress.cpp b/kde2/kpsion/statusbarprogress.cpp new file mode 100644 index 0000000..8449faa --- /dev/null +++ b/kde2/kpsion/statusbarprogress.cpp @@ -0,0 +1,438 @@ +/*-*-c++-*- + * $Id$ + * + *   Shamlessly stolen from: + *     khexedit - Versatile hex editor + *     Copyright (C) 1999  Espen Sand, espensa@online.no + *     This file is based on the work by Martynas Kunigelis (KProgress) + * + *   This program is free software; you can redistribute it and/or modify + *   it under the terms of the GNU General Public License as published by + *   the Free Software Foundation; either version 2 of the License, or + *   (at your option) any later version. + * + *   This program is distributed in the hope that it will be useful, + *   but WITHOUT ANY WARRANTY; without even the implied warranty of + *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + *   GNU General Public License for more details. + * + *   You should have received a copy of the GNU General Public License + *   along with this program; if not, write to the Free Software + *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + +#include "statusbarprogress.h" + +#include <qpainter.h> +#include <qstring.h> +#include <qpixmap.h> +#include <qtooltip.h> + +#include <kapp.h> +#include <kglobal.h> +#include <kglobalsettings.h> +#include <klocale.h> + +KPsionStatusBarProgress:: +KPsionStatusBarProgress(QWidget *parent, +						 const char *name) +    : QFrame(parent, name), QRangeControl(0, 100, 1, 10, 0), +mOrientation(Horizontal) { +    initialize(); +} + +KPsionStatusBarProgress:: +KPsionStatusBarProgress(Orientation orientation, +						  QWidget *parent, +						 const char *name) +    : QFrame(parent, name), QRangeControl(0, 100, 1, 10, 0), +mOrientation(orientation) { +    initialize(); +} + +KPsionStatusBarProgress:: +KPsionStatusBarProgress(int minValue, int maxValue, +						 int value, +						 Orientation orientation, +						 QWidget *parent, +						 const char *name) +    : QFrame(parent, name), QRangeControl(minValue, maxValue, 1, 10, value), +mOrientation(orientation) { +    initialize(); +} + +KPsionStatusBarProgress:: +~KPsionStatusBarProgress() { +    delete mBarPixmap; +} + +void KPsionStatusBarProgress:: +advance(int offset) { +    setValue(value() + offset); +} + +void KPsionStatusBarProgress:: +initialize(void) { +    mBarPixmap    = 0; +    mBarStyle     = Solid; + +    mBarColor     = palette().normal().highlight(); +    mBarTextColor = palette().normal().highlightedText(); +    mTextColor    = palette().normal().text(); +    setBackgroundColor(palette().normal().background()); + +    QFont font(KGlobalSettings::generalFont()); +    // font.setBold(true); +    setFont(font); + +    mTextEnabled = false; +    adjustStyle(); +} + + +void KPsionStatusBarProgress:: +setBarPixmap(const QPixmap &pixmap) { +    if (pixmap.isNull() == true) +	return; +    if (mBarPixmap != 0) { +	delete mBarPixmap; +	mBarPixmap = 0; +    } +    mBarPixmap = new QPixmap(pixmap); +} + +void KPsionStatusBarProgress:: +setBarColor(const QColor &color) { +    mBarColor = color; +    if (mBarPixmap != 0) { +	delete mBarPixmap; +	mBarPixmap = 0; +    } +} + +void KPsionStatusBarProgress:: +setBarStyle(BarStyle style) { +    if (mBarStyle != style) { +	mBarStyle = style; +	update(); +    } +} + +void KPsionStatusBarProgress:: +setOrientation(Orientation orientation) { +    if (mOrientation != orientation) { +	mOrientation = orientation; +	update(); +    } +} + +void KPsionStatusBarProgress:: +setValue(int value) { +    mCurItem = mMaxItem = -1; +    QRangeControl::setValue(value); +} + +void KPsionStatusBarProgress:: +setValue(int curItem, int maxItem) { +    if (curItem <= 0 || maxItem <= 0 || curItem > maxItem) { +	mCurItem = mMaxItem = -1; +	QRangeControl::setValue(0); +    } else { +	mCurItem = curItem; +	mMaxItem = maxItem; +	float fraction = (float)curItem/(float)maxItem; +	QRangeControl::setValue((int)(fraction * 100.0)); +    } +} + + +void KPsionStatusBarProgress:: +setTextEnabled(bool state) { +    if (mTextEnabled != state) { +	mTextEnabled = state; +	update(); +    } +} + +void KPsionStatusBarProgress:: +setText(const QString &msg) { +    labelMsg = msg; +    if (mTextEnabled == true) +	update(); +} + + + + +const QColor & KPsionStatusBarProgress:: +barColor(void) const { +    return(mBarColor); +} + +const QPixmap * KPsionStatusBarProgress:: +barPixmap(void) const { +    return(mBarPixmap); +} + +bool KPsionStatusBarProgress:: +textEnabled(void) const { +    return(mTextEnabled); +} + +QSize KPsionStatusBarProgress:: +sizeHint(void) const { +    QSize s(size()); + +    if (orientation() == KPsionStatusBarProgress::Vertical) +	s.setWidth(fontMetrics().lineSpacing()); +    else +	s.setHeight(fontMetrics().lineSpacing()); +    return(s); +} + + +KPsionStatusBarProgress::Orientation KPsionStatusBarProgress:: +orientation(void) const { +    return(mOrientation); +} + +KPsionStatusBarProgress::BarStyle KPsionStatusBarProgress:: +barStyle() const { +    return(mBarStyle); +} + +int KPsionStatusBarProgress:: +recalcValue(int range) { +    int abs_value = value() - minValue(); +    int abs_range = maxValue() - minValue(); +    if (abs_range == 0) +	return range; +    return range * abs_value / abs_range; +} + +void KPsionStatusBarProgress:: +valueChange() { +    repaint(contentsRect(), FALSE); +    emit percentageChanged(recalcValue(100)); +} + +void KPsionStatusBarProgress:: +rangeChange() { +    repaint(contentsRect(), FALSE); +    emit percentageChanged(recalcValue(100)); +} + +void KPsionStatusBarProgress:: +styleChange(GUIStyle) { +    adjustStyle(); +} + +void KPsionStatusBarProgress:: +adjustStyle(void) { +    switch(style().guiStyle()) { +	case WindowsStyle: +	    setFrameStyle(QFrame::NoFrame); +	    break; + +	case MotifStyle: +	default: +	    setFrameStyle(QFrame::Panel|QFrame::Sunken); +	    setLineWidth(1); +	    break; +    } +    update(); +} + +void KPsionStatusBarProgress:: +paletteChange(const QPalette &) { +    mBarColor     = palette().normal().highlight(); +    mBarTextColor = palette().normal().highlightedText(); +    mTextColor    = palette().normal().text(); +    setBackgroundColor(palette().normal().background()); +} + +void KPsionStatusBarProgress:: +drawText(QPainter *p) { +    QRect r(contentsRect()); + +    squeezeTextToLabel(); +    p->setPen(mTextColor); +    p->drawText(r, AlignCenter, labelText); +    p->setClipRegion(fr); +    p->setPen(mBarTextColor); +    p->drawText(r, AlignCenter, labelText); +} + +void KPsionStatusBarProgress:: +drawContents(QPainter *p) { +    QRect cr = contentsRect(), er = cr; +    fr = cr; +    QBrush fb(mBarColor), eb(backgroundColor()); + +    if (mBarPixmap != 0) +	fb.setPixmap(*mBarPixmap); + +    if (backgroundPixmap()) +	eb.setPixmap(*backgroundPixmap()); + +    switch(mBarStyle) { +	case Solid: +	    if (mOrientation == Horizontal) { +		fr.setWidth(recalcValue(cr.width())); +		er.setLeft(fr.right() + 1); +	    } else { +		fr.setTop(cr.bottom() - recalcValue(cr.height())); +		er.setBottom(fr.top() - 1); +	    } + +	    p->setBrushOrigin(cr.topLeft()); +	    p->fillRect(fr, fb); +	    p->fillRect(er, eb); + +	    if (mTextEnabled == true) +		drawText(p); +	    break; + +	case Blocked: +	    const int margin = 2; +	    int max, num, dx, dy; +	    if (mOrientation == Horizontal) { +		fr.setHeight(cr.height() - 2 * margin); +		fr.setWidth((int)(0.67 * fr.height())); +		fr.moveTopLeft(QPoint(cr.left() + margin, cr.top() + margin)); +		dx = fr.width() + margin; +		dy = 0; +		max = (cr.width() - margin) / (fr.width() + margin) + 1; +		num = recalcValue(max); +	    } else { +		fr.setWidth(cr.width() - 2 * margin); +		fr.setHeight((int)(0.67 * fr.width())); +		fr.moveBottomLeft(QPoint(cr.left() + margin, cr.bottom() - margin)); +		dx = 0; +		dy = - (fr.height() + margin); +		max = (cr.height() - margin) / (fr.height() + margin) + 1; +		num = recalcValue(max); +	    } +	    p->setClipRect(cr.x() + margin, cr.y() + margin, +			   cr.width() - margin, cr.height() - margin); +	    for (int i = 0; i < num; i++) { +		p->setBrushOrigin(fr.topLeft()); +		p->fillRect(fr, fb); +		fr.moveBy(dx, dy); +	    } + +	    if (num != max) { +		if (mOrientation == Horizontal) +		    er.setLeft(fr.right() + 1); +		else +		    er.setBottom(fr.bottom() + 1); +		if (!er.isNull()) { +		    p->setBrushOrigin(cr.topLeft()); +		    p->fillRect(er, eb); +		} +	    } +	    break; +    } + +} + +void KPsionStatusBarProgress:: +mousePressEvent(QMouseEvent */*e*/) { +    emit pressed(); +} + +void KPsionStatusBarProgress:: +squeezeTextToLabel() { +    QFontMetrics fm(fontMetrics()); +    int labelWidth = size().width(); +    int percent; +    QString fullText; + +    if (labelMsg.isEmpty() == true) { +	labelText = QString("%1%").arg(recalcValue(100)); +	return; +    } else { +	if (mCurItem > 0) +	    fullText = i18n("%1 %2 of %3").arg(labelMsg).arg(mCurItem).arg(mMaxItem); +	else { +	    percent = recalcValue(100); +	    fullText = QString("%1 %2%").arg(labelMsg).arg(percent); +	} +    } +    int textWidth = fm.width(fullText); +    if (textWidth > labelWidth) { +	// start with the dots only +	QString squeezedMsg = "..."; +	QString squeezedText; + +	if (mCurItem > 0) +	    squeezedText = i18n("%1 %2 of %3").arg(squeezedMsg).arg(mCurItem).arg(mMaxItem); +	else +	    squeezedText = QString("%1 %2%").arg(squeezedMsg).arg(percent); +	int squeezedWidth = fm.width(squeezedText); + +	// estimate how many letters we can add to the dots on both sides +	int letters = fullText.length() * (labelWidth - squeezedWidth) / textWidth / 2; +	squeezedMsg = labelMsg.left(letters) + "..." + labelMsg.right(letters); +	if (mCurItem > 0) +	    squeezedText = i18n("%1 %2 of %3").arg(squeezedMsg).arg(mCurItem).arg(mMaxItem); +	else +	    squeezedText = QString("%1 %2%").arg(squeezedMsg).arg(percent); +	squeezedWidth = fm.width(squeezedText); + +	if (squeezedWidth < labelWidth) { +	    // we estimated too short +	    // add letters while text < label +	    do { +                letters++; +                squeezedMsg = labelMsg.left(letters) + "..." + +		    labelMsg.right(letters); +		if (mCurItem > 0) +		    squeezedText = i18n("%1 %2 of %3").arg(squeezedMsg).arg(mCurItem).arg(mMaxItem); +		else +		    squeezedText = QString("%1 %2%").arg(squeezedMsg).arg(percent); +                squeezedWidth = fm.width(squeezedText); +	    } while (squeezedWidth < labelWidth); +	    letters--; +	    squeezedMsg = labelMsg.left(letters) + "..." + +		labelMsg.right(letters); +	    if (mCurItem > 0) +		squeezedText = i18n("%1 %2 of %3").arg(squeezedMsg).arg(mCurItem).arg(mMaxItem); +	    else +		squeezedText = QString("%1 %2%").arg(squeezedMsg).arg(percent); +	} else if (squeezedWidth > labelWidth) { +	    // we estimated too long +	    // remove letters while text > label +	    do { +		letters--; +                squeezedMsg = labelMsg.left(letters) + "..." + +		    labelMsg.right(letters); +		if (mCurItem > 0) +		    squeezedText = i18n("%1 %2 of %3").arg(squeezedMsg).arg(mCurItem).arg(mMaxItem); +		else +		    squeezedText = QString("%1 %2%").arg(squeezedMsg).arg(percent); +		squeezedWidth = fm.width(squeezedText); +	    } while (squeezedWidth > labelWidth); +	} + +	if (letters < 5) { +	    // too few letters added -> we give up squeezing +	    labelText = fullText; +	} else +	    labelText = squeezedText; + +	QToolTip::remove(this); +	QToolTip::add(this, fullText); +    } else { +	labelText = fullText; +	QToolTip::remove( this ); +	QToolTip::hide(); +    }; +} + +/* + * Local variables: + * c-basic-offset: 4 + * End: + */ diff --git a/kde2/kpsion/statusbarprogress.h b/kde2/kpsion/statusbarprogress.h new file mode 100644 index 0000000..9b1ae4d --- /dev/null +++ b/kde2/kpsion/statusbarprogress.h @@ -0,0 +1,169 @@ +/*-*-c++-*- + * $Id$ + * + * Shamelessly stolen from: + *   khexedit - Versatile hex editor + *   Copyright (C) 1999  Espen Sand, espensa@online.no + *   This file is based on the work by Martynas Kunigelis (KProgress) + * + *   This program is free software; you can redistribute it and/or modify + *   it under the terms of the GNU General Public License as published by + *   the Free Software Foundation; either version 2 of the License, or + *   (at your option) any later version. + * + *   This program is distributed in the hope that it will be useful, + *   but WITHOUT ANY WARRANTY; without even the implied warranty of + *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + *   GNU General Public License for more details. + * + *   You should have received a copy of the GNU General Public License + *   along with this program; if not, write to the Free Software + *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + +#ifndef _STATUSBAR_PROGRESS_H_ +#define _STATUSBAR_PROGRESS_H_ + +#include <qframe.h> +#include <qrangecontrol.h> + +class KPsionStatusBarProgress : public QFrame, public QRangeControl { +    Q_OBJECT + +public: +    /** +    * Possible values for orientation +    */ +    enum Orientation { Horizontal, Vertical }; + +    /** +    * Possible values for bar style. +    * +    * Solid means one continuous progress bar, Blocked means a +    * progress bar made up of several blocks. +    */ +    enum BarStyle { Solid, Blocked }; + +    /** +    * Construct a default progress bar. Orientation is horizontal. +    */ +    KPsionStatusBarProgress(QWidget *parent=0, const char *name=0); + +    /** +    * Construct a KProgress bar with an orientation. +    */ +    KPsionStatusBarProgress(Orientation, QWidget *parent=0, const char *name=0); + +    /** +    * Construct a KProgress bar with minimum, maximum and initial value. +    */ +    KPsionStatusBarProgress(int minValue, int maxValue, int value, Orientation, +			    QWidget *parent=0, const char *name=0); + +    /** +    * Destructor +    */ +    ~KPsionStatusBarProgress( void ); + +    /** +    * Set the progress bar style. Allowed values are Solid and Blocked. +    */ +    void setBarStyle(BarStyle style); + +    /** +    * Set the color of the progress bar. +    */ +    void setBarColor(const QColor &); + +    /** +    * Set a pixmap to be shown in the progress bar. +    */ +    void setBarPixmap(const QPixmap &); + +    /** +    * Set the orientation of the progress bar. +    * Allowed values are Horizonzal and Vertical. +    */ +    void setOrientation(Orientation); + +    /** +    * Retrieve the bar style. +    */ +    BarStyle barStyle() const; + +    /** +    * Retrieve the bar color. +    */ +    const QColor &barColor() const; + +    /** +    * Retrieve the bar pixmap. +    */ +    const QPixmap *barPixmap() const; + +    /** +    * Retrieve the orientation. +    */ +    Orientation orientation() const; + +    /** +    * Returns TRUE if progress text will be displayed, FALSE otherwise. +    */ +    bool textEnabled() const; + +    /** +    * Returns the recommended width for vertical progress bars or +    * the recommended height for vertical progress bars +    */ +    virtual QSize sizeHint() const; + + +public slots: +    void setValue( int ); +    void setValue( int, int); +    void advance( int ); +    void setTextEnabled( bool state ); +    void setText( const QString &msg ); + +signals: +    void percentageChanged(int); +    void pressed( void ); + +protected: +    void valueChange(); +    void rangeChange(); +    void styleChange( GUIStyle ); +    void paletteChange( const QPalette & ); +    void drawContents( QPainter * ); +    void mousePressEvent( QMouseEvent *e ); + +private: +    QPixmap     *mBarPixmap; +    QColor	mBarColor; +    QColor	mBarTextColor; +    QColor	mTextColor; +    QRect       fr; +    BarStyle    mBarStyle; +    Orientation mOrientation; +    bool	mTextEnabled; +    QString     labelMsg; +    QString     labelText; +    int         mCurItem; +    int         mMaxItem; + +    void initialize(void); +    int recalcValue(int); +    void drawText(QPainter *); +    void adjustStyle(void); +    void squeezeTextToLabel(void); +}; + + +#endif + +/* + * Local variables: + * c-basic-offset: 4 + * End: + */ diff --git a/kde2/po/de/kpsion.po b/kde2/po/de/kpsion.po index 467456b..7146209 100644 --- a/kde2/po/de/kpsion.po +++ b/kde2/po/de/kpsion.po @@ -5,8 +5,8 @@  msgid ""  msgstr ""  "Project-Id-Version: plptools 0.7\n" -"POT-Creation-Date: 2001-02-15 21:17+0100\n" -"PO-Revision-Date: 2001-02-15 22:13CET\n" +"POT-Creation-Date: 2001-03-05 09:37+0100\n" +"PO-Revision-Date: 2001-03-05 09:39CET\n"  "Last-Translator: Fritz Elfert <felfert@to.com>\n"  "Language-Team: Deutsch <de@li.org>\n"  "MIME-Version: 1.0\n" @@ -14,15 +14,40 @@ msgstr ""  "Content-Transfer-Encoding: 8bit\n"  "X-Generator: KBabel 0.8\n" -#: kpsion.cpp:37 +#: kpsion.cpp:241 +msgid "Available backups" +msgstr "Verfügbare Sicherungen" + +#: kpsion.cpp:275 +msgid "Full" +msgstr "Voll" + +#: kpsion.cpp:282 +msgid "Incremental" +msgstr "Inkremental" + +#: kpsion.cpp:289 +msgid "%1 backup, created at %2" +msgstr "%1-Sicherung vom %2" + +#: kpsion.cpp:321 +msgid "" +"<qt>Here, you can select the available backups. Select the items you want to " +"restore, the click on <b>Start</b> to start restoring these items.</qt>" +msgstr "" +"<qt>Hier sehen Sie die verfügbaren Sicherungen. Wählen Sie die Dateien, " +"die Siezurücksichern wollen aus. Klicken Sie dann auf die Schaltfläche " +"<B>Start</B> um dieseDateien zu restaurieren.</qt>" + +#: kpsion.cpp:460  msgid "Idle"  msgstr "Bereit" -#: kpsion.cpp:62 wizards.cpp:210 +#: kpsion.cpp:499 wizards.cpp:232  msgid "off"  msgstr "aus" -#: kpsion.cpp:66 +#: kpsion.cpp:503  msgid ""  "<qt>Here, you see your Psion's drives.<br/>Every drive is represented by an "  "Icon. If you click on it, it gets selected for the next operation. E.g.: " @@ -36,64 +61,65 @@ msgstr ""  "abzuwählen.<br/>Wählen Sie beliebig viele Laufwerke und dann eine "  "Operation.</qt>" -#: kpsion.cpp:101 +#: kpsion.cpp:566  msgid "Start &Format"  msgstr "Starte &Formatierung" -#: kpsion.cpp:103 +#: kpsion.cpp:568  msgid "Start Full &Backup"  msgstr "Starte &Komplett-Sicherung" -#: kpsion.cpp:105 +#: kpsion.cpp:571  msgid "Start &Incremental Backup"  msgstr "Starte &inkrementelle Sicherung" -#: kpsion.cpp:107 +#: kpsion.cpp:573  msgid "Start &Restore"  msgstr "Starte &Rücksicherung" -#: kpsion.cpp:116 +#: kpsion.cpp:587  msgid "Full backup of selected drive(s)"  msgstr "Komplett-Sicherung der ausgewählten Laufwerke" -#: kpsion.cpp:117 +#: kpsion.cpp:589  msgid "Incremental backup of selected drive(s)"  msgstr "Inkrementelle Sicherung der ausgewählten Laufwerke" -#: kpsion.cpp:118 +#: kpsion.cpp:591  msgid "Restore selected drive(s)"  msgstr "Sichere ausgewählte Laufwerke zurück" -#: kpsion.cpp:119 +#: kpsion.cpp:593  msgid "Format selected drive(s)"  msgstr "Formatiere ausgewählte Laufwerke" -#: kpsion.cpp:187 +#: kpsion.cpp:664  msgid "Retrieving machine info ..."  msgstr "Ermittle Geräte-Info ..." -#: kpsion.cpp:190 +#: kpsion.cpp:675  msgid "Could not get Psion machine info"  msgstr "Konnte Psion Geräteinfo nicht ermitteln" -#: kpsion.cpp:202 +#: kpsion.cpp:688  msgid "an unknown machine"  msgstr "einem unbekannten Gerät" -#: kpsion.cpp:213 +#: kpsion.cpp:701  msgid "Retrieving drive list ..."  msgstr "Ermittle Laufwerks-Liste ..." -#: kpsion.cpp:215 +#: kpsion.cpp:704  msgid "Could not get list of drives"  msgstr "Konnte Liste der Laufwerke nicht ermitteln" -#: kpsion.cpp:233 +#: kpsion.cpp:722 kpsion.cpp:913 kpsion.cpp:935 kpsion.cpp:958 kpsion.cpp:1068 +#: kpsion.cpp:1245 kpsion.cpp:1376 kpsion.cpp:1385  #, c-format  msgid "Connected to %1"  msgstr "Verbunden mit %1" -#: kpsion.cpp:251 +#: kpsion.cpp:739  msgid ""  "A backup is running.\n"  "Do you really want to quit?" @@ -101,7 +127,7 @@ msgstr ""  "Eine Sicherung läuft.\n"  "Wollen Sie wirklich das Programm beenden?" -#: kpsion.cpp:253 +#: kpsion.cpp:741  msgid ""  "A restore is running.\n"  "Do you really want to quit?" @@ -109,7 +135,7 @@ msgstr ""  "Eine Rücksicherung läuft.\n"  "Wollen Sie wirklich das Programm beenden?" -#: kpsion.cpp:255 +#: kpsion.cpp:743  msgid ""  "A format is running.\n"  "Do you really want to quit?" @@ -117,77 +143,161 @@ msgstr ""  "Eine Formatierung läuft.\n"  "Wollen Sie wirklich das Programm beenden?" -#: kpsion.cpp:280 +#: kpsion.cpp:769  msgid "Connecting ..."  msgstr "Verbindungsaufbau ..." -#: kpsion.cpp:282 +#: kpsion.cpp:771  msgid "RFSV could not connect to ncpd at %1:%2. "  msgstr "RFSV konnte ncpd auf %1:%2 nicht erreichen. " -#: kpsion.cpp:285 kpsion.cpp:301 kpsion.cpp:319 kpsion.cpp:339 +#: kpsion.cpp:774 kpsion.cpp:791 kpsion.cpp:810 kpsion.cpp:831  msgid " (Retry in %1 seconds.)"  msgstr " (Wiederholung in %1 Sekunden.)" -#: kpsion.cpp:296 +#: kpsion.cpp:786  #, c-format  msgid "RFSV could not establish link: %1."  msgstr "RFSV konnte keine Verbindung aufbauen: %1." -#: kpsion.cpp:312 +#: kpsion.cpp:803  msgid "RPCS could not connect to ncpd at %1:%2."  msgstr "RPCS konnte ncpd auf %1:%2 nicht erreichen." -#: kpsion.cpp:330 +#: kpsion.cpp:822  #, c-format  msgid "RPCS could not establish link: %1."  msgstr "RPCS konnte keine Verbindung aufbauen: %1." -#: kpsion.cpp:380 kpsion.cpp:433 -msgid "Backup" -msgstr "Sicherung" - -#: kpsion.cpp:407 +#: kpsion.cpp:917  #, c-format  msgid "Could not retrieve drive details for drive %1"  msgstr "Konnte Details des Laufwerks %1 nicht ermitteln." -#: kpsion.cpp:414 +#: kpsion.cpp:922  #, c-format  msgid "Scanning drive %1"  msgstr "Durchsuche Laufwerk %1" -#: kpsion.cpp:423 +#: kpsion.cpp:931  msgid "%1 files need backup"  msgstr "%1 Dateien müssen gesichert werden" -#: kpsion.cpp:425 +#: kpsion.cpp:937  msgid "No files need backup"  msgstr "Keine Dateien zu sichern" -#: kpsion.cpp:446 +#: kpsion.cpp:960  #, c-format  msgid "Could not create backup folder %1"  msgstr "Konnte Sicherungs-Ordner %1 nicht anlegen." -#: kpsion.cpp:499 -#, c-format -msgid "Backing up %1" -msgstr "Sichere %1" +#: kpsion.cpp:984 +msgid "Backup %1% done" +msgstr "Sicherung %1% beendet" -#: kpsion.cpp:511 +#: kpsion.cpp:1004  msgid "<QT>Could not open<BR/><B>%1</B></QT>"  msgstr "<QT>Konnte<BR/><B>%1</B><BR/>nicht öffnen</QT>" -#: kpsion.cpp:530 +#: kpsion.cpp:1024  msgid "<QT>Could not read<BR/><B>%1</B></QT>"  msgstr "<QT>Konnte<BR/><B>%1</B><BR/>nicht lesen</QT>" -#: kpsion.cpp:551 +#: kpsion.cpp:1037 +msgid "Resetting archive attributes" +msgstr "Setze Archiv-Attribute zurück" + +#: kpsion.cpp:1050 +msgid "<QT>Could not set attributes of<BR/><B>%1</B></QT>" +msgstr "<QT>Konnte Attribute der Datei<BR/><B>%1</B><BR/>nicht setzen</QT>" + +#: kpsion.cpp:1072  msgid "Backup done"  msgstr "Sicherung beendet" -#: kpsion.cpp:563 +#: kpsion.cpp:1076 +msgid "Restore" +msgstr "Rücksicherung" + +#: kpsion.cpp:1080 +msgid "Start" +msgstr "Start" + +#: kpsion.cpp:1083 +msgid "" +"Select items in the list of available backups, then click here to start " +"restore of these items." +msgstr "" +"Wählen Sie in der Liste der verfügbaren Sicherungen Dateien aus und " +"klicken Sie dann hier um die gewählten Dateien zu restaurieren." + +#: kpsion.cpp:1130 kpsion.cpp:1343 +msgid "<QT>Could not get attributes of<BR/><B>%1</B><BR/>Reason: %2</QT>" +msgstr "" +"<QT>Konnte Attribute der Datei<BR/><B>%1</B> nicht abfragen<BR/>Grund: " +"%2</QT>" + +#: kpsion.cpp:1159 +msgid "Overwrite" +msgstr "Überschreiben" + +#: kpsion.cpp:1162 +msgid "Overwrite &All" +msgstr "Überschreibe &Alles" + +#: kpsion.cpp:1175 +msgid "" +"<QT>The file <B>%1</B> exists already on the Psion with different size " +"and/or attributes.<P><B>On the Psion:</B><BR/>  Size: %2<BR/>  Date: %3<BR/> " +" Attributes: %4</P><P><B>In backup:</B><BR/>  Size: %5<BR/>  Date: %6<BR/>  " +"Attributes: %7</P>Do you want to overwrite it?</QT>" +msgstr "" +"<QT>Die Datei <B>%1</B> existiert bereits auf dem Psion mit abweichender " +"Größe und/oder Attributen.<P><B>Auf dem Psion:</B><BR/>  Größe: " +"%2<BR/>  Datum: %3<BR/>  Attribute: " +"%4</P><P><B>Sicherungsdatei:</B><BR/>  Größe:  %5<BR/>  Datum: " +"%6<BR/>  Attribute: %7</P>Wollen Sie die Datei überschreiben?</QT>" + +#: kpsion.cpp:1213 +msgid "Reading backups ..." +msgstr "Lese Sicherungsdaten ..." + +#: kpsion.cpp:1218 +msgid "Selecting backups ..." +msgstr "Wähle Sicherungsdaten ..." + +#: kpsion.cpp:1250 +msgid "Restore %1% done" +msgstr "Rücksicherung %1% abgeschlossen" + +#: kpsion.cpp:1298 +msgid "<QT>Could not create directory<BR/><B>%1</B><BR/>Reason: %2</QT>" +msgstr "<QT>Konnte den Ordner<BR/><B>%1</B> nicht anlegen.<BR/>Grund: %2</QT>" + +#: kpsion.cpp:1313 +msgid "<QT>Could not create<BR/><B>%1</B><BR/>Reason: %2</QT>" +msgstr "<QT>Konnte<BR/><B>%1</B> nicht anlegen<BR/>Grund: %2</QT>" + +#: kpsion.cpp:1335 +msgid "<QT>Could not write to<BR/><B>%1</B><BR/>Reason: %2</QT>" +msgstr "<QT>Konnte nicht auf <BR/><B>%1</B> schreiben<BR/>Grund: %2</QT>" + +#: kpsion.cpp:1353 +msgid "<QT>Could not set attributes of<BR/><B>%1</B><BR/>Reason: %2</QT>" +msgstr "<QT>Konnte Attribute der Datei<BR/><B>%1</B>nicht setzen.<BR/>Grund: %2</QT>" + +#: kpsion.cpp:1360 +msgid "<QT>Could not set modification time of<BR/><B>%1</B><BR/>Reason: %2</QT>" +msgstr "" +"<QT>Konnte Änderungsdatum der Datei<BR/><B>%1</B> nicht setzen<BR/>Grund: " +"%2</QT>" + +#: kpsion.cpp:1387 +msgid "Restore done" +msgstr "Rücksicherung abgeschlossen" + +#: kpsion.cpp:1393  msgid ""  "<QT>This erases <B>ALL</B> data on the drive(s).<BR/>Do you really want to "  "proceed?" @@ -195,49 +305,61 @@ msgstr ""  "<QT>Hierdurch werden <B>ALLE</B> Daten auf dem(den) Laufwerk(en) "  "gelöscht.<BR/>Wollen Sie wirklich fortfahren?</QT>" -#: kpsion.cpp:611 -msgid "Backup %1% complete" -msgstr "Sicherung %1% erledigt" - -#: kpsion.cpp:676 +#: kpsion.cpp:1510  #, c-format  msgid "Stopping %1"  msgstr "Stoppe %1" -#: kpsion.cpp:697 +#: kpsion.cpp:1532  #, c-format  msgid "Starting %1"  msgstr "Starte %1" -#: kpsion.moc.cpp:43 kpsion.moc.cpp:48 +#: kpsion.moc.cpp:42 kpsion.moc.cpp:47 +msgid "KPsionCheckListItem" +msgstr "KPsionCheckListItem" + +#: kpsion.moc.cpp:109 kpsion.moc.cpp:114 +msgid "KPsionBackupListView" +msgstr "KPsionBackupListView" + +#: kpsion.moc.cpp:184 kpsion.moc.cpp:189 +msgid "KPsionRestoreDialog" +msgstr "KPsionRestoreDialog" + +#: kpsion.moc.cpp:246 kpsion.moc.cpp:251  msgid "KPsionMainWindow"  msgstr "KPsionMainWindow" -#: main.cpp:15 +#: main.cpp:48 +msgid "perform scheduled backup" +msgstr "Führe geplante Sicherung durch" + +#: main.cpp:50  msgid "perform backup"  msgstr "Führe Sicherung durch" -#: main.cpp:17 +#: main.cpp:52  msgid "perform restore"  msgstr "Führe Rücksicherung durch" -#: main.cpp:19 +#: main.cpp:54  msgid "format drive"  msgstr "Formatiere Laufwerk" -#: main.cpp:20 +#: main.cpp:55  msgid "The drive letter to backup/restore or format."  msgstr "Der Buchstabe des zu bearbeitenden Laufwerks." -#: main.cpp:25 +#: main.cpp:60  msgid "KPsion"  msgstr "KPsion" -#: main.cpp:26 +#: main.cpp:61  msgid "Psion connectivity utility"  msgstr "Werkzeug für Psion PDA" -#: main.cpp:31 +#: main.cpp:66  msgid "Original Developer/Maintainer"  msgstr "Original Entwickler/Betreuer" @@ -249,11 +371,11 @@ msgstr "&Allgemein"  msgid "Backup &directory"  msgstr "&Ordner für Sicherungen" -#: setupdialog.cpp:30 wizards.cpp:87 +#: setupdialog.cpp:30 wizards.cpp:109  msgid "Browse"  msgstr "Durchsuchen" -#: setupdialog.cpp:33 wizards.cpp:160 +#: setupdialog.cpp:33 wizards.cpp:182  msgid "Backup &generations"  msgstr "Sicherungs-&Generationen" @@ -269,20 +391,29 @@ msgstr "&Name des Geräts"  msgid "Machine &UID"  msgstr "&UID des Geräts" -#: wizards.cpp:26 +#: statusbarprogress.cpp:357 statusbarprogress.cpp:370 +#: statusbarprogress.cpp:379 statusbarprogress.cpp:392 +#: statusbarprogress.cpp:401 statusbarprogress.cpp:412 +msgid "%1 %2 of %3" +msgstr "%1 %2 von %3" + +#: statusbarprogress.moc.cpp:42 statusbarprogress.moc.cpp:47 +msgid "KPsionStatusBarProgress" +msgstr "KPsionStatusBarProgress" + +#: wizards.cpp:48  msgid "KPsion Setup"  msgstr "KPsion Einstellungen" -#: wizards.cpp:28 wizards.cpp:411 +#: wizards.cpp:50 wizards.cpp:433  msgid "Click this button to continue with the next page." -msgstr "" -"Betätigen Sie diese Schaltfläche um mit der nächsten Seite fortzufahren." +msgstr "Betätigen Sie diese Schaltfläche um mit der nächsten Seite fortzufahren." -#: wizards.cpp:30 wizards.cpp:413 +#: wizards.cpp:52 wizards.cpp:435  msgid "Click this button, to go to a previous page."  msgstr "Betätigen Sie diese Schaltfläche, um zur vorigen Seite zu kommen." -#: wizards.cpp:32 +#: wizards.cpp:54  msgid ""  "<QT>If you click this button, the setup of <B>KPSion</B> will be aborted and "  "next time you start <B>KPsion</B>, it will run this setup again.</QT>" @@ -291,7 +422,7 @@ msgstr ""  "<B>KPsion</B> abgebrochen. Beim nächsten Start von <B>KPsion</B> wird dann "  "die Konfiguration erneut gestartet.</QT>" -#: wizards.cpp:49 +#: wizards.cpp:71  msgid ""  "<QT><H2>Welcome to KPsion!</H2>It looks like you started <B>KPsion</B> the "  "first time. At least, i could not find any valid configuration.</BR>On the " @@ -304,11 +435,11 @@ msgstr ""  "sammeln, die für die Arbeit mit <B>KPsion</B> nötig sind.</BR> </BR>Viel "  "Spaß.</QT>" -#: wizards.cpp:66 +#: wizards.cpp:88  msgid "<QT><BIG><B>Welcome<B></BIG></QT>"  msgstr "<QT><BIG><B>Willkommen<B></BIG></QT>" -#: wizards.cpp:74 +#: wizards.cpp:96  msgid ""  "<QT>First, we need a folder for storing backups of your Psion. You probably "  "don't want others to have access to it, so it's best to choose a location " @@ -322,11 +453,11 @@ msgstr ""  "adäquate Stelle oder akzeptieren Sie einfach die unten angezeigte "  "Vorgabe.</QT>" -#: wizards.cpp:90 +#: wizards.cpp:112  msgid "This is the name of the backup folder."  msgstr "Dies ist der Name des Sicherungs-Ordners." -#: wizards.cpp:92 +#: wizards.cpp:114  msgid ""  "Click here, for opening a dialog which lets you easily select the backup "  "folder." @@ -334,11 +465,11 @@ msgstr ""  "Aktivieren Sie diese Schaltfläche, um einen Dialog zu öffnen welcher es "  "Ihnen auf einfache Weise erlaubt, den Sicherungs-Ordner zu wählen." -#: wizards.cpp:107 +#: wizards.cpp:129  msgid "<QT><BIG><B>Step 1</B></BIG> - Specify backup directory</QT>"  msgstr "<QT><BIG><B>Schritt 1</B></BIG> - Angabe des Sicherungs-Ordners</QT>" -#: wizards.cpp:114 +#: wizards.cpp:136  msgid ""  "<QT>Next, please specify some information regarding backup "  "policy:<UL><LI>How many generations of backups do you want to " @@ -350,63 +481,63 @@ msgstr ""  "aufheben?</LI><LI>Soll ich Sie an Sicherungen erinnern?</LI><LI>Wenn ja, in "  "welchen Intervallen?</LI></UL></QT>" -#: wizards.cpp:124 +#: wizards.cpp:146  msgid "&Incremental backup reminder"  msgstr "Erinnerung an &inkrementelle Sicherung" -#: wizards.cpp:127 wizards.cpp:145 +#: wizards.cpp:149 wizards.cpp:167  msgid "none"  msgstr "keine" -#: wizards.cpp:128 wizards.cpp:146 +#: wizards.cpp:150 wizards.cpp:168  msgid "daily"  msgstr "täglich" -#: wizards.cpp:129 wizards.cpp:147 +#: wizards.cpp:151 wizards.cpp:169  msgid "every 2 days"  msgstr "alle 2 Tage" -#: wizards.cpp:130 wizards.cpp:148 +#: wizards.cpp:152 wizards.cpp:170  msgid "every 3 days"  msgstr "alle 3 Tage" -#: wizards.cpp:131 wizards.cpp:149 +#: wizards.cpp:153 wizards.cpp:171  msgid "every 4 days"  msgstr "alle 4 Tage" -#: wizards.cpp:132 wizards.cpp:150 +#: wizards.cpp:154 wizards.cpp:172  msgid "every 5 days"  msgstr "alle 5 Tage" -#: wizards.cpp:133 wizards.cpp:151 +#: wizards.cpp:155 wizards.cpp:173  msgid "every 6 days"  msgstr "alle 6 Tage" -#: wizards.cpp:134 wizards.cpp:152 +#: wizards.cpp:156 wizards.cpp:174  msgid "weekly"  msgstr "wöchentlich" -#: wizards.cpp:135 wizards.cpp:153 +#: wizards.cpp:157 wizards.cpp:175  msgid "every 2 weeks"  msgstr "alle 2 Wochen" -#: wizards.cpp:136 wizards.cpp:154 +#: wizards.cpp:158 wizards.cpp:176  msgid "every 3 weeks"  msgstr "alle 3 Wochen" -#: wizards.cpp:137 wizards.cpp:155 +#: wizards.cpp:159 wizards.cpp:177  msgid "monthly"  msgstr "monatlich" -#: wizards.cpp:142 +#: wizards.cpp:164  msgid "&Full backup reminder"  msgstr "Erinnerung an &Komplett-Sicherung" -#: wizards.cpp:178 +#: wizards.cpp:200  msgid "<QT><BIG><B>Step 2</B></BIG> - Backup policy</QT>"  msgstr "<QT><BIG><B>Schritt 2</B></BIG> - Sicherungs-Strategie</QT>" -#: wizards.cpp:186 +#: wizards.cpp:208  msgid ""  "<QT>If no connection could be established on startup, <B>KPsion</B> will "  "attempt to connect in regular intervals. Please specify the interval after " @@ -427,55 +558,55 @@ msgstr ""  "Schnittstellengeschwindigkeit angeben</LI><LI>die Rechte zum Öffnen des "  "angegebenen Ports besitzen</LI></UL></QT>" -#: wizards.cpp:201 +#: wizards.cpp:223  msgid "&Connection retry interval (sec.)"  msgstr "&Verbindungsaufbau-Intervall (in sek.)" -#: wizards.cpp:207 +#: wizards.cpp:229  msgid "Serial &device"  msgstr "&Serielle Schnittstelle" -#: wizards.cpp:211 +#: wizards.cpp:233  msgid "/dev/ttyS0"  msgstr "/dev/ttyS0" -#: wizards.cpp:212 +#: wizards.cpp:234  msgid "/dev/ttyS1"  msgstr "/dev/ttyS1" -#: wizards.cpp:213 +#: wizards.cpp:235  msgid "/dev/ttyS2"  msgstr "/dev/ttyS2" -#: wizards.cpp:214 +#: wizards.cpp:236  msgid "/dev/ttyS3"  msgstr "/dev/ttyS3" -#: wizards.cpp:215 +#: wizards.cpp:237  msgid "/dev/ircomm0"  msgstr "/dev/ircomm0" -#: wizards.cpp:216 +#: wizards.cpp:238  msgid "/dev/ircomm1"  msgstr "/dev/ircomm1" -#: wizards.cpp:217 +#: wizards.cpp:239  msgid "/dev/ircomm2"  msgstr "/dev/ircomm2" -#: wizards.cpp:218 +#: wizards.cpp:240  msgid "/dev/ircomm3"  msgstr "/dev/ircomm3" -#: wizards.cpp:223 +#: wizards.cpp:245  msgid "Serial &speed"  msgstr "Schnittstellen-&Geschwindigkeit" -#: wizards.cpp:247 +#: wizards.cpp:269  msgid "<QT><BIG><B>Step 3</B></BIG> - Connection parameters</QT>"  msgstr "<QT><BIG><B>Schritt 3</B></BIG> - Verbindungs-Parameter</QT>" -#: wizards.cpp:255 +#: wizards.cpp:277  msgid ""  "<QT>That's it!<BR/>Next, i will start <B>KPsion</B> and if your Psion is "  "already connected and it's communication turned on (use <B>Ctrl-T</B> at " @@ -491,15 +622,15 @@ msgstr ""  "durchzuführen.<BR/>Bitte betätigen Sie nun die Schaltfläche "  "<B>Abschließen</B>.</QT>" -#: wizards.cpp:274 +#: wizards.cpp:296  msgid "<QT><BIG><B>Finished</B></BIG></QT>"  msgstr "<QT><BIG><B>Fertig<B></BIG></QT>" -#: wizards.cpp:282 +#: wizards.cpp:304  msgid "Backup folder"  msgstr "Sicherungs-Ordner" -#: wizards.cpp:292 +#: wizards.cpp:314  msgid ""  "<QT>You are about to abort the initial setup of <B>KPsion</B>. No "  "configuration will be stored and you will have to repeat this procedure when " @@ -510,19 +641,17 @@ msgstr ""  "Vorgang wiederholen müssen, wenn Sie <B>KPsion</B> das nächste Mal "  "starten.<BR/>Wollen Sie das Programm wirklich verlassen?</QT>" -#: wizards.cpp:347 -msgid "" -"<QT>The folder <B>%1</B> does <B>not</B> exist.<BR/>Shall it be created?</QT>" +#: wizards.cpp:369 +msgid "<QT>The folder <B>%1</B> does <B>not</B> exist.<BR/>Shall it be created?</QT>"  msgstr ""  "<QT>Der Ordner <B>%1</B> existiert <B>nicht</B>.<BR/>Soll er angelegt "  "werden?</QT>" -#: wizards.cpp:352 +#: wizards.cpp:374  msgid "<QT>The specified folder<BR/><B>%1</B><BR/>could <B>not</B> be created" -msgstr "" -"<QT>Der angegebene Ordner<BR/><B>%1</B><BR/>konnte nicht angelegt werden" +msgstr "<QT>Der angegebene Ordner<BR/><B>%1</B><BR/>konnte nicht angelegt werden" -#: wizards.cpp:357 +#: wizards.cpp:379  msgid ""  ", because you either don't have sufficient rights to do that, or the "  "filesystem is readonly." @@ -530,15 +659,15 @@ msgstr ""  ", weil Sie entweder nicht die nötigen Rechte besitzen, oder das Dateisystem "  "nur lesbar ist." -#: wizards.cpp:361 +#: wizards.cpp:383  msgid ", because the filesystem has not enough space."  msgstr ", weil auf dem Dateisystem kein Platz mehr ist." -#: wizards.cpp:367 +#: wizards.cpp:389  msgid ", because there already exists another object with the same name."  msgstr ", weil schon ein anderes Objekt mit dem selben Namen existiert." -#: wizards.cpp:377 +#: wizards.cpp:399  msgid ""  ", because you specified a path which probably contains a dangling symbolic "  "link." @@ -546,7 +675,7 @@ msgstr ""  ", weil Sie eine Pfad angegeben haben, der eine nicht aufgelöste symbolische "  "Verknüpfung enthält." -#: wizards.cpp:380 +#: wizards.cpp:402  msgid ""  ", because you specified a path which contains an element which is not a "  "folder." @@ -554,21 +683,21 @@ msgstr ""  ", weil Sie eine Pfad angegeben haben, der ein Element enthält, welches kein "  "Ordner ist." -#: wizards.cpp:384 +#: wizards.cpp:406  msgid ", because you specified a path which contains too many symbolic links."  msgstr ""  ", weil Sie eine Pfad angegeben haben, der zu viele symbolische "  "Verknüpfungen enthält." -#: wizards.cpp:391 +#: wizards.cpp:413  msgid "<BR/>Please select another folder.</QT>"  msgstr "<BR/>Bitte wählen Sie einen anderen Ordner.</QT>" -#: wizards.cpp:407 +#: wizards.cpp:429  msgid "New Psion detected"  msgstr "Neuer Psion erkannt" -#: wizards.cpp:415 +#: wizards.cpp:437  msgid ""  "<QT>If you click this button, the setup for the new connected Psion will be "  "aborted and next time you connect this Psion again, <B>KPsion</B> will run " @@ -578,7 +707,7 @@ msgstr ""  "den neuen Psion nicht gespeichert. Beim nächsten Verbindungsaufbau mit "  "diesem Psion wird <B>KPsion</B> dann erneut diesen Dialog präsentieren.</QT>" -#: wizards.cpp:424 +#: wizards.cpp:446  msgid ""  "<QT>The Psion with the unique ID <B>%1</B> is connected the first time. "  "Please assign a name to it.</QT>" @@ -586,19 +715,19 @@ msgstr ""  "<QT>Zum Psion mit der ID <B>%1</B> wurde erstmalig Verbindung aufgenommen. "  "Bitte weisen Sie diesem Gerät einen Namen zu.</QT>" -#: wizards.cpp:431 +#: wizards.cpp:453  msgid "&Name of new Psion"  msgstr "&Name des neuen Psion" -#: wizards.cpp:433 +#: wizards.cpp:455  msgid "My new Psion"  msgstr "Mein neuer Psion" -#: wizards.cpp:450 +#: wizards.cpp:472  msgid "<QT><BIG><B>New Psion detected<B></BIG></QT>"  msgstr "<QT><BIG><B>Neuer Psion erkannt<B></BIG></QT>" -#: wizards.cpp:458 +#: wizards.cpp:480  msgid ""  "<QT>Please select the Drive(s), you want to be backed up when running in "  "unattended backup mode.</QT>" @@ -606,19 +735,19 @@ msgstr ""  "<QT>Bitte wählen sie die Laufwerke aus, die bei einer automatischen "  "Sicherung gesichertwerden sollen.</QT>" -#: wizards.cpp:466 +#: wizards.cpp:488  msgid "Available drives"  msgstr "Verfügbare Laufwerke" -#: wizards.cpp:490 +#: wizards.cpp:512  msgid "<QT><BIG><B>Specify drives to backup<B></BIG></QT>"  msgstr "<QT><BIG><B>Wahl der zu sichernden Laufwerke<B></BIG></QT>" -#: wizards.cpp:514 +#: wizards.cpp:536  msgid "The name cannot be empty."  msgstr "Der Name darf nicht leer sein." -#: wizards.cpp:521 +#: wizards.cpp:543  msgid ""  "<QT>The name <B>%1</B> is already assigned to another machine.<BR/>Please "  "choose a different name.</QT>" @@ -626,10 +755,11 @@ msgstr ""  "<QT>Der Name <B>%1</B> wurde bereits einem anderen Gerät "  "zugewiesen.<BR/>Bitte wählen Sie einen anderen Namen.</QT>" -#: wizards.moc.cpp:43 wizards.moc.cpp:48 +#: wizards.moc.cpp:42 wizards.moc.cpp:47  msgid "FirstTimeWizard"  msgstr "FirstTimeWizard" -#: wizards.moc.cpp:112 wizards.moc.cpp:117 +#: wizards.moc.cpp:111 wizards.moc.cpp:116  msgid "NewPsionWizard"  msgstr "NewPsionWizard" + diff --git a/kde2/po/de/libplpprops.po b/kde2/po/de/libplpprops.po index 8741d94..789b35c 100644 --- a/kde2/po/de/libplpprops.po +++ b/kde2/po/de/libplpprops.po @@ -31,8 +31,8 @@ msgid ""  "If this is checked, read permission is granted. On series 5, this cannot "  "swiched off."  msgstr "" -"Wird dieser Schalter aktiviert, so wird die Berechtigung zum Lesen erteilt. Auf einem Serie 5 " -"kann dieser Schalter <B>nicht</B> abgeschaltet weden." +"Wird dieser Schalter aktiviert, so wird die Berechtigung zum Lesen erteilt. " +"Auf einem Serie 5 kann dieser Schalter <B>nicht</B> abgeschaltet weden."  #: plpprops.cc:212  msgid "Writeable" @@ -40,7 +40,9 @@ msgstr "Schreiben"  #: plpprops.cc:213  msgid "If this is checked, write permission is granted." -msgstr "Ist dieser Schalter aktiviert, so wird die Berechtigung zum Schreiben erteilt." +msgstr "" +"Ist dieser Schalter aktiviert, so wird die Berechtigung zum Schreiben " +"erteilt."  #: plpprops.cc:218  msgid "Hidden" @@ -51,8 +53,8 @@ msgid ""  "If this is checked, the file is not shown when displaying the directory on "  "the Psion."  msgstr "" -"Ist dieser Schalter aktiviert, so wird die Datei bei der Anzeige des Ordners auf dem Psion nicht " -"angezeigt." +"Ist dieser Schalter aktiviert, so wird die Datei bei der Anzeige des Ordners " +"auf dem Psion nicht angezeigt."  #: plpprops.cc:224  msgid "System" @@ -63,8 +65,11 @@ msgid "Archive"  msgstr "Archiv"  #: plpprops.cc:231 -msgid "If this is checked, the file will be included in the next incremental backup." -msgstr "Ist dieser Schalter aktiviert, so wird die Datei in die nächste inkrementelle Sicherung einbezogen." +msgid "" +"If this is checked, the file will be included in the next incremental backup." +msgstr "" +"Ist dieser Schalter aktiviert, so wird die Datei in die nächste " +"inkrementelle Sicherung einbezogen."  #: plpprops.cc:239  msgid "Executable" @@ -75,8 +80,8 @@ msgid ""  "If this is checked, the file can be executed on the Psion. This Attribute "  "does not apply to directories."  msgstr "" -"Ist dieser Schalter aktiviert, so kann die Datei auf dem Psion ausgeführt werden. Dieses " -"Attribut ist nicht auf Ordner anwendbar." +"Ist dieser Schalter aktiviert, so kann die Datei auf dem Psion ausgeführt " +"werden. Dieses Attribut ist nicht auf Ordner anwendbar."  #: plpprops.cc:245  msgid "Stream" @@ -87,8 +92,8 @@ msgid ""  "If this is checked, the file is a stream. This Attribute does not apply to "  "directories."  msgstr "" -"Ist dieser Schalter aktiviert, so ist die Datei ein Stream. Dieses " -"Attribut ist nicht auf Ordner anwendbar." +"Ist dieser Schalter aktiviert, so ist die Datei ein Stream. Dieses Attribut " +"ist nicht auf Ordner anwendbar."  #: plpprops.cc:251  msgid "Text" @@ -99,8 +104,8 @@ msgid ""  "If this is checked, the file is opened in text mode. This Attribute does not "  "apply to directories."  msgstr "" -"Ist dieser Schalter aktiviert, so wird die Datei im Text-Modus geöffnet. Dieses " -"Attribut ist nicht auf Ordner anwendbar." +"Ist dieser Schalter aktiviert, so wird die Datei im Text-Modus geöffnet. " +"Dieses Attribut ist nicht auf Ordner anwendbar."  #: plpprops.cc:260  msgid "Normal" @@ -111,8 +116,8 @@ msgid ""  "If this is checked, the file is considered regular. This Attribute does not "  "apply to directories."  msgstr "" -"Ist dieser Schalter aktiviert, so wird die Datei als normal angesehen. Dieses Attribut is nicht " -"auf Ordner anwendbar." +"Ist dieser Schalter aktiviert, so wird die Datei als normal angesehen. " +"Dieses Attribut is nicht auf Ordner anwendbar."  #: plpprops.cc:266  msgid "Temporary" @@ -123,8 +128,8 @@ msgid ""  "If this is checked, the file considered temporary. This Attribute does not "  "apply to directories."  msgstr "" -"Ist dieser Schalter aktiviert, so wird die Datei als temporär angesehen. Dieses Attribut is nicht " -"auf Ordner anwendbar." +"Ist dieser Schalter aktiviert, so wird die Datei als temporär angesehen. " +"Dieses Attribut is nicht auf Ordner anwendbar."  #: plpprops.cc:272  msgid "Compressed" @@ -135,8 +140,8 @@ msgid ""  "If this is checked, the file is stored in compressed mode. This Attribute "  "does not apply to directories."  msgstr "" -"Ist dieser Schalter aktiviert, so wird die Datei komprimiert gespeichert. Dieses Attribut is nicht " -"auf Ordner anwendbar." +"Ist dieser Schalter aktiviert, so wird die Datei komprimiert gespeichert. " +"Dieses Attribut is nicht auf Ordner anwendbar."  #: plpprops.cc:293  msgid "Psion &Attributes" @@ -238,7 +243,8 @@ msgid "Format"  msgstr "Formatieren"  #: plpprops.cc:575 -msgid "Click here, to format this drive. This launches KPsion to perform that task." +msgid "" +"Click here, to format this drive. This launches KPsion to perform that task."  msgstr ""  "Klicken Sie hier, um dieses Laufwerk zu formatieren. Zu diesem Zweck wird "  "KPsion gestartet." @@ -295,7 +301,8 @@ msgstr "Anzeigeformat:"  #: plpprops.cc:756  msgid "Here, the display geometry of the connected device is shown." -msgstr "Hier sehen Sie die Größe der Anzeigeeinheit des angeschlossenen Geräts." +msgstr "" +"Hier sehen Sie die Größe der Anzeigeeinheit des angeschlossenen Geräts."  #: plpprops.cc:757  msgid "Registry size:" @@ -413,7 +420,8 @@ msgstr "Sicherungs-Batterie"  #: plpprops.cc:816  msgid "This shows the accumulated time of running on backup battery power." -msgstr "Hier wird die aufsummierte Nutzungszeit der Sicherungsbatterie angezeigt." +msgstr "" +"Hier wird die aufsummierte Nutzungszeit der Sicherungsbatterie angezeigt."  #: plpprops.cc:819  msgid "This shows current status of the backup battery." @@ -491,7 +499,8 @@ msgstr "RAMDisk Größe:"  #: plpprops.cc:864  msgid "This shows, how much RAM is currently used for the RAMDisc." -msgstr "Hier wird angezeigt, wieviel Speicher gerade von der RAMDisk belegt wird." +msgstr "" +"Hier wird angezeigt, wieviel Speicher gerade von der RAMDisk belegt wird."  #: plpprops.cc:912 plpprops.cc:925  msgid "yes" @@ -511,5 +520,5 @@ msgstr "Psion &Eigner"  #: plpprops.cc:977  msgid "This shows the owner's information of the connected device." -msgstr "Hier wird die Eigentümer-Information des angeschlossenen Geräts angezeigt." - +msgstr "" +"Hier wird die Eigentümer-Information des angeschlossenen Geräts angezeigt." diff --git a/kde2/po/kpsion.pot b/kde2/po/kpsion.pot index fcb5025..7c0bd61 100644 --- a/kde2/po/kpsion.pot +++ b/kde2/po/kpsion.pot @@ -6,7 +6,7 @@  msgid ""  msgstr ""  "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2001-02-15 21:17+0100\n" +"POT-Creation-Date: 2001-03-05 09:37+0100\n"  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"  "Language-Team: LANGUAGE <LL@li.org>\n" @@ -14,15 +14,37 @@ msgstr ""  "Content-Type: text/plain; charset=CHARSET\n"  "Content-Transfer-Encoding: ENCODING\n" -#: kpsion.cpp:37 +#: kpsion.cpp:241 +msgid "Available backups" +msgstr "" + +#: kpsion.cpp:275 +msgid "Full" +msgstr "" + +#: kpsion.cpp:282 +msgid "Incremental" +msgstr "" + +#: kpsion.cpp:289 +msgid "%1 backup, created at %2" +msgstr "" + +#: kpsion.cpp:321 +msgid "" +"<qt>Here, you can select the available backups. Select the items you want to " +"restore, the click on <b>Start</b> to start restoring these items.</qt>" +msgstr "" + +#: kpsion.cpp:460  msgid "Idle"  msgstr "" -#: kpsion.cpp:62 wizards.cpp:210 +#: kpsion.cpp:499 wizards.cpp:232  msgid "off"  msgstr "" -#: kpsion.cpp:66 +#: kpsion.cpp:503  msgid ""  "<qt>Here, you see your Psion's drives.<br/>Every drive is represented by an "  "Icon. If you click on it, it gets selected for the next operation. E.g.: " @@ -30,200 +52,287 @@ msgid ""  "again.<br/>Select as many drives a you want, then choose an operation.</qt>"  msgstr "" -#: kpsion.cpp:101 +#: kpsion.cpp:566  msgid "Start &Format"  msgstr "" -#: kpsion.cpp:103 +#: kpsion.cpp:568  msgid "Start Full &Backup"  msgstr "" -#: kpsion.cpp:105 +#: kpsion.cpp:571  msgid "Start &Incremental Backup"  msgstr "" -#: kpsion.cpp:107 +#: kpsion.cpp:573  msgid "Start &Restore"  msgstr "" -#: kpsion.cpp:116 +#: kpsion.cpp:587  msgid "Full backup of selected drive(s)"  msgstr "" -#: kpsion.cpp:117 +#: kpsion.cpp:589  msgid "Incremental backup of selected drive(s)"  msgstr "" -#: kpsion.cpp:118 +#: kpsion.cpp:591  msgid "Restore selected drive(s)"  msgstr "" -#: kpsion.cpp:119 +#: kpsion.cpp:593  msgid "Format selected drive(s)"  msgstr "" -#: kpsion.cpp:187 +#: kpsion.cpp:664  msgid "Retrieving machine info ..."  msgstr "" -#: kpsion.cpp:190 +#: kpsion.cpp:675  msgid "Could not get Psion machine info"  msgstr "" -#: kpsion.cpp:202 +#: kpsion.cpp:688  msgid "an unknown machine"  msgstr "" -#: kpsion.cpp:213 +#: kpsion.cpp:701  msgid "Retrieving drive list ..."  msgstr "" -#: kpsion.cpp:215 +#: kpsion.cpp:704  msgid "Could not get list of drives"  msgstr "" -#: kpsion.cpp:233 +#: kpsion.cpp:722 kpsion.cpp:913 kpsion.cpp:935 kpsion.cpp:958 kpsion.cpp:1068 +#: kpsion.cpp:1245 kpsion.cpp:1376 kpsion.cpp:1385  #, c-format  msgid "Connected to %1"  msgstr "" -#: kpsion.cpp:251 +#: kpsion.cpp:739  msgid ""  "A backup is running.\n"  "Do you really want to quit?"  msgstr "" -#: kpsion.cpp:253 +#: kpsion.cpp:741  msgid ""  "A restore is running.\n"  "Do you really want to quit?"  msgstr "" -#: kpsion.cpp:255 +#: kpsion.cpp:743  msgid ""  "A format is running.\n"  "Do you really want to quit?"  msgstr "" -#: kpsion.cpp:280 +#: kpsion.cpp:769  msgid "Connecting ..."  msgstr "" -#: kpsion.cpp:282 +#: kpsion.cpp:771  msgid "RFSV could not connect to ncpd at %1:%2. "  msgstr "" -#: kpsion.cpp:285 kpsion.cpp:301 kpsion.cpp:319 kpsion.cpp:339 +#: kpsion.cpp:774 kpsion.cpp:791 kpsion.cpp:810 kpsion.cpp:831  msgid " (Retry in %1 seconds.)"  msgstr "" -#: kpsion.cpp:296 +#: kpsion.cpp:786  #, c-format  msgid "RFSV could not establish link: %1."  msgstr "" -#: kpsion.cpp:312 +#: kpsion.cpp:803  msgid "RPCS could not connect to ncpd at %1:%2."  msgstr "" -#: kpsion.cpp:330 +#: kpsion.cpp:822  #, c-format  msgid "RPCS could not establish link: %1."  msgstr "" -#: kpsion.cpp:380 kpsion.cpp:433 -msgid "Backup" -msgstr "" - -#: kpsion.cpp:407 +#: kpsion.cpp:917  #, c-format  msgid "Could not retrieve drive details for drive %1"  msgstr "" -#: kpsion.cpp:414 +#: kpsion.cpp:922  #, c-format  msgid "Scanning drive %1"  msgstr "" -#: kpsion.cpp:423 +#: kpsion.cpp:931  msgid "%1 files need backup"  msgstr "" -#: kpsion.cpp:425 +#: kpsion.cpp:937  msgid "No files need backup"  msgstr "" -#: kpsion.cpp:446 +#: kpsion.cpp:960  #, c-format  msgid "Could not create backup folder %1"  msgstr "" -#: kpsion.cpp:499 -#, c-format -msgid "Backing up %1" +#: kpsion.cpp:984 +msgid "Backup %1% done"  msgstr "" -#: kpsion.cpp:511 +#: kpsion.cpp:1004  msgid "<QT>Could not open<BR/><B>%1</B></QT>"  msgstr "" -#: kpsion.cpp:530 +#: kpsion.cpp:1024  msgid "<QT>Could not read<BR/><B>%1</B></QT>"  msgstr "" -#: kpsion.cpp:551 +#: kpsion.cpp:1037 +msgid "Resetting archive attributes" +msgstr "" + +#: kpsion.cpp:1050 +msgid "<QT>Could not set attributes of<BR/><B>%1</B></QT>" +msgstr "" + +#: kpsion.cpp:1072  msgid "Backup done"  msgstr "" -#: kpsion.cpp:563 +#: kpsion.cpp:1076 +msgid "Restore" +msgstr "" + +#: kpsion.cpp:1080 +msgid "Start" +msgstr "" + +#: kpsion.cpp:1083  msgid "" -"<QT>This erases <B>ALL</B> data on the drive(s).<BR/>Do you really want to " -"proceed?" +"Select items in the list of available backups, then click here to start " +"restore of these items." +msgstr "" + +#: kpsion.cpp:1130 kpsion.cpp:1343 +msgid "<QT>Could not get attributes of<BR/><B>%1</B><BR/>Reason: %2</QT>" +msgstr "" + +#: kpsion.cpp:1159 +msgid "Overwrite" +msgstr "" + +#: kpsion.cpp:1162 +msgid "Overwrite &All" +msgstr "" + +#: kpsion.cpp:1175 +msgid "" +"<QT>The file <B>%1</B> exists already on the Psion with different size " +"and/or attributes.<P><B>On the Psion:</B><BR/>  Size: %2<BR/>  Date: %3<BR/> " +" Attributes: %4</P><P><B>In backup:</B><BR/>  Size: %5<BR/>  Date: %6<BR/>  " +"Attributes: %7</P>Do you want to overwrite it?</QT>" +msgstr "" + +#: kpsion.cpp:1213 +msgid "Reading backups ..."  msgstr "" -#: kpsion.cpp:611 -msgid "Backup %1% complete" +#: kpsion.cpp:1218 +msgid "Selecting backups ..."  msgstr "" -#: kpsion.cpp:676 +#: kpsion.cpp:1250 +msgid "Restore %1% done" +msgstr "" + +#: kpsion.cpp:1298 +msgid "<QT>Could not create directory<BR/><B>%1</B><BR/>Reason: %2</QT>" +msgstr "" + +#: kpsion.cpp:1313 +msgid "<QT>Could not create<BR/><B>%1</B><BR/>Reason: %2</QT>" +msgstr "" + +#: kpsion.cpp:1335 +msgid "<QT>Could not write to<BR/><B>%1</B><BR/>Reason: %2</QT>" +msgstr "" + +#: kpsion.cpp:1353 +msgid "<QT>Could not set attributes of<BR/><B>%1</B><BR/>Reason: %2</QT>" +msgstr "" + +#: kpsion.cpp:1360 +msgid "" +"<QT>Could not set modification time of<BR/><B>%1</B><BR/>Reason: %2</QT>" +msgstr "" + +#: kpsion.cpp:1387 +msgid "Restore done" +msgstr "" + +#: kpsion.cpp:1393 +msgid "" +"<QT>This erases <B>ALL</B> data on the drive(s).<BR/>Do you really want to " +"proceed?" +msgstr "" + +#: kpsion.cpp:1510  #, c-format  msgid "Stopping %1"  msgstr "" -#: kpsion.cpp:697 +#: kpsion.cpp:1532  #, c-format  msgid "Starting %1"  msgstr "" -#: kpsion.moc.cpp:43 kpsion.moc.cpp:48 +#: kpsion.moc.cpp:42 kpsion.moc.cpp:47 +msgid "KPsionCheckListItem" +msgstr "" + +#: kpsion.moc.cpp:109 kpsion.moc.cpp:114 +msgid "KPsionBackupListView" +msgstr "" + +#: kpsion.moc.cpp:184 kpsion.moc.cpp:189 +msgid "KPsionRestoreDialog" +msgstr "" + +#: kpsion.moc.cpp:246 kpsion.moc.cpp:251  msgid "KPsionMainWindow"  msgstr "" -#: main.cpp:15 +#: main.cpp:48 +msgid "perform scheduled backup" +msgstr "" + +#: main.cpp:50  msgid "perform backup"  msgstr "" -#: main.cpp:17 +#: main.cpp:52  msgid "perform restore"  msgstr "" -#: main.cpp:19 +#: main.cpp:54  msgid "format drive"  msgstr "" -#: main.cpp:20 +#: main.cpp:55  msgid "The drive letter to backup/restore or format."  msgstr "" -#: main.cpp:25 +#: main.cpp:60  msgid "KPsion"  msgstr "" -#: main.cpp:26 +#: main.cpp:61  msgid "Psion connectivity utility"  msgstr "" -#: main.cpp:31 +#: main.cpp:66  msgid "Original Developer/Maintainer"  msgstr "" @@ -235,11 +344,11 @@ msgstr ""  msgid "Backup &directory"  msgstr "" -#: setupdialog.cpp:30 wizards.cpp:87 +#: setupdialog.cpp:30 wizards.cpp:109  msgid "Browse"  msgstr "" -#: setupdialog.cpp:33 wizards.cpp:160 +#: setupdialog.cpp:33 wizards.cpp:182  msgid "Backup &generations"  msgstr "" @@ -255,25 +364,35 @@ msgstr ""  msgid "Machine &UID"  msgstr "" -#: wizards.cpp:26 +#: statusbarprogress.cpp:357 statusbarprogress.cpp:370 +#: statusbarprogress.cpp:379 statusbarprogress.cpp:392 +#: statusbarprogress.cpp:401 statusbarprogress.cpp:412 +msgid "%1 %2 of %3" +msgstr "" + +#: statusbarprogress.moc.cpp:42 statusbarprogress.moc.cpp:47 +msgid "KPsionStatusBarProgress" +msgstr "" + +#: wizards.cpp:48  msgid "KPsion Setup"  msgstr "" -#: wizards.cpp:28 wizards.cpp:411 +#: wizards.cpp:50 wizards.cpp:433  msgid "Click this button to continue with the next page."  msgstr "" -#: wizards.cpp:30 wizards.cpp:413 +#: wizards.cpp:52 wizards.cpp:435  msgid "Click this button, to go to a previous page."  msgstr "" -#: wizards.cpp:32 +#: wizards.cpp:54  msgid ""  "<QT>If you click this button, the setup of <B>KPSion</B> will be aborted and "  "next time you start <B>KPsion</B>, it will run this setup again.</QT>"  msgstr "" -#: wizards.cpp:49 +#: wizards.cpp:71  msgid ""  "<QT><H2>Welcome to KPsion!</H2>It looks like you started <B>KPsion</B> the "  "first time. At least, i could not find any valid configuration.</BR>On the " @@ -281,11 +400,11 @@ msgid ""  "working with <B>KPsion</B>.</BR> </BR>Have fun.</QT>"  msgstr "" -#: wizards.cpp:66 +#: wizards.cpp:88  msgid "<QT><BIG><B>Welcome<B></BIG></QT>"  msgstr "" -#: wizards.cpp:74 +#: wizards.cpp:96  msgid ""  "<QT>First, we need a folder for storing backups of your Psion. You probably "  "don't want others to have access to it, so it's best to choose a location " @@ -293,21 +412,21 @@ msgid ""  "select a suitable location or simply accept the default shown below.</QT>"  msgstr "" -#: wizards.cpp:90 +#: wizards.cpp:112  msgid "This is the name of the backup folder."  msgstr "" -#: wizards.cpp:92 +#: wizards.cpp:114  msgid ""  "Click here, for opening a dialog which lets you easily select the backup "  "folder."  msgstr "" -#: wizards.cpp:107 +#: wizards.cpp:129  msgid "<QT><BIG><B>Step 1</B></BIG> - Specify backup directory</QT>"  msgstr "" -#: wizards.cpp:114 +#: wizards.cpp:136  msgid ""  "<QT>Next, please specify some information regarding backup "  "policy:<UL><LI>How many generations of backups do you want to " @@ -315,63 +434,63 @@ msgid ""  "intervals do you want to happen backups?</LI></UL></QT>"  msgstr "" -#: wizards.cpp:124 +#: wizards.cpp:146  msgid "&Incremental backup reminder"  msgstr "" -#: wizards.cpp:127 wizards.cpp:145 +#: wizards.cpp:149 wizards.cpp:167  msgid "none"  msgstr "" -#: wizards.cpp:128 wizards.cpp:146 +#: wizards.cpp:150 wizards.cpp:168  msgid "daily"  msgstr "" -#: wizards.cpp:129 wizards.cpp:147 +#: wizards.cpp:151 wizards.cpp:169  msgid "every 2 days"  msgstr "" -#: wizards.cpp:130 wizards.cpp:148 +#: wizards.cpp:152 wizards.cpp:170  msgid "every 3 days"  msgstr "" -#: wizards.cpp:131 wizards.cpp:149 +#: wizards.cpp:153 wizards.cpp:171  msgid "every 4 days"  msgstr "" -#: wizards.cpp:132 wizards.cpp:150 +#: wizards.cpp:154 wizards.cpp:172  msgid "every 5 days"  msgstr "" -#: wizards.cpp:133 wizards.cpp:151 +#: wizards.cpp:155 wizards.cpp:173  msgid "every 6 days"  msgstr "" -#: wizards.cpp:134 wizards.cpp:152 +#: wizards.cpp:156 wizards.cpp:174  msgid "weekly"  msgstr "" -#: wizards.cpp:135 wizards.cpp:153 +#: wizards.cpp:157 wizards.cpp:175  msgid "every 2 weeks"  msgstr "" -#: wizards.cpp:136 wizards.cpp:154 +#: wizards.cpp:158 wizards.cpp:176  msgid "every 3 weeks"  msgstr "" -#: wizards.cpp:137 wizards.cpp:155 +#: wizards.cpp:159 wizards.cpp:177  msgid "monthly"  msgstr "" -#: wizards.cpp:142 +#: wizards.cpp:164  msgid "&Full backup reminder"  msgstr "" -#: wizards.cpp:178 +#: wizards.cpp:200  msgid "<QT><BIG><B>Step 2</B></BIG> - Backup policy</QT>"  msgstr "" -#: wizards.cpp:186 +#: wizards.cpp:208  msgid ""  "<QT>If no connection could be established on startup, <B>KPsion</B> will "  "attempt to connect in regular intervals. Please specify the interval after " @@ -382,55 +501,55 @@ msgid ""  "rate</LI><LI>have permission to use the specified port</LI></UL></QT>"  msgstr "" -#: wizards.cpp:201 +#: wizards.cpp:223  msgid "&Connection retry interval (sec.)"  msgstr "" -#: wizards.cpp:207 +#: wizards.cpp:229  msgid "Serial &device"  msgstr "" -#: wizards.cpp:211 +#: wizards.cpp:233  msgid "/dev/ttyS0"  msgstr "" -#: wizards.cpp:212 +#: wizards.cpp:234  msgid "/dev/ttyS1"  msgstr "" -#: wizards.cpp:213 +#: wizards.cpp:235  msgid "/dev/ttyS2"  msgstr "" -#: wizards.cpp:214 +#: wizards.cpp:236  msgid "/dev/ttyS3"  msgstr "" -#: wizards.cpp:215 +#: wizards.cpp:237  msgid "/dev/ircomm0"  msgstr "" -#: wizards.cpp:216 +#: wizards.cpp:238  msgid "/dev/ircomm1"  msgstr "" -#: wizards.cpp:217 +#: wizards.cpp:239  msgid "/dev/ircomm2"  msgstr "" -#: wizards.cpp:218 +#: wizards.cpp:240  msgid "/dev/ircomm3"  msgstr "" -#: wizards.cpp:223 +#: wizards.cpp:245  msgid "Serial &speed"  msgstr "" -#: wizards.cpp:247 +#: wizards.cpp:269  msgid "<QT><BIG><B>Step 3</B></BIG> - Connection parameters</QT>"  msgstr "" -#: wizards.cpp:255 +#: wizards.cpp:277  msgid ""  "<QT>That's it!<BR/>Next, i will start <B>KPsion</B> and if your Psion is "  "already connected and it's communication turned on (use <B>Ctrl-T</B> at " @@ -439,121 +558,121 @@ msgid ""  "Backup.<BR/>Please click <B>Finish</B> now.</QT>"  msgstr "" -#: wizards.cpp:274 +#: wizards.cpp:296  msgid "<QT><BIG><B>Finished</B></BIG></QT>"  msgstr "" -#: wizards.cpp:282 +#: wizards.cpp:304  msgid "Backup folder"  msgstr "" -#: wizards.cpp:292 +#: wizards.cpp:314  msgid ""  "<QT>You are about to abort the initial setup of <B>KPsion</B>. No "  "configuration will be stored and you will have to repeat this procedure when "  "you start <B>KPsion</B> next time.<BR/>Do you really want to exit now?</QT>"  msgstr "" -#: wizards.cpp:347 +#: wizards.cpp:369  msgid ""  "<QT>The folder <B>%1</B> does <B>not</B> exist.<BR/>Shall it be created?</QT>"  msgstr "" -#: wizards.cpp:352 +#: wizards.cpp:374  msgid "<QT>The specified folder<BR/><B>%1</B><BR/>could <B>not</B> be created"  msgstr "" -#: wizards.cpp:357 +#: wizards.cpp:379  msgid ""  ", because you either don't have sufficient rights to do that, or the "  "filesystem is readonly."  msgstr "" -#: wizards.cpp:361 +#: wizards.cpp:383  msgid ", because the filesystem has not enough space."  msgstr "" -#: wizards.cpp:367 +#: wizards.cpp:389  msgid ", because there already exists another object with the same name."  msgstr "" -#: wizards.cpp:377 +#: wizards.cpp:399  msgid ""  ", because you specified a path which probably contains a dangling symbolic "  "link."  msgstr "" -#: wizards.cpp:380 +#: wizards.cpp:402  msgid ""  ", because you specified a path which contains an element which is not a "  "folder."  msgstr "" -#: wizards.cpp:384 +#: wizards.cpp:406  msgid ", because you specified a path which contains too many symbolic links."  msgstr "" -#: wizards.cpp:391 +#: wizards.cpp:413  msgid "<BR/>Please select another folder.</QT>"  msgstr "" -#: wizards.cpp:407 +#: wizards.cpp:429  msgid "New Psion detected"  msgstr "" -#: wizards.cpp:415 +#: wizards.cpp:437  msgid ""  "<QT>If you click this button, the setup for the new connected Psion will be "  "aborted and next time you connect this Psion again, <B>KPsion</B> will run "  "this setup again.</QT>"  msgstr "" -#: wizards.cpp:424 +#: wizards.cpp:446  msgid ""  "<QT>The Psion with the unique ID <B>%1</B> is connected the first time. "  "Please assign a name to it.</QT>"  msgstr "" -#: wizards.cpp:431 +#: wizards.cpp:453  msgid "&Name of new Psion"  msgstr "" -#: wizards.cpp:433 +#: wizards.cpp:455  msgid "My new Psion"  msgstr "" -#: wizards.cpp:450 +#: wizards.cpp:472  msgid "<QT><BIG><B>New Psion detected<B></BIG></QT>"  msgstr "" -#: wizards.cpp:458 +#: wizards.cpp:480  msgid ""  "<QT>Please select the Drive(s), you want to be backed up when running in "  "unattended backup mode.</QT>"  msgstr "" -#: wizards.cpp:466 +#: wizards.cpp:488  msgid "Available drives"  msgstr "" -#: wizards.cpp:490 +#: wizards.cpp:512  msgid "<QT><BIG><B>Specify drives to backup<B></BIG></QT>"  msgstr "" -#: wizards.cpp:514 +#: wizards.cpp:536  msgid "The name cannot be empty."  msgstr "" -#: wizards.cpp:521 +#: wizards.cpp:543  msgid ""  "<QT>The name <B>%1</B> is already assigned to another machine.<BR/>Please "  "choose a different name.</QT>"  msgstr "" -#: wizards.moc.cpp:43 wizards.moc.cpp:48 +#: wizards.moc.cpp:42 wizards.moc.cpp:47  msgid "FirstTimeWizard"  msgstr "" -#: wizards.moc.cpp:112 wizards.moc.cpp:117 +#: wizards.moc.cpp:111 wizards.moc.cpp:116  msgid "NewPsionWizard"  msgstr "" | 
