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

List:       kde-bugs-dist
Subject:    [Bug 87742] even though HTML option is not checked by default,
From:       Don Sanders <don () sanders ! org>
Date:       2004-08-25 13:21:06
Message-ID: 20040825132106.11312.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
      
http://bugs.kde.org/show_bug.cgi?id=87742      
don sanders org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From don sanders org  2004-08-25 15:20 -------
CVS commit by sanders: 

Fix an html editing bug.

Don't show the html toolbar by default after KMail has started up, this is
actually a change in default settings. (Not sure it this should be 
backported/discussed).

Remember the state of the html toolbar (as per usual in the settings, in
the case of multiple composers last closed composer wins), and restore the
html toolbar state when a new composer window is shown.

Bug fix, keep the "Formatting (HTML)" checkbox menu item in the composer 
in sync with the visibility of the html toolbar.

Keep the logic that resists sending plain text emails as html. That is
even when html formatting is on and the html toolbar is shown an email
won't actually be sent as html unless an html toolbar widget is actually 
used.

CCMAIL:87742-done bugs kde org


  M +15 -3     kmcomposewin.cpp   1.853
  M +3 -1      kmcomposewin.h   1.253


--- kdepim/kmail/kmcomposewin.h  #1.252:1.253
 @ -357,4 +357,5  @ public:
   bool subjectTextWasSpellChecked() const { return mSubjectTextWasSpellChecked; }
 public slots:
+  void polish();
   /**
    * Actions:
 @ -743,5 +744,4  @ protected:
   long mShowHeaders;
   QString mExtEditor;
-  bool mUseHTMLEditor;
   bool mUseExtEditor;
   QPtrList<_StringPair> mCustHeaders;
 @ -752,4 +752,6  @ protected:
   int mWordWrap;
   bool mUseFixedFont;
+  bool mUseHTMLEditor;
+  bool mHtmlMarkup;
   QFont mBodyFont, mFixedFont;
   //  QList<QLineEdit> mEdtList;

--- kdepim/kmail/kmcomposewin.cpp  #1.852:1.853
 @ -504,4 +504,5  @ void KMComposeWin::readConfig(void)
   mEdtCc->setCompletionMode( (KGlobalSettings::Completion) mode );
   mEdtBcc->setCompletionMode( (KGlobalSettings::Completion) mode );
+  mHtmlMarkup = config->readBoolEntry("html-markup", false);
 
   readColorConfig();
 @ -617,4 +618,5  @ void KMComposeWin::writeConfig(void)
     config->writeEntry("transport-history", mTransportHistory );
     config->writeEntry("use-fixed-font", mUseFixedFont );
+    config->writeEntry("html-markup", mHtmlMarkup);
   }
 
 @ -1038,5 +1040,4  @ void KMComposeWin::setupActions(void)
                                     SLOT(slotToggleMarkup()),
                       actionCollection(), "html");
-  markupAction->setChecked(mUseHTMLEditor);
 
   mAllFieldsAction = new KToggleAction (i18n("&All Fields"), 0, this,
 @ -3220,4 +3220,5  @ void KMComposeWin::slotToggleMarkup()
 {
  if ( markupAction->isChecked() ) {
+    mHtmlMarkup = true;
     toolBar("htmlToolBar")->show();
    // markup will be toggled as soon as markup is actually used
 @ -3237,5 +3238,6  @ void KMComposeWin::toggleMarkup(bool mar
     if ( !mUseHTMLEditor ) {
     kdDebug(5006) << "setting RichText editor" << endl;
-    mUseHTMLEditor = true; // set it directly to true. setColor hits another toggleMarkup
+    mUseHTMLEditor = true;
+    mHtmlMarkup = true; // set it directly to true. setColor hits another toggleMarkup
 
     // set all highlighted text caused by spelling back to black
 @ -3257,4 +3259,5  @ void KMComposeWin::toggleMarkup(bool mar
   else if ( mUseHTMLEditor ) {
     kdDebug(5006) << "setting PlainText editor" << endl;
+    mHtmlMarkup = false;
     mUseHTMLEditor = false;
     mEditor->setTextFormat(Qt::PlainText);
 @ -3268,4 +3271,5  @ void KMComposeWin::toggleMarkup(bool mar
   else if ( !markup && !mUseHTMLEditor )
     {
+      mHtmlMarkup = false;
       toolBar("htmlToolBar")->hide();
     }
 @ -3297,4 +3301,12  @ void KMComposeWin::slotSpellcheck()
 }
 
+void KMComposeWin::polish()
+{
+  markupAction->setChecked(mHtmlMarkup);
+  if (mHtmlMarkup)
+    toolBar("htmlToolBar")->show();
+  else
+    toolBar("htmlToolBar")->hide();
+}
 
 //-----------------------------------------------------------------------------
[prev in list] [next in list] [prev in thread] [next in thread] 

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