Diffstat (limited to 'kabc/plugins/opie/resourceopieconfig.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kabc/plugins/opie/resourceopieconfig.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/kabc/plugins/opie/resourceopieconfig.cpp b/kabc/plugins/opie/resourceopieconfig.cpp index b92cfa1..f4cc4f9 100644 --- a/kabc/plugins/opie/resourceopieconfig.cpp +++ b/kabc/plugins/opie/resourceopieconfig.cpp | |||
@@ -32,15 +32,18 @@ $Id$ | |||
32 | #include <klocale.h> | 32 | #include <klocale.h> |
33 | #include <kstandarddirs.h> | 33 | #include <kstandarddirs.h> |
34 | #include <kdialog.h> | 34 | #include <kdialog.h> |
35 | 35 | ||
36 | #include <unistd.h> | 36 | #include <unistd.h> |
37 | 37 | ||
38 | #include <qdir.h> | ||
38 | #include <qfile.h> | 39 | #include <qfile.h> |
39 | #include "resourceopie.h" | 40 | #include "resourceopie.h" |
40 | #include "stdaddressbook.h" | 41 | //US #include <qpe/qpeapplication.h> |
42 | |||
43 | //US #include "stdaddressbook.h" | ||
41 | 44 | ||
42 | #include "resourceopieconfig.h" | 45 | #include "resourceopieconfig.h" |
43 | 46 | ||
44 | using namespace KABC; | 47 | using namespace KABC; |
45 | 48 | ||
46 | ResourceOpieConfig::ResourceOpieConfig( QWidget* parent, const char* name ) | 49 | ResourceOpieConfig::ResourceOpieConfig( QWidget* parent, const char* name ) |
@@ -78,13 +81,13 @@ void ResourceOpieConfig::loadSettings( KRES::Resource *res ) | |||
78 | kdDebug(5700) << "ResourceOpieConfig::loadSettings(): cast failed" << endl; | 81 | kdDebug(5700) << "ResourceOpieConfig::loadSettings(): cast failed" << endl; |
79 | return; | 82 | return; |
80 | } | 83 | } |
81 | 84 | ||
82 | mFileNameEdit->setURL( resource->fileName() ); | 85 | mFileNameEdit->setURL( resource->fileName() ); |
83 | if ( mFileNameEdit->url().isEmpty() ) | 86 | if ( mFileNameEdit->url().isEmpty() ) |
84 | mFileNameEdit->setURL( KABC::StdAddressBook::fileName() ); | 87 | mFileNameEdit->setURL( QDir::homeDirPath() + "/Applications/addressbook/addressbook.xml" ); |
85 | } | 88 | } |
86 | 89 | ||
87 | void ResourceOpieConfig::saveSettings( KRES::Resource *res ) | 90 | void ResourceOpieConfig::saveSettings( KRES::Resource *res ) |
88 | { | 91 | { |
89 | //US ResourceFile *resource = dynamic_cast<ResourceFile*>( res ); | 92 | //US ResourceFile *resource = dynamic_cast<ResourceFile*>( res ); |
90 | ResourceOpie *resource = (ResourceOpie*)( res ); | 93 | ResourceOpie *resource = (ResourceOpie*)( res ); |
@@ -97,11 +100,13 @@ void ResourceOpieConfig::saveSettings( KRES::Resource *res ) | |||
97 | resource->setFileName( mFileNameEdit->url() ); | 100 | resource->setFileName( mFileNameEdit->url() ); |
98 | } | 101 | } |
99 | 102 | ||
100 | void ResourceOpieConfig::checkFilePermissions( const QString& fileName ) | 103 | void ResourceOpieConfig::checkFilePermissions( const QString& fileName ) |
101 | { | 104 | { |
102 | // If file exist but is not writeable... | 105 | // If file exist but is not writeable... |
106 | /*US | ||
103 | if ( access( QFile::encodeName( fileName ), F_OK ) == 0 ) | 107 | if ( access( QFile::encodeName( fileName ), F_OK ) == 0 ) |
104 | emit setReadOnly( access( QFile::encodeName( fileName ), W_OK ) < 0 ); | 108 | emit setReadOnly( access( QFile::encodeName( fileName ), W_OK ) < 0 ); |
109 | */ | ||
105 | } | 110 | } |
106 | 111 | ||
107 | //US #include "resourceopieconfig.moc" | 112 | //US #include "resourceopieconfig.moc" |