summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/windows/mailwindow.cpp13
-rw-r--r--src/gui/windows/mailwindow.h2
2 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/windows/mailwindow.cpp b/src/gui/windows/mailwindow.cpp
index b23984c4c..e01bab225 100644
--- a/src/gui/windows/mailwindow.cpp
+++ b/src/gui/windows/mailwindow.cpp
@@ -263,3 +263,16 @@ void MailWindow::viewPrev(const int id)
}
}
}
+
+void MailWindow::mouseClicked(MouseEvent &event)
+{
+ if (event.getButton() == MouseButton::LEFT)
+ {
+ event.consume();
+ if (event.getClickCount() == 2 &&
+ event.getSource() == mListBox)
+ {
+ action(ActionEvent(mListBox, "open"));
+ }
+ }
+}
diff --git a/src/gui/windows/mailwindow.h b/src/gui/windows/mailwindow.h
index e1562f074..2013461d5 100644
--- a/src/gui/windows/mailwindow.h
+++ b/src/gui/windows/mailwindow.h
@@ -63,6 +63,8 @@ class MailWindow final : public Window,
void viewPrev(const int id);
+ void mouseClicked(MouseEvent &event) override final;
+
private:
std::vector<MailMessage*> mMessages;
std::map<int, MailMessage*> mMessagesMap;