summaryrefslogtreecommitdiffstats
path: root/source/l/dconf-editor/fdc90849223649509424bbefe14990de71db2b2b.patch
blob: a75bd30c715d7b029a487dca3f6573fa503a5345 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
From fdc90849223649509424bbefe14990de71db2b2b Mon Sep 17 00:00:00 2001
From: Rico Tzschichholz <ricotz@ubuntu.com>
Date: Sat, 16 Jan 2021 13:26:32 +0100
Subject: [PATCH] Don't alter or try to write GtkChild fields

See https://gitlab.gnome.org/GNOME/vala/issues/1121
---
 editor/bookmarks-headerbar.vala  |  4 +--
 editor/bookmarks-list.vala       |  4 +--
 editor/bookmarks.vala            | 12 +++----
 editor/delayed-setting-view.vala | 54 ++++++++++++++++----------------
 editor/overlayed-list.vala       | 38 +++++++++++-----------
 editor/pathentry.vala            | 24 +++++++-------
 editor/registry-list.vala        |  6 ++--
 editor/registry-search.vala      |  6 ++--
 editor/registry-view.vala        |  2 +-
 9 files changed, 75 insertions(+), 75 deletions(-)

diff --git a/editor/bookmarks-headerbar.vala b/editor/bookmarks-headerbar.vala
index 54848a5d..0522c37e 100644
--- a/editor/bookmarks-headerbar.vala
+++ b/editor/bookmarks-headerbar.vala
@@ -24,7 +24,7 @@ private abstract class BookmarksHeaderBar : BrowserHeaderBar, AdaptativeWidget
         install_action_entries ();
 
         add_bookmarks_revealer              (out bookmarks_revealer,
-                                             out bookmarks_button,              ref center_box);
+                                             out bookmarks_button,              center_box);
         connect_bookmarks_signals ();
         add_bookmarks_controller            (out bookmarks_controller,          ref this);
 
@@ -58,7 +58,7 @@ private abstract class BookmarksHeaderBar : BrowserHeaderBar, AdaptativeWidget
     private Bookmarks           bookmarks_button;
     private BookmarksController bookmarks_controller;
 
-    private static void add_bookmarks_revealer (out Revealer bookmarks_revealer, out Bookmarks bookmarks_button, ref Box center_box)
+    private static void add_bookmarks_revealer (out Revealer bookmarks_revealer, out Bookmarks bookmarks_button, Box center_box)
     {
         bookmarks_revealer = new Revealer ();
         bookmarks_revealer.transition_type = RevealerTransitionType.SLIDE_LEFT;
diff --git a/editor/bookmarks-list.vala b/editor/bookmarks-list.vala
index 393973b8..c9280d59 100644
--- a/editor/bookmarks-list.vala
+++ b/editor/bookmarks-list.vala
@@ -146,10 +146,10 @@ private class BookmarksList : OverlayedList
 
     internal bool create_bookmark_rows (Variant bookmarks_variant)
     {
-        _create_bookmark_rows (bookmarks_variant, view_mode, ref main_list_store, ref main_list_box, ref bookmarks_hashtable);
+        _create_bookmark_rows (bookmarks_variant, view_mode, ref main_list_store, main_list_box, ref bookmarks_hashtable);
         return n_items == 0;
     }
-    private static void _create_bookmark_rows (Variant bookmarks_variant, bool view_mode, ref GLib.ListStore main_list_store, ref ListBox main_list_box, ref HashTable<string, Bookmark> bookmarks_hashtable)
+    private static void _create_bookmark_rows (Variant bookmarks_variant, bool view_mode, ref GLib.ListStore main_list_store, ListBox main_list_box, ref HashTable<string, Bookmark> bookmarks_hashtable)
     {
         string saved_bookmark_name = "";
         ListBoxRow? selected_row = main_list_box.get_selected_row ();
diff --git a/editor/bookmarks.vala b/editor/bookmarks.vala
index 153af104..d8cea7cc 100644
--- a/editor/bookmarks.vala
+++ b/editor/bookmarks.vala
@@ -84,7 +84,7 @@ private class Bookmarks : MenuButton
 
     construct
     {
-        update_switch_label (ViewType.SEARCH, ViewType.FOLDER, ref switch_label); // init text with "Bookmark this Location"
+        update_switch_label (ViewType.SEARCH, ViewType.FOLDER, switch_label); // init text with "Bookmark this Location"
 
         install_action_entries ();
 
@@ -184,7 +184,7 @@ private class Bookmarks : MenuButton
 
     internal void set_path (ViewType type, string path)
     {
-        update_switch_label (current_type, type, ref switch_label);
+        update_switch_label (current_type, type, switch_label);
 
         current_path = path;
         current_type = type;
@@ -392,7 +392,7 @@ private class Bookmarks : MenuButton
     * * Bookmarks management
     \*/
 
-    private static void update_switch_label (ViewType old_type, ViewType new_type, ref Label switch_label)
+    private static void update_switch_label (ViewType old_type, ViewType new_type, Label switch_label)
     {
         if (new_type == ViewType.SEARCH && old_type != ViewType.SEARCH)
             switch_label.label = bookmark_this_search_text;
@@ -414,18 +414,18 @@ private class Bookmarks : MenuButton
         {
             if (bookmarks_icon.icon_name != "starred-symbolic")
                 bookmarks_icon.icon_name = "starred-symbolic";
-            update_switch_state (true, ref bookmarked_switch);
+            update_switch_state (true, bookmarked_switch);
             bookmarked_switch.set_detailed_action_name ("bookmarks.unbookmark(" + variant.print (true) + ")");
         }
         else
         {
             if (bookmarks_icon.icon_name != "non-starred-symbolic")
                 bookmarks_icon.icon_name = "non-starred-symbolic";
-            update_switch_state (false, ref bookmarked_switch);
+            update_switch_state (false, bookmarked_switch);
             bookmarked_switch.set_detailed_action_name ("bookmarks.bookmark(" + variant.print (true) + ")");
         }
     }
-    private static void update_switch_state (bool bookmarked, ref Switch bookmarked_switch)
+    private static void update_switch_state (bool bookmarked, Switch bookmarked_switch)
     {
         if (bookmarked == bookmarked_switch.active)
             return;
diff --git a/editor/delayed-setting-view.vala b/editor/delayed-setting-view.vala
index add68525..b1f774ca 100644
--- a/editor/delayed-setting-view.vala
+++ b/editor/delayed-setting-view.vala
@@ -41,24 +41,24 @@ private class DelayedSettingView : OverlayedListRow
         {
             // at row creation, key is never ghost
             _update_dconf_key_current_value (key_value,
-                                         ref key_value_label,
-                                         ref key_value_default);
+                                             key_value_label,
+                                             key_value_default);
 
             _update_dconf_key_planned_value (cool_planned_value,
-                                         ref planned_value_label,
-                                         ref planned_value_default);
+                                             planned_value_label,
+                                             planned_value_default);
         }
         else
         {
             _update_gsettings_key_current_value (key_value,
                                                  has_schema_and_is_default,
-                                             ref key_value_label,
-                                             ref key_value_default);
+                                                 key_value_label,
+                                                 key_value_default);
 
             _update_gsettings_key_planned_value (cool_planned_value,
                                                  (!) cool_default_value,
-                                             ref planned_value_label,
-                                             ref planned_value_default);
+                                                 planned_value_label,
+                                                 planned_value_default);
         }
     }
 
