[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    Re: kmail wishlist/bugs
From:       Carsten Pfeiffer <carpdjih () cetus ! zrz ! TU-Berlin ! DE>
Date:       2001-03-24 19:20:48
[Download RAW message or body]

Am Freitag, 23. März 2001 16:18 schrieb Michael Häckel:

> > Maybe with a popupmenu that offers "Copy", "Move" "Abort" upon dropping?
>
> That would be a solution, however why do you want to copy a folder.

good question -- but otherwise the popupmenu would look a bit empty :}

> For me no matter where I click, only the frame where the mouse cursor is
> scrolls.
> Are you perhaps running imwheel? You should not do that.

No (but I've got a fix).

> > Maybe the To: and Cc: lineedits could become comboboxes, containing those
> > recent addresses? I also thought about using KCompletion for that stuff.
> > I had a look at that a while ago, but it required some more work than I
> > had time then.
>
> Do you know about the Ctrl+T functionality?
> This feature is really mentioned on the first page of the documentation :-)

I know about Ctrl-T, but this only works with entries from the addressbook, 
no? Sorry, I don't have documentation here, at the moment.

> That seems to be everywhere the same, not only with you. Those crying
> loadest for IMAP support in KMail either have no idea about IMAP, probably
> never will really use it or anyway don't really need IMAP. :-)

