Drop use of deprecated GtkHandleBox widget

Bug #1096350 reported by Alex Valavanis on 2013-01-05
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Medium
Alex Valavanis
The Gimp
Fix Released
Low

Bug Description

GIMP and Inkscape currently use the GtkHandleBox widget to provide a "tear-off" toolbox:

Inkscape: widgets/toolbox.cpp.
GIMP: plug-ins/imagemap/imap_menu.c, app/widgets/gimpuimanager.c

This widget is deprecated in GTK+ 3.4 [1] and will eventually be removed. From the Gtk+ API reference...

"GtkHandleBox has been deprecated. It is very specialized, lacks features to make it useful and most importantly does not fit well into modern application design. Do not use it. There is no replacement."

We will need to adapt our code accordingly.

Options:

1. Get rid of "tear-off" functionality completely, and just have fixed
toolboxes... probably the easiest option!

2. Switch to using GDL and putting all toolboxes into a dockable dialog.

3. "Adopt" the GtkHandleBox code and maintain a fork of it (as we did
with GtkRuler)

4. Something radical, new and exciting..!?

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

description: updated
Changed in gimp:
importance: Unknown → Medium
status: Unknown → New
Changed in gimp:
importance: Medium → Low
Alex Valavanis (valavanisalex) wrote :

From the GIMP tracker:

"Generally, I think 1. is the way to go, these torn-off menus are such
an artifact, it's probably best to get rid of them."

However, Alexandre commented on the mailing list that this might be a bad idea:

"Only if you want RTL people to hate us :)"

Can someone please clarify what the issue would be for RTL?

Alex, you mixed up everything :)

Here's the original discussion:

--- snip ---

>> 1. Get rid of "tear-off" functionality completely, and just have fixed
>> toolboxes... probably the easiest option!
>
> Not a bad option...

Only if you want RTL people to hate us :)

--- snip ---

My point was about fixed toolboxes. In Hebrew localization you literally get toolboxes expanding from left to right. So if with "fixing toolbars" Josh meant fixing them in left position, that would certainly upset RTL people. OTOH, if we use stock gtk toolbars, that shouldn't happen.

s/toolboxes/roolbars/g

Alex Valavanis (valavanisalex) wrote :

Simple patch attached to remove GtkHandleBox usage, and just use the normal fallback behaviour.

Any thoughts?

su_v (suv-lp) wrote :

Inkscape 0.48+devel r12019 + fix-1096350.patch looks ok with either type of localization (tested with en_US.UTF-8 (RTL) and he_IL.UTF-8 (LTR): toolbar layout and toolbar content is arranged according to base direction of the script.

Tested on OS X 10.7.4 with
 - 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), gtkmm 2.24.2, glib 2.34.3
- GTK+/Quartz 3.6.4, gtkmm 3.6.0, glib 2.34.3

<opinion>On OS X under X11, I never worked with detached toolbars (and don't recall user reports about making heavily use of this); with the Quartz backend of GTK+ (GTK2, GTK3) the feature is broken anyway (detached toolbars render blank - see bug #539759). "Non-detachable" aka fixed toolbars seem ok to me.</opinion>

su_v (suv-lp) wrote :

Oops, correcting y typo:
- (tested with en_US.UTF-8 (RTL) and he_IL.UTF-8 (LTR)
+ (tested with en_US.UTF-8 (LTR) and he_IL.UTF-8 (RTL))

ScislaC (scislac) wrote :

All worked okay here and if anything, it will allow us to close older reports where people would tear them off and have issues (if they're still open that is). I noticed in the patch that it removes a reference to a preference for "floatallowed", which can then most likely allow it to be removed from preferences-skeleton.h (that was the only place I saw it being used was where you removed it).

Changed in gimp:
status: New → Fix Released
Alex Valavanis (valavanisalex) wrote :

Tear-off functionality dropped in lp:inkscape r12027

Changed in inkscape:
assignee: nobody → Alex Valavanis (valavanisalex)
milestone: none → 0.49
status: Triaged → Fix Committed
Bryce Harrington (bryce) on 2015-02-21
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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