[dconf-editor] Always select a row.



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]