diff options
author | bobufa <bobufa@users.noreply.github.com> | 2018-07-22 16:58:51 +0200 |
---|---|---|
committer | bobufa <bobufa@users.noreply.github.com> | 2018-08-13 22:39:18 +0200 |
commit | 4901b096708ff5ca54c3e5393de74f2a8be55894 (patch) | |
tree | d92993706cb1527228508971898e6be57da3a979 /main/src | |
parent | 2e2a9a239000509488f1a369ea4eaf4cdda9c0b1 (diff) | |
download | dino-4901b096708ff5ca54c3e5393de74f2a8be55894.tar.gz dino-4901b096708ff5ca54c3e5393de74f2a8be55894.zip |
add search filter expressions
Diffstat (limited to 'main/src')
-rw-r--r-- | main/src/ui/unified_window.vala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/main/src/ui/unified_window.vala b/main/src/ui/unified_window.vala index e5444f9d..cfcd2bff 100644 --- a/main/src/ui/unified_window.vala +++ b/main/src/ui/unified_window.vala @@ -42,6 +42,17 @@ public class UnifiedWindow : Window { conversation_titlebar.search_button.bind_property("active", search_revealer, "reveal-child", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL); search_revealer.notify["child-revealed"].connect(() => { if (search_revealer.child_revealed) { + if (conversation_frame.conversation != null) { + switch (conversation_frame.conversation.type_) { + case Conversation.Type.CHAT: + case Conversation.Type.GROUPCHAT_PM: + search_box.search_entry.text = @"with:$(conversation_frame.conversation.counterpart) "; + break; + case Conversation.Type.GROUPCHAT: + search_box.search_entry.text = @"in:$(conversation_frame.conversation.counterpart) "; + break; + } + } search_box.search_entry.grab_focus(); } else { search_box.search_entry.text = ""; |