diff options
author | Fritz Elfert <felfert@to.com> | 2001-03-24 17:35:57 +0000 |
---|---|---|
committer | Fritz Elfert <felfert@to.com> | 2001-03-24 17:35:57 +0000 |
commit | 0f1ffc4064c073854fa51949cb8e9c44cf8885ee (patch) | |
tree | 9695c15197cea023f6ea72593f87e88f39f2c1f4 | |
parent | 2bae21ae65a3f1de3bd39d62b1064f63688f2430 (diff) | |
download | plptools-0f1ffc4064c073854fa51949cb8e9c44cf8885ee.tar.gz plptools-0f1ffc4064c073854fa51949cb8e9c44cf8885ee.tar.bz2 plptools-0f1ffc4064c073854fa51949cb8e9c44cf8885ee.zip |
NLS fixes, kpsion config
-rw-r--r-- | .cvsignore | 1 | ||||
-rw-r--r-- | Makefile.am | 3 | ||||
-rw-r--r-- | acconfig.h | 3 | ||||
-rw-r--r-- | conf/intlclean | 6 | ||||
-rw-r--r-- | conf/m4/plptools/PLP_CHECK_INTL.m4 | 15 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | include/intl.h | 5 | ||||
-rw-r--r-- | kde2/kioslave/Makefile.am | 3 | ||||
-rw-r--r-- | kde2/kpsion/Makefile.am | 3 | ||||
-rw-r--r-- | kde2/kpsion/kpsionconfig.cpp | 1 | ||||
-rw-r--r-- | kde2/kpsion/kpsionconfig.h | 1 | ||||
-rw-r--r-- | kde2/kpsion/main.cpp | 5 | ||||
-rw-r--r-- | kde2/kpsion/setupdialog.cpp | 257 | ||||
-rw-r--r-- | kde2/kpsion/setupdialog.h | 6 | ||||
-rw-r--r-- | kde2/kpsion/wizards.cpp | 14 | ||||
-rw-r--r-- | kde2/plugins/plppropsFactory.cc | 10 | ||||
-rw-r--r-- | kde2/po/Makefile.am | 3 | ||||
-rw-r--r-- | lib/Enum.h | 4 | ||||
-rw-r--r-- | plpftp/main.cc | 2 | ||||
-rw-r--r-- | po/de.po | 58 |
20 files changed, 335 insertions, 67 deletions
@@ -7,5 +7,6 @@ config.status config.cache config.log plptools-*.tar.gz +intl .vimsession .emacs.desktop diff --git a/Makefile.am b/Makefile.am index 4a6fa57..276b78a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -7,7 +7,7 @@ else KDESUB = endif -SUBDIRS = intl po lib ncpd plpnfsd plpftp plpbackup $(KDESUB) doc +SUBDIRS = intl po lib ncpd plpnfsd plpftp plpbackup $(KDESUB) doc . EXTRA_DIST = CHANGES COPYING README TODO INSTALL README.mjg ABOUT-NLS include/*.h* etc/*magic etc/*.in patches conf/m4/kde/*.m4 conf/m4/plptools/*.m4 conf/[a-l]* conf/missing conf/mkinstalldirs DISTCLEANFILES = etc/psion AUTOMAKE_OPTIONS = foreign @@ -24,6 +24,7 @@ maintainer-clean-local: etc/*.spec find . -name "*~" -exec rm -f {} \; find . -name "\.\#*" -exec rm -f {} \; + sh conf/intlclean dist-hook: $(MAKE) TMPDEST=$(distdir)/ kdoc specfile @@ -3,6 +3,9 @@ @TOP@ +/* Define this, if libc provides bind_textdomain_codeset */ +#undef HAVE_BIND_TEXTDOMAIN_CODESET + /* Define this, if you have libreadline */ #undef HAVE_LIBREADLINE diff --git a/conf/intlclean b/conf/intlclean new file mode 100644 index 0000000..fe6eb0a --- /dev/null +++ b/conf/intlclean @@ -0,0 +1,6 @@ +cat<<EOF>intl/Makefile + +maintainer-clean: + rm -f *.[ch] *.in *.sed VERSION ChangeLog Makefile + +EOF diff --git a/conf/m4/plptools/PLP_CHECK_INTL.m4 b/conf/m4/plptools/PLP_CHECK_INTL.m4 new file mode 100644 index 0000000..f57ffdb --- /dev/null +++ b/conf/m4/plptools/PLP_CHECK_INTL.m4 @@ -0,0 +1,15 @@ +AC_DEFUN(PLP_CHECK_INTL,[ + if test "${USE_NLS}" = "yes" ; then + if test "${USE_INCLUDED_LIBINTL}" = "yes" ; then + plp_have_bind_textdomain_codeset=no + else + AC_CHECK_LIB(c, bind_textdomain_codeset, + plp_have_bind_textdomain_codeset=yes, + plp_have_bind_textdomain_codeset=no) + fi + if test "${plp_have_bind_textdomain_codeset}" = yes ; then + AC_DEFINE(HAVE_BIND_TEXTDOMAIN_CODESET) + fi + fi +]) + diff --git a/configure.in b/configure.in index 3be0336..becfdf5 100644 --- a/configure.in +++ b/configure.in @@ -22,6 +22,8 @@ AC_PATH_PROG(SED,sed) dnl NLS support ALL_LINGUAS="de" AM_GNU_GETTEXT +dnl Additional glibc-intl checks +PLP_CHECK_INTL dnl This is stupid for two resaons: dnl diff --git a/include/intl.h b/include/intl.h index a4e0727..f120e47 100644 --- a/include/intl.h +++ b/include/intl.h @@ -21,9 +21,14 @@ extern inline stpcpy(char *dest, const char *src) { # include <libintl.h> # define N_(x) (x) # define _(x) gettext(x) +# ifndef HAVE_BINDTEXTDOMAIN_CODESET +# define bind_textdomain_codeset(p, c) +# endif #else # define N_(x) (x) # define _(x) (x) +# define textdomain(x) +# define bind_textdomain_codeset(p, c) #endif /* Define this, if you have gettext */ diff --git a/kde2/kioslave/Makefile.am b/kde2/kioslave/Makefile.am index b527f09..06c3976 100644 --- a/kde2/kioslave/Makefile.am +++ b/kde2/kioslave/Makefile.am @@ -1,5 +1,8 @@ # $Id$ +maintainer-clean-local: + rm -f Makefile.in + INCLUDES = $(all_includes) -I$(top_srcdir)/lib LDFLAGS = $(all_libraries) $(KDE_RPATH) diff --git a/kde2/kpsion/Makefile.am b/kde2/kpsion/Makefile.am index 043ae37..f9867ec 100644 --- a/kde2/kpsion/Makefile.am +++ b/kde2/kpsion/Makefile.am @@ -1,5 +1,8 @@ # $Id$ +maintainer-clean-local: + rm -f Makefile.in + METASOURCES = AUTO KDE_ICON = AUTO diff --git a/kde2/kpsion/kpsionconfig.cpp b/kde2/kpsion/kpsionconfig.cpp index 9d9b89e..7a0f6f4 100644 --- a/kde2/kpsion/kpsionconfig.cpp +++ b/kde2/kpsion/kpsionconfig.cpp @@ -39,6 +39,7 @@ KPsionConfig::KPsionConfig() { 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")); defaults.insert(DEF_INCINTERVAL, QString("1")); defaults.insert(DEF_FULLINTERVAL, QString("7")); diff --git a/kde2/kpsion/kpsionconfig.h b/kde2/kpsion/kpsionconfig.h index 0403f67..5dd2bfa 100644 --- a/kde2/kpsion/kpsionconfig.h +++ b/kde2/kpsion/kpsionconfig.h @@ -42,6 +42,7 @@ public: OPT_UIDS = 7, OPT_MACHNAME = 8, OPT_BACKUPDRIVES = 9, + OPT_DRIVES = 10, }; enum cfgDefaults { diff --git a/kde2/kpsion/main.cpp b/kde2/kpsion/main.cpp index 60c9a77..d8d1c10 100644 --- a/kde2/kpsion/main.cpp +++ b/kde2/kpsion/main.cpp @@ -37,7 +37,9 @@ namespace LIBPLP { extern "C" { #include <intl.h> void init_libplp_i18n() { +#ifdef HAVE_BINDTEXTDOMAIN_CODESET bind_textdomain_codeset(PACKAGE, "latin1"); +#endif textdomain(PACKAGE); } }; @@ -58,7 +60,8 @@ static KCmdLineOptions options[] = { int main(int argc, char **argv) { KAboutData *about = new KAboutData("kpsion", I18N_NOOP("KPsion"), - VERSION, I18N_NOOP("Psion connectivity utility"), + VERSION, + I18N_NOOP("Psion connectivity utility"), KAboutData::License_GPL, "(C) 2001, Fritz Elfert", 0L, "http://plptools.sourceforge.net", diff --git a/kde2/kpsion/setupdialog.cpp b/kde2/kpsion/setupdialog.cpp index 0498545..e049ec2 100644 --- a/kde2/kpsion/setupdialog.cpp +++ b/kde2/kpsion/setupdialog.cpp @@ -34,7 +34,9 @@ #include <kmessagebox.h> #include <qlayout.h> +#include <qgroupbox.h> #include <qwhatsthis.h> +#include <qheader.h> #include <errno.h> @@ -46,91 +48,150 @@ SetupDialog::SetupDialog(QWidget *parent, rfsv *plpRfsv, rpcs *plpRpcs) QString tmp; QStringList sl; QStringList::Iterator sli; + QLabel *l; KPsionConfig pcfg; KConfig *config = kapp->config(); // Page 1 - page1 = addPage(i18n("Backup &folder")); - QGridLayout *grid = new QGridLayout(page1, 1, 1, - marginHint() * 2, spacingHint() * 2); + 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(page1, "bdirLabel"); + bdirLabel = new QLabel(gb, "bdirLabel"); bdirLabel->setText(tmp); - bdirButton = new QPushButton(i18n("Browse"), page1); - - 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, 0, 1); - grid->addWidget(bdirButton, 0, 2); - grid->setColStretch(0, 1); + 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); - // Page 2 - page2 = addPage(i18n("Backup &policy")); - grid = new QGridLayout(page2, 1, 1, marginHint() * 2, spacingHint() * 2); + gb = new QGroupBox(i18n("Backup strategy"), page1, "stratBox"); + box->addWidget(gb); - QLabel *l = new QLabel(i18n("&Incremental backup interval"), page2, + 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, page2, "iIntCombo"); + 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"), page2, "fBackupIntLabel"); + 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, page2, "fIntCombo"); + 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"), page2, "backupGenLabel"); + 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, page2, "backupGenSpin"); + 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 - page3 = addPage(i18n("&Connection")); - grid = new QGridLayout(page3, 1, 1, marginHint() * 2, spacingHint() * 2); + page2 = addPage(i18n("&Connection")); + grid = new QGridLayout(page2, 1, 1, marginHint() * 2, spacingHint() * 2); - l = new QLabel(i18n("&Connection retry interval (sec.)"), page3, + 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, page3, "rconSpin"); + 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"), page3, "devLabel"); + 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, page3, "devCombo"); + devCombo = new KComboBox(false, page2, "devCombo"); sl = pcfg.getConfigDevices(); devCombo->insertStringList(sl); if (tmp == "off") @@ -142,14 +203,22 @@ SetupDialog::SetupDialog(QWidget *parent, rfsv *plpRfsv, rpcs *plpRpcs) } 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"), page3, "speedLabel"); + 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, page3, "speedCombo"); + speedCombo = new KComboBox(false, page2, "speedCombo"); sl = pcfg.getConfigSpeeds(); speedCombo->insertStringList(sl); for (i = 0, sli = sl.begin(); sli != sl.end(); ++i, ++sli) { @@ -158,15 +227,139 @@ SetupDialog::SetupDialog(QWidget *parent, rfsv *plpRfsv, rpcs *plpRpcs) } 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(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>")); + + 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() { + 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; + machCombo->removeItem(machCombo->currentItem()); + slotMachineChanged(-1); +} + +void SetupDialog:: slotDefaultClicked() { KPsionConfig pcfg; @@ -323,7 +516,7 @@ checkBackupDir(QString &dir) { if ((*ei) == (*ui)) { QString from = oldBDir; QString to = dir; - + from += "/"; from += *ui; to += "/"; to += *ui; if (::rename(from.latin1(), to.latin1()) != 0) { diff --git a/kde2/kpsion/setupdialog.h b/kde2/kpsion/setupdialog.h index f87c917..a7e4487 100644 --- a/kde2/kpsion/setupdialog.h +++ b/kde2/kpsion/setupdialog.h @@ -50,6 +50,8 @@ private slots: void slotDefaultClicked(); void slotSaveSettings(); void slotBdirBrowse(); + void slotDeleteMachine(); + void slotMachineChanged(int); private: bool checkBackupDir(QString &dir); @@ -63,11 +65,15 @@ private: 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; diff --git a/kde2/kpsion/wizards.cpp b/kde2/kpsion/wizards.cpp index 057d0cb..9fb5b9d 100644 --- a/kde2/kpsion/wizards.cpp +++ b/kde2/kpsion/wizards.cpp @@ -553,13 +553,24 @@ accept() { 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); - QListViewItemIterator li(backupListView); 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()); @@ -573,6 +584,7 @@ accept() { } } } + config->setGroup(pcfg.getSectionName(KPsionConfig::OPT_BACKUPDRIVES)); config->writeEntry( pcfg.getOptionName(KPsionConfig::OPT_BACKUPDRIVES).arg(uid), bdrives); hide(); diff --git a/kde2/plugins/plppropsFactory.cc b/kde2/plugins/plppropsFactory.cc index de4ba10..45b47b1 100644 --- a/kde2/plugins/plppropsFactory.cc +++ b/kde2/plugins/plppropsFactory.cc @@ -1,12 +1,20 @@ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#ifdef ENABLE_NLS namespace LIBPLP { extern "C" { #include <intl.h> void init_libplp_i18n() { +#ifdef HAVE_BINDTEXTDOMAIN_CODESET bind_textdomain_codeset(PACKAGE, "latin1"); +#endif textdomain(PACKAGE); } }; }; +#endif #include "plppropsFactory.h" #include "plpprops.h" @@ -25,7 +33,9 @@ plppropsFactory::plppropsFactory(QObject *parent, const char *name) : KLibFactory(parent, name) { s_global = new KInstance("plpprops"); // Install the translations +#ifdef ENABLE_NLS LIBPLP::init_libplp_i18n(); +#endif KGlobal::locale()->insertCatalogue(QString::fromLatin1("plptools")); KGlobal::locale()->insertCatalogue(QString::fromLatin1("libplpprops")); } diff --git a/kde2/po/Makefile.am b/kde2/po/Makefile.am index 7347f46..3a70068 100644 --- a/kde2/po/Makefile.am +++ b/kde2/po/Makefile.am @@ -1,4 +1,7 @@ +maintainer-clean-local: + rm -f Makefile.in + SUBDIRS = de APPS = kpsion libplpprops @@ -27,9 +27,7 @@ #include <config.h> #endif -#ifdef HAVE_LIBINTL_H #include <intl.h> -#endif #include <map> #include <string> @@ -309,7 +307,7 @@ name(#EnumName),defaultValue(initWith) */ template <typename E> inline ostream& operator << (ostream& out, const Enum<E> &e) { - return out << gettext(e.toString().c_str()); + return out << _(e.toString().c_str()); } #endif /* _ENUM_H_ */ diff --git a/plpftp/main.cc b/plpftp/main.cc index 2c58e83..a814fb8 100644 --- a/plpftp/main.cc +++ b/plpftp/main.cc @@ -29,6 +29,7 @@ #include <string.h> #include <stdlib.h> #include <stdio.h> +#include <intl.h> #include "ppsocket.h" #include "rfsv.h" @@ -72,6 +73,7 @@ main(int argc, char **argv) bind_textdomain_codeset(PACKAGE, "latin1"); textdomain(PACKAGE); + struct servent *se = getservbyname("psion", "tcp"); endservent(); if (se != 0L) @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2001-03-01 01:24+0100\n" +"POT-Creation-Date: 2001-03-06 18:13+0100\n" "PO-Revision-Date: 2001-02-28 02:44CET\n" "Last-Translator: Fritz Elfert <felfert@to.com>\n" "Language-Team: Deutsch <de@li.org>\n" @@ -488,43 +488,43 @@ msgstr "Polnisch" msgid "Slovenian" msgstr "Slowenisch" -#: lib/psitime.h:62 +#: lib/psitime.h:63 msgid " years " msgstr " Jahre " -#: lib/psitime.h:62 +#: lib/psitime.h:63 msgid " year " msgstr " Jahr " -#: lib/psitime.h:64 +#: lib/psitime.h:65 msgid " days " msgstr " Tage " -#: lib/psitime.h:64 +#: lib/psitime.h:65 msgid " day " msgstr " Tag " -#: lib/psitime.h:66 +#: lib/psitime.h:67 msgid " hours " msgstr " Stunden " -#: lib/psitime.h:66 +#: lib/psitime.h:67 msgid " hour " msgstr " Stunde " -#: lib/psitime.h:68 +#: lib/psitime.h:69 msgid " minutes " msgstr " Minuten " -#: lib/psitime.h:68 +#: lib/psitime.h:69 msgid " minute " msgstr " Minute " -#: lib/psitime.h:69 plpftp/ftp.cc:797 +#: lib/psitime.h:70 plpftp/ftp.cc:797 msgid " seconds" msgstr " Sekunden" -#: lib/psitime.h:69 +#: lib/psitime.h:70 msgid " second" msgstr " Sekunde" @@ -548,75 +548,75 @@ msgstr "Falsche Protokoll-Version" msgid "no response from ncpd" msgstr "Keine Antwort vom ncpd" -#: lib/plpdirent.cc:159 +#: lib/plpdirent.cc:173 msgid "Not present" msgstr "Nicht vorhanden" -#: lib/plpdirent.cc:160 +#: lib/plpdirent.cc:174 msgid "Unknown" msgstr "Unbekannt" -#: lib/plpdirent.cc:161 +#: lib/plpdirent.cc:175 msgid "Floppy" msgstr "Diskette" -#: lib/plpdirent.cc:162 +#: lib/plpdirent.cc:176 msgid "Disk" msgstr "Platte" -#: lib/plpdirent.cc:163 +#: lib/plpdirent.cc:177 msgid "CD-ROM" msgstr "CD-ROM" -#: lib/plpdirent.cc:164 +#: lib/plpdirent.cc:178 msgid "RAM" msgstr "RAM" -#: lib/plpdirent.cc:165 +#: lib/plpdirent.cc:179 msgid "Flash Disk" msgstr "Flash Disk" -#: lib/plpdirent.cc:166 lib/plpdirent.cc:193 +#: lib/plpdirent.cc:180 lib/plpdirent.cc:207 msgid "ROM" msgstr "ROM" -#: lib/plpdirent.cc:167 +#: lib/plpdirent.cc:181 msgid "Remote" msgstr "Netzlaufwerk" -#: lib/plpdirent.cc:191 +#: lib/plpdirent.cc:205 msgid "local" msgstr "Lokal" -#: lib/plpdirent.cc:195 +#: lib/plpdirent.cc:209 msgid "redirected" msgstr "Umgeleitet" -#: lib/plpdirent.cc:197 +#: lib/plpdirent.cc:211 msgid "substituted" msgstr "Ersetzt" -#: lib/plpdirent.cc:199 +#: lib/plpdirent.cc:213 msgid "internal" msgstr "Intern" -#: lib/plpdirent.cc:201 +#: lib/plpdirent.cc:215 msgid "removable" msgstr "Wechselmedium" -#: lib/plpdirent.cc:214 +#: lib/plpdirent.cc:228 msgid "variable size" msgstr "Variable Größe" -#: lib/plpdirent.cc:216 +#: lib/plpdirent.cc:230 msgid "dual density" msgstr "Doppelte Dichte" -#: lib/plpdirent.cc:218 +#: lib/plpdirent.cc:232 msgid "formattable" msgstr "Formatierbar" -#: lib/plpdirent.cc:220 +#: lib/plpdirent.cc:234 msgid "write protected" msgstr "Schreibgeschützt" |