After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 383035 - GtkBuilder patches (continued saga)
GtkBuilder patches (continued saga)
Status: RESOLVED INCOMPLETE
Product: gtk+
Classification: Platform
Component: Class: GtkBuilder
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GtkBuilder maintainers
GtkBuilder maintainers
Depends on: gtkbuilder
Blocks:
 
 
Reported: 2006-12-06 15:39 UTC by Tristan Van Berkom
Modified: 2009-01-19 19:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
typeutils portion (5.56 KB, patch)
2006-12-06 15:42 UTC, Tristan Van Berkom
rejected Details | Review
patch against widgets to implement GtkBuildable (30.33 KB, patch)
2006-12-06 15:43 UTC, Tristan Van Berkom
rejected Details | Review
Modifications to the builder framework/iface/parser (48.92 KB, patch)
2006-12-06 15:44 UTC, Tristan Van Berkom
rejected Details | Review
A fullblown test glade file (50.05 KB, patch)
2006-12-06 15:47 UTC, Tristan Van Berkom
rejected Details | Review
A png file for the tests/ directory (21.21 KB, image/png)
2006-12-06 15:47 UTC, Tristan Van Berkom
  Details
An all-in-one patch (148.38 KB, patch)
2006-12-06 15:50 UTC, Tristan Van Berkom
rejected Details | Review

Description Tristan Van Berkom 2006-12-06 15:39:40 UTC
Hi, as per Johan's request I am moving my work into a separate bug.

Before people start some explosive thread of confusion, I think
its important that I state my motivations behind this patch. 

While the patch does meet my initial standards of quality (I wouldn't
have proposed a patch that I didn't think was worthy of review) It
was intended to be a demonstration - thats why I chose to support 
older glade files as the objective of my work, I think that
if alot of people can see that using the builder framework it was
in fact quite easy to support all the glade files in circulation,
this will help to build trust on the builder framework and its
potential.

So one particular point (hehe or "disclaimer"), is that I have no
strong opinion about supporting deprecated widgets in glade files
using the builder - the patches I wrote against those deprecated
widgets are safe to include and provided as part of this demo,
if people argue that it sends a better message to not support these
widgets, I wont argue against that :)

This patch is also a statement of intent, I want there to be rocking
builder support in gtk+ 2.12 and I'm throwing a patch on the table
to say "hey I'm with you on this", if this patch doesnt fit with
the gtk+ game plan please lets discuss what is best for everyone
and get this ball rolling... on that note.. rock on !

Pasting my basic changelog here from bug 172535
==================================================================
   - Implemented accelerators (work should be done on making sure
     accelerators dont conflict with those created by uimanager).

   - Implemented versioning: <glade-interface version="1">

   - Parse adjustments and pixbufs the old fashioned way for version 1 
     glade files.

   - Handle unsupported atk property tags so that they are not mistaken for
     custom tags (preemptively building the object and the constructor ignoring 
     any trailing properties, such as accelerators).

   - Ported BOOL macros to the private header from libglade (this fixes non 0
     integer values, case insensitive yes/true as valid truth strings from
     the xml, formerly it was only "yes" that was supported, but libglade 
     supports more).

   - Handle packing properties in the builder parser proper, added 
     buildable->child_set_property() method and implemented it in GtkContainer,
     this allows non-gtkcontainers to have packing properties without
     doing that complex parsing jargon and also allows GtkContainer subclasses
     to handle buildable->child_set_property() in thier own way and chain up.

   - Allow virtual properties (packing or otherwise), properties listed in 
     the glade file that dont have coresponding pspecs installed will be 
     delivered to the buildable's set_property()/child_set_property()
     method as G_TYPE_STRING.

     The rationale behind this change is that it allows us to port in all the
     special-case code from libglade without opening up the can-of-worms 
     attached to making these special-case properties "real" object properties,
     this also made it rediculously easy to port all the support code from
     libglade in a safe manner.

   - Icky special case code added for GtkDialog --> GtkButton relationships
     (wrt response-id), added in the buildable code strictly for version 1
     glade files.

   - Dealt with digging out "type" packing properties in the case of
     version 1 glade files. (the new style is <child type="tab">, older
     glade files store "tab" in a packing property).

(will attatch my patch storm to this bug momentarily)
Comment 1 Tristan Van Berkom 2006-12-06 15:42:32 UTC
Created attachment 77825 [details] [review]
typeutils portion
Comment 2 Tristan Van Berkom 2006-12-06 15:43:38 UTC
Created attachment 77826 [details] [review]
patch against widgets to implement GtkBuildable
Comment 3 Tristan Van Berkom 2006-12-06 15:44:36 UTC
Created attachment 77827 [details] [review]
Modifications to the builder framework/iface/parser
Comment 4 Tristan Van Berkom 2006-12-06 15:47:09 UTC
Created attachment 77828 [details] [review]
A fullblown test glade file

This file contains menus and toolbars both in traditional
form and also using the UIManager code, it also includes most
deprecated widgets and demonstrates that notebooks and frames
can work using the old fashioned "type" packing property.
Comment 5 Tristan Van Berkom 2006-12-06 15:47:58 UTC
Created attachment 77829 [details]
A png file for the tests/ directory
Comment 6 Tristan Van Berkom 2006-12-06 15:50:25 UTC
Created attachment 77830 [details] [review]
An all-in-one patch

This patch is against current cvs, if you want to try this out;
you can simply apply this patch against gtk+ cvs HEAD and compile.
Comment 7 Tristan Van Berkom 2006-12-06 15:52:07 UTC
Just for clarity, these patches depend on Johan's patches
on bug 172535, only the complete.diff can be applied to your
tree directly.
Comment 8 Johan (not receiving bugmail) Dahlin 2007-06-15 20:05:20 UTC
(In reply to comment #3)
> Created an attachment (id=77827) [edit]
> Modifications to the builder framework/iface/parser
> 

Can you update this to trunk and factor out:

* toplevel -> bug 447998
* accelerator/accel group to a new bug (remember GtkWidget implements the <accelerator> tag, do not duplicate that code)
* pixbuf to 447966, path handling needs plenty of improvements over this
* adjustment should go into conversion script I think, we support GObject properties now.
* atk properties -> new bug, preferably without adding new tags, if possible
* child properties -> new bug
* tooltips -> new bug

Don't forget to write tests!
Comment 9 Christoph Wurm 2009-01-19 19:16:44 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for.
Thanks!