Bug 22085 - Don't mark as 'read' message opened when entering a folder
Summary: Don't mark as 'read' message opened when entering a folder
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-03-11 04:33 UTC by nick
Modified: 2007-09-14 12:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Not Mark Read at Folder Change patch for 3.2.3 (4.05 KB, patch)
2004-08-04 10:38 UTC, Gilhad
Details
Not Mark Read at Folder Change patch for 3.3.1 (4.12 KB, patch)
2004-11-11 12:52 UTC, Gilhad
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nick 2001-03-11 04:22:30 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           kmail
Version:           KDE 2.0.1 
Severity:          wishlist
Installed from:    Compiled From Sources
Compiler:          gcc 2.95.2
OS:                Linux
OS/Compiler notes: Not Specified

Whenever you select a folder kmail chooses (seemingly randomly) a message to view and
marks it as read.  This is highly irritating as often it picks one that's in the middle of a thread I haven't even started yet or a response that I don't want to read yet--so I have to manually mark it back as 'unread'.

Maybe it would be better to either not select a message upon entering a folder or not mark as 'read' the first message that was automatically chosen to be displayed.  Or perhaps always opening the last _read_ message.

(Submitted via bugs.kde.org)
Comment 1 obdrzalek 2001-06-04 15:21:25 UTC


Here is my (unoficial but working) 'hack': autoselected 
message is NOT marked as read on entry to folder.

I wish for setting to get this functionality 'officially'


--- kmheaders.cpp        Fri Feb 23 22:32:05 2001
+++ kmheaders.cpp.new    Mon Apr 30 17:17:33 2001
@@ -15 +17 @@
 // kmheaders.cpp
 // #define fixedfont
+/* %%% */ // Added by Gilhad for NOT marking mails as read 
on folder change
+
 
 #include <stdlib.h>
 
@@ -51011 +51212 @@
 
 
 //---------------------------------------------------------
--------------------
+/* %%% */ int SetReadBlocked=0;
 void KMHeaders::setFolder (KMFolder *aFolder)
 {
   int id;
   QString str;
-
+/* %%% */ SetReadBlocked=1;
   setColumnText( mSortCol QIconSet( QPixmap()) 
columnText( mSortCol ));
   if (mFolder && mFolder==aFolder)
   {
@@ -6037 +6067 @@
         setMsgRead(mCurrentItem);
         setTopItemByIndex(mTopItem);
         setCurrentItemByIndex((mCurrentItem >= 0) ? 
mCurrentItem : 0);
-      }
+     }
     }
     else setCurrentItemByIndex(0);
     makeHeaderVisible();
@@ -6629 +6658 @@
       showingSize = false;
     }
   }
-
+/* %%% */ SetReadBlocked=0;
 }
-
 // QListView::setContentsPos doesn't seem to work
 // until after the list view has been shown at least
 // once.
@@ -8646 +8667 @@
       if (st==KMMsgStatusNew || st==KMMsgStatusUnread ||
          st==KMMsgStatusRead || st==KMMsgStatusOld)
         {
+/* %%% */ if (!SetReadBlocked)
          msg->setStatus(KMMsgStatusOld);
         }
     }
-- 
Zdravi
    mgr Jan Obdrzalek
    Zoom International
    obdrzalek@zoom-int.cz
Comment 2 Ingo Klöcker 2002-10-23 19:05:42 UTC
In KDE 3.1 it's configurable whether automatically the first new message 
should be selected when you enter a folder and a timeout for marking a message 
as read in configurable. 
 
Comment 3 Gilhad 2004-08-04 10:38:55 UTC
Created attachment 6989 [details]
Not Mark Read at Folder Change  patch for 3.2.3

Here is my patch to version 3.2.3, it works without problem for me
Comment 4 Till Adam 2004-08-04 13:17:31 UTC
Gilhad, as Ingo said before, the behavior to select an unread mail on folder change is configurable, and the mark as read timeout can be configured as well or disabled. I don't think your patch is needed, which is why this bug has been closed. As a general hint, usually patches should be in unified format (created with diff -u, or cvs diff -u) and should follow the coding style conventions for the particular area of KMail. This includes variable naming, for example. Member variables should be prefixed with an "m", so that they are easily recognizable.
Comment 5 Gilhad 2004-08-10 14:41:07 UTC
OK. My patch is ugly improvization, I will use better names and coding style next time.

My problem is, that I was not able to configure kmail to fit my needs of following:

- On selection of folder no message is (un)market, even if it is prewied in lower panel.
- On changing message in folder message is marked as "read" as soon, as it is selected (if I fast climb unimportant messages by pressing left/right arrow eventually with Shift for select, I climb maybe 5 messages in less than second and still want them marked as "read")

My patch works perfectly for me and I have now mail client of my dreams ;-)
I can customize my patch to next versions, so I do not care too much, if it is accepted or not, but some of my friends are using it too, because of their similar aproach to mails.

Thanks for you care and nice mail client.
Comment 6 Gilhad 2004-11-11 12:52:35 UTC
Created attachment 8248 [details]
Not Mark Read at Folder Change patch for 3.3.1

Hello, Gilhad is online again ;-)
The kmail configuration does not help so much. Even with unchecked "Jump to
first unread message" it jumps to the first message and as affects it. And
because I use sort by date, new on top, it means that it usually marks first
unread message as read anyway. Tricks with timeout are also not so big help, as
I many times use just skippinig between messages to mark them read (spam,
autogenerated messages with all_saying_subject, ...).

For those, who want to use my patches, here is patch for version 3.3.1
Comment 7 Till Adam 2004-11-20 14:11:49 UTC
Gilhad, we have extended KMail's options to include "select last selected mail", so it will re-select whatever was the last mail you had selected in that folder. Does that not do what you want?