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 357424 - Remember last used scaling units
Remember last used scaling units
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: User Interface
git master
Other All
: Normal minor
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2006-09-24 09:08 UTC by gg
Modified: 2006-10-14 16:53 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description gg 2006-09-24 09:08:13 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.
Comment 1 gg 2006-09-24 15:05:12 UTC
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?
Comment 2 Sven Neumann 2006-09-27 12:25:33 UTC
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.
Comment 3 gg 2006-09-27 23:59:15 UTC
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.

Comment 4 Sven Neumann 2006-09-28 07:09:57 UTC
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.
Comment 5 Sven Neumann 2006-10-05 14:55:53 UTC
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.
Comment 6 Michael Natterer 2006-10-14 16:53:33 UTC
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