Bug 92918 - Folder Menu not updated after enabling Expiration for a Folder
Summary: Folder Menu not updated after enabling Expiration for a Folder
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: keys and menus (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-08 16:09 UTC by Unknown
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 Unknown 2004-11-08 16:09:57 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
OS:                Linux

When enabling the expiration for a folder, the Folder menu is not updated but the context menu of the folder is. What I did:

context menu of a local folder -> preferences
enabling expiration of read emails, pressed ok
open Folder menu -> Expire is inactive
open context menu -> Expire is active

if you change the open folder an switch back, both menus have the "Expire" enabled.

mfg
/dirk
Comment 1 David Faure 2004-11-08 18:12:44 UTC
Does this fix it?

--- kmmainwidget.cpp    5 Nov 2004 08:54:53 -0000       1.281.2.1
+++ kmmainwidget.cpp    8 Nov 2004 17:12:18 -0000
@@ -891,6 +891,7 @@ void KMMainWidget::slotModifyFolder()
   KMFolderTreeItem *item = static_cast<KMFolderTreeItem*>( mFolderTree->currentItem() );
   if ( item )
     item->properties();
+  updateFolderMenu();
 }

 //-----------------------------------------------------------------------------


Comment 2 David Faure 2004-11-23 22:40:58 UTC
CVS commit by faure: 

Fixed "Folder Menu not updated after enabling Expiration for a Folder", approved by Ingo.
BUG: 92918


  M +3 -7      kmfoldertree.cpp   1.313.2.7
  M +13 -1     kmmainwidget.cpp   1.250.2.12
  M +2 -0      kmmainwidget.h   1.70.2.4


--- kdepim/kmail/kmfoldertree.cpp  #1.313.2.6:1.313.2.7
@@ -242,11 +242,7 @@ void KMFolderTreeItem::properties()
     return;
 
-  KMFolderDialog *props;
-
-  props = new KMFolderDialog( mFolder, mFolder->parent(), static_cast<KMFolderTree *>( listView() ),
-                              i18n("Properties of Folder %1").arg( mFolder->label() ) );
-  props->exec();
-  //Nothing here the above exec() may actually delete this KMFolderTreeItem
-  return;
+  KMFolderTree* tree = static_cast<KMFolderTree*>( listView() );
+  tree->mainWidget()->modifyFolder( this );
+  //Nothing here the above may actually delete this KMFolderTreeItem
 }
 

--- kdepim/kmail/kmmainwidget.cpp  #1.250.2.11:1.250.2.12
@@ -888,5 +888,17 @@ void KMMainWidget::slotModifyFolder()
   KMFolderTreeItem *item = static_cast<KMFolderTreeItem*>( mFolderTree->currentItem() );
   if ( item )
-    item->properties();
+    modifyFolder( item );
+}
+
+//-----------------------------------------------------------------------------
+void KMMainWidget::modifyFolder( KMFolderTreeItem* folderItem )
+{
+  KMFolder* folder = folderItem->folder();
+  KMFolderTree* folderTree = static_cast<KMFolderTree *>( folderItem->listView() );
+  KMFolderDialog *props = new KMFolderDialog( folder, folder->parent(), folderTree,
+                                              i18n("Properties of Folder %1").arg( folder->label() ) );
+  props->exec();
+  delete props;
+  updateFolderMenu();
 }
 

--- kdepim/kmail/kmmainwidget.h  #1.70.2.3:1.70.2.4
@@ -143,4 +143,6 @@ public:
   KMSystemTray *systray() const;
 
+  void modifyFolder( KMFolderTreeItem* folderItem );
+
 public slots:
   void slotMoveMsgToFolder( KMFolder *dest);