[dconf-editor] Restrict access to scrolled.



commit 3790c09e9a7d67f0f257462f8d754a56174e9aa4
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Fri Dec 7 13:51:36 2018 +0100

    Restrict access to scrolled.

 editor/bookmarks-list.vala | 40 ++++++++++++++++++++--------------------
 editor/overlayed-list.vala |  4 ++--
 2 files changed, 22 insertions(+), 22 deletions(-)
---
diff --git a/editor/bookmarks-list.vala b/editor/bookmarks-list.vala
index 6ff2a2f..fae0831 100644
--- a/editor/bookmarks-list.vala
+++ b/editor/bookmarks-list.vala
@@ -287,16 +287,16 @@ private class BookmarksList : OverlayedList
         if (index == 0)
             return; // TODO assert_not_reached?
 
-        ListBoxRow? prev_row = main_list_box.get_row_at_index (index - 1);
-        if (prev_row == null)
-            assert_not_reached ();
-
-        Allocation list_allocation, row_allocation;
-        scrolled.get_allocation (out list_allocation);
-        Widget? row_child = ((!) prev_row).get_child ();    // using prev_row as the allocation is not 
updated anyway
-        if (row_child == null)
-            assert_not_reached ();
-        ((!) row_child).get_allocation (out row_allocation);
+//        ListBoxRow? prev_row = main_list_box.get_row_at_index (index - 1);
+//        if (prev_row == null)
+//            assert_not_reached ();
+//
+//        Allocation list_allocation, row_allocation;
+//        scrolled.get_allocation (out list_allocation);
+//        Widget? row_child = ((!) prev_row).get_child ();    // using prev_row as the allocation is not 
updated anyway
+//        if (row_child == null)
+//            assert_not_reached ();
+//        ((!) row_child).get_allocation (out row_allocation);
 //        Adjustment adjustment = main_list_box.get_adjustment ();
 //        int proposed_adjustment_value = row_allocation.y + (int) ((row_allocation.height - 
list_allocation.height) / 3.0);
 //        bool should_adjust = adjustment.get_value () > proposed_adjustment_value;
@@ -340,16 +340,16 @@ private class BookmarksList : OverlayedList
             return; // TODO assert_not_reached?
         int index = indices [0];
 
-        ListBoxRow? next_row = main_list_box.get_row_at_index (index + 1);
-        if (next_row == null)
-            return; // TODO assert_not_reached?
-
-        Allocation list_allocation, row_allocation;
-        scrolled.get_allocation (out list_allocation);
-        Widget? row_child = ((!) next_row).get_child ();    // using next_row as the allocation is not 
updated
-        if (row_child == null)
-            assert_not_reached ();
-        ((!) row_child).get_allocation (out row_allocation);
+//        ListBoxRow? next_row = main_list_box.get_row_at_index (index + 1);
+//        if (next_row == null)
+//            return; // TODO assert_not_reached?
+//
+//        Allocation list_allocation, row_allocation;
+//        scrolled.get_allocation (out list_allocation);
+//        Widget? row_child = ((!) next_row).get_child ();    // using next_row as the allocation is not 
updated
+//        if (row_child == null)
+//            assert_not_reached ();
+//        ((!) row_child).get_allocation (out row_allocation);
 //        Adjustment adjustment = main_list_box.get_adjustment ();
 //        int proposed_adjustment_value = row_allocation.y + (int) (2 * (row_allocation.height - 
list_allocation.height) / 3.0);
 //        bool should_adjust = adjustment.get_value () < proposed_adjustment_value;
diff --git a/editor/overlayed-list.vala b/editor/overlayed-list.vala
index 8e877f3..7492f42 100644
--- a/editor/overlayed-list.vala
+++ b/editor/overlayed-list.vala
@@ -21,10 +21,10 @@ using Gtk;
 private abstract class OverlayedList : Overlay, AdaptativeWidget
 {
     [GtkChild] protected ListBox        main_list_box;
-               private StyleContext     main_list_box_context;
+               private   StyleContext   main_list_box_context;
                protected GLib.ListStore main_list_store = new GLib.ListStore (typeof (Widget));
 
-    [GtkChild] protected ScrolledWindow scrolled;
+    [GtkChild] private   ScrolledWindow scrolled;
     [GtkChild] private   Box            edit_mode_box;
 
     /*\


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