Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • pygobject pygobject
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 198
    • Issues 198
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 26
    • Merge requests 26
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • pygobjectpygobject
  • Issues
  • #341

Templated widget signals sometimes connected to wrong widgets

First up, I suspect that this is a GTK+ issue, but I thought it was sensible to file here in case it was related to e.g., Python object lifecycles/ref counting.

In some situations, child widgets instantiated by a template are not the widgets that get connected to the signals specified in that template. This affects Meld (see meld#343 (closed)) in current master, which is where I narrowed down the test case from... but I'm far from confident about what the conditions are.

In order to reproduce this, I had to have:

  • a widget child in a templated widget
  • have that templated widget constructed by another template (specifically a GtkPopover; I didn't test other parents)

I've used a RecentChooserWidget in the test case, but a GtkButton works just as well (and in fact is even weirder to me; the child widget in the callback isn't even the same widget as during __init__).

The expected behaviour (to me) is that a child widget referenced by Template.Child() will remain the widget to which its signals are connected for the entire lifetime of the parent widget.

This is a breakage against GTK+ 3.22.30 + pygobject 3.28.3, which is the last release pair that I'm confident about.

Assignee
Assign to
Time tracking