summaryrefslogtreecommitdiff
path: root/gtk/gtkbuilder.c
Commit message (Collapse)AuthorAgeFilesLines
* Trivial documentation tweaksMatthias Clasen2014-10-041-22/+20
|
* GtkBuilder: Don't use deprecated types in examplesMatthias Clasen2014-10-031-2/+2
|
* GtkBuilder: Undo the type name heuristic changesMatthias Clasen2014-10-031-8/+9
| | | | | | | | These turned out to break existing ui files, concretely GWeatherLocationEntry was no longer guessed correctly. Update the testcases to reflect this, and add a testcase for GWeather.
* Trivial typography improvementMatthias Clasen2014-10-021-1/+1
| | | | Use an em dash instead of -- in documentation.
* Factor out a functionMatthias Clasen2014-09-261-17/+24
| | | | | | | | | Factor out the typename-to-get-type mangling as a separate function, for easier testing. Also fix some cases where it doesn't, currently, like GString -> g_string_get_type and GdkRGB -> gdk_rgb_get_type
* GtkBuilder: Mention more error domainsMatthias Clasen2014-09-261-1/+2
| | | | | This has been requested in https://bugzilla.gnome.org/show_bug.cgi?id=708206
* GtkBuilder: Support parsing int64/uin64 valuesMatthias Clasen2014-08-211-4/+11
| | | | | | | This was missing; the code to parse these numbers was there, but the switch didn't have cases for these types. https://bugzilla.gnome.org/show_bug.cgi?id=602443
* builder: CleanupBenjamin Otte2014-05-311-11/+8
| | | | | | Use the usual way of providing user data to vfuncs: - Don't allocate it, use the stack - Use CamelCase for naming the struct
* gtk: port many nullability annotation fixes from Vala bindingsEvan Nemerson2014-05-301-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=730745
* GtkBuilder: Ensure types are fully initializedMatthias Clasen2014-05-301-1/+8
| | | | | | | Just calling get_type() does not ensure that the signals, properties and everything else gets set up properly. Ensure it is, by calling g_type_class_ref() before using the type. This fixes the testcase added in the previous commit.
* Deprecate GdkColorMatthias Clasen2014-05-221-2/+4
| | | | | It has been replaced by GdkRGBA. Time to make it official. http://bugzilla.gnome.org/show_bug.cgi?id=636695
* 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