diff options
author | Reuben Thomas <rrt@sc3d.org> | 2007-11-20 21:32:27 +0000 |
---|---|---|
committer | Reuben Thomas <rrt@sc3d.org> | 2007-11-20 21:32:27 +0000 |
commit | e1408c833c9c8dfc99f75d22faf6d50aeca4571c (patch) | |
tree | da36a07c05b291fd47f2a4b0669a8f596e807f23 /kde2 | |
parent | 5ac307594ebbe560078317d6c0177b1a352263e1 (diff) | |
download | plptools-e1408c833c9c8dfc99f75d22faf6d50aeca4571c.tar.gz plptools-e1408c833c9c8dfc99f75d22faf6d50aeca4571c.tar.bz2 plptools-e1408c833c9c8dfc99f75d22faf6d50aeca4571c.zip |
Remove the KDE code. It was nice, but it's nicer just to treat the
Psion as a file system, and use plpftp to do out-of-band things. Also,
with KDE 4 this code will surely stop working.
Diffstat (limited to 'kde2')
181 files changed, 0 insertions, 14023 deletions
diff --git a/kde2/.cvsignore b/kde2/.cvsignore deleted file mode 100644 index 3dda729..0000000 --- a/kde2/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile.in -Makefile diff --git a/kde2/Makefile.am b/kde2/Makefile.am deleted file mode 100644 index fa6f47e..0000000 --- a/kde2/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -# $Id$ -# - -SUBDIRS = kioslave plugins mime kpsion klipsi po doc - -POFILES = -# -# remove all intermediate files that can be recreated using -# Makefile.cvs -# -maintainer-clean-local: - rm -f Makefile.in - -am_edit: - perl ../conf/am_edit --topdir=kde2 diff --git a/kde2/doc/.cvsignore b/kde2/doc/.cvsignore deleted file mode 100644 index 3dda729..0000000 --- a/kde2/doc/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile.in -Makefile diff --git a/kde2/doc/Makefile.am b/kde2/doc/Makefile.am deleted file mode 100644 index 8d0fd41..0000000 --- a/kde2/doc/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -SUBDIRS = en de kioslave - -maintainer-clean-local: - rm -f Makefile.in diff --git a/kde2/doc/de/.cvsignore b/kde2/doc/de/.cvsignore deleted file mode 100644 index 960e4b1..0000000 --- a/kde2/doc/de/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -Makefile.in -Makefile -HTML -index.docbook -*.bz2 diff --git a/kde2/doc/de/Makefile.am b/kde2/doc/de/Makefile.am deleted file mode 100644 index 4ea6f6d..0000000 --- a/kde2/doc/de/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ - -KDE_LANG = de -KDE_DOCS = kpsion - -EXTRA_DIST = index.docbook.in - -index.docbook: index.docbook.in - cat index.docbook.in | perl -e 'while (<>) { if (/\$$Date:\s+(.*)\s+\$$/) { $$d=$$1; } s/__DATE__/$$d/; s/__VERSION__/$(VERSION)/; print; }' > index.docbook - -maintainer-clean-local: - rm -f Makefile.in diff --git a/kde2/doc/de/firstwizard-1.png b/kde2/doc/de/firstwizard-1.png Binary files differdeleted file mode 100644 index 624d580..0000000 --- a/kde2/doc/de/firstwizard-1.png +++ /dev/null diff --git a/kde2/doc/de/firstwizard-2.png b/kde2/doc/de/firstwizard-2.png Binary files differdeleted file mode 100644 index 72d0961..0000000 --- a/kde2/doc/de/firstwizard-2.png +++ /dev/null diff --git a/kde2/doc/de/firstwizard-3.png b/kde2/doc/de/firstwizard-3.png Binary files differdeleted file mode 100644 index 85d5f0f..0000000 --- a/kde2/doc/de/firstwizard-3.png +++ /dev/null diff --git a/kde2/doc/de/index.docbook.in b/kde2/doc/de/index.docbook.in deleted file mode 100644 index 08a8308..0000000 --- a/kde2/doc/de/index.docbook.in +++ /dev/null @@ -1,714 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1-Based Variant V1.0//EN" "dtd/kdex.dtd" [ - <!ENTITY kpsion "<application>KPsion</application>"> - <!ENTITY kappname "&kpsion;"> - <!ENTITY % addindex "IGNORE"> - <!ENTITY % German "INCLUDE"> - <!-- DO NOT DELETE! $Revision$ --> - <!-- DO NOT DELETE! $Date$ --> -]> - -<book lang="&language;"> -<bookinfo> - -<title>Das &kpsion; Handbuch</title> - -<authorgroup> -<author> -<firstname>Fritz</firstname> -<surname>Elfert</surname> -<affiliation> -<address><email>felfert@to.com</email></address> -</affiliation> -</author> - -<!-- -<othercredit role="reviewer"> -<firstname>Whoever</firstname> -<surname>Lastname</surname> -<affiliation> -<address><email>mail@somewhere.org</email></address> -</affiliation> -<contrib>Reviewer</contrib> -</othercredit> ---> - -</authorgroup> - -<copyright> -<year>2001</year> -<holder>Fritz Elfert</holder> -</copyright> - -<legalnotice>&FDLNotice;</legalnotice> - -<date>__DATE__</date> -<releaseinfo>__VERSION__</releaseinfo> - - -<abstract><para> -&kpsion; ist ein Programm zur Daten-sicherung/rücksicherung -von Psion PDAs, sowie zum Formatieren von Lauferken derselben. -</para></abstract> - -<keywordset> -<keyword>KDE</keyword> -<keyword>plptools</keyword> -<keyword>KPsion</keyword> -<keyword>Psion</keyword> -<keyword>EPOC</keyword> -<keyword>PDA</keyword> -<keyword>Sicherung</keyword> -<keyword>Rücksicherung</keyword> -<keyword>formatieren</keyword> -</keywordset> - -</bookinfo> - -<chapter id="Introduction"> -<title>Einführung</title> - -<para>Willkommen bei &kpsion;! &kpsion; ist ein KDE-Programm zum Sichern und -Rücksichern von Daten eines Psion PDAs sowie zum Formatieren von -Laufwerken solcher PDAs. Es benutzt den Daemonen <command>ncpd</command> -und die Bibliotheken aus dem Packet plptools. -</para> - -<para>Dieses Programm kann von der Kommandozeile oder über eine -<filename>.desktop</filename> Datei gestartet werden. -</para> - -</chapter> - -<chapter id="installation"> -<title>Installation</title> - -<sect1 id="downloading"> -<title>Download</title> - -<para>&kpsion; ist Bestandteil des Packets plptools. Das Packet plptools -ist auf <ulink url="http://plptools.sourceforge.net/">http://plptools.sourceforge.net/</ulink> zum Download verfügbar.</para> - -</sect1> - -<sect1 id="compiling"> -<title>Kompilieren</title> - -<para>Das Packet plptools ist eigentlich kein KDE packet, sondern eine Sammlung -von Anwendungen zum Umgang mit dem PLP-Protokoll (dem Protokoll zur Kommunikation mit einem Psion (EPOC) PDA). Deshalb ist beim Bau des Packets plptools der -KDE-spezifische Teil explizit zu aktivieren. Hierzu wird die Option -<option>--enable-kde</option> beim Ausführen des configure von plptools -benutzt.</para> - -<para>Das Bauen läuft üblicherweise folgendermaßen ab:</para> - -<screen> -<prompt>$</prompt> <command>./configure <option>--enable-kde</option></command> -<prompt>$</prompt> <command>make</command> -<prompt>$</prompt> <command>make <option>install</option></command> -</screen> - -<para>Der letzte Schritt ist hierbei unter der Benutzerkennung root durchzuführen. Der Installationsprozess benötigt Schreibzugriff auf die systemweiten -KDE-Verzeichnisse.</para> - -</sect1> -</chapter> - -<chapter id="using-kpsion"> -<title>&kpsion; verwenden</title> - -<para> -Die Verwendung von &kpsion; ist einfach. Normalerweise wird &kpsion; über den -entsprechenden Eintrag im Untermenü Werkzeuge des K-Menüs gestartet. - -Sie können &kpsion; aber auch von der Kommandozeile starten. In diesem Fall -benutzen Sie eine der folgenden Befehle: -</para> - - <cmdsynopsis> - <command>kpsion</command> - </cmdsynopsis> - - <cmdsynopsis> - <command>kpsion</command> - <arg>--autobackup</arg> - </cmdsynopsis> - - <cmdsynopsis> - <command>kpsion</command> - <arg>--backup <replaceable>DRIVE</replaceable></arg> - </cmdsynopsis> - - <cmdsynopsis> - <command>kpsion</command> - <arg>--restore <replaceable>DRIVE</replaceable></arg> - </cmdsynopsis> - - <cmdsynopsis> - <command>kpsion</command> - <arg>--format <replaceable>DRIVE</replaceable></arg> - </cmdsynopsis> - -<para>Wenn &kpsion; ohne jede Option gestartet wird, so startet das -Programm im interaktiven Modus. Werden Optionen verwendet, führt &kpsion; -die angegebene Aufgabe automatisch durch.</para> - -<variablelist> -<varlistentry> -<term><option>--autobackup</option></term> -<listitem><para> -Diese Option weist &kpsion; an, eine geplante Sicherung des angeschlossenen -Gerätes durchzuführen. Ist zum Zeitpunkt des Starts kein Psion angeschlossen, -beendet sich das Programm sofort. -</para></listitem> -</varlistentry> - -<varlistentry> -<term><option>--backup <replaceable>DRIVE</replaceable></option></term> -<listitem><para> -Diese Option startet die Sicherung des angegebenen Laufwerks <replaceable>DRIVE</replaceable>. -<replaceable>DRIVE</replaceable> ist hierbei ein einzelner Laufwerks-Buchstabe. -</para></listitem> -</varlistentry> - -<varlistentry> -<term><option>--restore <replaceable>DRIVE</replaceable></option></term> -<listitem><para> -Diese Option startet die Rückicherung des angegebenen Laufwerks <replaceable>DRIVE</replaceable>. -<replaceable>DRIVE</replaceable> ist hierbei ein einzelner Laufwerks-Buchstabe. -</para></listitem> -</varlistentry> - -<varlistentry> -<term><option>--format <replaceable>DRIVE</replaceable></option></term> -<listitem><para> -Diese Option startet das Formatieren des angegebenen Laufwerks <replaceable>DRIVE</replaceable>. -<replaceable>DRIVE</replaceable> ist hierbei ein einzelner Laufwerks-Buchstabe. -</para></listitem> -</varlistentry> - -</variablelist> - -</chapter> - -<chapter id="commands"> -<title>Kommandoreferenz</title> - -<sect1 id="kpsion-mainwindow"> -<title>Das &kpsion; Hauptfenster</title> -<para> -<screenshot> -<screeninfo>&kpsion; mainwindow.</screeninfo> - <mediaobject> - <imageobject> - <imagedata fileref="toplevel.png" format="PNG"></imagedata> - </imageobject> - <textobject> - <phrase>&kpsion; mainwindow</phrase> - </textobject> - </mediaobject> -</screenshot> -Ist ein Psion PDA angeschlossen, so werden dessen Laufwerke im zentralen -Icon-Fenster des Programms angezeigt. Durch einen Mausklick auf ein -Laufwerk, können Sie dieses Laufwerk an- bzw. abwählen. Sind Laufwerke -angewählt, so werden die Einträge der möglichen Aktionen im Datei-Menü und -in der Werkzeugleiste aktiviert. In der Werkzeugleiste sind die am -häufigsten benötigten <guimenu>Aktionen</guimenu> verfügbar. Diese sind:</para> -<para> -<itemizedlist> -<listitem><para> -<guiicon> - <inlinemediaobject> - <imageobject> - <imagedata fileref="psion_backup.png" format="PNG"></imagedata> - </imageobject> - </inlinemediaobject> -</guiicon> Komplettsicherung. -</para></listitem> -<listitem><para> -<guiicon> - <inlinemediaobject> - <imageobject> - <imagedata fileref="psion_restore.png" format="PNG"></imagedata> - </imageobject> - </inlinemediaobject> -</guiicon> Rücksicherung. -</para></listitem> -</itemizedlist> -</para> - -<sect2><title>Das Datei Menü</title><para><variablelist> - -<varlistentry> -<term><menuchoice> -<shortcut> -<keycombo><keycap>Ctrl</keycap><keycap>k</keycap></keycombo> -</shortcut> -<guimenu>Datei</guimenu> -<guimenuitem>Starte Komplettsicherung</guimenuitem> -</menuchoice></term> -<listitem><para> -Startet eine <action>Komplettsicherung</action> der gewählten Laufwerke. -</para></listitem> -</varlistentry> - -<varlistentry> -<term><menuchoice> -<shortcut> -<keycombo><keycap>Ctrl</keycap><keycap>i</keycap></keycombo> -</shortcut> -<guimenu>Datei</guimenu> -<guimenuitem>Start Inkrementelle Sicherung</guimenuitem> -</menuchoice></term> -<listitem><para> -Startet eine <action>inkrementelle Sicherung</action> der gewählten Laufwerke. -</para></listitem> -</varlistentry> - -<varlistentry> -<term><menuchoice> -<shortcut> -<keycombo><keycap>Ctrl</keycap><keycap>r</keycap></keycombo> -</shortcut> -<guimenu>Datei</guimenu> -<guimenuitem>Starte Rücksicherung</guimenuitem> -</menuchoice></term> -<listitem><para> -Startet eine <action>Rücksicherung</action> der gewählten Laufwerke. -</para></listitem> -</varlistentry> - -<varlistentry> -<term><menuchoice> -<shortcut> -<keycombo><keycap>Ctrl</keycap><keycap>f</keycap></keycombo> -</shortcut> -<guimenu>Datei</guimenu> -<guimenuitem>Starte Formatierung</guimenuitem> -</menuchoice></term> -<listitem><para> -Startet das <action>Formatieren</action> der gewählten Laufwerke. -</para></listitem> -</varlistentry> - -<varlistentry> -<term><menuchoice> -<shortcut> -<keycombo><keycap>Ctrl</keycap><keycap>e</keycap></keycombo> -</shortcut> -<guimenu>Datei</guimenu> -<guimenuitem>Beenden</guimenuitem> -</menuchoice></term> -<listitem><para> -<action>Beendet</action> &kpsion;. -</para></listitem> -</varlistentry> - -</variablelist></para></sect2> - -</sect1> - -</chapter> - -<chapter id="Configuration"> -<title>Konfiguration</title> - -<sect1 id="firsttime"> -<title>Erstmaliger Start</title> - -<para> -Wenn Sie &kpsion; zum ersten Mal starten, erscheint ein Assistent zur -Einrichtung und einfachen Anpassung von &kpsion; an Ihre persönlichen -Vorgaben. Dieser Vorgang ist in drei Schritte unterteilt: -</para> - -<sect2> -<title>Auswahl des Sicherungs-Ordners</title> -<para> -<screenshot> -<screeninfo>Step one. Select a backup directory.</screeninfo> - <mediaobject> - <imageobject> - <imagedata fileref="firstwizard-1.png" format="PNG"></imagedata> - </imageobject> - <textobject> - <phrase>Selecting the backup directory</phrase> - </textobject> - </mediaobject> -</screenshot> -Der Sicherungs-Ordner wird von &kpsion; zur Ablage von Sicherungs-Archiven -verwendet. Im Normalfall können Sie einfach den vorgeschlagenen Ordner -unterhalb Ihres Heimatverzeichnisses unverändert übernehmen. Sollten Sie -einen anderen Ordner wünschen (z.B. weil der Plattenplatz auf der -entsprechenden Partition knapp ist.), so können Sie dies durch einen -Mausklick auf die Schaltfäche Durchsuchen. Natürlich sind zum Anlegen -des Ordners Schreibrechte im übergeordneten Ordner nötig. -</para> -<para></para> -</sect2> - -<sect2> -<title>Einstellung der Sicherungs-Strategie</title> -<para> -<screenshot> -<screeninfo>Step two. backup strategy.</screeninfo> - <mediaobject> - <imageobject> - <imagedata fileref="firstwizard-2.png" format="PNG"></imagedata> - </imageobject> - <textobject> - <phrase>Setting the backup strategy</phrase> - </textobject> - </mediaobject> -</screenshot> -Im zweiten Schritt können Sie die Sicherungs-Strategie anpassen. Sowohl -für inkrementelle als auch komplette Sicherungen können Sie einen Intervall -angeben. Ist mindestens einer dieser Intervalle aktiviert, so legt &kpsion; -einen <filename>.desktop</filename> Eintrag in Ihrem KDE-Autostart-Ordner an. -Jedes Mal, wenn Sie in Zukunft KDE starten, wird dann &kpsion; im automatischen -Sicherungs-Modus gestartet. Wenn dabei dann ein Intervall abgelaufen ist (und -ein Psion angeschlossen ist), so wird &kpsion; eine entspechende automatische -Sicherung durchführen. -</para> -<para> -Die dritte Einstellung, die Sie anpassen können, ist die Anzahl von -Sicherungs-Generationen. Eine Sicherungs-Generation besteht aus einer -Komplett-Sicherung und den darauf aufbauenden inkrementellen Sicherungen. -In Anschluss an eine erfolgreiche Komplett-Sicherung prüft &kpsion;, ob -mehr als die hier angegebene Anzahl Generationen bestehen und löscht -ggf. ältere Sicherungs-Generationen. -</para> -<para></para> -</sect2> - -<sect2> -<title>Verbindungsparameter</title> -<para> -<screenshot> -<screeninfo>Step three. connection parameters.</screeninfo> - <mediaobject> - <imageobject> - <imagedata fileref="firstwizard-3.png" format="PNG"></imagedata> - </imageobject> - <textobject> - <phrase>Setting connection parameters</phrase> - </textobject> - </mediaobject> -</screenshot> -Im dritten Schritt, können Sie das Verhalten von &kpsion; während des -Verbindungs-Aufbaus beeinflussen. Wenn Sie den Verbindungs-Intervall -auf einen Wert ungleich Null einstellen, so wird &kpsion; kontinuierlich -einen gescheiterten Verbindungsaufbau wiederholen. Da &kpsion; hierzu -den Daemonen ncpd benötigt, ist es zudem möglich, diesen bei Bedarf -automatisch zu starten. Damit dies funktioniert, müssen Sie zusätzlich -Schreibrechte für die entsprechende serielle Schnittstelle besitzen. -</para> -<para></para> -</sect2> - -</sect1> - -<sect1 id="newpsion"> -<title>Neue Verbindung</title> - -<para> -Wenn &kpsion; eine Verbindung zum Psion aufbaut, so fragt er dessen -Seriennummer ab. Ist der angeschlossene Psion noch nie vorher angeschlossen -gewesen, so erscheint ein Assistent mit dem Sie dem angeschlossenen Psion -einen Namen geben, sowie die Laufwerke für automatische Sicherungen auswählen -können. -</para> - -<sect2> -<title>Psion Name</title> -<para> -<screenshot> -<screeninfo>Step one. psion name.</screeninfo> - <mediaobject> - <imageobject> - <imagedata fileref="newpsionwizard-1.png" format="PNG"></imagedata> - </imageobject> - <textobject> - <phrase>Setting a psion name</phrase> - </textobject> - </mediaobject> -</screenshot> -Der vergebene Name wird nur zur Anzeige verwendent. Intern benutzt &kpsion; -stets die Seriennummer des Psion zur Identifikation. -</para> -<para></para> -</sect2> - -<sect2> -<title>Wahl der zu sichernden Laufwerke</title> -<para> -<screenshot> -<screeninfo>Step two. specifying backup drives.</screeninfo> - <mediaobject> - <imageobject> - <imagedata fileref="newpsionwizard-2.png" format="PNG"></imagedata> - </imageobject> - <textobject> - <phrase>Specifying backup drives</phrase> - </textobject> - </mediaobject> -</screenshot> -Üblicherweise wählen Sie hier alle Laufwerke ausgenommen das ROM Laufwerk. -Das ROM Laufwerk kann zwar gesichert werden, aber natürlich ist damit -keine Rücksicherung möglich. -</para> -<para></para> -</sect2> -</sect1> - -<sect1 id="settings"> -<title>Einstellungen</title> - -<para> -Alle Einstellungen die in den Assistenten vorgenommen wurden, können Sie -zu einem beliebigen späteren Zeitpunkt mit dem Dialog Einstellungen -modifizieren. Der Dialog Einstellungen besteht aus drei Seiten: -</para> - -<sect2> -<title>Sicherung</title> -<para> -<screenshot> -<screeninfo>Setup, Backup.</screeninfo> - <mediaobject> - <imageobject> - <imagedata fileref="settings-backup.png" format="PNG"></imagedata> - </imageobject> - <textobject> - <phrase>Settings, Backup</phrase> - </textobject> - </mediaobject> -</screenshot> -</para> -<para></para> -</sect2> - -<sect2> -<title>Verbindung</title> -<para> -<screenshot> -<screeninfo>Settings, Connection.</screeninfo> - <mediaobject> - <imageobject> - <imagedata fileref="settings-connection.png" format="PNG"></imagedata> - </imageobject> - <textobject> - <phrase>Settings, Connection</phrase> - </textobject> - </mediaobject> -</screenshot> -</para> -<para></para> -</sect2> - -<sect2> -<title>Geräte</title> -<para> -<screenshot> -<screeninfo>Settings, Machines.</screeninfo> - <mediaobject> - <imageobject> - <imagedata fileref="settings-machines.png" format="PNG"></imagedata> - </imageobject> - <textobject> - <phrase>Settings, Machines</phrase> - </textobject> - </mediaobject> -</screenshot> -</para> -<para></para> -</sect2> - -</sect1> - -</chapter> - -<chapter id="Interna"> -<title>Interna</title> - -<sect1 id="backupformat"> -<title>Die Backup-Dateien</title> - -<para>Bei den Backup-Dateien die von &kpsion; angelegt werden, handelt es -sich um simple, mit gzip komprimierte tar-Archive. -Die Dateien sind nach folgendem Schema benannt: -<variablelist> -<varlistentry> -<term>TYP-YYYY-MO-DD-HH-MI-SS.tar.gz</term> -<listitem><para> - wobei - <variablelist> - <varlistentry> - <term>TYP</term> - <listitem><para> - ein einzelnes Zeichen ist und den Backup-Typ repräsentiert. 'I' steht für - incrementell und 'F' steht für englisch 'full' (Komplett-Backup). - </para></listitem> - </varlistentry> - <varlistentry> - <term>YYYY</term> - <listitem><para> - das Jahr des Backups angibt. - </para></listitem> - </varlistentry> - <varlistentry> - <term>MO</term> - <listitem><para> - den Monat des Backups angibt. - </para></listitem> - </varlistentry> - <varlistentry> - <term>DD</term> - <listitem><para> - den Tag des Backups angibt. - </para></listitem> - </varlistentry> - <varlistentry> - <term>HH</term> - <listitem><para> - die Stunde des Backups angibt. - </para></listitem> - </varlistentry> - <varlistentry> - <term>MI</term> - <listitem><para> - die Minute des Backups angibt. - </para></listitem> - </varlistentry> - <varlistentry> - <term>SS</term> - <listitem><para> - Die Sekunde des Backups angibt. - </para></listitem> - </varlistentry> - </variablelist> -</para></listitem> -</varlistentry> -</variablelist> -Die Dateinamen innerhalb des tar-Archives sind konvertiert um den -allgemein unter Unix gültigen Namens-Schemata zu genügen: Alle Vorkommen -des Zeichens '%' sind in die Zeichenkette '%25' umgewandelt, alle Vorkommen -des Zeichens '/' sind in die Zeichenkette '%2f' umgewandelt und alle -Vorkommen von '\' sind nach '/' gewandelt. -</para> -<para> -Zusätzlich zu den gesicherten Dateien des Psion, enthält jedes tar-Archiv -eine spezielle Indexdatei, in der die original-Dateiattribute und die -64-bit Dateizeit des Psion gespeichert werden. Diese Indexdatei hat den -Namen KPsionIncrementalIndex (für incrementelle Backups) oder -KPsionFullIndex (für Komplett-Backups). Die Indexdatei befindet sich im -Wurzelverzeichnis des Archivs und ist eine ASCII-Datei mit folgendem -Aufbau: -<variablelist> -<varlistentry> -<term>hhhhhhhh llllllll ssssssss aaaaaaaa fn</term> -<listitem><para> - wobei - <variablelist> - <varlistentry> - <term>hhhhhhhh</term> - <listitem><para> - eine 8-stellige Hexadezimalzahl ist, die die obere Hälfte des - Datei-Modifikationsdatums enthält. - </para></listitem> - </varlistentry> - <varlistentry> - <term>llllllll</term> - <listitem><para> - eine 8-stellige Hexadezimalzahl ist, die die untere Hälfte des - Datei-Modifikationsdatums enthält. - </para></listitem> - </varlistentry> - <varlistentry> - <term>ssssssss</term> - <listitem><para> - eine 8-stellige Hexadezimalzahl ist, die die Dateigrösse enthält. - </para></listitem> - </varlistentry> - <varlistentry> - <term>aaaaaaaa</term> - <listitem><para> - eine 8-stellige Hexadezimalzahl ist, die die Dateiattribute enthält. - </para></listitem> - </varlistentry> - <varlistentry> - <term>fn</term> - <listitem><para> - der unkonvertierte Original-Dateiname ist (Absoluter Pfad). - </para></listitem> - </varlistentry> - </variablelist> -</para></listitem> -</varlistentry> -</variablelist> -Die erste Zeile der Indexdatei enthält einen Header mit dem folgenden -Format: -<variablelist> -<varlistentry> -<term>#plpbackup index T</term> -<listitem><para> - wobei - <variablelist> - <varlistentry> - <term>T</term> - <listitem><para> - ein einzelnes Zeichen ist, welches den Backup-Typ repräsentiert. - 'I' steht für incrementell und 'F' steht für englisch 'full' - (Komplett-Backup). - </para></listitem> - </varlistentry> - </variablelist> -</para></listitem> -</varlistentry> -</variablelist> -</para> -</sect1> -</chapter> - -<chapter id="faq"> -<title>Fragen und Antworten</title> - -&reporting.bugs; - -<qandaset id="faqlist"> -<qandaentry> -<question> -<para>Ich habe einen Psion Serie 3 und &kpsion; funktioniert nicht.</para> -</question> -<answer> -<para>Dies ist ein bekanntes Problem der aktuellen plptools Bibliothek. Das Problem ist in Arbeit. Sorry. -</para> -</answer> -</qandaentry> -</qandaset> -</chapter> - -<chapter id="Author"> -<title>Autor</title> - -<para>Copyright 2001 Fritz Elfert</para> - -<para>&kpsion; wurde erstellt von Fritz Elfert.</para> - -<para>Der Autor kann über e-Mail unter der Adresse -<email>felfert@to.com</email> erreicht werden. Bitte melden Sie Fehler -und Wünsche an mich so daß diese in zukünftigen Versionen behoben/berücksichtigt werden können.</para> - -&underFDL; -&underGPL; - -</chapter> -</book> -<!-- -Local Variables: -mode: sgml -sgml-omittag: nil -sgml-shorttag: t -sgml-set-face: t -End: ---> diff --git a/kde2/doc/de/newpsionwizard-1.png b/kde2/doc/de/newpsionwizard-1.png Binary files differdeleted file mode 100644 index 1d54b61..0000000 --- a/kde2/doc/de/newpsionwizard-1.png +++ /dev/null diff --git a/kde2/doc/de/newpsionwizard-2.png b/kde2/doc/de/newpsionwizard-2.png Binary files differdeleted file mode 100644 index 7ee0d70..0000000 --- a/kde2/doc/de/newpsionwizard-2.png +++ /dev/null diff --git a/kde2/doc/de/psion_backup.png b/kde2/doc/de/psion_backup.png Binary files differdeleted file mode 100644 index 9796f91..0000000 --- a/kde2/doc/de/psion_backup.png +++ /dev/null diff --git a/kde2/doc/de/psion_restore.png b/kde2/doc/de/psion_restore.png Binary files differdeleted file mode 100644 index 89e1e20..0000000 --- a/kde2/doc/de/psion_restore.png +++ /dev/null diff --git a/kde2/doc/de/restore-initial.png b/kde2/doc/de/restore-initial.png Binary files differdeleted file mode 100644 index 7b76670..0000000 --- a/kde2/doc/de/restore-initial.png +++ /dev/null diff --git a/kde2/doc/de/restore-treeopen.png b/kde2/doc/de/restore-treeopen.png Binary files differdeleted file mode 100644 index 9757500..0000000 --- a/kde2/doc/de/restore-treeopen.png +++ /dev/null diff --git a/kde2/doc/de/settings-backup.png b/kde2/doc/de/settings-backup.png Binary files differdeleted file mode 100644 index 741af75..0000000 --- a/kde2/doc/de/settings-backup.png +++ /dev/null diff --git a/kde2/doc/de/settings-connection.png b/kde2/doc/de/settings-connection.png Binary files differdeleted file mode 100644 index 275980c..0000000 --- a/kde2/doc/de/settings-connection.png +++ /dev/null diff --git a/kde2/doc/de/settings-machines.png b/kde2/doc/de/settings-machines.png Binary files differdeleted file mode 100644 index c289d85..0000000 --- a/kde2/doc/de/settings-machines.png +++ /dev/null diff --git a/kde2/doc/de/toplevel.png b/kde2/doc/de/toplevel.png Binary files differdeleted file mode 100644 index 5291bb7..0000000 --- a/kde2/doc/de/toplevel.png +++ /dev/null diff --git a/kde2/doc/en/.cvsignore b/kde2/doc/en/.cvsignore deleted file mode 100644 index 960e4b1..0000000 --- a/kde2/doc/en/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -Makefile.in -Makefile -HTML -index.docbook -*.bz2 diff --git a/kde2/doc/en/Makefile.am b/kde2/doc/en/Makefile.am deleted file mode 100644 index f43ce69..0000000 --- a/kde2/doc/en/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ - -KDE_LANG = en -KDE_DOCS = kpsion - -EXTRA_DIST = index.docbook.in - -index.docbook: index.docbook.in - cat index.docbook.in | perl -e 'while (<>) { if (/\$$Date:\s+(.*)\s+\$$/) { $$d=$$1; } s/__DATE__/$$d/; s/__VERSION__/$(VERSION)/; print; }' > index.docbook - -maintainer-clean-local: - rm -f Makefile.in diff --git a/kde2/doc/en/firstwizard-1.png b/kde2/doc/en/firstwizard-1.png Binary files differdeleted file mode 100644 index 8c86d9b..0000000 --- a/kde2/doc/en/firstwizard-1.png +++ /dev/null diff --git a/kde2/doc/en/firstwizard-2.png b/kde2/doc/en/firstwizard-2.png Binary files differdeleted file mode 100644 index f8fc9e4..0000000 --- a/kde2/doc/en/firstwizard-2.png +++ /dev/null diff --git a/kde2/doc/en/firstwizard-3.png b/kde2/doc/en/firstwizard-3.png Binary files differdeleted file mode 100644 index 05ce404..0000000 --- a/kde2/doc/en/firstwizard-3.png +++ /dev/null diff --git a/kde2/doc/en/index.docbook.in b/kde2/doc/en/index.docbook.in deleted file mode 100644 index a859b58..0000000 --- a/kde2/doc/en/index.docbook.in +++ /dev/null @@ -1,699 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1-Based Variant V1.0//EN" "dtd/kdex.dtd" [ - <!ENTITY kpsion "<application>KPsion</application>"> - <!ENTITY kappname "&kpsion;"> - <!ENTITY % addindex "IGNORE"> - <!ENTITY % German "INCLUDE"> - <!-- DO NOT DELETE! $Revision$ --> - <!-- DO NOT DELETE! $Date$ --> -]> - -<book lang="&language;"> -<bookinfo> - -<title>The &kpsion; handbook</title> - -<authorgroup> -<author> -<firstname>Fritz</firstname> -<surname>Elfert</surname> -<affiliation> -<address><email>felfert@to.com</email></address> -</affiliation> -</author> - -<!-- -<othercredit role="reviewer"> -<firstname>Whoever</firstname> -<surname>Lastname</surname> -<affiliation> -<address><email>mail@somewhere.org</email></address> -</affiliation> -<contrib>Reviewer</contrib> -</othercredit> ---> - -</authorgroup> - -<copyright> -<year>2001</year> -<holder>Fritz Elfert</holder> -</copyright> - -<legalnotice>&FDLNotice;</legalnotice> - -<date>__DATE__</date> -<releaseinfo>__VERSION__</releaseinfo> - - -<abstract><para> -&kpsion; is an application for -handling backup, restore and formatting of Psion PDAs. -</para></abstract> - -<keywordset> -<keyword>KDE</keyword> -<keyword>plptools</keyword> -<keyword>KPsion</keyword> -<keyword>Psion</keyword> -<keyword>EPOC</keyword> -<keyword>PDA</keyword> -<keyword>backup</keyword> -<keyword>restore</keyword> -<keyword>format</keyword> -</keywordset> - -</bookinfo> - -<chapter id="Introduction"> -<title>Introduction</title> - -<para>Welcome to &kpsion;! &kpsion; is an application -handling backup, restore and formatting of Psion PDAs -for the K Desktop Environment. It uses the daemon <command>ncpd</command> -and the libraries from the plptools package. -</para> - -<para>This program is meant to be started from the command line or from -<filename>.desktop</filename> files. -</para> - -</chapter> - -<chapter id="installation"> -<title>Installation</title> - -<sect1 id="downloading"> -<title>Downloading</title> - -<para>&kpsion; is part of the plptools package. The plptools package is -available at <ulink url="http://plptools.sourceforge.net/">http://plptools.sourceforge.net/</ulink>.</para> - -</sect1> - -<sect1 id="compiling"> -<title>Compiling</title> - -<para>The plptools package is not focussed on KDE application. Therefore, to -enable the build of KDE related stuff (&kpsion; is part of that) you have to -use the option <option>--enable-kde</option> when running plptools configure.</para> - -<para>The build process usual works like this:</para> - -<screen> -<prompt>$</prompt> <command>./configure <option>--enable-kde</option></command> -<prompt>$</prompt> <command>make</command> -<prompt>$</prompt> <command>make <option>install</option></command> -</screen> - -<para>You will have to execute the last step as root. The installation process -needs to be able to write to the system wide KDE directories.</para> - -</sect1> -</chapter> - -<chapter id="using-kpsion"> -<title>Using &kpsion;</title> - -<para> -Usage of &kpsion; is easy. Normally, you start &kpsion; using the menu entry -in the Utilities section of the K-Menu. - -You also can start kpsion from the shell. The syntax is one of the following: -</para> - - <cmdsynopsis> - <command>kpsion</command> - </cmdsynopsis> - - <cmdsynopsis> - <command>kpsion</command> - <arg>--autobackup</arg> - </cmdsynopsis> - - <cmdsynopsis> - <command>kpsion</command> - <arg>--backup <replaceable>DRIVE</replaceable></arg> - </cmdsynopsis> - - <cmdsynopsis> - <command>kpsion</command> - <arg>--restore <replaceable>DRIVE</replaceable></arg> - </cmdsynopsis> - - <cmdsynopsis> - <command>kpsion</command> - <arg>--format <replaceable>DRIVE</replaceable></arg> - </cmdsynopsis> - -<para>If started without any options, &kpsion; starts up in interactive -mode. If started with any of the above options, &kpsion; performs the -given task non interactively.</para> - -<variablelist> -<varlistentry> -<term><option>--autobackup</option></term> -<listitem><para> -This specifies to run a scheduled backup of the connected -Psion. If no psion is connected, nothing happens. -</para></listitem> -</varlistentry> - -<varlistentry> -<term><option>--backup <replaceable>DRIVE</replaceable></option></term> -<listitem><para> -This option starts backup of the specified <replaceable>DRIVE</replaceable>. -<replaceable>DRIVE</replaceable> is a single drive letter. -</para></listitem> -</varlistentry> - -<varlistentry> -<term><option>--restore <replaceable>DRIVE</replaceable></option></term> -<listitem><para> -This option starts restore of the specified <replaceable>DRIVE</replaceable>. -<replaceable>DRIVE</replaceable> is a single drive letter. -</para></listitem> -</varlistentry> - -<varlistentry> -<term><option>--format <replaceable>DRIVE</replaceable></option></term> -<listitem><para> -This option starts format of the specified <replaceable>DRIVE</replaceable>. -<replaceable>DRIVE</replaceable> is a single drive letter. -</para></listitem> -</varlistentry> - -</variablelist> - -</chapter> - -<chapter id="commands"> -<title>Command reference</title> - -<sect1 id="kpsion-mainwindow"> -<title>The main &kpsion; window</title> -<para> -<screenshot> -<screeninfo>&kpsion; mainwindow.</screeninfo> - <mediaobject> - <imageobject> - <imagedata fileref="toplevel.png" format="PNG"></imagedata> - </imageobject> - <textobject> - <phrase>&kpsion; mainwindow</phrase> - </textobject> - </mediaobject> -</screenshot> -When a Psion PDA is connected, the main window shows its drives in the -central icon view. By clicking on a drive-icon, you can toggle its selection. -If any drive is selected, the entries in the File menu and the toolbar buttons -are enabled. The most common <guimenu>actions</guimenu> are accessible via -toolbar buttons. These are:</para> -<para> -<itemizedlist> -<listitem><para> -<guiicon> - <inlinemediaobject> - <imageobject> - <imagedata fileref="psion_backup.png" format="PNG"></imagedata> - </imageobject> - </inlinemediaobject> -</guiicon> Full backup. -</para></listitem> -<listitem><para> -<guiicon> - <inlinemediaobject> - <imageobject> - <imagedata fileref="psion_restore.png" format="PNG"></imagedata> - </imageobject> - </inlinemediaobject> -</guiicon> Restore. -</para></listitem> -</itemizedlist> -</para> - -<sect2><title>The File Menu</title><para><variablelist> - -<varlistentry> -<term><menuchoice> -<shortcut> -<keycombo><keycap>Ctrl</keycap><keycap>b</keycap></keycombo> -</shortcut> -<guimenu>File</guimenu> -<guimenuitem>Start Full Backup</guimenuitem> -</menuchoice></term> -<listitem><para> -Starts a <action>full backup</action> of selected drives. -</para></listitem> -</varlistentry> - -<varlistentry> -<term><menuchoice> -<shortcut> -<keycombo><keycap>Ctrl</keycap><keycap>i</keycap></keycombo> -</shortcut> -<guimenu>File</guimenu> -<guimenuitem>Start Incremental Backup</guimenuitem> -</menuchoice></term> -<listitem><para> -Starts an <action>incremental backup</action> of selected drives. -</para></listitem> -</varlistentry> - -<varlistentry> -<term><menuchoice> -<shortcut> -<keycombo><keycap>Ctrl</keycap><keycap>r</keycap></keycombo> -</shortcut> -<guimenu>File</guimenu> -<guimenuitem>Start Restore</guimenuitem> -</menuchoice></term> -<listitem><para> -Starts <action>restore</action> of selected drives. -</para></listitem> -</varlistentry> - -<varlistentry> -<term><menuchoice> -<shortcut> -<keycombo><keycap>Ctrl</keycap><keycap>f</keycap></keycombo> -</shortcut> -<guimenu>File</guimenu> -<guimenuitem>Start Format</guimenuitem> -</menuchoice></term> -<listitem><para> -Starts <action>formatting</action> of selected drives. -</para></listitem> -</varlistentry> - -<varlistentry> -<term><menuchoice> -<shortcut> -<keycombo><keycap>Ctrl</keycap><keycap>q</keycap></keycombo> -</shortcut> -<guimenu>File</guimenu> -<guimenuitem>Quit</guimenuitem> -</menuchoice></term> -<listitem><para> -<action>Quits</action> &kpsion;. -</para></listitem> -</varlistentry> - -</variablelist></para></sect2> - -</sect1> - -</chapter> - -<chapter id="Configuration"> -<title>Configuration</title> - -<sect1 id="firsttime"> -<title>First time startup</title> - -<para> -When you start &kpsion; the first time, a wizard dialog is shown which lets -you easily configure the application for your personal use. The initial setup -is divided into three steps: -</para> - -<sect2> -<title>Select a backup directory</title> -<para> -<screenshot> -<screeninfo>Step one. Select a backup directory.</screeninfo> - <mediaobject> - <imageobject> - <imagedata fileref="firstwizard-1.png" format="PNG"></imagedata> - </imageobject> - <textobject> - <phrase>Selecting the backup directory</phrase> - </textobject> - </mediaobject> -</screenshot> -The backup directory will be used by &kpsion; for storing backup archives. -You simply can accept the default proposed by this dialog if you don't have -to care about disk space used in your home directory. Otherwise, select a -directory of your choice by clicking on the Browse button. &kpsion; creates -a that directory if it does not yet exist. Of course, you need the permission -to do so. -</para> -<para></para> -</sect2> - -<sect2> -<title>Adjust the backup strategy</title> -<para> -<screenshot> -<screeninfo>Step two. backup strategy.</screeninfo> - <mediaobject> - <imageobject> - <imagedata fileref="firstwizard-2.png" format="PNG"></imagedata> - </imageobject> - <textobject> - <phrase>Setting the backup strategy</phrase> - </textobject> - </mediaobject> -</screenshot> -In the second step, you can adjust the backup strategy. For both, incremental -and full backups, you can select an interval. If any of these intervals is -enabled, &kpsion; will create a <filename>.desktop</filename> Entry in your -KDE Autostart folder. Every time KDE is started, this will start &kpsion; -in autobackup mode. If the interval is expired and your Psion is currently -connected, an unattended backup will be performed. -</para> -<para> -The third adjustment to be made is the number of backup generations to keep. -A backup generation consists of a full backup plus eventually made incremental -backups. If a backup is completed sucessfully, &kpsion; will check, if there -are more backup generations available and delete older backup generations. -</para> -<para></para> -</sect2> - -<sect2> -<title>Connection parameters</title> -<para> -<screenshot> -<screeninfo>Step three. connection parameters.</screeninfo> - <mediaobject> - <imageobject> - <imagedata fileref="firstwizard-3.png" format="PNG"></imagedata> - </imageobject> - <textobject> - <phrase>Setting connection parameters</phrase> - </textobject> - </mediaobject> -</screenshot> -In the third step, you can adjust the behavior of &kpsion; during initial -connect. If you set the connection retry interval to a non-zero value, &kpsion; -will retry a connection attempt if it had failed. Since &kpsion; needs the -ncpd daemon running, it is also possible to start this daemon on the fly if it -is not running. For this, you need to have permissions to use the specified -port. -</para> -<para></para> -</sect2> - -</sect1> - -<sect1 id="newpsion"> -<title>New Psion connection</title> - -<para> -When &kpsion; connects to a Psion, it retrieves the PDA's unique machine ID and -verifies, if this PDA has been connected before. If the connected Psion has never -been connected to &kpsion; before, a wizard dialog is shown which lets -you assign a name for that Psion and specify a set of drives which should be -backed up when running in unattended backup mode. -</para> - -<sect2> -<title>Psion Name</title> -<para> -<screenshot> -<screeninfo>Step one. psion name.</screeninfo> - <mediaobject> - <imageobject> - <imagedata fileref="newpsionwizard-1.png" format="PNG"></imagedata> - </imageobject> - <textobject> - <phrase>Setting a psion name</phrase> - </textobject> - </mediaobject> -</screenshot> -The name of the new Psion is not used by &kpsion; internally but is used for -displaying the machine's name when connected. -</para> -<para></para> -</sect2> - -<sect2> -<title>Specifying backup drives</title> -<para> -<screenshot> -<screeninfo>Step two. specifying backup drives.</screeninfo> - <mediaobject> - <imageobject> - <imagedata fileref="newpsionwizard-2.png" format="PNG"></imagedata> - </imageobject> - <textobject> - <phrase>Specifying backup drives</phrase> - </textobject> - </mediaobject> -</screenshot> -Usually, you should select all drives except the ROM drive. The ROM drive -can be backed up, but - of course - can not be restored. -</para> -<para></para> -</sect2> -</sect1> - -<sect1 id="settings"> -<title>Settings</title> - -<para> -All settings, configured using the First time wizard and New Psion wizard -can be changed at any time using the Settings dialog. The Settings dialog -consists of three tabs: -</para> - -<sect2> -<title>Backup</title> -<para> -<screenshot> -<screeninfo>Setup, Backup.</screeninfo> - <mediaobject> - <imageobject> - <imagedata fileref="settings-backup.png" format="PNG"></imagedata> - </imageobject> - <textobject> - <phrase>Settings, Backup</phrase> - </textobject> - </mediaobject> -</screenshot> -</para> -<para></para> -</sect2> - -<sect2> -<title>Connection</title> -<para> -<screenshot> -<screeninfo>Settings, Connection.</screeninfo> - <mediaobject> - <imageobject> - <imagedata fileref="settings-connection.png" format="PNG"></imagedata> - </imageobject> - <textobject> - <phrase>Settings, Connection</phrase> - </textobject> - </mediaobject> -</screenshot> -</para> -<para></para> -</sect2> - -<sect2> -<title>Machines</title> -<para> -<screenshot> -<screeninfo>Settings, Machines.</screeninfo> - <mediaobject> - <imageobject> - <imagedata fileref="settings-machines.png" format="PNG"></imagedata> - </imageobject> - <textobject> - <phrase>Settings, Machines</phrase> - </textobject> - </mediaobject> -</screenshot> -</para> -<para></para> -</sect2> - -</sect1> - -</chapter> - -<chapter id="Internals"> -<title>Internals</title> - -<sect1 id="backupformat"> -<title>The backup files</title> - -<para>The backup files, created by &kpsion; are simply gzipped tar files. -The files follow the following naming scheme: -<variablelist> -<varlistentry> -<term>TYPE-YYYY-MO-DD-HH-MI-SS.tar.gz</term> -<listitem><para> - where - <variablelist> - <varlistentry> - <term>TYPE</term> - <listitem><para> - is a single character, representing the backup type. 'I' stands for - incremental and 'F' stands for full. - </para></listitem> - </varlistentry> - <varlistentry> - <term>YYYY</term> - <listitem><para> - is the year of creation. - </para></listitem> - </varlistentry> - <varlistentry> - <term>MO</term> - <listitem><para> - is the month of creation. - </para></listitem> - </varlistentry> - <varlistentry> - <term>DD</term> - <listitem><para> - is the day of creation. - </para></listitem> - </varlistentry> - <varlistentry> - <term>HH</term> - <listitem><para> - is the hour of creation. - </para></listitem> - </varlistentry> - <varlistentry> - <term>MI</term> - <listitem><para> - is the minute of creation. - </para></listitem> - </varlistentry> - <varlistentry> - <term>SS</term> - <listitem><para> - is the second of creation. - </para></listitem> - </varlistentry> - </variablelist> -</para></listitem> -</varlistentry> -</variablelist> -The file names in the tar archives are converted to fit into general -naming scheme. All occurences of the character '%' are changed into the -string '%25', all ocurrences of '/' are changed into '%2f' and all -occurences of '\' are changed into '/'. -</para> -<para> -In addition to the data files on the psion, every archive contains a -special index file, where the original file attributes and the Psion's -64-bit hires filetime is stored. This file is named KPsionIncrementalIndex -for incremental backups or KPsionFullIndex for full backups. The index -file is stored in the archive's toplevel directory and is an ASCII file, -containing one line per data file with the following fields: -<variablelist> -<varlistentry> -<term>hhhhhhhh llllllll ssssssss aaaaaaaa fn</term> -<listitem><para> - where - <variablelist> - <varlistentry> - <term>hhhhhhhh</term> - <listitem><para> - is an 8-digit hexadecimal number, representing the upper half of the - file's modification time. - </para></listitem> - </varlistentry> - <varlistentry> - <term>llllllll</term> - <listitem><para> - is an 8-digit hexadecimal number, representing the lower half of the - file's modification time. - </para></listitem> - </varlistentry> - <varlistentry> - <term>ssssssss</term> - <listitem><para> - is an 8-digit hexadecimal number, representing the size of the file. - </para></listitem> - </varlistentry> - <varlistentry> - <term>aaaaaaaa</term> - <listitem><para> - is an 8-digit hexadecimal number, representing the native attributes of - the file. - </para></listitem> - </varlistentry> - <varlistentry> - <term>fn</term> - <listitem><para> - is the unconverted original absolute file name. - </para></listitem> - </varlistentry> - </variablelist> -</para></listitem> -</varlistentry> -</variablelist> -The first line of the index file contains a header of the following format: -<variablelist> -<varlistentry> -<term>#plpbackup index T</term> -<listitem><para> - where - <variablelist> - <varlistentry> - <term>T</term> - <listitem><para> - is a single character, representing the backup type. 'I' stands for - incremental and 'F' stands for full. - </para></listitem> - </varlistentry> - </variablelist> -</para></listitem> -</varlistentry> -</variablelist> -</para> -</sect1> -</chapter> - -<chapter id="faq"> -<title>Questions and Answers</title> - -&reporting.bugs; - -<qandaset id="faqlist"> -<qandaentry> -<question> -<para>I have a Psion Series 3 and &kpsion; doesn't work.</para> -</question> -<answer> -<para>This is currently a known problem with the plptools lib. You have to -wait until tis is fixed. Sorry. -</para> -</answer> -</qandaentry> -</qandaset> -</chapter> - -<chapter id="Author"> -<title>Author</title> - -<para>Copyright 2001 Fritz Elfert</para> - -<para>&kpsion; is written by Fritz Elfert.</para> - -<para>The author can be reached through email at -<email>felfert@to.com</email>. Please report any bugs you find to me so -that I can fix them. If you have a suggestion, feel free to contact me.</para> - -&underFDL; -&underGPL; - -</chapter> -</book> -<!-- -Local Variables: -mode: sgml -sgml-omittag: nil -sgml-shorttag: t -sgml-set-face: t -End: ---> diff --git a/kde2/doc/en/newpsionwizard-1.png b/kde2/doc/en/newpsionwizard-1.png Binary files differdeleted file mode 100644 index 334b2a3..0000000 --- a/kde2/doc/en/newpsionwizard-1.png +++ /dev/null diff --git a/kde2/doc/en/newpsionwizard-2.png b/kde2/doc/en/newpsionwizard-2.png Binary files differdeleted file mode 100644 index e98a6a1..0000000 --- a/kde2/doc/en/newpsionwizard-2.png +++ /dev/null diff --git a/kde2/doc/en/psion_backup.png b/kde2/doc/en/psion_backup.png Binary files differdeleted file mode 100644 index 9796f91..0000000 --- a/kde2/doc/en/psion_backup.png +++ /dev/null diff --git a/kde2/doc/en/psion_restore.png b/kde2/doc/en/psion_restore.png Binary files differdeleted file mode 100644 index 89e1e20..0000000 --- a/kde2/doc/en/psion_restore.png +++ /dev/null diff --git a/kde2/doc/en/restore-initial.png b/kde2/doc/en/restore-initial.png Binary files differdeleted file mode 100644 index e26193b..0000000 --- a/kde2/doc/en/restore-initial.png +++ /dev/null diff --git a/kde2/doc/en/restore-treeopen.png b/kde2/doc/en/restore-treeopen.png Binary files differdeleted file mode 100644 index a5a4d0d..0000000 --- a/kde2/doc/en/restore-treeopen.png +++ /dev/null diff --git a/kde2/doc/en/settings-backup.png b/kde2/doc/en/settings-backup.png Binary files differdeleted file mode 100644 index 97827c4..0000000 --- a/kde2/doc/en/settings-backup.png +++ /dev/null diff --git a/kde2/doc/en/settings-connection.png b/kde2/doc/en/settings-connection.png Binary files differdeleted file mode 100644 index c5852c2..0000000 --- a/kde2/doc/en/settings-connection.png +++ /dev/null diff --git a/kde2/doc/en/settings-machines.png b/kde2/doc/en/settings-machines.png Binary files differdeleted file mode 100644 index 1d4ded2..0000000 --- a/kde2/doc/en/settings-machines.png +++ /dev/null diff --git a/kde2/doc/en/toplevel.png b/kde2/doc/en/toplevel.png Binary files differdeleted file mode 100644 index 743722e..0000000 --- a/kde2/doc/en/toplevel.png +++ /dev/null diff --git a/kde2/doc/kioslave/.cvsignore b/kde2/doc/kioslave/.cvsignore deleted file mode 100644 index 3dda729..0000000 --- a/kde2/doc/kioslave/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile.in -Makefile diff --git a/kde2/doc/kioslave/Makefile.am b/kde2/doc/kioslave/Makefile.am deleted file mode 100644 index c29d289..0000000 --- a/kde2/doc/kioslave/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -SUBDIRS = en de - -maintainer-clean-local: - rm -f Makefile.in diff --git a/kde2/doc/kioslave/de/.cvsignore b/kde2/doc/kioslave/de/.cvsignore deleted file mode 100644 index 3dda729..0000000 --- a/kde2/doc/kioslave/de/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile.in -Makefile diff --git a/kde2/doc/kioslave/de/Makefile.am b/kde2/doc/kioslave/de/Makefile.am deleted file mode 100644 index 3906f0b..0000000 --- a/kde2/doc/kioslave/de/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -KDE_LANG = de -kiodocdir = $(kde_libs_htmldir)/$(KDE_LANG)/kioslave -kiodoc_DATA = psion.docbook -EXTRA_DIST = $(kiodoc_DATA) - -maintainer-clean-local: - rm -f Makefile.in diff --git a/kde2/doc/kioslave/de/psion.docbook b/kde2/doc/kioslave/de/psion.docbook deleted file mode 100644 index 4db752a..0000000 --- a/kde2/doc/kioslave/de/psion.docbook +++ /dev/null @@ -1,35 +0,0 @@ -<article lang="&language;" id="psion"> -<title>psion</title> -<articleinfo> -<authorgroup> -<author><firstname>Fritz</firstname><surname>Elfert</surname> -<affiliation><address><email>felfert@users.sourceforge.net</email></address></affiliation> -</author> -</authorgroup> -</articleinfo> - -<para> -Das psion-Modul macht den Zugriff auf die Laufwerke eines angeschlossenen -Psion PDAs möglich. -</para> - -<para> -Um die Laufwerke eines Psion anzuzeigen, verwendet man -</para> -<para><userinput><command>psion:/</command></userinput></para> -<para> -oder (falls der Psion an einem anderen Rechner im Netz angeschlossen ist) -</para> -<para><userinput><command>psion://</command><replaceable>host/</replaceable></userinput>.</para> - -<para> -Das psion-Modul stellt die Verbindung zum Psion unter Verwendung des -ncpd Daemonen her. Daher ist es erforderlich, daß dieser Daemon auf dem -entsprechenden Rechner am Laufen ist. Das psion-Modul, der Daemon sowie -weitere Dienstprogramme für Psion-Konnektivität sind Teil des Packetes -plptools. Dieses Packet ist auf <ulink url="http://plptools.sourceforge.net/" ->http://plptools.sourceforge.net/</ulink> erhältlich. -</para> - -</article> - diff --git a/kde2/doc/kioslave/en/.cvsignore b/kde2/doc/kioslave/en/.cvsignore deleted file mode 100644 index 3dda729..0000000 --- a/kde2/doc/kioslave/en/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile.in -Makefile diff --git a/kde2/doc/kioslave/en/Makefile.am b/kde2/doc/kioslave/en/Makefile.am deleted file mode 100644 index 5335df3..0000000 --- a/kde2/doc/kioslave/en/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -KDE_LANG = en -kiodocdir = $(kde_libs_htmldir)/$(KDE_LANG)/kioslave -kiodoc_DATA = psion.docbook -EXTRA_DIST = $(kiodoc_DATA) - -maintainer-clean-local: - rm -f Makefile.in diff --git a/kde2/doc/kioslave/en/psion.docbook b/kde2/doc/kioslave/en/psion.docbook deleted file mode 100644 index 167d10a..0000000 --- a/kde2/doc/kioslave/en/psion.docbook +++ /dev/null @@ -1,32 +0,0 @@ -<article lang="&language;" id="psion"> -<title>psion</title> -<articleinfo> -<authorgroup> -<author><firstname>Fritz</firstname><surname>Elfert</surname> -<affiliation><address><email>felfert@users.sourceforge.net</email></address></affiliation> -</author> -</authorgroup> -</articleinfo> - -<para> -The psion ioslave enables you to browse the drives of a connected Psion PDA. -</para> - -<para> -To see the drives of a Psion, enter -</para> -<para><userinput><command>psion:/</command></userinput></para> -<para> -or (if the Psion is connected at a remote machine) -</para> -<para><userinput><command>psion://</command><replaceable>host/</replaceable></userinput>.</para> - -<para> -The psion ioslave connects to a Psion using the ncpd daemon. Therefore, -this daemon must be running on the machine. The psion ioslave, the daemon -as well as other tools for Psion connectivity are part of the plptools -package. This package is available at <ulink url="http://plptools.sourceforge.net/" ->http://plptools.sourceforge.net/</ulink>. -</para> - -</article> diff --git a/kde2/kioslave/.cvsignore b/kde2/kioslave/.cvsignore deleted file mode 100644 index bd7795f..0000000 --- a/kde2/kioslave/.cvsignore +++ /dev/null @@ -1,7 +0,0 @@ -Makefile.in -Makefile -*.la -*.lo -*.closure -.libs -.deps diff --git a/kde2/kioslave/Makefile.am b/kde2/kioslave/Makefile.am deleted file mode 100644 index 491f097..0000000 --- a/kde2/kioslave/Makefile.am +++ /dev/null @@ -1,20 +0,0 @@ -# $Id$ - -maintainer-clean-local: - rm -f Makefile.in *.closure - -INCLUDES = $(all_includes) -I$(top_srcdir)/lib - -kdemoduledir = $(kde_moduledir) -kdemodule_LTLIBRARIES = kio_plp.la - -kio_plp_la_SOURCES = kio_plp.cpp -kio_plp_la_LIBADD = $(LIB_PLP) $(LIB_KIO) -kio_plp_la_LDFLAGS = $(PLP_LDFLAGS) $(KDE_LDFLAGS) $(LIBDEBUG) -module $(KDE_PLUGIN) - -noinst_HEADERS = kio_plp.h - -services_DATA = psion.protocol -servicesdir = $(kde_servicesdir) - -EXTRA_DIST = $(services_DATA) diff --git a/kde2/kioslave/README b/kde2/kioslave/README deleted file mode 100644 index 7402231..0000000 --- a/kde2/kioslave/README +++ /dev/null @@ -1,3 +0,0 @@ -this is an ioslave for KDE 2 for PLP. - -Fritz diff --git a/kde2/kioslave/kio_plp.cpp b/kde2/kioslave/kio_plp.cpp deleted file mode 100644 index e9d4358..0000000 --- a/kde2/kioslave/kio_plp.cpp +++ /dev/null @@ -1,1260 +0,0 @@ -/*-*-c++-*- - * $Id$ - * - * This file is part of plptools. - * - * Copyright (C) 2000-2002 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 - -#include <rfsvfactory.h> -#include <rpcsfactory.h> -#include <bufferarray.h> - -#include <cstdlib> -#include <iomanip> -#include <string> - -#include <qfile.h> -#include <qregexp.h> - -#include <kinstance.h> -#include <kdebug.h> -#include <kglobal.h> -#include <klocale.h> -#include <kconfig.h> - -#include "kio_plp.h" - -#include <stdio.h> -#include <pwd.h> -#include <grp.h> -#include <sys/stat.h> - -using namespace KIO; - -static int PLP_DEBUGAREA = 0xbeef; -//#define kdDebug(PLP_DEBUGAREA) cout - -extern "C" { - int kdemain(int argc, char **argv); -} - -#define PLP_FTYPE_DRIVE 1 -#define PLP_FTYPE_OWNER 2 -#define PLP_FTYPE_MACHINE 3 -#define PLP_FTYPE_SETUP 4 -#define PLP_FTYPE_BACKUP 5 -#define PLP_FTYPE_RESTORE 6 -#define PLP_FTYPE_ROOT 7 - -int -kdemain( int argc, char **argv ) { - KInstance instance("kio_plp"); - - if (argc != 4) { - fprintf(stderr, - "Usage: kio_plp protocol domain-socket1 domain-socket2\n"); - exit(-1); - } - kdDebug(PLP_DEBUGAREA) << "PLP: kdemain: starting" << endl; - - KGlobal::locale()->insertCatalogue(QString::fromLatin1("plptools")); - PLPProtocol slave(argv[2], argv[3]); - slave.dispatchLoop(); - return 0; -} - -static void -stripTrailingSlash(QString& path) { - if (path=="/") - path=""; - else - if (path[path.length()-1]=='/') - path.truncate(path.length()-1); -} - -static QString -baseName(const QString& path) { - return path.mid(path.findRev("/") + 1); -} - -static QString -removeFirstPart(const QString& path, QString &removed) { - QString result(""); - if (path.isEmpty()) { - removed = ""; - return result; - } - result = path.mid(1); - int slashPos = result.find("/"); - if (slashPos == -1) { - removed = result; - result = ""; - } else { - removed = result.left(slashPos); - result = result.mid(slashPos); - } - return result; -} - -PLPProtocol::PLPProtocol (const QCString &pool, const QCString &app) - :SlaveBase("psion", pool, app), plpRfsv(0), plpRfsvSocket(0), - plpRpcs(0), plpRpcsSocket(0) -{ - - kdDebug(PLP_DEBUGAREA) << "PLPProtocol::PLPProtocol(" << pool << "," - << app << ")" << endl; - - currentHost = ""; - struct servent *se = getservbyname("psion", "tcp"); - endservent(); - if (se != 0L) - currentPort = ntohs(se->s_port); - else - currentPort = DPORT; - - typedef QMap<QString,QString> UIDMap; - KConfig *cfg = new KConfig("kioslaverc"); - - UIDMap uids = cfg->entryMap("Psion/UIDmapping"); - if (uids.isEmpty()) { - cfg->setGroup("Psion/UIDmapping"); - // Builtin application types. - cfg->writeEntry("uid-10000037-1000006D-1000007F", - "application/x-psion-word"); - cfg->writeEntry("uid-10000037-1000006D-10000088", - "application/x-psion-sheet"); - cfg->writeEntry("uid-10000037-1000006D-1000006d", - "application/x-psion-record"); - cfg->writeEntry("uid-10000037-1000006D-1000007d", - "application/x-psion-sketch"); - cfg->writeEntry("uid-10000037-1000006D-10000085", - "application/x-psion-opl"); - cfg->writeEntry("uid-10000050-1000006D-10000084", - "application/x-psion-agenda"); - cfg->writeEntry("uid-10000050-1000006D-10000086", - "application/x-psion-data"); - cfg->sync(); - uids = cfg->entryMap("Psion/UIDmapping"); - } - for (UIDMap::Iterator uit = uids.begin(); uit != uids.end(); ++uit) { - long u1, u2, u3; - - sscanf(uit.key().data(), "uid-%08X-%08X-%08X", &u1, &u2, &u3); - puids.insert(PlpUID(u1, u2, u3), uit.data()); - } -} - -PLPProtocol::~PLPProtocol() { - closeConnection(); -} - -void PLPProtocol:: -closeConnection() { - if (plpRfsv) - delete(plpRfsv); - if (plpRfsvSocket) - delete(plpRfsvSocket); - if (plpRpcs) - delete(plpRpcs); - if (plpRpcsSocket) - delete(plpRpcsSocket); - plpRfsv = 0; - plpRfsvSocket = 0; - plpRpcs = 0; - plpRpcsSocket = 0; -} - -bool PLPProtocol:: -isRoot(const QString& path) { - return (path.isEmpty() || (path=="/")); -} - -bool PLPProtocol:: -isDrive(const QString& path) { - QString tmp = path; - stripTrailingSlash(tmp); - for (QStringList::Iterator it = drives.begin(); it != drives.end(); it++) { - QString cmp = "/" + *it; - if (cmp == tmp) - return true; - } - return false; -} - -bool PLPProtocol:: -isRomDrive(const QString& path) { - return (driveChar(path) == 'Z'); -} - -char PLPProtocol:: -driveChar(const QString& path) { - QString vname; - QString dummy = removeFirstPart(path, vname); - if (drivechars.find(vname) != drivechars.end()) - return drivechars[vname]; - return '\0'; -} - -int PLPProtocol:: -checkSpecial(const QString& path) { - QString tmp = path.mid(1); - if (tmp == i18n("Owner")) - return PLP_FTYPE_OWNER; - if (tmp == i18n("Machine")) - return PLP_FTYPE_MACHINE; - if (tmp == i18n("Settings")) - return PLP_FTYPE_SETUP; - if (tmp == i18n("Backup")) - return PLP_FTYPE_BACKUP; - if (tmp == i18n("Restore")) - return PLP_FTYPE_RESTORE; - return 0; -} - -void PLPProtocol:: -convertName(QString &path) { - kdDebug(PLP_DEBUGAREA) << "convert: in='" << path << "' out='"; - QString dummy; - QString drive; - - drive.sprintf("%c:", driveChar(path)); - path = drive + removeFirstPart(path, dummy); - path.replace(QRegExp("/"), "\\"); - kdDebug(PLP_DEBUGAREA) << path << "'" << endl; -} - -void PLPProtocol:: -openConnection() { - kdDebug(PLP_DEBUGAREA) << "PLP::openConnection" << endl; - closeConnection(); - - plpRfsvSocket = new ppsocket(); - QString estr = QString("%1:%2").arg(currentHost).arg(currentPort); - if (!plpRfsvSocket->connect((char *)(currentHost.data()), currentPort)) { - closeConnection(); - error(ERR_COULD_NOT_CONNECT, estr); - return; - } - rfsvfactory factory(plpRfsvSocket); - plpRfsv = factory.create(false); - if (plpRfsv == 0L) { - closeConnection(); - error(ERR_COULD_NOT_CONNECT, estr + ": " + - KGlobal::locale()->translate((const char *)factory.getError())); - return; - } - - plpRpcsSocket = new ppsocket(); - if (!plpRpcsSocket->connect((char *)(currentHost.data()), currentPort)) { - closeConnection(); - error(ERR_COULD_NOT_CONNECT, estr); - return; - } - rpcsfactory factory2(plpRpcsSocket); - plpRpcs = factory2.create(false); - if (plpRpcs == 0L) { - closeConnection(); - error(ERR_COULD_NOT_CONNECT, estr + ": " + - KGlobal::locale()->translate((const char *)factory2.getError())); - return; - } - - /* Get the Psion's Ownerinfo and - if we have an S5 - the Machineinfo. - * This implicitely sets the Timezone info of the Psion also. - */ - bufferArray b; - Enum <rfsv::errs> res; - if ((res = plpRpcs->getOwnerInfo(b)) == rfsv::E_PSI_GEN_NONE) { - plpRpcs->getMachineType(machType); - if (machType == rpcs::PSI_MACH_S5) - plpRpcs->getMachineInfo(machInfo); - } - - drives.clear(); - drivechars.clear(); - - u_int32_t devbits; - - if ((res = plpRfsv->devlist(devbits)) == rfsv::E_PSI_GEN_NONE) { - for (int i = 0; i < 26; i++) { - if ((devbits & 1) != 0) { - PlpDrive drive; - if (plpRfsv->devinfo('A' + i, drive) == rfsv::E_PSI_GEN_NONE) { - std::string vname = drive.getName(); - QString name; - - if (!vname.empty()) - name = QString(vname.c_str()); - else - name.sprintf("%c", 'A' + i); - drives.append(name); - drivechars.insert(name, 'A' + i); - } - } - devbits >>= 1; - } - } else { - error(ERR_COULD_NOT_CONNECT, i18n("Could not get drive list")); - return; - } - connected(); - kdDebug(PLP_DEBUGAREA) << "openConnection succeeded" << endl; -} - -void PLPProtocol:: -slave_status() { - kdDebug(PLP_DEBUGAREA) << "PLP::slave_status " << (plpRfsv != 0) << endl; - slaveStatus(QString::null, (plpRfsv != 0)); -} - -bool PLPProtocol:: -checkConnection() { - kdDebug(PLP_DEBUGAREA) << "PLP::checkConnection" << endl; - if (plpRfsv == 0) - openConnection(); - return (plpRfsv == 0); -} - -QString PLPProtocol:: -uid2mime(PlpDirent &e) { - QString tmp; - PlpUID u = e.getUID(); - UidMap::Iterator it = puids.find(u); - - if (it != puids.end()) - tmp = it.data(); - else - tmp.sprintf("application/x-psion-uid-%08X-%08X-%08X", u[0], u[1], u[2]); - return tmp; -} - -void PLPProtocol:: -appendUIDmime(PlpDirent &e, UDSEntry &entry) { - QString tmp; - - if ((e.getAttr() & rfsv::PSI_A_DIR) == 0) { - PlpUID u = e.getUID(); - UidMap::Iterator it = puids.find(u); - if (it != puids.end()) { - UDSAtom atom; - - atom.m_uds = KIO::UDS_MIME_TYPE; - atom.m_str = it.data(); - entry.append(atom); - } - } -} - -void PLPProtocol:: -listDir(const KURL& _url) { - KURL url(_url); - QString path(QFile::encodeName(url.path(-1))); - - if (path.isEmpty()) { - url.setPath("/"); - redirection(url); - finished(); - return; - } - - if (checkConnection()) - return; - - if (isRoot(path)) { - kdDebug(PLP_DEBUGAREA) << "listing root " << drives.count() << endl; - totalSize(drives.count()); - //in this case we don't need to do a real listdir - UDSEntry entry; - UDSAtom atom; - QStringList::Iterator it; - for (it = drives.begin(); it != drives.end(); it++) { - entry.clear(); - atom.m_uds = KIO::UDS_NAME; - atom.m_str = (*it); - kdDebug(PLP_DEBUGAREA) << "listing " << (*it) << endl; - entry.append(atom); - createVirtualDirEntry(entry, drivechars[*it] == 'Z', - PLP_FTYPE_DRIVE); - listEntry(entry, false); - } - listEntry(entry, true); - finished(); - return; - } - - kdDebug(PLP_DEBUGAREA) << "getting subdir -" << path << "-" << endl; - bool rom = isRomDrive(path); - convertName(path); - path += "\\"; - - PlpDir files; - Enum<rfsv::errs> res = plpRfsv->dir(path.latin1(), files); - if (checkForError(res, url.path())) - return; - totalSize(files.size()); - UDSEntry entry; - for (int i = 0; i < files.size(); i++) { - UDSAtom atom; - - PlpDirent e = files[i]; - - entry.clear(); - atom.m_uds = KIO::UDS_NAME; - atom.m_str = e.getName(); - entry.append(atom); - - appendUIDmime(e, entry); - - completeUDSEntry(entry, e, rom); - listEntry(entry, false); - } - listEntry(entry, true); // ready - finished(); -} - -void PLPProtocol:: -setOwner(UDSEntry & entry) { - UDSAtom atom; - struct passwd *pw = getpwuid(getuid()); - struct group *gr = getgrgid(getgid()); - - atom.m_uds = KIO::UDS_USER; - atom.m_str = pw ? pw->pw_name : "root"; - entry.append(atom); - - atom.m_uds = KIO::UDS_GROUP; - atom.m_str = gr ? gr->gr_name : "root"; - entry.append(atom); - - endgrent(); - endpwent(); -} - -void PLPProtocol:: -createVirtualDirEntry(UDSEntry & entry, bool rdonly, int type) { - UDSAtom atom; - - atom.m_uds = KIO::UDS_ACCESS; - atom.m_long = S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH; - if (!rdonly) - atom.m_long |= (S_IWUSR | S_IWGRP | S_IWOTH); - entry.append(atom); - - atom.m_uds = KIO::UDS_SIZE; - atom.m_long = 0; - entry.append(atom); - - setOwner(entry); - - switch (type) { - case PLP_FTYPE_ROOT: - atom.m_uds = KIO::UDS_FILE_TYPE; - atom.m_long = S_IFDIR; - entry.append(atom); - atom.m_uds = KIO::UDS_GUESSED_MIME_TYPE; - atom.m_str = QString("inode/x-psion-drive"); - entry.append(atom); - break; - case PLP_FTYPE_DRIVE: - atom.m_uds = KIO::UDS_FILE_TYPE; - atom.m_long = S_IFDIR; - entry.append(atom); - atom.m_uds = KIO::UDS_MIME_TYPE; - atom.m_str = QString("inode/x-psion-drive"); - entry.append(atom); - break; - case PLP_FTYPE_OWNER: - atom.m_uds = KIO::UDS_FILE_TYPE; - atom.m_long = S_IFREG; - entry.append(atom); - atom.m_uds = KIO::UDS_MIME_TYPE; - atom.m_str = QString("application/x-psion-owner"); - entry.append(atom); - break; - case PLP_FTYPE_MACHINE: - atom.m_uds = KIO::UDS_FILE_TYPE; - atom.m_long = S_IFREG; - entry.append(atom); - atom.m_uds = KIO::UDS_MIME_TYPE; - atom.m_str = QString("application/x-psion-machine"); - entry.append(atom); - break; - case PLP_FTYPE_SETUP: - atom.m_uds = KIO::UDS_FILE_TYPE; - atom.m_long = S_IFREG; - entry.append(atom); - atom.m_uds = KIO::UDS_MIME_TYPE; - atom.m_str = QString("application/x-psion-setup"); - entry.append(atom); - break; - case PLP_FTYPE_BACKUP: - atom.m_uds = KIO::UDS_FILE_TYPE; - atom.m_long = S_IFREG; - entry.append(atom); - atom.m_uds = KIO::UDS_MIME_TYPE; - atom.m_str = QString("application/x-psion-backup"); - entry.append(atom); - break; - case PLP_FTYPE_RESTORE: - atom.m_uds = KIO::UDS_FILE_TYPE; - atom.m_long = S_IFREG; - entry.append(atom); - atom.m_uds = KIO::UDS_MIME_TYPE; - atom.m_str = QString("application/x-psion-restore"); - entry.append(atom); - break; - } -} - -bool PLPProtocol:: -emitTotalSize(QString &name) { - PlpDirent e; - - Enum<rfsv::errs> res = plpRfsv->fgeteattr(name.latin1(), e); - if (checkForError(res, name)) - return true; - totalSize(e.getSize()); - return false; -} - -void PLPProtocol:: -stat(const KURL & url) { - QString path(QFile::encodeName(url.path(-1))); - UDSEntry entry; - UDSAtom atom; - - if (checkConnection()) - return; - - kdDebug(PLP_DEBUGAREA) << "stat(" << path << ")" << endl; - stripTrailingSlash(path); - - if (isRoot(path) || isDrive(path)) { - atom.m_uds = KIO::UDS_NAME; - atom.m_str = path; - entry.append(atom); - if (isRoot(path)) - createVirtualDirEntry(entry, true, PLP_FTYPE_ROOT); - else - createVirtualDirEntry(entry, isRomDrive(path), PLP_FTYPE_DRIVE); - statEntry(entry); - finished(); - kdDebug(PLP_DEBUGAREA) << "succeeded" << endl; - return; - } - int ftype = checkSpecial(path); - if (ftype != 0) { - atom.m_uds = KIO::UDS_NAME; - atom.m_str = path; - entry.append(atom); - createVirtualDirEntry(entry, false, ftype); - statEntry(entry); - finished(); - kdDebug(PLP_DEBUGAREA) << "succeeded" << endl; - return; - } - - bool rom = isRomDrive(path); - QString fileName = baseName(path); - convertName(path); - - if (path.isEmpty()) { - error(ERR_DOES_NOT_EXIST, url.path()); - return; - } - - PlpDirent e; - - Enum<rfsv::errs> res = plpRfsv->fgeteattr(path.latin1(), e); - if (checkForError(res, url.path())) - return; - - atom.m_uds = KIO::UDS_NAME; - atom.m_str = fileName; - entry.append(atom); - completeUDSEntry(entry, e, rom); - statEntry(entry); - - finished(); -} - -void PLPProtocol:: -mimetype(const KURL & url) { - QString path(QFile::encodeName(url.path(-1))); - UDSEntry entry; - UDSAtom atom; - - kdDebug(PLP_DEBUGAREA) << "mimetype(" << path << ")" << endl; - stripTrailingSlash(path); - - if (isRoot(path) || isDrive(path)) { - mimeType("inode/directory"); - finished(); - return; - } - convertName(path); - - if (path.isEmpty()) { - error(ERR_DOES_NOT_EXIST, url.path()); - return; - } - - PlpDirent e; - Enum<rfsv::errs> res = plpRfsv->fgeteattr(path.latin1(), e); - if (checkForError(res, url.path())) - return; - mimeType(uid2mime(e)); - finished(); -} - -void PLPProtocol:: -completeUDSEntry(UDSEntry& entry, PlpDirent &e, bool rom) { - UDSAtom atom; - long attr = e.getAttr(); - - if (rom) - attr |= rfsv::PSI_A_RDONLY; - - atom.m_uds = KIO::UDS_SIZE; - atom.m_long = e.getSize(); - entry.append(atom); - - if (attr & rfsv::PSI_A_DIR) - atom.m_uds = KIO::UDS_CREATION_TIME; - else - atom.m_uds = KIO::UDS_MODIFICATION_TIME; - atom.m_long = e.getPsiTime().getTime(); - entry.append(atom); - - atom.m_uds = KIO::UDS_ACCESS; - atom.m_long = S_IRUSR | S_IRGRP | S_IROTH; - if (attr & rfsv::PSI_A_DIR) - atom.m_long |= S_IXUSR | S_IXGRP | S_IXOTH; - if (!(attr & rfsv::PSI_A_RDONLY)) - atom.m_long |= S_IWUSR | S_IWGRP | S_IWOTH; - entry.append(atom); - - atom.m_uds = KIO::UDS_FILE_TYPE; - atom.m_long = (attr & rfsv::PSI_A_DIR) ? S_IFDIR : S_IFREG; - entry.append(atom); - - setOwner(entry); - -#if 1 - KIO::UDSEntry::ConstIterator it = entry.begin(); - for( ; it != entry.end(); it++ ) { - switch ((*it).m_uds) { - case KIO::UDS_FILE_TYPE: - kdDebug(PLP_DEBUGAREA) << "File Type : " << - (mode_t)((*it).m_long) << endl; - break; - case KIO::UDS_SIZE: - kdDebug(PLP_DEBUGAREA) << "File Size : " << - (long)((*it).m_long) << endl; - break; - case KIO::UDS_ACCESS: - kdDebug(PLP_DEBUGAREA) << "Access permissions : " << - (mode_t)((*it).m_long) << endl; - break; - case KIO::UDS_USER: - kdDebug(PLP_DEBUGAREA) << "User : " << - ((*it).m_str.ascii() ) << endl; - break; - case KIO::UDS_GROUP: - kdDebug(PLP_DEBUGAREA) << "Group : " << - ((*it).m_str.ascii() ) << endl; - break; - case KIO::UDS_NAME: - kdDebug(PLP_DEBUGAREA) << "Name : " << - ((*it).m_str.ascii() ) << endl; - //m_strText = decodeFileName( (*it).m_str ); - break; - case KIO::UDS_URL: - kdDebug(PLP_DEBUGAREA) << "URL : " << - ((*it).m_str.ascii() ) << endl; - break; - case KIO::UDS_MIME_TYPE: - kdDebug(PLP_DEBUGAREA) << "MimeType : " << - ((*it).m_str.ascii() ) << endl; - break; - case KIO::UDS_LINK_DEST: - kdDebug(PLP_DEBUGAREA) << "LinkDest : " << - ((*it).m_str.ascii() ) << endl; - break; - } - } -#endif -} - -void PLPProtocol:: -setHost(const QString& host, int port, const QString&, const QString&) { - kdDebug(PLP_DEBUGAREA) << "setHost(" << host << "," << port << ")" << endl; - QString tmphost = host; - if (host.isEmpty()) - tmphost = "localhost"; - if (port == 0) { - struct servent *se = getservbyname("psion", "tcp"); - endservent(); - if (se != 0L) - port = ntohs(se->s_port); - else - port = DPORT; - } - if ((tmphost == currentHost) && (port == currentPort)) - return; - currentHost = tmphost; - currentPort = port; - closeConnection(); -} - -void PLPProtocol:: -mkdir(const KURL& url, int) { - kdDebug(PLP_DEBUGAREA) << "mkdir" << endl; - QString name(QFile::encodeName(url.path(-1))); - - if (checkConnection()) - return; - kdDebug(PLP_DEBUGAREA) << "mkdir(" << name << ")" << endl; - if (isRomDrive(name)) { - error(ERR_ACCESS_DENIED, - i18n("%1: read only filesystem").arg(url.path())); - return; - } - if (isRoot(name) || isDrive(name)) { - error(ERR_ACCESS_DENIED, i18n("%1: virtual directory").arg(url.path())); - return; - } - convertName(name); - Enum<rfsv::errs> res = plpRfsv->mkdir(name.latin1()); - if (checkForError(res, url.path())) - return; - finished(); -} - -bool PLPProtocol:: -checkForError(Enum<rfsv::errs> res, QString n1, QString n2) { - if (res != rfsv::E_PSI_GEN_NONE) { - kdDebug(PLP_DEBUGAREA) << "plp error: " << (const char *)res << endl; - QString reason(KGlobal::locale()->translate(res)); - QString text; - if (!!n1 && !!n2) - text = i18n("%1 or %2: %3").arg(n1).arg(n2).arg(reason); - else { - if (!!n1 || !!n2) - text = QString("%1: %2").arg(n1 ? n1 : n2).arg(reason); - else - text = reason; - } - switch (res) { - case rfsv::E_PSI_FILE_ACCESS: - error(ERR_ACCESS_DENIED, text); - break; - case rfsv::E_PSI_FILE_EXIST: - error(ERR_FILE_ALREADY_EXIST, text); - break; - case rfsv::E_PSI_FILE_NXIST: - error(ERR_DOES_NOT_EXIST, text); - break; - case rfsv::E_PSI_FILE_DIR: - error(ERR_IS_DIRECTORY, text); - break; - default: - error(ERR_UNKNOWN, text); - break; - } - return true; - } - return false; -} - -void PLPProtocol:: -del( const KURL& url, bool isfile) { - kdDebug(PLP_DEBUGAREA) << "del" << endl; - QString name(QFile::encodeName(url.path(-1))); - - if (checkConnection()) - return; - kdDebug(PLP_DEBUGAREA) << "del(" << name << ")" << endl; - if (isRomDrive(name)) { - error(ERR_ACCESS_DENIED, - i18n("%1: read only filesystem").arg(url.path())); - return; - } - if (isRoot(name) || isDrive(name)) { - error(ERR_ACCESS_DENIED, - i18n("%1: virtual directory").arg(url.path())); - return; - } - convertName(name); - - Enum<rfsv::errs> res = (isfile) ? - plpRfsv->remove(name.latin1()) : plpRfsv->rmdir(name.latin1()); - if (checkForError(res, url.path())) - return; - finished(); -} - -void PLPProtocol:: -chmod( const KURL& url, int permissions ) { - kdDebug(PLP_DEBUGAREA) << "del" << endl; - QString name(QFile::encodeName(url.path(-1))); - - if (checkConnection()) - return; - kdDebug(PLP_DEBUGAREA) << "chmod(" << name << ")" << endl; - if (isRomDrive(name)) { - error(ERR_ACCESS_DENIED, - i18n("%1: read only filesystem").arg(url.path())); - return; - } - if (isRoot(name) || isDrive(name)) { - error(ERR_ACCESS_DENIED, i18n("%1: virtual directory").arg(url.path())); - return; - } - convertName(name); - long attr[2]; - attr[0] = attr[1] = 0; - Enum <rfsv::errs> res = plpRfsv->fsetattr(name.latin1(), attr[0], attr[1]); - if (checkForError(res, url.path())) - return; - finished(); -} - -void PLPProtocol:: -get( const KURL& url ) { - kdDebug(PLP_DEBUGAREA) << "get" << endl; - QString name(QFile::encodeName(url.path(-1))); - - if (checkConnection()) - return; - kdDebug(PLP_DEBUGAREA) << "get(" << name << ")" << endl; - - if (name == "/0:_MachInfo") { - QByteArray a(sizeof(machInfo)); - a.duplicate((const char *)&machInfo, sizeof(machInfo)); - data(a); - } else { - if (isRoot(name) || isDrive(name)) { - error(ERR_ACCESS_DENIED, - i18n("%1: virtual directory").arg(url.path())); - return; - } - convertName(name); - - Enum<rfsv::errs> res; - u_int32_t handle; - u_int32_t len; - u_int32_t size; - u_int32_t total = 0; - - if (emitTotalSize(name)) - return; - res = plpRfsv->fopen(plpRfsv->opMode( - rfsv::PSI_O_RDONLY), name.latin1(), handle); - if (checkForError(res, url.path())) - return; - - QByteArray a(RFSV_SENDLEN); - do { - if ((res = plpRfsv->fread(handle, - (unsigned char *)(a.data()), - RFSV_SENDLEN, len)) == - rfsv::E_PSI_GEN_NONE) { - if (len < RFSV_SENDLEN) - a.resize(len); - data(a); - total += len; - calcprogress(total); - } - } while ((len > 0) && (res == rfsv::E_PSI_GEN_NONE)); - plpRfsv->fclose(handle); - if (checkForError(res, url.path())) - return; - } - data(QByteArray()); - - finished(); -} - -//TODO the partial putting thing is not yet implemented -void PLPProtocol:: -put( const KURL& url, int _mode, bool _overwrite, bool /*_resume*/ ) { - kdDebug(PLP_DEBUGAREA) << "get" << endl; - QString name(QFile::encodeName(url.path(-1))); - - if (checkConnection()) - return; - kdDebug(PLP_DEBUGAREA) << "put(" << name << ")" << endl; - if (isRomDrive(name)) { - error(ERR_ACCESS_DENIED, - i18n("%1: read only filesystem").arg(url.path())); - return; - } - if (isRoot(name) || isDrive(name)) { - error(ERR_ACCESS_DENIED, - i18n("%1: virtual directory").arg(url.path())); - return; - } - convertName(name); - - Enum<rfsv::errs> res; - u_int32_t handle; - int result; - - res = plpRfsv->fcreatefile( - plpRfsv->opMode(rfsv::PSI_O_RDWR), name.latin1(), handle); - if ((res == rfsv::E_PSI_FILE_EXIST) && _overwrite) - res = plpRfsv->freplacefile( - plpRfsv->opMode(rfsv::PSI_O_RDWR), name.latin1(), handle); - if (checkForError(res, url.path())) - return; - - do { - QByteArray a; - dataReq(); - result = readData(a); - const unsigned char *data = (const unsigned char *)(a.data()); - long len = a.size(); - - if (result > 0) - do { - u_int32_t written; - u_int32_t count = (len > RFSV_SENDLEN) ? RFSV_SENDLEN : len; - res = plpRfsv->fwrite(handle, data, count, written); - if (checkForError(res, url.path())) { - plpRfsv->fclose(handle); - return; - } - len -= written; - data += written; - } while (len > 0); - } while (result > 0); - plpRfsv->fclose(handle); - finished(); -} - -void PLPProtocol:: -rename(const KURL &src, const KURL &dest, bool _overwrite) { - QString from(QFile::encodeName(src.path(-1))); - QString to(QFile::encodeName(dest.path(-1))); - - if (checkConnection()) - return; - kdDebug(PLP_DEBUGAREA) << "rename(" << from << "," << to << ")" << endl; - if ((driveChar(from) != driveChar(to)) && (driveChar(to) != '\0')) { - error(ERR_ACCESS_DENIED, - i18n("%1 or %2: virtual directory").arg( - src.path()).arg(dest.path())); - kdDebug(PLP_DEBUGAREA) << "from FS != to FS" << endl; - return; - } - if (isRomDrive(from)) { - error(ERR_ACCESS_DENIED, - i18n("%1: read only filesystem").arg(src.path())); - kdDebug(PLP_DEBUGAREA) << "from ROFS" << endl; - return; - } - if (isRoot(from)) { - error(ERR_ACCESS_DENIED, i18n("%1: virtual directory").arg(src.path())); - kdDebug(PLP_DEBUGAREA) << "from VFS" << endl; - return; - } - bool volRename = isDrive(from); - if (isRomDrive(to)) { - error(ERR_ACCESS_DENIED, - i18n("%1: read only filesystem").arg(dest.path())); - kdDebug(PLP_DEBUGAREA) << "to ROFS" << endl; - return; - } - if (isRoot(to)) { - error(ERR_ACCESS_DENIED, i18n("%1: virtual directory").arg(dest.path())); - kdDebug(PLP_DEBUGAREA) << "to VFS" << endl; - return; - } - - Enum <rfsv::errs> res; - kdDebug(PLP_DEBUGAREA) << "ren: from=" << from << " to=" << to << endl; - if (volRename) { - to = to.mid(1); - res = plpRfsv->setVolumeName(driveChar(from), to); - if (res == rfsv::E_PSI_GEN_NONE) { - char drvc = driveChar(from); - drivechars.remove(from); - drivechars.insert(to, drvc); - } - } else { - convertName(from); - convertName(to); - if (!_overwrite) { - u_int32_t attr; - if ((res = plpRfsv->fgetattr( - to.latin1(), attr)) == rfsv::E_PSI_GEN_NONE) { - - error(ERR_FILE_ALREADY_EXIST, to); - return; - } - } - res = plpRfsv->rename(from.latin1(), to.latin1()); - } - if (checkForError(res, src.path(), dest.path())) - return; - finished(); -} - -extern "C" { - static int - progresswrapper(void *ptr, u_int32_t total) { - - ((PLPProtocol *)ptr)->calcprogress(total); - return 1; - } -} - -void PLPProtocol:: -calcprogress(long total) { - time_t t = time(0); - if (t - t_last) { - processedSize(total); - speed(total / (t - t_start)); - t_last = t; - } -} - -void PLPProtocol:: -copy( const KURL &src, const KURL &dest, int _mode, bool _overwrite ) { - QString from( QFile::encodeName(src.path(-1))); - QString to( QFile::encodeName(dest.path(-1))); - - if (checkConnection()) - return; - kdDebug(PLP_DEBUGAREA) << "copy(" << from << "," << to << ")" << endl; - if (isRoot(from) || isDrive(from)) { - error(ERR_ACCESS_DENIED, - i18n("%1 or %2: virtual directory").arg( - src.path()).arg(dest.path())); - return; - } - convertName(from); - if (isRomDrive(to)) { - error(ERR_ACCESS_DENIED, - i18n("%1: read only filesystem").arg(dest.path())); - return; - } - if (isRoot(to) || isDrive(to)) { - error(ERR_ACCESS_DENIED, - i18n("%1: virtual directory").arg(dest.path())); - return; - } - convertName(to); - Enum <rfsv::errs> res; - if (!_overwrite) { - u_int32_t attr; - if ((res = plpRfsv->fgetattr(to.latin1(), attr)) - == rfsv::E_PSI_GEN_NONE) { - error(ERR_FILE_ALREADY_EXIST, to); - return; - } - } - if (emitTotalSize(from)) - return; - t_last = t_start = time(0); - res = plpRfsv->copyOnPsion(from.latin1(), - to.latin1(), (void *)this, progresswrapper); - if (checkForError(res, src.path(), dest.path())) - return; - finished(); -} - -void PLPProtocol:: -special(const QByteArray &a) { - kdDebug(PLP_DEBUGAREA) << "special()" << endl; - - QDataStream stream(a, IO_ReadOnly); - int cmd; - UDSEntry entry; - UDSAtom atom; - - if (checkConnection()) - return; - - stream >> cmd; - - switch (cmd) { - case 1: { - kdDebug(PLP_DEBUGAREA) << "get DriveDetails" << endl; - QString param; - PlpDrive drive; - - Enum<rfsv::errs> res; - char drv; - - stream >> param; - kdDebug(PLP_DEBUGAREA) << "p='" << param << "'" << endl; - if (param.isEmpty()) { - error(ERR_MALFORMED_URL, i18n("(empty)")); - return; - } - if (!isDrive(param)) { - error(ERR_PROTOCOL_IS_NOT_A_FILESYSTEM, param); - return; - } - param = param.mid(1); - drv = drivechars[param]; - res = plpRfsv->devinfo(drv, drive); - if (res != rfsv::E_PSI_GEN_NONE) { - error(ERR_COULD_NOT_STAT, param); - return; - } - - std::string mtype; - drive.getMediaType(mtype); - - // DriveLetter - atom.m_uds = KIO::UDS_USER; - atom.m_str = QString("%1").arg(drivechars[param]); - entry.append(atom); - // TypeName - atom.m_uds = KIO::UDS_NAME; - atom.m_str = QString(mtype.c_str()); - entry.append(atom); - // Total capacity - atom.m_uds = KIO::UDS_SIZE; - atom.m_long = drive.getSize(); - entry.append(atom); - // Free capacity - atom.m_uds = KIO::UDS_MODIFICATION_TIME; - atom.m_long = drive.getSpace(); - entry.append(atom); - // UID - atom.m_uds = KIO::UDS_CREATION_TIME; - atom.m_long = drive.getUID(); - entry.append(atom); - - statEntry(entry); - } - break; - case 2: { - kdDebug(PLP_DEBUGAREA) << "get Ownerinfo" << endl; - bufferArray b; - - Enum<rfsv::errs>res = plpRpcs->getOwnerInfo(b); - if (res != rfsv::E_PSI_GEN_NONE) { - kdDebug(PLP_DEBUGAREA) << - "get Ownerinfo returned " << (const char *)res << endl; - error(ERR_COULD_NOT_STAT, "Owner"); - return; - } - QString param = ""; - while (!b.empty()) { - param += b.pop().getString(); - param += "\n"; - } - // Owner-String - atom.m_uds = KIO::UDS_NAME; - atom.m_str = param; - entry.append(atom); - statEntry(entry); - } - break; - case 3: { - kdDebug(PLP_DEBUGAREA) << "get Fileattribs" << endl; - - QString name; - PlpDirent e; - bool isRoFS; - - stream >> name; - - if (name.isEmpty()) { - error(ERR_MALFORMED_URL, i18n("(empty)")); - return; - } - if (isRoot(name) || isDrive(name)) { - error(ERR_ACCESS_DENIED, - i18n("%1: virtual directory").arg(name)); - return; - } - isRoFS = isRomDrive(name); - convertName(name); - Enum<rfsv::errs> res = plpRfsv->fgeteattr(name.latin1(), e); - if (checkForError(res, name)) - return; - // Attributes - atom.m_uds = KIO::UDS_SIZE; - atom.m_long = e.getAttr(); - entry.append(atom); - // bool ReadonlyFS (for disabling checkboxes in attr dialog) - atom.m_uds = KIO::UDS_CREATION_TIME; - u_int32_t flags = (machType == rpcs::PSI_MACH_S5) ? 1 : 0; - flags |= (isRoFS) ? 2 : 0; - atom.m_long = flags; - entry.append(atom); - // Psion Path - atom.m_uds = KIO::UDS_NAME; - atom.m_str = name; - entry.append(atom); - - statEntry(entry); - kdDebug(PLP_DEBUGAREA) << "get Fileattribs done OK" << endl; - } - break; - case 4: { - kdDebug(PLP_DEBUGAREA) << "set Fileattribs" << endl; - - QString name; - u_int32_t seta, unseta; - - stream >> seta >> unseta >> name; - - if (name.isEmpty()) { - error(ERR_MALFORMED_URL, i18n("(empty)")); - return; - } - if (isRoot(name) || isDrive(name)) { - error(ERR_ACCESS_DENIED, - i18n("%1: virtual directory").arg(name)); - return; - } - if (isRomDrive(name)) { - error(ERR_ACCESS_DENIED, - i18n("%1: read only filesystem").arg(name)); - return; - } - convertName(name); - Enum<rfsv::errs> res = plpRfsv->fsetattr(name.latin1(), seta, - unseta); - if (checkForError(res, name)) - return; - } - break; - default: - error(ERR_UNSUPPORTED_PROTOCOL, QString(i18n("Code: %1")).arg(cmd)); - return; - } - finished(); -} - -/* - * Local variables: - * c-basic-offset: 4 - * End: - */ diff --git a/kde2/kioslave/kio_plp.h b/kde2/kioslave/kio_plp.h deleted file mode 100644 index 4f2763a..0000000 --- a/kde2/kioslave/kio_plp.h +++ /dev/null @@ -1,101 +0,0 @@ -/*-*-c++-*- - * $Id$ - * - * This file is part of plptools. - * - * Copyright (C) 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 _KIO_PLP_H_ -#define _KIO_PLP_H_ - -#include <kio/slavebase.h> -#include <kio/global.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qmap.h> -#include <rfsv.h> -#include <rpcs.h> -#include <ppsocket.h> - -typedef QMap<PlpUID,QString> UidMap; - -class PLPProtocol : public KIO::SlaveBase { -public: - PLPProtocol (const QCString &pool, const QCString &app); - virtual ~PLPProtocol(); - - virtual void openConnection(); - virtual void closeConnection(); - - virtual void setHost(const QString& host, int port, const QString&, const QString&); - - virtual void put(const KURL& url, int _mode,bool _overwrite, bool _resume); - virtual void get(const KURL& url); - virtual void listDir(const KURL& url); - virtual void stat(const KURL & url); - virtual void mimetype(const KURL & url); - virtual void mkdir(const KURL& url, int permissions); - virtual void del(const KURL& url, bool isfile); - virtual void chmod(const KURL& url, int permissions); - virtual void rename(const KURL &src, const KURL &dest, bool overwrite); - virtual void copy(const KURL& src, const KURL &dest, int mode, bool overwrite ); - virtual void slave_status(void); - virtual void special(const QByteArray &a); - - void calcprogress(long total); - -private: - bool checkConnection(); - - char driveChar(const QString& path); - - void createVirtualDirEntry(KIO::UDSEntry & entry, bool rdonly, int type); - void completeUDSEntry(KIO::UDSEntry& entry, PlpDirent &e, bool rom); - bool checkForError(Enum<rfsv::errs> res, QString name1 = QString(0), QString name2 = QString(0)); - bool isRomDrive(const QString& path); - bool isDrive(const QString& path); - bool isRoot(const QString& path); - void convertName(QString &path); - bool emitTotalSize(QString &name); - QString uid2mime(PlpDirent &e); - int checkSpecial(const QString& path); - void setOwner(KIO::UDSEntry & entry); - void appendUIDmime(PlpDirent &e, KIO::UDSEntry &entry); - - rfsv *plpRfsv; - rpcs *plpRpcs; - ppsocket *plpRfsvSocket; - ppsocket *plpRpcsSocket; - QStringList drives; - QMap<QString,char> drivechars; - UidMap puids; - QString currentHost; - int currentPort; - time_t t_last; - time_t t_start; - Enum<rpcs::machs> machType; - rpcs::machineInfo machInfo; -}; - -#endif - -/* - * Local variables: - * c-basic-offset: 4 - * End: - */ diff --git a/kde2/kioslave/psion.protocol b/kde2/kioslave/psion.protocol deleted file mode 100644 index 5281723..0000000 --- a/kde2/kioslave/psion.protocol +++ /dev/null @@ -1,12 +0,0 @@ -[Protocol] -exec=kio_plp -protocol=psion -input=none -output=filesystem -defaultMimetype=inode/directory -listing=Name,Type,Size,Date,Access,MimeType -reading=true -writing=true -makedir=true -deleting=true -moving=true diff --git a/kde2/klipsi/.cvsignore b/kde2/klipsi/.cvsignore deleted file mode 100644 index 7bc9705..0000000 --- a/kde2/klipsi/.cvsignore +++ /dev/null @@ -1,11 +0,0 @@ -Makefile.in -Makefile -.xvpics -.libs -.deps -*.lo -*.la -*.moc.cpp -klipsi_la_meta_unload.cpp -dummy.cpp -klipsi diff --git a/kde2/klipsi/Makefile.am b/kde2/klipsi/Makefile.am deleted file mode 100644 index 0dbb470..0000000 --- a/kde2/klipsi/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -libdir=$(kde_libraries) - -bindir=$(kde_bindir) - -maintainer-clean-local: - rm -f Makefile.in - -METASOURCES = AUTO - -KDE_ICON = AUTO - -INCLUDES = $(all_includes) -I$(top_srcdir)/lib - -DISTCLEANFILES = $(klipsi_METASOURCES) ./.deps/* ./.deps/.P - -bin_PROGRAMS = klipsi -lib_LTLIBRARIES = klipsi.la - -CLEANFILES = dummy.cpp - -klipsi_la_LIBADD = $(LIB_PLP) $(LIB_KDEUI) -klipsi_la_SOURCES = main.cpp toplevel.cpp -klipsi_la_LDFLAGS = $(PLP_LDFLAGS) $(KDE_LDFLAGS) $(LIBDEBUG) -module - -klipsi_LDADD = klipsi.la -klipsi_SOURCES = dummy.cpp -klipsi_LDFLAGS = $(KDE_RPATH) - - -applnkdir = $(kde_appsdir)/Utilities -applnk_DATA = klipsi.desktop -EXTRA_DIST = $(applnk_DATA) - -appsdir = $(kde_datadir)/klipsi -apps_DATA = eventsrc -EXTRA_DIST += $(apps_DATA) - -noinst_HEADERS = toplevel.h - -messages: - $(XGETTEXT) -C -ki18n -kI18N_NOOP -ktranslate -kaliasLocale *.cpp *.h && mv messages.po ../po/klipsi.pot - -dummy.cpp: - : > dummy.cpp diff --git a/kde2/klipsi/eventsrc b/kde2/klipsi/eventsrc deleted file mode 100644 index 8d0cc4c..0000000 --- a/kde2/klipsi/eventsrc +++ /dev/null @@ -1,20 +0,0 @@ -[!Global!] -IconName=klipsi -Comment=Klipsi - Psion clipboard -Comment[de]=Klipsi - Psion Zwischenablage - -[data received] -Name=New data -Name[de]=Neue Daten -Comment=The Psion has sent new data to the clipboard. -Comment[de]=Neue Daten wurden vom Psion in die Zwischenablage abgelegt. -default_presentation=1 -default_sound=KDE_Beep_ShortBeep.wav - -[connected] -Name=Connected -Name[de]=Verbunden -Comment=Klipsi has connected to the Psion -Comment[de]=Klipsi hat eine Verbindung zum Psion hergestellt. -default_presentation=1 -default_sound=KDE_Beep_Connect.wav diff --git a/kde2/klipsi/hi16-app-klipsi.png b/kde2/klipsi/hi16-app-klipsi.png Binary files differdeleted file mode 100644 index d9dda38..0000000 --- a/kde2/klipsi/hi16-app-klipsi.png +++ /dev/null diff --git a/kde2/klipsi/hi22-action-klipsi.png b/kde2/klipsi/hi22-action-klipsi.png Binary files differdeleted file mode 100644 index 3dc95c9..0000000 --- a/kde2/klipsi/hi22-action-klipsi.png +++ /dev/null diff --git a/kde2/klipsi/hi22-action-klipsi_c.png b/kde2/klipsi/hi22-action-klipsi_c.png Binary files differdeleted file mode 100644 index 5b4dca5..0000000 --- a/kde2/klipsi/hi22-action-klipsi_c.png +++ /dev/null diff --git a/kde2/klipsi/hi22-action-klipsi_cd.png b/kde2/klipsi/hi22-action-klipsi_cd.png Binary files differdeleted file mode 100644 index 8acac44..0000000 --- a/kde2/klipsi/hi22-action-klipsi_cd.png +++ /dev/null diff --git a/kde2/klipsi/hi22-action-klipsi_d.png b/kde2/klipsi/hi22-action-klipsi_d.png Binary files differdeleted file mode 100644 index b0d68ab..0000000 --- a/kde2/klipsi/hi22-action-klipsi_d.png +++ /dev/null diff --git a/kde2/klipsi/hi22-app-klipsi.png b/kde2/klipsi/hi22-app-klipsi.png Binary files differdeleted file mode 100644 index 3dc95c9..0000000 --- a/kde2/klipsi/hi22-app-klipsi.png +++ /dev/null diff --git a/kde2/klipsi/hi32-app-klipsi.png b/kde2/klipsi/hi32-app-klipsi.png Binary files differdeleted file mode 100644 index 464ad6b..0000000 --- a/kde2/klipsi/hi32-app-klipsi.png +++ /dev/null diff --git a/kde2/klipsi/klipsi.desktop b/kde2/klipsi/klipsi.desktop deleted file mode 100644 index 38a1153..0000000 --- a/kde2/klipsi/klipsi.desktop +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -Name=Psion Clipboard Utility -Name[de]=Auschneiden/Einfügen: Psion -Exec=klipsi -Icon=klipsi -Type=Application -DocPath=klipsi/index.html -Terminal=0 diff --git a/kde2/klipsi/main.cpp b/kde2/klipsi/main.cpp deleted file mode 100644 index f252759..0000000 --- a/kde2/klipsi/main.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/*-*-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 - * - */ -#include "toplevel.h" - -#include <stdio.h> -#include <stdlib.h> - -#include <klocale.h> -#include <kcmdlineargs.h> -#include <kwin.h> -#include <kaboutdata.h> -#include <kuniqueapplication.h> - -int main(int argc, char *argv[]) -{ - KAboutData about("klipsi", I18N_NOOP("Klipsi"), VERSION, - I18N_NOOP("Psion remote clipboard utility"), - KAboutData::License_GPL, - "(C) 2001 Fritz Elfert", - "Klipsi is part of plptools", - "http://plptools.sourceforge.net", - "plptools-developers@sourceforge.net"); - - about.addAuthor("Fritz Elfert", I18N_NOOP("Original Developer/Maintainer"), - "felfert@users.sourceforge.net"); - - KCmdLineArgs::init(argc, argv, &about); - KUniqueApplication::addCmdLineOptions(); - - if (!KUniqueApplication::start()) { - fprintf(stderr, "%s is already running!\n", about.appName()); - exit(0); - } - KUniqueApplication app; - - TopLevel *toplevel = new TopLevel(); - - if (toplevel->isNotSupported()) - app.quit(); - else { - KWin::setSystemTrayWindowFor(toplevel->winId(), 0); - toplevel->setGeometry(-100, -100, 42, 42 ); - toplevel->show(); - - return app.exec(); - } - return 0; -} -/* - * Local variables: - * c-basic-offset: 4 - * End: - */ diff --git a/kde2/klipsi/toplevel.cpp b/kde2/klipsi/toplevel.cpp deleted file mode 100644 index ebbd8ce..0000000 --- a/kde2/klipsi/toplevel.cpp +++ /dev/null @@ -1,622 +0,0 @@ -/*-*-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 - * - */ -#include "toplevel.h" - -#include <qclipboard.h> -#include <qmenudata.h> -#include <qpainter.h> -#include <qtimer.h> -#include <qimage.h> -#include <qcursor.h> - -#include <kaction.h> -#include <kapplication.h> -#include <klocale.h> -#include <kwin.h> -#include <kiconloader.h> -#include <knotifyclient.h> -#include <kdebug.h> -#include <kmessagebox.h> - -#include <psibitmap.h> - -#include <cstdlib> -#include <iostream> - -#define QUIT_ITEM 50 -#define ABOUT_ITEM 51 -#define CLIPFILE "C:/System/Data/Clpboard.cbd" - -using namespace std; - -TopLevel::TopLevel() - : KMainWindow(0) -{ - KNotifyClient::startDaemon(); - - clip = kapp->clipboard(); -#if QT_VERSION > 300 - clip->setSelectionMode(true); -#endif - menu = new KPopupMenu(0, "main_menu"); - timer = new QTimer(); - - rfsvSocket = 0; - rclipSocket = 0; - rf = 0; - rc = 0; - rff = 0; - inSend = false; - inSetting = false; - mustListen = true; - lastClipData = ""; - state = ENABLED; - constate = DISCONNECTED; - sockNum = DPORT; - - struct servent *se = getservbyname("psion", "tcp"); - endservent(); - if (se != 0L) - sockNum = ntohs(se->s_port); - - menu->insertTitle(kapp->miniIcon(), i18n("Klipsi - Psion Clipboard")); - menu->insertSeparator(); - menu->insertItem(SmallIcon("help"), i18n("&About Klipsi"), ABOUT_ITEM); - menu->insertItem(SmallIcon("exit"), i18n("&Quit"), QUIT_ITEM); - - about = new KAboutApplication(0L, 0L, false); - connect(menu, SIGNAL(activated(int)), this, SLOT(slotMenuSelected(int))); - connect(clip, SIGNAL(dataChanged()), this, SLOT(slotClipboardChanged())); - connect(timer, SIGNAL(timeout()), this, SLOT(slotTimer())); - - icons[ENABLED][DISCONNECTED] = - KGlobal::iconLoader()->loadIcon("klipsi", KIcon::Toolbar); - icons[ENABLED][CONNECTED] = - KGlobal::iconLoader()->loadIcon("klipsi_c", KIcon::Toolbar); - icons[DISABLED][DISCONNECTED] = - KGlobal::iconLoader()->loadIcon("klipsi_d", KIcon::Toolbar); - icons[DISABLED][CONNECTED] = - KGlobal::iconLoader()->loadIcon("klipsi_cd", KIcon::Toolbar); - - icon = &icons[state][constate]; - resize(icon->size()); - - setBackgroundMode(X11ParentRelative); - - int interval = checkConnection() ? 500 : 5000; - if (timer) - timer->start(interval, true); -} - -TopLevel::~TopLevel() -{ - closeConnection(); - if (timer) - delete timer; - delete menu; -} - -bool TopLevel:: -isNotSupported() { - return (timer == NULL); -} - -void TopLevel:: -closeConnection() { - if (rf) - delete(rf); - if (rc) - delete(rc); - if (rff) - delete rff; - rfsvSocket = 0; - rclipSocket = 0; - rf = 0; - rc = 0; - rff = 0; - mustListen = true; - constate = DISCONNECTED; - repaint(); -} - -void TopLevel:: -mousePressEvent(QMouseEvent *e) -{ - if (e->button() == RightButton) - showPopupMenu(menu); - if (e->button() == LeftButton) { - state = (state == ENABLED) ? DISABLED : ENABLED; - repaint(); - } -} - -void TopLevel:: -paintEvent(QPaintEvent *) -{ - QPainter p(this); - icon = &icons[state][constate]; - - int x = (width() - icon->width()) / 2; - int y = (height() - icon->height()) / 2; - if ( x < 0 ) x = 0; - if ( y < 0 ) y = 0; - p.drawPixmap(x , y, *icon); - p.end(); -} - -void TopLevel:: -slotTimer() -{ - Enum<rfsv::errs> res; - - if (inSend) { - timer->start(500, true); - return; - } - - if (!checkConnection()) { - if (timer) - timer->start(5000, true); - else - kapp->quit(); - return; - } - - if (state == DISABLED) { - timer->start(500, true); - return; - } - - if (mustListen) { - res = rc->sendListen(); - if (res != rfsv::E_PSI_GEN_NONE) { - closeConnection(); - timer->start(5000, true); - return; - } else - mustListen = false; - } - - if ((res = rc->checkNotify()) != rfsv::E_PSI_GEN_NONE) { - if (res != rfsv::E_PSI_FILE_EOF) { - closeConnection(); - timer->start(5000, true); - return; - } - } else { - getClipData(); - mustListen = true; - } - timer->start(500, true); -} - -void TopLevel:: -slotClipboardChanged() -{ - if (mustListen || inSetting || (state == DISABLED)) - return; - - Enum<rfsv::errs> res; - - if (!checkConnection()) - return; - - QImage clipImage = 0L; - QString clipText = clip->text(); - - if (clipText.isEmpty()) { - clipImage = clip->image(); - if (clipImage.isNull()) - return; - inSend = true; - mustListen = true; - putClipImage(clipImage); - } else { - if (clipText == lastClipData) - return; - lastClipData = clipText; - inSend = true; - mustListen = true; - char *p = strdup(clipText.latin1()); - ascii2PsiText(p, clipText.length()); - putClipText(p); - free(p); - } - - res = rc->notify(); - inSend = false; - - if (res != rfsv::E_PSI_GEN_NONE) - closeConnection(); -} - -void TopLevel:: -slotMenuSelected(int id) -{ - switch (id) { - case ABOUT_ITEM: - about->show(); - break; - case QUIT_ITEM: - kapp->quit(); - break; - } -} - - -void TopLevel:: -showPopupMenu(QPopupMenu *menu) -{ - ASSERT( menu != 0L ); - - // Update menu geometry - menu->move(-1000,-1000); - menu->show(); - menu->hide(); - - QPoint g = QCursor::pos(); - if ( menu->height() < g.y() ) - menu->popup(QPoint( g.x(), g.y() - menu->height())); - else - menu->popup(QPoint(g.x(), g.y())); -} - -void TopLevel:: -psiText2ascii(char *buf, int len) { - char *p; - - for (p = buf; len; len--, p++) - switch (*p) { - case 6: - case 7: - *p = '\n'; - break; - case 8: - *p = '\f'; - break; - case 10: - *p = '\t'; - break; - case 11: - case 12: - *p = '-'; - break; - case 15: - case 16: - *p = ' '; - break; - } -} - -void TopLevel:: -ascii2PsiText(char *buf, int len) { - char *p; - - for (p = buf; len; len--, p++) - switch (*p) { - case '\n': - *p = 6; - break; - case '\f': - *p = 8; - break; - case '-': - *p = 11; - break; - } -} - -void TopLevel:: -putClipText(char *data) { - Enum<rfsv::errs> res; - u_int32_t fh; - u_int32_t l; - const unsigned char *p; - bufferStore b; - - res = rf->freplacefile(0x200, CLIPFILE, fh); - if (res == rfsv::E_PSI_GEN_NONE) { - while ((res = rc->checkNotify()) != rfsv::E_PSI_GEN_NONE) { - if (res != rfsv::E_PSI_FILE_EOF) { - rf->fclose(fh); - closeConnection(); - return; - } - } - - // Base Header - b.addDWord(0x10000037); // @00 UID 0 - b.addDWord(0x1000003b); // @04 UID 1 - b.addDWord(0); // @08 UID 3 - b.addDWord(0x4739d53b); // @0c Checksum the above - - // Section Table - b.addDWord(0x00000014); // @10 Offset of Section Table - b.addByte(2); // @14 Section Table, length in DWords - b.addDWord(0x10000033); // @15 Section Type (ASCII) - b.addDWord(0x0000001d); // @19 Section Offset - - // Data - b.addDWord(strlen(data)); // @1e Section (String) length - b.addStringT(data); // @22 Data (Psion Word seems to need a - // terminating 0. - - p = (const unsigned char *)b.getString(0); - rf->fwrite(fh, p, b.getLen(), l); - rf->fclose(fh); - rf->fsetattr(CLIPFILE, 0x20, 0x07); - } else - closeConnection(); -} - -static QImage *putImage; - -static int -getGrayPixel(int x, int y) -{ - return qGray(putImage->pixel(x, y)); -} - -void TopLevel:: -putClipImage(QImage &img) { - Enum<rfsv::errs> res; - u_int32_t fh; - u_int32_t l; - const unsigned char *p; - bufferStore b; - - res = rf->freplacefile(0x200, CLIPFILE, fh); - if (res == rfsv::E_PSI_GEN_NONE) { - while ((res = rc->checkNotify()) != rfsv::E_PSI_GEN_NONE) { - if (res != rfsv::E_PSI_FILE_EOF) { - rf->fclose(fh); - closeConnection(); - return; - } - } - - // Base Header - b.addDWord(0x10000037); // @00 UID 0 - b.addDWord(0x1000003b); // @04 UID 1 - b.addDWord(0); // @08 UID 3 - b.addDWord(0x4739d53b); // @0c Checksum the above - - // Section Table - b.addDWord(0x00000014); // @10 Offset of Section Table - b.addByte(2); // @14 Section Table, length in DWords - b.addDWord(0x1000003d); // @15 Section Type (Image) - b.addDWord(0x0000001d); // @19 Section Offset - - // Data - bufferStore ib; - putImage = &img; - encodeBitmap(img.width(), img.height(), getGrayPixel, false, ib); - b.addBuff(ib); - - p = (const unsigned char *)b.getString(0); - rf->fwrite(fh, p, b.getLen(), l); - rf->fclose(fh); - rf->fsetattr(CLIPFILE, 0x20, 0x07); - } else - closeConnection(); -} - -QImage *TopLevel:: -decode_image(const unsigned char *p) -{ - bufferStore out; - bufferStore hout; - QImage *img = 0L; - int xPixels; - int yPixels; - - if (!decodeBitmap(p, xPixels, yPixels, out)) - return img; - - QString hdr = QString("P5\n%1 %2\n255\n").arg(xPixels).arg(yPixels); - hout.addString(hdr.latin1()); - hout.addBuff(out); - - img = new QImage(xPixels, yPixels, 8); - if (!img->loadFromData((const uchar *)hout.getString(0), hout.getLen())) { - delete img; - img = 0L; - } - return img; -} - -void TopLevel:: -getClipData() { - Enum<rfsv::errs> res; - PlpDirent de; - u_int32_t fh; - QString clipText; - QImage *clipImg = 0L; - - res = rf->fgeteattr(CLIPFILE, de); - if (res == rfsv::E_PSI_GEN_NONE) { - if (de.getAttr() & rfsv::PSI_A_ARCHIVE) { - u_int32_t len = de.getSize(); - char *buf = (char *)malloc(len); - - if (!buf) { - cerr << "Out of memory in getClipData" << endl; - return; - } - res = rf->fopen(rf->opMode(rfsv::PSI_O_RDONLY | rfsv::PSI_O_SHARE), - CLIPFILE, fh); - if (res == rfsv::E_PSI_GEN_NONE) { - u_int32_t tmp; - res = rf->fread(fh, (unsigned char *)buf, len, tmp); - rf->fclose(fh); - - if ((res == rfsv::E_PSI_GEN_NONE) && (tmp == len)) { - char *p = buf; - int lcount; - u_int32_t *ti = (u_int32_t*)buf; - - // Check base header - if (*ti++ != 0x10000037) { - free(buf); - return; - } - if (*ti++ != 0x1000003b) { - free(buf); - return; - } - if (*ti++ != 0) { - free(buf); - return; - } - if (*ti++ != 0x4739d53b) { - free(buf); - return; - } - - // Start of section table - p = buf + *ti; - // Length of section table (in DWords) - lcount = *p++; - - u_int32_t *td = (u_int32_t*)p; - while (lcount > 0) { - u_int32_t sType = *td++; - if (sType == 0x10000033) { - // An ASCII section - p = buf + *td; - len = *((u_int32_t*)p); - p += 4; - psiText2ascii(p, len); - clipText += (char *)p; - } - if (sType == 0x1000003d) { - // A paint data section - p = buf + *td; - if (clipImg) - delete clipImg; - clipImg = decode_image((const unsigned char *)p); - } - td++; - lcount -= 2; - } - } - - } else - closeConnection(); - free(buf); - } - } else - closeConnection(); - - if (!clipText.isEmpty()) { - inSetting = true; - clip->setText(clipText); - inSetting = false; - KNotifyClient::event("data received"); - } else if (clipImg) { - inSetting = true; - clip->setImage(*clipImg); - inSetting = false; - KNotifyClient::event("data received"); - } -} - -bool TopLevel:: -checkConnection() { - if (rf && rc) - return true; - - if (!rfsvSocket) { - rfsvSocket = new ppsocket(); - if (!rfsvSocket->connect(NULL, sockNum)) { - delete rfsvSocket; - rfsvSocket = 0; - return false; - } - } - - if (!rclipSocket) { - rclipSocket = new ppsocket(); - if (!rclipSocket->connect(NULL, sockNum)) { - delete rclipSocket; - rclipSocket = 0; - return false; - } - } - - if (!rff) - rff = new rfsvfactory(rfsvSocket); - - if (!rf) - rf = rff->create(true); - - if (rf) { - if (rf->getProtocolVersion() == 3) { - closeConnection(); - delete timer; - timer = NULL; - KMessageBox::error(NULL, i18n( - "<QT>Your Psion is reported to be a <B>Series 3</B> " - "machine. This type of machine does <B>not support</B> the " - "remote clipboard protocol; Sorry.<BR/>" - "<B>Klipsi</B> will now terminate.</QT>"), - i18n("Protocol not supported")); - return false; - } - if (!rc) { - rc = new rclip(rclipSocket); - Enum<rfsv::errs> ret; - - if ((ret = rc->initClipbd()) == rfsv::E_PSI_GEN_NONE) { - KNotifyClient::event("connected"); - constate = CONNECTED; - repaint(); - return true; - } else { - closeConnection(); - if (ret == rfsv::E_PSI_GEN_NSUP) { - KMessageBox::error(NULL, i18n( - "<QT>Your Psion does not support the remote clipboard " - "protocol.<BR/>The reason for that is usually a missing " - "server library on your Psion.<BR/>Make sure that " - "<B>C:\\System\\Libs\\clipsvr.rsy</B> exists.<BR/>" - "This file is part of PsiWin and usually gets copied " - "to your Psion when you enable CopyAnywhere in PsiWin. " - "You also get it from a PsiWin installation directory " - "and copy it to your Psion manually.<BR/>" - "<B>Klipsi</B> will now terminate.</QT>"), - i18n("Protocol not supported")); - delete timer; - timer = NULL; - } - } - } - } - return false; -} - -/* - * Local variables: - * c-basic-offset: 4 - * End: - */ diff --git a/kde2/klipsi/toplevel.h b/kde2/klipsi/toplevel.h deleted file mode 100644 index 3d013fd..0000000 --- a/kde2/klipsi/toplevel.h +++ /dev/null @@ -1,114 +0,0 @@ -/*-*-c++-*- - * $Id$ - * - * This file is part of plptools. - * - * Copyright (C) 1999 Philip Proudman <philip.proudman@btinternet.com> - * 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 _TOPLEVEL_H_ -#define _TOPLEVEL_H_ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include <kapplication.h> -#include <kmainwindow.h> -#include <kpopupmenu.h> -#include <kaboutapplication.h> -#include <qpixmap.h> -#include <qtimer.h> - -#include <rfsv.h> -#include <rfsvfactory.h> -#include <rclip.h> -#include <ppsocket.h> - -class QClipboard; - -class TopLevel : public KMainWindow -{ - Q_OBJECT - -public: - TopLevel(); - ~TopLevel(); - bool isNotSupported(); - -protected: - void paintEvent(QPaintEvent *); - void mousePressEvent(QMouseEvent *); - -protected slots: - void showPopupMenu( QPopupMenu * ); - -private slots: - void slotClipboardChanged(); - void slotTimer(); - void slotMenuSelected(int); - -private: - enum { - ENABLED = 0, - DISABLED = 1, - } states; - - enum { - DISCONNECTED = 0, - CONNECTED = 1, - } constates; - - void psiText2ascii(char *, int); - void ascii2PsiText(char *, int); - void putClipText(char *); - void putClipImage(QImage &); - void getClipData(); - void closeConnection(); - bool checkConnection(); - QImage *decode_image(const unsigned char *); - - QClipboard *clip; - KPopupMenu *menu; - KAboutApplication *about; - QTimer *timer; - - ppsocket *rfsvSocket; - ppsocket *rclipSocket; - rfsv *rf; - rclip *rc; - rfsvfactory *rff; - - QString lastClipData; - QPixmap *icon; - QPixmap icons[2][2]; - bool inSend; - bool inSetting; - bool mustListen; - int state; - int constate; - int sockNum; -}; - -#endif - -/* - * Local variables: - * c-basic-offset: 4 - * End: - */ diff --git a/kde2/kpsion/.cvsignore b/kde2/kpsion/.cvsignore deleted file mode 100644 index 250cdbf..0000000 --- a/kde2/kpsion/.cvsignore +++ /dev/null @@ -1,9 +0,0 @@ -Makefile.in -Makefile -.xvpics -.libs -.deps -*.lo -*.moc.cpp -libkpsion* -kpsion diff --git a/kde2/kpsion/Makefile.am b/kde2/kpsion/Makefile.am deleted file mode 100644 index fbf31e2..0000000 --- a/kde2/kpsion/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -# $Id$ - -libdir=$(kde_libraries) - -bindir=$(kde_bindir) - -maintainer-clean-local: - rm -f Makefile.in - -METASOURCES = AUTO - -KDE_ICON = AUTO - -INCLUDES = $(all_includes) -I$(top_srcdir)/lib - -DISTCLEANFILES = $(kpsion_METASOURCES) ./.deps/* ./.deps/.P - -lib_LTLIBRARIES = libkpsion.la -bin_PROGRAMS = kpsion - -libkpsion_la_LDFLAGS = $(X_LDFLAGS) $(PLP_LDFLAGS) $(KDE_LDFLAGS) $(LIBDEBUG) $(KDE_PLUGIN) -libkpsion_la_SOURCES = kpsion.cpp setupdialog.cpp wizards.cpp \ - statusbarprogress.cpp kpsionconfig.cpp kpsionbackuplistview.cpp \ - kpsionrestoredialog.cpp - -libkpsion_la_LIBADD = $(LIB_PLP) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KIO) $(LIB_KFILE) $(LIB_QT) - -kpsion_SOURCES = main.cpp -kpsion_LDFLAGS = $(KDE_RPATH) $(X_LDFLAGS) -kpsion_LDADD = libkpsion.la $(LIB_PLP) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KIO) $(LIB_KFILE) $(LIB_QT) - -applnk_DATA = kpsion.desktop -applnkdir = $(kde_appsdir)/Utilities -EXTRA_DIST = kpsion.desktop - -rcdir = $(kde_datadir)/kpsion -rc_DATA = kpsionui.rc -EXTRA_DIST += kpsionui.rc - -noinst_HEADERS = kpsion.h setupdialog.h wizards.h kpsionrestoredialog.h \ - kpsionconfig.h kpsionbackuplistview.h statusbarprogress.h - -messages: - $(XGETTEXT) -C -ki18n -kI18N_NOOP -ktranslate -kaliasLocale *.cpp *.h && mv messages.po ../po/kpsion.pot diff --git a/kde2/kpsion/hi16-action-psion_backup.png b/kde2/kpsion/hi16-action-psion_backup.png Binary files differdeleted file mode 100644 index fe34db8..0000000 --- a/kde2/kpsion/hi16-action-psion_backup.png +++ /dev/null diff --git a/kde2/kpsion/hi16-action-psion_format.png b/kde2/kpsion/hi16-action-psion_format.png Binary files differdeleted file mode 100644 index b74cca8..0000000 --- a/kde2/kpsion/hi16-action-psion_format.png +++ /dev/null diff --git a/kde2/kpsion/hi16-action-psion_restore.png b/kde2/kpsion/hi16-action-psion_restore.png Binary files differdeleted file mode 100644 index 25ce627..0000000 --- a/kde2/kpsion/hi16-action-psion_restore.png +++ /dev/null diff --git a/kde2/kpsion/hi16-app-kpsion.png b/kde2/kpsion/hi16-app-kpsion.png Binary files differdeleted file mode 100644 index d1f2e5e..0000000 --- a/kde2/kpsion/hi16-app-kpsion.png +++ /dev/null diff --git a/kde2/kpsion/hi22-action-psion_backup.png b/kde2/kpsion/hi22-action-psion_backup.png Binary files differdeleted file mode 100644 index 9796f91..0000000 --- a/kde2/kpsion/hi22-action-psion_backup.png +++ /dev/null diff --git a/kde2/kpsion/hi22-action-psion_restore.png b/kde2/kpsion/hi22-action-psion_restore.png Binary files differdeleted file mode 100644 index 89e1e20..0000000 --- a/kde2/kpsion/hi22-action-psion_restore.png +++ /dev/null diff --git a/kde2/kpsion/hi22-app-kpsion.png b/kde2/kpsion/hi22-app-kpsion.png Binary files differdeleted file mode 100644 index c13dbd6..0000000 --- a/kde2/kpsion/hi22-app-kpsion.png +++ /dev/null diff --git a/kde2/kpsion/hi32-app-kpsion.png b/kde2/kpsion/hi32-app-kpsion.png Binary files differdeleted file mode 100644 index 7285992..0000000 --- a/kde2/kpsion/hi32-app-kpsion.png +++ /dev/null diff --git a/kde2/kpsion/kpsion.cpp b/kde2/kpsion/kpsion.cpp deleted file mode 100644 index d897e70..0000000 --- a/kde2/kpsion/kpsion.cpp +++ /dev/null @@ -1,1859 +0,0 @@ -/*-*-c++-*- - * $Id$ - * - * This file is part of plptools. - * - * Copyright (C) 2000-2002 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 - -#include "kpsion.h" -#include "kpsionconfig.h" -#include "wizards.h" - -#include <klocale.h> -#include <kaction.h> -#include <kstdaction.h> -#include <kconfig.h> -#include <kiconview.h> -#include <kmessagebox.h> -#include <kfileitem.h> -#include <kprocess.h> -#include <kstatusbar.h> -#include <kiconloader.h> - -#include <qwhatsthis.h> -#include <qtimer.h> -#include <qlayout.h> -#include <qiodevice.h> -#include <qheader.h> -#include <qdir.h> -#include <qmessagebox.h> -#include <qregexp.h> -#include <qstyle.h> - -#include <ppsocket.h> -#include <rfsvfactory.h> -#include <rpcsfactory.h> -#include <bufferarray.h> -#include <psiprocess.h> - -#include <iostream> - -#define STID_CONNECTION 1 - -using namespace std; - -KPsionMainWindow::KPsionMainWindow() - : KMainWindow() { - setupActions(); - - statusBar()->insertItem(i18n("Idle"), STID_CONNECTION, 1); - 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; - doScheduledBackup = false; - quitImmediately = false; - - view = new KIconView(this, "iconview"); - view->setSelectionMode(KIconView::Multi); - view->setResizeMode(KIconView::Adjust); - view->setItemsMovable(false); - connect(view, SIGNAL(clicked(QIconViewItem *)), - SLOT(iconClicked(QIconViewItem *))); - connect(view, SIGNAL(onItem(QIconViewItem *)), - SLOT(iconOver(QIconViewItem *))); - connect(this, SIGNAL(rearrangeIcons(bool)), view, - SLOT(arrangeItemsInGrid(bool))); - KConfig *config = kapp->config(); - KPsionConfig pcfg; - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_UIDS)); - QStringList uids = config->readListEntry( - pcfg.getOptionName(KPsionConfig::OPT_UIDS)); - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_MACHNAME)); - QString tmp = pcfg.getOptionName(KPsionConfig::OPT_MACHNAME); - - for (QStringList::Iterator it = uids.begin(); it != uids.end(); it++) - machines.insert(*it, config->readEntry(tmp.arg(*it))); - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_BACKUPDIR)); - backupDir = config->readEntry( - pcfg.getOptionName(KPsionConfig::OPT_BACKUPDIR)); - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_CONNRETRY)); - reconnectTime = config->readNumEntry( - pcfg.getOptionName(KPsionConfig::OPT_CONNRETRY)); - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_SERIALDEV)); - ncpdDevice = config->readEntry(pcfg.getOptionName( - KPsionConfig::OPT_SERIALDEV), "off"); - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_NCPDPATH)); - ncpdPath = config->readEntry(pcfg.getOptionName( - KPsionConfig::OPT_NCPDPATH), "ncpd"); - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_SERIALSPEED)); - ncpdSpeed = config->readEntry( - pcfg.getOptionName(KPsionConfig::OPT_SERIALSPEED), "115200"); - - QWhatsThis::add(view, i18n( - "<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.: backup, restore or format.<br/>" - "To unselect it, simply click on it again.<br/>" - "Select as many drives a you want, then choose " - "an operation.</qt>")); - setCentralWidget(view); - - rfsvSocket = 0L; - rpcsSocket = 0L; - plpRfsv = 0L; - plpRpcs = 0L; - - firstTry = true; - connected = false; - shuttingDown = false; - - args = KCmdLineArgs::parsedArgs(); - if (args->isSet("autobackup")) { - firstTry = false; - reconnectTime = 0; - } - tryConnect(); -} - -KPsionMainWindow::~KPsionMainWindow() { - shuttingDown = true; - if (plpRfsv) - delete plpRfsv; - if (plpRpcs) - delete plpRpcs; - if (rfsvSocket) - delete rfsvSocket; - if (rfsvSocket) - 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"); -#if QT_VERSION >= 300 - tmp.replace(QRegExp("\\\\"), "/"); -#else - tmp.replace(QRegExp("\\"), "/"); -#endif - return tmp; -} - -void KPsionMainWindow:: -setupActions() { - - KStdAction::quit(this, SLOT(close()), actionCollection()); - KStdAction::showToolbar(this, SLOT(slotToggleToolbar()), - actionCollection()); - KStdAction::showStatusbar(this, SLOT(slotToggleStatusbar()), - actionCollection()); - KStdAction::preferences(this, SLOT(slotPreferences()), - actionCollection()); - new KAction(i18n("Start &Format"), "psion_format", 0, this, - SLOT(slotStartFormat()), actionCollection(), "format"); - new KAction(i18n("Start Full &Backup"), "psion_backup", 0, this, - SLOT(slotStartFullBackup()), actionCollection(), - "fullbackup"); - new KAction(i18n("Start &Incremental Backup"), "psion_backup", 0, this, - SLOT(slotStartIncBackup()), actionCollection(), "incbackup"); - new KAction(i18n("Start &Restore"), "psion_restore", 0, this, - SLOT(slotStartRestore()), actionCollection(), "restore"); - createGUI(); - - actionCollection()->action("fullbackup")->setEnabled(false); - actionCollection()->action("incbackup")->setEnabled(false); - actionCollection()->action("restore")->setEnabled(false); - actionCollection()->action("format")->setEnabled(false); - - actionCollection()->action("fullbackup")-> - setToolTip(i18n("Full backup of selected drive(s)")); - actionCollection()->action("incbackup")-> - setToolTip(i18n("Incremental backup of selected drive(s)")); - actionCollection()->action("restore")-> - setToolTip(i18n("Restore selected drive(s)")); - actionCollection()->action("format")-> - setToolTip(i18n("Format selected drive(s)")); -} - -void KPsionMainWindow:: -iconOver(QIconViewItem *i) { - lastSelected = i->isSelected(); -} - -void KPsionMainWindow:: -switchActions() { - QIconViewItem *i; - bool rwSelected = false; - bool anySelected = false; - - if (backupRunning | restoreRunning | formatRunning) - view->setEnabled(false); - else { - for (i = view->firstItem(); i; i = i->nextItem()) { - if (i->isSelected()) { - anySelected = true; - if (i->key() != "Z") { - rwSelected = true; - break; - } - } - } - view->setEnabled(true); - } - actionCollection()->action("restore")->setEnabled(rwSelected); - actionCollection()->action("format")->setEnabled(rwSelected); - actionCollection()->action("fullbackup")->setEnabled(anySelected); - actionCollection()->action("incbackup")->setEnabled(anySelected); -} - -void KPsionMainWindow:: -iconClicked(QIconViewItem *i) { - if (i == 0L) - return; - lastSelected = !lastSelected; - i->setSelected(lastSelected); - switchActions(); -} - -void KPsionMainWindow:: -insertDrive(char letter, const char * const name) { - QString tmp; - - if (name && strlen(name)) - tmp = QString::fromLatin1("%1 (%2:)").arg(name).arg(letter); - else - tmp = QString::fromLatin1("%1:").arg(letter); - drives.insert(letter,tmp); - QIconViewItem *it = - new QIconViewItem(view, tmp, - KGlobal::iconLoader()->loadIcon("psion_drive", - KIcon::Desktop)); - tmp = QString::fromLatin1("%1").arg(letter); - it->setKey(tmp); - it->setDropEnabled(false); - it->setDragEnabled(false); - it->setRenameEnabled(false); -} - -bool KPsionMainWindow:: -shouldQuit() { - return quitImmediately; -} - -void KPsionMainWindow:: -syncTime(QString uid) { -} - -void KPsionMainWindow:: -queryPsion() { - u_int32_t devbits; - Enum <rfsv::errs> res; - - statusBar()->changeItem(i18n("Retrieving machine info ..."), - STID_CONNECTION); - - Enum<rpcs::machs> machType; - if (plpRpcs->getMachineType(machType) != rfsv::E_PSI_GEN_NONE) { - QString msg = i18n("Could not get Psion machine type"); - statusBar()->changeItem(msg, STID_CONNECTION); - KMessageBox::error(this, msg); - return; - } - if (machType == rpcs::PSI_MACH_S5) { - rpcs::machineInfo mi; - if ((res = plpRpcs->getMachineInfo(mi)) != rfsv::E_PSI_GEN_NONE) { - QString msg = i18n("Could not get Psion machine info"); - statusBar()->changeItem(msg, STID_CONNECTION); - KMessageBox::error(this, msg); - return; - } - machineUID = mi.machineUID; - S5mx = (strcmp(mi.machineName, "SERIES5mx") == 0); - } else { - // On a SIBO, first check for a file 'SYS$PT.CFG' on the default - // directory. If it exists, read the UID from it. Otherwise - // calculate a virtual machine UID from the OwnerInfo data and - // write it to that file. - bufferArray b; - u_int32_t handle; - u_int32_t count; - - res = plpRfsv->fopen(plpRfsv->opMode(rfsv::PSI_O_RDONLY), - "SYS$PT.CFG", handle); - if (res == rfsv::E_PSI_GEN_NONE) { - res = plpRfsv->fread(handle, (unsigned char *)&machineUID, - sizeof(machineUID), count); - plpRfsv->fclose(handle); - if ((res != rfsv::E_PSI_GEN_NONE) || (count != sizeof(machineUID))) { - QString msg = i18n("Could not read SIBO UID file"); - statusBar()->changeItem(msg, STID_CONNECTION); - KMessageBox::error(this, msg); - return; - } - } else { - if ((res = plpRpcs->getOwnerInfo(b)) != rfsv::E_PSI_GEN_NONE) { - QString msg = i18n("Could not get Psion owner info"); - statusBar()->changeItem(msg, STID_CONNECTION); - KMessageBox::error(this, msg); - return; - } - machineUID = 0; - std::string oi = ""; - while (!b.empty()) { - oi += b.pop().getString(); - oi += "\n"; - } - const char *p = oi.c_str(); - unsigned long long z; - int i = 0; - - while (*p) { - z = *p; - machineUID ^= (z << i); - p++; i++; - i &= ((sizeof(machineUID) * 8) - 1); - } - res = plpRfsv->fcreatefile(plpRfsv->opMode(rfsv::PSI_O_RDWR), - "SYS$PT.CFG", handle); - if (res == rfsv::E_PSI_GEN_NONE) { - res = plpRfsv->fwrite(handle, (const unsigned char *)&machineUID, - sizeof(machineUID), count); - plpRfsv->fclose(handle); - } - if (res != rfsv::E_PSI_GEN_NONE) { - QString msg = i18n("Could not write SIBO UID file %1").arg((const char *)res); - statusBar()->changeItem(msg, STID_CONNECTION); - KMessageBox::error(this, msg); - return; - } - } - S5mx = false; - } - - QString uid = getMachineUID(); - bool machineFound = false; - KConfig *config = kapp->config(); - KPsionConfig pcfg; - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_BACKUPDRIVES)); - QString tmp = pcfg.getOptionName(KPsionConfig::OPT_BACKUPDRIVES); - machineName = i18n("an unknown machine"); - psionMap::Iterator it; - for (it = machines.begin(); it != machines.end(); it++) { - if (uid == it.key()) { - machineName = it.data(); - backupDrives = config->readListEntry(tmp.arg(it.key())); - machineFound = true; - } - } - - drives.clear(); - statusBar()->changeItem(i18n("Retrieving drive list ..."), - STID_CONNECTION); - if ((res = plpRfsv->devlist(devbits)) != rfsv::E_PSI_GEN_NONE) { - QString msg = i18n("Could not get list of drives"); - statusBar()->changeItem(msg, STID_CONNECTION); - KMessageBox::error(this, msg); - return; - } - for (int i = 0; i < 26; i++) { - if ((devbits & 1) != 0) { - PlpDrive drive; - if (plpRfsv->devinfo('A' + i, drive) == rfsv::E_PSI_GEN_NONE) - insertDrive('A' + i, drive.getName().c_str()); - } - devbits >>= 1; - } - - if (!machineFound) { - if (args->isSet("autobackup")) { - connected = false; - if (plpRfsv) - delete plpRfsv; - if (plpRpcs) - delete plpRpcs; - if (rfsvSocket) - delete rfsvSocket; - if (rfsvSocket) - delete rpcsSocket; - quitImmediately = true; - return; - } - NewPsionWizard *wiz = new NewPsionWizard(this, "newpsionwiz"); - wiz->exec(); - } - statusBar()->changeItem(i18n("Connected to %1").arg(machineName), - STID_CONNECTION); - - syncTime(uid); - - if (args->isSet("autobackup")) { - // Check, if scheduled backups to perform - - doScheduledBackup = false; - KPsionConfig pcfg; - QIconViewItem *i; - QStringList::Iterator it; - QDateTime d; - KConfig *config = kapp->config(); - QString uid = getMachineUID(); - QString key; - int fi = pcfg.getIntervalDays(config, KPsionConfig::OPT_FULLINTERVAL); - int ii = pcfg.getIntervalDays(config, KPsionConfig::OPT_INCINTERVAL); - - // Check for Full Backup - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_LASTFULL)); - for (it = backupDrives.begin(); it != backupDrives.end(); ++it) { - key = - pcfg.getOptionName(KPsionConfig::OPT_LASTFULL).arg(uid).arg(*it); - d.setTime_t(config->readNumEntry(key)); - - if (fi && d.daysTo(QDateTime::currentDateTime()) >= fi) { - fullBackup = true; - for (i = view->firstItem(); i; i = i->nextItem()) { - if (i->key() == *it) { - i->setSelected(true); - doScheduledBackup = true; - } - } - } - } - if (!doScheduledBackup) { - // Check for Incremental Backup - fullBackup = false; - view->clearSelection(); - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_LASTINC)); - for (it = backupDrives.begin(); it != backupDrives.end(); ++it) { - key = - pcfg.getOptionName(KPsionConfig::OPT_LASTINC).arg(uid).arg(*it); - d.setTime_t(config->readNumEntry(key)); - if (ii && d.daysTo(QDateTime::currentDateTime()) >= ii) { - for (i = view->firstItem(); i; i = i->nextItem()) { - if (i->key() == *it) { - i->setSelected(true); - doScheduledBackup = true; - } - } - } - } - } - if (!doScheduledBackup) { - quitImmediately = true; - return; - } - - } - if (doScheduledBackup || args->isSet("backup") || - args->isSet("restore") || args->isSet("format")) { - view->setEnabled(false); - actionCollection()->action("restore")->setEnabled(false); - actionCollection()->action("format")->setEnabled(false); - actionCollection()->action("fullbackup")->setEnabled(false); - actionCollection()->action("incbackup")->setEnabled(false); - QTimer::singleShot(1000, this, SLOT(slotAutoAction())); - } -} - -void KPsionMainWindow:: -slotAutoAction() { - QIconViewItem *i; - - if (doScheduledBackup) { - doBackup(); - QTimer::singleShot(1000, this, SLOT(close())); - return; - } - - if (args->isSet("backup")) { - bool any = false; - - QCStringList argl = args->getOptionList("backup"); - QCStringList::Iterator it; - - for (it = argl.begin(); it != argl.end(); ++it) { - i = 0L; - if ((*it).left(7) == "psion:/") { - QString volname((*it).mid(7)); - for (i = view->firstItem(); i; i = i->nextItem()) { - if (i->text().startsWith(volname + " ")) - break; - } - } else { - QString drv((*it).upper()); - for (i = view->firstItem(); i; i = i->nextItem()) { - if (i->key() == drv) - break; - } - } - if (i) { - i->setSelected(true); - any = true; - } - } - if (any) { - fullBackup = true; - doBackup(); - } - QTimer::singleShot(1000, this, SLOT(close())); - return; - } - - if (args->isSet("restore")) { - bool any = false; - - QCStringList argl = args->getOptionList("restore"); - QCStringList::Iterator it; - - for (it = argl.begin(); it != argl.end(); ++it) { - i = 0L; - if ((*it).left(7) == "psion:/") { - QString volname((*it).mid(7)); - for (i = view->firstItem(); i; i = i->nextItem()) { - if (i->text().startsWith(volname + " ")) - break; - } - } else { - QString drv((*it).upper()); - for (i = view->firstItem(); i; i = i->nextItem()) { - if (i->key() == drv) - break; - } - } - if (i) { - if (i->key() == "Z") { - KMessageBox::sorry(this, i18n( - "<QT>The selected drive <B>Z:</B> is " - "a <B>ROM</B> drive and therefore cannot be restored.</QT>")); - continue; - } - i->setSelected(true); - any = true; - } - } - if (any) - slotStartRestore(); - QTimer::singleShot(1000, this, SLOT(close())); - return; - } - - if (args->isSet("format")) { - bool any = false; - QCStringList argl = args->getOptionList("format"); - QCStringList::Iterator it; - - for (it = argl.begin(); it != argl.end(); ++it) { - i = 0L; - if ((*it).left(7) == "psion:/") { - QString volname((*it).mid(7)); - for (i = view->firstItem(); i; i = i->nextItem()) { - if (i->text().startsWith(volname + " ")) - break; - } - } else { - QString drv((*it).upper()); - for (i = view->firstItem(); i; i = i->nextItem()) { - if (i->key() == drv) - break; - } - } - if (i) { - if (i->key() == "Z") { - KMessageBox::sorry(this, i18n( - "<QT>The selected drive <B>Z:</B> is " - "a <B>ROM</B> drive and therefore cannot be formatted.</QT>")); - continue; - } - i->setSelected(true); - any = true; - } - } - if (any) - slotStartFormat(); - QTimer::singleShot(1000, this, SLOT(close())); - return; - } - QTimer::singleShot(1000, this, SLOT(close())); -} - -QString KPsionMainWindow:: -getMachineUID() { - // ??! None of QString's formatting methods knows about long long. - char tmp[20]; - sprintf(tmp, "%16llx", machineUID); - return QString(tmp); -} - -bool KPsionMainWindow:: -queryClose() { - QString msg = 0L; - - if (backupRunning) - msg = i18n("A backup is running.\nDo you really want to quit?"); - if (restoreRunning) - msg = i18n("A restore is running.\nDo you really want to quit?"); - if (formatRunning) - msg = i18n("A format is running.\nDo you really want to quit?"); - - if ((!msg.isNull()) && - (KMessageBox::warningYesNo(this, msg) == KMessageBox::No)) - return false; - return true; -} - -void KPsionMainWindow:: -startupNcpd() { - if (ncpdDevice == "off") - return; - KProcess proc; - ppsocket *testSocket; - time_t start_time = time(0L) + 2; - bool connectOk = false; - - testSocket = new ppsocket(); - if (!testSocket->connect(NULL, 7501)) { - - statusBar()->changeItem(i18n("Starting ncpd daemon ..."), - STID_CONNECTION); - proc << ncpdPath; - proc << "-s" << ncpdDevice << "-b" << ncpdSpeed; - proc.start(KProcess::DontCare); - while ((time(0L) < start_time) && - (!(connectOk = testSocket->connect(NULL, 7501)))) - kapp->processEvents(); - } - delete testSocket; - if (connectOk) { - // 2 more seconds for ncpd to negotiate with the Psion. - start_time = time(0L) + 2; - while (time(0L) < start_time) - kapp->processEvents(); - } -} - -void KPsionMainWindow:: -tryConnect() { - if (shuttingDown || connected) - return; - bool showMB = firstTry; - firstTry = false; - - if (plpRfsv) - delete plpRfsv; - if (plpRpcs) - delete plpRpcs; - if (rfsvSocket) - delete rfsvSocket; - if (rfsvSocket) - delete rpcsSocket; - - startupNcpd(); - rfsvSocket = new ppsocket(); - statusBar()->changeItem(i18n("Connecting ..."), STID_CONNECTION); - if (!rfsvSocket->connect(NULL, 7501)) { - if (args->isSet("autobackup")) { - quitImmediately = true; - return; - } - statusMsg = i18n("RFSV could not connect to ncpd at %1:%2. ").arg("localhost").arg(7501); - 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); - } - return; - } - rfsvfactory factory(rfsvSocket); - plpRfsv = factory.create(false); - if (plpRfsv == 0L) { - if (args->isSet("autobackup")) { - quitImmediately = true; - return; - } - 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); - } - return; - } - - rpcsSocket = new ppsocket(); - if (!rpcsSocket->connect(NULL, 7501)) { - if (args->isSet("autobackup")) { - quitImmediately = true; - return; - } - statusMsg = i18n("RPCS could not connect to ncpd at %1:%2.").arg("localhost").arg(7501); - delete plpRfsv; - plpRfsv = 0L; - 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); - } - return; - } - rpcsfactory factory2(rpcsSocket); - plpRpcs = factory2.create(false); - if (plpRpcs == 0L) { - if (args->isSet("autobackup")) { - quitImmediately = true; - return; - } - statusMsg = i18n("RPCS could not establish link: %1.").arg(KGlobal::locale()->translate(factory2.getError())); - delete plpRfsv; - plpRfsv = 0L; - delete rfsvSocket; - rfsvSocket = 0L; - delete rpcsSocket; - rpcsSocket = 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); - } - return; - } - connected = true; - queryPsion(); -} - -void KPsionMainWindow:: -slotUpdateTimer() { - nextTry--; - if (nextTry <= 0) - tryConnect(); - else { - statusBar()->changeItem(statusMsg.arg(nextTry), STID_CONNECTION); - QTimer::singleShot(1000, this, SLOT(slotUpdateTimer())); - } -} - -void KPsionMainWindow:: -slotProgressBarPressed() { -} - -void KPsionMainWindow:: -slotStartFullBackup() { - fullBackup = true; - doBackup(); -} - -void KPsionMainWindow:: -slotStartIncBackup() { - fullBackup = false; - 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:: -updateBackupStamps() { - KConfig *config = kapp->config(); - KPsionConfig pcfg; - QString uid = getMachineUID(); - int cfgBtype = (fullBackup) - ? KPsionConfig::OPT_LASTFULL : KPsionConfig::OPT_LASTINC; - - config->setGroup(pcfg.getSectionName(cfgBtype)); - for (QIconViewItem *i = view->firstItem(); i; i = i->nextItem()) { - QString key = pcfg.getOptionName(cfgBtype).arg(uid).arg(i->key()); - if (i->isSelected()) - config->writeEntry(key, time(0)); - } -} - -void KPsionMainWindow:: -doBackup() { - backupRunning = true; - switchActions(); - QStringList processDrives; - toBackup.clear(); - - // 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(); - drv += ":"; - int drvChar = drv[0].latin1(); - PlpDrive drive; - if (plpRfsv->devinfo(drvChar, 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)); - backupRunning = false; - switchActions(); - return; - } - emit setProgressText(i18n("Scanning drive %1").arg(drv)); - - progressLocal = drive.getSize() - drive.getSpace(); - progressLocalCount = 0; - progressLocalPercent = -1; - progress->setValue(0); - collectFiles(drv); - processDrives += drv; - } - } - 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); - updateBackupStamps(); - if (!args->isSet("autobackup")) - KMessageBox::information(this, i18n("No files need backup")); - backupRunning = false; - switchActions(); - return; - } - - progressCount = 0; - progressTotal = backupSize; - progressPercent = -1; - - // Create tgz with index file. - QString archiveName = backupDir; - if (archiveName.right(1) != "/") - archiveName += "/"; - archiveName += getMachineUID(); - 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)); - backupRunning = false; - switchActions(); - return; - } - - archiveName += (fullBackup) ? "/F-" : "/I-"; - time_t now = time(0); - char tstr[30]; - strftime(tstr, sizeof(tstr), "%Y-%m-%d-%H-%M-%S.tmp.gz", - localtime(&now)); - archiveName += tstr; - backupTgz = new KTar(archiveName, "application/x-gzip"); - backupTgz->open(IO_WriteOnly); - createIndex(); - - // Kill all running applications on the Psion - // and save their state. - killSave(); - - 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(); - QByteArray ba; - QDataStream os(ba, IO_WriteOnly); - - emit setProgressText(QString("%1").arg(fn)); - progressLocal = e.getSize(); - progressLocalCount = 0; - progressLocalPercent = -1; - emit setProgress(0); - - u_int32_t handle; - - kapp->processEvents(); - bool tryLoop = true; - do { - res = plpRfsv->fopen(plpRfsv->opMode(rfsv::PSI_O_RDONLY), fn, - handle); - if (res == rfsv::E_PSI_GEN_NONE) { - unsigned char *buff = new unsigned char[RFSV_SENDLEN]; - u_int32_t len; - do { - if ((res = plpRfsv->fread(handle, buff, RFSV_SENDLEN, - len)) == rfsv::E_PSI_GEN_NONE) { - os.writeRawBytes((char *)buff, len); - updateProgress(len); - } - } while ((len > 0) && (res == rfsv::E_PSI_GEN_NONE)); - delete[]buff; - plpRfsv->fclose(handle); - } - if (res != rfsv::E_PSI_GEN_NONE) { - switch (KMessageBox::warningYesNoCancel( - this, i18n( - "<QT>Could not backup<BR/><B>%1</B><BR/>" - "<FONT COLOR=RED>%2</FONT><BR/></QT>" - ).arg(fn).arg((const char *)res), - QString::null, i18n("Retry"), i18n("Ignore"))) { - case KMessageBox::Cancel: - badBackup = true; - tryLoop = false; - break; - case KMessageBox::No: - e.setName("!"); - tryLoop = false; - break; - case KMessageBox::Yes: - break; - } - } else { - tryLoop = false; - } - } while (tryLoop); - if (badBackup) - break; - if (res != rfsv::E_PSI_GEN_NONE) - continue; - backupTgz->writeFile(psion2unix(fn), "root", "root", ba.size(), - ba.data()); - } - - if (!badBackup) { - // Reset archive attributes of all backuped files. - emit setProgressText(i18n("Resetting archive attributes")); - progressLocal = backupSize; - progressLocalCount = 0; - progressLocalPercent = -1; - emit setProgress(0); - kapp->processEvents(); - progressTotal = 0; - for (int i = 0; i < toBackup.size(); i++) { - PlpDirent e = toBackup[i]; - const char *fn = e.getName(); - if ((e.getAttr() & rfsv::PSI_A_ARCHIVE) && - (strcmp(fn, "!") != 0)) { - kapp->processEvents(); - res = plpRfsv->fsetattr(fn, 0, rfsv::PSI_A_ARCHIVE); - if (res != rfsv::E_PSI_GEN_NONE) { - if (KMessageBox::warningYesNo(this, i18n("<QT>Could not set attributes of<BR/><B>%1</B><BR/><FONT COLOR=red>%2</FONT><BR/>Continue?</QT>").arg(fn)) == KMessageBox::No) { - break; - } - } - } - updateProgress(e.getSize()); - } - updateBackupStamps(); - } - // Restart previously running applications on the Psion - // from saved state info. - runRestore(); - - backupTgz->close(); - delete backupTgz; - emit enableProgressText(false); - emit setProgress(0); - - if (badBackup) - ::unlink(archiveName.latin1()); - else { - QString newName = archiveName; - newName.replace(QRegExp("\\.tmp\\.gz$"), ".tar.gz"); - // Rename Tarfile to its final name; - if (::rename(archiveName.latin1(), newName.latin1()) != 0) - KMessageBox::sorry(this, i18n("<QT>Could not rename backup archive from<BR/><B>%1</B> to<BR/><B>%2</B></QT>").arg(archiveName).arg(newName)); - else - removeOldBackups(processDrives); - } - - 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); -} - -class Barchive { -public: - Barchive() - : n(""), d(0) {} - Barchive(const QString &name, time_t date) - : n(name), d(date) {} - - QString name() const { return n; } - time_t date() const { return d; } - bool operator==(const Barchive &a) { return (a.n == n); } -private: - QString n; - time_t d; -}; - -typedef QValueList<Barchive>ArchList; - -void KPsionMainWindow:: -removeOldBackups(QStringList &drives) { - - if (!fullBackup) - return; - - KConfig *config = kapp->config(); - KPsionConfig pcfg; - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_BACKUPGEN)); - int bgen = config->readNumEntry( - pcfg.getOptionName(KPsionConfig::OPT_BACKUPGEN)); - - if (bgen == 0) - return; - - statusBar()->changeItem(i18n("Removing old backups ..."), STID_CONNECTION); - QString bdir(backupDir); - bdir += "/"; - bdir += getMachineUID(); - QDir d(bdir); - kapp->processEvents(); - const QFileInfoList *fil = - d.entryInfoList("*.tar.gz", QDir::Files|QDir::Readable, QDir::Name); - QFileInfoListIterator it(*fil); - QFileInfo *fi; - ArchList alist; - - // Build a list of full-backups sorted by date - while ((fi = it.current())) { - kapp->processEvents(); - - KTar tgz(fi->absFilePath()); - const KTarEntry *te; - - tgz.open(IO_ReadOnly); - te = tgz.directory()->entry("KPsionFullIndex"); - if (te && (!te->isDirectory())) { - for (QStringList::Iterator d = drives.begin(); d != drives.end(); - d++) { - const KTarEntry *de = tgz.directory()->entry(*d); - if (de && (de->isDirectory())) { - Barchive a(tgz.fileName(), te->date()); - if (!alist.contains(a)) { - if (alist.isEmpty() || (alist.first().date()>te->date())) - alist.prepend(a); - else - alist.append(a); - } - } - } - } - tgz.close(); - ++it; - } - - // Remove entries from the beginning of the list if there are more than - // bgen entries. This leaves at most bgen of the youngest backups in the - // list. - while (alist.count() > bgen) { - Barchive r = alist.first(); - alist.remove(r); - } - - // Finally iterate over all backups and delete those which are older - // than the first entry in alist. - - (void)it.toFirst(); - - while ((fi = it.current())) { - kapp->processEvents(); - - KTar tgz(fi->absFilePath()); - const KTarEntry *te; - bool valid = false; - bool del = false; - - tgz.open(IO_ReadOnly); - te = tgz.directory()->entry("KPsionFullIndex"); - if (te && (!te->isDirectory())) - valid = true; - else { - te = tgz.directory()->entry("KPsionIncrementalIndex"); - if (te && (!te->isDirectory())) - valid = true; - } - if (valid) { - Barchive a(tgz.fileName(), te->date()); - if (alist.isEmpty() || - ((!alist.contains(a)) && (te->date() < alist.first().date()))) - del = true; - } - tgz.close(); - if (del) - ::remove(fi->absFilePath().data()); - ++it; - } -} - -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); - -#if (QT_VERSION >= 300) - label1->setPixmap(kapp->style().stylePixmap( - kapp->style().SP_MessageBoxWarning)); -#else - label1->setPixmap(QMessageBox::standardIcon(QMessageBox::Warning, - kapp->style().guiStyle())); -#endif - 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(); - - 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 fmtDrives = restoreDialog.getFormatDrives(); - 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) { - KTar 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(); - Enum<rfsv::errs> res; - - progressLocal = e.getSize(); - progressLocalCount = 0; - progressLocalPercent = -1; - emit setProgressText(QString("%1").arg(fn)); - emit setProgress(0); - - te = findTarEntry(tgz.directory(), psion2unix(fn)); - 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); - - QString drv = cpDir.left(1); - if (fmtDrives.find(drv) != fmtDrives.end()) { - int tSave = progressCount; - doFormat(drv); - fmtDrives.remove(drv); - progressTotalText = i18n("Restore %1% done"); - progressTotal = backupSize; - progressCount = tSave; - progressLocal = e.getSize(); - progressLocalCount = 0; - progressLocalPercent = -1; - emit setProgressText(QString("%1").arg(fn)); - emit enableProgressText(true); - emit setProgress(0); - } - 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; - int retry = 10; - // Retry, because file somtimes takes some time - // to close; - do { - res = plpRfsv->fsetattr(fn, sattr, dattr); - if (res != rfsv::E_PSI_GEN_NONE) - usleep(100000); - retry--; - } while ((res != rfsv::E_PSI_GEN_NONE) && (retry > 0)); - 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; - } - retry = 10; - do { - res = plpRfsv->fsetmtime(fn, e.getPsiTime()); - if (res != rfsv::E_PSI_GEN_NONE) - usleep(100000); - retry--; - } while ((res != rfsv::E_PSI_GEN_NONE) && (retry > 0)); - 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); -} - -void KPsionMainWindow:: -doFormat(QString drive) { - int handle; - int count; - const char dchar = drive[0].latin1(); - QString dname(""); - - PlpDrive drv; - if (plpRfsv->devinfo(dchar, drv) == rfsv::E_PSI_GEN_NONE) - dname = QString(drv.getName().c_str()); - - statusBar()->changeItem(i18n("Formatting drive %1:").arg(dchar), - STID_CONNECTION); - update(); - - emit setProgressText(QString("")); - emit setProgress(0); - emit enableProgressText(true); - - Enum<rfsv::errs> res = plpRpcs->formatOpen(dchar, handle, count); - if (res != rfsv::E_PSI_GEN_NONE) { - KMessageBox::error(this, i18n( - "<QT>Could not format drive %1:<BR/>" - "%2</QT>").arg(dchar).arg(KGlobal::locale()->translate(res))); - emit setProgress(0); - emit enableProgressText(false); - statusBar()->changeItem(i18n("Connected to %1").arg(machineName), - STID_CONNECTION); - return; - } - progressTotal = 0; - progressLocal = count; - progressLocalCount = 0; - progressLocalPercent = -1; - updateProgress(0); - for (int i = 0; i < count; i++) { - res = plpRpcs->formatRead(handle); - if (res != rfsv::E_PSI_GEN_NONE) { - KMessageBox::error(this, i18n( - "<QT>Error during format of drive %1:<BR/>" - "%2</QT>").arg(dchar).arg(KGlobal::locale()->translate(res))); - emit setProgress(0); - emit enableProgressText(false); - statusBar()->changeItem( - i18n("Connected to %1").arg(machineName), - STID_CONNECTION); - count = 0; - return; - } - updateProgress(1); - } - setDriveName(dchar, dname); - - emit setProgress(0); - emit enableProgressText(false); - statusBar()->changeItem(i18n("Connected to %1").arg(machineName), - STID_CONNECTION); - statusBar()->message(i18n("Format done"), 2000); -} - -void KPsionMainWindow:: -slotStartFormat() { - if (KMessageBox::warningYesNo(this, i18n( - "<QT>This erases <B>ALL</B> data " - "on the drive(s).<BR/>Do you really " - "want to proceed?" - )) == KMessageBox::No) - return; - formatRunning = true; - switchActions(); - killSave(); - - for (QIconViewItem *i = view->firstItem(); i; i = i->nextItem()) { - if (i->isSelected() && (i->key() != "Z")) - doFormat(i->key()); - } - - runRestore(); - formatRunning = false; - switchActions(); -} - -void KPsionMainWindow:: -setDriveName(const char dchar, QString dname) { - KDialogBase dialog(this, "drivenameDialog", true, i18n("Assign drive name"), - KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, - true); - - QWidget *w = new QWidget(&dialog); - QGridLayout *gl = new QGridLayout(w, 1, 1, KDialog::marginHint()*2, - KDialog::spacingHint()*2); - - QLabel *l = new QLabel(i18n( - "<QT>Formatting of drive %1: finished. Please assign a name for " - "that drive.</QT>").arg(dchar), w); - gl->addMultiCellWidget(l, 0, 0, 0, 1); - - l = new QLabel(i18n("New name of drive %1:").arg(dchar), w); - gl->addWidget(l, 1, 0); - - KLineEdit *e = new KLineEdit(dname, w, "nameEntry"); - gl->addWidget(e, 1, 1); - - gl->setColStretch(1, 1); - dialog.setMainWidget(w); - - int result = dialog.exec(); - QString newname = QString("%1:").arg(dchar); - QString dstr; - dstr = dchar; - - switch (result) { - case QDialog::Accepted: - if (!e->text().isEmpty()) { - Enum<rfsv::errs> res; - res = plpRfsv->setVolumeName(dchar, e->text()); - if (res == rfsv::E_PSI_GEN_NONE) - newname = QString("%1 (%2:)").arg(e->text()).arg(dchar); - } - drives.replace(dchar, newname); - for (QIconViewItem *i = view->firstItem(); i; i = i->nextItem()) { - if (i->key() == dstr) { - i->setText(newname); - break; - } - } - emit rearrangeIcons(true); - break; - default: // Huh? - break; - } -} - -void KPsionMainWindow:: -slotToggleToolbar() { - if (toolBar()->isVisible()) - toolBar()->hide(); - else - toolBar()->show(); -} - -void KPsionMainWindow:: -slotToggleStatusbar() { - if (statusBar()->isVisible()) - statusBar()->hide(); - else - statusBar()->show(); -} - -void KPsionMainWindow:: -slotSaveOptions() { -} - -void KPsionMainWindow:: -slotPreferences() { - SetupDialog d(this, plpRfsv, plpRpcs); - d.exec(); -} - -void KPsionMainWindow:: -updateProgress(unsigned long amount) { - progressLocalCount += amount; - int lastPercent = progressLocalPercent; - if (progressLocal) - progressLocalPercent = progressLocalCount * 100 / progressLocal; - else - progressLocalPercent = 100; - if (progressLocalPercent != lastPercent) - emit setProgress(progressLocalPercent); - if (progressTotal > 0) { - progressCount += amount; - lastPercent = progressPercent; - if (progressTotal) - progressPercent = progressCount * 100 / progressTotal; - else - progressPercent = 100; - if (progressPercent != lastPercent) - statusBar()->changeItem(progressTotalText.arg(progressPercent), - STID_CONNECTION); - } - kapp->processEvents(); -} - -void KPsionMainWindow:: -collectFiles(QString dir) { - Enum<rfsv::errs> res; - PlpDir files; - QString tmp = dir; - - kapp->processEvents(); - tmp += "\\"; - if ((res = plpRfsv->dir(tmp.data(), files)) != rfsv::E_PSI_GEN_NONE) { - // messagebox "Couldn't get directory ...." - } else - for (int i = 0; i < files.size(); i++) { - PlpDirent e = files[i]; - - - long attr = e.getAttr(); - tmp = dir; - tmp += "\\"; - tmp += e.getName(); - if (attr & rfsv::PSI_A_DIR) { - collectFiles(tmp); - } else { - updateProgress(e.getSize()); - if ((attr & rfsv::PSI_A_ARCHIVE) || fullBackup) { - backupCount++; - backupSize += e.getSize(); - e.setName(tmp.data()); - toBackup.push_back(e); - } - } - } -} - -void KPsionMainWindow:: -killSave() { - Enum<rfsv::errs> res; - processList tmp; - - savedCommands.clear(); - if ((res = plpRpcs->queryPrograms(tmp)) != rfsv::E_PSI_GEN_NONE) { - cerr << "Could not get process list, Error: " << res << endl; - return; - } else { - for (processList::iterator i = tmp.begin(); i != tmp.end(); i++) { - savedCommands += i->getArgs(); - emit setProgressText(i18n("Stopping %1").arg(i->getName())); - kapp->processEvents(); - plpRpcs->stopProgram(i->getProcId()); - } - } - time_t tstart = time(0) + 5; - while (true) { - kapp->processEvents(); - usleep(100000); - kapp->processEvents(); - if ((res = plpRpcs->queryPrograms(tmp)) != rfsv::E_PSI_GEN_NONE) { - cerr << "Could not get process list, Error: " << res << endl; - return; - } - if (tmp.empty()) - break; - if (time(0) > tstart) { - KMessageBox::error(this, i18n( - "<QT>Could not stop all processes.<BR/>" - "Please stop running programs manually on the Psion, " - "then click <B>Ok</B>.")); - tstart = time(0) + 5; - } - } - return; -} - -void KPsionMainWindow:: -runRestore() { - Enum<rfsv::errs> res; - - for (QStringList::Iterator it = savedCommands.begin(); it != savedCommands.end(); it++) { - int firstBlank = (*it).find(' '); - QString cmd = (*it).left(firstBlank); - QString arg = (*it).mid(firstBlank + 1); - - if (!cmd.isEmpty()) { - // Workaround for broken programs like Backlite. - // These do not storethe full program path. - // In that case we try running the arg1 which - // results in starting the program via recog. facility. - emit setProgressText(i18n("Starting %1").arg(cmd)); - kapp->processEvents(); - if ((arg.length() > 2) && (arg[1] == ':') && (arg[0] >= 'A') && - (arg[0] <= 'Z')) - res = plpRpcs->execProgram(arg.data(), ""); - else - res = plpRpcs->execProgram(cmd.data(), arg.data()); - if (res != rfsv::E_PSI_GEN_NONE) { - // If we got an error here, that happened probably because - // we have no path at all (e.g. Macro5) and the program is - // not registered in the Psion's path properly. Now try - // the ususal \System\Apps\<AppName>\<AppName>.app - // on all drives. - if (cmd.find('\\') == -1) { - driveMap::Iterator it; - for (it = drives.begin(); it != drives.end(); it++) { - QString newcmd = QString::fromLatin1("%1:\\System\\Apps\\%2\\%3").arg(it.key()).arg(cmd).arg(cmd); - res = plpRpcs->execProgram(newcmd.data(), ""); - if (res == rfsv::E_PSI_GEN_NONE) - break; - newcmd += ".app"; - res = plpRpcs->execProgram(newcmd.data(), ""); - if (res == rfsv::E_PSI_GEN_NONE) - break; - - } - } - } - } - } - return; -} - -void KPsionMainWindow:: -createIndex() { - QByteArray ba; - QTextOStream os(ba); - os << "#plpbackup index " << - (fullBackup ? "F" : "I") << endl; - for (int i = 0; i < toBackup.size(); i++) { - PlpDirent e = toBackup[i]; - PsiTime t = e.getPsiTime(); - long attr = e.getAttr() & - ~rfsv::PSI_A_ARCHIVE; -#if (QT_VERSION < 300) - os << hex - << setw(8) << setfill('0') << - t.getPsiTimeHi() << " " - << setw(8) << setfill('0') << - t.getPsiTimeLo() << " " - << setw(8) << setfill('0') << - e.getSize() << " " - << setw(8) << setfill('0') << - attr << " " - << setw(0) << e.getName() << endl; -#else - os << hex - << qSetW(8) << qSetFill('0') << - t.getPsiTimeHi() << " " - << qSetW(8) << qSetFill('0') << - t.getPsiTimeLo() << " " - << qSetW(8) << qSetFill('0') << - e.getSize() << " " - << qSetW(8) << qSetFill('0') << - attr << " " - << qSetW(0) << e.getName() << endl; -#endif - kapp->processEvents(); - } - QString idxName = - QString::fromLatin1("KPsion%1Index").arg(fullBackup ? - "Full" : "Incremental"); - backupTgz->writeFile(idxName, "root", "root", ba.size(), ba.data()); -} - -/* - * Local variables: - * c-basic-offset: 4 - * End: - */ diff --git a/kde2/kpsion/kpsion.desktop b/kde2/kpsion/kpsion.desktop deleted file mode 100644 index e29bb73..0000000 --- a/kde2/kpsion/kpsion.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -DocPath=kpsion/index.html -Exec=kpsion -Terminal=0 -Type=Application -Icon=psion_desktop -Comment=My Psion PDA -Comment[de]=Mein Psion -Name=KPsion -Name[de]=KPsion diff --git a/kde2/kpsion/kpsion.h b/kde2/kpsion/kpsion.h deleted file mode 100644 index 97a50dc..0000000 --- a/kde2/kpsion/kpsion.h +++ /dev/null @@ -1,164 +0,0 @@ -/*-*-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 <rfsv.h> -#include <rpcs.h> -#include <ppsocket.h> - -// get KDE_VERSION -#include <kapplication.h> - -#include "setupdialog.h" -#include "statusbarprogress.h" -#include "kpsionrestoredialog.h" - -#include <kmainwindow.h> -#include <kcmdlineargs.h> -#include <kiconview.h> -#include <kdialogbase.h> - -typedef QMap<char,QString> driveMap; -typedef QMap<QString,QString> psionMap; - -class KPsionMainWindow : public KMainWindow { - Q_OBJECT - -public: - KPsionMainWindow(); - ~KPsionMainWindow(); - void setMachineName(QString &_name) { machineName = _name; } - QString getMachineUID(); - driveMap &getDrives() { return drives; } - 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 = ""); - bool shouldQuit(); - 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); - void rearrangeIcons(bool); - -public slots: - void slotStartRestore(); - void slotStartFullBackup(); - void slotStartIncBackup(); - void slotStartFormat(); - void slotToggleToolbar(); - void slotToggleStatusbar(); - void slotSaveOptions(); - void slotPreferences(); - void slotProgressBarPressed(); - -protected: - virtual bool queryClose(); - void setupActions(); - void switchActions(); - void queryPsion(); - void insertDrive(char letter, const char * const name); - -private slots: - void iconClicked(QIconViewItem *i); - void iconOver(QIconViewItem *i); - void slotUpdateTimer(); - void slotAutoAction(); - -private: - void doBackup(); - void tryConnect(); - void updateProgress(unsigned long); - void collectFiles(QString dir); - void killSave(); - void runRestore(); - void createIndex(); - bool askOverwrite(PlpDirent e); - void setDriveName(const char dchar, QString dname); - void doFormat(QString drive); - void updateBackupStamps(); - void startupNcpd(); - void removeOldBackups(QStringList &drives); - void syncTime(QString uid); - - rfsv *plpRfsv; - rpcs *plpRpcs; - ppsocket *rfsvSocket; - ppsocket *rpcsSocket; - SetupDialog *setupDialog; - KIconView *view; - KPsionStatusBarProgress *progress; - KTar *backupTgz; - KCmdLineArgs *args; - - driveMap drives; - psionMap machines; - QStringList overWriteList; - QStringList backupDrives; - QStringList savedCommands; - QString backupDir; - QString machineName; - QString statusMsg; - QString ncpdDevice; - QString ncpdSpeed; - QString ncpdPath; - QString progressTotalText; - bool S5mx; - bool backupRunning; - bool restoreRunning; - bool formatRunning; - bool lastSelected; - bool connected; - bool firstTry; - bool shuttingDown; - bool fullBackup; - bool doScheduledBackup; - bool overWriteAll; - bool quitImmediately; - int reconnectTime; - int nextTry; - unsigned long long machineUID; - PlpDir toBackup; - unsigned long backupSize; - unsigned long backupCount; - unsigned long progressTotal; - unsigned long progressLocal; - unsigned long progressCount; - unsigned long progressLocalCount; - int progressPercent; - int progressLocalPercent; -}; -#endif - -/* - * Local variables: - * c-basic-offset: 4 - * End: - */ diff --git a/kde2/kpsion/kpsionbackuplistview.cpp b/kde2/kpsion/kpsionbackuplistview.cpp deleted file mode 100644 index 70bec21..0000000 --- a/kde2/kpsion/kpsionbackuplistview.cpp +++ /dev/null @@ -1,519 +0,0 @@ -/*-*-c++-*- - * $Id$ - * - * This file is part of plptools. - * - * Copyright (C) 1999 Philip Proudman <philip.proudman@btinternet.com> - * Copyright (C) 2000, 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 - -#include "kpsion.h" -#include "kpsionbackuplistview.h" -#include "kpsionconfig.h" - -#include <kapplication.h> -#include <klocale.h> -#include <kconfig.h> -#include <kiconloader.h> - -#include <qwhatsthis.h> -#include <qiodevice.h> -#include <qheader.h> -#include <qdir.h> - -class KPsionCheckListItem::KPsionCheckListItemMetaData { - friend class KPsionCheckListItem; - -private: - KPsionCheckListItemMetaData(); - ~KPsionCheckListItemMetaData() { }; - - bool parentIsKPsionCheckListItem; - bool dontPropagate; - bool gray; - 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; - gray = false; - name = QString::null; - backupType = KPsionBackupListView::UNKNOWN; -} - -KPsionCheckListItem::~KPsionCheckListItem() { - delete meta; -} - -/** - * Must re-implement this since QT3 does not leave the expansion square - * enabled anymore if the item is disabled. - */ -void KPsionCheckListItem:: -paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align) -{ - QColorGroup tmp(cg); - if (meta->gray) - tmp.setColor(QColorGroup::Text, - listView()->palette().color(QPalette::Disabled, - QColorGroup::Text)); - else - tmp.setColor(QColorGroup::Text, - listView()->palette().color(QPalette::Normal, - QColorGroup::Text)); - QCheckListItem::paintCell(p, tmp, column, width, align); -} - -KPsionCheckListItem *KPsionCheckListItem:: -firstChild() const { - return (KPsionCheckListItem *)QListViewItem::firstChild(); -} - -KPsionCheckListItem *KPsionCheckListItem:: -nextSibling() const { - return (KPsionCheckListItem *)QListViewItem::nextSibling(); -} - -void KPsionCheckListItem:: -init(bool myparent) { - setSelectable(false); - meta = new KPsionCheckListItemMetaData(); - meta->dontPropagate = false; - meta->parentIsKPsionCheckListItem = myparent; -} - -void KPsionCheckListItem:: -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) { - if (!state) - meta->gray = false; - QCheckListItem::stateChange(state); - if (meta->dontPropagate) - return; - if (meta->parentIsKPsionCheckListItem) - ((KPsionCheckListItem *)QListViewItem::parent())->propagateUp(state); - else - emit rootToggled(); - propagateDown(state); -} - -void KPsionCheckListItem:: -propagateDown(bool state) { - setOn(state); - KPsionCheckListItem *child = firstChild(); - while (child) { - child->meta->dontPropagate = true; - child->propagateDown(state); - child->meta->dontPropagate = false; - child = child->nextSibling(); - } -} - -void KPsionCheckListItem:: -propagateUp(bool state) { - bool makeGray = false; - - KPsionCheckListItem *child = firstChild(); - while (child) { - if (child->isOn() != state) { - makeGray = true; - break; - } - child = child->nextSibling(); - } - meta->dontPropagate = true; - if (makeGray) { - meta->gray = true; - setOn(true); - } else { - meta->gray = false; - setOn(state); - } - // Bug in QListView? It doesn't update, when - // enabled/disabled without activating. - // -> force it. - listView()->repaintItem(this); - 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; -} - -QString KPsionCheckListItem:: -psionpath() { - QString tmp = text(); - QCheckListItem *p = this; - while (p->depth() > 1) { - p = (QCheckListItem *)p->parent(); - tmp = p->text() + "/" + tmp; - } - return KPsionMainWindow::unix2psion(tmp); -} - -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) - : KListView(parent, name) { - - toRestore.clear(); - uid = QString::null; - KConfig *config = kapp->config(); - KPsionConfig pcfg; - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_BACKUPDIR)); - backupDir = config->readEntry( - pcfg.getOptionName(KPsionConfig::OPT_BACKUPDIR)); - addColumn(i18n("Available backups")); - setRootIsDecorated(true); - setSorting(-1); -} - -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::Time); - QFileInfoListIterator it(*fil); - QFileInfo *fi; - while ((fi = it.current())) { - kapp->processEvents(); - - bool isValid = false; -#if KDE_VERSION >= 300 - KTar tgz(fi->absFilePath()); -#else - KTarGz tgz(fi->absFilePath()); -#endif - const KTarEntry *te; - QString bTypeName; - int bType; - QDateTime date; - - tgz.open(IO_ReadOnly); - te = tgz.directory()->entry("KPsionFullIndex"); - if (te && (!te->isDirectory())) { - date.setTime_t(te->date()); - bTypeName = i18n("Full"); - bType = FULL; - isValid = true; - } else { - te = tgz.directory()->entry("KPsionIncrementalIndex"); - if (te && (!te->isDirectory())) { - date.setTime_t(te->date()); - bTypeName = i18n("Incremental"); - bType = INCREMENTAL; - isValid = true; - } - } - - if (isValid) { - 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(), tgz.fileName(), 0, 0, 0, 0); - i->setPixmap(0, KGlobal::iconLoader()->loadIcon("tgz", - KIcon::Small)); - connect(i, SIGNAL(rootToggled()), this, SLOT(slotRootToggled())); - - indexDataList_t idList; - while (!indexData.atEnd()) { - indexData_t id; - - indexData >> id.timeHi >> id.timeLo >> id.size >> id.attr; - id.name = indexData.readLine().mid(1); - idList.push_back(id); - } - - 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), idList, 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, indexDataList_t &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", - KIcon::Small)); - 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), idx, level + 1); - } else { - indexDataList_t::iterator ii; - - QString name = i->psionpath(); - for (ii = idx.begin(); ii != idx.end(); ii++) { - if (ii->name == name) { - i->setMetaData(0, 0, name, ii->size, ii->timeHi, ii->timeLo, - ii->attr); - break; - } - } - - i->setPixmap(0, KGlobal::iconLoader()->loadIcon("mime_empty", - KIcon::Small)); - } -} - -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; -} - -QStringList KPsionBackupListView:: -getFormatDrives() { - QStringList l; - - KPsionCheckListItem *i = firstChild(); - while (i != 0L) { - if (i->isOn()) { - KPsionCheckListItem *c = i->firstChild(); - while (c != 0L) { - if (c->isOn()) { - QString drv = c->text().left(1); - if (l.find(drv) == l.end()) - l += drv; - } - c = c->nextSibling(); - } - } - 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(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; -} - -/* - * Local variables: - * c-basic-offset: 4 - * End: - */ diff --git a/kde2/kpsion/kpsionbackuplistview.h b/kde2/kpsion/kpsionbackuplistview.h deleted file mode 100644 index 5da193a..0000000 --- a/kde2/kpsion/kpsionbackuplistview.h +++ /dev/null @@ -1,141 +0,0 @@ -/*-*-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 _KPSIONBACKUPLISTVIEW_H_ -#define _KPSIONBACKUPLISTVIEW_H_ - -#include <rfsv.h> - -#include <klistview.h> -#include <ktar.h> - -#include <qdatetime.h> -#include <qcheckbox.h> -#include <qstringlist.h> -#include <qtextstream.h> - -#include <vector> - -typedef struct { - u_int32_t timeHi; - u_int32_t timeLo; - u_int32_t attr; - u_int32_t size; - QString name; -} indexData_t; - -typedef std::vector<indexData_t> indexDataList_t; - -class KPsionCheckListItem : public QObject, public QCheckListItem { - Q_OBJECT - -public: - KPsionCheckListItem(KPsionCheckListItem *parent, const QString &text, - Type tt) - : QCheckListItem(parent, text, tt) { init(true); } - KPsionCheckListItem(QCheckListItem *parent, const QString &text, Type tt) - : QCheckListItem(parent, text, tt) { init(false); } - KPsionCheckListItem(QListViewItem *parent, const QString &text, Type tt) - : QCheckListItem(parent, text, tt) { init(false); } - KPsionCheckListItem(QListView *parent, const QString &text, Type tt) - : QCheckListItem(parent, text, tt) { init(false); } - KPsionCheckListItem(QListViewItem *parent, const QString &text, - const QPixmap &p) - : QCheckListItem(parent, text, p) { init(false); } - KPsionCheckListItem(QListView *parent, const QString &text, - const QPixmap &p) - : QCheckListItem(parent, text, p) { init(false); } - - 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); - QString psionpath(); - virtual void paintCell(QPainter *, const QColorGroup &, int, int, int); - -signals: - void rootToggled(void); - -protected: - virtual void stateChange(bool); - void propagateUp(bool); - void propagateDown(bool); - -private: - void init(bool); - class KPsionCheckListItemMetaData; - KPsionCheckListItemMetaData *meta; -}; - -class KPsionBackupListView : public KListView { - Q_OBJECT - -public: - enum backupTypes { - UNKNOWN = 0, - FULL = 1, - INCREMENTAL = 2, - }; - - KPsionBackupListView(QWidget *parent = 0, const char *name = 0); - KPsionCheckListItem *firstChild() const; - - void readBackups(QString uid); - PlpDir &getRestoreList(QString tarname); - QStringList getSelectedTars(); - QStringList getFormatDrives(); - bool autoSelect(QString drive); - -signals: - void itemsEnabled(bool); - -private slots: - void slotRootToggled(void); - -private: - void collectEntries(KPsionCheckListItem *i); - void listTree(KPsionCheckListItem *cli, const KTarEntry *te, - indexDataList_t &idx, int level); - QString uid; - QString backupDir; - PlpDir toRestore; -}; -#endif - -/* - * Local variables: - * c-basic-offset: 4 - * End: - */ diff --git a/kde2/kpsion/kpsionconfig.cpp b/kde2/kpsion/kpsionconfig.cpp deleted file mode 100644 index becfaa8..0000000 --- a/kde2/kpsion/kpsionconfig.cpp +++ /dev/null @@ -1,171 +0,0 @@ -/*-*-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 - * - */ - -#include "kpsionconfig.h" - -#include <klocale.h> -#include <kstandarddirs.h> - -#include <iostream> - -KPsionConfig::KPsionConfig() { - optionNames.insert(OPT_BACKUPDIR, QString("Settings/BackupDir")); - optionNames.insert(OPT_BACKUPGEN, QString("Settings/BackupGenerations")); - optionNames.insert(OPT_INCINTERVAL, QString("Settings/IncrementalInterval")); - optionNames.insert(OPT_FULLINTERVAL, QString("Settings/FullInterval")); - optionNames.insert(OPT_CONNRETRY, QString("Connection/Retry")); - optionNames.insert(OPT_SERIALDEV, QString("Connection/Device")); - optionNames.insert(OPT_SERIALSPEED, QString("Connection/Speed")); - optionNames.insert(OPT_NCPDPATH, QString("Connection/NcpdPath")); - optionNames.insert(OPT_UIDS, QString("Psion/MachineUIDs")); - optionNames.insert(OPT_MACHNAME, QString("Psion/Name_%1")); - optionNames.insert(OPT_BACKUPDRIVES, QString("Psion/BackupDrives_%1")); - optionNames.insert(OPT_DRIVES, QString("Psion/Drives_%1")); - optionNames.insert(OPT_LASTFULL, QString("Psion/LastFull_%1_%1")); - optionNames.insert(OPT_LASTINC, QString("Psion/LastInc_%1_%1")); - optionNames.insert(OPT_SYNCTIME, QString("Psion/SyncTime_%1")); - - defaults.insert(DEF_INCINTERVAL, QString("1")); - defaults.insert(DEF_FULLINTERVAL, QString("7")); - defaults.insert(DEF_CONNRETRY, QString("30")); - defaults.insert(DEF_SERIALDEV, QString("0")); - defaults.insert(DEF_SERIALSPEED, QString("4")); - defaults.insert(DEF_BACKUPGEN, QString("3")); - defaults.insert(DEF_NCPDPATH, QString("ncpd")); - defaults.insert(DEF_SYNCTIME, QString("false")); -} - -const QString KPsionConfig:: -getStrDefault(int optIdx) { - if (optIdx != DEF_BACKUPDIR) - return QString::null; - return locateLocal("data", "kpsion/backups"); -} - -int KPsionConfig:: -getIntDefault(int optIdx) { - cfgMap::Iterator it = defaults.find(optIdx); - if (it == defaults.end()) - return 0; - return (*it).toInt(); -} - -bool KPsionConfig:: -getBoolDefault(int optIdx) { - cfgMap::Iterator it = defaults.find(optIdx); - if (it == defaults.end()) - return false; - return ((*it).compare("true") == 0); -} - -const QString KPsionConfig:: -getOptionName(int optIdx) { - cfgMap::Iterator it = optionNames.find(optIdx); - if (it == optionNames.end()) - return QString::null; - int slash = (*it).find('/'); - return (*it).mid(slash + 1); -} - -const QString KPsionConfig:: -getSectionName(int optIdx) { - cfgMap::Iterator it = optionNames.find(optIdx); - if (it == optionNames.end()) - return QString::null; - int slash = (*it).find('/'); - return (*it).left(slash); -} - -QStringList KPsionConfig:: -getConfigDevices() { - QStringList l; - - l += i18n("off"); - l += QString("/dev/ttyS0"); - l += QString("/dev/ttyS1"); - l += QString("/dev/ttyS2"); - l += QString("/dev/ttyS3"); - l += QString("/dev/ttyUSB0"); - l += QString("/dev/ttyUSB1"); - l += QString("/dev/ttyUSB2"); - l += QString("/dev/ttyUSB3"); - l += QString("/dev/ircomm0"); - l += QString("/dev/ircomm1"); - l += QString("/dev/ircomm2"); - l += QString("/dev/ircomm3"); - - return l; -} - -QStringList KPsionConfig:: -getConfigSpeeds() { - QStringList l; - - l += QString("9600"); - l += QString("19200"); - l += QString("38400"); - l += QString("57600"); - l += QString("115200"); - - return l; -} - -QStringList KPsionConfig:: -getConfigBackupInterval() { - QStringList l; - - l += i18n("none"); - l += i18n("daily"); - l += i18n("every 2 days"); - l += i18n("every 3 days"); - l += i18n("every 4 days"); - l += i18n("every 5 days"); - l += i18n("every 6 days"); - l += i18n("weekly"); - l += i18n("every 2 weeks"); - l += i18n("every 3 weeks"); - l += i18n("monthly"); - - return l; -} - -int KPsionConfig:: -getIntervalDays(KConfig *config, int optIdx) { - config->setGroup(getSectionName(optIdx)); - int i = config->readNumEntry(getOptionName(optIdx)); - switch (i) { - case 8: - return 14; - case 9: - return 21; - case 10: - return 28; - } - return i; -} - -/* - * Local variables: - * c-basic-offset: 4 - * End: - */ diff --git a/kde2/kpsion/kpsionconfig.h b/kde2/kpsion/kpsionconfig.h deleted file mode 100644 index f2906a0..0000000 --- a/kde2/kpsion/kpsionconfig.h +++ /dev/null @@ -1,89 +0,0 @@ -/*-*-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 _KPSIONCONFIG_H_ -#define _KPSIONCONFIG_H_ - -#include <kconfig.h> - -#include <qstringlist.h> -#include <qmap.h> - -typedef QMap<int,QString> cfgMap; - -class KPsionConfig { -public: - - enum cfgOptions { - OPT_BACKUPDIR = 0, - OPT_INCINTERVAL = 1, - OPT_FULLINTERVAL = 2, - OPT_CONNRETRY = 3, - OPT_SERIALDEV = 4, - OPT_SERIALSPEED = 5, - OPT_BACKUPGEN = 6, - OPT_UIDS = 7, - OPT_MACHNAME = 8, - OPT_BACKUPDRIVES = 9, - OPT_DRIVES = 10, - OPT_LASTFULL = 11, - OPT_LASTINC = 12, - OPT_NCPDPATH = 13, - OPT_SYNCTIME = 14, - }; - - enum cfgDefaults { - DEF_BACKUPDIR = 0, - DEF_INCINTERVAL = 1, - DEF_FULLINTERVAL = 2, - DEF_CONNRETRY = 3, - DEF_SERIALDEV = 4, - DEF_SERIALSPEED = 5, - DEF_BACKUPGEN = 6, - DEF_NCPDPATH = 7, - DEF_SYNCTIME = 8, - }; - - KPsionConfig(); - - QStringList getConfigDevices(); - QStringList getConfigSpeeds(); - QStringList getConfigBackupInterval(); - const QString getOptionName(int); - const QString getSectionName(int); - const QString getStrDefault(int); - int getIntDefault(int); - int getIntervalDays(KConfig *, int); - bool getBoolDefault(int); - -private: - cfgMap optionNames; - cfgMap defaults; - -}; -#endif - -/* - * Local variables: - * c-basic-offset: 4 - * End: - */ diff --git a/kde2/kpsion/kpsionrestoredialog.cpp b/kde2/kpsion/kpsionrestoredialog.cpp deleted file mode 100644 index 972dc17..0000000 --- a/kde2/kpsion/kpsionrestoredialog.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/*-*-c++-*- - * $Id$ - * - * This file is part of plptools. - * - * Copyright (C) 1999 Philip Proudman <philip.proudman@btinternet.com> - * Copyright (C) 2000, 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 - -#include "kpsionrestoredialog.h" - -#include <klocale.h> - -#include <qlayout.h> - -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); - fmtCheck = new QCheckBox(i18n("Format drive before restore"), w, "fmtCheck"); - gl->addWidget(fmtCheck, 1, 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); -} - -QStringList KPsionRestoreDialog:: -getFormatDrives() { - if (fmtCheck->isChecked()) - return backupView->getFormatDrives(); - return QStringList(); -} - -PlpDir &KPsionRestoreDialog:: -getRestoreList(QString tarname) { - return backupView->getRestoreList(tarname); -} - -/* - * Local variables: - * c-basic-offset: 4 - * End: - */ diff --git a/kde2/kpsion/kpsionrestoredialog.h b/kde2/kpsion/kpsionrestoredialog.h deleted file mode 100644 index e946f1c..0000000 --- a/kde2/kpsion/kpsionrestoredialog.h +++ /dev/null @@ -1,56 +0,0 @@ -/*-*-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 _KPSIONRESTOREDIALOG_H_ -#define _KPSIONRESTOREDIALOG_H_ - -#include "kpsionbackuplistview.h" - -#include <kdialogbase.h> - -#include <qstringlist.h> -#include <qcheckbox.h> - -#include <rfsv.h> - -typedef QMap<char,QString> driveMap; -typedef QMap<QString,QString> psionMap; - -class KPsionRestoreDialog : public KDialogBase { - Q_OBJECT - -public: - KPsionRestoreDialog(QWidget *parent, QString uid); - - PlpDir &getRestoreList(QString tarname); - QStringList getSelectedTars(); - QStringList getFormatDrives(); - bool autoSelect(QString drive); - -private slots: - void slotBackupsSelected(bool); - -private: - KPsionBackupListView *backupView; - QCheckBox *fmtCheck; -}; -#endif diff --git a/kde2/kpsion/kpsionui.rc b/kde2/kpsion/kpsionui.rc deleted file mode 100644 index 17302c5..0000000 --- a/kde2/kpsion/kpsionui.rc +++ /dev/null @@ -1,15 +0,0 @@ -<!DOCTYPE kpartgui> -<kpartgui name="kpsion"> - <MenuBar> - <Menu name="file"><text>&File</text> - <Action name="fullbackup"/> - <Action name="incbackup"/> - <Action name="restore"/> - <Action name="format"/> - </Menu> - </MenuBar> - <ToolBar fullWidth="true" name="mainToolBar"> - <Action name="fullbackup"/> - <Action name="restore"/> - </ToolBar> -</kpartgui> diff --git a/kde2/kpsion/lo16-action-psion_backup.png b/kde2/kpsion/lo16-action-psion_backup.png Binary files differdeleted file mode 100644 index 4d0f815..0000000 --- a/kde2/kpsion/lo16-action-psion_backup.png +++ /dev/null diff --git a/kde2/kpsion/lo16-action-psion_restore.png b/kde2/kpsion/lo16-action-psion_restore.png Binary files differdeleted file mode 100644 index 8f3103b..0000000 --- a/kde2/kpsion/lo16-action-psion_restore.png +++ /dev/null diff --git a/kde2/kpsion/lo16-app-kpsion.png b/kde2/kpsion/lo16-app-kpsion.png Binary files differdeleted file mode 100644 index 2382c76..0000000 --- a/kde2/kpsion/lo16-app-kpsion.png +++ /dev/null diff --git a/kde2/kpsion/lo22-action-psion_backup.png b/kde2/kpsion/lo22-action-psion_backup.png Binary files differdeleted file mode 100644 index b5ebd45..0000000 --- a/kde2/kpsion/lo22-action-psion_backup.png +++ /dev/null diff --git a/kde2/kpsion/lo22-action-psion_restore.png b/kde2/kpsion/lo22-action-psion_restore.png Binary files differdeleted file mode 100644 index 47780b8..0000000 --- a/kde2/kpsion/lo22-action-psion_restore.png +++ /dev/null diff --git a/kde2/kpsion/lo32-action-psion_backup.png b/kde2/kpsion/lo32-action-psion_backup.png Binary files differdeleted file mode 100644 index 4a99260..0000000 --- a/kde2/kpsion/lo32-action-psion_backup.png +++ /dev/null diff --git a/kde2/kpsion/lo32-action-psion_restore.png b/kde2/kpsion/lo32-action-psion_restore.png Binary files differdeleted file mode 100644 index 782e2d9..0000000 --- a/kde2/kpsion/lo32-action-psion_restore.png +++ /dev/null diff --git a/kde2/kpsion/lo32-app-kpsion.png b/kde2/kpsion/lo32-app-kpsion.png Binary files differdeleted file mode 100644 index 7285992..0000000 --- a/kde2/kpsion/lo32-app-kpsion.png +++ /dev/null diff --git a/kde2/kpsion/main.cpp b/kde2/kpsion/main.cpp deleted file mode 100644 index 06f5e25..0000000 --- a/kde2/kpsion/main.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/*-*-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 - -#include "kpsion.h" -#include "kpsionconfig.h" -#include "wizards.h" -#include <kapplication.h> -#include <klocale.h> -#include <kconfig.h> -#include <kcmdlineargs.h> -#include <kaboutdata.h> - -namespace LIBPLP { -extern "C" { -#include <plpintl.h> - void init_libplp_i18n() { - setlocale(LC_ALL, ""); - textdomain(PACKAGE); - } -}; -}; - - -static KCmdLineOptions options[] = { -// {"a", 0, 0}, - {"autobackup", I18N_NOOP("perform scheduled backup"), 0}, -// {"b <drv>", 0, 0}, - {"backup <drv>", I18N_NOOP("perform backup"), 0}, -// {"r <drv>", 0, 0}, - {"restore <drv>", I18N_NOOP("perform restore"), 0}, -// {"f <drv>", 0, 0}, - {"format <drv>", I18N_NOOP("format drive"), 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; - - // Install additional translations - LIBPLP::init_libplp_i18n(); - KGlobal::locale()->insertCatalogue(QString::fromLatin1("plptools")); - - KConfig *config = kapp->config(); - KPsionConfig pcfg; - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_BACKUPDIR)); - QString backupDir = config->readEntry( - pcfg.getOptionName(KPsionConfig::OPT_BACKUPDIR)); - - if (backupDir.isEmpty()) { - FirstTimeWizard *wiz = new FirstTimeWizard(0L, "firsttimewizard"); - wiz->exec(); - } - - KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - - int acnt = 0; - if (args->isSet("backup")) - acnt++; - if (args->isSet("restore")) - acnt++; - if (args->isSet("format")) - acnt++; - if (args->isSet("autobackup")) - acnt++; - - if (acnt > 1) - KCmdLineArgs::usage(i18n( - "The actions are mutually exclusive. " - "I.e. You cannot specify more than one action at once.")); - - KPsionMainWindow *w = new KPsionMainWindow(); - - if (w->shouldQuit()) - 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/setupdialog.cpp b/kde2/kpsion/setupdialog.cpp deleted file mode 100644 index 8225f84..0000000 --- a/kde2/kpsion/setupdialog.cpp +++ /dev/null @@ -1,615 +0,0 @@ -/*-*-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 - -#include "kpsionconfig.h" -#include "setupdialog.h" - -#include <kapplication.h> -#include <kconfig.h> -#include <kdesktopfile.h> -#include <kglobalsettings.h> -#include <klocale.h> -#include <kfiledialog.h> -#include <kmessagebox.h> -#include <kstandarddirs.h> - -#include <qlayout.h> -#include <qgroupbox.h> -#include <qwhatsthis.h> -#include <qheader.h> - -#include <errno.h> - -SetupDialog::SetupDialog(QWidget *parent, rfsv *plpRfsv, rpcs *plpRpcs) - : KDialogBase(Tabbed, i18n("Settings"), Ok|Apply|Default|Cancel, Ok, parent, - "settingsDialog", true, true) -{ - int i; - QString tmp; - QStringList sl; - QStringList::Iterator sli; - QLabel *l; - KPsionConfig pcfg; - - KConfig *config = kapp->config(); - - // Page 1 - page1 = addPage(i18n("&Backup")); - QBoxLayout *box = new QVBoxLayout(page1, KDialog::spacingHint()); - - QGroupBox *gb = new QGroupBox(i18n("Backup folder"), page1, "bdirBox"); - box->addWidget(gb); - - QGridLayout *grid = new QGridLayout(gb, 1, 1, marginHint() * 2, - spacingHint() * 2); - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_BACKUPDIR)); - tmp = config->readEntry(pcfg.getOptionName(KPsionConfig::OPT_BACKUPDIR)); - oldBDir = tmp; - bdirLabel = new QLabel(gb, "bdirLabel"); - bdirLabel->setText(tmp); - bdirButton = new QPushButton(i18n("Browse"), gb); - - QWhatsThis::add(bdirLabel, i18n( - "<QT>This is the name of the backup folder. " - "Click on <B>Browse</B>, for opening a dialog which lets you easily " - "select the backup folder. If the backup folder is changed and " - "it already contains backups, these are moved to the new " - "location.</QT>")); - QWhatsThis::add(bdirButton, i18n( - "<QT>Click here, for opening a dialog which lets you easily " - "select the backup folder. If the backup folder is changed and " - "it already contains backups, these are moved to the new " - "location.</QT>")); - grid->addWidget(bdirLabel, 0, 0); - grid->addWidget(bdirButton, 0, 1); - connect(bdirButton, SIGNAL(clicked()), SLOT(slotBdirBrowse())); - - grid->addRowSpacing(0, marginHint()); - grid->setColStretch(0, 1); - - gb = new QGroupBox(i18n("Backup strategy"), page1, "stratBox"); - box->addWidget(gb); - - grid = new QGridLayout(gb, 1, 1, marginHint() * 2, spacingHint() * 2); - l = new QLabel(i18n("&Incremental backup interval"), gb, - "iBackupIntLabel"); - grid->addWidget(l, 0, 0); - QWhatsThis::add(l, i18n( - "<QT>If you select an interval here, <B>KPsion</B> creates an entry " - "in your Autostart directory which performs an incremental backup of " - "selected drives. If your Psion is not connected at that time, " - "nothing will happen.</QT>")); - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_INCINTERVAL)); - i = config->readNumEntry(pcfg.getOptionName(KPsionConfig::OPT_INCINTERVAL)); - iIntCombo = new KComboBox(false, gb, "iIntCombo"); - iIntCombo->insertStringList(pcfg.getConfigBackupInterval()); - iIntCombo->setCurrentItem(i); - grid->addWidget(iIntCombo, 0, 1); - l->setBuddy(iIntCombo); - QWhatsThis::add(iIntCombo, i18n( - "<QT>If you select an interval here, <B>KPsion</B> creates an entry " - "in your Autostart directory which performs an incremental backup of " - "selected drives. If your Psion is not connected at that time, " - "nothing will happen.</QT>")); - - l = new QLabel(i18n("&Full backup interval"), gb, "fBackupIntLabel"); - grid->addWidget(l, 1, 0); - QWhatsThis::add(l, i18n( - "<QT>If you select an interval here, <B>KPsion</B> creates an entry " - "in your Autostart directory which performs a full backup of " - "selected drives. If your Psion is not connected at that time, " - "nothing will happen.</QT>")); - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_FULLINTERVAL)); - i = config->readNumEntry(pcfg.getOptionName(KPsionConfig::OPT_FULLINTERVAL)); - fIntCombo = new KComboBox(false, gb, "fIntCombo"); - fIntCombo->insertStringList(pcfg.getConfigBackupInterval()); - fIntCombo->setCurrentItem(i); - grid->addWidget(fIntCombo, 1, 1); - l->setBuddy(fIntCombo); - QWhatsThis::add(fIntCombo, i18n( - "<QT>If you select an interval here, <B>KPsion</B> creates an entry " - "in your Autostart directory which performs a full backup of " - "selected drives. If your Psion is not connected at that time, " - "nothing will happen.</QT>")); - - l = new QLabel(i18n("Backup &generations"), gb, "backupGenLabel"); - grid->addWidget(l, 2, 0); - QWhatsThis::add(l, i18n( - "<QT>Specify the number of backup generations you want to keep " - "on your machine. One backup generation means a full backup of " - "a drive plus eventually made incrmental backups of that drive. " - "This is checked every time, a full backup is done and if the " - "number of existing backups is exceeded, the oldest backup and " - "its corresponding incremental backups are deleted.</QT>")); - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_BACKUPGEN)); - i = config->readNumEntry(pcfg.getOptionName(KPsionConfig::OPT_BACKUPGEN)); - genSpin = new KIntSpinBox(0, 10, 1, i, 10, gb, "backupGenSpin"); - grid->addWidget(genSpin, 2, 1); - l->setBuddy(genSpin); - QWhatsThis::add(genSpin, i18n( - "<QT>Specify the number of backup generations you want to keep " - "on your machine. One backup generation means a full backup of " - "a drive plus eventually made incrmental backups of that drive. " - "This is checked every time, a full backup is done and if the " - "number of existing backups is exceeded, the oldest backup and " - "its corresponding incremental backups are deleted.</QT>")); - - grid->addRowSpacing(0, marginHint()); - grid->setColStretch(0, 1); - - // Page 3 - page2 = addPage(i18n("&Connection")); - grid = new QGridLayout(page2, 1, 1, marginHint() * 2, spacingHint() * 2); - - l = new QLabel(i18n("&Connection retry interval (sec.)"), page2, - "rconLabel"); - grid->addWidget(l, 0, 0); - QWhatsThis::add(l, i18n( - "<QT>If this is not 0, <B>KPsion</B> attempts to retry connection " - "setup.</QT>")); - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_CONNRETRY)); - i = config->readNumEntry(pcfg.getOptionName(KPsionConfig::OPT_CONNRETRY)); - rconSpin = new KIntSpinBox(0, 600, 1, i, 10, page2, "rconSpin"); - grid->addWidget(rconSpin, 0, 1); - l->setBuddy(rconSpin); - QWhatsThis::add(rconSpin, i18n( - "<QT>If this is not 0, <B>KPsion</B> attempts to retry connection " - "setup.</QT>")); - - l = new QLabel(i18n("Serial &device"), page2, "devLabel"); - grid->addWidget(l, 1, 0); - QWhatsThis::add(l, i18n( - "<QT>If a device is selected here and the connection can not " - "established at startup, <B>KPsion</B> will attempt to start " - "the ncpd daemon with appropriate parameters.</QT>")); - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_SERIALDEV)); - tmp = config->readEntry(pcfg.getOptionName(KPsionConfig::OPT_SERIALDEV)); - - devCombo = new KComboBox(false, page2, "devCombo"); - sl = pcfg.getConfigDevices(); - devCombo->insertStringList(sl); - if (tmp == "off") - devCombo->setCurrentItem(0); - else - for (i = 0, sli = sl.begin(); sli != sl.end(); ++i, ++sli) { - if (*sli == tmp) - devCombo->setCurrentItem(i); - } - grid->addWidget(devCombo, 1, 1); - l->setBuddy(devCombo); - QWhatsThis::add(devCombo, i18n( - "<QT>If a device is selected here and the connection can not " - "established at startup, <B>KPsion</B> will attempt to start " - "the ncpd daemon with appropriate parameters.</QT>")); - - l = new QLabel(i18n("Serial &speed"), page2, "speedLabel"); - grid->addWidget(l, 2, 0); - QWhatsThis::add(l, i18n( - "<QT>If a device is selected at <B>Serial device</B> and the " - "connection can not established at startup, <B>KPsion</B> will " - "attempt to start the ncpd daemon with appropriate parameters.</QT>")); - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_SERIALSPEED)); - tmp = config->readEntry(pcfg.getOptionName(KPsionConfig::OPT_SERIALSPEED)); - - speedCombo = new KComboBox(false, page2, "speedCombo"); - sl = pcfg.getConfigSpeeds(); - speedCombo->insertStringList(sl); - for (i = 0, sli = sl.begin(); sli != sl.end(); ++i, ++sli) { - if (*sli == tmp) - speedCombo->setCurrentItem(i); - } - grid->addWidget(speedCombo, 2, 1); - l->setBuddy(speedCombo); - QWhatsThis::add(speedCombo, i18n( - "<QT>If a device is selected at <B>Serial device</B> and the " - "connection can not established at startup, <B>KPsion</B> will " - "attempt to start the ncpd daemon with appropriate parameters.</QT>")); - - - grid->setColStretch(0, 1); - - // Page 4 - page3 = addPage(i18n("&Machines")); - grid = new QGridLayout(page3, 1, 1, marginHint() * 2, spacingHint() * 2); - - l = new QLabel(page3, "nameLabel"); - l->setText(i18n("Machine &UID")); - grid->addWidget(l, 0, 0); - QWhatsThis::add(l, i18n( - "<QT>This shows the known machines. Select an entry here and you " - "will be able to change its name and specify the drives that should " - "be selected for automatic backups. You also can delete a machine " - "which includes deleting all backups for it.</QT>")); - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_UIDS)); - sl = config->readListEntry(pcfg.getOptionName(KPsionConfig::OPT_UIDS)); - machCombo = new KComboBox(false, page3, "machCombo"); - machCombo->insertStringList(sl); - grid->addWidget(machCombo, 0, 1); - l->setBuddy(machCombo); - QWhatsThis::add(machCombo, i18n( - "<QT>This shows the known machines. Select an entry here and you " - "will be able to change its name and specify the drives that should " - "be selected for automatic backups. You also can delete a machine " - "which includes deleting all backups for it.</QT>")); - - l = new QLabel(page3, "nameLabel"); - l->setText(i18n("Machine &Name")); - grid->addWidget(l, 1, 0); - QWhatsThis::add(l, i18n( - "<QT>You can change the name of the machine here. The name " - "is not used internally but only provided for display purposes.</QT>")); - - nameEdit = new KLineEdit(page3, "nameEdit"); - grid->addWidget(nameEdit, 1, 1); - l->setBuddy(nameEdit); - QWhatsThis::add(nameEdit, i18n( - "<QT>You can change the name of the machine here. The name " - "is not used internally but only provided for display purposes.</QT>")); - - mdelButton = new QPushButton(i18n("Delete"), page3); - grid->addMultiCellWidget(mdelButton, 0, 1, 2, 2); - connect(mdelButton, SIGNAL(clicked()), SLOT(slotDeleteMachine())); - QWhatsThis::add(mdelButton, i18n( - "<QT>Click here to delete the selected machine from the list of " - "known machines. This includes deleting all backups of that " - "machine.</QT>")); - - backupListView = new KListView(page3, "bdriveListView"); - backupListView->addColumn(i18n("Automatic backup drives")); - - backupListView->header()->setClickEnabled(false); - backupListView->header()->setResizeEnabled(false); - backupListView->header()->setMovingEnabled(false); - int height = backupListView->header()->height(); - backupListView->setMinimumWidth(backupListView->columnWidth(0) + 4); - backupListView->setMinimumHeight(height + 10); - backupListView->setMaximumHeight(height + 10); - QWhatsThis::add(backupListView, i18n( - "<QT>Here, you can select the drives which shall be included in " - "atomatic backups.</QT>")); - - grid->addMultiCellWidget(backupListView, 2, 2, 0, 2); - connect(machCombo, SIGNAL(activated(int)), SLOT(slotMachineChanged(int))); - slotMachineChanged(0); - grid->setColStretch(0, 1); - grid->setRowStretch(2, 1); - - connect(this, SIGNAL(defaultClicked()), SLOT(slotDefaultClicked())); - connect(this, SIGNAL(okClicked()), SLOT(slotSaveSettings())); - connect(this, SIGNAL(applyClicked()), SLOT(slotSaveSettings())); -} - -void SetupDialog:: -slotMachineChanged(int idx) { - KPsionConfig pcfg; - KConfig *config = kapp->config(); - int height = 0; - QString mach = machCombo->currentText(); - - backupListView->clear(); - nameEdit->clear(); - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_MACHNAME)); - nameEdit->setText(config->readEntry( - pcfg.getOptionName(KPsionConfig::OPT_MACHNAME).arg(mach))); - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_DRIVES)); - QStringList drives = config->readListEntry( - pcfg.getOptionName(KPsionConfig::OPT_DRIVES).arg(mach)); - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_BACKUPDRIVES)); - QStringList bDrives = config->readListEntry( - pcfg.getOptionName(KPsionConfig::OPT_BACKUPDRIVES).arg(mach)); - - QStringList::Iterator it; - for (it = drives.begin(); it != drives.end(); it++) { - QCheckListItem *i = new QCheckListItem(backupListView, *it, - QCheckListItem::CheckBox); - height += i->height(); - if (bDrives.find(*it) != bDrives.end()) - i->setOn(true); - i->setSelectable(false); - } - if (idx == -1) - return; - height += backupListView->header()->height(); - backupListView->setMinimumWidth(backupListView->columnWidth(0) + 4); - backupListView->setMinimumHeight(height + 10); - backupListView->setMaximumHeight(height + 10); -} - -void SetupDialog:: -slotDeleteMachine() { - KPsionConfig pcfg; - KConfig *config = kapp->config(); - - QString mach = machCombo->currentText(); - - int res = KMessageBox::questionYesNo(this, i18n( - "<QT>Removing a machine also removes all backups of this machine.<BR/>" - "<B>This can not be reverted!</B><BR/>" - "Do you really want to remove the machine %1 (%2)?</QT>" - ).arg(mach).arg(nameEdit->text())); - if (res != KMessageBox::Yes) - return; - - QString bdir = bdirLabel->text() + "/" + mach; - QDir d(bdir); - if (d.exists()) { - d.setFilter(QDir::Files); - QStringList entries = d.entryList(); - QStringList::Iterator ei; - for (ei = entries.begin(); ei != entries.end(); ++ei) { - if (!d.remove(*ei)) { - KMessageBox::error(this, - i18n("Could not remove backup file %1.").arg(*ei)); - return; - } - } - d.rmdir(bdir); - } - - machCombo->removeItem(machCombo->currentItem()); - - QStringList sl = config->readListEntry( - pcfg.getOptionName(KPsionConfig::OPT_DRIVES).arg(mach)); - config->sync(); - - QString dcfgName = - KGlobal::dirs()->saveLocation("config", QString::null, false); - dcfgName += "kpsionrc"; - KSimpleConfig dcfg(dcfgName); - dcfg.setGroup(pcfg.getSectionName(KPsionConfig::OPT_MACHNAME)); - dcfg.deleteEntry(pcfg.getOptionName( - KPsionConfig::OPT_MACHNAME).arg(mach), false); - dcfg.setGroup(pcfg.getSectionName(KPsionConfig::OPT_DRIVES)); - dcfg.deleteEntry(pcfg.getOptionName( - KPsionConfig::OPT_DRIVES).arg(mach), false); - dcfg.setGroup(pcfg.getSectionName(KPsionConfig::OPT_BACKUPDRIVES)); - dcfg.deleteEntry(pcfg.getOptionName( - KPsionConfig::OPT_BACKUPDRIVES).arg(mach), false); - QStringList::Iterator it; - for (it = sl.begin(); it != sl.end(); it++) { - dcfg.setGroup(pcfg.getSectionName(KPsionConfig::OPT_LASTFULL)); - dcfg.deleteEntry(pcfg.getOptionName( - KPsionConfig::OPT_LASTFULL).arg(mach).arg(*it), false); - dcfg.setGroup(pcfg.getSectionName(KPsionConfig::OPT_LASTINC)); - dcfg.deleteEntry(pcfg.getOptionName( - KPsionConfig::OPT_LASTINC).arg(mach).arg(*it), false); - } - dcfg.sync(); - config->reparseConfiguration(); - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_UIDS)); - sl = config->readListEntry(pcfg.getOptionName(KPsionConfig::OPT_UIDS)); - sl.remove(mach); - config->writeEntry(pcfg.getOptionName(KPsionConfig::OPT_UIDS), sl); - - slotMachineChanged(-1); -} - -void SetupDialog:: -slotDefaultClicked() { - KPsionConfig pcfg; - - bdirLabel->setText(pcfg.getStrDefault(KPsionConfig::DEF_BACKUPDIR)); - iIntCombo->setCurrentItem(pcfg.getIntDefault(KPsionConfig::DEF_INCINTERVAL)); - fIntCombo->setCurrentItem(pcfg.getIntDefault(KPsionConfig::DEF_FULLINTERVAL)); - genSpin->setValue(pcfg.getIntDefault(KPsionConfig::DEF_BACKUPGEN)); - rconSpin->setValue(pcfg.getIntDefault(KPsionConfig::DEF_CONNRETRY)); - devCombo->setCurrentItem(pcfg.getIntDefault(KPsionConfig::DEF_SERIALDEV)); - speedCombo->setCurrentItem(pcfg.getIntDefault(KPsionConfig::DEF_SERIALSPEED)); -} - -void SetupDialog:: -slotBdirBrowse() { - QString dir = KFileDialog::getExistingDirectory(bdirLabel->text(), this, - i18n("Backup folder")); - checkBackupDir(dir); -} - -void SetupDialog:: -slotSaveSettings() { - KConfig *config = kapp->config(); - KPsionConfig pcfg; - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_BACKUPDIR)); - config->writeEntry(pcfg.getOptionName(KPsionConfig::OPT_BACKUPDIR), - bdirLabel->text()); - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_BACKUPGEN)); - config->writeEntry(pcfg.getOptionName(KPsionConfig::OPT_BACKUPGEN), - genSpin->value()); - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_INCINTERVAL)); - config->writeEntry(pcfg.getOptionName(KPsionConfig::OPT_INCINTERVAL), - iIntCombo->currentItem()); - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_FULLINTERVAL)); - config->writeEntry(pcfg.getOptionName(KPsionConfig::OPT_FULLINTERVAL), - fIntCombo->currentItem()); - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_CONNRETRY)); - config->writeEntry(pcfg.getOptionName(KPsionConfig::OPT_CONNRETRY), - rconSpin->value()); - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_SERIALDEV)); - if (devCombo->currentItem() == 0) - config->writeEntry(pcfg.getOptionName(KPsionConfig::OPT_SERIALDEV), - "off"); - else - config->writeEntry(pcfg.getOptionName(KPsionConfig::OPT_SERIALDEV), - devCombo->currentText()); - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_SERIALSPEED)); - config->writeEntry(pcfg.getOptionName(KPsionConfig::OPT_SERIALSPEED), - speedCombo->currentText()); - - QString asFile = KGlobalSettings::autostartPath() + "/PsionBackup.desktop"; - // Create or remove autostart entry - if (iIntCombo->currentItem() || fIntCombo->currentItem()) { - KDesktopFile f(asFile); - f.setGroup("Desktop Entry"); - f.writeEntry("Type", "Application"); - f.writeEntry("Exec", "kpsion --autobackup"); - f.writeEntry("Icon", "kpsion"); - f.writeEntry("Terminal", false); - f.writeEntry("Comment", "Scheduled backup of your Psion"); - } else - unlink(asFile.latin1()); -} - -bool SetupDialog:: -showPage(int index) { - switch (activePageIndex()) { - case 1: - QString dir(bdirLabel->text()); - if (!checkBackupDir(dir)) - return false; - } - return KDialogBase::showPage(index); -} - -void SetupDialog:: -closeEvent(QCloseEvent *e) { - reject(); -} - -bool SetupDialog:: -checkBackupDir(QString &dir) { - KConfig *config = kapp->config(); - KPsionConfig pcfg; - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_BACKUPDIR)); - QString tmp = - config->readEntry(pcfg.getOptionName(KPsionConfig::OPT_BACKUPDIR)); - - bool rmFlag = false; - - if (!bdirCreated.isEmpty()) { - if (bdirCreated != dir) { - rmFlag = true; - bdirCreated = ""; - } - } - if (!dir.isEmpty()) { - QDir d(dir); - if (!d.exists()) { - if (KMessageBox::questionYesNo(this, - i18n("<QT>The folder <B>%1</B> does <B>not</B> exist.<BR/>Should it be created?</QT>").arg(dir)) == KMessageBox::No) { - bdirLabel->setText(tmp); - return false; - } - if (mkdir(dir.data(), 0700) != 0) { - QString msg = i18n("<QT>The specified folder<BR/><B>%1</B><BR/>could <B>not</B> be created"); - switch (errno) { - case EACCES: - case EPERM: - case EROFS: - msg += i18n(", because you either don't have sufficient rights to do that, or the filesystem is readonly."); - // Insufficient permissions/ readonly FS - break; - case ENOSPC: - msg += i18n(", because the filesystem has not enough space."); - // No space - break; - case EEXIST: - // shouldn't happen, we checked already - // for existence. - msg += i18n(", because there already exists another object with the same name."); - break; - case EFAULT: - case ENOMEM: - case ENAMETOOLONG: - // shouldn't happen. - msg += "."; - break; - case ENOENT: - // propably dangling symlink - msg += i18n(", because you specified a path which probably contains a dangling symbolic link."); - break; - case ENOTDIR: - msg += i18n(", because you specified a path which contains an element which is not a folder."); - // path element not dir. - break; - case ELOOP: - msg += i18n(", because you specified a path which contains too many symbolic links."); - // Too many symlinks - break; - - - } - bdirLabel->setText(tmp); - msg += i18n("<BR/>Please select another folder.</QT>"); - KMessageBox::error(this, msg.arg(dir)); - return false; - } - bdirCreated = dir; - } - QDir od(oldBDir); - if ((!oldBDir.isEmpty()) && (oldBDir != dir) && (od.exists())) { - QStringList entries = od.entryList(); - QStringList::Iterator ui; - QStringList::Iterator ei; - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_UIDS)); - QStringList uids = config->readListEntry( - pcfg.getOptionName(KPsionConfig::OPT_UIDS)); - for (ei = entries.begin(); ei != entries.end(); ++ei) { - for (ui = uids.begin(); ui != uids.end(); ++ui) { - if ((*ei) == (*ui)) { - QString from = oldBDir; - QString to = dir; - - from += "/"; from += *ui; - to += "/"; to += *ui; - if (::rename(from.latin1(), to.latin1()) != 0) { - KMessageBox::error(this, - i18n("Could not move existing backup " - "for machine %1 to %2.").arg(*ui).arg(to)); - } - } - } - } - } - if (rmFlag) - ::rmdir(oldBDir.latin1()); - bdirLabel->setText(dir); - oldBDir = dir; - return true; - } - bdirLabel->setText(tmp); - return false; -} - -/* - * Local variables: - * c-basic-offset: 4 - * End: - */ diff --git a/kde2/kpsion/setupdialog.h b/kde2/kpsion/setupdialog.h deleted file mode 100644 index a7e4487..0000000 --- a/kde2/kpsion/setupdialog.h +++ /dev/null @@ -1,89 +0,0 @@ -/*-*-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 _SETUPDIALOGS_H_ -#define _SETUPDIALOGS_H_ - -#include <rfsv.h> -#include <rpcs.h> - -#include <kdialogbase.h> -#include <knuminput.h> -#include <kcombobox.h> -#include <klineedit.h> -#include <klistview.h> - -#include <qpushbutton.h> -#include <qcheckbox.h> -#include <qlabel.h> - -class SetupDialog : public KDialogBase { - Q_OBJECT - -public: - SetupDialog(QWidget *parent, rfsv *plpRfsv, rpcs *plpRpcs); - bool showPage(int index); - -protected: - virtual void closeEvent(QCloseEvent *e); - -private slots: - void slotDefaultClicked(); - void slotSaveSettings(); - void slotBdirBrowse(); - void slotDeleteMachine(); - void slotMachineChanged(int); - -private: - bool checkBackupDir(QString &dir); - - QFrame *page1; - QFrame *page2; - QFrame *page3; - QFrame *page4; - - QLabel *bdirLabel; - KIntSpinBox *genSpin; - KIntSpinBox *rconSpin; - QPushButton *bdirButton; - QPushButton *mdelButton; - QCheckBox *remCheck; - KComboBox *iIntCombo; - KComboBox *fIntCombo; - KComboBox *devCombo; - KComboBox *speedCombo; - KComboBox *machCombo; - KLineEdit *nameEdit; - KListView *backupListView; - - QString bdirDefault; - QString bdirCreated; - QString oldBDir; -}; - -#endif - -/* - * Local variables: - * c-basic-offset: 4 - * End: - */ diff --git a/kde2/kpsion/statusbarprogress.cpp b/kde2/kpsion/statusbarprogress.cpp deleted file mode 100644 index 7951b4f..0000000 --- a/kde2/kpsion/statusbarprogress.cpp +++ /dev/null @@ -1,439 +0,0 @@ -/*-*-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 <qstyle.h> - -#include <kapplication.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) { -#if (QT_VERSION < 300) - bool isWinStyle = (style().guiStyle() == WindowsStyle); -#else - bool isWinStyle = (style().styleHint(QStyle::SH_GUIStyle) == WindowsStyle); -#endif - if (isWinStyle) - setFrameStyle(QFrame::NoFrame); - else { - setFrameStyle(QFrame::Panel|QFrame::Sunken); - setLineWidth(1); - } - 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 deleted file mode 100644 index 9b1ae4d..0000000 --- a/kde2/kpsion/statusbarprogress.h +++ /dev/null @@ -1,169 +0,0 @@ -/*-*-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/kpsion/wizards.cpp b/kde2/kpsion/wizards.cpp deleted file mode 100644 index ea9bf46..0000000 --- a/kde2/kpsion/wizards.cpp +++ /dev/null @@ -1,598 +0,0 @@ -/*-*-c++-*- - * $Id$ - * - * This file is part of plptools. - * - * Copyright (C) 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 - -#include <cstdlib> -#include <errno.h> -#include <sys/types.h> -#include <unistd.h> -#include <pwd.h> - -#include "kpsionconfig.h" -#include "wizards.h" - -#include <kapplication.h> -#include <kdebug.h> -#include <kdialog.h> -#include <klocale.h> -#include <kfiledialog.h> -#include <kmessagebox.h> - -#include <qlayout.h> -#include <qwhatsthis.h> -#include <qheader.h> - -FirstTimeWizard::FirstTimeWizard(QWidget *parent, const char *name) - : KWizard(parent, name, true) -{ - QStringList sl; - KPsionConfig pcfg; - - setCaption(i18n("KPsion Configuration")); - QWhatsThis::add(nextButton(), - i18n("Click this button to continue with the next page.")); - QWhatsThis::add(backButton(), - i18n("Click this button, to go to a previous page.")); - QWhatsThis::add(cancelButton(), - i18n("<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>")); - - bdirDefault = pcfg.getStrDefault(KPsionConfig::DEF_BACKUPDIR); - bdirCreated = ""; - - // Page 1 - page1 = new QWidget(this, "welcome"); - QGridLayout *grid = new QGridLayout(page1); - - QLabel *l = new QLabel(page1, "welcome message"); - l->setText(i18n( - "<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 following pages, we will gather some information, " - "which is needed for working with <B>KPsion</B>.</BR>" - " </BR>" - "Have fun." - "</QT>" - )); - grid->addWidget(l, 1, 1, Qt::AlignTop); - grid->setColStretch(1, 1); - grid->setRowStretch(1, 1); - grid->addRowSpacing(0, KDialog::marginHint()); - grid->addRowSpacing(2, KDialog::marginHint()); - grid->addColSpacing(0, KDialog::marginHint()); - grid->addColSpacing(2, KDialog::marginHint()); - addPage(page1, i18n("<QT><BIG><B>Welcome<B></BIG></QT>")); - - // Page 2 - page2 = new QWidget(this, "step1"); - grid = new QGridLayout(page2); - - l = new QLabel(page2, "step1"); - l->setText(i18n( - "<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 somewhere in your home directory. " - "Please browse through existing folders and select a suitable " - "location or simply accept the default shown below." - "</QT>" - )); - grid->addMultiCellWidget(l, 1, 1, 1, 2, Qt::AlignTop); - - bdirLabel = new QLabel(page2, "bdirLabel"); - bdirLabel->setText(bdirDefault); - bdirButton = new QPushButton(i18n("Browse"), page2); - - QWhatsThis::add(bdirLabel, - i18n("This is the name of the backup folder.")); - QWhatsThis::add(bdirButton, - i18n("Click here, for opening a dialog which lets you easily select the backup folder.")); - grid->addWidget(bdirLabel, 3, 1); - grid->addWidget(bdirButton, 3, 2); - - grid->setRowStretch(1, 1); - grid->setColStretch(1, 1); - - grid->addRowSpacing(2, KDialog::spacingHint()); - - grid->addRowSpacing(0, KDialog::marginHint()); - grid->addRowSpacing(4, KDialog::marginHint()); - grid->addColSpacing(0, KDialog::marginHint()); - grid->addColSpacing(3, KDialog::marginHint()); - - connect(bdirButton, SIGNAL(clicked()), SLOT(slotBdirBrowse())); - addPage(page2, i18n("<QT><BIG><B>Step 1</B></BIG> - Specify backup directory</QT>")); - // Page 3 - page3 = new QWidget(this, "step2"); - grid = new QGridLayout(page3); - - l = new QLabel(page3, "step2"); - l->setText(i18n( - "<QT>" - "Next, please specify some information regarding " - "backup policy:<UL><LI>How many generations of backups " - "do you want to keep?</LI><LI>Should I perform automatic " - "backups?</LI><LI>If yes, how often do you want backups" - "to happen?</LI></UL>" - "</QT>" - )); - grid->addMultiCellWidget(l, 1, 1, 1, 2, Qt::AlignTop); - - l = new QLabel( - i18n("&Incremental backup interval"), page3, "iBackupIntLabel"); - grid->addWidget(l, 3, 1); - iIntCombo = new KComboBox(false, page3, "iIntCombo"); - iIntCombo->insertStringList(pcfg.getConfigBackupInterval()); - iIntCombo->setCurrentItem(pcfg.getIntDefault(KPsionConfig::DEF_INCINTERVAL)); - grid->addWidget(iIntCombo, 3, 2); - l->setBuddy(iIntCombo); - - l = new QLabel(i18n("&Full backup interval"), page3, "fBackupIntLabel"); - grid->addWidget(l, 5, 1); - fIntCombo = new KComboBox(false, page3, "fIntCombo"); - fIntCombo->insertStringList(pcfg.getConfigBackupInterval()); - fIntCombo->setCurrentItem(pcfg.getIntDefault(KPsionConfig::DEF_FULLINTERVAL)); - grid->addWidget(fIntCombo, 5, 2); - l->setBuddy(fIntCombo); - - l = new QLabel(i18n("Backup &generations"), page3, "backupGenLabel"); - grid->addWidget(l, 7, 1); - genSpin = new KIntSpinBox(0, 10, 1, - pcfg.getIntDefault(KPsionConfig::DEF_BACKUPGEN), - 10, page3, "backupGenSpin"); - grid->addWidget(genSpin, 7, 2); - l->setBuddy(genSpin); - - grid->setRowStretch(1, 1); - grid->setColStretch(1, 1); - - grid->addRowSpacing(2, KDialog::spacingHint()); - grid->addRowSpacing(4, KDialog::spacingHint()); - grid->addRowSpacing(6, KDialog::spacingHint()); - - grid->addRowSpacing(0, KDialog::marginHint()); - grid->addRowSpacing(8, KDialog::marginHint()); - grid->addColSpacing(0, KDialog::marginHint()); - grid->addColSpacing(3, KDialog::marginHint()); - - addPage(page3, i18n("<QT><BIG><B>Step 2</B></BIG> - Backup policy</QT>")); - - // Page 4 - page4 = new QWidget(this, "step3"); - grid = new QGridLayout(page4); - - l = new QLabel(page4, "step2"); - l->setText(i18n( - "<QT>" - "If no connection could be established on startup, " - "<B>KPsion</B> will attempt to connect in regular " - "intervals. Please specify the interval after which " - "a connection attempt should happen. If you don't want " - "automatic retry, set the interval to zero. Furthermore, " - "<B>KPsion</B> can try to start ncpd if it is not already " - "running. For that to work correctly, you need to" - "<UL><LI>specify the serial port to use.</LI>" - "<LI>specify the baud rate</LI>" - "<LI>have permission to use the specified port</LI></UL>" - "</QT>" - )); - grid->addMultiCellWidget(l, 1, 1, 1, 2, Qt::AlignTop); - - l = new QLabel( - i18n("&Connection retry interval (sec.)"), page4, "rconLabel"); - grid->addWidget(l, 3, 1); - rconSpin = new KIntSpinBox(0, 600, 1, - pcfg.getIntDefault(KPsionConfig::DEF_CONNRETRY), - 10, page4, "rconSpin"); - grid->addWidget(rconSpin, 3, 2); - l->setBuddy(rconSpin); - - l = new QLabel(i18n("Serial &device"), page4, "devLabel"); - grid->addWidget(l, 5, 1); - devCombo = new KComboBox(false, page4, "devCombo"); - sl = pcfg.getConfigDevices(); - devCombo->insertStringList(sl); - devCombo->setCurrentItem(pcfg.getIntDefault(KPsionConfig::DEF_SERIALDEV)); - grid->addWidget(devCombo, 5, 2); - l->setBuddy(devCombo); - - l = new QLabel(i18n("Serial &speed"), page4, "speedLabel"); - grid->addWidget(l, 7, 1); - speedCombo = new KComboBox(false, page4, "speedCombo"); - sl = pcfg.getConfigSpeeds(); - speedCombo->insertStringList(sl); - speedCombo->setCurrentItem(pcfg.getIntDefault(KPsionConfig::DEF_SERIALSPEED)); - grid->addWidget(speedCombo, 7, 2); - l->setBuddy(speedCombo); - - grid->setRowStretch(1, 1); - grid->setColStretch(1, 1); - - grid->addRowSpacing(2, KDialog::spacingHint()); - grid->addRowSpacing(4, KDialog::spacingHint()); - grid->addRowSpacing(6, KDialog::spacingHint()); - - grid->addRowSpacing(0, KDialog::marginHint()); - grid->addRowSpacing(8, KDialog::marginHint()); - grid->addColSpacing(0, KDialog::marginHint()); - grid->addColSpacing(3, KDialog::marginHint()); - - addPage(page4, - i18n("<QT><BIG><B>Step 3</B></BIG> - Connection parameters</QT>")); - - // Page 5 - page5 = new QWidget(this, "step3"); - grid = new QGridLayout(page5); - - l = new QLabel(page5, "step2"); - l->setText(i18n( - "<QT>" - "That's it!<BR/>" - "Now I will start <B>KPsion</B> and if your Psion is already " - "connected and its communication link turned on (use" - "<B>Ctrl-L</B> on the System screen), then <B>KPsion</B> will " - "bring up a dialog similar to this which lets you assign it a " - "name. After that, I suggest you perform a full backup.<BR/>" - "Please click <B>Finish</B> now.</QT>" - )); - grid->addWidget(l, 1, 1, Qt::AlignTop); - - grid->setRowStretch(1, 1); - grid->setColStretch(1, 1); - - grid->addRowSpacing(0, KDialog::marginHint()); - grid->addRowSpacing(2, KDialog::marginHint()); - grid->addColSpacing(0, KDialog::marginHint()); - grid->addColSpacing(2, KDialog::marginHint()); - - addPage(page5, i18n("<QT><BIG><B>Finished</B></BIG></QT>")); - - setFinishEnabled(page5, true); -} - -void FirstTimeWizard:: -slotBdirBrowse() { - QString dir = KFileDialog::getExistingDirectory(bdirLabel->text(), this, - i18n("Backup folder")); - checkBackupDir(dir); -} - -void FirstTimeWizard:: -reject() { - // kapp->quit() and [QK]Application::exit(0) don't work here?! - // probably because we didn't call kapp->exec() yet? - // -> brute force - if (KMessageBox::questionYesNo(this, - i18n("<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>")) == KMessageBox::Yes) { - if (!bdirCreated.isEmpty()) - ::rmdir(bdirCreated.data()); - ::exit(0); - } -} - -void FirstTimeWizard:: -accept() { - KConfig *config = kapp->config(); - KPsionConfig pcfg; - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_BACKUPDIR)); - config->writeEntry(pcfg.getOptionName(KPsionConfig::OPT_BACKUPDIR), - bdirLabel->text()); - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_BACKUPGEN)); - config->writeEntry(pcfg.getOptionName(KPsionConfig::OPT_BACKUPGEN), - genSpin->value()); - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_INCINTERVAL)); - config->writeEntry(pcfg.getOptionName(KPsionConfig::OPT_INCINTERVAL), - iIntCombo->currentItem()); - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_FULLINTERVAL)); - config->writeEntry(pcfg.getOptionName(KPsionConfig::OPT_FULLINTERVAL), - fIntCombo->currentItem()); - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_CONNRETRY)); - config->writeEntry(pcfg.getOptionName(KPsionConfig::OPT_CONNRETRY), - rconSpin->value()); - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_SERIALDEV)); - config->writeEntry(pcfg.getOptionName(KPsionConfig::OPT_SERIALDEV), - devCombo->currentText()); - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_SERIALSPEED)); - config->writeEntry(pcfg.getOptionName(KPsionConfig::OPT_SERIALSPEED), - speedCombo->currentText()); - - hide(); - setResult(Accepted); -} - -void FirstTimeWizard:: -next() { - for (int i = 0; i < pageCount(); i++) - if (currentPage() == page(i)) { - switch (i) { - case 1: - QString dir(bdirLabel->text()); - if (!checkBackupDir(dir)) - return; - } - break; - } - KWizard::next(); -} - -void FirstTimeWizard:: -closeEvent(QCloseEvent *e) { - reject(); -} - -bool FirstTimeWizard:: -checkBackupDir(QString &dir) { - if (!bdirCreated.isEmpty()) { - if (bdirCreated != dir) { - ::rmdir(bdirCreated.data()); - bdirCreated = ""; - } - } - if (!dir.isEmpty()) { - QDir d(dir); - if (!d.exists()) { - if (KMessageBox::questionYesNo(this, - i18n("<QT>The folder <B>%1</B> does <B>not</B> exist.<BR/>Shall it be created?</QT>").arg(dir)) == KMessageBox::No) { - bdirLabel->setText(bdirDefault); - return false; - } - if (mkdir(dir.data(), 0700) != 0) { - QString msg = i18n("<QT>The specified folder<BR/><B>%1</B><BR/>could <B>not</B> be created"); - switch (errno) { - case EACCES: - case EPERM: - case EROFS: - msg += i18n(", because you either don't have sufficient rights to do that, or the filesystem is readonly."); - // Insufficient permissions/ readonly FS - break; - case ENOSPC: - msg += i18n(", because the filesystem has not enough space."); - // No space - break; - case EEXIST: - // shouldn't happen, we checked already - // for existence. - msg += i18n(", because there already exists another object with the same name."); - break; - case EFAULT: - case ENOMEM: - case ENAMETOOLONG: - // shouldn't happen. - msg += "."; - break; - case ENOENT: - // propably dangling symlink - msg += i18n(", because you specified a path which probably contains a dangling symbolic link."); - break; - case ENOTDIR: - msg += i18n(", because you specified a path which contains an element which is not a folder."); - // path element not dir. - break; - case ELOOP: - msg += i18n(", because you specified a path which contains too many symbolic links."); - // Too many symlinks - break; - - - } - bdirLabel->setText(bdirDefault); - msg += i18n("<BR/>Please select another folder.</QT>"); - KMessageBox::error(this, msg.arg(dir)); - return false; - } - bdirCreated = dir; - } - bdirLabel->setText(dir); - return true; - } - bdirLabel->setText(bdirDefault); - return false; -} - -NewPsionWizard::NewPsionWizard(QWidget *parent, const char *name) - : KWizard(parent, name, true) { - - setCaption(i18n("New Psion detected")); - psion = (KPsionMainWindow *)parent; - - QWhatsThis::add(nextButton(), - i18n("Click this button to continue with the next page.")); - QWhatsThis::add(backButton(), - i18n("Click this button, to go to a previous page.")); - QWhatsThis::add(cancelButton(), - i18n("<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>")); - - // Page 1 - page1 = new QWidget(this, "newmachine"); - QGridLayout *grid = new QGridLayout(page1); - - QLabel *l = new QLabel(page1, "newmachmessage"); - uid = psion->getMachineUID(); - l->setText(i18n( - "<QT>" - "The Psion with the unique ID <B>%1</B> " - "is connected the first time. Please assign a name to it." - "</QT>").arg(uid)); - grid->addMultiCellWidget(l, 1, 1, 1, 2, Qt::AlignTop); - - l = new QLabel(page1, "nameLabel"); - l->setText(i18n("&Name of new Psion")); - nameEdit = new KLineEdit(page1, "nameEdit"); - nameEdit->setText(i18n("My new Psion")); - nameEdit->selectAll(); - nameEdit->setFocus(); - l->setBuddy(nameEdit); - grid->addWidget(l, 3, 1); - grid->addWidget(nameEdit, 3, 2); - - grid->setColStretch(1, 1); - grid->setRowStretch(1, 1); - - grid->addRowSpacing(2, KDialog::spacingHint()); - - grid->addRowSpacing(0, KDialog::marginHint()); - grid->addRowSpacing(4, KDialog::marginHint()); - grid->addColSpacing(0, KDialog::marginHint()); - grid->addColSpacing(2, KDialog::marginHint()); - - addPage(page1, i18n("<QT><BIG><B>New Psion detected<B></BIG></QT>")); - - // Page 2 - page2 = new QWidget(this, "bdrives"); - grid = new QGridLayout(page2); - - l = new QLabel(page2, "bdrivemessage"); - l->setText(i18n( - "<QT>" - "Please select the Drive(s), you want to be backed up when " - "running in unattended backup mode." - "</QT>" - )); - grid->addMultiCellWidget(l, 1, 1, 1, 3, Qt::AlignTop); - - backupListView = new KListView(page2, "bdriveListView"); - backupListView->addColumn(i18n("Available drives")); - driveMap dlist = psion->getDrives(); - driveMap::Iterator it; - int height = backupListView->header()->height(); - for (it = dlist.begin(); it != dlist.end(); it++) { - QCheckListItem *i = new QCheckListItem(backupListView, it.data(), - QCheckListItem::CheckBox); - height += i->height(); - i->setSelectable(false); - } - backupListView->setMaximumSize(backupListView->columnWidth(0) + 5, height + 5); - grid->addWidget(backupListView, 3, 2); - - grid->setColStretch(1, 1); - grid->setRowStretch(1, 1); - grid->setColStretch(3, 1); - - grid->addRowSpacing(2, KDialog::spacingHint()); - - grid->addRowSpacing(0, KDialog::marginHint()); - grid->addRowSpacing(4, KDialog::marginHint()); - grid->addColSpacing(0, KDialog::marginHint()); - grid->addColSpacing(4, KDialog::marginHint()); - - addPage(page2, i18n("<QT><BIG><B>Specify drives to backup<B></BIG></QT>")); - - setFinishEnabled(page2, true); -} - -void NewPsionWizard:: -next() { - for (int i = 0; i < pageCount(); i++) - if (currentPage() == page(i)) { - switch (i) { - case 0: - QString tmp(nameEdit->text()); - if (!checkPsionName(tmp)) - return; - } - break; - } - KWizard::next(); -} - -bool NewPsionWizard:: -checkPsionName(QString &name) { - if (name.isEmpty()) { - KMessageBox::sorry(this, i18n("The name cannot be empty.")); - return false; - } - psionMap l = psion->getMachines(); - psionMap::Iterator it; - for (it = l.begin(); it != l.end(); it++) { - if (name == it.data()) { - KMessageBox::sorry(this, i18n("<QT>The name <B>%1</B> is already assigned to another machine.<BR/>Please choose a different name.</QT>")); - return false; - } - } - return true; -} - -void NewPsionWizard:: -accept() { - KConfig *config = kapp->config(); - KPsionConfig pcfg; - - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_UIDS)); - QStringList machines = config->readListEntry( - pcfg.getOptionName(KPsionConfig::OPT_UIDS)); - machines += uid; - config->writeEntry(pcfg.getOptionName(KPsionConfig::OPT_UIDS), machines); - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_MACHNAME)); - QString tmp = pcfg.getOptionName(KPsionConfig::OPT_MACHNAME).arg(uid); - config->writeEntry(tmp, nameEdit->text()); - tmp = nameEdit->text(); - psion->setMachineName(tmp); - driveMap dlist = psion->getDrives(); - driveMap::Iterator di; - QStringList drives; - for (di = dlist.begin(); di != dlist.end(); di++) { - QString drv = ""; - drv += di.key(); - drives += drv; - } - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_DRIVES)); - config->writeEntry( - pcfg.getOptionName(KPsionConfig::OPT_DRIVES).arg(uid), drives); - - QListViewItemIterator li(backupListView); - QStringList bdrives; - for (; li.current(); li++) { - QCheckListItem *qcli = (QCheckListItem *)(li.current()); - if (qcli->isOn()) { - tmp = qcli->text(); - for (di = dlist.begin(); di != dlist.end(); di++) - if (di.data() == tmp) { - QString drv = ""; - drv += di.key(); - bdrives += drv; - } - } - } - config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_BACKUPDRIVES)); - config->writeEntry( - pcfg.getOptionName(KPsionConfig::OPT_BACKUPDRIVES).arg(uid), bdrives); - hide(); - setResult(Accepted); -} - -/* - * Local variables: - * c-basic-offset: 4 - * End: - */ diff --git a/kde2/kpsion/wizards.h b/kde2/kpsion/wizards.h deleted file mode 100644 index 6edd8d9..0000000 --- a/kde2/kpsion/wizards.h +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef _WIZARDS_H_ -#define _WIZARDS_H_ - -#include "kpsion.h" - -#include <kwizard.h> -#include <knuminput.h> -#include <kcombobox.h> -#include <klineedit.h> -#include <klistview.h> - -#include <qpushbutton.h> -#include <qcheckbox.h> -#include <qlabel.h> - -class FirstTimeWizard : public KWizard { - Q_OBJECT - public: - FirstTimeWizard(QWidget *parent = 0, const char *name = 0); - - protected: - virtual void closeEvent(QCloseEvent *e); - virtual void reject(); - virtual void accept(); - - protected slots: - virtual void next(); - - private slots: - void slotBdirBrowse(); - - private: - bool checkBackupDir(QString &); - - QWidget *page1; - QWidget *page2; - QWidget *page3; - QWidget *page4; - QWidget *page5; - QLabel *bdirLabel; - KIntSpinBox *genSpin; - KIntSpinBox *rconSpin; - QPushButton *bdirButton; - QCheckBox *remCheck; - KComboBox *iIntCombo; - KComboBox *fIntCombo; - KComboBox *devCombo; - KComboBox *speedCombo; - - QString bdirDefault; - QString bdirCreated; -}; - -class NewPsionWizard : public KWizard { - Q_OBJECT - - public: - NewPsionWizard(QWidget *parent = 0, const char *name = 0); - - protected: - virtual void accept(); - - protected slots: - virtual void next(); - - private: - bool checkPsionName(QString &); - - QWidget *page1; - QWidget *page2; - KPsionMainWindow *psion; - KLineEdit *nameEdit; - KListView *backupListView; - - QString uid; - QString machineName; -}; -#endif diff --git a/kde2/mime/.cvsignore b/kde2/mime/.cvsignore deleted file mode 100644 index 3dda729..0000000 --- a/kde2/mime/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile.in -Makefile diff --git a/kde2/mime/Makefile.am b/kde2/mime/Makefile.am deleted file mode 100644 index deb4518..0000000 --- a/kde2/mime/Makefile.am +++ /dev/null @@ -1,35 +0,0 @@ -# $Id$ -# - -SUBDIRS = icons - -EXTRA_DIST = $(wildcard *.desktop) - -maintainer-clean-local: - rm -f Makefile.in - -actionsdir = $(kde_datadir)/konqueror/servicemenus -actions_DATA = psion-drive-actions.desktop - -devmimedir = $(kde_mimedir)/inode -devmime_DATA = x-psion-drive.desktop - -appmimedir = $(kde_mimedir)/application -appmime_DATA = \ - x-psion-agenda.desktop \ - x-psion-backlite.desktop \ - x-psion-comms.desktop \ - x-psion-data.desktop \ - x-psion-encryptit.desktop \ - x-psion-opl.desktop \ - x-psion-opo.desktop \ - x-psion-record.desktop \ - x-psion-record2.desktop \ - x-psion-sheet.desktop \ - x-psion-sketch.desktop \ - x-psion-word.desktop \ - x-psion-owner.desktop \ - x-psion-machine.desktop \ - x-psion-setup.desktop \ - x-psion-backup.desktop \ - x-psion-restore.desktop diff --git a/kde2/mime/icons/.cvsignore b/kde2/mime/icons/.cvsignore deleted file mode 100644 index b65f789..0000000 --- a/kde2/mime/icons/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Makefile.in -Makefile -.xvpics diff --git a/kde2/mime/icons/Makefile.am b/kde2/mime/icons/Makefile.am deleted file mode 100644 index 1f5f243..0000000 --- a/kde2/mime/icons/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -# $Id$ -# - -maintainer-clean-local: - rm -f Makefile.in - -KDE_ICON = AUTO - -EXTRA_DIST = $(wildcard *.png) diff --git a/kde2/mime/icons/hi16-app-psion_desktop.png b/kde2/mime/icons/hi16-app-psion_desktop.png Binary files differdeleted file mode 100644 index 03e76d6..0000000 --- a/kde2/mime/icons/hi16-app-psion_desktop.png +++ /dev/null diff --git a/kde2/mime/icons/hi32-app-psion_backup.png b/kde2/mime/icons/hi32-app-psion_backup.png Binary files differdeleted file mode 100644 index 1e98401..0000000 --- a/kde2/mime/icons/hi32-app-psion_backup.png +++ /dev/null diff --git a/kde2/mime/icons/hi32-app-psion_desktop.png b/kde2/mime/icons/hi32-app-psion_desktop.png Binary files differdeleted file mode 100644 index b3e1db4..0000000 --- a/kde2/mime/icons/hi32-app-psion_desktop.png +++ /dev/null diff --git a/kde2/mime/icons/hi32-app-psion_owner.png b/kde2/mime/icons/hi32-app-psion_owner.png Binary files differdeleted file mode 100644 index 00e44c6..0000000 --- a/kde2/mime/icons/hi32-app-psion_owner.png +++ /dev/null diff --git a/kde2/mime/icons/hi32-app-psion_restore.png b/kde2/mime/icons/hi32-app-psion_restore.png Binary files differdeleted file mode 100644 index 2b0f5ee..0000000 --- a/kde2/mime/icons/hi32-app-psion_restore.png +++ /dev/null diff --git a/kde2/mime/icons/hi32-app-psion_setup.png b/kde2/mime/icons/hi32-app-psion_setup.png Binary files differdeleted file mode 100644 index 28203be..0000000 --- a/kde2/mime/icons/hi32-app-psion_setup.png +++ /dev/null diff --git a/kde2/mime/icons/hi32-device-psion_drive.png b/kde2/mime/icons/hi32-device-psion_drive.png Binary files differdeleted file mode 100644 index 8bbab5e..0000000 --- a/kde2/mime/icons/hi32-device-psion_drive.png +++ /dev/null diff --git a/kde2/mime/icons/hi32-mime-x_psion_agenda.png b/kde2/mime/icons/hi32-mime-x_psion_agenda.png Binary files differdeleted file mode 100644 index 6eed655..0000000 --- a/kde2/mime/icons/hi32-mime-x_psion_agenda.png +++ /dev/null diff --git a/kde2/mime/icons/hi32-mime-x_psion_backup.png b/kde2/mime/icons/hi32-mime-x_psion_backup.png Binary files differdeleted file mode 100644 index 13c0e5c..0000000 --- a/kde2/mime/icons/hi32-mime-x_psion_backup.png +++ /dev/null diff --git a/kde2/mime/icons/hi32-mime-x_psion_data.png b/kde2/mime/icons/hi32-mime-x_psion_data.png Binary files differdeleted file mode 100644 index 4f19555..0000000 --- a/kde2/mime/icons/hi32-mime-x_psion_data.png +++ /dev/null diff --git a/kde2/mime/icons/hi32-mime-x_psion_encryptit.png b/kde2/mime/icons/hi32-mime-x_psion_encryptit.png Binary files differdeleted file mode 100644 index d4ca041..0000000 --- a/kde2/mime/icons/hi32-mime-x_psion_encryptit.png +++ /dev/null diff --git a/kde2/mime/icons/hi32-mime-x_psion_opl.png b/kde2/mime/icons/hi32-mime-x_psion_opl.png Binary files differdeleted file mode 100644 index 078cad6..0000000 --- a/kde2/mime/icons/hi32-mime-x_psion_opl.png +++ /dev/null diff --git a/kde2/mime/icons/hi32-mime-x_psion_opo.png b/kde2/mime/icons/hi32-mime-x_psion_opo.png Binary files differdeleted file mode 100644 index 4850d33..0000000 --- a/kde2/mime/icons/hi32-mime-x_psion_opo.png +++ /dev/null diff --git a/kde2/mime/icons/hi32-mime-x_psion_opx.png b/kde2/mime/icons/hi32-mime-x_psion_opx.png Binary files differdeleted file mode 100644 index 4741851..0000000 --- a/kde2/mime/icons/hi32-mime-x_psion_opx.png +++ /dev/null diff --git a/kde2/mime/icons/hi32-mime-x_psion_recorder.png b/kde2/mime/icons/hi32-mime-x_psion_recorder.png Binary files differdeleted file mode 100644 index 174068c..0000000 --- a/kde2/mime/icons/hi32-mime-x_psion_recorder.png +++ /dev/null diff --git a/kde2/mime/icons/hi32-mime-x_psion_sheet.png b/kde2/mime/icons/hi32-mime-x_psion_sheet.png Binary files differdeleted file mode 100644 index 63626f7..0000000 --- a/kde2/mime/icons/hi32-mime-x_psion_sheet.png +++ /dev/null diff --git a/kde2/mime/icons/hi32-mime-x_psion_sis.png b/kde2/mime/icons/hi32-mime-x_psion_sis.png Binary files differdeleted file mode 100644 index 649f258..0000000 --- a/kde2/mime/icons/hi32-mime-x_psion_sis.png +++ /dev/null diff --git a/kde2/mime/icons/hi32-mime-x_psion_unknown.png b/kde2/mime/icons/hi32-mime-x_psion_unknown.png Binary files differdeleted file mode 100644 index 7b77048..0000000 --- a/kde2/mime/icons/hi32-mime-x_psion_unknown.png +++ /dev/null diff --git a/kde2/mime/icons/hi32-mime-x_psion_word.png b/kde2/mime/icons/hi32-mime-x_psion_word.png Binary files differdeleted file mode 100644 index 808c17d..0000000 --- a/kde2/mime/icons/hi32-mime-x_psion_word.png +++ /dev/null diff --git a/kde2/mime/icons/lo16-app-psion_desktop.png b/kde2/mime/icons/lo16-app-psion_desktop.png Binary files differdeleted file mode 100644 index 03e76d6..0000000 --- a/kde2/mime/icons/lo16-app-psion_desktop.png +++ /dev/null diff --git a/kde2/mime/icons/lo32-app-psion_backup.png b/kde2/mime/icons/lo32-app-psion_backup.png Binary files differdeleted file mode 100644 index 1e98401..0000000 --- a/kde2/mime/icons/lo32-app-psion_backup.png +++ /dev/null diff --git a/kde2/mime/icons/lo32-app-psion_desktop.png b/kde2/mime/icons/lo32-app-psion_desktop.png Binary files differdeleted file mode 100644 index b3e1db4..0000000 --- a/kde2/mime/icons/lo32-app-psion_desktop.png +++ /dev/null diff --git a/kde2/mime/icons/lo32-app-psion_owner.png b/kde2/mime/icons/lo32-app-psion_owner.png Binary files differdeleted file mode 100644 index 00e44c6..0000000 --- a/kde2/mime/icons/lo32-app-psion_owner.png +++ /dev/null diff --git a/kde2/mime/icons/lo32-app-psion_restore.png b/kde2/mime/icons/lo32-app-psion_restore.png Binary files differdeleted file mode 100644 index 2b0f5ee..0000000 --- a/kde2/mime/icons/lo32-app-psion_restore.png +++ /dev/null diff --git a/kde2/mime/icons/lo32-app-psion_setup.png b/kde2/mime/icons/lo32-app-psion_setup.png Binary files differdeleted file mode 100644 index 28203be..0000000 --- a/kde2/mime/icons/lo32-app-psion_setup.png +++ /dev/null diff --git a/kde2/mime/icons/lo32-device-psion_drive.png b/kde2/mime/icons/lo32-device-psion_drive.png Binary files differdeleted file mode 100644 index 8bbab5e..0000000 --- a/kde2/mime/icons/lo32-device-psion_drive.png +++ /dev/null diff --git a/kde2/mime/icons/lo32-mime-x_psion_agenda.png b/kde2/mime/icons/lo32-mime-x_psion_agenda.png Binary files differdeleted file mode 100644 index 6eed655..0000000 --- a/kde2/mime/icons/lo32-mime-x_psion_agenda.png +++ /dev/null diff --git a/kde2/mime/icons/lo32-mime-x_psion_backup.png b/kde2/mime/icons/lo32-mime-x_psion_backup.png Binary files differdeleted file mode 100644 index 13c0e5c..0000000 --- a/kde2/mime/icons/lo32-mime-x_psion_backup.png +++ /dev/null diff --git a/kde2/mime/icons/lo32-mime-x_psion_data.png b/kde2/mime/icons/lo32-mime-x_psion_data.png Binary files differdeleted file mode 100644 index 4f19555..0000000 --- a/kde2/mime/icons/lo32-mime-x_psion_data.png +++ /dev/null diff --git a/kde2/mime/icons/lo32-mime-x_psion_encryptit.png b/kde2/mime/icons/lo32-mime-x_psion_encryptit.png Binary files differdeleted file mode 100644 index d4ca041..0000000 --- a/kde2/mime/icons/lo32-mime-x_psion_encryptit.png +++ /dev/null diff --git a/kde2/mime/icons/lo32-mime-x_psion_opl.png b/kde2/mime/icons/lo32-mime-x_psion_opl.png Binary files differdeleted file mode 100644 index 078cad6..0000000 --- a/kde2/mime/icons/lo32-mime-x_psion_opl.png +++ /dev/null diff --git a/kde2/mime/icons/lo32-mime-x_psion_opo.png b/kde2/mime/icons/lo32-mime-x_psion_opo.png Binary files differdeleted file mode 100644 index 4850d33..0000000 --- a/kde2/mime/icons/lo32-mime-x_psion_opo.png +++ /dev/null diff --git a/kde2/mime/icons/lo32-mime-x_psion_opx.png b/kde2/mime/icons/lo32-mime-x_psion_opx.png Binary files differdeleted file mode 100644 index 4741851..0000000 --- a/kde2/mime/icons/lo32-mime-x_psion_opx.png +++ /dev/null diff --git a/kde2/mime/icons/lo32-mime-x_psion_recorder.png b/kde2/mime/icons/lo32-mime-x_psion_recorder.png Binary files differdeleted file mode 100644 index 174068c..0000000 --- a/kde2/mime/icons/lo32-mime-x_psion_recorder.png +++ /dev/null diff --git a/kde2/mime/icons/lo32-mime-x_psion_sheet.png b/kde2/mime/icons/lo32-mime-x_psion_sheet.png Binary files differdeleted file mode 100644 index 63626f7..0000000 --- a/kde2/mime/icons/lo32-mime-x_psion_sheet.png +++ /dev/null diff --git a/kde2/mime/icons/lo32-mime-x_psion_sis.png b/kde2/mime/icons/lo32-mime-x_psion_sis.png Binary files differdeleted file mode 100644 index 649f258..0000000 --- a/kde2/mime/icons/lo32-mime-x_psion_sis.png +++ /dev/null diff --git a/kde2/mime/icons/lo32-mime-x_psion_unknown.png b/kde2/mime/icons/lo32-mime-x_psion_unknown.png Binary files differdeleted file mode 100644 index 7b77048..0000000 --- a/kde2/mime/icons/lo32-mime-x_psion_unknown.png +++ /dev/null diff --git a/kde2/mime/icons/lo32-mime-x_psion_word.png b/kde2/mime/icons/lo32-mime-x_psion_word.png Binary files differdeleted file mode 100644 index 808c17d..0000000 --- a/kde2/mime/icons/lo32-mime-x_psion_word.png +++ /dev/null diff --git a/kde2/mime/psion-drive-actions.desktop b/kde2/mime/psion-drive-actions.desktop deleted file mode 100644 index fab8764..0000000 --- a/kde2/mime/psion-drive-actions.desktop +++ /dev/null @@ -1,16 +0,0 @@ -[Desktop Entry] -ServiceTypes=inode/x-psion-drive -Actions=Backup;Restore;Format -Patterns= -[Desktop Action Backup] -Exec=kpsion --backup %u -Name=backup this drive -Name[de]=Laufwerk sichern -[Desktop Action Format] -Exec=kpsion --format %u -Name=format this drive -Name[de]=Laufwerk formatieren -[Desktop Action Restore] -Exec=kpsion --restore %u -Name=restore this drive -Name[de]=Laufwerk rücksichern diff --git a/kde2/mime/x-psion-agenda.desktop b/kde2/mime/x-psion-agenda.desktop deleted file mode 100644 index b36f9bc..0000000 --- a/kde2/mime/x-psion-agenda.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Comment=Psion Agenda -Hidden=false -Icon=x_psion_agenda -MimeType=application/x-psion-agenda -Patterns= -Type=MimeType diff --git a/kde2/mime/x-psion-backlite.desktop b/kde2/mime/x-psion-backlite.desktop deleted file mode 100644 index 15620b1..0000000 --- a/kde2/mime/x-psion-backlite.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Comment=Psion Backlite -Hidden=false -Icon=unknown -MimeType=application/x-psion-backlite -Patterns= -Type=MimeType diff --git a/kde2/mime/x-psion-backup.desktop b/kde2/mime/x-psion-backup.desktop deleted file mode 100644 index 7d46250..0000000 --- a/kde2/mime/x-psion-backup.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Comment=Psion Backup -Hidden=false -Icon=psion_backup -MimeType=application/x-psion-backup -Patterns= -Type=MimeType diff --git a/kde2/mime/x-psion-comms.desktop b/kde2/mime/x-psion-comms.desktop deleted file mode 100644 index 9c1d5e9..0000000 --- a/kde2/mime/x-psion-comms.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Comment=Psion Comms -Hidden=false -Icon=unknown -MimeType=application/x-psion-comms -Patterns= -Type=MimeType diff --git a/kde2/mime/x-psion-data.desktop b/kde2/mime/x-psion-data.desktop deleted file mode 100644 index 364ad8e..0000000 --- a/kde2/mime/x-psion-data.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Comment=Psion Data -Hidden=false -Icon=x_psion_data -MimeType=application/x-psion-data -Patterns= -Type=MimeType diff --git a/kde2/mime/x-psion-drive.desktop b/kde2/mime/x-psion-drive.desktop deleted file mode 100644 index 845f439..0000000 --- a/kde2/mime/x-psion-drive.desktop +++ /dev/null @@ -1,6 +0,0 @@ -[Desktop Entry] -Comment=Psion Drive -Comment[de]=Psion Laufwerk -Icon=psion_drive -Type=MimeType -MimeType=inode/x-psion-drive diff --git a/kde2/mime/x-psion-encryptit.desktop b/kde2/mime/x-psion-encryptit.desktop deleted file mode 100644 index d0aecbc..0000000 --- a/kde2/mime/x-psion-encryptit.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Comment=Psion EncryptIt! -Hidden=false -Icon=x_psion_encryptit -MimeType=application/x-psion-encryptit -Patterns= -Type=MimeType diff --git a/kde2/mime/x-psion-machine.desktop b/kde2/mime/x-psion-machine.desktop deleted file mode 100644 index cc0310f..0000000 --- a/kde2/mime/x-psion-machine.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Comment=Psion Machine -Hidden=false -Icon=psion_desktop -MimeType=application/x-psion-machine -Patterns= -Type=MimeType diff --git a/kde2/mime/x-psion-opl.desktop b/kde2/mime/x-psion-opl.desktop deleted file mode 100644 index 23cbb7d..0000000 --- a/kde2/mime/x-psion-opl.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Comment=Psion OPL Source -Hidden=false -Icon=x_psion_opl -MimeType=application/x-psion-opl -Patterns= -Type=MimeType diff --git a/kde2/mime/x-psion-opo.desktop b/kde2/mime/x-psion-opo.desktop deleted file mode 100644 index f940168..0000000 --- a/kde2/mime/x-psion-opo.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Comment=Psion OPL Object -Hidden=false -Icon=x_psion_opo -MimeType=application/x-psion-opo -Patterns= -Type=MimeType diff --git a/kde2/mime/x-psion-owner.desktop b/kde2/mime/x-psion-owner.desktop deleted file mode 100644 index 9d1fe06..0000000 --- a/kde2/mime/x-psion-owner.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Comment=Psion Owner -Hidden=false -Icon=psion_owner -MimeType=application/x-psion-owner -Patterns= -Type=MimeType diff --git a/kde2/mime/x-psion-record.desktop b/kde2/mime/x-psion-record.desktop deleted file mode 100644 index f3819a5..0000000 --- a/kde2/mime/x-psion-record.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Comment=Psion Recorder -Hidden=false -Icon=x_psion_recorder -MimeType=application/x-psion-record -Patterns= -Type=MimeType diff --git a/kde2/mime/x-psion-record2.desktop b/kde2/mime/x-psion-record2.desktop deleted file mode 100644 index f3896fb..0000000 --- a/kde2/mime/x-psion-record2.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Comment=Psion Recorder -Hidden=false -Icon=x_psion_recorder -MimeType=application/x-psion-record2 -Patterns= -Type=MimeType diff --git a/kde2/mime/x-psion-restore.desktop b/kde2/mime/x-psion-restore.desktop deleted file mode 100644 index c79c5dc..0000000 --- a/kde2/mime/x-psion-restore.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Comment=Psion Restore -Hidden=false -Icon=psion_restore -MimeType=application/x-psion-restore -Patterns= -Type=MimeType diff --git a/kde2/mime/x-psion-setup.desktop b/kde2/mime/x-psion-setup.desktop deleted file mode 100644 index 20d0f7c..0000000 --- a/kde2/mime/x-psion-setup.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Comment=Psion Settings -Hidden=false -Icon=psion_setup -MimeType=application/x-psion-setup -Patterns= -Type=MimeType diff --git a/kde2/mime/x-psion-sheet.desktop b/kde2/mime/x-psion-sheet.desktop deleted file mode 100644 index 06189b8..0000000 --- a/kde2/mime/x-psion-sheet.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Comment=Psion Sheet -Hidden=false -Icon=x_psion_sheet -MimeType=application/x-psion-sheet -Patterns= -Type=MimeType diff --git a/kde2/mime/x-psion-sketch.desktop b/kde2/mime/x-psion-sketch.desktop deleted file mode 100644 index bc1de18..0000000 --- a/kde2/mime/x-psion-sketch.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Comment=Psion Sketch -Hidden=false -Icon=unknown -MimeType=application/x-psion-sketch -Patterns= -Type=MimeType diff --git a/kde2/mime/x-psion-word.desktop b/kde2/mime/x-psion-word.desktop deleted file mode 100644 index ad66316..0000000 --- a/kde2/mime/x-psion-word.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Comment=Psion Word -Hidden=false -Icon=x_psion_word -MimeType=application/x-psion-word -Patterns= -Type=MimeType diff --git a/kde2/plugins/.cvsignore b/kde2/plugins/.cvsignore deleted file mode 100644 index 3b52935..0000000 --- a/kde2/plugins/.cvsignore +++ /dev/null @@ -1,9 +0,0 @@ -*.closure -*.moc -*.lo -*.la -*_meta_unload.* -.deps -.libs -Makefile.in -Makefile diff --git a/kde2/plugins/Makefile.am b/kde2/plugins/Makefile.am deleted file mode 100644 index ab12d54..0000000 --- a/kde2/plugins/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ - -INCLUDES = $(all_includes) -I$(top_srcdir)/lib - -kdemoduledir = $(kde_moduledir) -kdemodule_LTLIBRARIES = libplpprops.la - -METASOURCES = AUTO - -libplpprops_la_SOURCES = plpprops.cc plppropsFactory.cc pie3dpiece.cpp \ - pie3dwidget.cpp -libplpprops_la_LIBADD = $(LIB_PLP) $(LIB_KIO) $(LIB_KFILE) -libplpprops_la_LDFLAGS = $(PLP_LDFLAGS) $(KDE_LDFLAGS) $(LIBDEBUG) $(KDE_PLUGIN) - -noinst_HEADERS = plpprops.h plppropsFactory.h pie3dpiece.h pie3dwidget.h - -services_DATA = plpprops.desktop -servicesdir = $(kde_servicesdir) -EXTRA_DIST = $(services_DATA) - -messages: - $(XGETTEXT) -C -ki18n -kI18N_NOOP -ktranslate -kaliasLocale *.cc *.cpp *.h && mv messages.po ../po/libplpprops.pot -# -# remove all intermediate files that can be recreated using -# Makefile.cvs -# -maintainer-clean-local: - rm -f Makefile.in *.closure diff --git a/kde2/plugins/pie3dpiece.cpp b/kde2/plugins/pie3dpiece.cpp deleted file mode 100644 index 19c98b9..0000000 --- a/kde2/plugins/pie3dpiece.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/* - * This file is part of the KDE System Control Tool, - * Copyright (C)1999 Thorsten Westheider <twesthei@physik.uni-bielefeld.de> - * - * 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 "pie3dpiece.h" - - -Pie3DPiece::Pie3DPiece(int size, const QColor& color) : _size(size), - _color(color) -{ - -} - - diff --git a/kde2/plugins/pie3dpiece.h b/kde2/plugins/pie3dpiece.h deleted file mode 100644 index b64fe2a..0000000 --- a/kde2/plugins/pie3dpiece.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * This file is part of the KDE System Control Tool, - * Copyright (C)1999 Thorsten Westheider <twesthei@physik.uni-bielefeld.de> - * - * 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 __PIE3DPIECE_H -#define __PIE3DPIECE_H - -#include <qcolor.h> - - -class Pie3DPiece -{ - public: - - Pie3DPiece(int size, const QColor&); - Pie3DPiece() {} - - int size() const { return _size; } - const QColor& color() const { return _color; } - - private: - - int _size; - QColor _color; -}; - - -#endif - diff --git a/kde2/plugins/pie3dwidget.cpp b/kde2/plugins/pie3dwidget.cpp deleted file mode 100644 index a3553fc..0000000 --- a/kde2/plugins/pie3dwidget.cpp +++ /dev/null @@ -1,120 +0,0 @@ -/* - * This file is part of the KDE System Control Tool, - * Copyright (C)1999 Thorsten Westheider <twesthei@physik.uni-bielefeld.de> - * - * 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. - * - * Pie3DWidget was inspired by Christian Poulter's KDiskFree - * - ****************************************************************************/ - -#include <qpainter.h> - -#include "pie3dwidget.h" - - -Pie3DWidget::Pie3DWidget(QWidget *parent, const char *name) : QWidget(parent, name), - _totalsize(0) -{ - _piecelist.setAutoDelete(true); - _piecelist.clear(); -} - - -void Pie3DWidget::addPiece(int size, const QColor& color) -{ - _totalsize += size; - - _piecelist.append(new Pie3DPiece(size, color)); - - repaint(); -} - - -int Pie3DWidget::heightForWidth(int w) const -{ - return (int) (w*0.6); -} - - -QSize Pie3DWidget::minimumSizeHint() const -{ - return QSize(60, 40); -} - - -QSize Pie3DWidget::sizeHint() const -{ - return QSize(width(), (int)(width()*0.6)); -} - - -/* - * Protected methods - ********************/ - -void Pie3DWidget::paintEvent(QPaintEvent *ev) -{ - QPainter p; - QColor widgetbg = palette().normal().background(); - QColor black = QColor(black); - int w = width(); - int h = height(); - int pieh = h/4; - int halfrot = 180*16; - int fullrot = 360*16; - int bowpos = 0; - int i, bowlen, bowcut; - - if (_piecelist.isEmpty()) return; - - p.begin(this); - p.setClipRegion(ev->region()); - - for (Pie3DPiece *piece = _piecelist.first(); piece; piece = _piecelist.next()) - { - QPalette piecepal(piece->color(), widgetbg); - - bowlen = (int) (((double) piece->size())/_totalsize*fullrot); - - p.setPen((_piecelist.count() > 1) ? black : _piecelist.first()->color()); - p.setBrush(piecepal.normal().button()); - p.drawPie(0, 0, w, h-pieh, bowpos, bowlen); - - if (bowpos+bowlen >= halfrot) // Part of the footer is visible - { - bowcut = (bowpos < halfrot) ? halfrot-bowpos : 0; - bowpos += bowcut; - bowlen -= bowcut; - - p.setPen(piecepal.normal().mid()); - - for (i = 0; i < pieh; i++) p.drawArc(0, i, w, h-pieh, bowpos, bowlen); - } - - bowpos += bowlen; - } - - p.setPen(black); - - p.drawArc(0, 0, w, h-pieh, 0, fullrot); - p.drawArc(0, pieh-1, w, h-pieh, 0, -halfrot); - - p.drawLine(0, (h-pieh)/2, 0, (h+pieh)/2-1); - p.drawLine(w-1, (h-pieh)/2, w-1, (h+pieh)/2-1); - - p.end(); -} - diff --git a/kde2/plugins/pie3dwidget.h b/kde2/plugins/pie3dwidget.h deleted file mode 100644 index d269989..0000000 --- a/kde2/plugins/pie3dwidget.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * This file is part of the KDE System Control Tool, - * Copyright (C)1999 Thorsten Westheider <twesthei@physik.uni-bielefeld.de> - * - * 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. - * - * Pie3DWidget was inspired by Christian Poulter's KDiskFree - * - ****************************************************************************/ - -#ifndef __PIE3DWIDGET_H -#define __PIE3DWIDGET_H - -#include <qwidget.h> -#include <qptrlist.h> - -#include "pie3dpiece.h" - - -class Pie3DWidget : public QWidget -{ - public: - - Pie3DWidget(QWidget *parent = 0L, const char *name = 0L); - ~Pie3DWidget() {} - - void addPiece(int size, const QColor&); - - virtual int heightForWidth(int w) const; - virtual QSize minimumSizeHint() const; - virtual QSize sizeHint() const; - - protected: - - virtual void paintEvent(QPaintEvent *); - - private: - - int _totalsize; - QList<Pie3DPiece> _piecelist; -}; - - -#endif diff --git a/kde2/plugins/plpprops.cc b/kde2/plugins/plpprops.cc deleted file mode 100644 index 47563e3..0000000 --- a/kde2/plugins/plpprops.cc +++ /dev/null @@ -1,1094 +0,0 @@ -/*-*-c++-*- - * $Id$ - * - * This file is part of plptools. - * - * Copyright (C) 2001-2002 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 - -#include "plpprops.h" -#include "pie3dwidget.h" - -#include <kdebug.h> -#include <klocale.h> -#include <kio/slaveinterface.h> -#include <krun.h> - -#include <qlayout.h> -#include <qlabel.h> -#include <qobjectlist.h> -#include <qtabwidget.h> -#include <qcheckbox.h> -#include <qwhatsthis.h> -#include <qpushbutton.h> - -#include <sstream> -#include <iomanip> - -#ifdef ENABLE_NLS -#define _PLPINTL_H_ // Override NLS stuff in headers from libplp -static inline QString X_(const char *t) { - return KGlobal::locale()->translate(t); -} -static inline QString _(const char *t) { - return KGlobal::locale()->translate(t); -} -static inline const char *N_(const char *t) { return t; } -#endif - -#include <rfsv.h> -#include <rpcs.h> - -#define PLP_CMD_DRIVEINFO 1 -#define PLP_CMD_OWNERINFO 2 -#define PLP_CMD_GETATTR 3 -#define PLP_CMD_SETATTR 4 -#define PLP_CMD_MACHINFO 5 - -#define KIO_ARGS QByteArray packedArgs; \ -QDataStream stream( packedArgs, IO_WriteOnly ); stream - -using namespace std; - -class PlpPropsPlugin::PlpPropsPluginPrivate { -public: - PlpPropsPluginPrivate() { } - ~PlpPropsPluginPrivate() { } - - QFrame *frame; -}; - -/* - * A VERY UGLY HACK for removing the Permissions-Page from - * the Properties dialog. - */ -static void -removeDialogPage(QWidget *theDialog, QString theLabel) { - QObject *qtabwidget = 0L; - QFrame *permframe = 0L; - - // - // First, find the QTabWidget in the dialog. - // Easy, cause there's only one. - // - QObjectList *l = theDialog->queryList("QTabWidget"); - QObjectListIt it(*l); - QObject * obj; - while ((obj=it.current()) != 0) { - ++it; - qtabwidget = obj; - } - delete l; - - // Now, walk thru all Childs of the QTabWidget which are - // inherited from class QFrame. For every found frame, - // compare the tabLabel against the required label (&Permissions). - // - if (qtabwidget != 0L) { - l = qtabwidget->queryList("QFrame"); - QObjectListIt it(*l); - - while ((obj = it.current()) != 0) { - if (theLabel == - ((QTabWidget *)qtabwidget)->tabLabel((QWidget*)obj)) { - permframe = (QFrame *)obj; - break; - } - ++it; - } - delete l; - - // If we found it, remove it. - if (permframe != 0) - ((QTabWidget *)qtabwidget)->removePage(permframe); - } -} - -PlpPropsPlugin::PlpPropsPlugin(KPropertiesDialog *_props) - : KPropsDlgPlugin( _props ) -{ - d = new PlpPropsPluginPrivate; - bool removePerms = false; - bool removeGeneral = false; - - if (!supports(properties->items())) - return; - - if (PlpFileAttrPage::supports(properties->items())) { - PlpFileAttrPage *p = new PlpFileAttrPage(_props); - connect(p, SIGNAL(changed()), SLOT(doChange())); - connect(this, SIGNAL(save()), p, SLOT(applyChanges())); - removePerms = true; - } - if (PlpDriveAttrPage::supports(properties->items())) { - PlpDriveAttrPage *p = new PlpDriveAttrPage(_props); - removePerms = true; - } - if (PlpMachinePage::supports(properties->items())) { - PlpMachinePage *p = new PlpMachinePage(_props); - removePerms = true; - removeGeneral = true; - } - if (PlpOwnerPage::supports(properties->items())) { - PlpOwnerPage *p = new PlpOwnerPage(_props); - removePerms = true; - removeGeneral = true; - } - if (removePerms) - removeDialogPage(properties->dialog(), i18n("&Permissions")); - if (removeGeneral) - removeDialogPage(properties->dialog(), i18n("&General")); -} - -PlpPropsPlugin::~PlpPropsPlugin() { - delete d; -} - -bool PlpPropsPlugin::supports(KFileItemList _items) { - for (KFileItemListIterator it(_items); it.current(); ++it) { - KFileItem *fi = it.current(); - - if (fi->url().protocol() != "psion") - return false; - } - return true; -} - -void PlpPropsPlugin::applyChanges() { - emit save(); -} - -void PlpPropsPlugin::doChange() { - emit changed(); -} - -class PlpFileAttrPage::PlpFileAttrPagePrivate { - - typedef struct { - const char * const lbl; - const char * const tip; - const u_int32_t mask; - bool inverted; - bool direnabled; - bool s5enabled; - } UIelem; - -public: - - PlpFileAttrPagePrivate(); - ~PlpFileAttrPagePrivate() {} - - KPropertiesDialog *props; - - bool jobReturned; - u_int32_t flags; - u_int32_t attr; - - const UIelem *generic; - const UIelem *s3; - const UIelem *s5; - - QFrame *frame; - QLabel *psiPath; - QCheckBox *genCb[5]; // MUST match initializers below!!! - QCheckBox *specCb[3]; // MUST match initializers below!!! -}; - -PlpFileAttrPage::PlpFileAttrPagePrivate::PlpFileAttrPagePrivate() { - int i; - - static const UIelem _generic[] = { - { - I18N_NOOP("Readable"), - I18N_NOOP("If this is checked, read permission is granted. On series 5, this cannot swiched off."), - rfsv::PSI_A_READ, - false, false, false - }, // Fake for S5 - { - I18N_NOOP("Writeable"), - I18N_NOOP("If this is checked, write permission is granted."), - rfsv::PSI_A_RDONLY, - true, true, true - }, - { - I18N_NOOP("Hidden"), - I18N_NOOP("If this is checked, the file is not shown when displaying the directory on the Psion."), - rfsv::PSI_A_HIDDEN, - false, true, true - }, - { - I18N_NOOP("System"), - I18N_NOOP("If this is checked, the file is not shown when displaying the directory on the Psion."), - rfsv::PSI_A_SYSTEM, - false, false, true - }, - { - I18N_NOOP("Archive"), - I18N_NOOP("If this is checked, the file will be included in the next incremental backup."), - rfsv::PSI_A_ARCHIVE, - false, true, true - }, - { 0L, 0L, 0L, false, false, true }, - }; - static const UIelem _s3[] = { - { - I18N_NOOP("Executable"), - I18N_NOOP("If this is checked, the file can be executed on the Psion. This Attribute does not apply to directories."), - rfsv::PSI_A_EXEC, - false, false, true - }, - { - I18N_NOOP("Stream"), - I18N_NOOP("If this is checked, the file is a stream. This Attribute does not apply to directories."), - rfsv::PSI_A_STREAM, - false, false, true - }, - { - I18N_NOOP("Text"), - I18N_NOOP("If this is checked, the file is opened in text mode. This Attribute does not apply to directories."), - rfsv::PSI_A_TEXT, - false, false, true - }, - { 0L, 0L, 0L, false, false, true }, - }; - static const UIelem _s5[] = { - { - I18N_NOOP("Normal"), - I18N_NOOP("If this is checked, the file is considered regular. This Attribute does not apply to directories."), - rfsv::PSI_A_NORMAL, - false, false, true - }, - { - I18N_NOOP("Temporary"), - I18N_NOOP("If this is checked, the file considered temporary. This Attribute does not apply to directories."), - rfsv::PSI_A_TEMP, - false, false, true - }, - { - I18N_NOOP("Compressed"), - I18N_NOOP("If this is checked, the file is stored in compressed mode. This Attribute does not apply to directories."), - rfsv::PSI_A_COMPRESSED, - false, false, true - }, - { 0L, 0L, 0L, false, false, true }, - }; - generic = _generic; - s3 = _s3; - s5 = _s5; -} - -PlpFileAttrPage::PlpFileAttrPage(KPropertiesDialog *_props) { - QGridLayout *mgl; - QGridLayout *gl; - QGroupBox *gb; - QLabel *l; - int i; - - d = new PlpFileAttrPagePrivate; - d->props = _props; - d->frame = _props->dialog()->addPage(i18n("Psion &Attributes")); - - mgl = new QGridLayout(d->frame, 1, 1, KDialog::marginHint(), - KDialog::spacingHint(), "mainLayout"); - - l = new QLabel(i18n("Path on Psion:"), d->frame, "psiPathLabel"); - mgl->addWidget(l, 0, 0); - - d->psiPath = new QLabel(QString("?"), d->frame, "psiPath"); - mgl->addWidget(d->psiPath, 0, 1); - mgl->setColStretch(1, 1); - - gb = new QGroupBox(i18n("Generic attributes"), d->frame, "genattrBox"); - mgl->addMultiCellWidget(gb, 1, 1, 0, 1); - gl = new QGridLayout (gb, 1, 1, KDialog::marginHint(), - KDialog::spacingHint(), "genattrLayout"); - for (i = 0; d->generic[i].lbl; i++) { - QString lbl = KGlobal::locale()->translate(d->generic[i].lbl); - d->genCb[i] = new QCheckBox(lbl, gb, d->generic[i].lbl); - QWhatsThis::add(d->genCb[i], - KGlobal::locale()->translate(d->generic[i].tip)); - d->genCb[i]->setEnabled(false); - connect(d->genCb[i], SIGNAL(toggled(bool)), SLOT(slotCbToggled(bool))); - gl->addWidget(d->genCb[i], 0, i); - } - - gb = new QGroupBox(i18n("Machine specific attributes"), d->frame, - "specattrBox"); - mgl->addMultiCellWidget(gb, 2, 2, 0, 1); - gl = new QGridLayout (gb, 1, 1, KDialog::marginHint(), - KDialog::spacingHint(), "specattrLayout"); - for (i = 0; d->s5[i].lbl; i++) { - QString lbl = KGlobal::locale()->translate(d->s5[i].lbl); - d->specCb[i] = new QCheckBox(lbl, gb, d->s5[i].lbl); - d->specCb[i]->setEnabled(false); - connect(d->specCb[i], SIGNAL(toggled(bool)), SLOT(slotCbToggled(bool))); - gl->addWidget(d->specCb[i], 0, i); - } - mgl->addRowSpacing(3, KDialog::marginHint()); - - d->jobReturned = false; - KIO_ARGS << int(PLP_CMD_GETATTR) << _props->item()->url().path(); - KURL u(_props->item()->url()); - u.setPath("/"); - KIO::StatJob *job = new KIO::StatJob(u, KIO::CMD_SPECIAL, packedArgs, false); - connect(job, SIGNAL(result(KIO::Job *)), - SLOT(slotGetSpecialFinished(KIO::Job *))); -} - -PlpFileAttrPage::~PlpFileAttrPage() { - delete d; -} - -bool PlpFileAttrPage::supports(KFileItemList _items) { - for (KFileItemListIterator it(_items); it.current(); ++it) { - KFileItem *fi = it.current(); - - QString path = fi->url().path(-1); - if (path.contains('/') == 1) - return false; - } - return true; -} - -void PlpFileAttrPage::applyChanges() { - u_int32_t attr = 0; - bool isS5 = ((d->flags & 1) != 0); - bool val; - int i; - - for (i = 0; d->generic[i].lbl; i++) { - val = d->genCb[i]->isChecked(); - if (d->generic[i].inverted) - val = !val; - if (val) - attr |= d->generic[i].mask; - } - if (isS5) - for (i = 0; d->s5[i].lbl; i++) { - val = d->specCb[i]->isChecked(); - if (d->s5[i].inverted) - val = !val; - if (val) - attr |= d->s5[i].mask; - } - else - for (i = 0; d->s3[i].lbl; i++) { - val = d->specCb[i]->isChecked(); - if (d->s3[i].inverted) - val = !val; - if (val) - attr |= d->s3[i].mask; - } - if (d->attr != attr) { - u_int32_t mask = d->attr ^ attr; - u_int32_t sattr = attr & mask; - u_int32_t dattr = ~sattr & mask; - - KIO_ARGS << int(PLP_CMD_SETATTR) << sattr << dattr - << d->props->item()->url().path(); - KURL u(d->props->item()->url()); - u.setPath("/"); - KIO::SimpleJob *sjob = new KIO::SimpleJob(u, KIO::CMD_SPECIAL, - packedArgs, false); - connect(sjob, SIGNAL(result(KIO::Job *)), - SLOT(slotSetSpecialFinished(KIO::Job *))); - } -} - -void PlpFileAttrPage::slotCbToggled(bool) { - if (d->jobReturned) - emit changed(); -} - -void PlpFileAttrPage::slotSetSpecialFinished(KIO::Job *job) { - KIO::SimpleJob *sJob = static_cast<KIO::SimpleJob *>(job); - - if (sJob->error()) - job->showErrorDialog(d->props->dialog()); -} - -void PlpFileAttrPage::slotGetSpecialFinished(KIO::Job *job) { - KIO::StatJob *sJob = static_cast<KIO::StatJob *>(job); - - if (sJob->error()) - job->showErrorDialog(d->props->dialog()); - else { - KIO::UDSEntry e = sJob->statResult(); - bool attr_found = false; - bool flags_found = false; - u_int32_t flags; - u_int32_t attr; - - for (KIO::UDSEntry::ConstIterator it = e.begin(); it != e.end(); ++it) { - if ((*it).m_uds == KIO::UDS_SIZE) { - attr_found = true; - attr = (unsigned long)((*it).m_long); - } - if ((*it).m_uds == KIO::UDS_CREATION_TIME) { - flags_found = true; - flags = (unsigned long)((*it).m_long); - } - if ((*it).m_uds == KIO::UDS_NAME) - d->psiPath->setText((*it).m_str); - } - if (attr_found && flags_found) { - bool isS5 = ((flags & 1) != 0); - bool isRom = ((flags & 2) != 0); - bool noDir = ((attr & rfsv::PSI_A_DIR) == 0); - int i; - - d->attr = attr; - d->flags = flags; - for (i = 0; d->generic[i].lbl; i++) { - bool val = ((attr & d->generic[i].mask) != 0); - if (d->generic[i].inverted) - val = !val; - d->genCb[i]->setChecked(val); - if ((!isRom) && (d->generic[i].s5enabled) && - (noDir || d->generic[i].direnabled)) { - d->genCb[i]->setEnabled(true); - } - } - if (isS5) - for (i = 0; d->s5[i].lbl; i++) { - bool val = ((attr & d->s5[i].mask) != 0); - QWhatsThis::add(d->specCb[i], - KGlobal::locale()->translate(d->s5[i].tip)); - d->specCb[i]->setChecked(val); - if ((!isRom) && (noDir || d->s5[i].direnabled)) - d->specCb[i]->setEnabled(true); - } - else - for (i = 0; d->s3[i].lbl; i++) { - bool val = ((attr & d->s3[i].mask) != 0); - QString lbl = KGlobal::locale()->translate(d->s3[i].lbl); - d->specCb[i]->setText(lbl); - QWhatsThis::add(d->specCb[i], - KGlobal::locale()->translate(d->s3[i].tip)); - d->specCb[i]->setChecked(val); - if ((!isRom) && (noDir || d->s3[i].direnabled)) - d->specCb[i]->setEnabled(true); - } - } - } - d->jobReturned = true; -} - -class PlpDriveAttrPage::PlpDriveAttrPagePrivate { -public: - PlpDriveAttrPagePrivate() { } - ~PlpDriveAttrPagePrivate() { } - - QColor usedColor; - QColor freeColor; - QString driveLetter; - - KPropertiesDialog *props; - QFrame *frame; - QGroupBox *gb; - Pie3DWidget *pie; - QLabel *typeLabel; - QLabel *totalLabel; - QLabel *freeLabel; - QLabel *uidLabel; - QPushButton *restoreButton; - QPushButton *formatButton; -}; - -PlpDriveAttrPage::PlpDriveAttrPage(KPropertiesDialog *_props) { - d = new PlpDriveAttrPagePrivate; - d->props = _props; - d->frame = _props->dialog()->addPage(i18n("Psion &Drive")); - - QBoxLayout *box = new QVBoxLayout(d->frame, KDialog::spacingHint()); - QLabel *l; - QGridLayout *gl; - QPushButton *b; - d->usedColor = QColor(219, 58, 197); - d->freeColor = QColor(39, 56, 167); - d->driveLetter = ""; - - d->gb = new QGroupBox(i18n("Information"), d->frame, "driveinfo"); - box->addWidget(d->gb); - - gl = new QGridLayout(d->gb, 7, 4, 15); - gl->addRowSpacing(0, 10); - - l = new QLabel(i18n("Type"), d->gb, "typeLabel"); - gl->addWidget(l, 1, 0); - - d->typeLabel = new QLabel(d->gb); - gl->addWidget(d->typeLabel, 2, 0); - QWhatsThis::add(d->typeLabel, - i18n("The type of the drive is shown here.")); - - l = new QLabel(i18n("Total capacity"), d->gb, "capacityLabel"); - gl->addWidget (l, 1, 1); - - d->totalLabel = new QLabel(i18n(" "), d->gb, "capacityValue"); - gl->addWidget(d->totalLabel, 2, 1); - QWhatsThis::add(d->totalLabel, - i18n("This shows the total capacity of the drive.")); - - l = new QLabel(i18n("Free space"), d->gb, "spaceLabel"); - gl->addWidget (l, 1, 2); - - d->freeLabel = new QLabel(i18n(" "), d->gb, "spaceValue"); - gl->addWidget(d->freeLabel, 2, 2); - QWhatsThis::add(d->freeLabel, - i18n("This shows the available space of the drive.")); - - l = new QLabel(i18n("Unique ID"), d->gb, "uidLabel"); - gl->addWidget (l, 1, 3); - - d->uidLabel = new QLabel(i18n(" "), d->gb, "uidValue"); - gl->addWidget(d->uidLabel, 2, 3); - QWhatsThis::add(d->uidLabel, - i18n("This shows unique ID of the drive. For ROM drives, this is always 0.")); - - d->pie = new Pie3DWidget(d->gb, "pie"); - QWhatsThis::add(d->pie, - i18n("Here, the usage of the drive is shown in a pie diagram. The purple area shows used space, the blue area shows free space.")); - - gl->addMultiCellWidget(d->pie, 3, 4, 1, 2); - - QHBoxLayout *blay = new QHBoxLayout(KDialog::spacingHint(), "buttons"); - gl->addMultiCellLayout(blay, 5, 6, 1, 3); - blay->setAlignment(AlignRight | AlignVCenter); - - b = new QPushButton(i18n("Backup"), d->gb, "backupButton"); - connect(b, SIGNAL(clicked()), SLOT(slotBackupClicked())); - blay->addWidget(b, 0); - QWhatsThis::add(b, - i18n("Click here, to do a backup of this drive. This launches KPsion to perform that task.")); - - b = new QPushButton(i18n("Restore"), d->gb, "restoreButton"); - connect(b, SIGNAL(clicked()), SLOT(slotRestoreClicked())); - blay->addWidget(b, 0); - d->restoreButton = b; - QWhatsThis::add(b, - i18n("Click here, to do a restore of this drive. This launches KPsion to perform that task.")); - - b = new QPushButton(i18n("Format"), d->gb, "formatButton"); - connect(b, SIGNAL(clicked()), SLOT(slotFormatClicked())); - blay->addWidget(b, 0); - d->formatButton = b; - QWhatsThis::add(b, - i18n("Click here, to format this drive. This launches KPsion to perform that task.")); - - blay->addStretch(10); - - box->addStretch(10); - - KIO_ARGS << int(PLP_CMD_DRIVEINFO) << _props->item()->url().path(); - KURL u(_props->item()->url()); - u.setPath("/"); - KIO::StatJob *job = new KIO::StatJob(u, KIO::CMD_SPECIAL, packedArgs, false); - connect(job, SIGNAL(result(KIO::Job *)), - SLOT(slotSpecialFinished(KIO::Job *))); - -} - -PlpDriveAttrPage::~PlpDriveAttrPage() { - delete d; -} - -bool PlpDriveAttrPage::supports(KFileItemList _items) { - for (KFileItemListIterator it(_items); it.current(); ++it) { - KFileItem *fi = it.current(); - - QString path = fi->url().path(-1); - if (path.contains('/') != 1) - return false; - if (fi->url().path() == "/") - return false; - } - return true; -} - -void PlpDriveAttrPage::slotBackupClicked() { - if (!d->driveLetter.isEmpty()) - KRun::runCommand( - QString("kpsion --backup %1").arg(d->driveLetter)); -} - -void PlpDriveAttrPage::slotRestoreClicked() { - if (!d->driveLetter.isEmpty()) - KRun::runCommand( - QString("kpsion --restore %1").arg(d->driveLetter)); -} - -void PlpDriveAttrPage::slotFormatClicked() { - if (!d->driveLetter.isEmpty()) - KRun::runCommand( - QString("kpsion --format %1").arg(d->driveLetter)); -} - -void PlpDriveAttrPage::slotSpecialFinished(KIO::Job *job) { - KIO::StatJob *sJob = static_cast<KIO::StatJob *>(job); - - if (sJob->error()) - job->showErrorDialog(d->props->dialog()); - else { - KIO::UDSEntry e = sJob->statResult(); - bool total_found = false; - bool free_found = false; - u_int32_t total; - u_int32_t unused; - - for (KIO::UDSEntry::ConstIterator it = e.begin(); it != e.end(); ++it) { - if ((*it).m_uds == KIO::UDS_SIZE) { - total_found = true; - total = (unsigned long)((*it).m_long); - } - if ((*it).m_uds == KIO::UDS_MODIFICATION_TIME) { - free_found = true; - unused = (unsigned long)((*it).m_long); - } - if ((*it).m_uds == KIO::UDS_CREATION_TIME) { - unsigned long uid = (unsigned long)((*it).m_long); - d->uidLabel->setText(QString("%1").arg(uid, 8, 16)); - } - if ((*it).m_uds == KIO::UDS_NAME) { - QString name = ((*it).m_str); - d->typeLabel->setText(name); - if (name == "ROM") { - d->restoreButton->setEnabled(false); - d->formatButton->setEnabled(false); - // Can't change anything - removeDialogPage(d->props->dialog(), i18n("&General")); - } - } - if ((*it).m_uds == KIO::UDS_USER) { - d->driveLetter = ((*it).m_str); - d->gb->setTitle(QString(i18n("Information for Psion drive %1: (%2)")).arg(d->driveLetter).arg(d->props->item()->name())); - } - } - if (total_found && free_found) { - d->totalLabel->setText(QString("%1 (%2)").arg(KIO::convertSize(total)).arg(KGlobal::locale()->formatNumber(total, 0))); - d->freeLabel->setText(QString("%1 (%2)").arg(KIO::convertSize(unused)).arg(KGlobal::locale()->formatNumber(unused, 0))); - d->pie->addPiece(total - unused, d->usedColor); - d->pie->addPiece(unused, d->freeColor); - } - } -} - -class PlpMachinePage::PlpMachinePagePrivate { -public: - PlpMachinePagePrivate() { } - ~PlpMachinePagePrivate() { } - - KPropertiesDialog *props; - - QFrame *f; - QGridLayout *g; - - QLabel *machType; - QLabel *machName; - QLabel *machUID; - QLabel *machLang; - - QLabel *romVersion; - QLabel *romSize; - QLabel *romProg; - - QLabel *ramSize; - QLabel *ramFree; - QLabel *ramMaxFree; - QLabel *ramDiskSz; - - QLabel *regSize; - QLabel *dispGeo; - QLabel *machTime; - QLabel *machUTCo; - QLabel *machDST; - - QLabel *mbattChanged; - QLabel *mbattUsage; - QLabel *mbattStatus; - QLabel *mbattPower; - QLabel *mbattCurrent; - QLabel *mbattVoltage; - QLabel *mbattMaxVoltage; - - QLabel *bbattStatus; - QLabel *bbattVoltage; - QLabel *bbattMaxVoltage; - - QLabel *epowerSupplied; - QLabel *epowerUsage; - - rpcs::machineInfo mi; -}; - -QLabel *PlpMachinePage:: -makeEntry(QString text, QWidget *w, int y) { - QLabel *l = new QLabel(w); - d->g->addWidget(new QLabel(text, w), y, 0); - d->g->addWidget(l, y, 1); - return l; -} - -PlpMachinePage::PlpMachinePage( KPropertiesDialog *_props ) { - d = new PlpMachinePagePrivate; - d->props = _props; - - QGroupBox *gb; - QBoxLayout *box; - - d->f = _props->dialog()->addPage(i18n("Psion &Machine")); - - box = new QVBoxLayout(d->f, KDialog::spacingHint()); - gb = new QGroupBox(i18n("General"), d->f, "genInfBox"); - box->addWidget(gb); - d->g = new QGridLayout(gb, 8, 2, KDialog::marginHint(), - KDialog::spacingHint()); - - d->machType = makeEntry(i18n("Machine type:"), gb, 1); - QWhatsThis::add(d->machType, - i18n("Here, the type of the connected device is shown.")); - d->machName = makeEntry(i18n("Model name:"), gb, 2); - QWhatsThis::add(d->machName, - i18n("Here, the model name of the connected device is shown.")); - d->machUID = makeEntry(i18n("Machine UID:"), gb, 3); - QWhatsThis::add(d->machUID, - i18n("Here, the unique ID of the connected device is shown.")); - d->machLang = makeEntry(i18n("UI language:"), gb, 4); - QWhatsThis::add(d->machLang, - i18n("Here, the user interface language of the connected device is shown.")); - d->dispGeo = makeEntry(i18n("Display geometry:"), gb, 5); - QWhatsThis::add(d->dispGeo, - i18n("Here, the display geometry of the connected device is shown.")); - d->regSize = makeEntry(i18n("Registry size:"), gb, 6); - QWhatsThis::add(d->regSize, - i18n("Here, the size of the registry data is shown.")); - d->g->addRowSpacing(0, KDialog::marginHint()); - d->g->setColStretch(0, 1); - d->g->setColStretch(1, 1); - - gb = new QGroupBox(i18n("Time"), d->f, "timeInfBox"); - box->addWidget(gb); - d->g = new QGridLayout(gb, 5, 2, KDialog::marginHint(), - KDialog::spacingHint()); - d->machTime = makeEntry(i18n("Date/Time:"), gb, 1); - QWhatsThis::add(d->machTime, - i18n("Here, the current time setting of the connected device is shown.")); - d->machUTCo = makeEntry(i18n("UTC offset"), gb, 2); - QWhatsThis::add(d->machUTCo, - i18n("Here, the offset of the connected device's time zone relative to GMT is shown.")); - d->machDST = makeEntry(i18n("Daylight saving"), gb, 3); - QWhatsThis::add(d->machDST, - i18n("Here, you can see, if daylight saving time is currently active on the connected device.")); - d->g->addRowSpacing(0, KDialog::marginHint()); - d->g->setColStretch(0, 1); - d->g->setColStretch(1, 1); - box->addStretch(10); - - d->f = _props->dialog()->addPage(i18n("Psion &Battery")); - box = new QVBoxLayout(d->f, KDialog::spacingHint()); - gb = new QGroupBox(i18n("Main battery"), d->f, "mbatInfBox"); - box->addWidget(gb); - d->g = new QGridLayout(gb, 9, 2, KDialog::marginHint(), - KDialog::spacingHint()); - d->mbattChanged = makeEntry(i18n("Changed at:"), gb, 1); - QWhatsThis::add(d->mbattChanged, - i18n("This shows the time of last battery change.")); - d->mbattUsage = makeEntry(i18n("Usage time:"), gb, 2); - QWhatsThis::add(d->mbattUsage, - i18n("This shows the accumulated time of running on battery power.")); - d->mbattStatus = makeEntry(i18n("Status:"), gb, 3); - QWhatsThis::add(d->mbattStatus, - i18n("This shows current status of the battery.")); - d->mbattPower = makeEntry(i18n("Total consumed power:"), gb, 4); - QWhatsThis::add(d->mbattPower, - i18n("This shows accumulated power consumtion of the device.")); - d->mbattCurrent = makeEntry(i18n("Current:"), gb, 5); - QWhatsThis::add(d->mbattCurrent, - i18n("This shows the current, drawn from power supply (battery or mains).")); - d->mbattVoltage = makeEntry(i18n("Voltage:"), gb, 6); - QWhatsThis::add(d->mbattVoltage, - i18n("This shows the current battery voltage.")); - d->mbattMaxVoltage = makeEntry(i18n("Max. voltage:"), gb, 7); - QWhatsThis::add(d->mbattMaxVoltage, - i18n("This shows the maximum battery voltage.")); - d->g->addRowSpacing(0, KDialog::marginHint()); - d->g->setColStretch(0, 1); - d->g->setColStretch(1, 1); - - gb = new QGroupBox(i18n("Backup battery"), d->f, "bbatInfBox"); - box->addWidget(gb); - d->g = new QGridLayout(gb, 5, 2, KDialog::marginHint(), - KDialog::spacingHint()); - d->bbattStatus = makeEntry(i18n("Status:"), gb, 1); - QWhatsThis::add(d->bbattStatus, - i18n("This shows current status of the backup battery.")); - d->bbattVoltage = makeEntry(i18n("Voltage:"), gb, 2); - QWhatsThis::add(d->bbattVoltage, - i18n("This shows the current backup battery voltage.")); - d->bbattMaxVoltage = makeEntry(i18n("Max. voltage:"), gb, 3); - QWhatsThis::add(d->bbattMaxVoltage, - i18n("This shows the maximum backup battery voltage.")); - d->g->addRowSpacing(0, KDialog::marginHint()); - d->g->setColStretch(0, 1); - d->g->setColStretch(1, 1); - - gb = new QGroupBox(i18n("External power"), d->f, "epowerInfBox"); - box->addWidget(gb); - d->g = new QGridLayout(gb, 4, 2, KDialog::marginHint(), - KDialog::spacingHint()); - d->epowerSupplied = makeEntry(i18n("Supplied:"), gb, 1); - QWhatsThis::add(d->epowerSupplied, - i18n("This shows whether external power is currently supplied.")); - d->epowerUsage = makeEntry(i18n("Usage time:"), gb, 2); - QWhatsThis::add(d->epowerUsage, - i18n("This shows the accumulated time of running on external power.")); - d->g->addRowSpacing(0, KDialog::marginHint()); - d->g->setColStretch(0, 1); - d->g->setColStretch(1, 1); - box->addStretch(10); - - d->f = _props->dialog()->addPage(i18n("Psion M&emory")); - - box = new QVBoxLayout(d->f, KDialog::spacingHint()); - gb = new QGroupBox(i18n("ROM"), d->f, "romInfBox"); - box->addWidget(gb); - d->g = new QGridLayout(gb, 5, 2, KDialog::marginHint(), - KDialog::spacingHint()); - d->romVersion = makeEntry(i18n("Version:"), gb, 1); - QWhatsThis::add(d->romVersion, - i18n("This shows the firmware version.")); - d->romSize = makeEntry(i18n("Size:"), gb, 2); - QWhatsThis::add(d->romSize, - i18n("This shows the size of the ROM.")); - d->romProg = makeEntry(i18n("Programmable:"), gb, 3); - QWhatsThis::add(d->romProg, - i18n("This shows, whether the ROM is flashable or not.")); - d->g->addRowSpacing(0, KDialog::marginHint()); - d->g->setColStretch(0, 1); - d->g->setColStretch(1, 1); - - gb = new QGroupBox(i18n("RAM"), d->f, "ramInfBox"); - box->addWidget(gb); - d->g = new QGridLayout(gb, 6, 2, KDialog::marginHint(), - KDialog::spacingHint()); - d->ramSize = makeEntry(i18n("Size:"), gb, 1); - QWhatsThis::add(d->ramSize, - i18n("This shows the total capacity of the RAM.")); - d->ramFree = makeEntry(i18n("Free:"), gb, 2); - QWhatsThis::add(d->ramFree, - i18n("This shows the free capacity of the RAM.")); - d->ramMaxFree = makeEntry(i18n("Max. free:"), gb, 3); - QWhatsThis::add(d->ramMaxFree, - i18n("This shows the size of the largest free block of the RAM.")); - d->ramDiskSz = makeEntry(i18n("RAMDisk size:"), gb, 4); - QWhatsThis::add(d->ramDiskSz, - i18n("This shows, how much RAM is currently used for the RAMDisc.")); - d->g->addRowSpacing(0, KDialog::marginHint()); - d->g->setColStretch(0, 1); - d->g->setColStretch(1, 1); - box->addStretch(10); - - KURL u(_props->item()->url()); - u.setPath("/0:_MachInfo"); - KIO::TransferJob *job = KIO::get(u, false, false); - - connect(job, SIGNAL(result(KIO::Job *)), - SLOT(slotJobFinished(KIO::Job *))); - connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)), - SLOT(slotJobData(KIO::Job *, const QByteArray &))); -} - -PlpMachinePage::~PlpMachinePage() { - delete d; -} - -bool PlpMachinePage::supports(KFileItemList _items) { - for (KFileItemListIterator it(_items); it.current(); ++it) { - KFileItem *fi = it.current(); - - if (fi->url().path() != "/") - return false; - } - return true; -} - -void PlpMachinePage::slotJobData(KIO::Job *job, const QByteArray &data) { - if (data.size() == sizeof(d->mi)) { - memcpy((char *)&d->mi, data, sizeof(d->mi)); - - d->machType->setText(KGlobal::locale()->translate(d->mi.machineType)); - d->machName->setText(QString(d->mi.machineName)); - // ??! None of QString's formatting methods knows about long long. - ostringstream s; - s << hex << setw(16) << d->mi.machineUID << '\0'; - d->machUID->setText(QString(s.str().c_str())); - d->machLang->setText(KGlobal::locale()->translate(d->mi.uiLanguage)); - d->dispGeo->setText(QString("%1x%2").arg( - d->mi.displayWidth).arg(d->mi.displayHeight)); - d->regSize->setText( - QString("%1 (%2)").arg( - KIO::convertSize(d->mi.registrySize)).arg( - KGlobal::locale()->formatNumber(d->mi.registrySize, 0))); - - QString rev; - rev.sprintf("%d.%02d(%d)", d->mi.romMajor, d->mi.romMinor, - d->mi.romBuild); - d->romVersion->setText(rev); - d->romSize->setText( - QString("%1 (%2)").arg(KIO::convertSize(d->mi.romSize)).arg( - KGlobal::locale()->formatNumber(d->mi.romSize, 0))); - d->romProg->setText(d->mi.romProgrammable ? i18n("yes") : i18n("no")); - - d->ramSize->setText( - QString("%1 (%2)").arg( - KIO::convertSize(d->mi.ramSize)).arg( - KGlobal::locale()->formatNumber(d->mi.ramSize, 0))); - d->ramFree->setText( - QString("%1 (%2)").arg(KIO::convertSize(d->mi.ramFree)).arg( - KGlobal::locale()->formatNumber(d->mi.ramFree, 0))); - d->ramMaxFree->setText( - QString("%1 (%2)").arg(KIO::convertSize(d->mi.ramMaxFree)).arg( - KGlobal::locale()->formatNumber(d->mi.ramMaxFree, 0))); - d->ramDiskSz->setText( - QString("%1 (%2)").arg(KIO::convertSize(d->mi.ramDiskSize)).arg( - KGlobal::locale()->formatNumber(d->mi.ramDiskSize, 0))); - - - PsiTime pt(&d->mi.time, &d->mi.tz); - QDateTime dt; - dt.setTime_t(pt.getTime()); - d->machTime->setText(KGlobal::locale()->formatDateTime(dt, false)); - d->machUTCo->setText(i18n("%1 seconds").arg(d->mi.tz.utc_offset)); - d->machDST->setText((d->mi.tz.dst_zones & PsiTime::PSI_TZ_HOME) - ? i18n("yes") : i18n("no")); - - ostringstream mbs; - mbs << d->mi.mainBatteryUsedTime << '\0'; - d->mbattUsage->setText(QString(mbs.str().c_str())); - pt.setPsiTime(&d->mi.mainBatteryInsertionTime); - dt.setTime_t(pt.getTime()); - d->mbattChanged->setText(KGlobal::locale()->formatDateTime(dt, false)); - d->mbattStatus->setText( - KGlobal::locale()->translate(d->mi.mainBatteryStatus)); - d->mbattPower->setText( - QString("%1 mAs").arg( - KGlobal::locale()->formatNumber(d->mi.mainBatteryUsedPower, 0))); - d->mbattCurrent->setText( - QString("%1 mA").arg( - KGlobal::locale()->formatNumber(d->mi.mainBatteryCurrent, 0))); - d->mbattVoltage->setText( - QString("%1 mV").arg( - KGlobal::locale()->formatNumber(d->mi.mainBatteryVoltage, 0))); - d->mbattMaxVoltage->setText( - QString("%1 mV").arg(KGlobal::locale()->formatNumber( - d->mi.mainBatteryMaxVoltage, 0))); - - d->bbattStatus->setText( - KGlobal::locale()->translate(d->mi.backupBatteryStatus)); - d->bbattVoltage->setText( - QString("%1 mV").arg( - KGlobal::locale()->formatNumber(d->mi.backupBatteryVoltage, 0))); - d->bbattMaxVoltage->setText( - QString("%1 mV").arg(KGlobal::locale()->formatNumber( - d->mi.backupBatteryMaxVoltage, 0))); - - ostringstream bbs; - bbs << d->mi.externalPowerUsedTime << '\0'; - d->epowerUsage->setText(QString(bbs.str().c_str())); - d->epowerSupplied->setText( - d->mi.externalPower ? i18n("Yes") : i18n("No")); - } -} - -void PlpMachinePage::slotJobFinished(KIO::Job *job) { - KIO::TransferJob *mJob = static_cast<KIO::TransferJob *>(job); - - if (mJob->error()) - job->showErrorDialog(d->props->dialog()); -} - -class PlpOwnerPage::PlpOwnerPagePrivate -{ -public: - PlpOwnerPagePrivate() { } - ~PlpOwnerPagePrivate() { } - - QFrame *frame; - KPropertiesDialog *props; - QMultiLineEdit *owneredit; -}; - -PlpOwnerPage::PlpOwnerPage( KPropertiesDialog *_props ) { - d = new PlpOwnerPagePrivate; - d->props = _props; - d->frame = _props->dialog()->addPage(i18n("Psion &Owner")); - QBoxLayout *box = new QVBoxLayout( d->frame, KDialog::spacingHint() ); - d->owneredit = new QMultiLineEdit(d->frame, "ownerinfo"); - d->owneredit->setReadOnly(true); - box->addWidget(d->owneredit); - QWhatsThis::add(d->owneredit, - i18n("This shows the owner's information of the connected device.")); - - KIO_ARGS << int(PLP_CMD_OWNERINFO); - KURL u(_props->item()->url()); - u.setPath("/"); - KIO::StatJob *job = new KIO::StatJob(u, KIO::CMD_SPECIAL, packedArgs, false); - connect(job, SIGNAL(result(KIO::Job *)), - SLOT(slotSpecialFinished(KIO::Job *))); - - box->addStretch(10); -} - -PlpOwnerPage::~PlpOwnerPage() { - delete d; -} - -bool PlpOwnerPage::supports(KFileItemList _items) { - for (KFileItemListIterator it(_items); it.current(); ++it) { - KFileItem *fi = it.current(); - - if (fi->url().path() != "/") - return false; - } - return true; -} - -void PlpOwnerPage::slotSpecialFinished(KIO::Job *job) { - KIO::StatJob *sJob = static_cast<KIO::StatJob *>(job); - - if (sJob->error()) - job->showErrorDialog(d->props->dialog()); - else { - KIO::UDSEntry e = sJob->statResult(); - for (KIO::UDSEntry::ConstIterator it = e.begin(); - it != e.end(); ++it) { - if ((*it).m_uds == KIO::UDS_NAME) - d->owneredit->setText((*it).m_str); - } - } -} - -#include "plpprops.moc" -/* - * Local variables: - * c-basic-offset: 4 - * End: - */ diff --git a/kde2/plugins/plpprops.desktop b/kde2/plugins/plpprops.desktop deleted file mode 100644 index 55cc87c..0000000 --- a/kde2/plugins/plpprops.desktop +++ /dev/null @@ -1,42 +0,0 @@ -[Desktop Entry] -Type=Service -X-KDE-Library=libplpprops -Name=Psion Property Dialog Plugin -ServiceTypes=KPropsDlg/Plugin,all/all -Comment=Plugin for the Properties Dialog -Comment[ca]=Endollat pel diàleg de propietats -Comment[cs]=Modul pro dialog vlastností -Comment[da]=Plugin til egenskabsdialog -Comment[de]=Plugin für den Eigenschaften-Dialog -Comment[el]=Πρόσθετο για το Διάλογο Ιδιοτήτων -Comment[eo]=Internaĵo por la Eco-dialogo -Comment[es]=Plugin para el Diálogo de Propiedades -Comment[et]=Plugina omaduste dialoog -Comment[fi]=Sovelma asetusikkunalle -Comment[fr]=Module pour la boîte de dialogue des Propriétés -Comment[gl]=Plugin para o Diálogo de Propiedades -Comment[he]=םינייפאמה חיש-ודל עקת ןקתה -Comment[hu]=Beépülő modul a tulajdonságok párbeszédablakhoz -Comment[is]=Íhlutur fyrir stillingarforritið -Comment[it]=Plugin per la finestra delle proprietà -Comment[ja]=設定ダイアログプラグイン -Comment[mk]=Плагин за дијалогот за параметри -Comment[nl]=Plugin voor het 'Eigenschappen'dialoog -Comment[no]=Plugginn for egenskaper-dialogen -Comment[no_NY]=Tillegg til eigenskapar-dialogen -Comment[pl]=Wtyczka do Dialogu Właściwości -Comment[pt]='Plugin' para o diálogo de propriedades -Comment[pt_BR]=Plug-in para a janela de Propriedades -Comment[ro]=Modul pentru dialogul de proprietăţi -Comment[ru]=Модуль для диалога настроек -Comment[sk]=Zásuvný modul pre panel Nastavení -Comment[sl]=Vstavek za pogovorno okno z lastnostmi -Comment[sr]=Plugin za dijalog sa svojstvima -Comment[sv]=Insticksprogram för egenskapsdialogen -Comment[ta]=¦º¡òÐì¸û ¯¨Ã¡¼Öì¸¡É ¦ºÕ¸ø -Comment[tr]=Özellikler İletişim Kutusu İçin Eklenti -Comment[uk]=Додаток для діалогу властивостей -Comment[zh_CN.GB2312]=属性对话的插件 -Comment[zh_TW.Big5]=外掛內容對話框 - -X-KDE-Protocol=psion diff --git a/kde2/plugins/plpprops.h b/kde2/plugins/plpprops.h deleted file mode 100644 index 08dbc04..0000000 --- a/kde2/plugins/plpprops.h +++ /dev/null @@ -1,180 +0,0 @@ -/*-*-c++-*- - * $Id$ - * - * This file is part of plptools. - * - * Copyright (C) 1999 Philip Proudman <philip.proudman@btinternet.com> - * 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 _PLPPROPS_H_ -#define _PLPPROPS_H_ - -#include <qstring.h> -#include <qptrlist.h> -#include <qgroupbox.h> -#include <qmultilineedit.h> - -#include <kurl.h> -#include <kfileitem.h> -#include <kdialogbase.h> -#include <kpropertiesdialog.h> -#include <krun.h> -#include <kio/job.h> - -#include "pie3dwidget.h" - -class PlpPropsPlugin : public KPropsDlgPlugin { - Q_OBJECT - -public: - /** - * Constructor - */ - PlpPropsPlugin( KPropertiesDialog *_props ); - virtual ~PlpPropsPlugin(); - - /** - * Applies all changes made. - */ - virtual void applyChanges(); - - /** - * Tests whether the files specified by _items need a 'General' plugin. - */ - static bool supports(KFileItemList _items); - -signals: - void save(); - -private slots: - void doChange(); - -private: - class PlpPropsPluginPrivate; - PlpPropsPluginPrivate *d; -}; - -class PlpFileAttrPage : public QObject { - Q_OBJECT - -public: - /** - * Constructor - */ - PlpFileAttrPage(KPropertiesDialog *_props); - virtual ~PlpFileAttrPage(); - - static bool supports(KFileItemList _items); - -public slots: - void applyChanges(); - -signals: - void changed(); - -private slots: - void slotGetSpecialFinished(KIO::Job *job); - void slotSetSpecialFinished(KIO::Job *job); - void slotCbToggled(bool); - -private: - class PlpFileAttrPagePrivate; - PlpFileAttrPagePrivate *d; -}; - -class PlpDriveAttrPage : public QObject { - Q_OBJECT - -public: - /** - * Constructor - */ - PlpDriveAttrPage(KPropertiesDialog *_props); - virtual ~PlpDriveAttrPage(); - - static bool supports(KFileItemList _items); - -private slots: - void slotSpecialFinished(KIO::Job *job); - void slotBackupClicked(); - void slotRestoreClicked(); - void slotFormatClicked(); - -private: - class PlpDriveAttrPagePrivate; - PlpDriveAttrPagePrivate *d; - -}; - - -/** - * Used to view machine info. - */ -class PlpMachinePage : public QObject { - Q_OBJECT - -public: - /** - * Constructor - */ - PlpMachinePage(KPropertiesDialog *_props); - virtual ~PlpMachinePage(); - - static bool supports(KFileItemList _items); - -private slots: - void slotJobData(KIO::Job *job, const QByteArray &data); - void slotJobFinished(KIO::Job *job); - -private: - class PlpMachinePagePrivate; - PlpMachinePagePrivate *d; - - QLabel *makeEntry(QString text, QWidget *w, int y); -}; - -/** - * Used to view owner info - */ -class PlpOwnerPage : public QObject { - Q_OBJECT - -public: - /** - * Constructor - */ - PlpOwnerPage(KPropertiesDialog *_props); - virtual ~PlpOwnerPage(); - - static bool supports(KFileItemList _items); - -private slots: -void slotSpecialFinished(KIO::Job *job); - -private: - class PlpOwnerPagePrivate; - PlpOwnerPagePrivate *d; -}; - -#endif - -/* - * Local variables: - * c-basic-offset: 4 - * End: - */ diff --git a/kde2/plugins/plppropsFactory.cc b/kde2/plugins/plppropsFactory.cc deleted file mode 100644 index 2eb8002..0000000 --- a/kde2/plugins/plppropsFactory.cc +++ /dev/null @@ -1,40 +0,0 @@ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include "plppropsFactory.h" -#include "plpprops.h" - -#include <iostream> -#include <kdebug.h> -#include <klocale.h> - -extern "C" { - void *init_libplpprops() { - return new plppropsFactory(); - } -}; - -plppropsFactory::plppropsFactory(QObject *parent, const char *name) - : KLibFactory(parent, name) { - s_global = new KInstance("plpprops"); - // Install the translations - KGlobal::locale()->insertCatalogue(QString::fromLatin1("plptools")); - KGlobal::locale()->insertCatalogue(QString::fromLatin1("libplpprops")); -} - -plppropsFactory::~plppropsFactory() { - delete s_global; -} - -QObject* plppropsFactory::createObject(QObject* parent, const char *name, const char *classname, const QStringList & ) { - - QObject *obj = 0L; - - if ((strcmp(classname, "KPropsDlgPlugin") == 0) && parent && - parent->inherits("KPropertiesDialog")) - obj = new PlpPropsPlugin(static_cast<KPropertiesDialog *>(parent)); - return obj; -} - -#include <plppropsFactory.moc> diff --git a/kde2/plugins/plppropsFactory.h b/kde2/plugins/plppropsFactory.h deleted file mode 100644 index 1226560..0000000 --- a/kde2/plugins/plppropsFactory.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _PLPPROPSFACTORY_H_ -#define _PLPPROPSFACTORY_H_ - -#include <klibloader.h> - -class plppropsFactory : public KLibFactory { - Q_OBJECT - public: - plppropsFactory(QObject *parent = 0, const char *name = 0); - virtual ~plppropsFactory(); - - virtual QObject* createObject(QObject* parent = 0, const char* name = 0, const char* classname = "QObject", const QStringList &args = QStringList()); - - private: - KInstance *s_global; - -}; - -#endif diff --git a/kde2/po/.cvsignore b/kde2/po/.cvsignore deleted file mode 100644 index 3dda729..0000000 --- a/kde2/po/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile.in -Makefile diff --git a/kde2/po/Makefile.am b/kde2/po/Makefile.am deleted file mode 100644 index 668c948..0000000 --- a/kde2/po/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ - -maintainer-clean-local: - rm -f Makefile.in - -SUBDIRS = de - -APPS = kpsion libplpprops klipsi - -merge: - @apps='$(APPS)'; \ - langs='$(SUBDIRS)'; \ - for cat in $$apps; do \ - for lang in $$langs; do \ - if test -r $$lang/$$cat.po; then \ - echo $$cat; \ - msgmerge -o $$cat.new $$lang/$$cat.po $$cat.pot; \ - if test -s $$cat.new && diff $$lang/$$cat.po $$cat.new; then \ - rm $$cat.new; \ - else \ - mv $$cat.new $$lang/$$cat.po ; \ - fi; \ - fi ;\ - done ;\ - done - -messages: - diff --git a/kde2/po/de/.cvsignore b/kde2/po/de/.cvsignore deleted file mode 100644 index 4334cf4..0000000 --- a/kde2/po/de/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Makefile.in -Makefile -*.gmo diff --git a/kde2/po/de/Makefile.am b/kde2/po/de/Makefile.am deleted file mode 100644 index 8517d98..0000000 --- a/kde2/po/de/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -KDE_LANG = de - -POFILES = AUTO - -maintainer-clean-local: - rm -f Makefile.in diff --git a/kde2/po/de/klipsi.po b/kde2/po/de/klipsi.po deleted file mode 100644 index dcb3226..0000000 --- a/kde2/po/de/klipsi.po +++ /dev/null @@ -1,75 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001 Free Software Foundation, Inc. -# Fritz Elfert <felfert@to.com>, 2001. -# -msgid "" -msgstr "" -"Project-Id-Version: plptools 0.11\n" -"POT-Creation-Date: 2002-07-07 23:25+0200\n" -"PO-Revision-Date: 2002-07-07 23:38CET\n" -"Last-Translator: Fritz Elfert <felfert@to.com>\n" -"Language-Team: Deutsch <de@li.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: KBabel 0.9.6\n" - -#: main.cpp:36 -msgid "Klipsi" -msgstr "Klipsi" - -#: main.cpp:37 -msgid "Psion remote clipboard utility" -msgstr "Psion Zwischenablage" - -#: main.cpp:44 -msgid "Original Developer/Maintainer" -msgstr "Original Entwickler/Betreuer" - -#: toplevel.cpp:77 -msgid "Klipsi - Psion Clipboard" -msgstr "Klipsi - Psion Zwischenablage" - -#: toplevel.cpp:79 -msgid "&About Klipsi" -msgstr "&Über Klipsi" - -#: toplevel.cpp:80 -msgid "&Quit" -msgstr "B&eenden" - -#: toplevel.cpp:574 -msgid "" -"<QT>Your Psion is reported to be a <B>Series 3</B> machine. This type of " -"machine does <B>not support</B> the remote clipboard protocol; Sorry.<BR/" -"><B>Klipsi</B> will now terminate.</QT>" -msgstr "" -"<QT>Ihr Psion wurde als <B>Serie 3</B> Gerät erkannt. Dieser Gerätetyp " -"unterstützt leider <B>nicht</B> das nötige Protokoll; Sorry.<BR/> <B>Klipsi</" -"B> wird sich nun beenden.</QT>" - -#: toplevel.cpp:578 toplevel.cpp:603 -msgid "Protocol not supported" -msgstr "Protokoll nicht unterstützt" - -#: toplevel.cpp:594 -msgid "" -"<QT>Your Psion does not support the remote clipboard protocol.<BR/>The " -"reason for that is usually a missing server library on your Psion.<BR/>Make " -"shure, that <B>C:\\System\\Libs\\clipsvr.rsy</B> exists.<BR/>This file is " -"part of PsiWin and usually gets copied to your Psion when you enable " -"CopyAnywhere in PsiWin. You also get it from a PsiWin installation directory " -"and copy it to your Psion manually.<BR/><B>Klipsi</B> will now terminate.</" -"QT>" -msgstr "" -"<QT>Ihr Psion unterstützt nicht das Zwischenablage-Protokoll.<BR/>Der Grund " -"hierfür ist üblicherweise eine fehlende Server-Bibliothek auf dem Psion.<BR/" -">Stellen Sie bitte sicher, daß die Datei <B>C:\\System\\Libs\\clipsvr.rsy</" -"B> existiert.<BR/>Diese Datei ist Bestandteil von PsiWin und wird " -"normalerweise auf Ihren Psion kopiert, wenn Sie CopyAnywhere in PsiWin " -"aktivieren. Sie können sie auch manuell aus dem PsiWin-Installationsordner " -"auf Ihren Psion kopieren.<BR/> <B>Klipsi</B> wird sich nun beenden.</QT>" - -#: toplevel.moc.cpp:34 toplevel.moc.cpp:42 -msgid "TopLevel" -msgstr "TopLevel" diff --git a/kde2/po/de/kpsion.po b/kde2/po/de/kpsion.po deleted file mode 100644 index 1cb18a2..0000000 --- a/kde2/po/de/kpsion.po +++ /dev/null @@ -1,1000 +0,0 @@ -# Message catalog for KPsion. -# Copyright (C) 2001 Free Software Foundation, Inc. -# Fritz Elfert <felfert@to.com>, 2001. -# -msgid "" -msgstr "" -"Project-Id-Version: plptools 0.11\n" -"POT-Creation-Date: 2003-02-03 01:23+0100\n" -"PO-Revision-Date: 2002-03-20 03:08CET\n" -"Last-Translator: Fritz Elfert <felfert@to.com>\n" -"Language-Team: Deutsch <de@li.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: KBabel 0.9.5\n" - -#: kpsionbackuplistview.cpp:261 -msgid "Available backups" -msgstr "Verfügbare Sicherungen" - -#: kpsionbackuplistview.cpp:300 -msgid "Full" -msgstr "Voll" - -#: kpsionbackuplistview.cpp:307 -msgid "Incremental" -msgstr "Inkremental" - -#: kpsionbackuplistview.cpp:314 -msgid "%1 backup, created at %2" -msgstr "%1-Sicherung vom %2" - -#: kpsionbackuplistview.cpp:355 -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 " -"Sie zurücksichern wollen aus. Klicken Sie dann auf die Schaltfläche " -"<B>Start</B> um dieseDateien zu restaurieren.</qt>" - -#: kpsionconfig.cpp:103 -msgid "off" -msgstr "aus" - -#: kpsionconfig.cpp:133 -msgid "none" -msgstr "keine" - -#: kpsionconfig.cpp:134 -msgid "daily" -msgstr "täglich" - -#: kpsionconfig.cpp:135 -msgid "every 2 days" -msgstr "alle 2 Tage" - -#: kpsionconfig.cpp:136 -msgid "every 3 days" -msgstr "alle 3 Tage" - -#: kpsionconfig.cpp:137 -msgid "every 4 days" -msgstr "alle 4 Tage" - -#: kpsionconfig.cpp:138 -msgid "every 5 days" -msgstr "alle 5 Tage" - -#: kpsionconfig.cpp:139 -msgid "every 6 days" -msgstr "alle 6 Tage" - -#: kpsionconfig.cpp:140 -msgid "weekly" -msgstr "wöchentlich" - -#: kpsionconfig.cpp:141 -msgid "every 2 weeks" -msgstr "alle 2 Wochen" - -#: kpsionconfig.cpp:142 -msgid "every 3 weeks" -msgstr "alle 3 Wochen" - -#: kpsionconfig.cpp:143 -msgid "monthly" -msgstr "monatlich" - -#: kpsion.cpp:64 -msgid "Idle" -msgstr "Bereit" - -#: kpsion.cpp:130 -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.: " -"backup, restore or format.<br/>To unselect it, simply click on it again.<br/" -">Select as many drives a you want, then choose an operation.</qt>" -msgstr "" -"<qt>Hier sehen Sie die Laufwerke Ihres Psion.<br/>Jedes Laufwerk wird durch " -"ein Icon repräsentiert. Wenn Sie auf dieses klicken, wird es für die nächste " -"Operation angewählt. z.B.: Sicherung, Rücksicherung oder Formatierung.<br/" -">Klicken Sie einfach nochmal, um es wieder abzuwählen.<br/>Wählen Sie " -"beliebig viele Laufwerke und dann eine Operation.</qt>" - -#: kpsion.cpp:200 -msgid "Start &Format" -msgstr "Starte &Formatierung" - -#: kpsion.cpp:202 -msgid "Start Full &Backup" -msgstr "Starte &Komplett-Sicherung" - -#: kpsion.cpp:205 -msgid "Start &Incremental Backup" -msgstr "Starte &inkrementelle Sicherung" - -#: kpsion.cpp:207 -msgid "Start &Restore" -msgstr "Starte &Rücksicherung" - -#: kpsion.cpp:217 -msgid "Full backup of selected drive(s)" -msgstr "Komplett-Sicherung der ausgewählten Laufwerke" - -#: kpsion.cpp:219 -msgid "Incremental backup of selected drive(s)" -msgstr "Inkrementelle Sicherung der ausgewählten Laufwerke" - -#: kpsion.cpp:221 -msgid "Restore selected drive(s)" -msgstr "Sichere ausgewählte Laufwerke zurück" - -#: kpsion.cpp:223 -msgid "Format selected drive(s)" -msgstr "Formatiere ausgewählte Laufwerke" - -#: kpsion.cpp:300 -msgid "Retrieving machine info ..." -msgstr "Ermittle Geräte-Info ..." - -#: kpsion.cpp:305 -msgid "Could not get Psion machine type" -msgstr "Konnte Psion Gerätetyp nicht ermitteln" - -#: kpsion.cpp:313 -msgid "Could not get Psion machine info" -msgstr "Konnte Psion Geräteinfo nicht ermitteln" - -#: kpsion.cpp:336 -msgid "Could not read SIBO UID file" -msgstr "Konnte SIBO UID Datei nicht lesen" - -#: kpsion.cpp:343 -msgid "Could not get Psion owner info" -msgstr "Konnte Psion Eigner-Info nicht ermitteln" - -#: kpsion.cpp:372 -msgid "Could not write SIBO UID file %1" -msgstr "Konnte SIBO UID Datei %1 nicht schreiben." - -#: kpsion.cpp:388 -msgid "an unknown machine" -msgstr "einem unbekannten Gerät" - -#: kpsion.cpp:399 -msgid "Retrieving drive list ..." -msgstr "Ermittle Laufwerks-Liste ..." - -#: kpsion.cpp:402 -msgid "Could not get list of drives" -msgstr "Konnte Liste der Laufwerke nicht ermitteln" - -#: kpsion.cpp:433 kpsion.cpp:892 kpsion.cpp:915 kpsion.cpp:939 kpsion.cpp:1080 -#: kpsion.cpp:1344 kpsion.cpp:1509 kpsion.cpp:1518 kpsion.cpp:1549 -#: kpsion.cpp:1567 kpsion.cpp:1578 -msgid "Connected to %1" -msgstr "Verbunden mit %1" - -#: kpsion.cpp:573 -msgid "" -"<QT>The selected drive <B>Z:</B> is a <B>ROM</B> drive and therefore cannot " -"be restored.</QT>" -msgstr "" -"<QT>Das gewählte Laufwerk <B>Z:</B> ist ein <B>ROM</B> Laufwerk und kann " -"deshalb nicht rückgesichert werden.</QT>" - -#: kpsion.cpp:610 -msgid "" -"<QT>The selected drive <B>Z:</B> is a <B>ROM</B> drive and therefore cannot " -"be formatted.</QT>" -msgstr "" -"<QT>Das gewählte Laufwerk <B>Z:</B> ist ein <B>ROM</B> Laufwerk und kann " -"deshalb nicht formatiert werden.</QT>" - -#: kpsion.cpp:639 -msgid "" -"A backup is running.\n" -"Do you really want to quit?" -msgstr "" -"Eine Sicherung läuft.\n" -"Wollen Sie wirklich das Programm beenden?" - -#: kpsion.cpp:641 -msgid "" -"A restore is running.\n" -"Do you really want to quit?" -msgstr "" -"Eine Rücksicherung läuft.\n" -"Wollen Sie wirklich das Programm beenden?" - -#: kpsion.cpp:643 -msgid "" -"A format is running.\n" -"Do you really want to quit?" -msgstr "" -"Eine Formatierung läuft.\n" -"Wollen Sie wirklich das Programm beenden?" - -#: kpsion.cpp:663 -msgid "Starting ncpd daemon ..." -msgstr "Starte ncpd Dämon ..." - -#: kpsion.cpp:699 -msgid "Connecting ..." -msgstr "Verbindungsaufbau ..." - -#: kpsion.cpp:705 -msgid "RFSV could not connect to ncpd at %1:%2. " -msgstr "RFSV konnte ncpd auf %1:%2 nicht erreichen. " - -#: kpsion.cpp:708 kpsion.cpp:734 kpsion.cpp:761 kpsion.cpp:790 -msgid " (Retry in %1 seconds.)" -msgstr " (Wiederholung in %1 Sekunden.)" - -#: kpsion.cpp:729 -msgid "RFSV could not establish link: %1." -msgstr "RFSV konnte keine Verbindung aufbauen: %1." - -#: kpsion.cpp:754 -msgid "RPCS could not connect to ncpd at %1:%2." -msgstr "RPCS konnte ncpd auf %1:%2 nicht erreichen." - -#: kpsion.cpp:781 -msgid "RPCS could not establish link: %1." -msgstr "RPCS konnte keine Verbindung aufbauen: %1." - -#: kpsion.cpp:896 -msgid "Could not retrieve drive details for drive %1" -msgstr "Konnte Details des Laufwerks %1 nicht ermitteln." - -#: kpsion.cpp:901 -msgid "Scanning drive %1" -msgstr "Durchsuche Laufwerk %1" - -#: kpsion.cpp:911 -msgid "%1 files need backup" -msgstr "%1 Dateien müssen gesichert werden" - -#: kpsion.cpp:919 -msgid "No files need backup" -msgstr "Keine Dateien zu sichern" - -#: kpsion.cpp:941 -msgid "Could not create backup folder %1" -msgstr "Konnte Sicherungs-Ordner %1 nicht anlegen." - -#: kpsion.cpp:968 -#, c-format -msgid "Backup %1% done" -msgstr "Sicherung %1% beendet" - -#: kpsion.cpp:1004 -msgid "" -"<QT>Could not backup<BR/><B>%1</B><BR/><FONT COLOR=RED>%2</FONT><BR/></QT>" -msgstr "" -"<QT>Sicherung von<BR/><B>%1</B> gescheitert.<BR/><FONT COLOR=RED>%2</" -"FONT><BR/></QT>" - -#: kpsion.cpp:1007 -msgid "Retry" -msgstr "Wiederholen" - -#: kpsion.cpp:1007 -msgid "Ignore" -msgstr "Ignorieren" - -#: kpsion.cpp:1033 -msgid "Resetting archive attributes" -msgstr "Setze Archiv-Attribute zurück" - -#: kpsion.cpp:1048 -msgid "" -"<QT>Could not set attributes of<BR/><B>%1</B><BR/><FONT COLOR=red>%2</" -"FONT><BR/>Continue?</QT>" -msgstr "" -"<QT>Konnte Attribute der Datei<BR/><B>%1</B>nicht setzen.<BR/><FONT " -"COLOR=red>%2</FONT><BR/>Fortfahren?</QT>" - -#: kpsion.cpp:1073 -msgid "" -"<QT>Could not rename backup archive from<BR/><B>%1</B> to<BR/><B>%2</B></QT>" -msgstr "" -"<QT>Konnte das Sicherungs-Archiv nicht von<BR/><B>%1</B> nach<BR/><B>%2</" -"B><BR/>umbenennen.</QT>" - -#: kpsion.cpp:1084 -msgid "Backup done" -msgstr "Sicherung beendet" - -#: kpsion.cpp:1120 -msgid "Removing old backups ..." -msgstr "Entferne alte Sicherungsdaten ..." - -#: kpsion.cpp:1222 kpsion.cpp:1462 -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:1251 -msgid "Overwrite" -msgstr "Überschreiben" - -#: kpsion.cpp:1254 -msgid "Overwrite &All" -msgstr "Überschreibe &Alles" - -#: kpsion.cpp:1273 -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:1311 -msgid "Reading backups ..." -msgstr "Lese Sicherungsdaten ..." - -#: kpsion.cpp:1316 -msgid "Selecting backups ..." -msgstr "Wähle Sicherungsdaten ..." - -#: kpsion.cpp:1349 kpsion.cpp:1400 -#, c-format -msgid "Restore %1% done" -msgstr "Rücksicherung %1% abgeschlossen" - -#: kpsion.cpp:1416 -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:1431 -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:1454 -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:1480 -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:1493 -msgid "" -"<QT>Could not set modification time of<BR/><B>%1</B><BR/>Reason: %2</QT>" -msgstr "" -"<QT>Konnte Änderungszeit der Datei<BR/><B>%1</B> nicht setzen<BR/>Grund: %2</" -"QT>" - -#: kpsion.cpp:1520 -msgid "Restore done" -msgstr "Rücksicherung abgeschlossen" - -#: kpsion.cpp:1534 -msgid "Formatting drive %1:" -msgstr "Formatiere Laufwerk %1:" - -#: kpsion.cpp:1545 -msgid "<QT>Could not format drive %1:<BR/>%2</QT>" -msgstr "<QT>Konnte Laufwerk %1 nicht formatieren:<BR/>%2</QT>" - -#: kpsion.cpp:1562 -msgid "<QT>Error during format of drive %1:<BR/>%2</QT>" -msgstr "<QT>Fehler beim Formatieren von Laufwerk %1:<BR/>%2</QT>" - -#: kpsion.cpp:1580 -msgid "Format done" -msgstr "Formatierung beendet" - -#: kpsion.cpp:1586 -msgid "" -"<QT>This erases <B>ALL</B> data on the drive(s).<BR/>Do you really want to " -"proceed?" -msgstr "" -"<QT>Hierdurch werden <B>ALLE</B> Daten auf dem(den) Laufwerk(en) gelöscht." -"<BR/>Wollen Sie wirklich fortfahren?</QT>" - -#: kpsion.cpp:1607 -msgid "Assign drive name" -msgstr "Weise Laufwerksnamen zu" - -#: kpsion.cpp:1616 -msgid "" -"<QT>Formatting of drive %1: finished. Please assign a name for that drive.</" -"QT>" -msgstr "" -"<QT>Die Formatierung des Laufwerks %1 ist beendet. Bitte weisen Sie dem " -"Laufwerk nun einen Namen zu.</QT>" - -#: kpsion.cpp:1620 -msgid "New name of drive %1:" -msgstr "Neuer Name für Laufwerk %1:" - -#: kpsion.cpp:1751 -msgid "Stopping %1" -msgstr "Stoppe %1" - -#: kpsion.cpp:1769 -msgid "" -"<QT>Could not stop all processes.<BR/>Please stop running programs manually " -"on the Psion, then klick <B>Ok</B>." -msgstr "" -"<QT>Konnte nicht alle Prozesse stoppen.<BR/>Bitte beenden Sie laufende " -"Programme auf dem Psion manuell. Klicken Sie dann <B>Ok</B>." - -#: kpsion.cpp:1792 -msgid "Starting %1" -msgstr "Starte %1" - -#: kpsionrestoredialog.cpp:35 -msgid "Restore" -msgstr "Rücksicherung" - -#: kpsionrestoredialog.cpp:39 -msgid "Start" -msgstr "Start" - -#: kpsionrestoredialog.cpp:42 -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." - -#: kpsionrestoredialog.cpp:53 -msgid "Format drive before restore" -msgstr "Formatiere Laufwerk vor Rücksicherung" - -#: main.cpp:49 -msgid "perform scheduled backup" -msgstr "Führe geplante Sicherung durch" - -#: main.cpp:51 -msgid "perform backup" -msgstr "Führe Sicherung durch" - -#: main.cpp:53 -msgid "perform restore" -msgstr "Führe Rücksicherung durch" - -#: main.cpp:55 -msgid "format drive" -msgstr "Formatiere Laufwerk" - -#: main.cpp:60 -msgid "KPsion" -msgstr "KPsion" - -#: main.cpp:62 -msgid "Psion connectivity utility" -msgstr "Werkzeug für Psion PDA" - -#: main.cpp:67 -msgid "Original Developer/Maintainer" -msgstr "Original Entwickler/Betreuer" - -#: main.cpp:105 -msgid "" -"The actions are mutually exclusive. I.e. You cannot specify more than one " -"action at once." -msgstr "" -"Die Aktionen schließen sich gegenseitig aus. D.h. sie können nicht mehrere " -"unterschiedliche Aktionen gleichzeitig angeben." - -#: setupdialog.cpp:47 -msgid "Settings" -msgstr "Einstellungen" - -#: setupdialog.cpp:60 -msgid "&Backup" -msgstr "&Sicherung" - -#: setupdialog.cpp:63 setupdialog.cpp:435 wizards.cpp:279 -msgid "Backup folder" -msgstr "Sicherungs-Ordner" - -#: setupdialog.cpp:74 wizards.cpp:107 -msgid "Browse" -msgstr "Durchsuchen" - -#: setupdialog.cpp:77 -msgid "" -"<QT>This is the name of the backup folder. Click on <B>Browse</B>, for " -"opening a dialog which lets you easily select the backup folder. If the " -"backup folder is changed and it already contains backups, these are moved to " -"the new location.</QT>" -msgstr "" -"<QT>Dies ist der Name des Sicherungsordners. Klicken Sie auf <B>Durchsuchen</" -"B>, um einen Dialog zu öffnen welcher es Ihnen auf einfache Weise erlaubt, " -"den Sicherungsordner auszuwählen. Wenn beim Ändern des Sicherungsordners " -"dieser bereits Sicherungen enthält, so werden diese an die neue Stelle " -"verschoben.</QT>" - -#: setupdialog.cpp:83 -msgid "" -"<QT>Click here, for opening a dialog which lets you easily select the backup " -"folder. If the backup folder is changed and it already contains backups, " -"these are moved to the new location.</QT>" -msgstr "" -"<QT>Klicken Sie hier, um einen Dialog zu öffnen welcher es Ihnen auf " -"einfache Weise erlaubt, den Sicherungsordner auszuwählen. Wenn beim Ändern " -"des Sicherungsordners dieser bereits Sicherungen enthält, so werden diese an " -"die neue Stelle verschoben.</QT>" - -#: setupdialog.cpp:94 -msgid "Backup strategy" -msgstr "Sicherungs-Strategie" - -#: setupdialog.cpp:98 wizards.cpp:145 -msgid "&Incremental backup interval" -msgstr "Intervall für &inkrementelle Sicherung" - -#: setupdialog.cpp:102 setupdialog.cpp:115 -msgid "" -"<QT>If you select an interval here, <B>KPsion</B> creates an entry in your " -"Autostart directory which performs an incremental backup of selected drives. " -"If your Psion is not connected at that time, nothing will happen.</QT>" -msgstr "" -"<QT>Wenn Sie hier ein Intervall wählen, legt <B>KPsion</B> einen Eintrag in " -"Ihrem Autostart-Ordner an. Dieser Eintrag bewirkt, daß bei jedem Start von " -"KDE <B>KPsion</B> überprüft, ob eine inkrementelle Sicherung nötig ist und " -"diese ggf. durchführt. Wenn dabei kein Psion angeschlossen ist, wird die " -"Prüfung übersprungen.</QT>" - -#: setupdialog.cpp:120 wizards.cpp:153 -msgid "&Full backup interval" -msgstr "Intervall für &Komplett-Sicherung" - -#: setupdialog.cpp:123 setupdialog.cpp:136 -msgid "" -"<QT>If you select an interval here, <B>KPsion</B> creates an entry in your " -"Autostart directory which performs a full backup of selected drives. If your " -"Psion is not connected at that time, nothing will happen.</QT>" -msgstr "" -"<QT>Wenn Sie hier ein Intervall wählen, legt <B>KPsion</B> einen Eintrag in " -"Ihrem Autostart-Ordner an. Dieser Eintrag bewirkt, daß bei jedem Start von " -"KDE <B>KPsion</B> überprüft, ob eine Vollsicherung nötig ist und diese ggf. " -"durchführt. Wenn dabei kein Psion angeschlossen ist, wird die Prüfung " -"übersprungen.</QT>" - -#: setupdialog.cpp:141 wizards.cpp:161 -msgid "Backup &generations" -msgstr "Sicherungs-&Generationen" - -#: setupdialog.cpp:144 setupdialog.cpp:157 -msgid "" -"<QT>Specify the number of backup generations you want to keep on your " -"machine. One backup generation means a full backup of a drive plus " -"eventually made incrmental backups of that drive. This is checked every " -"time, a full backup is done and if the number of existing backups is " -"exceeded, the oldest backup and its corresponding incremental backups are " -"deleted.</QT>" -msgstr "" -"<QT>Geben Sie die gewünschte Anzahl der Sicherungs-Generationen die auf dem " -"Rechner bereitgehalten werden sollen. Unter einer Sicherungs-Generation ist " -"eine Vollsicherung, sowie eventuell darauf aufbauende inkrementelle " -"Sicherungen zu verstehen. Jedesmal, wenn eine Vollsicherung durchgeführt " -"wurde und dabei die Anzahl der Generationen überschritten wurde, wird die " -"jeweils älteste Vollsicherung und die auf ihr aufbauenden inkrementellen " -"Sicherungen gelöscht.</QT>" - -#: setupdialog.cpp:168 -msgid "&Connection" -msgstr "&Verbindung" - -#: setupdialog.cpp:171 wizards.cpp:205 -msgid "&Connection retry interval (sec.)" -msgstr "&Verbindungsaufbau-Intervall (in sek.)" - -#: setupdialog.cpp:175 setupdialog.cpp:184 -msgid "" -"<QT>If this is not 0, <B>KPsion</B> attempts to retry connection setup.</QT>" -msgstr "" -"<QT>Wenn Sie hier eine Zahl ungleich 0 angeben, so wird <B>KPsion</B> beim " -"Scheitern eines Verbindungsaufbaus weitere Verbindungsversuche im " -"angegebenen Intervall ausführen.</QT>" - -#: setupdialog.cpp:187 wizards.cpp:213 -msgid "Serial &device" -msgstr "&Serielle Schnittstelle" - -#: setupdialog.cpp:190 setupdialog.cpp:210 -msgid "" -"<QT>If a device is selected here and the connection can not established at " -"startup, <B>KPsion</B> will attempt to start the ncpd daemon with " -"appropriate parameters.</QT>" -msgstr "" -"<QT>Wenn Sie hier eine Schnittstelle auswählen, so wird <B>KPsion</B> beim " -"Scheitern eines Verbindungsaufbaus zunächst versuchen, den hierzu " -"erforderlichen Hintergrund-Prozess <B>ncpd</B> mit den entsprechenden " -"Parametern zu starten.</QT>" - -#: setupdialog.cpp:214 wizards.cpp:222 -msgid "Serial &speed" -msgstr "Schnittstellen-&Geschwindigkeit" - -#: setupdialog.cpp:217 setupdialog.cpp:234 -msgid "" -"<QT>If a device is selected at <B>Serial device</B> and the connection can " -"not established at startup, <B>KPsion</B> will attempt to start the ncpd " -"daemon with appropriate parameters.</QT>" -msgstr "" -"<QT>Wenn Sie in der Auswahlbox eine Schnittstelle auswählen, so wird " -"<B>KPsion</B> beim Scheitern eines Verbindungsaufbaus zunächst versuchen, " -"den hierzu erforderlichen Hintergrund-Prozess <B>ncpd</B> mit den " -"entsprechenden Parametern zu starten.</QT>" - -#: setupdialog.cpp:242 -msgid "&Machines" -msgstr "&Geräte" - -#: setupdialog.cpp:246 -msgid "Machine &UID" -msgstr "Geräte &UID" - -#: setupdialog.cpp:249 setupdialog.cpp:261 -msgid "" -"<QT>This shows the known machines. Select an entry here and you will be able " -"to change its name and specify the drives that should be selected for " -"automatic backups. You also can delete a machine which includes deleting all " -"backups for it.</QT>" -msgstr "" -"<QT>Hier werden die <B>KPsion</B> bekannten Geräte angezeigt. Wenn Sie ein " -"Gerät aus der Liste auswählen, so können Sie dessen Name ändern und die " -"Laufwerke wählen, die für eine automatische Sicherung in Betracht kommen. " -"Sie können auch ein Gerät aus der Liste löschen, was zur Folge hat, daß " -"sämtliche Sicherungen dieses Geräts gelöscht werden.</QT>" - -#: setupdialog.cpp:267 -msgid "Machine &Name" -msgstr "Geräte&name" - -#: setupdialog.cpp:270 setupdialog.cpp:277 -msgid "" -"<QT>You can change the name of the machine here. The name is not used " -"internally but only provided for display purposes.</QT>" -msgstr "" -"<QT>Hier können Sie den Namen des Geräts ändern. Der Name wird nur zum Zweck " -"der Anzeige benutzt und hat ansonsten für das Programm keine Bedeutung.</QT>" - -#: setupdialog.cpp:280 -msgid "Delete" -msgstr "Löschen" - -#: setupdialog.cpp:284 -msgid "" -"<QT>Click here to delete the selected machine from the list of known " -"machines. This includes deleting all backups of that machine.</QT>" -msgstr "" -"<QT>Klicken Sie hier, um das gewählte Gerät aus der Liste der bekannten " -"Geräte zu entfernen. Dies schließt das Löschen sämtlicher Sicherungen dieses " -"Geräts ein.</QT>" - -#: setupdialog.cpp:289 -msgid "Automatic backup drives" -msgstr "Auto-Sicherungs-Laufwerke" - -#: setupdialog.cpp:299 -msgid "" -"<QT>Here, you can select the drives which shall be included in atomatic " -"backups.</QT>" -msgstr "" -"<QT>Wählen Sie hier die Laufwerke aus, welche bei automatischen Sicherungen " -"berücksichtigt werden sollen.</QT>" - -#: setupdialog.cpp:358 -msgid "" -"<QT>Removing a machine also removes all backups of this machine.<BR/><B>This " -"can not be reverted!</B><BR/>Do you really want to remove the machine %1 (%" -"2)?</QT>" -msgstr "" -"<QT>Mit dem Entfernen eines Geräts werden auch sämtliche Sicherungen dieses " -"Geräts gelöscht.<BR/><B>Dies kann nicht rückgängig gemacht werden!</B><BR/" -">Wollen Sie wirklich das Gerät %1 (%2) löschen?</QT>" - -#: setupdialog.cpp:374 -msgid "Could not remove backup file %1." -msgstr "Konnte Sicherungs-Datei %1 nicht entfernen." - -#: setupdialog.cpp:526 wizards.cpp:365 -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>" - -#: setupdialog.cpp:531 wizards.cpp:370 -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" - -#: setupdialog.cpp:536 wizards.cpp:375 -msgid "" -", because you either don't have sufficient rights to do that, or the " -"filesystem is readonly." -msgstr "" -", weil Sie entweder nicht die nötigen Rechte besitzen, oder das Dateisystem " -"nur lesbar ist." - -#: setupdialog.cpp:540 wizards.cpp:379 -msgid ", because the filesystem has not enough space." -msgstr ", weil auf dem Dateisystem kein Platz mehr ist." - -#: setupdialog.cpp:546 wizards.cpp:385 -msgid ", because there already exists another object with the same name." -msgstr ", weil schon ein anderes Objekt mit dem selben Namen existiert." - -#: setupdialog.cpp:556 wizards.cpp:395 -msgid "" -", because you specified a path which probably contains a dangling symbolic " -"link." -msgstr "" -", weil Sie eine Pfad angegeben haben, der eine nicht aufgelöste symbolische " -"Verknüpfung enthält." - -#: setupdialog.cpp:559 wizards.cpp:398 -msgid "" -", because you specified a path which contains an element which is not a " -"folder." -msgstr "" -", weil Sie eine Pfad angegeben haben, der ein Element enthält, welches kein " -"Ordner ist." - -#: setupdialog.cpp:563 wizards.cpp:402 -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." - -#: setupdialog.cpp:570 wizards.cpp:409 -msgid "<BR/>Please select another folder.</QT>" -msgstr "<BR/>Bitte wählen Sie einen anderen Ordner.</QT>" - -#: setupdialog.cpp:594 -msgid "Could not move existing backup for machine %1 to %2." -msgstr "Konnte bestehende Sicherung für Gerät %1 nicht nach %2 verlagern." - -#: statusbarprogress.cpp:358 statusbarprogress.cpp:371 -#: statusbarprogress.cpp:380 statusbarprogress.cpp:393 -#: statusbarprogress.cpp:402 statusbarprogress.cpp:413 -msgid "%1 %2 of %3" -msgstr "%1 %2 von %3" - -#: wizards.cpp:52 -msgid "KPsion Configuration" -msgstr "KPsion Einrichtung" - -#: wizards.cpp:54 wizards.cpp:429 -msgid "Click this button to continue with the next page." -msgstr "" -"Betätigen Sie diese Schaltfläche um mit der nächsten Seite fortzufahren." - -#: wizards.cpp:56 wizards.cpp:431 -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:58 -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 "" -"<QT>Wenn Sie diese Schaltfläche betätigen, wird die Konfiguration von " -"<B>KPsion</B> abgebrochen. Beim nächsten Start von <B>KPsion</B> wird dann " -"die Konfiguration erneut gestartet.</QT>" - -#: wizards.cpp:69 -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 " -"following pages, we will gather some information, which is needed for " -"working with <B>KPsion</B>.</BR> </BR>Have fun.</QT>" -msgstr "" -"<QT><H2>Willkommen bei KPsion!</H2>Offensichtlich haben Sie <B>KPsion</B> " -"zum ersten Mal gestartet. Jedenfalls kann ich keine gültige Konfiguration " -"finden.</BR>Auf den folgenden Seiten werden wir einige Informationen " -"sammeln, die für die Arbeit mit <B>KPsion</B> nötig sind.</BR> </BR>Viel " -"Spaß.</QT>" - -#: wizards.cpp:86 -msgid "<QT><BIG><B>Welcome<B></BIG></QT>" -msgstr "<QT><BIG><B>Willkommen<B></BIG></QT>" - -#: wizards.cpp:94 -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 " -"somewhere in your home directory. Please browse through existing folders and " -"select a suitable location or simply accept the default shown below.</QT>" -msgstr "" -"<QT>Zuerst benötigen wir einen Ordner zum Speichern der Sicherungen Ihres " -"Psion. Sie wollen vielleicht nicht, daß Andere darauf Zugriff haben. Daher " -"ist es am Besten, wenn Sie einen Ordner in Ihrem persönlichen Verzeichnis " -"wählen. Bitte durchsuchen Sie existierende Ordner und wählen dabei eine " -"adäquate Stelle oder akzeptieren Sie einfach die unten angezeigte Vorgabe.</" -"QT>" - -#: wizards.cpp:110 -msgid "This is the name of the backup folder." -msgstr "Dies ist der Name des Sicherungs-Ordners." - -#: wizards.cpp:112 -msgid "" -"Click here, for opening a dialog which lets you easily select the backup " -"folder." -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:127 -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:134 -msgid "" -"<QT>Next, please specify some information regarding backup policy:" -"<UL><LI>How many generations of backups do you want to keep?</LI><LI>Shall i " -"perform automatic backups?</LI><LI>If yes, in what intervals do you want to " -"happen backups?</LI></UL></QT>" -msgstr "" -"<QT>Als nächstes geben Sie bitte einige Informationen zur Sicherungs-" -"Strategie an:<UL><LI>Wie viele Sicherungs-Generationen wollen Sie aufheben?</" -"LI><LI>Soll ich automatische Sicherungen vornehmen?</LI><LI>Wenn ja, in " -"welchen Intervallen?</LI></UL></QT>" - -#: wizards.cpp:181 -msgid "<QT><BIG><B>Step 2</B></BIG> - Backup policy</QT>" -msgstr "<QT><BIG><B>Schritt 2</B></BIG> - Sicherungs-Strategie</QT>" - -#: wizards.cpp:189 -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 " -"which a connection attempt should happen. If you don't want automatic retry, " -"set the interval to zero. Furthermore, <B>KPsion</B> can try to start ncpd " -"if it is not already running. For that to work correctly, you need " -"to<UL><LI>specify the serial port to use.</LI><LI>specify the baud rate</" -"LI><LI>have permission to use the specified port</LI></UL></QT>" -msgstr "" -"<QT>Wenn beim Programmstart keine Verbindung aufgebaut werden kann, wird " -"<B>KPsion</B> in regelmäßigen Abständen versuchen erneut eine Verbindung " -"aufzubauen. Bitte geben Sie denZeitintervall an, nach dem ein erneuter " -"Aufbau der Verbindung versucht werden soll. Wenn Sie diese automatische " -"Funktionalität nicht wünschen, dann setzen Sie bitte den Intervall auf 0. " -"Weiterhin kann <B>KPsion</B> versuchen, den hierzu benötigten Prozess ncpd " -"zu starten falls dieser nicht schon läuft. Um dies zu ermöglichen, müssen " -"Sie<UL><LI>den zu benutzenden seriellen Port angeben.</LI><LI>die " -"Schnittstellengeschwindigkeit angeben</LI><LI>die Rechte zum Öffnen des " -"angegebenen Ports besitzen</LI></UL></QT>" - -#: wizards.cpp:244 -msgid "<QT><BIG><B>Step 3</B></BIG> - Connection parameters</QT>" -msgstr "<QT><BIG><B>Schritt 3</B></BIG> - Verbindungs-Parameter</QT>" - -#: wizards.cpp:252 -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 " -"system level), then <B>KPsion</B> will bring up a similar Dialog like this " -"which lets you assing a Name for it. After that, i suggest performing a full " -"Backup.<BR/>Please click <B>Finish</B> now.</QT>" -msgstr "" -"<QT>Das war's!<BR/>Als nächstes wird <B>KPsion</B> gestartet und wenn Ihr " -"Psion schon angeschlossen ist und auch seine Kommunikation eingeschaltet ist " -"(benutzen sie dazu <B>Strg-T</B> auf Systemebene), dann wird <B>KPsion</B> " -"einen weiteren Dialog ähnlich wie Diesen zur Eingabe des Namens " -"präsentieren. Hinterher empfehle ich, als Erstes eine Komplett-Sicherung " -"durchzuführen.<BR/>Bitte betätigen Sie nun die Schaltfläche <B>Abschließen</" -"B>.</QT>" - -#: wizards.cpp:271 -msgid "<QT><BIG><B>Finished</B></BIG></QT>" -msgstr "<QT><BIG><B>Fertig<B></BIG></QT>" - -#: wizards.cpp:289 -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 "" -"<QT>Sie sind im Begriff die erstmalige Konfiguration von <B>KPsion</B> " -"abzubrechen.Es werden keine Einstellungen gespeichert und sie werden diesen " -"Vorgang wiederholen müssen, wenn Sie <B>KPsion</B> das nächste Mal starten." -"<BR/>Wollen Sie das Programm wirklich verlassen?</QT>" - -#: wizards.cpp:425 -msgid "New Psion detected" -msgstr "Neuer Psion erkannt" - -#: wizards.cpp:433 -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 "" -"<QT>Wenn Sie diese Schaltfläche betätigen, werden die Einstellungen für 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:442 -msgid "" -"<QT>The Psion with the unique ID <B>%1</B> is connected the first time. " -"Please assign a name to it.</QT>" -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:449 -msgid "&Name of new Psion" -msgstr "&Name des neuen Psion" - -#: wizards.cpp:451 -msgid "My new Psion" -msgstr "Mein neuer Psion" - -#: wizards.cpp:468 -msgid "<QT><BIG><B>New Psion detected<B></BIG></QT>" -msgstr "<QT><BIG><B>Neuer Psion erkannt<B></BIG></QT>" - -#: wizards.cpp:476 -msgid "" -"<QT>Please select the Drive(s), you want to be backed up when running in " -"unattended backup mode.</QT>" -msgstr "" -"<QT>Bitte wählen sie die Laufwerke aus, die bei einer automatischen " -"Sicherung gesichertwerden sollen.</QT>" - -#: wizards.cpp:484 -msgid "Available drives" -msgstr "Verfügbare Laufwerke" - -#: wizards.cpp:508 -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:531 -msgid "The name cannot be empty." -msgstr "Der Name darf nicht leer sein." - -#: wizards.cpp:538 -msgid "" -"<QT>The name <B>%1</B> is already assigned to another machine.<BR/>Please " -"choose a different name.</QT>" -msgstr "" -"<QT>Der Name <B>%1</B> wurde bereits einem anderen Gerät zugewiesen.<BR/" -">Bitte wählen Sie einen anderen Namen.</QT>" - -#~ msgid "KPsionCheckListItem" -#~ msgstr "KPsionCheckListItem" - -#~ msgid "KPsionBackupListView" -#~ msgstr "KPsionBackupListView" - -#~ msgid "KPsionMainWindow" -#~ msgstr "KPsionMainWindow" - -#~ msgid "KPsionRestoreDialog" -#~ msgstr "KPsionRestoreDialog" - -#~ msgid "SetupDialog" -#~ msgstr "SetupDialog" - -#~ msgid "KPsionStatusBarProgress" -#~ msgstr "KPsionStatusBarProgress" - -#~ msgid "FirstTimeWizard" -#~ msgstr "FirstTimeWizard" - -#~ msgid "NewPsionWizard" -#~ msgstr "NewPsionWizard" diff --git a/kde2/po/de/libplpprops.po b/kde2/po/de/libplpprops.po deleted file mode 100644 index 0175640..0000000 --- a/kde2/po/de/libplpprops.po +++ /dev/null @@ -1,542 +0,0 @@ -# Messages for plptools. -# Copyright (C) 2001 Free Software Foundation, Inc. -# Fritz Elfert <felfert@to.com>, 2001. -# -msgid "" -msgstr "" -"Project-Id-Version: plptools 0.11\n" -"POT-Creation-Date: 2002-07-07 23:27+0200\n" -"PO-Revision-Date: 2002-03-20 02:55CET\n" -"Last-Translator: Fritz Elfert <felfert@to.com>\n" -"Language-Team: Deutsch <de@li.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: KBabel 0.9.5\n" - -#: plpprops.cc:154 -msgid "&Permissions" -msgstr "&Berechtigungen" - -#: plpprops.cc:156 plpprops.cc:672 -msgid "&General" -msgstr "&Allgemein" - -#: plpprops.cc:218 -msgid "Readable" -msgstr "Lesen" - -#: plpprops.cc:219 -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 werden." - -#: plpprops.cc:224 -msgid "Writeable" -msgstr "Schreiben" - -#: plpprops.cc:225 -msgid "If this is checked, write permission is granted." -msgstr "" -"Ist dieser Schalter aktiviert, so wird die Berechtigung zum Schreiben " -"erteilt." - -#: plpprops.cc:230 -msgid "Hidden" -msgstr "Versteckt" - -#: plpprops.cc:231 plpprops.cc:237 -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." - -#: plpprops.cc:236 -msgid "System" -msgstr "System" - -#: plpprops.cc:242 -msgid "Archive" -msgstr "Archiv" - -#: plpprops.cc:243 -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:251 -msgid "Executable" -msgstr "Ausführen" - -#: plpprops.cc:252 -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." - -#: plpprops.cc:257 -msgid "Stream" -msgstr "Stream" - -#: plpprops.cc:258 -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." - -#: plpprops.cc:263 -msgid "Text" -msgstr "Text" - -#: plpprops.cc:264 -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." - -#: plpprops.cc:272 -msgid "Normal" -msgstr "Normal" - -#: plpprops.cc:273 -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 ist nicht auf Ordner anwendbar." - -#: plpprops.cc:278 -msgid "Temporary" -msgstr "Temporär" - -#: plpprops.cc:279 -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 ist nicht auf Ordner anwendbar." - -#: plpprops.cc:284 -msgid "Compressed" -msgstr "Komprimiert" - -#: plpprops.cc:285 -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 ist nicht auf Ordner anwendbar." - -#: plpprops.cc:305 -msgid "Psion &Attributes" -msgstr "Psion &Attribute" - -#: plpprops.cc:310 -msgid "Path on Psion:" -msgstr "Pfad auf dem Psion:" - -#: plpprops.cc:317 -msgid "Generic attributes" -msgstr "Allgemeine Attribute" - -#: plpprops.cc:331 -msgid "Machine specific attributes" -msgstr "Geräte-spezifische Attribute" - -#: plpprops.cc:515 -msgid "Psion &Drive" -msgstr "Psion &Laufwerk" - -#: plpprops.cc:525 -msgid "Information" -msgstr "Information" - -#: plpprops.cc:531 -msgid "Type" -msgstr "Typ" - -#: plpprops.cc:537 -msgid "The type of the drive is shown here." -msgstr "Der Laufwerkstyp wird hier angezeigt." - -#: plpprops.cc:539 -msgid "Total capacity" -msgstr "Gesamtkapazität" - -#: plpprops.cc:542 plpprops.cc:550 plpprops.cc:558 -msgid " " -msgstr " " - -#: plpprops.cc:545 -msgid "This shows the total capacity of the drive." -msgstr "Hier wird die Gesamtkapazität des Laufwerks angezeigt." - -#: plpprops.cc:547 -msgid "Free space" -msgstr "Freier Speicherplatz" - -#: plpprops.cc:553 -msgid "This shows the available space of the drive." -msgstr "Hier können Sie den freien Speicherplatz des Laufwerks ablesen." - -#: plpprops.cc:555 -msgid "Unique ID" -msgstr "Eindeutige ID" - -#: plpprops.cc:561 -msgid "This shows unique ID of the drive. For ROM drives, this is always 0." -msgstr "" -"Hier wird die eindeutige ID des Laufwerks angezeigt. Für ROM-Laufwerke ist " -"dies stets 0." - -#: plpprops.cc:565 -msgid "" -"Here, the usage of the drive is shown in a pie diagram. The purple area " -"shows used space, the blue area shows free space." -msgstr "" -"Hier sehen Sie die Belegung des Laufwerks als Tortendiagramm. Der violette " -"Bereich kennzeichnet den belegten Speicherplatz, der blaue Bereich " -"repräsentiert den freien Speicherplatz." - -#: plpprops.cc:573 -msgid "Backup" -msgstr "Sicherung" - -#: plpprops.cc:577 -msgid "" -"Click here, to do a backup of this drive. This launches KPsion to perform " -"that task." -msgstr "" -"Klicken Sie hier, um eine Sicherung dieses Laufwerks durchzuführen. Zu " -"diesem Zweck wird KPsion gestartet." - -#: plpprops.cc:579 -msgid "Restore" -msgstr "Rücksicherung" - -#: plpprops.cc:584 -msgid "" -"Click here, to do a restore of this drive. This launches KPsion to perform " -"that task." -msgstr "" -"Klicken Sie hier, um eine Rücksicherung dieses Laufwerks durchzuführen. Zu " -"diesem Zweck wird KPsion gestartet." - -#: plpprops.cc:586 -msgid "Format" -msgstr "Formatieren" - -#: plpprops.cc:591 -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." - -#: plpprops.cc:677 -msgid "Information for Psion drive %1: (%2)" -msgstr "Information zum Psion Laufwerk %1: (%2)" - -#: plpprops.cc:752 -msgid "Psion &Machine" -msgstr "Psion &Gerät" - -#: plpprops.cc:755 -msgid "General" -msgstr "Allgemein" - -#: plpprops.cc:760 -msgid "Machine type:" -msgstr "Gerätetyp" - -#: plpprops.cc:762 -msgid "Here, the type of the connected device is shown." -msgstr "Dies ist der Typ des angeschlossenen Geräts." - -#: plpprops.cc:763 -msgid "Model name:" -msgstr "Modellbezeichnung:" - -#: plpprops.cc:765 -msgid "Here, the model name of the connected device is shown." -msgstr "Dies ist die Modellbezeichnung des gerade angeschlossenen Geräts." - -#: plpprops.cc:766 -msgid "Machine UID:" -msgstr "Gerätenummer:" - -#: plpprops.cc:768 -msgid "Here, the unique ID of the connected device is shown." -msgstr "Dies ist die Seriennummer des gerade angeschlossenen Geräts." - -#: plpprops.cc:769 -msgid "UI language:" -msgstr "Schnittstellensprache:" - -#: plpprops.cc:771 -msgid "Here, the user interface language of the connected device is shown." -msgstr "" -"Hier wird die Sprache der Benutzerschnittstelle des angeschlossenen Geräts " -"angezeigt." - -#: plpprops.cc:772 -msgid "Display geometry:" -msgstr "Anzeigeformat:" - -#: plpprops.cc:774 -msgid "Here, the display geometry of the connected device is shown." -msgstr "" -"Hier sehen Sie die Größe der Anzeigeeinheit des angeschlossenen Geräts." - -#: plpprops.cc:775 -msgid "Registry size:" -msgstr "Registrierdatenbank:" - -#: plpprops.cc:777 -msgid "Here, the size of the registry data is shown." -msgstr "Hier wird die Größe der Registrierdatenbank angezeigt." - -#: plpprops.cc:782 -msgid "Time" -msgstr "Zeit" - -#: plpprops.cc:786 -msgid "Date/Time:" -msgstr "Datum/Zeit:" - -#: plpprops.cc:788 -msgid "Here, the current time setting of the connected device is shown." -msgstr "" -"Hier wird die aktuell eingestellte Zeit des angeschlossenen Geräts angezeigt." - -#: plpprops.cc:789 -msgid "UTC offset" -msgstr "UTC-Abweichung:" - -#: plpprops.cc:791 -msgid "" -"Here, the offset of the connected device's time zone relative to GMT is " -"shown." -msgstr "" -"Hier sehen Sie die Zeitdifferenz der auf dem angeschlossenen Gerät " -"eingestellten Zeitzone relativ zur Greenwich Medium Time." - -#: plpprops.cc:792 -msgid "Daylight saving" -msgstr "Sommerzeit:" - -#: plpprops.cc:794 -msgid "" -"Here, you can see, if daylight saving time is currently active on the " -"connected device." -msgstr "" -"Hier können Sie ablesen, ob auf dem angeschlossenen Gerät gerade Sommerzeit " -"aktiv ist." - -#: plpprops.cc:800 -msgid "Psion &Battery" -msgstr "Psion &Batterie" - -#: plpprops.cc:802 -msgid "Main battery" -msgstr "Haupt-Batterie" - -#: plpprops.cc:806 -msgid "Changed at:" -msgstr "Gewechselt am:" - -#: plpprops.cc:808 -msgid "This shows the time of last battery change." -msgstr "Hier wird die Zeit des letzten Batteriewechsels angezeigt." - -#: plpprops.cc:809 plpprops.cc:855 -msgid "Usage time:" -msgstr "Nutzungszeit:" - -#: plpprops.cc:811 -msgid "This shows the accumulated time of running on battery power." -msgstr "Hier wird die aufsummierte Nutzungszeit mit Batteriestrom angezeigt." - -#: plpprops.cc:812 plpprops.cc:835 -msgid "Status:" -msgstr "Status:" - -#: plpprops.cc:814 -msgid "This shows current status of the battery." -msgstr "Dies zeigt den aktuellen Zustand der Batterie an." - -#: plpprops.cc:815 -msgid "Total consumed power:" -msgstr "Leistungsverbrauch:" - -#: plpprops.cc:817 -msgid "This shows accumulated power consumtion of the device." -msgstr "Hier wird die aufsummierte Leistungsaufnahme des Geräts angezeigt." - -#: plpprops.cc:818 -msgid "Current:" -msgstr "Strom:" - -#: plpprops.cc:820 -msgid "This shows the current, drawn from power supply (battery or mains)." -msgstr "Hier wird die Stromaufnahme (Batterie oder Netz) angezeigt." - -#: plpprops.cc:821 plpprops.cc:838 -msgid "Voltage:" -msgstr "Spannung:" - -#: plpprops.cc:823 -msgid "This shows the current battery voltage." -msgstr "Hier sehen Sie die aktuelle Batteriespannung." - -#: plpprops.cc:824 plpprops.cc:841 -msgid "Max. voltage:" -msgstr "Max. Spannung:" - -#: plpprops.cc:826 -msgid "This shows the maximum battery voltage." -msgstr "Hier wird die maximale Batteriespannung angezeigt." - -#: plpprops.cc:831 -msgid "Backup battery" -msgstr "Sicherungs-Batterie" - -#: plpprops.cc:837 -msgid "This shows current status of the backup battery." -msgstr "Hier Sehen Sie den aktuellen Zustand der Sicherungsbatterie." - -#: plpprops.cc:840 -msgid "This shows the current backup battery voltage." -msgstr "Hier wird die aktuelle Spannung der Sicherungsbatterie angezeigt." - -#: plpprops.cc:843 -msgid "This shows the maximum backup battery voltage." -msgstr "Hier wird die maximale Spannung der Sicherungsbatterie angezeigt." - -#: plpprops.cc:848 -msgid "External power" -msgstr "Externe Stromversorgung" - -#: plpprops.cc:852 -msgid "Supplied:" -msgstr "Angeschlossen:" - -#: plpprops.cc:854 -msgid "This shows whether external power is currently supplied." -msgstr "Hier wird angezeigt, ob der Psion im Moment extern versort wird." - -#: plpprops.cc:857 -msgid "This shows the accumulated time of running on external power." -msgstr "" -"Hier wird die aufsummierte Nutzungszeit mit externer Versorgung angezeigt." - -#: plpprops.cc:863 -msgid "Psion M&emory" -msgstr "Psion &Speicher" - -#: plpprops.cc:866 -msgid "ROM" -msgstr "ROM" - -#: plpprops.cc:870 -msgid "Version:" -msgstr "Version:" - -#: plpprops.cc:872 -msgid "This shows the firmware version." -msgstr "Hier wird die Firmware-Version angezeigt." - -#: plpprops.cc:873 plpprops.cc:887 -msgid "Size:" -msgstr "Größe:" - -#: plpprops.cc:875 -msgid "This shows the size of the ROM." -msgstr "Hier wird die Speicherkapazität des ROM angezeigt." - -#: plpprops.cc:876 -msgid "Programmable:" -msgstr "Programmierbar:" - -#: plpprops.cc:878 -msgid "This shows, whether the ROM is flashable or not." -msgstr "Hier wird angezeigt, ob das ROM programmierbar (flashbar) ist." - -#: plpprops.cc:883 -msgid "RAM" -msgstr "RAM" - -#: plpprops.cc:889 -msgid "This shows the total capacity of the RAM." -msgstr "Hier wird die Gesamt-Speicherkapazität des RAM angezeigt." - -#: plpprops.cc:890 -msgid "Free:" -msgstr "Frei:" - -#: plpprops.cc:892 -msgid "This shows the free capacity of the RAM." -msgstr "Dies zeigt die freie Speicherkapazität des RAM an." - -#: plpprops.cc:893 -msgid "Max. free:" -msgstr "Max. frei:" - -#: plpprops.cc:895 -msgid "This shows the size of the largest free block of the RAM." -msgstr "" -"Dies zeigt die Speicherkapazität des größten freien Speicherblocks im RAM an." - -#: plpprops.cc:896 -msgid "RAMDisk size:" -msgstr "RAMDisk Größe:" - -#: plpprops.cc:898 -msgid "This shows, how much RAM is currently used for the RAMDisc." -msgstr "" -"Hier wird angezeigt, wieviel Speicher gerade von der RAMDisk belegt wird." - -#: plpprops.cc:952 plpprops.cc:975 -msgid "yes" -msgstr "ja" - -#: plpprops.cc:952 plpprops.cc:975 -msgid "no" -msgstr "nein" - -#: plpprops.cc:973 -msgid "%1 seconds" -msgstr "%1 Sekunden" - -#: plpprops.cc:1011 -msgid "Yes" -msgstr "Ja" - -#: plpprops.cc:1011 -msgid "No" -msgstr "Nein" - -#: plpprops.cc:1036 -msgid "Psion &Owner" -msgstr "Psion &Eigner" - -#: plpprops.cc:1042 -msgid "This shows the owner's information of the connected device." -msgstr "" -"Hier wird die Eigentümer-Information des angeschlossenen Geräts angezeigt." diff --git a/kde2/po/klipsi.pot b/kde2/po/klipsi.pot deleted file mode 100644 index d178847..0000000 --- a/kde2/po/klipsi.pot +++ /dev/null @@ -1,65 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Free Software Foundation, Inc. -# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2002-07-07 23:25+0200\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" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: main.cpp:36 -msgid "Klipsi" -msgstr "" - -#: main.cpp:37 -msgid "Psion remote clipboard utility" -msgstr "" - -#: main.cpp:44 -msgid "Original Developer/Maintainer" -msgstr "" - -#: toplevel.cpp:77 -msgid "Klipsi - Psion Clipboard" -msgstr "" - -#: toplevel.cpp:79 -msgid "&About Klipsi" -msgstr "" - -#: toplevel.cpp:80 -msgid "&Quit" -msgstr "" - -#: toplevel.cpp:574 -msgid "" -"<QT>Your Psion is reported to be a <B>Series 3</B> machine. This type of " -"machine does <B>not support</B> the remote clipboard protocol; Sorry.<BR/" -"><B>Klipsi</B> will now terminate.</QT>" -msgstr "" - -#: toplevel.cpp:578 toplevel.cpp:603 -msgid "Protocol not supported" -msgstr "" - -#: toplevel.cpp:594 -msgid "" -"<QT>Your Psion does not support the remote clipboard protocol.<BR/>The " -"reason for that is usually a missing server library on your Psion.<BR/>Make " -"shure, that <B>C:\\System\\Libs\\clipsvr.rsy</B> exists.<BR/>This file is " -"part of PsiWin and usually gets copied to your Psion when you enable " -"CopyAnywhere in PsiWin. You also get it from a PsiWin installation directory " -"and copy it to your Psion manually.<BR/><B>Klipsi</B> will now terminate.</" -"QT>" -msgstr "" - -#: toplevel.moc.cpp:34 toplevel.moc.cpp:42 -msgid "TopLevel" -msgstr "" diff --git a/kde2/po/kpsion.pot b/kde2/po/kpsion.pot deleted file mode 100644 index 2a5d5f1..0000000 --- a/kde2/po/kpsion.pot +++ /dev/null @@ -1,819 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2003-02-03 01:23+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" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: kpsionbackuplistview.cpp:261 -msgid "Available backups" -msgstr "" - -#: kpsionbackuplistview.cpp:300 -msgid "Full" -msgstr "" - -#: kpsionbackuplistview.cpp:307 -msgid "Incremental" -msgstr "" - -#: kpsionbackuplistview.cpp:314 -msgid "%1 backup, created at %2" -msgstr "" - -#: kpsionbackuplistview.cpp:355 -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 "" - -#: kpsionconfig.cpp:103 -msgid "off" -msgstr "" - -#: kpsionconfig.cpp:133 -msgid "none" -msgstr "" - -#: kpsionconfig.cpp:134 -msgid "daily" -msgstr "" - -#: kpsionconfig.cpp:135 -msgid "every 2 days" -msgstr "" - -#: kpsionconfig.cpp:136 -msgid "every 3 days" -msgstr "" - -#: kpsionconfig.cpp:137 -msgid "every 4 days" -msgstr "" - -#: kpsionconfig.cpp:138 -msgid "every 5 days" -msgstr "" - -#: kpsionconfig.cpp:139 -msgid "every 6 days" -msgstr "" - -#: kpsionconfig.cpp:140 -msgid "weekly" -msgstr "" - -#: kpsionconfig.cpp:141 -msgid "every 2 weeks" -msgstr "" - -#: kpsionconfig.cpp:142 -msgid "every 3 weeks" -msgstr "" - -#: kpsionconfig.cpp:143 -msgid "monthly" -msgstr "" - -#: kpsion.cpp:64 -msgid "Idle" -msgstr "" - -#: kpsion.cpp:130 -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.: " -"backup, restore or format.<br/>To unselect it, simply click on it again.<br/" -">Select as many drives a you want, then choose an operation.</qt>" -msgstr "" - -#: kpsion.cpp:200 -msgid "Start &Format" -msgstr "" - -#: kpsion.cpp:202 -msgid "Start Full &Backup" -msgstr "" - -#: kpsion.cpp:205 -msgid "Start &Incremental Backup" -msgstr "" - -#: kpsion.cpp:207 -msgid "Start &Restore" -msgstr "" - -#: kpsion.cpp:217 -msgid "Full backup of selected drive(s)" -msgstr "" - -#: kpsion.cpp:219 -msgid "Incremental backup of selected drive(s)" -msgstr "" - -#: kpsion.cpp:221 -msgid "Restore selected drive(s)" -msgstr "" - -#: kpsion.cpp:223 -msgid "Format selected drive(s)" -msgstr "" - -#: kpsion.cpp:300 -msgid "Retrieving machine info ..." -msgstr "" - -#: kpsion.cpp:305 -msgid "Could not get Psion machine type" -msgstr "" - -#: kpsion.cpp:313 -msgid "Could not get Psion machine info" -msgstr "" - -#: kpsion.cpp:336 -msgid "Could not read SIBO UID file" -msgstr "" - -#: kpsion.cpp:343 -msgid "Could not get Psion owner info" -msgstr "" - -#: kpsion.cpp:372 -msgid "Could not write SIBO UID file %1" -msgstr "" - -#: kpsion.cpp:388 -msgid "an unknown machine" -msgstr "" - -#: kpsion.cpp:399 -msgid "Retrieving drive list ..." -msgstr "" - -#: kpsion.cpp:402 -msgid "Could not get list of drives" -msgstr "" - -#: kpsion.cpp:433 kpsion.cpp:892 kpsion.cpp:915 kpsion.cpp:939 kpsion.cpp:1080 -#: kpsion.cpp:1344 kpsion.cpp:1509 kpsion.cpp:1518 kpsion.cpp:1549 -#: kpsion.cpp:1567 kpsion.cpp:1578 -msgid "Connected to %1" -msgstr "" - -#: kpsion.cpp:573 -msgid "" -"<QT>The selected drive <B>Z:</B> is a <B>ROM</B> drive and therefore cannot " -"be restored.</QT>" -msgstr "" - -#: kpsion.cpp:610 -msgid "" -"<QT>The selected drive <B>Z:</B> is a <B>ROM</B> drive and therefore cannot " -"be formatted.</QT>" -msgstr "" - -#: kpsion.cpp:639 -msgid "" -"A backup is running.\n" -"Do you really want to quit?" -msgstr "" - -#: kpsion.cpp:641 -msgid "" -"A restore is running.\n" -"Do you really want to quit?" -msgstr "" - -#: kpsion.cpp:643 -msgid "" -"A format is running.\n" -"Do you really want to quit?" -msgstr "" - -#: kpsion.cpp:663 -msgid "Starting ncpd daemon ..." -msgstr "" - -#: kpsion.cpp:699 -msgid "Connecting ..." -msgstr "" - -#: kpsion.cpp:705 -msgid "RFSV could not connect to ncpd at %1:%2. " -msgstr "" - -#: kpsion.cpp:708 kpsion.cpp:734 kpsion.cpp:761 kpsion.cpp:790 -msgid " (Retry in %1 seconds.)" -msgstr "" - -#: kpsion.cpp:729 -msgid "RFSV could not establish link: %1." -msgstr "" - -#: kpsion.cpp:754 -msgid "RPCS could not connect to ncpd at %1:%2." -msgstr "" - -#: kpsion.cpp:781 -msgid "RPCS could not establish link: %1." -msgstr "" - -#: kpsion.cpp:896 -msgid "Could not retrieve drive details for drive %1" -msgstr "" - -#: kpsion.cpp:901 -msgid "Scanning drive %1" -msgstr "" - -#: kpsion.cpp:911 -msgid "%1 files need backup" -msgstr "" - -#: kpsion.cpp:919 -msgid "No files need backup" -msgstr "" - -#: kpsion.cpp:941 -msgid "Could not create backup folder %1" -msgstr "" - -#: kpsion.cpp:968 -#, c-format -msgid "Backup %1% done" -msgstr "" - -#: kpsion.cpp:1004 -msgid "" -"<QT>Could not backup<BR/><B>%1</B><BR/><FONT COLOR=RED>%2</FONT><BR/></QT>" -msgstr "" - -#: kpsion.cpp:1007 -msgid "Retry" -msgstr "" - -#: kpsion.cpp:1007 -msgid "Ignore" -msgstr "" - -#: kpsion.cpp:1033 -msgid "Resetting archive attributes" -msgstr "" - -#: kpsion.cpp:1048 -msgid "" -"<QT>Could not set attributes of<BR/><B>%1</B><BR/><FONT COLOR=red>%2</" -"FONT><BR/>Continue?</QT>" -msgstr "" - -#: kpsion.cpp:1073 -msgid "" -"<QT>Could not rename backup archive from<BR/><B>%1</B> to<BR/><B>%2</B></QT>" -msgstr "" - -#: kpsion.cpp:1084 -msgid "Backup done" -msgstr "" - -#: kpsion.cpp:1120 -msgid "Removing old backups ..." -msgstr "" - -#: kpsion.cpp:1222 kpsion.cpp:1462 -msgid "<QT>Could not get attributes of<BR/><B>%1</B><BR/>Reason: %2</QT>" -msgstr "" - -#: kpsion.cpp:1251 -msgid "Overwrite" -msgstr "" - -#: kpsion.cpp:1254 -msgid "Overwrite &All" -msgstr "" - -#: kpsion.cpp:1273 -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:1311 -msgid "Reading backups ..." -msgstr "" - -#: kpsion.cpp:1316 -msgid "Selecting backups ..." -msgstr "" - -#: kpsion.cpp:1349 kpsion.cpp:1400 -#, c-format -msgid "Restore %1% done" -msgstr "" - -#: kpsion.cpp:1416 -msgid "<QT>Could not create directory<BR/><B>%1</B><BR/>Reason: %2</QT>" -msgstr "" - -#: kpsion.cpp:1431 -msgid "<QT>Could not create<BR/><B>%1</B><BR/>Reason: %2</QT>" -msgstr "" - -#: kpsion.cpp:1454 -msgid "<QT>Could not write to<BR/><B>%1</B><BR/>Reason: %2</QT>" -msgstr "" - -#: kpsion.cpp:1480 -msgid "<QT>Could not set attributes of<BR/><B>%1</B><BR/>Reason: %2</QT>" -msgstr "" - -#: kpsion.cpp:1493 -msgid "" -"<QT>Could not set modification time of<BR/><B>%1</B><BR/>Reason: %2</QT>" -msgstr "" - -#: kpsion.cpp:1520 -msgid "Restore done" -msgstr "" - -#: kpsion.cpp:1534 -msgid "Formatting drive %1:" -msgstr "" - -#: kpsion.cpp:1545 -msgid "<QT>Could not format drive %1:<BR/>%2</QT>" -msgstr "" - -#: kpsion.cpp:1562 -msgid "<QT>Error during format of drive %1:<BR/>%2</QT>" -msgstr "" - -#: kpsion.cpp:1580 -msgid "Format done" -msgstr "" - -#: kpsion.cpp:1586 -msgid "" -"<QT>This erases <B>ALL</B> data on the drive(s).<BR/>Do you really want to " -"proceed?" -msgstr "" - -#: kpsion.cpp:1607 -msgid "Assign drive name" -msgstr "" - -#: kpsion.cpp:1616 -msgid "" -"<QT>Formatting of drive %1: finished. Please assign a name for that drive.</" -"QT>" -msgstr "" - -#: kpsion.cpp:1620 -msgid "New name of drive %1:" -msgstr "" - -#: kpsion.cpp:1751 -msgid "Stopping %1" -msgstr "" - -#: kpsion.cpp:1769 -msgid "" -"<QT>Could not stop all processes.<BR/>Please stop running programs manually " -"on the Psion, then click <B>Ok</B>." -msgstr "" - -#: kpsion.cpp:1792 -msgid "Starting %1" -msgstr "" - -#: kpsionrestoredialog.cpp:35 -msgid "Restore" -msgstr "" - -#: kpsionrestoredialog.cpp:39 -msgid "Start" -msgstr "" - -#: kpsionrestoredialog.cpp:42 -msgid "" -"Select items in the list of available backups, then click here to start " -"restore of these items." -msgstr "" - -#: kpsionrestoredialog.cpp:53 -msgid "Format drive before restore" -msgstr "" - -#: main.cpp:49 -msgid "perform scheduled backup" -msgstr "" - -#: main.cpp:51 -msgid "perform backup" -msgstr "" - -#: main.cpp:53 -msgid "perform restore" -msgstr "" - -#: main.cpp:55 -msgid "format drive" -msgstr "" - -#: main.cpp:60 -msgid "KPsion" -msgstr "" - -#: main.cpp:62 -msgid "Psion connectivity utility" -msgstr "" - -#: main.cpp:67 -msgid "Original Developer/Maintainer" -msgstr "" - -#: main.cpp:105 -msgid "" -"The actions are mutually exclusive. I.e. You cannot specify more than one " -"action at once." -msgstr "" - -#: setupdialog.cpp:47 -msgid "Settings" -msgstr "" - -#: setupdialog.cpp:60 -msgid "&Backup" -msgstr "" - -#: setupdialog.cpp:63 setupdialog.cpp:435 wizards.cpp:279 -msgid "Backup folder" -msgstr "" - -#: setupdialog.cpp:74 wizards.cpp:107 -msgid "Browse" -msgstr "" - -#: setupdialog.cpp:77 -msgid "" -"<QT>This is the name of the backup folder. Click on <B>Browse</B>, for " -"opening a dialog which lets you easily select the backup folder. If the " -"backup folder is changed and it already contains backups, these are moved to " -"the new location.</QT>" -msgstr "" - -#: setupdialog.cpp:83 -msgid "" -"<QT>Click here, for opening a dialog which lets you easily select the backup " -"folder. If the backup folder is changed and it already contains backups, " -"these are moved to the new location.</QT>" -msgstr "" - -#: setupdialog.cpp:94 -msgid "Backup strategy" -msgstr "" - -#: setupdialog.cpp:98 wizards.cpp:145 -msgid "&Incremental backup interval" -msgstr "" - -#: setupdialog.cpp:102 setupdialog.cpp:115 -msgid "" -"<QT>If you select an interval here, <B>KPsion</B> creates an entry in your " -"Autostart directory which performs an incremental backup of selected drives. " -"If your Psion is not connected at that time, nothing will happen.</QT>" -msgstr "" - -#: setupdialog.cpp:120 wizards.cpp:153 -msgid "&Full backup interval" -msgstr "" - -#: setupdialog.cpp:123 setupdialog.cpp:136 -msgid "" -"<QT>If you select an interval here, <B>KPsion</B> creates an entry in your " -"Autostart directory which performs a full backup of selected drives. If your " -"Psion is not connected at that time, nothing will happen.</QT>" -msgstr "" - -#: setupdialog.cpp:141 wizards.cpp:161 -msgid "Backup &generations" -msgstr "" - -#: setupdialog.cpp:144 setupdialog.cpp:157 -msgid "" -"<QT>Specify the number of backup generations you want to keep on your " -"machine. One backup generation means a full backup of a drive plus " -"eventually made incrmental backups of that drive. This is checked every " -"time, a full backup is done and if the number of existing backups is " -"exceeded, the oldest backup and its corresponding incremental backups are " -"deleted.</QT>" -msgstr "" - -#: setupdialog.cpp:168 -msgid "&Connection" -msgstr "" - -#: setupdialog.cpp:171 wizards.cpp:205 -msgid "&Connection retry interval (sec.)" -msgstr "" - -#: setupdialog.cpp:175 setupdialog.cpp:184 -msgid "" -"<QT>If this is not 0, <B>KPsion</B> attempts to retry connection setup.</QT>" -msgstr "" - -#: setupdialog.cpp:187 wizards.cpp:213 -msgid "Serial &device" -msgstr "" - -#: setupdialog.cpp:190 setupdialog.cpp:210 -msgid "" -"<QT>If a device is selected here and the connection can not established at " -"startup, <B>KPsion</B> will attempt to start the ncpd daemon with " -"appropriate parameters.</QT>" -msgstr "" - -#: setupdialog.cpp:214 wizards.cpp:222 -msgid "Serial &speed" -msgstr "" - -#: setupdialog.cpp:217 setupdialog.cpp:234 -msgid "" -"<QT>If a device is selected at <B>Serial device</B> and the connection can " -"not established at startup, <B>KPsion</B> will attempt to start the ncpd " -"daemon with appropriate parameters.</QT>" -msgstr "" - -#: setupdialog.cpp:242 -msgid "&Machines" -msgstr "" - -#: setupdialog.cpp:246 -msgid "Machine &UID" -msgstr "" - -#: setupdialog.cpp:249 setupdialog.cpp:261 -msgid "" -"<QT>This shows the known machines. Select an entry here and you will be able " -"to change its name and specify the drives that should be selected for " -"automatic backups. You also can delete a machine which includes deleting all " -"backups for it.</QT>" -msgstr "" - -#: setupdialog.cpp:267 -msgid "Machine &Name" -msgstr "" - -#: setupdialog.cpp:270 setupdialog.cpp:277 -msgid "" -"<QT>You can change the name of the machine here. The name is not used " -"internally but only provided for display purposes.</QT>" -msgstr "" - -#: setupdialog.cpp:280 -msgid "Delete" -msgstr "" - -#: setupdialog.cpp:284 -msgid "" -"<QT>Click here to delete the selected machine from the list of known " -"machines. This includes deleting all backups of that machine.</QT>" -msgstr "" - -#: setupdialog.cpp:289 -msgid "Automatic backup drives" -msgstr "" - -#: setupdialog.cpp:299 -msgid "" -"<QT>Here, you can select the drives which shall be included in atomatic " -"backups.</QT>" -msgstr "" - -#: setupdialog.cpp:358 -msgid "" -"<QT>Removing a machine also removes all backups of this machine.<BR/><B>This " -"can not be reverted!</B><BR/>Do you really want to remove the machine %1 (%" -"2)?</QT>" -msgstr "" - -#: setupdialog.cpp:374 -msgid "Could not remove backup file %1." -msgstr "" - -#: setupdialog.cpp:526 wizards.cpp:365 -msgid "" -"<QT>The folder <B>%1</B> does <B>not</B> exist.<BR/>Shall it be created?</QT>" -msgstr "" - -#: setupdialog.cpp:531 wizards.cpp:370 -msgid "<QT>The specified folder<BR/><B>%1</B><BR/>could <B>not</B> be created" -msgstr "" - -#: setupdialog.cpp:536 wizards.cpp:375 -msgid "" -", because you either don't have sufficient rights to do that, or the " -"filesystem is readonly." -msgstr "" - -#: setupdialog.cpp:540 wizards.cpp:379 -msgid ", because the filesystem has not enough space." -msgstr "" - -#: setupdialog.cpp:546 wizards.cpp:385 -msgid ", because there already exists another object with the same name." -msgstr "" - -#: setupdialog.cpp:556 wizards.cpp:395 -msgid "" -", because you specified a path which probably contains a dangling symbolic " -"link." -msgstr "" - -#: setupdialog.cpp:559 wizards.cpp:398 -msgid "" -", because you specified a path which contains an element which is not a " -"folder." -msgstr "" - -#: setupdialog.cpp:563 wizards.cpp:402 -msgid ", because you specified a path which contains too many symbolic links." -msgstr "" - -#: setupdialog.cpp:570 wizards.cpp:409 -msgid "<BR/>Please select another folder.</QT>" -msgstr "" - -#: setupdialog.cpp:594 -msgid "Could not move existing backup for machine %1 to %2." -msgstr "" - -#: statusbarprogress.cpp:358 statusbarprogress.cpp:371 -#: statusbarprogress.cpp:380 statusbarprogress.cpp:393 -#: statusbarprogress.cpp:402 statusbarprogress.cpp:413 -msgid "%1 %2 of %3" -msgstr "" - -#: wizards.cpp:52 -msgid "KPsion Configuration" -msgstr "" - -#: wizards.cpp:54 wizards.cpp:429 -msgid "Click this button to continue with the next page." -msgstr "" - -#: wizards.cpp:56 wizards.cpp:431 -msgid "Click this button, to go to a previous page." -msgstr "" - -#: wizards.cpp:58 -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:69 -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 " -"following pages, we will gather some information, which is needed for " -"working with <B>KPsion</B>.</BR> </BR>Have fun.</QT>" -msgstr "" - -#: wizards.cpp:86 -msgid "<QT><BIG><B>Welcome<B></BIG></QT>" -msgstr "" - -#: wizards.cpp:94 -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 " -"somewhere in your home directory. Please browse through existing folders and " -"select a suitable location or simply accept the default shown below.</QT>" -msgstr "" - -#: wizards.cpp:110 -msgid "This is the name of the backup folder." -msgstr "" - -#: wizards.cpp:112 -msgid "" -"Click here, for opening a dialog which lets you easily select the backup " -"folder." -msgstr "" - -#: wizards.cpp:127 -msgid "<QT><BIG><B>Step 1</B></BIG> - Specify backup directory</QT>" -msgstr "" - -#: wizards.cpp:134 -msgid "" -"<QT>Next, please specify some information regarding backup policy:" -"<UL><LI>How many generations of backups do you want to keep?</LI><LI>Shall i " -"perform automatic backups?</LI><LI>If yes, in what intervals do you want to " -"happen backups?</LI></UL></QT>" -msgstr "" - -#: wizards.cpp:181 -msgid "<QT><BIG><B>Step 2</B></BIG> - Backup policy</QT>" -msgstr "" - -#: wizards.cpp:189 -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 " -"which a connection attempt should happen. If you don't want automatic retry, " -"set the interval to zero. Furthermore, <B>KPsion</B> can try to start ncpd " -"if it is not already running. For that to work correctly, you need " -"to<UL><LI>specify the serial port to use.</LI><LI>specify the baud rate</" -"LI><LI>have permission to use the specified port</LI></UL></QT>" -msgstr "" - -#: wizards.cpp:244 -msgid "<QT><BIG><B>Step 3</B></BIG> - Connection parameters</QT>" -msgstr "" - -#: wizards.cpp:252 -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 " -"system level), then <B>KPsion</B> will bring up a similar Dialog like this " -"which lets you assing a Name for it. After that, i suggest performing a full " -"Backup.<BR/>Please click <B>Finish</B> now.</QT>" -msgstr "" - -#: wizards.cpp:271 -msgid "<QT><BIG><B>Finished</B></BIG></QT>" -msgstr "" - -#: wizards.cpp:289 -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:425 -msgid "New Psion detected" -msgstr "" - -#: wizards.cpp:433 -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:442 -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:449 -msgid "&Name of new Psion" -msgstr "" - -#: wizards.cpp:451 -msgid "My new Psion" -msgstr "" - -#: wizards.cpp:468 -msgid "<QT><BIG><B>New Psion detected<B></BIG></QT>" -msgstr "" - -#: wizards.cpp:476 -msgid "" -"<QT>Please select the Drive(s), you want to be backed up when running in " -"unattended backup mode.</QT>" -msgstr "" - -#: wizards.cpp:484 -msgid "Available drives" -msgstr "" - -#: wizards.cpp:508 -msgid "<QT><BIG><B>Specify drives to backup<B></BIG></QT>" -msgstr "" - -#: wizards.cpp:531 -msgid "The name cannot be empty." -msgstr "" - -#: wizards.cpp:538 -msgid "" -"<QT>The name <B>%1</B> is already assigned to another machine.<BR/>Please " -"choose a different name.</QT>" -msgstr "" diff --git a/kde2/po/libplpprops.pot b/kde2/po/libplpprops.pot deleted file mode 100644 index b959bf8..0000000 --- a/kde2/po/libplpprops.pot +++ /dev/null @@ -1,499 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Free Software Foundation, Inc. -# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2002-07-07 23:27+0200\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" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: plpprops.cc:154 -msgid "&Permissions" -msgstr "" - -#: plpprops.cc:156 plpprops.cc:672 -msgid "&General" -msgstr "" - -#: plpprops.cc:218 -msgid "Readable" -msgstr "" - -#: plpprops.cc:219 -msgid "" -"If this is checked, read permission is granted. On series 5, this cannot " -"swiched off." -msgstr "" - -#: plpprops.cc:224 -msgid "Writeable" -msgstr "" - -#: plpprops.cc:225 -msgid "If this is checked, write permission is granted." -msgstr "" - -#: plpprops.cc:230 -msgid "Hidden" -msgstr "" - -#: plpprops.cc:231 plpprops.cc:237 -msgid "" -"If this is checked, the file is not shown when displaying the directory on " -"the Psion." -msgstr "" - -#: plpprops.cc:236 -msgid "System" -msgstr "" - -#: plpprops.cc:242 -msgid "Archive" -msgstr "" - -#: plpprops.cc:243 -msgid "" -"If this is checked, the file will be included in the next incremental backup." -msgstr "" - -#: plpprops.cc:251 -msgid "Executable" -msgstr "" - -#: plpprops.cc:252 -msgid "" -"If this is checked, the file can be executed on the Psion. This Attribute " -"does not apply to directories." -msgstr "" - -#: plpprops.cc:257 -msgid "Stream" -msgstr "" - -#: plpprops.cc:258 -msgid "" -"If this is checked, the file is a stream. This Attribute does not apply to " -"directories." -msgstr "" - -#: plpprops.cc:263 -msgid "Text" -msgstr "" - -#: plpprops.cc:264 -msgid "" -"If this is checked, the file is opened in text mode. This Attribute does not " -"apply to directories." -msgstr "" - -#: plpprops.cc:272 -msgid "Normal" -msgstr "" - -#: plpprops.cc:273 -msgid "" -"If this is checked, the file is considered regular. This Attribute does not " -"apply to directories." -msgstr "" - -#: plpprops.cc:278 -msgid "Temporary" -msgstr "" - -#: plpprops.cc:279 -msgid "" -"If this is checked, the file considered temporary. This Attribute does not " -"apply to directories." -msgstr "" - -#: plpprops.cc:284 -msgid "Compressed" -msgstr "" - -#: plpprops.cc:285 -msgid "" -"If this is checked, the file is stored in compressed mode. This Attribute " -"does not apply to directories." -msgstr "" - -#: plpprops.cc:305 -msgid "Psion &Attributes" -msgstr "" - -#: plpprops.cc:310 -msgid "Path on Psion:" -msgstr "" - -#: plpprops.cc:317 -msgid "Generic attributes" -msgstr "" - -#: plpprops.cc:331 -msgid "Machine specific attributes" -msgstr "" - -#: plpprops.cc:515 -msgid "Psion &Drive" -msgstr "" - -#: plpprops.cc:525 -msgid "Information" -msgstr "" - -#: plpprops.cc:531 -msgid "Type" -msgstr "" - -#: plpprops.cc:537 -msgid "The type of the drive is shown here." -msgstr "" - -#: plpprops.cc:539 -msgid "Total capacity" -msgstr "" - -#: plpprops.cc:542 plpprops.cc:550 plpprops.cc:558 -msgid " " -msgstr "" - -#: plpprops.cc:545 -msgid "This shows the total capacity of the drive." -msgstr "" - -#: plpprops.cc:547 -msgid "Free space" -msgstr "" - -#: plpprops.cc:553 -msgid "This shows the available space of the drive." -msgstr "" - -#: plpprops.cc:555 -msgid "Unique ID" -msgstr "" - -#: plpprops.cc:561 -msgid "This shows unique ID of the drive. For ROM drives, this is always 0." -msgstr "" - -#: plpprops.cc:565 -msgid "" -"Here, the usage of the drive is shown in a pie diagram. The purple area " -"shows used space, the blue area shows free space." -msgstr "" - -#: plpprops.cc:573 -msgid "Backup" -msgstr "" - -#: plpprops.cc:577 -msgid "" -"Click here, to do a backup of this drive. This launches KPsion to perform " -"that task." -msgstr "" - -#: plpprops.cc:579 -msgid "Restore" -msgstr "" - -#: plpprops.cc:584 -msgid "" -"Click here, to do a restore of this drive. This launches KPsion to perform " -"that task." -msgstr "" - -#: plpprops.cc:586 -msgid "Format" -msgstr "" - -#: plpprops.cc:591 -msgid "" -"Click here, to format this drive. This launches KPsion to perform that task." -msgstr "" - -#: plpprops.cc:677 -msgid "Information for Psion drive %1: (%2)" -msgstr "" - -#: plpprops.cc:752 -msgid "Psion &Machine" -msgstr "" - -#: plpprops.cc:755 -msgid "General" -msgstr "" - -#: plpprops.cc:760 -msgid "Machine type:" -msgstr "" - -#: plpprops.cc:762 -msgid "Here, the type of the connected device is shown." -msgstr "" - -#: plpprops.cc:763 -msgid "Model name:" -msgstr "" - -#: plpprops.cc:765 -msgid "Here, the model name of the connected device is shown." -msgstr "" - -#: plpprops.cc:766 -msgid "Machine UID:" -msgstr "" - -#: plpprops.cc:768 -msgid "Here, the unique ID of the connected device is shown." -msgstr "" - -#: plpprops.cc:769 -msgid "UI language:" -msgstr "" - -#: plpprops.cc:771 -msgid "Here, the user interface language of the connected device is shown." -msgstr "" - -#: plpprops.cc:772 -msgid "Display geometry:" -msgstr "" - -#: plpprops.cc:774 -msgid "Here, the display geometry of the connected device is shown." -msgstr "" - -#: plpprops.cc:775 -msgid "Registry size:" -msgstr "" - -#: plpprops.cc:777 -msgid "Here, the size of the registry data is shown." -msgstr "" - -#: plpprops.cc:782 -msgid "Time" -msgstr "" - -#: plpprops.cc:786 -msgid "Date/Time:" -msgstr "" - -#: plpprops.cc:788 -msgid "Here, the current time setting of the connected device is shown." -msgstr "" - -#: plpprops.cc:789 -msgid "UTC offset" -msgstr "" - -#: plpprops.cc:791 -msgid "" -"Here, the offset of the connected device's time zone relative to GMT is " -"shown." -msgstr "" - -#: plpprops.cc:792 -msgid "Daylight saving" -msgstr "" - -#: plpprops.cc:794 -msgid "" -"Here, you can see, if daylight saving time is currently active on the " -"connected device." -msgstr "" - -#: plpprops.cc:800 -msgid "Psion &Battery" -msgstr "" - -#: plpprops.cc:802 -msgid "Main battery" -msgstr "" - -#: plpprops.cc:806 -msgid "Changed at:" -msgstr "" - -#: plpprops.cc:808 -msgid "This shows the time of last battery change." -msgstr "" - -#: plpprops.cc:809 plpprops.cc:855 -msgid "Usage time:" -msgstr "" - -#: plpprops.cc:811 -msgid "This shows the accumulated time of running on battery power." -msgstr "" - -#: plpprops.cc:812 plpprops.cc:835 -msgid "Status:" -msgstr "" - -#: plpprops.cc:814 -msgid "This shows current status of the battery." -msgstr "" - -#: plpprops.cc:815 -msgid "Total consumed power:" -msgstr "" - -#: plpprops.cc:817 -msgid "This shows accumulated power consumtion of the device." -msgstr "" - -#: plpprops.cc:818 -msgid "Current:" -msgstr "" - -#: plpprops.cc:820 -msgid "This shows the current, drawn from power supply (battery or mains)." -msgstr "" - -#: plpprops.cc:821 plpprops.cc:838 -msgid "Voltage:" -msgstr "" - -#: plpprops.cc:823 -msgid "This shows the current battery voltage." -msgstr "" - -#: plpprops.cc:824 plpprops.cc:841 -msgid "Max. voltage:" -msgstr "" - -#: plpprops.cc:826 -msgid "This shows the maximum battery voltage." -msgstr "" - -#: plpprops.cc:831 -msgid "Backup battery" -msgstr "" - -#: plpprops.cc:837 -msgid "This shows current status of the backup battery." -msgstr "" - -#: plpprops.cc:840 -msgid "This shows the current backup battery voltage." -msgstr "" - -#: plpprops.cc:843 -msgid "This shows the maximum backup battery voltage." -msgstr "" - -#: plpprops.cc:848 -msgid "External power" -msgstr "" - -#: plpprops.cc:852 -msgid "Supplied:" -msgstr "" - -#: plpprops.cc:854 -msgid "This shows whether external power is currently supplied." -msgstr "" - -#: plpprops.cc:857 -msgid "This shows the accumulated time of running on external power." -msgstr "" - -#: plpprops.cc:863 -msgid "Psion M&emory" -msgstr "" - -#: plpprops.cc:866 -msgid "ROM" -msgstr "" - -#: plpprops.cc:870 -msgid "Version:" -msgstr "" - -#: plpprops.cc:872 -msgid "This shows the firmware version." -msgstr "" - -#: plpprops.cc:873 plpprops.cc:887 -msgid "Size:" -msgstr "" - -#: plpprops.cc:875 -msgid "This shows the size of the ROM." -msgstr "" - -#: plpprops.cc:876 -msgid "Programmable:" -msgstr "" - -#: plpprops.cc:878 -msgid "This shows, whether the ROM is flashable or not." -msgstr "" - -#: plpprops.cc:883 -msgid "RAM" -msgstr "" - -#: plpprops.cc:889 -msgid "This shows the total capacity of the RAM." -msgstr "" - -#: plpprops.cc:890 -msgid "Free:" -msgstr "" - -#: plpprops.cc:892 -msgid "This shows the free capacity of the RAM." -msgstr "" - -#: plpprops.cc:893 -msgid "Max. free:" -msgstr "" - -#: plpprops.cc:895 -msgid "This shows the size of the largest free block of the RAM." -msgstr "" - -#: plpprops.cc:896 -msgid "RAMDisk size:" -msgstr "" - -#: plpprops.cc:898 -msgid "This shows, how much RAM is currently used for the RAMDisc." -msgstr "" - -#: plpprops.cc:952 plpprops.cc:975 -msgid "yes" -msgstr "" - -#: plpprops.cc:952 plpprops.cc:975 -msgid "no" -msgstr "" - -#: plpprops.cc:973 -msgid "%1 seconds" -msgstr "" - -#: plpprops.cc:1011 -msgid "Yes" -msgstr "" - -#: plpprops.cc:1011 -msgid "No" -msgstr "" - -#: plpprops.cc:1036 -msgid "Psion &Owner" -msgstr "" - -#: plpprops.cc:1042 -msgid "This shows the owner's information of the connected device." -msgstr "" |