summaryrefslogtreecommitdiff
path: root/gtk/gtkbuilder.c
Commit message (Collapse)AuthorAgeFilesLines
* GtkBuilder: improved parsing error report for invalid properties and signals.Juan Pablo Ugarte2014-05-011-83/+53
| | | | | | | | | | | | | Added GTK_BUILDER_ERROR_INVALID_PROPERTY and GTK_BUILDER_ERROR_INVALID_SIGNAL error codes ObjectInfo: Use a GType instead of a char * for the class name. PropertyInfo: Use a GParamSpec instead of a char * for the property name. SignalInfo: Use signal id and detail quark instead of a detailed signal name string. This not only save us a few malloc in each case but lets us simplify the code and report unknown properties and signals as a parsing error instead of just printing a warning.
* Added bindings support to GtkBuilder by introducing 3 new <property> ↵Juan Pablo Ugarte2014-04-181-0/+80
| | | | | | | | | | | | | | attributes "bind-source" to specify the source object of the binding "bind-property" to specify the source property and "bind-flags" to specify the binding flags (optional) Binding an object sensitive property with a check button active property will look like this: <object class="GtkButton" id="button"> <property name="sensitive" bind-source="checkbutton" bind-property="active"/> </object> This is based on the original work done by Denis Washington for his GSoC project This closes Bug 654417 "[GSoC] Add <binding> element to GtkBuilder syntax"
* docs: use Returns: consistentlyWilliam Jon McCann2014-02-191-4/+4
| | | | Instead of Return value:
* Docs: Remove all entities and turn off sgml modeMatthias Clasen2014-02-091-42/+40
| | | | | With all element markup gone, it is time to turn off sgml mode, and get rid of entities as well.
* docs: use apostrophes in *n'tWilliam Jon McCann2014-02-071-1/+1
|
* docs: use proper apostropheWilliam Jon McCann2014-02-071-7/+7
| | | | https://wiki.gnome.org/Design/OS/Typography
* docs: Use markup for linksWilliam Jon McCann2014-02-071-19/+19
|
* docs: use proper quotesWilliam Jon McCann2014-02-051-20/+20
|
* docs: fix missing quotation markWilliam Jon McCann2014-02-051-1/+1
|
* docs: add back id for section headingWilliam Jon McCann2014-02-051-1/+1
| | | | It was lost during the markdown conversion.
* docs: Don't use <xi:include>William Jon McCann2014-02-051-5/+1
|
* docs: Use "#" for refsect2 instead of ##William Jon McCann2014-02-041-2/+4
|
* docs: use quotes instead of <firstterm>William Jon McCann2014-02-041-2/+2
|
* docs: use markdown instead of <filename> tagsWilliam Jon McCann2014-02-041-1/+1
|
* Docs: Don't use note elementsMatthias Clasen2014-02-021-6/+0
| | | | In most cases, the text itself makes the message clear enough.
* docs: Convert to markdownMatthias Clasen2014-02-021-129/+108
| | | | Specifically, switch to using markdown syntax for sections.
* docs: use |[ ]| instead of <programlisting></programlisting>William Jon McCann2014-01-291-4/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=723119
* docs: use () instead of <function> tagsWilliam Jon McCann2014-01-271-2/+2
|
* docs: use #*-struct instead of <structname>William Jon McCann2014-01-271-1/+1
|
* docs: fix links in builder docsWilliam Jon McCann2014-01-211-12/+2
|
* docs: fix GtkBuilder typenameWilliam Jon McCann2014-01-211-3/+3
|
* docs/comments: Fix spelling of 'explicitly'Volker Sobek2014-01-181-3/+3
| | | | | | | This replaces all occurrences of 'explicitely' with 'explicitly'. Only code comments and gtk-doc statements are affected. https://bugzilla.gnome.org/show_bug.cgi?id=722429
* GtkBuilder: Make IDs optionalMatthias Clasen2013-11-181-8/+3
| | | | | | | | | | | | | | | | One requirement of .ui files is that each object must have an ID, even if it is never referred to or directly loaded from the code. This makes editing .ui files much more onerous than it has to be, due to the frequent need to invent new IDs, while avoiding clashes. This commit makes IDs optional in the XML. They only need to be provided for objects which are referred to or explictly loaded from the code. Since GtkBuilder needs IDs for its own internal accounting, we create IDs of the form ___object_N___ if not specified in the XML. https://bugzilla.gnome.org/show_bug.cgi?id=712553
* Use g_return_val_if_fail where return value needed.Daniel Svensson2013-10-291-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=710987
* GtkBuilder: Fall back to gtk_test_register_all_types if type lookup failsAlexander Larsson2013-10-151-1/+7
| | | | | | | This is important because the dlsym() approach can fail if gtk was loaded with RTLD_LOCAL. https://bugzilla.gnome.org/show_bug.cgi?id=710096
* GtkBuilder: add GtkApplicationRyan Lortie2013-10-151-0/+61
| | | | Add a GtkApplication (private) field to GtkBuilder
* Mention of -rdynamic in GtkBuilder lookup errorRyan Lortie2013-07-271-1/+1
| | | | | | We toss a g_warning() if we can't find the user's signal handler. A good chunk of the time this will be because they didn't use -rdynamic. Add a note about that.
* Trivial typo fixMatthias Clasen2013-07-261-1/+1
|
* Move wholly deprecated classes to gtk/deprecated/Matthias Clasen2013-07-191-1/+1
| | | | | | | | | | | | | | | | | | We've recently a number of classes wholly. For these cases, move the headers and sources to gtk/deprecated/ and adjust Makefiles and includes accordingly. Affected classes: GtkAction GtkActionGroup GtkActivatable GtkIconFactory GtkImageMenuItem GtkRadioAction GtkRecentAction GtkStock GtkToggleAction GtkUIManager
* gtk: Use new macros for defining private dataEmmanuele Bassi2013-07-091-5/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=702996
* Start migrating internals away from GtkStockWilliam Jon McCann2013-06-241-1/+1
|
* GtkBuilder: add new constructor APIsRyan Lortie2013-06-181-7/+115
| | | | | | | Add new APIs gtk_builder_new_from_{file,resource,string}() and encourage their use over the older _add_from_...() APIs. https://bugzilla.gnome.org/show_bug.cgi?id=679930
* docs: GtkBuilder: warn about unusual GError useRyan Lortie2013-06-181-0/+15
| | | | | | | | GtkBuilder returns GError for _add_from_{file,resource,string}(), implying that the user should be able to recover from these errors. Mention in the docs that it's unreasonable to try to do this. https://bugzilla.gnome.org/show_bug.cgi?id=679930
* GtkBuilder: don't leak callbacksMatthias Clasen2013-06-151-0/+2
| | | | This was noticed while running the testsuite under valgrind.
* Add Composite Child machinery and APIs to GtkWidgetTristan Van Berkom2013-04-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit implements the needed machinery for GtkWidget to build it's composite content from GtkBuilder XML and adds the following API: o gtk_widget_init_template() An api to be called in instance initializers of any GtkWidget subclass that uses template XML to build it's components. o gtk_widget_class_set_template() API to associate GtkBuilder XML to a given GtkWidget subclass o gtk_widget_class_automate_child() API to declare an object built by GtkBuilder to be associated with an instance structure offset and automatically set. o gtk_widget_get_automated_child() API for bindings to fetch a child declared to be automated by gtk_widget_class_automate_child(), for the case where bindings do not generate GObjects under the hood and cannot use structure offsets to resolve composite object pointers. o gtk_widget_class_declare_callback[s]() Declare static functions to be used in signal callbacks from a given class's template XML o gtk_widget_class_set_connect_func() API for bindings to override the signal connection machinery for a given GtkWidget derived class.
* GtkBuilder: Allow G_PARAM_CONSTRUCT properties to be set on internal children.Tristan Van Berkom2013-04-081-1/+19
| | | | | | | | | | | This patch allows properties of type G_PARAM_CONSTRUCT to be set on internal children or explicitly constructed objects (built with <constructor>) while previously, G_PARAM_CONSTRUCT properties being set on already constructed objects would result in an misinformed warning that "construct-only properties cannot be set". G_PARAM_CONSTRUCT_ONLY properties are still refused as parameters to already constructed children.
* GtkBuilder: Add private _gtk_builder_extend_with_template()Tristan Van Berkom2013-04-081-6/+131
| | | | | | | | | | | | This adds the definition of the <template> tag with some documentation on the variant of the format. _gtk_builder_extend_with_template() is to be used while GtkContainer builds from composite templates. A couple of error codes are also added to handle a few new possible failure cases. DTD Files gtkbuilder.rnc and gtkbuilder.rng have been updated to include the new <template> tag and it's attributes.
* GtkBuilder: Added api to allow private signal callbacksTristan Van Berkom2013-04-081-12/+135
| | | | | | | | | | | | | | | | | | | | | In preperation for composite objects, for better encapsulation the following APIs are added to allow handling of signals declared in the XML with callbacks declared statically. o gtk_builder_add_callback_symbol[s]() Adds a symbol to the internal symbol hash o gtk_builder_lookup_symbol() Looks up a symbol, exposed in case added symbols are used in conjunction with gtk_builder_connect_signals_full() The default implementation of gtk_builder_connect_signals() now does not have a strong requirement on GModule (or a strong requirement on symbols being declared in the global namespace). Instead GModule is used as a fallback in the case that symbols are not declared explicitly.
* GtkBuilder: Fixed documentationTristan Van Berkom2013-03-231-6/+0
| | | | | The documentation was referring to an <external-object> tag which we never implemented
* Mention the de-facto standard filename extensionMatthias Clasen2013-02-111-1/+1
| | | | | | GtkBuilder files are commonly named .ui - mention that in the docs. https://bugzilla.gnome.org/show_bug.cgi?id=590325
* Added new function gtk_builder_expose_object() based on the original work byJuan Pablo Ugarte2012-12-101-24/+64
| | | | Marco Diego Aurélio Mesquita on bug #447972
* Change FSF AddressJavier Jardón2012-02-271-3/+1
|
* Document the gtkbuilder xml file betterMatthias Clasen2012-01-301-31/+8
| | | | | | Replace the (invalid) DTD in the GtkBuilder docs by a RELAX NG schema. Also install the schema in /usr/share/gtk-3.0, so it can be used to validate GtkBuilder ui files.
* Add resource support for GtkBuilderAlexander Larsson2012-01-161-3/+190
| | | | | | There are new calls to load ui files from resources, and you can now read pixbufs by using relative paths in a ui file read from a resource, or by using absolute resource:/// uris.
* Fix doc buildMatthias Clasen2012-01-071-1/+3
|
* GtkBuilder: support parsing GVariant propertiesRyan Lortie2012-01-061-0/+36
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=667394
* Some more menu-related docsMatthias Clasen2011-12-191-0/+8
|
* Quick-and-dirty GtkBuilder integrationMatthias Clasen2011-12-191-0/+7
| | | | | | This makes GtkBuilder accept a GMenuMarkup tree at the toplevel (ie with <menu id='foo'> being a child of <interface>) and the resulting GMenu object can be obtained via gtk_builder_get_object (builder, "foo").
* Don't use g_value_set_charMatthias Clasen2011-11-011-1/+1
|
* Clarify that gtk_builder_connect_signals can only be connected onceJohan Dahlin2011-07-071-2/+4
|