Merge lp:~niels-avonds/lingo-dictionary/suggestions into lp:lingo-dictionary

Proposed by Niels Avonds
Status: Merged
Merged at revision: 119
Proposed branch: lp:~niels-avonds/lingo-dictionary/suggestions
Merge into: lp:lingo-dictionary
Diff against target: 32 lines (+15/-0)
1 file modified
src/lingo-window.vala (+15/-0)
To merge this branch: bzr merge lp:~niels-avonds/lingo-dictionary/suggestions
Reviewer Review Type Date Requested Status
elementary Apps team Pending
Review via email: mp+87882@code.launchpad.net

Description of the change

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/lingo-window.vala'
2--- src/lingo-window.vala 2011-12-20 16:51:49 +0000
3+++ src/lingo-window.vala 2012-01-08 23:35:27 +0000
4@@ -135,6 +135,7 @@
5
6 tree_view.get_selection().changed.connect(on_row_activated);
7 search_bar.activate.connect(search_from_searchbar);
8+ search_bar.completion.match_selected.connect(completion_selected);
9 bookmark_button.clicked.connect(action_bookmark);
10 back_button.clicked.connect (action_back);
11 forward_button.clicked.connect (action_forward);
12@@ -450,6 +451,20 @@
13 search_base(query);
14 }
15
16+ /*
17+ * Function called whenever the user selects a search suggestion.
18+ */
19+ bool completion_selected(Gtk.TreeModel model, Gtk.TreeIter iter) {
20+ string suggestion = "";
21+
22+ model.get(iter, 0, &suggestion, -1);
23+
24+ search_bar.text = suggestion;
25+ search_from_searchbar();
26+
27+ return true;
28+ }
29+
30 void destroy_handler () {
31
32 save_state ();

Subscribers

People subscribed via source and target branches

to all changes: