GNOME Bugzilla – Bug 357424
Remember last used scaling units
Last modified: 2006-10-14 16:53:55 UTC
I have been using the scaling dlg quite a bit this week and it is becoming a serious PITA having to select Percent rather than the default Pixels every single time I do an operation using this dialogue. It should either remember the last used setting or have the default configurable in prefs like the scaling method is. Other information: see #164995 for discussion on prefs vs last-used for storing these options.
I found the following in preferences_dialog.c but could not track down where these options are stored. prefs_enum_combo_box_add (object, "interpolation-type", 0, 0, _("Default _interpolation:"), GTK_TABLE (table), 0, size_group); The obvious /home/*/.gimp-2.3/tool-options was empty despite that I have selected lanczos as default interpolation and this is retained. Could s.o. point me in the right direction please?
Everything that you can control in the Preferences dialog is stored in the file gimprc and these settings are documented in the gimprc man-page. Keyboard shortcuts and input controllers are exceptions to this rule.
Thanks, is there a mechanism for things like the Image Scale dlg to save its settings? If not can you suggest a good (ie fits in with the way things are done) way to go about this and I'll have a look coding it.
No, there is no such mechanism. And seriously, it should be sufficient to keep the setting for a single session. No need to save it across settings. Also, before another option is added, we should decide if we should not perhaps change the default instead. All these things have not yet been discussed.
Perhaps the best thing to do here is to do some small changes to what was done for bug #312950. It seems that quite a few people would prefer if the unit wasn't remembered per-image but globally. And indeed it seems rather unlikely that the same image would be resized/scaled multiple times compared to resizing/scaling a series of images. So instead of attaching the unit to the image, the scale and resize dialogs could attach the unit to the user context. Grep for "scale-dialog-unit" to see how this is done.
Fixed in CVS: 2006-10-14 Michael Natterer <mitch@gimp.org> Remember the settings in the scale and resize dialogs for images and layers. Fixes bug #164995, bug #316392, and bug #357424. * app/dialogs/scale-dialog.h: removed GimpScaleCallback typedef. * app/dialogs/dialogs-types.h: added it here. * app/dialogs/image-scale-dialog.[ch]: made the ImageScaleDialog struct private, return a GtkWidget* from image_scale_dialog_new() and use a GimpScaleCallback in the public API. * app/actions/actions-types.h: #include "dialogs/dialogs-types.h" * app/actions/image-commands.c: changed according to image scale dialog changes. Remember the scale dialog's unit (if it is "percent") and interpolation type across dialog invocations. Also remember the resize dialog's unit (if it is "percent"). * app/actions/layers-commands.c: remember scale and resize dialog stuff as in image-commands.c