Bug 127442 - komposer html toolbar doesn't remain hidden
Summary: komposer html toolbar doesn't remain hidden
Status: RESOLVED WORKSFORME
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-16 14:03 UTC by Carsten Lohrke
Modified: 2007-09-14 12:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carsten Lohrke 2006-05-16 14:03:54 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources

I have a Gentoo 3.5.2 installation, but kdepim is more or less branch. Lately I noticed that despite having unchecked the html toolbar, every time I write a new email, the toolbar is visible again.
Comment 1 Ingo Klöcker 2006-05-17 00:25:55 UTC
You have to disable Options->Formatting (HTML) in the composer.
Comment 2 Carsten Lohrke 2006-05-17 22:13:36 UTC
Noticed this myself in between. I do only wonder why KMail re-enabled the formatting option value on its own somehow, since I disbabled it long before. I'm quite sure when I'd start asking why you don't remove the possibility to hide it from the toolbar menu then, I'd hear that it is a limitation of the toolbar class. Annonying is, that when I close the KDE session without explicitly closing KMail before, the formatting option change doesn't get stored - and I do run a KMail with all the latest config related code changes aplied to the 3.5 branch.
Comment 3 Ingo Klöcker 2006-05-18 00:02:48 UTC
The formatting is automatically enabled as soon as you use any of the formatting shortcuts, e.g. Ctrl+B for bold, etc.

Your guess about the limitation of the toolbar functionality is correct.

Wrt the not immediately saved configuration change you might want to file a new bug report. Just to make sure: Did you at least close the composer window before you closed the KDE session?
Comment 4 Carsten Lohrke 2006-05-18 00:43:32 UTC
> The formatting is automatically enabled as soon as you use any of the formatting shortcuts, e.g. Ctrl+B for bold, etc

Oh, this is _very_ annoying. I (and for sure many others) do explicitly not want to send out html emails. I urge you to change this behaviour. Please. :(


>Wrt the not immediately saved configuration change you might want to file a new bug report. Just to make sure: Did you at least close the composer window before you closed the KDE session?

Bug 127538 and yes, the composer window was closed. I do not know the KDE framework, but I do wonder what it so hard about writing the value to a configuration file immediatly, when it gets changed by the user. This is not the first session related config issue with KMail or other application (e.g. Konsole) and seeing the same sort of bug popping up again and again. It's quite frustrating from a users pov.
Comment 5 Carsten Lohrke 2006-05-18 00:49:37 UTC
Um, please concatenate the second last and the last sentence as it makes sense.
Comment 6 Luciano Montanaro 2006-05-18 16:20:29 UTC
I have been bitten by this bug too.
Maybe disabling the toolbar could be treated as unchecking the Options->Format item? After all, it can be re-enabled accidentally.
Comment 7 Ingo Klöcker 2006-05-19 21:21:10 UTC
SVN commit 542603 by kloecker:

Disable HTML formatting if the user hides the HTML toolbar.
CCBUG:127442

 M  +13 -0     kmcomposewin.cpp  
 M  +1 -0      kmcomposewin.h  


--- branches/KDE/3.5/kdepim/kmail/kmcomposewin.cpp #542602:542603
@@ -1447,6 +1447,10 @@
 
   //  editorFocusChanged(false);
   createGUI("kmcomposerui.rc");
+
+  connect( toolBar("htmlToolBar"), SIGNAL( visibilityChanged(bool) ),
+           this, SLOT( htmlToolBarVisibilityChanged(bool) ) );
+
   // In Kontact, this entry would read "Configure Kontact", but bring
   // up KMail's config dialog. That's sensible, though, so fix the label.
   KAction* configureAction = actionCollection()->action("options_configure" );
@@ -4102,6 +4106,15 @@
   }
 }
 
+void KMComposeWin::htmlToolBarVisibilityChanged( bool visible )
+{
+  // disable markup if the user hides the HTML toolbar
+  if ( !visible ) {
+    markupAction->setChecked( false );
+    toggleMarkup( false );
+  }
+}
+
 void KMComposeWin::slotSubjectTextSpellChecked()
 {
   mSubjectTextWasSpellChecked = true;
--- branches/KDE/3.5/kdepim/kmail/kmcomposewin.h #542602:542603
@@ -412,6 +412,7 @@
 
   void slotToggleMarkup();
   void toggleMarkup(bool markup);
+  void htmlToolBarVisibilityChanged( bool visible );
 
 //  void slotSpellConfigure();
   void slotSpellcheckDone(int result);