diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-12-16 01:50:36 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-12-16 01:50:36 +0000 |
commit | d4b702756e673463c9fc008bc6e5931aac6a9011 (patch) | |
tree | 56d925d93b2b1468fdcf6b55fbdd5bad008f74c6 /kmail | |
parent | 460c52653ab0dcca6f19a4f492ed2c5e4e963ab0 (diff) | |
download | tdepim-d4b702756e673463c9fc008bc6e5931aac6a9011.tar.gz tdepim-d4b702756e673463c9fc008bc6e5931aac6a9011.zip |
* gcc4.4 compilation fixes
* kmail crash issues resolved
* automake updates
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1062791 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmail')
-rw-r--r-- | kmail/Makefile.am | 1 | ||||
-rw-r--r-- | kmail/accountmanager.cpp | 29 | ||||
-rwxr-xr-x | kmail/avscripts/kmail_clamav.sh | 2 | ||||
-rw-r--r-- | kmail/configuredialog.cpp | 10 | ||||
-rw-r--r-- | kmail/editorwatcher.cpp | 18 | ||||
-rw-r--r-- | kmail/kmail-3.5-filter-icons.pl | 22 | ||||
-rw-r--r-- | kmail/kmail.upd | 4 | ||||
-rw-r--r-- | kmail/kmstartup.cpp | 1 |
8 files changed, 69 insertions, 18 deletions
diff --git a/kmail/Makefile.am b/kmail/Makefile.am index ea566c457..5938c3dfc 100644 --- a/kmail/Makefile.am +++ b/kmail/Makefile.am @@ -209,6 +209,7 @@ update_SCRIPTS = upgrade-transport.pl kmail-pgpidentity.pl \ kmail-3.3b1-misc.pl \ kmail-3.4-misc.pl \ kmail-3.4.1-update-status-filters.pl \ + kmail-3.5-filter-icons.pl \ kmail-3.5-trigger-flag-migration.pl confdir = $(kde_confdir) diff --git a/kmail/accountmanager.cpp b/kmail/accountmanager.cpp index c27432ae4..54a1b4166 100644 --- a/kmail/accountmanager.cpp +++ b/kmail/accountmanager.cpp @@ -18,6 +18,7 @@ #include "kmfiltermgr.h" #include "globalsettings.h" +#include <dcopclient.h> #include <klocale.h> #include <kmessagebox.h> #include <kdebug.h> @@ -190,6 +191,34 @@ void AccountManager::processNextCheck( bool _newMail ) return; } + if ( curAccount->type() == "imap" || curAccount->type() == "cachedimap" || curAccount->type() == "pop" ) + { + // Check with the network status daemon whether the network is available + const int NetWorkStatusUnknown = 1; + const int NetWorkStatusOnline = 8; + QCString replyType; + QByteArray params; + QByteArray reply; + + QDataStream stream( params, IO_WriteOnly ); + stream << static_cast<NetworkAccount*>( curAccount )->host(); + + if ( kapp->dcopClient()->call( "kded", "networkstatus", "status(QString)", + params, replyType, reply ) && ( replyType == "int" ) ) + { + int result; + QDataStream stream2( reply, IO_ReadOnly ); + stream2 >> result; + kdDebug() << k_funcinfo << "networkstatus status = " << result << endl; + // if it's not unknown (no networks announced by network control apps), and not offline, give up now + if ( ( result != NetWorkStatusUnknown ) && ( result != NetWorkStatusOnline ) ) + { + emit checkedMail( false, mInteractive, mTotalNewInFolder ); + return; + } + } + } + connect( curAccount, SIGNAL( finishedCheck( bool, CheckStatus ) ), this, SLOT( processNextCheck( bool ) ) ); diff --git a/kmail/avscripts/kmail_clamav.sh b/kmail/avscripts/kmail_clamav.sh index b6227b39f..f8492621d 100755 --- a/kmail/avscripts/kmail_clamav.sh +++ b/kmail/avscripts/kmail_clamav.sh @@ -35,7 +35,7 @@ export TEMPFILE cat > $TEMPFILE # check for a running daemon -if [ "`ps -eo comm|grep clamd`" = "clamd" ]; then +if ps -eo comm | grep -q clamd ; then chmod a+r $TEMPFILE CLAMCOMANDO="clamdscan --stdout --no-summary " else diff --git a/kmail/configuredialog.cpp b/kmail/configuredialog.cpp index 321a374c5..032d1f9fc 100644 --- a/kmail/configuredialog.cpp +++ b/kmail/configuredialog.cpp @@ -1222,6 +1222,16 @@ void AccountsPage::ReceivingTab::slotAddAccount() { return; } + if ( accountType == "cachedimap" ) + { + KMessageBox::information(this, " WARNING:\n\n It is possible to lose your e-mail with a Disconnected IMAP account if you do not use it correctly. The purposes of Disconnected IMAP are to minimize bandwidth usage, to allow the user to decide when the client communicates with the server, and to keep a local copy of all e-mails.\n\n When using Disconnected IMAP, all changes (such as writing new e-mails, deleting e-mails, and moving e-mails between folders or accounts) are only made on the client until the user synchronizes the client with the server by using the Check Mail command when there is a network connection available.\n\n These are the commands that affect client-server syncronization:\n F5 synchronizes the current folder.\n Ctrl+L (Check Mail) synchronizes all folders in all accounts.\n Refresh Local IMAP Cache discards all local changes in the current folder.\n\n If you make changes that affect more than one folder or account, you should usually use Ctrl+L to make sure all of your changes are committed to the mail server. ", + NULL, "dimap-warning", 0 + + + ); + + } + KMAccount *account = kmkernel->acctMgr()->create( QString::fromLatin1( accountType ) ); if ( !account ) { diff --git a/kmail/editorwatcher.cpp b/kmail/editorwatcher.cpp index 9e1bb150f..e9fec6608 100644 --- a/kmail/editorwatcher.cpp +++ b/kmail/editorwatcher.cpp @@ -39,27 +39,11 @@ #elif HAVE_INOTIFY #include <sys/ioctl.h> #include <unistd.h> -#include <fcntl.h> +#include <sys/inotify.h> #include <sys/syscall.h> #include <linux/types.h> // Linux kernel headers are documented to not compile #define _S390_BITOPS_H -#include <linux/inotify.h> - -static inline int inotify_init (void) -{ - return syscall (__NR_inotify_init); -} - -static inline int inotify_add_watch (int fd, const char *name, __u32 mask) -{ - return syscall (__NR_inotify_add_watch, fd, name, mask); -} - -static inline int inotify_rm_watch (int fd, __u32 wd) -{ - return syscall (__NR_inotify_rm_watch, fd, wd); -} #endif using namespace KMail; diff --git a/kmail/kmail-3.5-filter-icons.pl b/kmail/kmail-3.5-filter-icons.pl new file mode 100644 index 000000000..cc0ff11c9 --- /dev/null +++ b/kmail/kmail-3.5-filter-icons.pl @@ -0,0 +1,22 @@ +#!/usr/bin/perl -w + +use strict; + +# This script updates some configuration keys + +# read the whole config file +my $currentGroup = ""; +my %configFile; +while ( <> ) { + chomp; # eat the trailing '\n' + next if ( /^$/ ); # skip empty lines + next if ( /^\#/ ); # skip comments + if ( /^\[/ ) { # group begin + $currentGroup = $_; + next; + } elsif ( $currentGroup =~ /^\[Filter #[0-9]+\]$/ && /^Icon=/ ) { + my ($key,$value) = split /=/; + print "# DELETE $currentGroup$key\n${currentGroup}\nIcon=mail_spam\n" if $value eq "mark_as_spam"; + print "# DELETE $currentGroup$key\n${currentGroup}\nIcon=mail_ham\n" if $value eq "mark_as_ham"; + } +} diff --git a/kmail/kmail.upd b/kmail/kmail.upd index 698cf87bd..150393ba6 100644 --- a/kmail/kmail.upd +++ b/kmail/kmail.upd @@ -158,6 +158,10 @@ Key=list-font,list-unread-font Id=3.4.1 File=kmailrc Script=kmail-3.4.1-update-status-filters.pl,perl +# Update icon names for spam/ham filters +Id=3.5-filter-icons +File=kmailrc +Script=kmail-3.5-filter-icons.pl,perl # Remove the stored size so that we get a reasonable default now that we have 2 columns in the folder selection dialog Id=3.5.4 File=kmailrc diff --git a/kmail/kmstartup.cpp b/kmail/kmstartup.cpp index d1967a3e4..5daf4ed02 100644 --- a/kmail/kmstartup.cpp +++ b/kmail/kmstartup.cpp @@ -116,6 +116,7 @@ void checkConfigUpdates() { "3.4a", "3.4b", "3.4.1", + "3.5-filter-icons", "3.5.4", "3.5.7-imap-flag-migration" }; |