GNOME Bugzilla – Bug 102204
Remove all deprecated gtk funcs/widgets/etc.
Last modified: 2007-05-06 20:09:57 UTC
At some point in time several deprecated widgets and routines will be removed from GTK. This bug report is just a reminder that before that time we will have to remove usage of these widgets/funcs as well from GIMP. Most noticably are the GtkList, GtkCList, GtkPreview and GtkText widgets.
The core is almost there. The remaining files that still undefine GTK_DISABLE_DEPRECATED are: gui/paths-dialog.c tools/gimpcurvestool.c tools/gimplevelstool.c widgets/gimpcolormapeditor.c widgets/gimppaletteeditor.c There are however still quite a few plug-ins that use deprecated GTK+ API.
For the core, this needs to happen until 2.0, we can change the milestone back to FUTURE once the core is completely undeprecated.
plug-ins that still use GtkList: Fractal Explorer (working on that one right now) gfig gflare As soon as the core is finished the milestone should be set to 2.2. That will give me enough time to remove all deprecated stuff from the plug-ins.
I don't think we will make the core deprecation-clean before 2.0. The only two widgets still using deprecated functions are GimpColormapEditor and GimpPaletteEditor. Both use GtkPreview and GtkPreview is a perfectly good widget to use here. I never understood why it was deprecated in the first place. One of the plug-ins that most urgently need to be ported to GtkTreeView is plugin-details. It could be a very useful plug-in if it had a better user interface.
Bumping milestone to 2.2. This will probably be resolved by writing a new preview widget for the plug-ins, which will happen once GimpFixmePreview goes away. Dave.
Now that the HEAD branch depends on GTK+-2.4, there are more deprecated widgets. One of them (the only one?) is GtkOptionMenu. I've introduced GimpIntComboBox as a replacement widget that is slightly more comfortable than a plain GtkComboBox. And I've just finished porting all plug-ins to the new widget. What remains left to do is: (a) add a replacement for GimpUnitMenu (which is derived from GtkOptionMenu) (b) add a replacement for the Paint mode menu in the core (c) replace the option menus in the core that use GimpContainerMenuImpl (a) and (b) are non-trivial because GtkComboBox doesn't support separators. We might want to wait until this changes (perhaps with gtk+-2.6).
Another widget that needs to be replaced is GtkFileSelector. This task is now almost finished with only two plug-ins left that haven't been ported to GtkFileChooser yet. One is the Print plug-in which is supposed to be replaced, the other is ImageMap which is left as an exercise for Maurits ;)
Thanks, I really need to exercise more ;)
GtkFileSelection is completely gone now: 2004-05-25 Sven Neumann <sven@gimp.org> * plug-ins/print/gimp_color_window.c * plug-ins/print/gimp_main_window.c: HIG-ified and ported to GtkFileChooser. * plug-ins/ifscompose/ifscompose.c (ifsfile_load_response): ported forgotten callback to GtkFileChooser. * plug-ins/imagemap/imap_browse.c * plug-ins/imagemap/imap_file.c: finished port to GtkFileChooser.
Print plug-in should use GtkComboEntry instead of the deprecated GtkCombo and GtkTreeView instead of the deprecated GtkCList.
All uses of GtkPreview are gone now except for two files in the core: app/widgets/gimpcolormapeditor.c app/widgets/gimppaletteeditor.c
Is there somebody working on : app/widgets/gimpcolormapeditor.c app/widgets/gimppaletteeditor.c I'm trying to catch up with the changes in gimppreviewarea. Maybee this could be a good exercise. I noticed that a menu is added to the preview area and think that this is a issue for reusing the preview area for gimpcolormapeditor. gimp_preview_area_menu_popup gimp_preview_area_menu_new gimp_preview_area_menu_toggled This way the preview area is not a basic replacement for the gtk_preview widget. Shouldn't this be a function to add at the final preview widget?
The remaining previews in the core should be replaced by a generic palette view widget. This is a rather complex job, probably not what you want to do to learn how to use the new widgets. You have obviously misunderstood the popup menu in GimpPreviewArea. This doesn't belong here though. If you want me to explain the details of the new widgets to you, please ask on the mailing-list.
Do we want this to block the 2.2 release or are we willing to live with some deprecated stuff? What about deprecated widgets in libgimpwidgets (like the unit menu)?
I don't think it's worth blocking over.
Me neither. As long as they are still distributed with GTK this is no problem.
Well, mixing GtkOptionMenu and GtkComboBox is IMO a problem. They look similar but don't behave identically. Also having a GtkOptionMenu in libgimpwidgets makes it impossible to use the GTK_DISABLE_DEPRECATED macro in any GIMP code.
Well, even though it's painful to admit, no release will ever be perfect. Is it even possible to port the GtkOptionMenus over yet, or are there still no separators? (resists urge to make comment about deprecating a widget in favor of another that is not a superset of the functionality of the original)
GTK+-2.6 will allow for seperators in tree views and combo boxes but it won't be ready in time for GIMP 2.2. We could however depend on it early in 2.4 and get this fixed.
Early in gimp-2.3, of course.
One more GtkPreview ditched: 2005-07-14 Michael Natterer <mitch@gimp.org> * app/widgets/gimppaletteview.[ch]: added "entry-clicked" and "color-dropped" signals. Completely handle color DND. Cleanup. * app/core/gimpmarshal.list: marshallers for above signals. * app/widgets/gimppaletteeditor.[ch]: chopped and reassembled. Remove tons of code and use a GimpPaletteView instead of the deprecated GtkPreview. Addresses bug #102204.
Looks like what's left to do here is GimpColormapEditor on the core, GimpUnitMenu in libgimpwidgets and the Print plug-in (which should probably just be abandoned in favor of the plug-in that ships with Gutenprint).
Bumping to Future since this is not a blocker for 2.4.
pygimp also still uses a GtkFrame for the PF_RADIO control. A GimpIntComboBox would probably be better suited here.
What's left now is GimpColormapEditor which doesn't really matter and it's prominently marked with a #warning to avoid that it is forgotten. The other is GimpUnitMenu and we can't really do anything about that without breaking the API. At some point we should introduce new widgets and deprecate it. I am closing this bug as OBSOLETE now.