<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>108523</bug_id>
          
          <creation_ts>2005-07-04 08:27:28 +0000</creation_ts>
          <short_desc>&quot;empty trash&quot; sometimes stays inactive</short_desc>
          <delta_ts>2007-09-14 12:17:01 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>kmail</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>Gentoo Packages</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Maciej J . Woloszyk">matofesi</reporter>
          <assigned_to name="kdepim bugs">pim-bugs-null</assigned_to>
          
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>355265</commentid>
    <comment_count>0</comment_count>
    <who name="Maciej J . Woloszyk">matofesi</who>
    <bug_when>2005-07-04 08:27:28 +0000</bug_when>
    <thetext>Version:            (using KDE KDE 3.4.1)
Installed from:    Gentoo Packages

I use message filtering with kmail and I have some filters that put messages received with POP3 directly into trash. When I receive mail and open trash I can see some messages and then use context menu to empty trash - everything is fine to this point. After emptying trash &quot;empty trash&quot; in context menu deactivates as there should be no messages in trash to remove. But then I receive messages from another account - this is some information eccount and all of its messages are filtered into trash. After that when I try to empty trash again (trash folder is the one that is opened for all the time) the &quot;empty trash&quot; in context menu is inactive - kmail didn&apos;t noticed that some messages have been put into trash using filters.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>380241</commentid>
    <comment_count>1</comment_count>
    <who name="Maciej J . Woloszyk">matofesi</who>
    <bug_when>2005-10-09 17:40:46 +0000</bug_when>
    <thetext>I&apos;ve just found out exactly when the &quot;empty trash&quot; stays disabled with some mail in trash. The problem occurs when the trash is empty and you select the trash - &quot;empty trash&quot; is disabled. If then you receive some mail that is filterd directly to trash, trash contains some mail but &quot;empty trash&quot; is still disabled - it looks like filtering should notify rest of kmail that it put some mails into trash.

And BTW I currently use KDE 3.5 beta 1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>429504</commentid>
    <comment_count>2</comment_count>
    <who name="Maciej J . Woloszyk">matofesi</who>
    <bug_when>2006-04-10 09:50:48 +0000</bug_when>
    <thetext>And to make sure the report doesn&apos;t got forgotten - the same behaviour is still present in KDE 3.5.2. To confirm it you just need to create a filter in kmail that moves some incoming mail into trash and mark it as read (I&apos;m not sure if the last part is necessary), then select trash folder, make sure it&apos;s empty, select another folder then trash again (&quot;empty trash&quot; in context menu shoud be inactive) and then download some mail that would be filtered directly to trash - even though trash contains some mail the &quot;empty trash&quot; stays inactive auntil you select another folder and then trash again.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>429579</commentid>
    <comment_count>3</comment_count>
      <attachid>15543</attachid>
    <who name="Maciej J . Woloszyk">matofesi</who>
    <bug_when>2006-04-10 15:25:44 +0000</bug_when>
    <thetext>Created attachment 15543
update &quot;empty trash&quot; menu to reflect trash status

Ok. I did some ugly hacking and I think I can show the rough idea of what I
would like to be done &quot;the proper way&quot; (probably somewhere in asynchroneous
kmail mechanisms after messages really got deleted). For now the patch works
fine for me - it calls updateFolderMenu() after fetching mail making sure
everyting is updated even after filtering. To make things work properly it also
disables mEmptyFolderAction in slotEmptyFolder. Now I can have messages
filtered directly to trash that is selected and I the &quot;Empty trash&quot; menu
changes it&apos;s state depending on the trash status (and it also works for &quot;Move
all to trash&quot;).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>444518</commentid>
    <comment_count>4</comment_count>
    <who name="Maciej J . Woloszyk">matofesi</who>
    <bug_when>2006-06-05 17:16:36 +0000</bug_when>
    <thetext>Just installed KDE 3.5.3 - bug is still there :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>458576</commentid>
    <comment_count>5</comment_count>
    <who name="Maciej J . Woloszyk">matofesi</who>
    <bug_when>2006-08-07 08:36:58 +0000</bug_when>
    <thetext>Just installed KDE 3.5.4 - bug is still there :( </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>477204</commentid>
    <comment_count>6</comment_count>
    <who name="Maciej J . Woloszyk">matofesi</who>
    <bug_when>2006-10-16 09:42:27 +0000</bug_when>
    <thetext>Just to let anyone (?) reading (??) this - 3.5.5 installed with bug still there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>477399</commentid>
    <comment_count>7</comment_count>
    <who name="Allen Winter">winter</who>
    <bug_when>2006-10-16 22:56:53 +0000</bug_when>
    <thetext>SVN commit 596184 by winterz:

Fix Bug 108523: &quot;empty trash&quot; sometimes stays inactive.
Patch provided by Maciej J . Woloszyk.  Thanks Maciej!
Patch approved by Ingo.

BUGS: 108523


 M  +8 -0      kmmainwidget.cpp  


--- branches/KDE/3.5/kdepim/kmail/kmmainwidget.cpp #596183:596184
@@ -846,6 +846,10 @@
     }
   }
 
