Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KMail
Commits
510deb42
Commit
510deb42
authored
Oct 13, 2021
by
Laurent Montel
😁
Browse files
Continue to implement historyswitch folder manager
parent
2226633b
Pipeline
#88384
passed with stage
in 25 minutes and 35 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/historyswitchfoldermanager.cpp
View file @
510deb42
...
...
@@ -22,7 +22,9 @@ HistorySwitchFolderManager::~HistorySwitchFolderManager()
void
HistorySwitchFolderManager
::
addHistory
(
const
Akonadi
::
Collection
&
currentCol
,
const
Akonadi
::
Collection
&
col
)
{
mUndoStack
->
push
(
new
HistorySwitchFolderCommand
(
this
,
currentCol
,
col
));
if
(
currentCol
.
isValid
()
&&
col
.
isValid
())
{
mUndoStack
->
push
(
new
HistorySwitchFolderCommand
(
this
,
currentCol
,
col
));
}
}
void
HistorySwitchFolderManager
::
clear
()
...
...
@@ -32,6 +34,7 @@ void HistorySwitchFolderManager::clear()
void
HistorySwitchFolderManager
::
changeCollection
(
const
Akonadi
::
Collection
&
currentCol
)
{
qDebug
()
<<
"HistorySwitchFolderManager::changeCollection "
<<
currentCol
;
Q_EMIT
switchToFolder
(
currentCol
);
}
...
...
src/kmmainwidget.cpp
View file @
510deb42
...
...
@@ -335,6 +335,7 @@ KMMainWidget::KMMainWidget(QWidget *parent, KXMLGUIClient *aGUIClient, KActionCo
connect
(
&
mCheckMailTimer
,
&
QTimer
::
timeout
,
this
,
&
KMMainWidget
::
slotUpdateActionsAfterMailChecking
);
setupUnifiedMailboxChecker
();
connect
(
mHistorySwitchFolderManager
,
&
HistorySwitchFolderManager
::
switchToFolder
,
this
,
&
KMMainWidget
::
slotSelectCollectionFolder
);
}
QWidget
*
KMMainWidget
::
dkimWidgetInfo
()
const
...
...
@@ -480,7 +481,7 @@ void KMMainWidget::slotFolderChanged(const Akonadi::Collection &collection)
return
;
}
// Store previous collection
mHistorySwitchFolderManager
->
addHistory
(
mCurrentCollection
,
collection
);
// FIXME
mHistorySwitchFolderManager->addHistory(mCurrentCollection, collection);
if
(
mGoToFirstUnreadMessageInSelectedFolder
)
{
// the default action has been overridden from outside
mPreSelectionMode
=
MessageList
::
Core
::
PreSelectFirstUnreadCentered
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment