Merge lp:~rodrigo-moya/ubuntuone-client/scroll-when-searching-contacts into lp:ubuntuone-client

Proposed by Rodrigo Moya
Status: Merged
Approved by: John Lenton
Approved revision: 577
Merged at revision: 581
Proposed branch: lp:~rodrigo-moya/ubuntuone-client/scroll-when-searching-contacts
Merge into: lp:ubuntuone-client
Diff against target: 30 lines (+8/-1)
1 file modified
nautilus/contacts-view.c (+8/-1)
To merge this branch: bzr merge lp:~rodrigo-moya/ubuntuone-client/scroll-when-searching-contacts
Reviewer Review Type Date Requested Status
John Lenton (community) Approve
Natalia Bidart (community) Approve
Review via email: mp+29971@code.launchpad.net

Commit message

Scroll contacts view when searching

Description of the change

Scroll contacts view when searching

To post a comment you must log in.
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

The code looks ok, though I can not test it locally.

review: Approve
Revision history for this message
John Lenton (chipaca) wrote :

It works for me :)
Naty, to test it manually, copy the .so's over the system ones. Yeah, yeah, not a brilliant solution.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nautilus/contacts-view.c'
2--- nautilus/contacts-view.c 2010-07-13 15:19:43 +0000
3+++ nautilus/contacts-view.c 2010-07-15 10:19:42 +0000
4@@ -252,6 +252,12 @@
5 gchar *current_name;
6 gboolean added = FALSE;
7
8+#ifdef BUILD_GRID_VIEW
9+ gtk_icon_view_scroll_to_path (GTK_ICON_VIEW (cv->contacts_list),
10+ gtk_tree_model_get_path (GTK_TREE_MODEL (model), &current_row),
11+ TRUE, 0.0, 0.0);
12+#endif
13+
14 do {
15 gboolean new_is_recent, current_is_recent, insert_before = FALSE;
16
17@@ -600,11 +606,12 @@
18 g_hash_table_insert (tmp_selection, g_strdup (old_sci->name), new_sci);
19 }
20
21- /* Reset the icon views */
22+ /* Reset the contact views */
23 #ifdef BUILD_GRID_VIEW
24 model = gtk_icon_view_get_model (GTK_ICON_VIEW (cv->contacts_list));
25 #else
26 model = gtk_tree_view_get_model (GTK_TREE_VIEW (cv->contacts_list));
27+ gtk_tree_view_scroll_to_point (GTK_TREE_VIEW (cv->contacts_list), 0, 0);
28 #endif
29 gtk_list_store_clear (GTK_LIST_STORE (model));
30 cv->matched_contacts = 0;

Subscribers

People subscribed via source and target branches