diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-02-21 13:35:11 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-02-23 15:43:23 +0100 |
commit | 7fbd3cbdadb5bfb509b9bc396d949fe38a067072 (patch) | |
tree | 7d11120d4eb69aaa42039181d3b35a71b8ec0c9e /framework/qml | |
parent | 46486a878310df55b686b8fbc2b6aaf35d613da7 (diff) | |
download | kube-7fbd3cbdadb5bfb509b9bc396d949fe38a067072.tar.gz kube-7fbd3cbdadb5bfb509b9bc396d949fe38a067072.zip |
Search in conversationview
...via syntax highligher or search api.
Diffstat (limited to 'framework/qml')
-rw-r--r-- | framework/qml/ConversationView.qml | 8 | ||||
-rw-r--r-- | framework/qml/MailListView.qml | 4 | ||||
-rw-r--r-- | framework/qml/MailViewer.qml | 1 | ||||
-rw-r--r-- | framework/qml/Messages.qml | 1 |
4 files changed, 14 insertions, 0 deletions
diff --git a/framework/qml/ConversationView.qml b/framework/qml/ConversationView.qml index 2dab92ba..0fd76f8f 100644 --- a/framework/qml/ConversationView.qml +++ b/framework/qml/ConversationView.qml | |||
@@ -31,6 +31,12 @@ FocusScope { | |||
31 | property variant mail; | 31 | property variant mail; |
32 | property bool hideTrash: true; | 32 | property bool hideTrash: true; |
33 | property bool hideNonTrash: false; | 33 | property bool hideNonTrash: false; |
34 | property string searchString: "" | ||
35 | |||
36 | Kube.Listener { | ||
37 | filter: Kube.Messages.searchString | ||
38 | onMessageReceived: root.searchString = message.searchString | ||
39 | } | ||
34 | 40 | ||
35 | Rectangle { | 41 | Rectangle { |
36 | anchors.fill: parent | 42 | anchors.fill: parent |
@@ -46,6 +52,7 @@ FocusScope { | |||
46 | left: parent.left | 52 | left: parent.left |
47 | right: parent.right | 53 | right: parent.right |
48 | } | 54 | } |
55 | |||
49 | //Shrink the listview if the content doesn't fill the full height, so the email appears on top instead of on the bottom. | 56 | //Shrink the listview if the content doesn't fill the full height, so the email appears on top instead of on the bottom. |
50 | height: Math.min(contentHeight, parent.height) | 57 | height: Math.min(contentHeight, parent.height) |
51 | 58 | ||
@@ -98,6 +105,7 @@ FocusScope { | |||
98 | sent: model.sent | 105 | sent: model.sent |
99 | incomplete: model.incomplete | 106 | incomplete: model.incomplete |
100 | current: delegateRoot.isCurrentItem | 107 | current: delegateRoot.isCurrentItem |
108 | searchString: root.searchString | ||
101 | } | 109 | } |
102 | } | 110 | } |
103 | 111 | ||
diff --git a/framework/qml/MailListView.qml b/framework/qml/MailListView.qml index 35c90618..cc68f003 100644 --- a/framework/qml/MailListView.qml +++ b/framework/qml/MailListView.qml | |||
@@ -35,6 +35,10 @@ FocusScope { | |||
35 | property bool showFilter: false | 35 | property bool showFilter: false |
36 | property string filter: null | 36 | property string filter: null |
37 | 37 | ||
38 | onFilterChanged: { | ||
39 | Kube.Fabric.postMessage(Kube.Messages.searchString, {"searchString": filter}) | ||
40 | } | ||
41 | |||
38 | onParentFolderChanged: { | 42 | onParentFolderChanged: { |
39 | currentMail = null | 43 | currentMail = null |
40 | filterField.clearSearch() | 44 | filterField.clearSearch() |
diff --git a/framework/qml/MailViewer.qml b/framework/qml/MailViewer.qml index f52e694d..e37fb3f7 100644 --- a/framework/qml/MailViewer.qml +++ b/framework/qml/MailViewer.qml | |||
@@ -42,6 +42,7 @@ Rectangle { | |||
42 | property bool incomplete: false; | 42 | property bool incomplete: false; |
43 | property bool current: false; | 43 | property bool current: false; |
44 | property bool unread; | 44 | property bool unread; |
45 | property alias searchString: mailViewer.searchString | ||
45 | 46 | ||
46 | implicitHeight: header.height + attachments.height + body.height + incompleteBody.height + footer.height + Kube.Units.largeSpacing | 47 | implicitHeight: header.height + attachments.height + body.height + incompleteBody.height + footer.height + Kube.Units.largeSpacing |
47 | 48 | ||
diff --git a/framework/qml/Messages.qml b/framework/qml/Messages.qml index 9df83863..35aa750a 100644 --- a/framework/qml/Messages.qml +++ b/framework/qml/Messages.qml | |||
@@ -42,6 +42,7 @@ Item { | |||
42 | property string progressNotification: "progressNotification" | 42 | property string progressNotification: "progressNotification" |
43 | property string errorNotification: "errorNotification" | 43 | property string errorNotification: "errorNotification" |
44 | property string search: "search" | 44 | property string search: "search" |
45 | property string searchString: "searchString" | ||
45 | property string synchronize: "synchronize" | 46 | property string synchronize: "synchronize" |
46 | property string reply: "reply" | 47 | property string reply: "reply" |
47 | property string forward: "forward" | 48 | property string forward: "forward" |