Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Making custom widgets work in Gtk.Builder #134

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

martinKupec
Copy link

This series of commits is supposed to fix and enchant the use of Gtk.Builder with custom widgets.

It enables to pick GLib type name of custom class.
It also fixes old problem with pairing native and managed objects during class creation.

There is problem with Gtk.Builder with gtk+ > 3.12 as it newly check for existence of signals during parsing phase. This is fixed by properly creating native signals for custom widgets.

This is a proper fix of old FIXME.
It defers setting of managed properties during GLib.Object construction
until we have paired Managed and Unmanaged objects.
This patch adds TypeName attribute which can be used on custom class
derived from GLib.Object in order to set GLib type name of the class.
This is needed for Gtk.Builder to properly parse signal registration.
The registred signals are not actually used but Gtk.Builder check for
their presence and fails if not present.
@monojenkins
Copy link
Collaborator

Hello! I'm the build bot for the Mono project. I need approval from a Mono team member to build this pull request. A team member should reply with "approve" to approve a build of this pull request, "whitelist" to whitelist this and all future pull requests from this contributor, or "build" to explicitly request a build, even if one has already been done. Contributors can ignore this message.

@wolfgangmauer
Copy link

may this help, without patch
glade_gtk-sharp_custom_widgets

Base automatically changed from master to main March 9, 2021 14:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants