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 620841 - [GtkBuilder transition] color_editor_prefs_window
[GtkBuilder transition] color_editor_prefs_window
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: General
GIT
Other Linux
: Normal enhancement
: 0.7.3
Assigned To: F-spot maintainers
F-spot maintainers
Depends on:
Blocks: f-spot-glade
 
 
Reported: 2010-06-07 14:07 UTC by Ruben Vermeersch
Modified: 2010-09-08 16:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
crash log (18.83 KB, text/plain)
2010-07-19 22:46 UTC, Paul Lange
  Details
Convert the ColorEditor Widget from Glade to GtkBuilder. (54.57 KB, patch)
2010-07-28 21:09 UTC, Paul Lange
reviewed Details | Review
screenshot (33.23 KB, image/png)
2010-08-02 13:54 UTC, Paul Lange
  Details
Port the ColorEditor widget to GtkBuilder (57.26 KB, patch)
2010-08-09 21:35 UTC, Paul Lange
needs-work Details | Review
screenshot (212.13 KB, image/png)
2010-08-12 09:09 UTC, Ruben Vermeersch
  Details
Port the ColorEditor widget to GtkBuilder (56.99 KB, patch)
2010-08-12 12:43 UTC, Paul Lange
none Details | Review
Port the ColorEditor widget to GtkBuilder (55.79 KB, patch)
2010-08-12 12:55 UTC, Paul Lange
committed Details | Review

Description Ruben Vermeersch 2010-06-07 14:07:29 UTC
The color_editor_prefs_window needs to be migrated to GtkBuilder.
Comment 1 Ruben Vermeersch 2010-06-07 15:21:45 UTC
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.
Comment 2 Paul Lange 2010-07-19 22:46:58 UTC
Created attachment 166183 [details]
crash log
Comment 3 Paul Lange 2010-07-19 22:47:20 UTC
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.
Comment 4 Paul Lange 2010-07-19 22:55:41 UTC
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.
Comment 5 Paul Lange 2010-07-28 21:09:37 UTC
Created attachment 166742 [details] [review]
Convert the ColorEditor Widget from Glade to GtkBuilder.
Comment 6 Ruben Vermeersch 2010-08-02 13:28:57 UTC
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).
Comment 7 Ruben Vermeersch 2010-08-02 13:30:08 UTC
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.
Comment 8 Paul Lange 2010-08-02 13:54:36 UTC
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.
Comment 9 Paul Lange 2010-08-02 13:54:59 UTC
Created attachment 166976 [details]
screenshot
Comment 10 Paul Lange 2010-08-09 21:35:15 UTC
Created attachment 167459 [details] [review]
Port the ColorEditor widget to GtkBuilder
Comment 11 Paul Lange 2010-08-11 14:44:02 UTC
Maybe we should disable the Color Editor plugin for now since it simply doesn't work. Comments?
Comment 12 Ruben Vermeersch 2010-08-12 09:09:10 UTC
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.
Comment 13 Paul Lange 2010-08-12 11:55:46 UTC
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?
Comment 14 Ruben Vermeersch 2010-08-12 12:42:36 UTC
It works fine without the patch, why should it be disabled?
Comment 15 Paul Lange 2010-08-12 12:43:00 UTC
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.
Comment 16 Ruben Vermeersch 2010-08-12 12:44:31 UTC
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.
Comment 17 Paul Lange 2010-08-12 12:55:29 UTC
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.
Comment 18 Ruben Vermeersch 2010-08-12 13:07:42 UTC
Attachment 167726 [details] pushed as d164657 - Port the ColorEditor widget to GtkBuilder


Merged!