GNOME Bugzilla – Bug 620841
[GtkBuilder transition] color_editor_prefs_window
Last modified: 2010-09-08 16:54:46 UTC
The color_editor_prefs_window needs to be migrated to GtkBuilder.
Instructions on how to fix this can be found here: http://f-spot.org/GtkBuilder_Transition Please indicate below if you are working on this (and if you stopped working on it), so we can avoid duplicate work. If you are stuck, just ask for help on IRC or the mailing list.
Created attachment 166183 [details] crash log
I'll try to fix this one. However I've got one problem. This isn't the usual dialog thing, instead Glade is used to load a widget. The old code looks like this: xml = new Glade.XML (null, "f-spot.glade", "color_editor_prefs", "f-spot"); xml.Autoconnect (this); AttachInterface (); return xml.GetWidget ("color_editor_prefs"); I changed this to this looking mostly at the code from BuilderDialog: var builder = new GtkBeans.Builder (null, "color_editor_prefs_window.ui", null); builder.Autoconnect (this); AttachInterface (); return new Widget (builder.GetRawObject ("color_editor_prefs_window")); Unfortunately this crashes if the editor is shown (log is attached). I suspect this to be code which return the Widget. builder.GetRawObject returns an IntPrt but I don't know how to correctly create a Widget from this. Any help is appreciated.
gabaug pointed me on GLib.ObjectManager.CreateObject (ptr). But return GLib.ObjectManager.CreateObject (builder.GetRawObject ("color_editor_prefs_window")) as Widget; crashes with the same signature as above.
Created attachment 166742 [details] [review] Convert the ColorEditor Widget from Glade to GtkBuilder.
Review of attachment 166742 [details] [review]: ::: src/Editors/ColorEditor.cs @@ -82,2 +84,3 @@ protected override Pixbuf Process (Pixbuf input, Cms.Profile input_profile) { - Cms.ColorCIEXYZ src_wp; + //FIXME: update CMS code + /*Cms.ColorCIEXYZ src_wp; Does this mean color management support is disabled? (Note that it's probably broken anyway, so it might not hurt to leave it disabled and delete it entirely).
Review of attachment 166742 [details] [review]: I think there's something wrong here though. Have you tested it? Everything seems garbled up as soon as I drag one of the sliders.
Yes, CMS support is disabled, it crashes if it's enabled. The rest works fine for me, I'm attaching a screenshot, but it doesn't look strange to me.
Created attachment 166976 [details] screenshot
Created attachment 167459 [details] [review] Port the ColorEditor widget to GtkBuilder
Maybe we should disable the Color Editor plugin for now since it simply doesn't work. Comments?
Created attachment 167704 [details] screenshot I've tried the current git master version and that one does seem to work. What's odd with the patch applied is that all sliders default to a value of zero. This causes the whole processing to go haywire. Screenshot shows this.
Without the patch all slider are set to zero, only temperature is set to 5000. I'll fix this. However should we disable the extension until we have a working solution?
It works fine without the patch, why should it be disabled?
Created attachment 167724 [details] [review] Port the ColorEditor widget to GtkBuilder https://bugzilla.gnome.org/show_bug.cgi?id=620841 ALso disable the ColorEditor since it's not working right now.
Review of attachment 167459 [details] [review]: The names of the widgets aren't mapped correctly. ::: src/Clients/MainApp/ui/color_editor_prefs_window.ui @@ +401,3 @@ + </child> + </object> + <object class="GtkAdjustment" id="adjustment1"> Here's the problem, the names of the adjustments aren't correct. This should be hue_scale, temp_scale etc.
Created attachment 167726 [details] [review] Port the ColorEditor widget to GtkBuilder https://bugzilla.gnome.org/show_bug.cgi?id=620841 ALso disable the ColorEditor since it's not working right now.
Attachment 167726 [details] pushed as d164657 - Port the ColorEditor widget to GtkBuilder Merged!