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 63610 - Some plug-in settings should be persistent accross sessions
Some plug-in settings should be persistent accross sessions
Status: RESOLVED OBSOLETE
Product: GIMP
Classification: Other
Component: Plugins
1.x
Other All
: Normal enhancement
: Future
Assigned To: GIMP Bugs
GIMP Bugs
: 58869 61088 119032 119626 128084 134990 160565 324545 741476 (view as bug list)
Depends on: 470459
Blocks: 81015 101604 120829 734656
 
 
Reported: 2001-11-02 12:50 UTC by Raphaël Quinet
Modified: 2018-05-24 10:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
JPEG plug in new source code (proposal) : settings record (93.01 KB, patch)
2007-06-30 17:59 UTC, Etienne
none Details | Review
jpeg.c patch for record parameters (338 bytes, patch)
2007-07-02 00:57 UTC, Etienne
none Details | Review
jpeg-save.c patch for record parameters (11.91 KB, patch)
2007-07-02 00:57 UTC, Etienne
none Details | Review
jpeg.h patch for record parameters (1.80 KB, patch)
2007-07-02 00:58 UTC, Etienne
none Details | Review
Patch for jpeg tree, enabling record settings from session to session (14.09 KB, patch)
2007-07-02 12:33 UTC, Etienne
needs-work Details | Review
Patch to record settings of jpeg plugin from session to session (15.83 KB, patch)
2007-07-07 17:00 UTC, Etienne
none Details | Review
Patch to record settings of jpeg plugin from session to session (15.83 KB, patch)
2007-07-07 17:00 UTC, Etienne
needs-work Details | Review
Record session to session jpeg settings (16.17 KB, patch)
2007-07-08 12:42 UTC, Etienne
committed Details | Review

Description Raphaël Quinet 2001-11-02 12:50:05 UTC
It would be nice if there was a way to save some settings for the plug-ins
(especially the file_save plug-ins) so that they become the new defaults
for the next invocation of the plug-in.  Currently, these settings are
preserved during the current session, but they are lost when you exit and
restart the Gimp.

This should be optional because in most cases it is better to go back to
the hardcoded defaults whenever the Gimp starts.  But sometimes these
defaults are not optimal and it would be nice to have a way to change them.
For example, there could be a "Save Default Options" button in all plug-ins
that can be called interactively.
Comment 1 Raphaël Quinet 2001-11-02 12:52:31 UTC
*** Bug 58869 has been marked as a duplicate of this bug. ***
Comment 2 Raphaël Quinet 2001-11-05 08:24:36 UTC
*** Bug 61088 has been marked as a duplicate of this bug. ***
Comment 3 Raphaël Quinet 2001-11-05 08:43:35 UTC
Summary of the duplicates:
- bug #58869 (reported by Marcin Orlowski)
  Save the state of the "interlace" checkmark in the GIF save plug-in
- bug #61088 (reported by Jamie Zawinski)
  Save the default quality setting in the JPEG save plug-in (e.g, 85%)
Comment 4 Raphaël Quinet 2002-03-19 09:49:08 UTC
*** Bug 75398 has been marked as a duplicate of this bug. ***
Comment 5 Raphaël Quinet 2002-03-19 09:56:47 UTC
As described in bug #75398, the lack of global defaults for the
file_save plug-ins (except for the hardcoded ones that cannot be
modified by the user) can lead to some confusing situations in which
the user thinks that a file will be saved with the correct settings
but is instead saved with the (incorrect) default values.  Adding a
way to set some new global defaults would solve that problem.

A different issue related to the usability has been reported by Ed
Halley in bug #75328: allowing the user to set correct defaults would
make it easier to save a large number of files without having to check
all options in the dialogs for every file.
Comment 6 Jamie Zawinski 2003-04-08 09:12:56 UTC
This bug's almost two years old now -- any chance of ever being able
to set the default JPEG quality setting to something else?  Please?

Or, if that's too hard, how about just changing the default from 75%
to something that looks less crappy, like 85% or 88%?
Comment 7 Sven Neumann 2003-04-08 09:28:44 UTC
This would definitely not be changed in 1.2 but if you want that
feature for 1.4, you should try to come up with a patch. Otherwise,
most likely, nothing will change.
Comment 8 Alan Horkan 2003-07-23 18:40:06 UTC
Changes at the request of Dave Neary on the developer mailing list.  
I am changing many of the bugzilla reports that have not specified a target
milestone to Future milestone.  Hope that is acceptable.  
Comment 9 Dave Neary 2003-07-26 10:33:35 UTC
Bumping a bunch of enhancement requests which will not be done by the feature
freeze to Future. 

