summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-01-18 12:06:27 (UTC)
committer zautrix <zautrix>2005-01-18 12:06:27 (UTC)
commit4b82a36d1b2479dd2e6f00aef45af848f6793099 (patch) (side-by-side diff)
tree21e5077956085c33f57c4cb54c2b25d5d9a4dc20
parentfbc1ca53388337b66017973896725d51416aae1a (diff)
downloadkdepimpi-4b82a36d1b2479dd2e6f00aef45af848f6793099.zip
kdepimpi-4b82a36d1b2479dd2e6f00aef45af848f6793099.tar.gz
kdepimpi-4b82a36d1b2479dd2e6f00aef45af848f6793099.tar.bz2
data dir
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt9
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.cpp38
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.h5
-rw-r--r--microkde/kdecore/kstandarddirs.cpp4
-rw-r--r--microkde/kdecore/kstandarddirs.h2
5 files changed, 55 insertions, 3 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 683de7c..c0078be 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -13,31 +13,38 @@ Please read the updated SyncHowTo about the new filter settings.
These filter settings make it now possible to sync with shared
calendars without writing back private or confidential data
(via the outgoing filters).
To sync only with particular parts of a shared calendar,
the incoming filter settings can be used.
An example can be found in the SyncHowTo.
Same for shared addressbooks.
+Added a setting for the global kdepim data storage.
+Usually the data is stored in (yourhomedir/kdepim).
+Now you can set in the Global config dialog TAB, subTAB "Data storage path"
+a directory where all the kdepim data is stored.
+That makes it easy to save all kdepim data on a SD card on the Z, for example.
+
KO/Pi:
The timeedit input has a pulldown list for times.
If opened, this pulldown list should now has the right time highlighted.
Added the possibility to exclude events/todos/journals in a filter.
You should exclude journals, if you do not want them to sync with a public calendar.
KA/Pi:
Added the possibility to in/exclude public/private/confidential contacts to a filter.
If you have already defined filterrules in KA/Pi you have to adjust them all by setting the "include public/private/confidential" property manually. Sorry for that ...
Added printing of card view and details view on desktop.
Printing of list view is not working...
Added button for removing pictures in contact editor.
Parsing data fix of KA/Pi version 1.9.17.
Fixed the "parse name automatically" problem of KA/Pi version 1.9.17.
-
+Fixed some syncing merging problems.
+
********** VERSION 1.9.17 ************
KO/Pi:
Fixed that tooltips were not updated after moving an item in agenda view.
Fixed a bug in sorting start date for recurring events in list view.
Changed the left button in todo viewer from "Agenda" to "Set completed".
This makes it possible to change a todo in the What's Next View quickly to the completed state without leaving the What's Next View.
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
index 20594c6..d097078 100644
--- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
+++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
@@ -31,16 +31,18 @@ $Id$
#include <qlayout.h>
#include <qtabwidget.h>
#include <qcombobox.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qbuttongroup.h>
#include <qfile.h>
+#include <qvbox.h>
+#include <qdir.h>
#include <qregexp.h>
#include <kdialog.h>
#include <klocale.h>
#include <kdateedit.h>
#include <kglobal.h>
#include <stdlib.h>
@@ -98,22 +100,58 @@ KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent,
tabWidget = new QTabWidget( this );
topLayout->addWidget( tabWidget );
setupLocaleTab();
setupLocaleDateTab();
setupTimeZoneTab();
setupExternalAppTab();
+ setupStoreTab();
}
void KDEPIMConfigWidget::showTimeZoneTab()
{
tabWidget->setCurrentPage ( 3 ) ;
}
+void KDEPIMConfigWidget::setupStoreTab()
+{
+ QVBox *storePage = new QVBox( this );
+ new QLabel( i18n("Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail").arg(KGlobal::dirs()->localkdedir()), storePage );
+ new QLabel( i18n("<b>Set new data storage dir:</b>"), storePage );
+ mStoreUrl = new KURLRequester( storePage );
+ mStoreUrl->setURL( KGlobal::dirs()->localkdedir() );
+ new QLabel( i18n("Not existing dirs are created automatically"), storePage );
+ QHBox *bb = new QHBox( storePage );
+ QPushButton * pb = new QPushButton ( i18n("Save settings"), bb );
+ connect(pb, SIGNAL( clicked() ), this, SLOT ( saveStoreSettings() ) );
+ pb = new QPushButton ( i18n("Save standard"), bb );
+ connect(pb, SIGNAL( clicked() ), this, SLOT ( setStandardStore() ) );
+ new QLabel( i18n("<b>New settings are used\nafter a restart</b>"), storePage );
+ new QLabel( i18n("The settings of the storage\ndir is saved in the file\n%1").arg(QDir::homeDirPath() + "/.microkdehome" ), storePage );
+ tabWidget->addTab( storePage, i18n( "Data storage path" ) );
+}
+void KDEPIMConfigWidget::setStandardStore()
+{
+ mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" );
+ saveStoreSettings();
+}
+void KDEPIMConfigWidget::saveStoreSettings()
+{
+ if ( !mStoreUrl->url().isEmpty() ) {
+ KConfig cfg ( QDir::homeDirPath() + "/.microkdehome" );
+ cfg.setGroup("Global");
+ cfg.writeEntry( "MICROKDEHOME", mStoreUrl->url() );
+ qDebug("cfg.writeEntry( MICROKDEHOME, mStoreUrl->url() ); ");
+ cfg.sync();
+ } else {
+ mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" );
+ saveStoreSettings();
+ }
+}
void KDEPIMConfigWidget::setupExternalAppTab()
{
QWidget *externalAppsPage = new QWidget( this );
QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(),
KDialog::spacingHintSmall() );
mExternalApps = new QComboBox( externalAppsPage );
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.h b/libkdepim/kcmconfigs/kdepimconfigwidget.h
index 619f3d7..c545207 100644
--- a/libkdepim/kcmconfigs/kdepimconfigwidget.h
+++ b/libkdepim/kcmconfigs/kdepimconfigwidget.h
@@ -27,16 +27,17 @@ Copyright (c) 2004 Ulf Schenk
$Id$
*/
#ifndef KDEPIMCONFIGWIDGET_H
#define KDEPIMCONFIGWIDGET_H
#include <kprefswidget.h>
+#include <kio/kfile/kurlrequester.h>
#include <qmap.h>
#include "externalapphandler.h"
class QComboBox;
class QLineEdit;
class KPimGlobalPrefs;
@@ -63,22 +64,26 @@ class KDEPIMConfigWidget : public KPrefsWidget
private slots:
// void configureExtension();
// void selectionChanged( QListViewItem* );
// void itemClicked( QListViewItem* );
void client_changed( int newClient );
void externalapp_changed( int newApp );
+ void saveStoreSettings();
+ void setStandardStore();
private:
void setupExternalAppTab();
void setupLocaleDateTab();
void setupLocaleTab();
void setupTimeZoneTab();
+ void setupStoreTab();
+ KURLRequester* mStoreUrl;
void setCombo(QComboBox *combo,const QString & text, const QStringList *tags = 0);
void saveEditFieldSettings();
void updateClientWidgets();
QTabWidget *tabWidget;
diff --git a/microkde/kdecore/kstandarddirs.cpp b/microkde/kdecore/kstandarddirs.cpp
index 4c03c15..f3584d7 100644
--- a/microkde/kdecore/kstandarddirs.cpp
+++ b/microkde/kdecore/kstandarddirs.cpp
@@ -1278,17 +1278,19 @@ void KStandardDirs::addKDEDefaults()
#else
if (localKdeDir.at(localKdeDir.length()-1) != '/')
localKdeDir += '/';
#endif
//QMessageBox::information( 0,"localKdeDir",localKdeDir, 1 );
}
else
{
- localKdeDir = QDir::homeDirPath() + "/kdepim/";
+ KConfig cfg ( QDir::homeDirPath() + "/.microkdehome" );
+ cfg.setGroup("Global");
+ localKdeDir = cfg.readEntry( "MICROKDEHOME", QDir::homeDirPath() + "/kdepim/" );
}
}
else
{
// We treat root different to prevent root messing up the
// file permissions in the users home directory.
localKdeDir = readEnvPath("MICROKDEROOTHOME");
if (!localKdeDir.isEmpty())
diff --git a/microkde/kdecore/kstandarddirs.h b/microkde/kdecore/kstandarddirs.h
index c4e1108..bee864e 100644
--- a/microkde/kdecore/kstandarddirs.h
+++ b/microkde/kdecore/kstandarddirs.h
@@ -563,17 +563,17 @@ public:
* The resulting path will have no symbolic link, '/./'
* or '/../' components.
* @since 3.1
*/
static QString realPath(const QString &dirname);
static void setAppDir( const QString & );
static QString appDir();
-
+
private:
QStringList prefixes;
// Directory dictionaries
QDict<QStringList> absolutes;
QDict<QStringList> relatives;