| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Use g_slist_free_full more consistently. This commit just converts
the obvious cases where g_slist_forall is directly followed by
g_slist_free.
|
|
|
|
|
| |
Add some assertions that things are non-NULL when we know they
are, so that coverity gets it.
|
|
|
|
|
|
| |
Add the class and parent class name to the error message.
gtk-builder-tool will parse the error message and use the
class names for trying again to parse the file as a template.
|
|
|
|
| |
The core parser itself was left, so handle it as well.
|
| |
|
|
|
|
|
|
|
|
| |
Report failures to lookup objects for property values
and bindings via GError too, and provide location information
while doing so.
https://bugzilla.gnome.org/show_bug.cgi?id=748234
|
|
|
|
|
|
| |
Look for a stashed GError after calling custom_tag_end,
custom_finished or parser_finished vfuncs, and report
them up.
|
|
|
|
| |
Don't use <%s> for an attribute.
|
|
|
|
| |
gcc5 rightfully complains about this condition being unclear.
|
|
|
|
|
|
|
| |
No `' looks just terrible. For quoting in non-UI contexts, we
prefer either '' or "".
https://bugzilla.gnome.org/show_bug.cgi?id=735192
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Fixed memory leaks in parse_object(), parse_template() and parse_signal() functions.
Parameters value where strduped before the last posible return and not freed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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"
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=726858
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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_string_assign to avoid issues with assigning GString's internal
buffer back to the same string. This can happen when no translations are
available and _gtk_builder_parser_translate returns back the same
pointer that was passed in.
This fixes a regression from commit e9f182e37a7f6e2dc339054841a3c9f930f
that caused GtkComboBoxText <items> from GtkBuilder to show up empty if
no translations are available.
https://bugzilla.gnome.org/show_bug.cgi?id=700629
|
|
|
|
|
|
|
| |
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=699016
The fix here is slightly different. We make
_gtk_builder_parser_translate return a const char * instead of
a dup'ed string, and fix up the callers.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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 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
|
|
|
|
|
|
| |
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 :-(
|
|
|
|
| |
This is necessary to make translations in markup work.
|
|
|
|
|
|
| |
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").
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Mostly capitalisation fixes. Closes: bgo#528257
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=623845
|
| |
|
|
|
|
| |
Fix memory handling of duplicated id hashtable and add unit test
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This fixes bug 579366.
|
| |
|
|
|
|
|
| |
Make GtkBuilder report an error when it encounters a duplicate id,
instead of segfaulting later on
|
|
|
|
| |
svn path=/trunk/; revision=22037
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
* gtk/gtkbuilderparser.c (parse_custom): Set properties in the order
in which they are specified in the xml file.
svn path=/trunk/; revision=20749
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|