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 154727 - Can't set G_PARAM_CONSTRUCT_ONLY flagged properties.
Can't set G_PARAM_CONSTRUCT_ONLY flagged properties.
Status: RESOLVED FIXED
Product: glade
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Glade 3 Maintainers
Glade 3 Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-10-06 20:44 UTC by Tristan Van Berkom
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
the background grid of gtkfixed (to be added under pixmaps). (262 bytes, text/plain)
2004-10-13 18:07 UTC, Tristan Van Berkom
  Details
gtkfixed.xml to be added under widgets (179 bytes, text/plain)
2004-10-13 18:08 UTC, Tristan Van Berkom
  Details
The big fat patch (75.80 KB, patch)
2004-10-13 18:12 UTC, Tristan Van Berkom
none Details | Review
This is the replacement patch (75.82 KB, patch)
2004-10-13 20:55 UTC, Tristan Van Berkom
none Details | Review
A cleaner implementation of construct_only (85.32 KB, patch)
2004-10-18 18:34 UTC, Tristan Van Berkom
none Details | Review

Description Tristan Van Berkom 2004-10-06 20:44:20 UTC
Objects need to be created with these properties
in the g_object_new(...) paramaters, so I see two possible
approaches:
    A.) Recreate objects every time "construct only" properties are
        changed
    B.) Set these properties aside only to be written to the glade file
        and not applied on the object at runtime

I guess "A" is the ideal
Comment 1 Tristan Van Berkom 2004-10-07 19:17:20 UTC
Re-assigning this bug to glade3-maintainer so that everyone
watching glade3-maintainer can recieve updates.
Comment 2 Morten Welinder 2004-10-07 23:44:36 UTC
Gotta be A.  and probably using g_object_newv or whatever the array version
is called.
Comment 3 Tristan Van Berkom 2004-10-13 18:07:02 UTC
Created attachment 32569 [details]
the background grid of gtkfixed (to be added under pixmaps).
Comment 4 Tristan Van Berkom 2004-10-13 18:08:07 UTC
Created attachment 32570 [details]
gtkfixed.xml to be added under widgets
Comment 5 Tristan Van Berkom 2004-10-13 18:12:05 UTC
Created attachment 32572 [details] [review]
The big fat patch

Here are my changelog entries for this big fat patch.

    * src/glade-gtk.c Added functionality for GtkFixed (also replaced some ints

      with gints and chopped down some lines).

    * src/glade-plugin.h Added some headers for the plugin (needed for
GtkFixed)

    * src/glade-popup.c Replaced reference to GLADE_WIDGET_IS_TOPLEVEL (support

      for deprication of flags on GladeWidgetClass).

    * src/glade-project-view.c Replaced reference to GLADE_WIDGET_IS_TOPLEVEL 
      (support for deprication of flags on GladeWidgetClass).

    * src/glade-project-window.[ch] Replace gpw->project with 
      gpw->active_project and added glade_project_window_get_active_project()
      for clarity's sake.

    * src/glade-project.c Replaced reference to GLADE_WIDGET_IS_TOPLEVEL 
      (support for deprication of flags on GladeWidgetClass).

    * src/glade-property-class.h Added construct_only as a quick reference
      (to G_PARAM_CONSTRUCT_ONLY).

    * src/glade-property.c glade_property_set() will now check for 
      construct_only and call glade_widget_rebuild_instance() if needed.

    * src/glade-utils.c fixed the queue_nodes code to add a reference on the 
      GladeWidget pertaining to the expose event, since the code depends on
      the existance of the GladeWidget, the GtkWidget and the GdkWindow as 
      opposed to only the GdkWindow

    * src/glade-widget-class.c Update construct_only tab upon construction of
      GladePropertyClass structs. Removed set of depricated flags on 
      GladeWidgetClass.

    * src/glade-widget-class.h Removed depricated flag macro definitions (and
      removed the flags)

    * src/glade-widget.c 
	- Fixed Segfaults (Removed glade_widget_class_free() in finalize)
	- Objects are now built with thier properties as paramaters of 
	  g_object_newv
	- Added glade_widget_rebuild_instance for the purpose of changing 
	  properties that are flagged as G_PARAM_CONSTRUCT_ONLY.
Comment 6 Tristan Van Berkom 2004-10-13 20:55:05 UTC
Created attachment 32581 [details] [review]
This is the replacement patch

glade_util_queue_draw_nodes now forwards the GdkWindow 
to glade_util_draw_nodes_idle instead of the GladeWidget.
Comment 7 Tristan Van Berkom 2004-10-18 18:34:02 UTC
Created attachment 32741 [details] [review]
A cleaner implementation of construct_only

This patch is the same as the old patch except the code is a little cleaner,
also there is the included bug fix for 155397:
   http://bugzilla.gnome.org/show_bug.cgi?id=155397

    * glade-gtk.c added g_object_ref/gtk_object_sink in set_tooltips func.

And another fix in glade-command.c
    * create/remove command objects were reffing 
      "GladeCommand->GladeWidget->GtkWidget" at
      creation time, and unreffing "GladeCommand->GladeWidget" at finalize.
    * Clarified ref_counting all-around in glade-command.c
Comment 8 Tristan Van Berkom 2004-10-18 18:35:34 UTC
Oops, I did mean that the fix for 155397 was in glade-utils.c
Comment 9 David Hoover 2004-10-22 19:46:01 UTC
Patch has (with slight modifications) been applied