Dave.
Comment 10 Maurits Rijk 2003-08-04 07:14:28 UTC
*** Bug 119032 has been marked as a duplicate of this bug. ***
Comment 11 Raphaël Quinet 2003-08-11 12:32:49 UTC
*** Bug 119626 has been marked as a duplicate of this bug. ***
Comment 12 Raphaël Quinet 2003-11-28 08:18:04 UTC
*** Bug 128084 has been marked as a duplicate of this bug. ***
Comment 13 Raphaël Quinet 2003-11-28 08:28:50 UTC
*** Bug 119032 has been marked as a duplicate of this bug. ***
Comment 14 Raphaël Quinet 2003-11-28 09:53:54 UTC
Here are some additional comments about the confusing notions of
"defaults" and "current settings" for the File->Save plug-ins.  What
happens when a new image is created or loaded from disk has been the
subject of several controversial discussions, such as in bug #75398
and bug #119032.  I think that having a way to set the new defaults
explicitely as suggested here will make it clear that these
user-configurable defaults will be used for any new image, regardless
of what is done for other images in the current session.

The current model inherited from the early GIMP versions is hard to
understand for some users: there are several sets of parameters that
influence the way the images are saved:
- the hardcoded defaults (no way to configure them)
- the "current settings" for this session (based on the last save)
- the image-specific settings
The hardcoded defaults are used for any new images until you save the
first one.  Once you have saved at least one image, you have created a
set of "current settings" for this session and they will be used as
the new default values for new images, but not for the images that
have already been saved at least once.  Once an image has been saved,
it keeps its own values.

The new concept would be easier to understand because there would be
only two sets of parameters:
- the configurable defaults for new images
- the image-specific settings
The governing principle is that each image is independent of the
others: it starts with the default settings when it is created, and 
these become the image-specific settings from then on.  What happens
to the other images is irrelevant (for new or existing images).  The
user can configure the default settings at any time, and they will be
used for all new images from then on.

So the new model would replace the hardcoded defaults (persistent but
not configurable) and the current settings (not persistent accross
sessions) by a set of default settings that are both persistent and
configurable.  Also, the configuration would be explicit instead of
changing every time depending on what image was saved last.
Comment 15 Manish Singh 2004-01-07 00:26:15 UTC
I knew there was a bug on this.. bugzilla has the most useless search
feature ever.

2004-01-06  Manish Singh  <yosh@gimp.org>
 
        * plug-ins/common/png.c: Implemented default settings, for both
        the UI and the PDB. Settings are stored in gimprc, but right now
        saving is broken since gimp_gimprc_set is broken right now.
 
        There are 3 new PDB entry points: file_png_save_defaults, which is
        a save function that only takes drawable and filename info, and
        uses the stored gimprc settings for the rest of the parameters.
        This is hooked up to the save magic, so using gimp_file_save to
        save as png now won't make big files anymore. The other two are
        file_png_get_defaults and file_png_set_defaults, which query
        and set the gimprc setting respectively.
 
        I also did some cleanup, and added a comment boolean to the
        file_png_save2 interface. The string serialization to the gimprc
        is sort of dumb, but it works.
 
        Next step is to do similar for jpeg and gif.
Comment 16 Manish Singh 2004-01-07 00:31:03 UTC
Also, Sven changed it to store as an app parasite, instead of the gimprc.

