summaryrefslogtreecommitdiff
path: root/gtk/gtkbuilderparser.c
Commit message (Collapse)AuthorAgeFilesLines
* gtk: Make functions static that don't need to be non-staticBenjamin Otte2012-10-021-5/+5
| | | | | | | | Also remove the starting underscore from function names where appropriate, as those functions are static now and not exported anymore. This is part of a bunch of fixes for gcc complaining about -Wmissing-declarations.
* Fix a cornercase of menu parsingMatthias Clasen2012-04-201-4/+4
| | | | | | | When a uimanager in a gtkbuilder file contains a menu, the builder parser was getting confused. https://bugzilla.gnome.org/show_bug.cgi?id=672789
* Change FSF AddressJavier Jardón2012-02-271-3/+1
|
* GtkBuilder: change format of menusRyan Lortie2012-01-251-46/+2
| | | | | | | | | | | | | | Change the format of GtkBuilder <menu> to be more in-line with the style of the rest of GtkBuilder so that we can do translation in a consistent way. The format is now substantially more difficult to hand-write, but tools should be along soon. There is an xslt program attached to the bug to help you convert your existing .ui files from the old format to the new one. https://bugzilla.gnome.org/show_bug.cgi?id=668696
* GtkBuilder: pick up named submenusMatthias Clasen2011-12-191-12/+28
| | | | | | When parsing GMenu xml, use the facility for pick up named submenus. Note that <section id='foo'>...</section> is _not_ a named submenu. It is a named item with an unnamed submenu :-(
* Pass domain to the menu parserMatthias Clasen2011-12-191-8/+9
| | | | This is necessary to make translations in markup work.
* Quick-and-dirty GtkBuilder integrationMatthias Clasen2011-12-191-0/+43
| | | | | | 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").
* Reduce includes of gtktypeutils.h to a minimumMatthias Clasen2011-01-041-2/+1
|
* Replace gtk_debug_flags with getter and setter functionsTor Lillqvist2010-09-081-1/+1
| | | | | | Preferrably should be made just into a local variable for libgtk like _gdk_debug_flags for libgdk. But for now used by gtk/tests/textbuffer.c and modules/printbackends/cups/gtkprintbackendcups.c.
* Miscellaneous string fixesPhilip Withnall2010-08-221-1/+1
| | | | Mostly capitalisation fixes. Closes: bgo#528257
* gtk/: fully remove gtkalias hacksJavier Jardón2010-07-101-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=623845
* Fix memory leaks when using add_objectsPaolo Borelli2009-08-141-1/+6
|
* Fix duplicated id detection in gtkbuilderPaolo Borelli2009-08-141-2/+4
| | | | Fix memory handling of duplicated id hashtable and add unit test
* Cleanup some translation handlingMatthias Clasen2009-06-151-35/+1
| | | | | | | Use g_*gettext functions in gdk-pixbuf instead direct gettext calls to benefit from the maybe-dont-translate functionality in GLib. Also, replace a hand-rolled version by g_dpgettext2 in gtkbuilderparser.c. Fixes bug 585791.
* Don't leak RequiresInfo when parsing GtkBuilder filesMatthias Clasen2009-05-031-1/+2
| | | | This fixes bug 579366.
* Trivial formatting fixMatthias Clasen2009-04-061-2/+2
|
* Improve GtkBuilder error reportingMatthias Clasen2009-04-061-9/+27
| | | | | Make GtkBuilder report an error when it encounters a duplicate id, instead of segfaulting later on
* 2.15.0GTK_2_15_0Matthias Clasen2009-01-011-1/+0
| | | | svn path=/trunk/; revision=22037
* Make gtk_builder_get_translation_domain() useful for subparsers.Matthias Clasen2008-12-081-4/+30
| | | | | | | | | | | * gtk/gtkbuilderparser.c: Make gtk_builder_get_translation_domain() useful for subparsers. * gtk/gtkcontainer.c: Make the child property parser support translatable child properties. svn path=/trunk/; revision=21855
* Bug 447998 - GtkBuilder does not support building parts of the xml treePaolo Borelli2008-07-161-4/+82
| | | | | | | | | | | | | | | | | | | 2008-07-15 Paolo Borelli <pborelli@katamail.com> Bug 447998 - GtkBuilder does not support building parts of the xml tree * gtk/gtkbuilder.c: * gtk/gtkbuilder.h: * gtk/gtkbuilderprivate.h: * gtk/gtkbuilderparser.c: * gtk/gtk.symbols: Add two new functions that allow cherry picking and construct objects from a ui description file or string. * gtk/tests/builder.c: tests for the above. svn path=/trunk/; revision=20845
* Set properties in the order in which they are specified in the xml file.Matthias Clasen2008-07-031-0/+1
| | | | | | | | * gtk/gtkbuilderparser.c (parse_custom): Set properties in the order in which they are specified in the xml file. svn path=/trunk/; revision=20749
* Include "config.h" instead of <config.h> Command used: find -nameJohan Dahlin2008-06-221-1/+1
| | | | | | | | | | | | 2008-06-21 Johan Dahlin <jdahlin@async.com.br> * *.[ch]: Include "config.h" instead of <config.h> Command used: find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g' Rubberstamped by Mitch and Tim svn path=/trunk/; revision=20669
* Bug 503071 – Application direction changes to right to left even ifBehdad Esfahbod2008-06-111-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | 2008-06-11 Behdad Esfahbod <behdad@gnome.org> Bug 503071 – Application direction changes to right to left even if theres no translation * configure.in: Bump glib requirement. * gtk/gtkaccellabel.c (_gtk_accel_label_class_get_accelerator_label): * gtk/gtkactiongroup.c (dgettext_swapped): * gtk/gtkbuilder.c (gtk_builder_class_init): * gtk/gtkbuilderparser.c (_dpgettext), (_gtk_builder_parser_translate): * gtk/gtkfilechooserdefault.c (list_size_data_func): * gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems): * gtk/gtkintl.h: * gtk/gtkmain.c (setlocale_initialization), (do_pre_parse_initialization), (gettext_initialization): * gtk/gtkstock.c (gtk_stock_lookup), (sgettext_swapped): Use g_dgettext() and g_dngettext(). svn path=/trunk/; revision=20358
* Added support for parsing required toolkit versions (so that uiTristan Van Berkom2008-05-251-3/+93
| | | | | | | | | | | | * gtk/gtkbuilderprivate.h, gtk/gtkbuilder.h, gtk/gtkbuilderparser.c: Added support for parsing required toolkit versions (so that ui descriptions can target specific versions of the backend widget libraries) bug 527612. * gtk/docs/reference/gtk/tmpl/gtkbuilder.sgml: Added documentation for the added xml tags to the ui description. svn path=/trunk/; revision=20152
* Bug 503071 - Application direction changes to right to left even if theres14:27:34 Tim Janik2008-05-201-7/+22
| | | | | | | | | | | 2008-05-20 14:27:34 Tim Janik <timj@imendio.com> * reverted recent unapproved changes by Yair Hershkovitz, regarding: Bug 503071 - Application direction changes to right to left even if theres no translation. svn path=/trunk/; revision=20116
* call g_i18n_init() in gettext_initialization(). do gettext_initializationYair Hershkovitz2008-05-111-22/+7
| | | | | | | | | | | | | | | | | | | | 2008-05-11 Yair Hershkovitz <yairhr@gmail.com> * gtk/gtkmain.c: call g_i18n_init() in gettext_initialization(). do gettext_initialization only once. * gtk/gtkbuilderparser.c: use glib i18n api. removed dpgettext() as it duplicates g_dpgettext() and added _g_dpgettext() to wrap g_dpgettext with the extended functionality that was in the removed dpgettext(). * gtk/gtkaccellabelc: * gtk/gtkstock.c: * gtk/gtkimmulticontext.c: * gtk/gtkactiongroup.c: * gtk/gtkintl.h: use glib i18n api. svn path=/trunk/; revision=20091
* gtk/gtkicontheme.h include <gdk/gdk.h> instead of <gdk/gdkscreen.h>.Michael Natterer2008-04-181-2/+0
| | | | | | | | | | | | | | | | | | | 2008-04-18 Michael Natterer <mitch@imendio.com> * gtk/gtkicontheme.h * gtk/gtkrecentmanager.h: include <gdk/gdk.h> instead of <gdk/gdkscreen.h>. * gtk/gtkbuilderparser.c * gtk/gtklinkbutton.c * gtk/gtkpreview.c * gtk/gtkrecentchooserdefault.c * gtk/gtkrecentchoosermenu.c * modules/input/gtkimcontextthai.c: remove inclusion of single files from gdk, none of the includes was actually needed. svn path=/trunk/; revision=20023
* - Treat enums like enums and not values - Avoid invalid free, in case ofJohan Dahlin2008-03-071-1/+5
| | | | | | | | | | | | | | | | | | 2008-03-07 Johan Dahlin <johan@gnome.org> * gtk/gtkbuilder.c: * gtk/gtkbuilderparser.c: * gtk/gtkbuilderprivate.h: * gtk/gtkiconfactory.c: * tests/buildertest.c: - Treat enums like enums and not values - Avoid invalid free, in case of more than two sources - Add better error messages - Add much improved tests (#520979, Christian Persch) svn path=/trunk/; revision=19732
* Add translatable/context and comment attributes on <col> tags under aJohan Dahlin2008-03-021-12/+20
| | | | | | | | | | | | | | | | | | 2008-02-29 Johan Dahlin <johan@gnome.org> * demos/gtk-demo/demo.ui: * gtk/gtkbuilderparser.c: * gtk/gtkbuilderprivate.h: * gtk/gtkliststore.c: * tests/buildertest.c: Add translatable/context and comment attributes on <col> tags under a GtkListStore. Refactor parts of the translation api and make it available inside gtk+ itself. Update tests and example. Fixes a part of #518642 svn path=/trunk/; revision=19685
* Do not use g_error for a few more errors, instead set the GError sent inJohan Dahlin2008-03-011-8/+21
| | | | | | | | | | | | | | | | 2008-02-29 Johan Dahlin <johan@gnome.org> * gtk/gtkbuilder.c: * gtk/gtkbuilderparser.c: * gtk/gtkbuilderprivate.h: Do not use g_error for a few more errors, instead set the GError sent in through add_from_file/add_from_string. * tests/buildertest.c: Add a couple of new parsing tests. (#519199, Pavel Syomin) svn path=/trunk/; revision=19681
* Fix some i18n errors. Pointed out by Behdad Esfahbod.Matthias Clasen2008-02-121-8/+4
| | | | | | | | | | | | | | 2008-02-12 Matthias Clasen <mclasne@redhat.com> * gtk/gtkpapersize.c: * gtk/gtkprintoperation.c: * gtk/gtkvolumebutton.c: * gtk/gtkbulderparser.c: Fix some i18n errors. Pointed out by Behdad Esfahbod. svn path=/trunk/; revision=19547
* use the right type for "subparser_data" and remove the (gpointer*) cast.Michael Natterer2008-01-301-2/+2
| | | | | | | | | | | | | | | | | | | 2008-01-30 Michael Natterer <mitch@imendio.com> * gtk/gtkbuilderparser.c (parse_custom): use the right type for "subparser_data" and remove the (gpointer*) cast. Fixes bogus aliasing warning. * gtk/updateiconcache.c (add_string): cast const gchar* to gpointer when inserting in a GHashTable. * tests/testcalendar.c (calendar_detail_cb): remove const from return value since it's a newly allocated string. (calendar_update_details): free the detail. svn path=/trunk/; revision=19431
* Allow domains to be overridden in <interface>'s if a translation-domain isJohan Dahlin2008-01-061-2/+2
| | | | | | | | | | | | | | | 2008-01-06 Johan Dahlin <johan@gnome.org> * gtk/gtkbuilderparser.c (parse_interface): Allow domains to be overridden in <interface>'s if a translation-domain is set in the builder. (_gtk_builder_parser_parse_buffer): Do not modify the translation-domain of the builder, make the domain set in the <interface> apply only to strings in that interface. (#496831, Ryan Lortie) svn path=/trunk/; revision=19316
* Leak less in error pathsMatthias Clasen2007-11-101-4/+21
| | | | svn path=/trunk/; revision=18980
* More robustness improvements of the parserMatthias Clasen2007-11-101-9/+9
| | | | svn path=/trunk/; revision=18978
* Don't assert on misplaced signal elementsMatthias Clasen2007-11-101-3/+5
| | | | svn path=/trunk/; revision=18977
* Handle misplaced property elements without asserting.Matthias Clasen2007-11-101-1/+5
| | | | | | | | | | 2007-11-09 Matthias Clasen <mclasen@redhat.com> * gtk/gtkbuilderparser.c (parse_property): Handle misplaced property elements without asserting. svn path=/trunk/; revision=18976
* Add GString 'text' to the property info structure. Used to accumulateRyan Lortie2007-11-081-49/+57
| | | | | | | | | | | | | | | | 2007-11-07 Ryan Lortie <desrt@desrt.ca> * gtk/gtkbuilderprivate.h: Add GString 'text' to the property info structure. Used to accumulate property text across multiple 'text' calls. * gtk/gtkbuilderparser.c: Instead of translating/copying text on each 'text' call while in <property> accumulate the text until the end and do it all in one go. This fixes handling of <!-- --> inside properties as well as <property/> cases. svn path=/trunk/; revision=18970
* Parse signals after <child> tags and add tests. (#468793, Benjamin Otte)Johan Dahlin2007-10-241-0/+2
| | | | | | | | | | | | | | | | 2007-10-24 Johan Dahlin <jdahlin@async.com.br> * gtk/gtkbuilder.c: (_gtk_builder_construct), (_gtk_builder_add_signals): * gtk/gtkbuilderparser.c: (end_element): * gtk/gtkbuilderprivate.h: * tests/buildertest.c: (test_connect_signals): Parse signals after <child> tags and add tests. (#468793, Benjamin Otte) svn path=/trunk/; revision=18944
* Allow empty property nodes so we can set empty strings. (#486420, XavierJohan Dahlin2007-10-241-27/+0
| | | | | | | | | | 2007-10-24 Johan Dahlin <jdahlin@async.com.br> * gtk/gtkbuilderparser.c (end_element): Allow empty property nodes so we can set empty strings. (#486420, Xavier Claessens) svn path=/trunk/; revision=18943
* svn path=/trunk/; revision=18842Hans Breuer2007-09-171-1/+3
| | | | svn path=/trunk/; revision=18842
* Duplicate the string returned by d[n]gettext before it is potentiallyJan Arne Petersen2007-08-231-2/+3
| | | | | | | | | | 2007-08-23 Jan Arne Petersen <jpetersen@jpetersen.org> * gtk/gtkbuilderparser.c: (text): Duplicate the string returned by d[n]gettext before it is potentially freed. (#461945) svn path=/trunk/; revision=18678
* Do not assume that text is null-terminated as pointed out by ChristopherJohan Dahlin2007-08-071-4/+10
| | | | | | | | | | | | | 2007-08-07 Johan Dahlin <jdahlin@async.com.br> * gtk/gtkbuilderparser.c (text): * gtk/gtkcelllayout.c (attributes_text_element): * gtk/gtkliststore.c (list_store_text): Do not assume that text is null-terminated as pointed out by Christopher Fergeau svn path=/trunk/; revision=18592
* Use g_strdup on the translated string instead of g_strndup() + the lengthJohan Dahlin2007-08-071-1/+1
| | | | | | | | | | | 2007-08-07 Johan Dahlin <jdahlin@async.com.br> * gtk/gtkbuilderparser.c (text): Use g_strdup on the translated string instead of g_strndup() + the length of the untranslated string. (#461945, Claude Paroz) svn path=/trunk/; revision=18588
* Support old-style message contexts, too.Matthias Clasen2007-07-081-3/+10
| | | | | | | | | | | 2007-07-08 Matthias Clasen <mclasen@redhat.com> * gtk/gtkbuilderparser.c (pgettext): Support old-style message contexts, too. svn path=/trunk/; revision=18405
* Parse last_modification_time attribute in <signal> tagJohan Dahlin2007-07-081-0/+3
| | | | | | | | | | 2007-07-08 Johan Dahlin <jdahlin@async.com.br> * gtk/gtkbuilderparser.c (parse_signal): Parse last_modification_time attribute in <signal> tag svn path=/trunk/; revision=18402
* Add support for context and comments on propertiesMatthias Clasen2007-07-081-3/+38
| | | | svn path=/trunk/; revision=18401
* Improve error handling for enum/flags, rename the converter functions toJohan Dahlin2007-06-301-7/+7
| | | | | | | | | | | | | | | | | 2007-06-30 Johan Dahlin <jdahlin@async.com.br> * gtk/gtkbuilder.c: * gtk/gtkbuilder.h: * gtk/gtkbuilderparser.c: * gtk/gtkbuilderprivate.h: * gtk/gtkwidget.c: * tests/buildertest.c: Improve error handling for enum/flags, rename the converter functions to be consistent. Add tests. Fixes #452465 svn path=/trunk/; revision=18312
* Be pickyMatthias Clasen2007-06-301-3/+1
| | | | svn path=/trunk/; revision=18307
* Move type-func to <object> instead of <child>, add a test to make sureJohan Dahlin2007-06-301-32/+36
| | | | | | | | | | | | | 2007-06-30 Johan Dahlin <jdahlin@async.com.br> * gtk/gtkbuilderparser.c: (_get_type_by_symbol), (parse_object), (parse_child): * tests/buildertest.c: (test_types): Move type-func to <object> instead of <child>, add a test to make sure that it works as desired, #452463 svn path=/trunk/; revision=18306