[dconf-editor] Always select a row.
- From: Arnaud Bonatti <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf-editor] Always select a row.
- Date: Wed, 17 Aug 2016 21:38:47 +0000 (UTC)
commit 0a5272a860a14594cd45630e12efb5fac8e69a03
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Wed Aug 17 23:38:32 2016 +0200
Always select a row.
editor/registry-view.vala | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/editor/registry-view.vala b/editor/registry-view.vala
index 72cfd75..3268916 100644
--- a/editor/registry-view.vala
+++ b/editor/registry-view.vala
@@ -86,6 +86,15 @@ class RegistryView : Grid, PathElement
assert_not_reached ();
scroll_to_row ((!) row);
}
+ else
+ {
+ ListBoxRow? row = key_list_box.get_row_at_index (0);
+ if (row != null)
+ {
+ key_list_box.select_row (row);
+ row.grab_focus ();
+ }
+ }
properties_view.clean ();
}
private int get_row_position (string selected)
@@ -103,6 +112,7 @@ class RegistryView : Grid, PathElement
private void scroll_to_row (ListBoxRow row)
{
key_list_box.select_row (row);
+ row.grab_focus ();
Allocation list_allocation, row_allocation;
stack.get_allocation (out list_allocation);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]