Well, I lost my account after switching to T-DSL. Actually, I never used it, 
I simply used the good ole' sendmail,fetchmail,procmail,mutt combo. Now it's 
too late (I can't imagine T-Online providing IMAP, soon).

PS: attached patch fixes some of the smaller issues I mentioned:
- the wheel-scrolling bug
- sets the focus properly in some dialogs
- makes the KAB dialog not show the "select-dialog" when there's nothing to
  select
- uses a KURLRequester for the signature lineedit (you decide if it should be 
  at more places)
- shows a busy pointer when closing the config-dialog
- sets the focus properly and positions the cursor nicely when replying to a 
  mail

Cheers,
Carsten Pfeiffer
["kmail.patch" (text/plain)]

? kdelogo.xpm
? kmail.patch
Index: accountdialog.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kmail/accountdialog.cpp,v
retrieving revision 1.28
diff -u -p -B -w -r1.28 accountdialog.cpp
--- accountdialog.cpp	2001/03/06 21:46:08	1.28
+++ accountdialog.cpp	2001/03/24 19:05:04
@@ -558,6 +558,7 @@ void AccountDialog::setupSettings()
     KMAcctLocal *acctLocal = dynamic_cast<KMAcctLocal*>(mAccount);
 
     mLocal.nameEdit->setText( mAccount->name() );
+    mLocal.nameEdit->setFocus();
     mLocal.locationEdit->setEditText( acctLocal->location() );
     if (acctLocal->mLock == mutt_dotlock)
       mLocal.lockMutt->setChecked(true);
@@ -584,6 +585,7 @@ void AccountDialog::setupSettings()
   {
     KMAcctExpPop &ap = *(KMAcctExpPop*)mAccount;
     mPop.nameEdit->setText( mAccount->name() );
+    mPop.nameEdit->setFocus();
     mPop.loginEdit->setText( ap.login() );
     mPop.passwordEdit->setText( ap.passwd());
     mPop.hostEdit->setText( ap.host() );
@@ -604,6 +606,7 @@ void AccountDialog::setupSettings()
   {
     KMAcctImap &ai = *(KMAcctImap*)mAccount;
     mImap.nameEdit->setText( mAccount->name() );
+    mImap.nameEdit->setFocus();
     mImap.loginEdit->setText( ai.login() );
     mImap.passwordEdit->setText( ai.passwd());
     mImap.hostEdit->setText( ai.host() );
Index: addtoaddressbook.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kmail/addtoaddressbook.cpp,v
retrieving revision 1.6
diff -u -p -B -w -r1.6 addtoaddressbook.cpp
--- addtoaddressbook.cpp	2000/08/06 17:01:55	1.6
+++ addtoaddressbook.cpp	2001/03/24 19:05:04
@@ -88,6 +88,16 @@ AddToKabDialog::~AddToKabDialog()
 {
 }
 
+void AddToKabDialog::show()
+{
+  // no need to ask the user whether to "select" or "create" an entry,
+  // when there is nothing to select.
+  if (list->count() == 0)
+    newEntry();
+  else
+    KDialogBase::show();
+}
+
 void AddToKabDialog::addToEntry()
 {
   KabKey key;
@@ -184,6 +194,7 @@ void AddToKabDialog::newEntry()
       layout.addWidget(lineedits[count], row, 1);
       ++row;
     }
+  lineedits[0]->setFocus();
   lineedits[2]->setText(url.mid(0, 255));	// "mailto:" is already chopped
   dialog.setMainWidget(mainwidget);
   dialog.adjustSize();
Index: addtoaddressbook.h
===================================================================
RCS file: /home/kde/kdenetwork/kmail/addtoaddressbook.h,v
retrieving revision 1.1
diff -u -p -B -w -r1.1 addtoaddressbook.h
--- addtoaddressbook.h	2000/05/13 21:49:55	1.1
+++ addtoaddressbook.h	2001/03/24 19:05:04
@@ -39,6 +39,9 @@ class AddToKabDialog : public KDialogBas
 public:
   AddToKabDialog(QString url, KabAPI *, QWidget *parent);
   ~AddToKabDialog();
+    
+  virtual void show();
+    
 protected slots:
   /** Create a new entry and add it to the address book. */
   void newEntry();
Index: configuredialog.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kmail/configuredialog.cpp,v
retrieving revision 1.88
diff -u -p -B -w -r1.88 configuredialog.cpp
--- configuredialog.cpp	2001/03/21 10:49:03	1.88
+++ configuredialog.cpp	2001/03/24 19:05:06
@@ -53,6 +53,7 @@
 #include <kfiledialog.h>
 #include <kfontdialog.h>
 #include <kiconloader.h>
+#include <klineedit.h>
 #include <klineeditdlg.h>
 #include <klistview.h>
 #include <klocale.h>
@@ -61,12 +62,14 @@
 #include <kpgp.h>
 #include <ksimpleconfig.h>
 #include <kstddirs.h>
+#include <kurlrequester.h>
 #include <kglobalsettings.h>
 
 
 #include "accountdialog.h"
 #include "colorlistbox.h"
 #include "configuredialog.h"
+#include "kbusyptr.h"
 #include "kmaccount.h"
 #include "kmacctmgr.h"
 #include "kmacctseldlg.h"
@@ -202,6 +205,7 @@ NewIdentityDialog::NewIdentityDialog( QW
   glay->addWidget( label, 0, 0 );
 
   mLineEdit = new QLineEdit( page );
+  mLineEdit->setFocus();
   glay->addWidget( mLineEdit, 0, 1 );
 
   QButtonGroup *buttonGroup = new QButtonGroup( page );
@@ -617,15 +621,13 @@ void ConfigureDialog::makeIdentityPage( 
 
   mIdentity.signatureFileLabel = new QLabel( i18n("Signature File:"), page );
   glay->addWidget( mIdentity.signatureFileLabel, 8, 0 );
-  mIdentity.signatureFileEdit = new QLineEdit( page );
+  mIdentity.signatureFileEdit = new KURLRequester( page );
+  QPushButton *button = mIdentity.signatureFileEdit->button();
+  button->setText( i18n("Choose...") );
+  button->setAutoDefault( false );
   connect( mIdentity.signatureFileEdit, SIGNAL(textChanged(const QString &)),
 	   this, SLOT( slotSignatureFile(const QString &)) );
-  glay->addWidget( mIdentity.signatureFileEdit, 8, 1 );
-  mIdentity.signatureBrowseButton = new QPushButton( i18n("Choose..."), page );
-  connect( mIdentity.signatureBrowseButton, SIGNAL(clicked()),
-	   this, SLOT(slotSignatureChooser()) );
-  mIdentity.signatureBrowseButton->setAutoDefault( false );
-  glay->addWidget( mIdentity.signatureBrowseButton, 8, 2 );
+  glay->addMultiCellWidget( mIdentity.signatureFileEdit, 8, 8, 1, 2 );
 
   mIdentity.signatureExecCheck =
     new QCheckBox( i18n("The file is a program"), page );
@@ -635,6 +637,7 @@ void ConfigureDialog::makeIdentityPage( 
 	   this, SLOT(slotSignatureEdit()) );
   mIdentity.signatureEditButton->setAutoDefault( false );
   glay->addWidget( mIdentity.signatureEditButton, 9, 2 );
+  button->setMinimumSize( mIdentity.signatureEditButton->sizeHint() );
 
   mIdentity.signatureTextRadio =
     new QRadioButton( i18n("Specify signature below"), page );
@@ -2250,7 +2253,7 @@ void ConfigureDialog::slotDoApply( bool 
   // Make other components read the new settings
   //
   KMMessage::readConfig();
-
+  kernel->kbp()->busy(); // this can take some time when a large folder is open
   QListIterator<KMainWindow> it(*KMainWindow::memberList);
   for( it.toFirst(); it.current(); ++it )
   {
@@ -2259,7 +2262,7 @@ void ConfigureDialog::slotDoApply( bool 
       ((KMTopLevelWidget*)it.current())->readConfig();
     }
   }
-
+  kernel->kbp()->idle();
 }
 
 
@@ -2277,7 +2280,7 @@ void ConfigureDialog::saveActiveIdentity
     entry->setPgpIdentity( mIdentity.pgpIdentityEdit->text() );
     entry->setEmailAddress( mIdentity.emailEdit->text() );
     entry->setReplyToAddress( mIdentity.replytoEdit->text() );
-    entry->setSignatureFileName( mIdentity.signatureFileEdit->text() );
+    entry->setSignatureFileName( mIdentity.signatureFileEdit->url() );
     entry->setSignatureInlineText( mIdentity.signatureTextEdit->text() );
     entry->setSignatureFileIsAProgram(
       mIdentity.signatureExecCheck->isChecked() );
@@ -2307,14 +2310,14 @@ void ConfigureDialog::setIdentityInforma
   IdentityEntry *entry = mIdentityList.get( mIdentity.mActiveIdentity );
   if( entry == 0 )
   {
-    mIdentity.nameEdit->setText("");
-    mIdentity.organizationEdit->setText("");
-    mIdentity.pgpIdentityEdit->setText("");
-    mIdentity.emailEdit->setText("");
-    mIdentity.replytoEdit->setText("");
-    mIdentity.signatureFileEdit->setText("");
+    mIdentity.nameEdit->clear();
+    mIdentity.organizationEdit->clear();
+    mIdentity.pgpIdentityEdit->clear();
+    mIdentity.emailEdit->clear();
+    mIdentity.replytoEdit->clear();
+    mIdentity.signatureFileEdit->clear();
     mIdentity.signatureExecCheck->setChecked( false );
-    mIdentity.signatureTextEdit->setText( "" );
+    mIdentity.signatureTextEdit->clear();
     useSignatureFile = true;
   }
   else
@@ -2324,7 +2327,7 @@ void ConfigureDialog::setIdentityInforma
     mIdentity.pgpIdentityEdit->setText( entry->pgpIdentity() );
     mIdentity.emailEdit->setText( entry->emailAddress() );
     mIdentity.replytoEdit->setText( entry->replyToAddress() );
-    mIdentity.signatureFileEdit->setText( entry->signatureFileName() );
+    mIdentity.signatureFileEdit->setURL( entry->signatureFileName() );
     mIdentity.signatureExecCheck->setChecked(entry->signatureFileIsAProgram());
     mIdentity.signatureTextEdit->setText( entry->signatureInlineText() );
     useSignatureFile = entry->useSignatureFile();
@@ -2502,7 +2505,6 @@ void ConfigureDialog::slotSignatureType(
   mIdentity.signatureFileLabel->setEnabled( flag );
   mIdentity.signatureFileEdit->setEnabled( flag );
   mIdentity.signatureExecCheck->setEnabled( flag );
-  mIdentity.signatureBrowseButton->setEnabled( flag );
   if( flag==true )
   {
     mIdentity.signatureEditButton->setEnabled(
@@ -2516,30 +2518,12 @@ void ConfigureDialog::slotSignatureType(
 }
 
 
-void ConfigureDialog::slotSignatureChooser( void )
+void ConfigureDialog::slotSignatureChooser( KURLRequester *req )
 {
-  KFileDialog *d = new KFileDialog( QDir::homeDirPath(), "*", this, 0, true );
-  d->setCaption(i18n("Choose Signature File"));
+  if ( req->url().isEmpty() )
+    req->fileDialog()->setURL( QDir::homeDirPath() );
 
-  if( d->exec() == QDialog::Accepted )
-  {
-    KURL url = d->selectedURL();
-    if( url.isEmpty() == true )
-    {
-      delete d;
-      return;
-    }
-
-    if( url.isLocalFile() == false )
-    {
-      KMessageBox::sorry( this, i18n( "Only local files supported yet." ) );
-      delete d;
-      return;
-    }
-
-    mIdentity.signatureFileEdit->setText(url.path());
-  }
-  delete d;
+  req->fileDialog()->setCaption(i18n("Choose Signature File"));
 }
 
 
@@ -2557,7 +2541,7 @@ void ConfigureDialog::slotSignatureFile(
 
 void ConfigureDialog::slotSignatureEdit( void )
 {
-  QString fileName = mIdentity.signatureFileEdit->text().stripWhiteSpace();
+  QString fileName = mIdentity.signatureFileEdit->url().stripWhiteSpace();
   if( fileName.isEmpty() == true )
   {
     KMessageBox::error( this, i18n("You must specify a filename") );
Index: configuredialog.h
===================================================================
RCS file: /home/kde/kdenetwork/kmail/configuredialog.h,v
retrieving revision 1.35
diff -u -p -B -w -r1.35 configuredialog.h
--- configuredialog.h	2001/03/16 07:19:49	1.35
+++ configuredialog.h	2001/03/24 19:05:06
@@ -33,6 +33,7 @@ class QRadioButton;
 class KIntNumInput;
 class KColorButton;
 class KFontChooser;
+class KURLRequester;
 class KpgpConfig;
 class ColorListBox;
 class KMAccount;
@@ -281,10 +282,9 @@ class ConfigureDialog : public KDialogBa
       QLineEdit      *pgpIdentityEdit;
       QLineEdit      *emailEdit;
       QLineEdit      *replytoEdit;
-      QLineEdit      *signatureFileEdit;
+      KURLRequester  *signatureFileEdit;
       QLabel         *signatureFileLabel;
       QCheckBox      *signatureExecCheck;
-      QPushButton    *signatureBrowseButton;
       QPushButton    *signatureEditButton;
       QPushButton    *transportButton;
       QRadioButton   *signatureFileRadio;
@@ -480,7 +480,7 @@ class ConfigureDialog : public KDialogBa
     void slotRemoveIdentity( void );
     void slotIdentitySelectorChanged( void );
     void slotSignatureType( int id );
-    void slotSignatureChooser( void );
+    void slotSignatureChooser( KURLRequester * );
     void slotSignatureEdit( void );
     void slotSignatureFile( const QString &filename );
     void slotSignatureExecMode( bool state );
Index: kmcomposewin.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmcomposewin.cpp,v
retrieving revision 1.325
diff -u -p -B -w -r1.325 kmcomposewin.cpp
--- kmcomposewin.cpp	2001/03/22 19:24:36	1.325
+++ kmcomposewin.cpp	2001/03/24 19:05:07
@@ -2535,6 +2535,13 @@ void KMComposeWin::slotEditKeys()
   KKeyDialog::configureKeys(actionCollection(), xmlFile(), true, this);
 }
 
+void KMComposeWin::setReplyFocus( bool hasMessage )
+{
+  mEditor->setFocus();
+  if ( hasMessage )
+    mEditor->setCursorPosition( 1, 0 );
+}
+
 
 //=============================================================================
 //
Index: kmcomposewin.h
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmcomposewin.h,v
retrieving revision 1.108
diff -u -p -B -w -r1.108 kmcomposewin.h
--- kmcomposewin.h	2001/02/23 13:20:32	1.108
+++ kmcomposewin.h	2001/03/24 19:05:07
@@ -183,6 +183,11 @@ public:
   /** Recode to the specified charset */
    void setCharset(const QString& aCharset, bool forceDefault = FALSE);
 
+  /** Sets the focus to the edit-widget and the cursor below the 
+    "On ... you wrote" line when hasMessage is true.
+    Make sure you call this _after_ setMsg(). */
+   void setReplyFocus( bool hasMessage = true );
+
 public slots:
  //Actions:
   void slotPrint();
Index: kmheaders.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmheaders.cpp,v
retrieving revision 1.252
diff -u -p -B -w -r1.252 kmheaders.cpp
--- kmheaders.cpp	2001/03/23 17:13:02	1.252
+++ kmheaders.cpp	2001/03/24 19:05:08
@@ -323,6 +323,7 @@ KMHeaders::KMHeaders(KMMainWin *aOwner, 
   mSortCol = KMMsgList::sfDate;
   mSortDescending = FALSE;
   setShowSortIndicator(true);
+  setFocusPolicy( WheelFocus );
 
   addColumn( i18n("Subject"), 310 );
   addColumn( i18n("Sender"), 170 );
@@ -1254,6 +1255,7 @@ void KMHeaders::noQuoteReplyToMsg()
   win = new KMComposeWin(msg->createReply(FALSE, FALSE, "", TRUE),
 			 msg->headerField( "X-KMail-Identity" ));
   win->setCharset(msg->codec()->name(), TRUE);
+  win->setReplyFocus(false);
   win->show();
   kernel->kbp()->idle();
 }
@@ -1271,6 +1273,7 @@ void KMHeaders::replyToMsg (QString sele
   win = new KMComposeWin(msg->createReply(FALSE, FALSE, selection),
 			 msg->headerField( "X-KMail-Identity" ));
   win->setCharset(msg->codec()->name(), TRUE);
+  win->setReplyFocus();
   win->show();
   kernel->kbp()->idle();
 }
@@ -1288,6 +1291,7 @@ void KMHeaders::replyAllToMsg (QString s
   win = new KMComposeWin(msg->createReply(TRUE, FALSE, selection),
 			 msg->headerField( "X-KMail-Identity" ));
   win->setCharset(msg->codec()->name(), TRUE);
+  win->setReplyFocus();
   win->show();
   kernel->kbp()->idle();
 }
@@ -1304,6 +1308,7 @@ void KMHeaders::replyListToMsg (QString 
   win = new KMComposeWin(msg->createReply(true, true, selection),
 			 msg->headerField( "X-KMail-Identity" ));
   win->setCharset(msg->codec()->name(), TRUE);
+  win->setReplyFocus();
   win->show();
   kernel->kbp()->idle();
 }
Index: kmreaderwin.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmreaderwin.cpp,v
retrieving revision 1.253
diff -u -p -B -w -r1.253 kmreaderwin.cpp
--- kmreaderwin.cpp	2001/03/13 12:01:26	1.253
+++ kmreaderwin.cpp	2001/03/24 19:05:09
@@ -311,6 +311,7 @@ QString KMReaderWin::quoteFontTag( int q
 void KMReaderWin::initHtmlWidget(void)
 {
   mViewer = new KHTMLPart(this, "khtml");
+  mViewer->widget()->setFocusPolicy(WheelFocus);
   // Let's better be paranoid and disable plugins (it defaults to enabled):
   mViewer->enablePlugins(false);
   mViewer->enableJScript(false); // just make this explicit

_______________________________________________
Kmail Developers mailing list
Kmail@master.kde.org
http://master.kde.org/mailman/listinfo/kmail


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic