File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,9 +105,9 @@ public class Maya.View.Widgets.CalendarChooser : Gtk.Box {
105105 current_source = ((CalendarRow ) (row. get_child ())). source;
106106
107107 // Clear selected property
108- foreach ( unowned Gtk . Widget deselect_row in list_box. get_children () ) {
109- var calrow = (( Gtk . ListBoxRow ) deselect_row ). get_child ();
110- (( CalendarRow ) calrow) . selected = false ;
108+ for ( int i = 0 ; list_box. get_row_at_index (i) != null ; i ++ ) {
109+ var calrow = (CalendarRow ) list_box . get_row_at_index (i ). get_child ();
110+ calrow. selected = false ;
111111 }
112112
113113 // Select new row
@@ -116,9 +116,11 @@ public class Maya.View.Widgets.CalendarChooser : Gtk.Box {
116116 });
117117
118118 search_entry.activate.connect (() => {
119- foreach (unowned Gtk . Widget child in list_box. get_children ()) {
120- if (child. get_child_visible ()) {
121- ((Gtk . ListBoxRow ) child). activate ();
119+ for (int i = 0 ; list_box. get_row_at_index (i) != null ; i++ ) {
120+ var row = list_box. get_row_at_index (i);
121+ if (row. get_child_visible ()) {
122+ row. activate ();
123+ return ;
122124 }
123125 }
124126 });
You can’t perform that action at this time.
0 commit comments