Re: How to mark a project as modified?
Tristan Van Berkom <[email protected]> Sun, 28 Feb 2010 16:31:12 -0500
| Newsgroups | gmane.comp.gnome.glade.devel |
|---|---|
| Message-ID | <[email protected]> |
2010/2/28 Marco Diego Aurélio Mesquita <[email protected]>: > 2010/2/28 Tristan Van Berkom <[email protected]>: >> I cant reproduce your bug running 3.6.7 or newer here > > Tried glade from git. The bug is reproducible: > Create a new project > Add a toplevel window > Save the project > Click on the default width checkbox: the project won't be marked as modified. > Thats normal, but could be addressed (maybe I misunderstood your previous post, I thought the window resize was dirtying the project). Ok, so we only save builder stuff in builder files, so the rule is GtkBuilder will choke on anything it doesnt recognize, which is ok since we can verify the version of GTK+ you are running when loading the version encoded Glade file. So a checkbox state that enables/disables editing of a property in the UI is not a part of that metadata, currently we load the project and if an "optional" property is non-default, we turn the option on (enable the checkbox), iirc it updates automatically this way at undo/redo time as well. If we wanted to introduce metadata that has nothing to do with GtkBuilder, then we do it in comments (currently we save the naming policy that way for instance) So, if we wanted the checkboxes to be part of the project data; we could create a virtual boolean property on the data model for it and serialize it as comments, we would need to write some generic code that reads/writes in comment form at a GladeWidget level (entries along side <property ... /> tags). I think its alot of task for a not so bad bug, but if you thought it would be cool thing to do then the comment serialization stuff could come in handy later ;-) Cheers, -Tristan _______________________________________________ Glade-devel maillist - [email protected] http://lists.ximian.com/mailman/listinfo/glade-devel