Bug 70227 - disable Folder->Properties action if no folder is selected
Summary: disable Folder->Properties action if no folder is selected
Status: RESOLVED WORKSFORME
Alias: None
Product: kmail
Classification: Applications
Component: folder list (show other bugs)
Version: 1.10.3
Platform: Compiled Sources Linux
: NOR minor
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2003-12-12 15:21 UTC by Laurent Montel
Modified: 2009-08-14 00:27 UTC (History)
2 users (show)

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 Laurent Montel 2003-12-12 15:21:22 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
OS:          Linux

Hi,
When we have a new unix account or we make "rm -rf .kde/ && rm -rf ~/Mail"
and we launch kmail.
There is not a item selected into tree folder.
And we click on "folder->properties" kmail crash.

Problem is the we don't disable action when there is not an item selected into kmail.

I created a temporary patch.
--- kdepim-3.1.94/kmail/kmmainwidget.cpp--  2003-12-12 05:39:39.000000000 -0500
+++ kdepim-3.1.94/kmail/kmmainwidget.cpp    2003-12-12 05:39:53.000000000 -0500
@@ -814,7 +814,8 @@ void KMMainWidget::slotModifyFolder()
 {
   if (!mFolderTree) return;
   KMFolderTreeItem *item = static_cast<KMFolderTreeItem*>( mFolderTree->currentItem() );
-  item->properties();
+  if( item )
+     item->properties();
 }

it fixes crash.
But we must disable by default menu item when there is not a folder selected.

Regards.
Comment 1 Ingo Klöcker 2003-12-12 21:18:16 UTC
Okay, I fixed the crash. The remaining issue is of minor importance.
Comment 2 Ingo Klöcker 2003-12-12 21:19:19 UTC
Sorry, I forgot to change the Summary.
Comment 3 Fernando Vilas 2008-11-09 18:18:54 UTC
If no folder is selected, the folder->properties option is still available.  It should be greyed out. Tested on KMail 1.10.1 (KDE 4.1.2)
Comment 4 Michael Leupold 2008-11-23 22:23:36 UTC
I can't reproduce this on trunk r887937. I'm however not quite sure if this applies to this bug because if I remove all folders KMail creates them anew.
Comment 5 Martin Koller 2009-08-14 00:27:30 UTC
in 4.3 the folder are created, but none is selected - and the good thing: the folder properties menu is grayed out.