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 382683 - Include file associations settings in the GIMP's Preferences
Include file associations settings in the GIMP's Preferences
Status: RESOLVED OBSOLETE
Product: GIMP
Classification: Other
Component: User Interface
git master
Other Windows
: Normal enhancement
: ---
Assigned To: GIMP Bugs
GIMP Bugs
: 609139 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-12-05 18:17 UTC by Jernej Simončič
Modified: 2018-05-24 12:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Example of file associations settings in Corel PhotoPaint (9.51 KB, image/png)
2006-12-05 18:19 UTC, Jernej Simončič
Details

Description Jernej Simončič 2006-12-05 18:17:01 UTC
Currently, the only way to create file associations with the GIMP on Windows is through the installer. While it's not so unusual to create file associations there, users sometimes want to manipulate them after the program is installed, and for this, most Windows programs offer file associations settings somwhere in their preferences.

The user interface for this should be pretty straightforward - checkboxed list of file extensions and their descriptions that GIMP's plug-ins support, along with a button to automatically select file extensions not claimed by other applications. I propose that these settings wouldn't be saved in gimprc at all (or at least not used if they were saved there), but that the checkboxes would always be filled straight from the Windows registry, since that's where the file associations are stored.

The file associations in Windows registry consist of 2 parts:
- application identifier, stored in HKEY_CLASSES_ROOT\<identification string>,
  which has the following subkeys:
  - (default value): text seen in file managers as file type description
  - DefaultIcon\(default value): path to an icon used to represent the file
  - shell\open\command\(default value): program to run when user double-clicks
    a file
- file extension association itself, stored in HKEY_CLASSES_ROOT\.<extension>,
  where the default value is set to <identification string> from the application

Typically, <identification string> contains the program name and version, and usually a file extension (you can have a single identifier for multipe file types, although more commonly, each extension [or group of extensions] gets it's own idenfitier; this also allows different file types to have different icons). For example, to associate PNG files with the GIMP, at minimum, the following registry entries would have to be created:

HKEY_LOCAL_MACHINE\.png\
    (default) = gimp-2.3.png
HKEY_LOCAL_MACHINE\gimp-2.3.png\
    (default) = Portable Network Graphic
HKEY_LOCAL_MACHINE\gimp-2.3.png\DefaultIcon
    (default) = c:\path\to\gimp-2.3.exe,1
HKEY_LOCAL_MACHINE\gimp-2.3.png\shell\open\command\
    (deafult) = "c:\path\to\gimp-2.3.exe" "%1"

(default) refers to the default value for the key, not string "(default)". ",1" in the DefaultIcon refers to the 2nd icon in gimp-2.3.exe.
Comment 1 Jernej Simončič 2006-12-05 18:19:14 UTC
Created attachment 77743 [details]
Example of file associations settings in Corel PhotoPaint
Comment 2 Tor Lillqvist 2006-12-06 04:49:43 UTC
it would probably be a good idea to also save the previous associations (also in the Registry? is there some convention for this?), and have a button to restore them.
Comment 3 Michael Schumacher 2010-02-06 10:22:32 UTC
*** Bug 609139 has been marked as a duplicate of this bug. ***
Comment 4 Max Mustermann 2012-08-29 19:50:15 UTC
There's a similar enhancement request filed as bug #567998. Perhaphs both reports are duplicates or can at least be handled together.
Comment 5 Michael Natterer 2012-08-30 07:28:16 UTC
No these bugs are different.
Comment 6 dfj1esp02 2013-07-05 07:35:15 UTC
Settings in HKEY_LOCAL_MACHINE are system-wide and require administrative privileges. Since windows 8 applications have no api for file associations: they are managed by the shell on user request. Typically an installer registers file associations the application can handle in a separate registry key specific for this application, when user asks to associate this application with a file type, the shell picks those associations and applies them for the current user.
http://www.7tutorials.com/how-associate-file-type-or-protocol-program
Comment 7 dfj1esp02 2014-02-11 08:50:47 UTC
Guideline from microsoft:
http://msdn.microsoft.com/en-us/library/windows/desktop/hh848047%28v=vs.85%29.aspx
Comment 8 GNOME Infrastructure Team 2018-05-24 12:05:35 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/224.