[gnome-contacts: 9/9] Use new ListBox.add_to_scrolled helper



commit c312b809d4345ff6f5d6084409136fe78e94a0a1
Author: Alexander Larsson <alexl redhat com>
Date:   Wed May 16 14:53:49 2012 +0200

    Use new ListBox.add_to_scrolled helper

 src/contacts-link-dialog.vala |    3 +--
 src/contacts-list-pane.vala   |    4 +---
 2 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/src/contacts-link-dialog.vala b/src/contacts-link-dialog.vala
index cefec4e..6f749e5 100644
--- a/src/contacts-link-dialog.vala
+++ b/src/contacts-link-dialog.vala
@@ -220,9 +220,8 @@ public class Contacts.LinkDialog : Dialog {
     scrolled.set_vexpand (true);
     scrolled.set_hexpand (true);
     scrolled.set_shadow_type (ShadowType.NONE);
-    scrolled.add_with_viewport (view);
+    view.add_to_scrolled (scrolled);
     list_grid.add (scrolled);
-    view.set_focus_vadjustment (scrolled.get_vadjustment ());
 
     view.selection_changed.connect ( (c) => {
 	selected_contact = c;
diff --git a/src/contacts-list-pane.vala b/src/contacts-list-pane.vala
index a0fdcd1..eec5b04 100644
--- a/src/contacts-list-pane.vala
+++ b/src/contacts-list-pane.vala
@@ -138,14 +138,12 @@ public class Contacts.ListPane : Frame {
     grid.set_orientation (Orientation.VERTICAL);
     this.add (grid);
 
-    contacts_view.set_focus_vadjustment (scrolled.get_vadjustment ());
-
     contacts_view.selection_changed.connect( (l, contact) => {
 	if (!ignore_selection_change)
 	  selection_changed (contact);
       });
 
-    scrolled.add_with_viewport (contacts_view);
+    contacts_view.add_to_scrolled (scrolled);
     contacts_view.show_all ();
     scrolled.set_no_show_all (true);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]