+  // update folder menus in case some mail got filtered to trash/current folder
+  // and we can enable &quot;empty trash/move all to trash&quot; action etc.
+  updateFolderMenu();
+
   if ( !showNotification )
     return;
 
@@ -1013,6 +1017,10 @@
     BroadcastStatus::instance()-&gt;setStatusMsg(i18n(&quot;Moved all messages to the trash&quot;));
 
   updateMessageActions();
+
+  // Disable empty trash/move all to trash action - we&apos;ve just deleted/moved all folder
+  // contents.
+  mEmptyFolderAction-&gt;setEnabled( false );
 }
 
 
</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>15543</attachid>
            <date>2006-04-10 15:25:44 +0000</date>
            <delta_ts>2006-04-10 15:25:44 +0000</delta_ts>
            <desc>update &quot;empty trash&quot; menu to reflect trash status</desc>
            <filename>kmail-update-empty_trash.patch</filename>
            <type>text/plain</type>
            <size>707</size>
            <attacher name="Maciej J . Woloszyk">matofesi</attacher>
            
              <data encoding="base64">LS0tIGtkZXBpbS0zLjUuMi9rbWFpbC1vbGQva21tYWlud2lkZ2V0LmNwcAkyMDA2LTAzLTE3IDEx
OjE1OjU0LjAwMDAwMDAwMCArMDEwMAorKysga2RlcGltLTMuNS4yL2ttYWlsL2ttbWFpbndpZGdl
dC5jcHAJMjAwNi0wNC0xMCAxNToyMDowNC4wMDAwMDAwMDAgKzAyMDAKQEAgLTg0NSw2ICs4NDUs
MTAgQEAKICAgICB9CiAgIH0KIAorICAvLyB1cGRhdGUgZm9sZGVyIG1lbnVzIGluIGNhc2Ugc29t
ZSBtYWlsIGdvdCBmaWx0ZXJlZCB0byB0cmFzaC9jdXJyZW50IGZvbGRlcgorICAvLyBhbmQgd2Ug
Y2FuIGVuYWJsZSAiZW1wdHkgdHJhc2gvbW92ZSBhbGwgdG8gdHJhc2giIGFjdGlvbiBldGMuCisg
IHVwZGF0ZUZvbGRlck1lbnUoKTsKKwogICBpZiAoICFzaG93Tm90aWZpY2F0aW9uICkKICAgICBy
ZXR1cm47CiAKQEAgLTEwMTIsNiArMTAxNiwxMCBAQAogICAgIEJyb2FkY2FzdFN0YXR1czo6aW5z
dGFuY2UoKS0+c2V0U3RhdHVzTXNnKGkxOG4oIk1vdmVkIGFsbCBtZXNzYWdlcyB0byB0aGUgdHJh
c2giKSk7CiAKICAgdXBkYXRlTWVzc2FnZUFjdGlvbnMoKTsKKworICAvLyBEaXNhYmxlIGVtcHR5
IHRyYXNoL21vdmUgYWxsIHRvIHRyYXNoIGFjdGlvbiAtIHdlJ3ZlIGp1c3QgZGVsZXRlZC9tb3Zl
ZCBhbGwgZm9sZGVyCisgIC8vIGNvbnRlbnRzLgorICBtRW1wdHlGb2xkZXJBY3Rpb24tPnNldEVu
YWJsZWQoIGZhbHNlICk7CiB9CiAKIAo=
</data>

          </attachment>
      

    </bug>

</bugzilla>