@@ -74,23 +74,23 @@ private class DelayedSettingView : OverlayedListRow
 
     private static inline void _update_gsettings_key_planned_value (string? cool_planned_value,
                                                                     string  cool_default_value,
-                                                                ref Label   planned_value_label,
-                                                                ref Label   planned_value_default)
+                                                                    Label   planned_value_label,
+                                                                    Label   planned_value_default)
     {
         bool is_default = cool_planned_value == null;
         planned_value_label.label = is_default ? cool_default_value : (!) cool_planned_value;
-        update_value_default_label (is_default, ref planned_value_default);
+        update_value_default_label (is_default, planned_value_default);
     }
 
     private static inline void _update_dconf_key_planned_value (string? cool_planned_value,
-                                                            ref Label   planned_value_label,
-                                                            ref Label   planned_value_default)
+                                                                Label   planned_value_label,
+                                                                Label   planned_value_default)
     {
         if (cool_planned_value == null)
-            update_labels_dconf_key_erased (ref planned_value_label, ref planned_value_default);
+            update_labels_dconf_key_erased (planned_value_label, planned_value_default);
         else
             update_labels_dconf_key_values ((!) cool_planned_value,
-                                            ref planned_value_label, ref planned_value_default);
+                                            planned_value_label, planned_value_default);
     }
 
     /*\
@@ -99,37 +99,37 @@ private class DelayedSettingView : OverlayedListRow
 
     internal void update_gsettings_key_current_value (Variant key_value, bool is_default)
     {
-        _update_gsettings_key_current_value (key_value, is_default, ref key_value_label, ref key_value_default);
+        _update_gsettings_key_current_value (key_value, is_default, key_value_label, key_value_default);
     }
     private static void _update_gsettings_key_current_value (Variant key_value,
                                                              bool    is_default,
-                                                         ref Label   key_value_label,
-                                                         ref Label   key_value_default)
+                                                             Label   key_value_label,
+                                                             Label   key_value_default)
     {
         key_value_label.label = Key.cool_text_value_from_variant (key_value);
-        update_value_default_label (is_default, ref key_value_default);
+        update_value_default_label (is_default, key_value_default);
     }
 
     internal void update_dconf_key_current_value (Variant? key_value_or_null)
     {
-        _update_dconf_key_current_value (key_value_or_null, ref key_value_label, ref key_value_default);
+        _update_dconf_key_current_value (key_value_or_null, key_value_label, key_value_default);
     }
     private static void _update_dconf_key_current_value (Variant? key_value_or_null,
-                                                     ref Label    key_value_label,
-                                                     ref Label    key_value_default)
+                                                         Label    key_value_label,
+                                                         Label    key_value_default)
     {
         if (key_value_or_null == null)
-            update_labels_dconf_key_erased (ref key_value_label, ref key_value_default);
+            update_labels_dconf_key_erased (key_value_label, key_value_default);
         else
             update_labels_dconf_key_values (Key.cool_text_value_from_variant ((!) key_value_or_null),
-                                            ref key_value_label, ref key_value_default);
+                                            key_value_label, key_value_default);
     }
 
     /*\
     * * common utilities
     \*/
 
-    private static void update_labels_dconf_key_erased (ref Label value_label, ref Label value_default)
+    private static void update_labels_dconf_key_erased (Label value_label, Label value_default)
     {
         value_label.visible = false;
         /* Translators: displayed in the list of pending changes (could be an in-window panel, or in the popover of the bottom bar); for dconf keys */
@@ -137,14 +137,14 @@ private class DelayedSettingView : OverlayedListRow
         value_default.visible = true;
     }
 
-    private static void update_labels_dconf_key_values (string key_value, ref Label value_label, ref Label value_default)
+    private static void update_labels_dconf_key_values (string key_value, Label value_label, Label value_default)
     {
         value_default.visible = false;
         value_label.label = key_value;  // TODO move Key.cool_text_value_from_variant here?
         value_label.visible = true;
     }
 