So currently, if there are session defaults, they are loaded in
preference to the persistant default. What do people think, is that
behavior right? Should parasite defaults be given a preference instead?
Comment 17 Manish Singh 2004-01-07 00:33:10 UTC
Also, thoughts on the UI? It looks a little cluttered, and there isn't
a GUI way to clear the defaults to hardcoded ones (dunno how useful
that is).
Comment 18 Raphaël Quinet 2004-01-07 09:15:37 UTC
Since you asked for opinions...  I like a part of these changes, but
not the session settings.  I think that having any session-specific
settings is wrong and confusing for the user.  You can re-read my last
comment (2003-11-28) and especially the last part of it for details,
but basically I think that session settings may lead to unwanted results
if what you do to one image influences the other images, sometimes
without your knowledge (i.e., you create an image, save it and expect
your usual defaults to be applied, but instead the image is saved with
some values depending on what was done in another image of the same file
format).  To avoid that, there should be only two kinds of settings: the
defaults, requiring _explicit_ configuration, and the current settings
for each image (without cross-image pollution).
Comment 19 weskaggs 2004-12-11 23:32:47 UTC
*** Bug 160565 has been marked as a duplicate of this bug. ***
Comment 20 Sven Neumann 2005-04-29 16:50:16 UTC
*** Bug 134990 has been marked as a duplicate of this bug. ***
Comment 21 Sven Neumann 2005-07-26 14:37:35 UTC
We've added a lot of the framework that is needed to make this happen. Sadly
though, noone seems to be willing to implement the missing parts...
Comment 22 weskaggs 2005-07-26 15:36:20 UTC
Re comment #21, my recollection is that the next step requires making some
changes in the pdb, but I was never able to get a clear understanding of what
you and mitch had in mind.
Comment 23 Sven Neumann 2005-07-27 10:05:48 UTC
Of course named parameters in the PDB would make this task a lot easier but I
don't think that any PDB changes are absolutely needed at this point.
Comment 24 weskaggs 2005-07-27 15:33:25 UTC
What is the next missing part that is absolutely needed, then?
Comment 25 Sven Neumann 2005-07-27 23:29:40 UTC
There is none. Someone just needs to propose a reasonable solution and implement it.
Comment 26 tooar 2005-09-01 09:28:02 UTC
I just want to comment, that I'd also appreciate if this bug would finally be
fixed. It was filed in 2001! So what is keeping gimp from saving my preference:
I want all TIFF files to be saved using LWZ and not JPEG?
Comment 27 Michael Schumacher 2005-09-01 18:44:54 UTC
This is the wrong attitude - some would even say it is rude behaviour. If you
want it faster, consider contributing.
Comment 28 Sven Neumann 2005-12-20 09:53:12 UTC
*** Bug 324545 has been marked as a duplicate of this bug. ***
Comment 29 Etienne 2007-06-30 17:59:34 UTC
Created attachment 90937 [details] [review]
JPEG plug in new source code (proposal) : settings record
Comment 30 Etienne 2007-06-30 18:04:10 UTC
Ok, I added two buttons to the JPEG plug in as in the PNG plug in. It is now possible to record everything (from quality to text comment).
It is possible that the EXIF is bugged, but I am not sure. This patch has to be tested a little bit more.

