Skip to content

RepeatPanel: iterate without get_children#896

Merged
danirabbit merged 3 commits into
masterfrom
danirabbit/repeatpanel-nogetchildren
Jan 28, 2026
Merged

RepeatPanel: iterate without get_children#896
danirabbit merged 3 commits into
masterfrom
danirabbit/repeatpanel-nogetchildren

Conversation

@danirabbit

Copy link
Copy Markdown
Member

Can't use get_children in GTK4. get_row_at_index skips headers so we don't need to type check

@danirabbit
danirabbit requested a review from a team January 27, 2026 19:33
@danirabbit danirabbit moved this to Needs Review in GTK4 Porting Jan 27, 2026
}

foreach (var child in exceptions_list.get_children ()) {
if (child is ExceptionGrid == false)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it safe to remove the type checking? Could there be cases where the row is not an ExceptionGrid?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we had type checking before because get children includes headers. Row by index only returns rows, so they will always be the correct type

@danirabbit
danirabbit merged commit ce59e16 into master Jan 28, 2026
6 checks passed
@danirabbit
danirabbit deleted the danirabbit/repeatpanel-nogetchildren branch January 28, 2026 23:37
@github-project-automation github-project-automation Bot moved this from Needs Review to Done in GTK4 Porting Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants