Commit Graph

68 Commits

Author SHA1 Message Date
Matthias Clasen
4460cac3ed Don't use g_value_set_char 2011-11-01 21:18:27 -04:00
Johan Dahlin
a47528fd59 Clarify that gtk_builder_connect_signals can only be connected once 2011-07-07 15:41:29 -03:00
Juan Pablo Ugarte
ea81c710d0 Make GtkBuilder do not delay construct properties that can be resolved
(so construct is respected when possible) and skip construct only props that
can not.
2011-06-29 11:45:33 -03:00
Juan Pablo Ugarte
f430a76f10 Fixed bug #576492 "GtkBuilder does not respect G_PARAM_CONSTRUCT properties"
Added G_PARAM_CONSTRUCT flag in gtk_builder_get_parameters() checks as suggested by Johan Dahlin.
2011-06-03 14:38:59 -03:00
Javier Jardón
3b2e710aa4 gtkbuilder.c: gtk_builder_value_from_string() also support GdkRGBA values 2011-05-02 15:43:45 +01:00
Tristan Van Berkom
031a092254 Added <mime-types> and <patterns> parsing support to GtkFileFilter. 2011-01-27 22:53:24 +09:00
Tristan Van Berkom
35e7e65bcb Added links to the GtkTextTagTable and GtkMenuToolButton GtkBuildable documentation from GtkBuilder documentation. 2011-01-27 16:04:46 +09:00
Tristan Van Berkom
93f825592e Added links to the GtkComboBox/GtkRecentFilter GtkBuildable documentation from GtkBuilder documentation. 2011-01-26 23:58:47 +09:00
Pavel Holejsovsky
2fb1c06402 [GI] Add missing (out) and (array) annotations 2011-01-20 13:57:20 +01:00
Paolo Borelli
f5d7a63aff Fix gtk_builder_add_objects_from_file g-i annotation
Use the same annotation already used for add_objects_from_string
2010-12-08 15:15:50 +01:00
Emmanuele Bassi
1779ae79a1 rgba: Invert the arguments and improve bindability
Since parse() is a method of the Gdk.RGBA class, the GdkRGBA pointer
should be the first argument, and the string the second one, to allow a
more natural binding.

https://bugzilla.gnome.org/show_bug.cgi?id=635879
2010-11-28 19:01:51 +00:00
=Christian Persch
d3f1745493 Use g_ascii_strto[u]ll instead of strto[u]l
We don't want GtkBuilder input to be locale-dependent.

Bug #632503
2010-10-25 12:22:20 -04:00
Carlos Garnacho
d2781bc74b GtkBuilder: Prepare for parsing GdkRGBA types. 2010-10-22 20:14:57 +02:00
Matthias Clasen
0219eea4d7 Remove GtkComboBoxEntry and the combo box text api 2010-10-20 11:02:03 +02:00
Matthias Clasen
f53ad33994 Remove GtkObject completely 2010-09-26 22:18:19 -04:00
Florian Müllner
93fd2b44c3 introspection: Fix typo in annotation 2010-09-24 18:26:34 +02:00
Tor Lillqvist
801875b805 Replace gtk_debug_flags with getter and setter functions
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.
2010-09-08 21:31:34 +03:00
John (J5) Palmieri
c78a23bdca add annotations for tranfer and scope so that methods are exported by GI 2010-09-07 13:50:40 -04:00
John (J5) Palmieri
eeaf576316 add array annotation to gtk_builder_add_objects_from_string 2010-09-07 12:06:29 -04:00
Benjamin Otte
a50843e160 gtkbuilder: Do not allocate colors when parsing GtkBuilder files 2010-08-10 21:02:30 +02:00
Javier Jardón
0a07e9733b gtk/: fully remove gtkalias hacks
https://bugzilla.gnome.org/show_bug.cgi?id=623845
2010-07-10 02:51:26 +02:00
Tadej Borovšak
be3a1abc04 Move documentation to inline comments: GtkBuilder
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=611742

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-04-28 18:41:34 +02:00
Tristan Van Berkom
b9516e70f5 Add notes to GtkBuilder docs about the possible error domains, closed bgo #560147 2010-04-06 16:27:40 -04:00
Tristan Van Berkom
d92ee6dc68 Fixed gtk_builder_value_from_string_type() to always assign the GError
when returning FALSE, fixes bgo #615000.
2010-04-06 16:25:43 -04:00
Florian Müllner
c4a3a7bdfd Add introspection annotation for gtk_builder_get_object 2010-02-25 21:33:15 +01:00
Johan Dahlin
fe85272112 [annotations] Add allow-none
This commit was created using a script that searched for all docstrings
containing a parameter and the string 'or %NULL'.
Gdk backends and demos excluded as they are not part of a public API

https://bugzilla.gnome.org/show_bug.cgi?id=610474
2010-02-19 17:57:51 -02:00
Colin Walters
6529c07614 [introspection] Merge in Gtk-custom.c annotations
The Gtk-custom.c file in gir-repository contained a number of
introspection annotations.  Merge those into the GTK source files.

Some documentation was moved from the tmpl/ files to accomodate
the addition of annotations.
2009-12-16 17:22:01 -02:00
Matthias Clasen
45894c9fad Fix a GtkBuilder crash
Always set an error when returning FALSE from gtk_builder_value_from_string.
This fixes the crash reported in bug 532858.
2009-04-06 20:55:26 -04:00
Paolo Borelli
6ee8be8899 Bug 447998 - GtkBuilder does not support building parts of the xml tree
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
2008-07-16 15:36:53 +00:00
Cody Russell
57223c9a05 Revert name change
svn path=/trunk/; revision=20724
2008-07-01 22:57:50 +00:00
Cody Russell
fce9c8b7d4 Practically everything changed.
2008-06-30  Cody Russell  <bratsche@gnome.org>

        * Practically everything changed.

        Change	all references	of GIMP	Toolkit	(and variations	of it)
        to GTK+	Toolkit, showing no mercy at all to our	beloved
	ancestry. (#540529)


svn path=/trunk/; revision=20709
2008-06-30 23:01:56 +00:00
Johan Dahlin
d97cdbdf53 Include "config.h" instead of <config.h> Command used: find -name
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-22 14:28:52 +00:00
Behdad Esfahbod
d76e3d552e Bug 503071 – Application direction changes to right to left even if
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
2008-06-11 23:40:35 +00:00
Tristan Van Berkom
b1542fe913 Chain up in buildable_finish()
* gtk/gtkwindow.c: Chain up in buildable_finish()

	* gtk/gtkbuilder.c: _gtk_builder_get_absolute_filename() handle
	cases where g_path_get_dirname() returns "."

	* docs/reference/gtk/tmpl/gtklabel.sgml, 
	docs/reference/gtk/tmpl/gtkbuilder.sgml: Added documentation
	for the <attributes> tags on GtkLabel


svn path=/trunk/; revision=20008
2008-04-16 16:35:17 +00:00
Johan Dahlin
424cc287f1 - Treat enums like enums and not values - Avoid invalid free, in case of
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-03-07 20:03:35 +00:00
Johan Dahlin
61be2a7127 Implement GtkBuildable on GtkIconFactory, to make it possible to register
2008-03-06  Johan Dahlin  <jdahlin@async.com.br>

    * docs/reference/gtk/tmpl/gtkiconfactory.sgml:
    * gtk/gtkbuilder.c:
    * gtk/gtkbuilderprivate.h:
    * gtk/gtkiconfactory.c:
    * tests/buildertest.c:
    Implement GtkBuildable on GtkIconFactory, to make
    it possible to register custom stock icons.
    Fixes #517066


svn path=/trunk/; revision=19726
2008-03-07 00:08:16 +00:00
Johan Dahlin
bee4a9fcc3 Add missing g_return_val_if_fail checks for public API.
2008-02-29  Johan Dahlin  <johan@gnome.org>

	* gtk/gtkbuilder.c:
	Add missing g_return_val_if_fail checks for public API.


svn path=/trunk/; revision=19684
2008-03-01 16:47:34 +00:00
Johan Dahlin
a57b66aac2 Do not use g_error for a few more errors, instead set the GError sent in
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-03-01 13:49:06 +00:00
Marc-Andre Lureau
e4fe214f39 fix missing call to g_type_class_unref in case of error. (#517563)
2008-02-20  Marc-Andre Lureau  <marcandre.lureau@gmail.com>

        * gtk/gtkbuilder.c (_gtk_builder_enum_from_string): fix missing
        call to g_type_class_unref in case of error. (#517563)

svn path=/trunk/; revision=19619
2008-02-20 18:32:43 +00:00
Philip Withnall
5f12954d92 Improve the documentation for gtk_builder_connect_signals. (#514471)
2008-02-10  Philip Withnall  <pwithnall@svn.gnome.org>

	* gtk/gtkbuilder.c: Improve the documentation for
	gtk_builder_connect_signals. (#514471)


svn path=/trunk/; revision=19507
2008-02-10 06:59:52 +00:00
Johan Dahlin
bf4f21118a Avoid adding unnecessary trailing newlines to g_warning calls.
2008-01-06  Johan Dahlin  <johan@gnome.org>

	* gtk/gtkbuilder.c: Avoid adding unnecessary trailing newlines 
	to g_warning calls.


svn path=/trunk/; revision=19315
2008-01-06 15:06:55 +00:00
Mathias Hasselmann
26124bb10b Avoid some compiler warnings (#507000).
* gtk/gtkbuilder.c, gtk/gtkbuilderprivate.h: Use proper sign
for value argument of _gtk_builder_flags_from_string.
* gtk/gtkwidget.c: Don't alias the child pointer passed
to gdk_window_get_user_data.

svn path=/trunk/; revision=19306
2008-01-05 08:33:53 +00:00
Ryan Lortie
08e15bbbae add clarification stating that the construct_child function is responsible
2006-11-26  Ryan Lortie  <desrt@desrt.ca>

        * docs/reference/gtk/tmpl/gtkbuildable.sgml: add clarification stating
        that the construct_child function is responsible for returning a
        reference.
        * gtkbuilder.c (_gtk_builder_construct): remove g_object_ref() for
        objects from constructors
        * gtkuimanager.c (gtk_ui_manager_buildable_construct_child): add
        g_object_ref() to this construction function (it's the only
        implementer in GTK)

        Fixes #496645.


svn path=/trunk/; revision=19075
2007-11-27 03:25:09 +00:00
Ryan Lortie
490af125c2 remove concept of root objects and just refcount all objects in the
2006-11-26  Ryan Lortie  <desrt@desrt.ca>

        * gtkbuilder.c: remove concept of root objects and just refcount
        all objects in the builder.  Fixes #496651.


svn path=/trunk/; revision=19074
2007-11-27 03:07:23 +00:00
Ryan Lortie
d65049378b Convert delayed_properties hashtable to linked list. Fixes #495769.
2007-11-10  Ryan Lortie  <desrt@desrt.ca>

        * gtk/gtkbuilder.c: Convert delayed_properties hashtable to linked
        list.  Fixes #495769.


svn path=/trunk/; revision=18983
2007-11-11 18:06:11 +00:00
Matthias Clasen
06d28ff884 Don't leak buffer if an error occurs.
2007-11-10  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkbuilder.c (gtk_builder_add_from_file): Don't
        leak buffer if an error occurs.



svn path=/trunk/; revision=18979
2007-11-10 05:03:10 +00:00
Matthias Clasen
fb4b0ddff7 don't leak 'filename' field memory when loading more than one file into
2007-11-08  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkbuilder.c: don't leak 'filename' field memory when loading
        more than one file into the same GtkBuilder instance. Noticed by
        Ryan Lortie.


svn path=/trunk/; revision=18973
2007-11-09 00:33:45 +00:00
Emmanuele Bassi
b2f4e11df3 Chain up to the parent's finalize virtual function.
2007-10-30  Emmanuele Bassi  <ebassi@gnome.org>

	* gtk/gtkbuilder.c (gtk_builder_finalize): Chain up to the
	parent's finalize virtual function.

svn path=/trunk/; revision=18952
2007-10-30 12:25:39 +00:00
Johan Dahlin
949d340659 Improve gtk_builder_get_type_from_name() documentation. (#461222, Murray
2007-10-24  Johan Dahlin  <jdahlin@async.com.br>

	* gtk/gtkbuilder.c: Improve gtk_builder_get_type_from_name()
	documentation. (#461222, Murray Cumming)


svn path=/trunk/; revision=18948
2007-10-24 18:24:44 +00:00
Johan Dahlin
fa13277655 Parse signals after <child> tags and add tests. (#468793, Benjamin Otte)
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
2007-10-24 11:48:17 +00:00