Package: kmail
Version: 4:3.1.5-1
Severity: wishlist
Tags: patch
Hi,
I realy wish to have kvim as my editor in kmail. As far as I know
it's planed vor 3.2 to have the choice to select the "Embedded Vim
Component" inside kmail as your editor. But as I see ther's a little
patch at http://freenux.org/kde/patchs/kmail-ktexteditor-3.1.diff which
applyes this feature to kmail 3.1.
I would realy like to see it in the next Debian Package ... ;-)
Thank you in advance,
Markus Hubig
diff -urN kmail-3.1/Makefile.am kmail+kvim/Makefile.am
--- kmail-3.1/Makefile.am 2002-11-13 09:47:31.0 -0500
+++ kmail+kvim/Makefile.am 2003-01-04 18:03:04.0 -0500
@@ -2,7 +2,7 @@
SUBDIRS = . about pics profiles
INCLUDES = -I$(top_srcdir)/libkdenetwork -I$(top_srcdir)/mimelib $(all_includes)
-LDADD = $(LIB_KHTML) $(LIB_KSPELL) ../libkdenetwork/libkdenetwork.la ../mimelib/libmimelib.la -lkabc
+LDADD = $(LIB_KHTML) $(LIB_KSPELL) ../libkdenetwork/libkdenetwork.la ../mimelib/libmimelib.la -lkabc -lktexteditor -lkutils
bin_PROGRAMS = kmail
diff -urN kmail-3.1/configuredialog.cpp kmail+kvim/configuredialog.cpp
--- kmail-3.1/configuredialog.cpp 2002-12-07 04:56:17.0 -0500
+++ kmail+kvim/configuredialog.cpp 2003-01-04 18:00:08.0 -0500
@@ -97,6 +97,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -2342,7 +2343,7 @@
// tmp. vars:
QVBoxLayout *vlay;
QHBoxLayout *hlay;
- QGroupBox *group;
+ QGroupBox *group, *editor;
QLabel *label;
QHBox *hbox;
@@ -2370,6 +2371,12 @@
connect( mWordWrapCheck, SIGNAL(toggled(bool)),
mWrapColumnSpin, SLOT(setEnabled(bool)) );
+ //ktexteditor stuff
+ editor = new QVGroupBox (i18n("Embedded Editor"), this);
+ editor->layout()->setSpacing( KDialog::spacingHint() );
+ chooser = new KTextEditor::EditorChooser(editor, "Editor chooser");
+ chooser->readAppSetting();
+
// The "exteral editor" group:
group = new QVGroupBox( i18n("External Editor"), this );
group->layout()->setSpacing( KDialog::spacingHint() );
@@ -2399,6 +2406,7 @@
connect( mExternalEditorCheck, SIGNAL(toggled(bool)),
label, SLOT(setEnabled(bool)) );
+ vlay->addWidget( editor );
vlay->addWidget( group );
vlay->addStretch( 100 );
}
@@ -2445,6 +2453,9 @@
KConfigGroup general( kapp->config(), "General" );
KConfigGroup composer( kapp->config(), "Composer" );
+ //ktexteditor
+ chooser->writeAppSetting();
+
general.writeEntry( "use-external-editor", mExternalEditorCheck->isChecked() );
general.writeEntry( "external-editor", mEditorRequester->url() );
diff -urN kmail-3.1/configuredialog_p.h kmail+kvim/configuredialog_p.h
--- kmail-3.1/configuredialog_p.h 2002-09-29 08:27:00.0 -0400
+++ kmail+kvim/configuredialog_p.h 2003-01-04 18:00:08.0 -0500
@@ -15,6 +15,7 @@
#include
#include
+#include
class QPushButton;
class QLabel;
@@ -557,6 +558,7 @@
void installProfile( KConfig * profile );
protected:
+ KTextEditor::EditorChooser *chooser;
QCheckBox *mAutoAppSignFileCheck;
QCheckBox *mSmartQuoteCheck;
QCheckBox *mWordWrapCheck;
diff -urN kmail-3.1/kmcomposewin.cpp kmail+kvim/kmcomposewin.cpp
--- kmail-3.1/kmcomposewin.cpp 2002-12-14 14:49:22.0 -0500
+++ kmail+kvim/kmcomposewin.cpp 2003-01-04 19:26:48.0 -0500
@@ -82,9 +82,20 @@
#include "cryptplugwrapperlist.h"
#include "klistboxdialog.h"
-#include "kmcomposewin.moc"
-
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include "kmcomposewin.moc"
//-
KMComposeWin::KMComposeWin( KMMessage *aMsg, uint id )
@@ -139,7 +150,6 @@
bAutoCharset = TRUE;
fixedFontAction = 0;
mEditor = new KMEdit(mMainWidget, this);
- mEditor->setTextFormat(Qt::PlainText);
disableBreaking = false;
QString tip = i18n("Select email address(es)");
QToolTip::add( mBtnTo, tip );
@@ -221,8 +231,8 @@
connect(kernel->imapFolderMgr(),SIGNAL(removed(KMFolder*)),
SLOT(slotFolderRemoved(KMFolder*)));
- connect (mEditor, SIGNAL (spellcheck_done(int)),
-this, SLOT (slotSpellcheckDone (int)));
+//XXX connect (mEditor, SIGNAL (spellcheck_done(int)),
+//XXXthis, SLOT (slotSpellcheckDone (int)));
mMainWidget->resize(480,510);
setCentralWidget(mMainWidget);
@@ -385,7 +395,7 @@
mEdtReplyTo->setPalette(mPalette);
mEdtBcc->setPalette(mPalette);
mTransport->setPalette(mPalette);
- mEditor->setPalette(mPalette);
+//XXX mEditor->setPalette(mPalette);
mFcc->setPalette(mPalette);
}
@@ -1038,7 +1048,7 @@
//-
void KMCom