[glade] Docs: add doc about registering custom types at runtime.



commit 7ecce9ea239f98cf95990144435238d8541b28f2
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date:   Mon Oct 5 21:10:22 2020 -0300

    Docs: add doc about registering custom types at runtime.
    
    Closes issue #360 "No examples in documentation on using custom catalogues with gtkBuilder"

 doc/catalogintro.sgml | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
---
diff --git a/doc/catalogintro.sgml b/doc/catalogintro.sgml
index 8abfce2c..13367ee7 100644
--- a/doc/catalogintro.sgml
+++ b/doc/catalogintro.sgml
@@ -35,6 +35,20 @@ some basic examples and describe a wealth of options that can be used to
 enhance UI editing and workaround exceptions.
     </para>
 
+    <para>
+Keep in mind you need to take extra steps to ensure GtkBuilder can pick up your
+new object types at runtime. Ussualy all you need is to link your executable
+with your widget library assuming it has properly named get_type() functions.
+
+<![CDATA[GtkWindow -> gtk_window_get_type
+GtkHBox -> gtk_hbox_get_type
+GtkUIManager -> gtk_ui_manager_get_type
+GWeatherLocation -> gweather_location_get_type]]>
+
+If not you can always register your widgets with the type system with g_type_ensure ()
+
+    </para>
+
     <para>
 The catalog file starts by specifying the name of the catalog and the plugin
 library to use, the following examples assume you have a namespace "Foo" and


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]