Drop use of deprecated GtkHSV widget

Bug #1071354 reported by Alex Valavanis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Alex Valavanis
The Gimp
Fix Released
Low

Bug Description

Gimp and Inkscape currently use the GtkHSV widget to provide a "color wheel"

* Inkscape: widgets/sp-color-wheel-selector.cpp.
* GIMP: modules/color-selector-wheel.c

This widget is deprecated in GTK+ 3 [1] and will eventually be removed. We will need to adapt our code accordingly

Options:

1. Drop our color-wheel widget entirely; only use color-scales instead.

2. Adopt the GtkHSV code, and maintain it ourselves.

3. Make our own replacement color-wheel widget

4. Other suggestions...??

[1] http://developer.gnome.org/gtk3/3.6/GtkHSV.html

Tags: build color ui
Changed in inkscape:
importance: Undecided → Medium
Revision history for this message
jazzynico (jazzynico) wrote :

First talk to Gimp devs in order to know their plan? We already adopted and adapted their sliders. If it's relevant, we could also adapt their wheel.

Revision history for this message
Alex Valavanis (valavanisalex) wrote :
summary: - Inkscape uses deprecated GtkHSV widget
+ Drop use of deprecated GtkHSV widget
description: updated
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

GIMP devs plan to pull the widget back into their tree. It was their widget before it was adopted by GTK+.

Should we pull it from GIMP when they do, or adopt it directly from GTK+?

Changed in gimp:
importance: Unknown → Low
status: Unknown → Confirmed
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

OK, the GTK+ version apparently has some big errors, and the widget will be maintained in GIMP from now on. We should grab it from GIMP when it's ready.

Changed in inkscape:
assignee: nobody → Alex Valavanis (valavanisalex)
Changed in gimp:
status: Confirmed → Fix Released
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

First attempt at patch added. I can't test this properly, as I'm running a slow remote Xserver

Changed in inkscape:
status: Triaged → In Progress
Revision history for this message
su_v (suv-lp) wrote :

> First attempt at patch added.

Quick test with Fill&Stroke color selector on OS X 10.7.4:
- GTK2 builds seem ok (the wheel looks slightly slimmer than the one before)
- GTK3 builds crash when selecting the color wheel in Fill&Stroke
  (both GTK+/X11 3.4.4 and GTK+/Quartz 3.6.3)

Revision history for this message
su_v (suv-lp) wrote :
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Should be fixed in lp:inkscape r12011. I have switched over to using the upstream GTK+ 3 code, which should hopefully have fixed the crash.

@suv - please could you check whether the crash is still there on either platform?

Changed in inkscape:
milestone: none → 0.49
status: In Progress → Fix Committed
Revision history for this message
su_v (suv-lp) wrote :

>please could you check whether the crash is still there on either platform?

r12011 works ok with GTK2 and GTK3 builds (no more crashes) on OS X 10.7.4, with either backend of GTK+:
- GTK+/X11 2.24.13, gtkmm 2.24.2, glib 2.32.4
- GTK+/X11 3.4.4, gtkmm 3.4.0, glib 2.32.4
- GTK+/Quartz 2.24.15 (git branch), gtkmm 2.24.2, glib 2.34.3
- GTK+/Quartz 3.6.4, gtkmm 3.6.0, glib 2.34.3

I do get some warnings when compiling (with llvm-gcc.4.2), both with GTK2 and GTK3, but they don't cause the build to fail. From the GTK+/Quartz 3.6.4 build:
../../src/ui/widget/gimpcolorwheel.c: In function ‘set_cross_grab’:
../../src/ui/widget/gimpcolorwheel.c:690: warning: ‘gdk_pointer_grab’ is deprecated (declared at /Volumes/cyan/mp-quartz/with-a-long-long-long-directory-name/include/gtk-3.0/gdk/gdkmain.h:86)
../../src/ui/widget/gimpcolorwheel.c: In function ‘gimp_color_wheel_grab_broken’:
../../src/ui/widget/gimpcolorwheel.c:704: warning: unused parameter ‘event’
../../src/ui/widget/gimpcolorwheel.c: In function ‘gimp_color_wheel_button_release’:
../../src/ui/widget/gimpcolorwheel.c:800: warning: ‘gdk_display_pointer_ungrab’ is deprecated (declared at /Volumes/cyan/mp-quartz/with-a-long-long-long-directory-name/include/gtk-3.0/gdk/gdkdisplay.h:56)
../../src/ui/widget/gimpcolorwheel.c: At top level:
../../src/ui/widget/gimpcolorwheel.c:106: warning: ‘gimp_color_wheel_size_request’ declared ‘static’ but never defined

Bryce Harrington (bryce)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.