[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#321102: patch



tags 321102 patch
thanks

Hi,

please consider the following patch. It disables DIMAP by simply
removing the DIMAP option when creating a new account, making it
impossible to create a new DIMAP account. Regular IMAP is still
perfectly possible.

In order to protect users with existing DIMAP accounts, it also pops up
a warning whenever KMail gets started and detects an DIMAP account.

The patch does not disable DIMAP itself. In fact it does not even touch
the DIMAP code. So other PIM components using DIMAP internally should
not be affected.

I've tested the patch and it seems to work fine.


The patch itself is very small: there are currently two ways to create a
DIMAP account, 1) the regular way and 2) when you start KMail the first
time an the wizard pops in. I've disabled the gui-Elements for the
DIMAP-options in both cases.

The second part of the patch is for the popup. Every time KMail starts
and detects a DIMAP account the popup with a warning is shown.


I think this patch is a good compromise. It does not really fix the bug,
but prevents the user from using DIMAP. IMHO it's better and cleaner
this way than just closing the bug by documenting it.


Cheers,

Bastian


-- 
Bastian Venthur                                      http://venthur.de
Debian Developer                                 venthur at debian org

Only in ./kdepim-3.5.5.dfsg.1/kmail/: Makefile.in
Common subdirectories: ./kdepim-3.5.5.dfsg.1/kmail/about and ../kmail/kdepim-3.5.5.dfsg.1/kmail/about
diff -u ./kdepim-3.5.5.dfsg.1/kmail/accountwizard.cpp ../kmail/kdepim-3.5.5.dfsg.1/kmail/accountwizard.cpp
--- ./kdepim-3.5.5.dfsg.1/kmail/accountwizard.cpp	2005-09-10 10:24:02.000000000 +0200
+++ ../kmail/kdepim-3.5.5.dfsg.1/kmail/accountwizard.cpp	2007-01-19 10:28:13.000000000 +0100
@@ -87,7 +87,7 @@
       mTypeList << i18n( "Local mailbox" );
       mTypeList << i18n( "POP3" );
       mTypeList << i18n( "IMAP" );
-      mTypeList << i18n( "Disconnected IMAP" );
+//      mTypeList << i18n( "Disconnected IMAP" );
       mTypeList << i18n( "Maildir mailbox" );
 
       insertStringList( mTypeList );
Common subdirectories: ./kdepim-3.5.5.dfsg.1/kmail/avscripts and ../kmail/kdepim-3.5.5.dfsg.1/kmail/avscripts
Common subdirectories: ./kdepim-3.5.5.dfsg.1/kmail/interfaces and ../kmail/kdepim-3.5.5.dfsg.1/kmail/interfaces
diff -u ./kdepim-3.5.5.dfsg.1/kmail/kmacctseldlg.cpp ../kmail/kdepim-3.5.5.dfsg.1/kmail/kmacctseldlg.cpp
--- ./kdepim-3.5.5.dfsg.1/kmail/kmacctseldlg.cpp	2005-09-10 10:24:02.000000000 +0200
+++ ../kmail/kdepim-3.5.5.dfsg.1/kmail/kmacctseldlg.cpp	2007-01-19 13:55:08.000000000 +0100
@@ -51,8 +51,8 @@
   vlay->addWidget( radioButton2 );
   QRadioButton *radioButton3 = new QRadioButton( i18n("&IMAP"), group );
   vlay->addWidget( radioButton3 );
-  QRadioButton *radioButton4 = new QRadioButton( i18n("&Disconnected IMAP"), group );
-  vlay->addWidget( radioButton4 );
+//  QRadioButton *radioButton4 = new QRadioButton( i18n("&Disconnected IMAP"), group );
+//  vlay->addWidget( radioButton4 );
   QRadioButton *radioButton5 = new QRadioButton( i18n("&Maildir mailbox"), group );
   vlay->addWidget( radioButton5 );
 
diff -u ./kdepim-3.5.5.dfsg.1/kmail/kmmainwidget.cpp ../kmail/kdepim-3.5.5.dfsg.1/kmail/kmmainwidget.cpp
--- ./kdepim-3.5.5.dfsg.1/kmail/kmmainwidget.cpp	2006-10-01 19:30:30.000000000 +0200
+++ ../kmail/kdepim-3.5.5.dfsg.1/kmail/kmmainwidget.cpp	2007-01-19 12:34:53.000000000 +0100
@@ -3395,6 +3395,12 @@
   for( KMAccount *a = kmkernel->acctMgr()->first(); a;
        a = kmkernel->acctMgr()->next() ) {
     if ( a->type() == "cachedimap" ) {
+      //
+      // ask the user to switch from dimap to imap.
+      //
+      QMessageBox::warning( this, "Cached IMAP detected", "Looks like you're using legacy DIMAP which is not supported anymore.\n"
+                                                          "Please delete this account in KMail and use regular IMAP instead.");
+    
       hasImapAccount = true;
       break;
     }
Common subdirectories: ./kdepim-3.5.5.dfsg.1/kmail/pics and ../kmail/kdepim-3.5.5.dfsg.1/kmail/pics
Common subdirectories: ./kdepim-3.5.5.dfsg.1/kmail/profiles and ../kmail/kdepim-3.5.5.dfsg.1/kmail/profiles
Common subdirectories: ./kdepim-3.5.5.dfsg.1/kmail/tests and ../kmail/kdepim-3.5.5.dfsg.1/kmail/tests

Reply to: