GNOME Bugzilla – Bug 154727
Can't set G_PARAM_CONSTRUCT_ONLY flagged properties.
Last modified: 2004-12-22 21:47:04 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
Re-assigning this bug to glade3-maintainer so that everyone watching glade3-maintainer can recieve updates.
Gotta be A. and probably using g_object_newv or whatever the array version is called.
Created attachment 32569 [details] the background grid of gtkfixed (to be added under pixmaps).
Created attachment 32570 [details] gtkfixed.xml to be added under widgets
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.
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.
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
Oops, I did mean that the fix for 155397 was in glade-utils.c
Patch has (with slight modifications) been applied