When jumping to the next unread message, it may occur "
- "that no more unread messages are below the current message.
"
- "When this option is checked, the search will start at the "
- "top of the message list. Otherwise, it will do nothing.
"
- "Similarly, when searching for the previous unread message, "
- "the search will start from the bottom of the message list if "
- "this option is checked.
" );
+ "When jumping to the next unread message, it may occur "
+ "that no more unread messages are below the current message.
"
+ "Don't loop: The search will stop at the last message in "
+ "the current folder.
"
+ "Loop in current folder: The search will continue at the "
+ "top of the message list, but not go to another folder.
"
+ "Loop in all folders: The search will continue at the top of "
+ "the message list. If no unread messages are found it will then continue "
+ "to the next folder.
"
+ "Similarly, when searching for the previous unread message, "
+ "the search will start from the bottom of the message list and continue to "
+ "the previous folder depeding on which option is selected.
" );
QWhatsThis::add( mLoopOnGotoUnread, msg );
}
@@ -3675,7 +3692,8 @@
kernel->inboxFolder()->idString() ) );
mCompactOnExitCheck->setChecked( general.readBoolEntry( "compact-all-on-exit", true ) );
mEmptyFolderConfirmCheck->setChecked( general.readBoolEntry( "confirm-before-empty", true ) );
- mLoopOnGotoUnread->setChecked( behaviour.readBoolEntry( "LoopOnGotoUnread", true ) );
+ // default = "Loop in current folder"
+ mLoopOnGotoUnread->setCurrentItem( behaviour.readNumEntry( "LoopOnGotoUnread", 1 ) );
mJumpToUnread->setChecked( behaviour.readBoolEntry( "JumpToUnread", false ) );
mDelayedMarkAsRead->setChecked( behaviour.readBoolEntry( "DelayedMarkAsRead", true ) );
mDelayedMarkTime->setValue( behaviour.readNumEntry( "DelayedMarkTime", 0 ) );
@@ -3697,7 +3715,7 @@
general.writeEntry( "warn-before-expire", mWarnBeforeExpire->isChecked() );
general.writeEntry( "startupFolder", mOnStartupOpenFolder->getFolder() ?
mOnStartupOpenFolder->getFolder()->idString() : QString::null );
- behaviour.writeEntry( "LoopOnGotoUnread", mLoopOnGotoUnread->isChecked() );
+ behaviour.writeEntry( "LoopOnGotoUnread", mLoopOnGotoUnread->currentItem() );
behaviour.writeEntry( "JumpToUnread", mJumpToUnread->isChecked() );
behaviour.writeEntry( "DelayedMarkAsRead", mDelayedMarkAsRead->isChecked() );
behaviour.writeEntry( "DelayedMarkTime", mDelayedMarkTime->value() );
Index: configuredialog_p.h
===================================================================
RCS file: /home/kde/kdepim/kmail/configuredialog_p.h,v
retrieving revision 1.62
diff -u -r1.62 configuredialog_p.h
--- configuredialog_p.h 27 May 2003 13:58:58 -0000 1.62
+++ configuredialog_p.h 17 Jul 2003 23:37:21 -0000
@@ -858,7 +858,7 @@
protected:
QCheckBox *mEmptyFolderConfirmCheck;
QCheckBox *mWarnBeforeExpire;
- QCheckBox *mLoopOnGotoUnread;
+ QComboBox *mLoopOnGotoUnread;
QCheckBox *mJumpToUnread;
QComboBox *mMailboxPrefCombo;
QCheckBox *mCompactOnExitCheck;
Index: kmheaders.cpp
===================================================================
RCS file: /home/kde/kdepim/kmail/kmheaders.cpp,v
retrieving revision 1.521
diff -u -r1.521 kmheaders.cpp
--- kmheaders.cpp 17 Jul 2003 22:13:12 -0000 1.521
+++ kmheaders.cpp 17 Jul 2003 23:37:21 -0000
@@ -681,7 +681,8 @@
// Behavior
{
KConfigGroupSaver saver(config, "Behaviour");
- mLoopOnGotoUnread = config->readBoolEntry( "LoopOnGotoUnread", true );
+ mLoopOnGotoUnread = (LoopOnGotoUnreadValue)config->readNumEntry(
+ "LoopOnGotoUnread", LoopInCurrentFolder );
mJumpToUnread = config->readBoolEntry( "JumpToUnread", false );
}
}
@@ -1876,18 +1877,21 @@
}
//-----------------------------------------------------------------------------
-void KMHeaders::nextUnreadMessage(bool acceptCurrent)
+bool KMHeaders::nextUnreadMessage(bool acceptCurrent)
{
- if ( !mFolder->countUnread() ) return;
+ if ( !mFolder || !mFolder->countUnread() ) return false;
int i = findUnread(TRUE, -1, false, acceptCurrent);
- if ( i < 0 && mLoopOnGotoUnread )
+ if ( i < 0 && mLoopOnGotoUnread != DontLoop )
{
KMHeaderItem * first = static_cast