[gnome-contacts/wip/sorted] Support focus_child
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts/wip/sorted] Support focus_child
- Date: Fri, 11 May 2012 14:51:25 +0000 (UTC)
commit 7600e8f1d2ef9177ed905d30d5d04edd95bddcad
Author: Alexander Larsson <alexl redhat com>
Date: Fri May 11 15:52:02 2012 +0200
Support focus_child
src/contacts-sorted.vala | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/contacts-sorted.vala b/src/contacts-sorted.vala
index 7a48118..c97ddf0 100644
--- a/src/contacts-sorted.vala
+++ b/src/contacts-sorted.vala
@@ -192,6 +192,10 @@ public class Contacts.Sorted : Container {
cursor_child = child;
this.grab_focus ();
this.queue_draw ();
+ var vadj = get_focus_vadjustment ();
+ if (child != null && vadj != null)
+ vadj.clamp_page (cursor_child.y,
+ cursor_child.y + cursor_child.height);
}
private void update_selected (ChildInfo? child) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]