I also detected a bug in the previous version, that crashes the plug in (check "use restart markers" and then check "preview"->crash
I resolved this problem.

See attached code for the new JPEG plug in code.
Comment 31 Etienne 2007-06-30 22:26:38 UTC
(In reply to comment #30)
> Ok, I added two buttons to the JPEG plug in as in the PNG plug in. It is now
> possible to record everything (from quality to text comment).
> It is possible that the EXIF is bugged, but I am not sure. This patch has to be
> tested a little bit more.
> 
> I also detected a bug in the previous version, that crashes the plug in (check
> "use restart markers" and then check "preview"->crash
> I resolved this problem.
> 
> See attached code for the new JPEG plug in code.
> 

Please forgive me... this is the first time I am participating as dev' to an open source project...
The attached file is not a patch, it is my code, from an old jpeg plugin version. I will do a *real* patch in a day or two with the latest source code of jpeg plugin

Thks !!
Comment 32 Etienne 2007-07-02 00:50:52 UTC
Ok, I finally reimport all my stuff and adapt my elder code to the new one downloaded from SVN server.
It works, I just don't save comment to the picture because I don't think this is a great behaviour, but I can add it if it seems right.

I propose my three patches, three files I modified. Try it and give me feedback.
Comment 33 Etienne 2007-07-02 00:57:37 UTC
Created attachment 90997 [details] [review]
jpeg.c patch for record parameters
Comment 34 Etienne 2007-07-02 00:57:58 UTC
Created attachment 90998 [details] [review]
jpeg-save.c patch for record parameters
Comment 35 Etienne 2007-07-02 00:58:14 UTC
Created attachment 90999 [details] [review]
jpeg.h patch for record parameters
Comment 36 gg 2007-07-02 06:33:44 UTC
thanks , I'll try to test this later but I'm a bit busy.

Do you realise that you can create a single patch that covers all differences ? You don't need to do post 3 patches. Just run diff on the whole tree not each file.

This makes it a lot easier for others to use and means the change is self contained. Probably best if you submit a unified patch that does all three.

HTH 
Comment 37 Etienne 2007-07-02 12:33:56 UTC
Created attachment 91028 [details] [review]
Patch for jpeg tree, enabling record settings from session to session
Comment 38 Etienne 2007-07-02 12:35:13 UTC
Ok, I uploaded a patch for the whole jpeg plugin tree... I'm sorry, I did not know this was possible, this is not described in the page http://developer.gnome.org/tools/svn.html

Thanks !
Comment 39 Sven Neumann 2007-07-04 06:38:26 UTC
You must not use C++ style comments in GIMP code. Your patch also looks like you used Tabs where you should have used spaces. Could you correct these issues?
Comment 40 Sven Neumann 2007-07-04 12:57:32 UTC
And please move the JpegSaveGui struct as well as the RESPONSE defines to jpeg-save.c.
Comment 41 Michael Natterer 2007-07-04 18:01:53 UTC
Actually, the buttons should not be in the action area at all and need
no response ID. Please look at the PNG save dialog in recent 2.3
versions, the buttons in the JPEG save dialog should look exactly the
same.
Comment 42 Etienne 2007-07-05 17:29:03 UTC
I will change my code to reflect your comments this week end, I hope it will fit your specifications.
Comment 43 Etienne 2007-07-07 17:00:44 UTC
Created attachment 91365 [details] [review]
Patch to record settings of jpeg plugin from session to session
Comment 44 Etienne 2007-07-07 17:00:50 UTC
Created attachment 91366 [details] [review]
Patch to record settings of jpeg plugin from session to session
Comment 45 Etienne 2007-07-07 17:01:22 UTC
I finally managed to recode some stuff :
 - change the look of buttons to map the png plugin style
 - removed all tabs changed to space
 - replaced c++ comment to c style

I did not move the JpegSaveGui struct to jpeg-save.c because this struct is needed to define the function load_gui_defaults
Hope it will fit your recommendations.
Comment 46 Sven Neumann 2007-07-08 10:00:51 UTC
The function prototypes also belong into jpeg-save.c. Please move the struct definition and the prototypes for static functions to the C file.
Comment 47 Etienne 2007-07-08 12:42:36 UTC
Created attachment 91429 [details] [review]
Record session to session jpeg settings

Ok, I changed the function definitions to the .c
Comment 48 Sven Neumann 2007-07-08 13:34:55 UTC
Thanks for your contribution. I have applied the patch with some minor coding style modifications.

2007-07-08  Sven Neumann  <sven@gimp.org>

	* plug-ins/jpeg/jpeg.c
	* plug-ins/jpeg/jpeg-save.[ch]: applied patch from Etienne which
	adds configurable default parameters similar to the PNG save plug-in.
	Addresses bug #63610.
Comment 49 tobias 2007-07-08 14:11:48 UTC
What is missing to close this Bugreport? 

As far as I can see these two points are mention in the comments:
- Save the settings in the TIFF save plug-in 
- Save the settings in the GIF save plug-in 

What other plug-ins are important?
Comment 50 Sven Neumann 2007-07-08 17:59:37 UTC
The approach taken for the PNG and JPEG plug-ins is wrong and we should not take it any further. It's only a temporary solution until plug-in settings are implemented in a generic way so that they can be used in all plug-ins. That's what this bug report is about. The JPEG patches shouldn't have been attached here. But since they were, we handled them here.
Comment 51 Etienne 2007-07-08 19:50:44 UTC
(In reply to comment #50)
> The approach taken for the PNG and JPEG plug-ins is wrong and we should not
> take it any further. It's only a temporary solution until plug-in settings are
> implemented in a generic way so that they can be used in all plug-ins. That's
> what this bug report is about. The JPEG patches shouldn't have been attached
> here. But since they were, we handled them here.
> 

What kind of solution do you expect ? I don't really know how all The Gimp is working, do you have some ideas of a generic implementation for settings being saved from session to session ?
Comment 52 Sven Neumann 2007-07-08 20:16:10 UTC
After the 2.4 release I will probably find some time to open a new bug report with more details. That bug report can then replace this one.
Comment 53 Michael Schumacher 2014-12-13 17:03:16 UTC
*** Bug 741476 has been marked as a duplicate of this bug. ***
Comment 54 GNOME Infrastructure Team 2018-05-24 10:35:52 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/11.