-    private static void update_value_default_label (bool is_default, ref Label value_default)
+    private static void update_value_default_label (bool is_default, Label value_default)
     {
         if (is_default)
             /* Translators: displayed in the list of pending changes (could be an in-window panel, or in the popover of the bottom bar); for gsettings keys */
diff --git a/editor/overlayed-list.vala b/editor/overlayed-list.vala
index 8b0ec51e..bcdfc3a0 100644
--- a/editor/overlayed-list.vala
+++ b/editor/overlayed-list.vala
@@ -89,11 +89,11 @@ private abstract class OverlayedList : Overlay, AdaptativeWidget
     internal void set_window_size (AdaptativeWidget.WindowSize new_size)
     {
         if (!AdaptativeWidget.WindowSize.is_extra_thin (new_size) && AdaptativeWidget.WindowSize.is_extra_flat (new_size))
-            set_horizontal (ref main_context, ref edit_mode_box);
+            set_horizontal (ref main_context, edit_mode_box);
         else
-            set_vertical (ref main_context, ref edit_mode_box);
+            set_vertical (ref main_context, edit_mode_box);
     }
-    private static inline void set_horizontal (ref StyleContext main_context, ref Box edit_mode_box)
+    private static inline void set_horizontal (ref StyleContext main_context, Box edit_mode_box)
     {
         main_context.remove_class ("vertical");
         edit_mode_box.halign = Align.END;
@@ -102,7 +102,7 @@ private abstract class OverlayedList : Overlay, AdaptativeWidget
         edit_mode_box.width_request = 160;
         main_context.add_class ("horizontal");
     }
-    private static inline void set_vertical (ref StyleContext main_context, ref Box edit_mode_box)
+    private static inline void set_vertical (ref StyleContext main_context, Box edit_mode_box)
     {
         main_context.remove_class ("horizontal");
         edit_mode_box.halign = Align.CENTER;
@@ -118,9 +118,9 @@ private abstract class OverlayedList : Overlay, AdaptativeWidget
 
     internal bool next_match ()
     {
-        return _next_match (ref main_list_box);
+        return _next_match (main_list_box);
     }
-    private static inline bool _next_match (ref ListBox main_list_box)
+    private static inline bool _next_match (ListBox main_list_box)
     {
         ListBoxRow? row = main_list_box.get_selected_row ();    // TODO multiple rows and focus-only lists
         if (row == null)
@@ -130,7 +130,7 @@ private abstract class OverlayedList : Overlay, AdaptativeWidget
 
         if (row == null)
         {
-            _scroll_bottom (ref main_list_box);
+            _scroll_bottom (main_list_box);
             return false;
         }
         main_list_box.select_row ((!) row);
@@ -140,9 +140,9 @@ private abstract class OverlayedList : Overlay, AdaptativeWidget
 
     internal bool previous_match ()
     {
-        return _previous_match (ref main_list_box);
+        return _previous_match (main_list_box);
     }
-    private static inline bool _previous_match (ref ListBox main_list_box)
+    private static inline bool _previous_match (ListBox main_list_box)
     {
         uint n_items = main_list_box.get_children ().length ();  // FIXME OverlayedList.n_items is unreliable
         if (n_items == 0)
@@ -189,9 +189,9 @@ private abstract class OverlayedList : Overlay, AdaptativeWidget
 
     protected int [] get_selected_rows_indices ()
     {
-        return _get_selected_rows_indices (ref main_list_box);
+        return _get_selected_rows_indices (main_list_box);
     }
-    private static inline int [] _get_selected_rows_indices (ref ListBox main_list_box)
+    private static inline int [] _get_selected_rows_indices (ListBox main_list_box)
     {
         int [] indices = new int [0];
         main_list_box.selected_foreach ((_list_box, selected_row) => {
@@ -205,9 +205,9 @@ private abstract class OverlayedList : Overlay, AdaptativeWidget
 
     protected void scroll_top ()
     {
-        _scroll_top (ref main_list_box);
+        _scroll_top (main_list_box);
     }
-    private static inline void _scroll_top (ref ListBox main_list_box)
+    private static inline void _scroll_top (ListBox main_list_box)
     {
         Adjustment adjustment = main_list_box.get_adjustment ();
         adjustment.set_value (adjustment.get_lower ());
@@ -215,9 +215,9 @@ private abstract class OverlayedList : Overlay, AdaptativeWidget
 
     protected void scroll_bottom ()
     {
-        _scroll_bottom (ref main_list_box);
+        _scroll_bottom (main_list_box);
     }
-    private static inline void _scroll_bottom (ref ListBox main_list_box)
+    private static inline void _scroll_bottom (ListBox main_list_box)
     {
         Adjustment adjustment = main_list_box.get_adjustment ();
         adjustment.set_value (adjustment.get_upper ());
@@ -225,9 +225,9 @@ private abstract class OverlayedList : Overlay, AdaptativeWidget
 
     internal bool handle_copy_text (out string copy_text)
     {
-        return _handle_copy_text (out copy_text, ref main_list_box);
+        return _handle_copy_text (out copy_text, main_list_box);
     }
-    private static inline bool _handle_copy_text (out string copy_text, ref ListBox main_list_box)
+    private static inline bool _handle_copy_text (out string copy_text, ListBox main_list_box)
     {
         List<weak ListBoxRow> selected_rows = main_list_box.get_selected_rows ();
         OverlayedListRow row;
@@ -283,9 +283,9 @@ private abstract class OverlayedList : Overlay, AdaptativeWidget
 
     internal SelectionState get_selection_state ()
     {
-        return _get_selection_state (ref main_list_box, ref main_list_store);
+        return _get_selection_state (main_list_box, ref main_list_store);
     }
-    private static inline SelectionState _get_selection_state (ref ListBox main_list_box, ref GLib.ListStore main_list_store)
+    private static inline SelectionState _get_selection_state (ListBox main_list_box, ref GLib.ListStore main_list_store)
     {
         List<weak ListBoxRow> selected_rows = main_list_box.get_selected_rows ();
         uint n_selected_rows = selected_rows.length ();
diff --git a/editor/pathentry.vala b/editor/pathentry.vala
index 5000b21d..5c7efc56 100644
--- a/editor/pathentry.vala
+++ b/editor/pathentry.vala
@@ -133,9 +133,9 @@ private class PathEntry : Box, AdaptativeWidget
 
     internal void entry_grab_focus_without_selecting ()
     {
-        _entry_grab_focus_without_selecting (ref search_entry);
+        _entry_grab_focus_without_selecting (search_entry);
     }
-    private static void _entry_grab_focus_without_selecting (ref BrowserEntry search_entry)
+    private static void _entry_grab_focus_without_selecting (BrowserEntry search_entry)
     {
         if (search_entry.text_length != 0)
         {
@@ -172,36 +172,36 @@ private class PathEntry : Box, AdaptativeWidget
         requires (search_changed_handler != 0)
     {
         SignalHandler.block (search_entry, search_changed_handler);
-        _prepare (mode, nullable_search, ref current_path, ref search_entry);
+        _prepare (mode, nullable_search, ref current_path, search_entry);
         SignalHandler.unblock (search_entry, search_changed_handler);
     }
 
     private static inline void _prepare (SearchMode   mode,
                                          string?      nullable_search,
                                      ref string       current_path,
-                                     ref BrowserEntry search_entry)
+                                         BrowserEntry search_entry)
     {
         string search;
         switch (mode)
         {
             case SearchMode.EDIT_PATH_MOVE_END:
                 search = nullable_search == null ? current_path : (!) nullable_search;
-                _prepare_move_end (ref search, ref search_entry);
+                _prepare_move_end (ref search, search_entry);
                 return;
 
             case SearchMode.EDIT_PATH_SELECT_ALL:
                 search = nullable_search == null ? current_path : (!) nullable_search;
-                _prepare_search (ref search, ref search_entry);
+                _prepare_search (ref search, search_entry);
                 return;
 
             case SearchMode.EDIT_PATH_SELECT_LAST_WORD:
                 search = current_path;
-                _prepare_select_last_word (ref search, ref search_entry);
+                _prepare_select_last_word (ref search, search_entry);
                 return;
 
             case SearchMode.SEARCH:
                 search = "";
-                _prepare_search (ref search, ref search_entry);
+                _prepare_search (ref search, search_entry);
                 return;
 
             case SearchMode.UNCLEAR:
@@ -210,19 +210,19 @@ private class PathEntry : Box, AdaptativeWidget
         }
     }
 
-    private static inline void _prepare_move_end (ref string text, ref BrowserEntry search_entry)
+    private static inline void _prepare_move_end (ref string text, BrowserEntry search_entry)
     {
         search_entry.text = text;
-        _entry_grab_focus_without_selecting (ref search_entry);
+        _entry_grab_focus_without_selecting (search_entry);
     }
 
-    private static inline void _prepare_search (ref string text, ref BrowserEntry search_entry)
+    private static inline void _prepare_search (ref string text, BrowserEntry search_entry)
     {
         search_entry.text = text;
         search_entry.grab_focus ();
     }
 
-    private static inline void _prepare_select_last_word (ref string current_path, ref BrowserEntry search_entry)
+    private static inline void _prepare_select_last_word (ref string current_path, BrowserEntry search_entry)
     {
         search_entry.move_cursor (MovementStep.DISPLAY_LINE_ENDS, -1, false);
         search_entry.text = current_path;
diff --git a/editor/registry-list.vala b/editor/registry-list.vala
index 74b7f992..54aa6fa6 100644
--- a/editor/registry-list.vala
+++ b/editor/registry-list.vala
@@ -291,9 +291,9 @@ private abstract class RegistryList : Grid, BrowsableView, AdaptativeWidget
 
     internal bool handle_copy_text (out string copy_text) // can compile with "private", but is public 1/2
     {
-        return _handle_copy_text (out copy_text, ref key_list_box);
+        return _handle_copy_text (out copy_text, key_list_box);
     }
-    private bool _handle_copy_text (out string copy_text, ref ListBox key_list_box)
+    private bool _handle_copy_text (out string copy_text, ListBox key_list_box)
     {
         ListBoxRow? selected_row = (ListBoxRow?) key_list_box.get_selected_row ();
         if (selected_row == null)
@@ -1138,7 +1138,7 @@ private abstract class RegistryList : Grid, BrowsableView, AdaptativeWidget
     * * headers
     \*/
 
-    protected static bool is_first_row (int row_index, ref unowned ListBoxRow? before)
+    protected static bool is_first_row (int row_index, ListBoxRow? before)
     {
         bool is_first_row = row_index == 0;
         if (is_first_row != (before == null))
diff --git a/editor/registry-search.vala b/editor/registry-search.vala
index 220583fd..eb8e6f2a 100644
--- a/editor/registry-search.vala
+++ b/editor/registry-search.vala
@@ -48,7 +48,7 @@ private class RegistrySearch : RegistryList
 
     internal bool handle_alt_copy_text (out string copy_text)
     {
-        return _handle_alt_copy_text (out copy_text, ref key_list_box);
+        return _handle_alt_copy_text (out copy_text, key_list_box);
     }
 
     internal void clean ()
@@ -145,7 +145,7 @@ private class RegistrySearch : RegistryList
     * * Keyboard calls
     \*/
 
-    private static bool _handle_alt_copy_text (out string copy_text, ref ListBox key_list_box)
+    private static bool _handle_alt_copy_text (out string copy_text, ListBox key_list_box)
     {
         ListBoxRow? selected_row = key_list_box.get_selected_row ();
         if (selected_row == null)
@@ -521,7 +521,7 @@ private class RegistrySearch : RegistryList
     private void update_row_header (ListBoxRow row, ListBoxRow? before)
     {
         int row_index = row.get_index ();
-        if (is_first_row (row_index, ref before))
+        if (is_first_row (row_index, before))
             return;
 
         if (search_is_path_search)
diff --git a/editor/registry-view.vala b/editor/registry-view.vala
index e0ff379e..7d9eb1f0 100644
--- a/editor/registry-view.vala
+++ b/editor/registry-view.vala
@@ -114,7 +114,7 @@ private class RegistryView : RegistryList
 
     private void update_row_header (ListBoxRow row, ListBoxRow? before)
     {
-        if (is_first_row (row.get_index (), ref before))
+        if (is_first_row (row.get_index (), before))
             return;
         update_row_header_with_context (row, (!) before, modifications_handler.model, /* local search header */ false);
     }