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
50f61885
Commit
50f61885
authored
Oct 13, 2021
by
Laurent Montel
😁
Browse files
Continue to implement historyswitchfolder
parent
510deb42
Pipeline
#88530
passed with stage
in 30 minutes and 26 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/historyswitchfoldermanager.cpp
View file @
50f61885
...
...
@@ -22,7 +22,7 @@ HistorySwitchFolderManager::~HistorySwitchFolderManager()
void
HistorySwitchFolderManager
::
addHistory
(
const
Akonadi
::
Collection
&
currentCol
,
const
Akonadi
::
Collection
&
col
)
{
if
(
currentCol
.
isValid
()
&&
col
.
isValid
())
{
if
(
col
.
isValid
())
{
mUndoStack
->
push
(
new
HistorySwitchFolderCommand
(
this
,
currentCol
,
col
));
}
}
...
...
@@ -34,20 +34,26 @@ void HistorySwitchFolderManager::clear()
void
HistorySwitchFolderManager
::
changeCollection
(
const
Akonadi
::
Collection
&
currentCol
)
{
qDebug
()
<<
"HistorySwitchFolderManager::changeCollection "
<<
currentCol
;
Q_EMIT
switchToFolder
(
currentCol
);
if
(
currentCol
.
isValid
())
{
qDebug
()
<<
"HistorySwitchFolderManager::changeCollection "
<<
currentCol
;
Q_EMIT
switchToFolder
(
currentCol
);
}
}
void
HistorySwitchFolderManager
::
undo
()
{
qDebug
()
<<
" void HistorySwitchFolderManager::undo()"
;
mUndoStack
->
undo
();
if
(
mUndoStack
->
canUndo
())
{
mUndoStack
->
undo
();
}
}
void
HistorySwitchFolderManager
::
redo
()
{
qDebug
()
<<
" void HistorySwitchFolderManager::redo()"
;
mUndoStack
->
redo
();
if
(
mUndoStack
->
canRedo
())
{
mUndoStack
->
redo
();
}
}
HistorySwitchFolderCommand
::
HistorySwitchFolderCommand
(
HistorySwitchFolderManager
*
manager
,
...
...
src/kmmainwidget.cpp
View file @
50f61885
...
...
@@ -335,7 +335,7 @@ KMMainWidget::KMMainWidget(QWidget *parent, KXMLGUIClient *aGUIClient, KActionCo
connect
(
&
mCheckMailTimer
,
&
QTimer
::
timeout
,
this
,
&
KMMainWidget
::
slotUpdateActionsAfterMailChecking
);
setupUnifiedMailboxChecker
();
connect
(
mHistorySwitchFolderManager
,
&
HistorySwitchFolderManager
::
switchToFolder
,
this
,
&
KMMainWidget
::
slot
SelectCollection
Folder
);
connect
(
mHistorySwitchFolderManager
,
&
HistorySwitchFolderManager
::
switchToFolder
,
this
,
&
KMMainWidget
::
slot
HistorySwitch
Folder
);
}
QWidget
*
KMMainWidget
::
dkimWidgetInfo
()
const
...
...
@@ -480,8 +480,15 @@ void KMMainWidget::slotFolderChanged(const Akonadi::Collection &collection)
if
(
mCurrentCollection
==
collection
)
{
return
;
}
mHistorySwitchFolderManager
->
addHistory
(
mCurrentCollection
,
collection
);
}
void
KMMainWidget
::
slotHistorySwitchFolder
(
const
Akonadi
::
Collection
&
collection
)
{
if
(
mFolderTreeWidget
)
{
mFolderTreeWidget
->
selectCollectionFolder
(
collection
);
}
// Store previous collection
// FIXME mHistorySwitchFolderManager->addHistory(mCurrentCollection, collection);
if
(
mGoToFirstUnreadMessageInSelectedFolder
)
{
// the default action has been overridden from outside
mPreSelectionMode
=
MessageList
::
Core
::
PreSelectFirstUnreadCentered
;
...
...
src/kmmainwidget.h
View file @
50f61885
...
...
@@ -529,6 +529,7 @@ private:
void
slotRestartAccount
();
void
slotAccountSettings
();
void
updateDisplayFormatMessage
();
void
slotHistorySwitchFolder
(
const
Akonadi
::
Collection
&
collection
);
// Message actions
QAction
*
mDeleteAction
=
nullptr
;
...
...
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