GNOME Bugzilla – Bug 382683
Include file associations settings in the GIMP's Preferences
Last modified: 2018-05-24 12:05:35 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.
Created attachment 77743 [details] Example of file associations settings in Corel PhotoPaint
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.
*** Bug 609139 has been marked as a duplicate of this bug. ***
There's a similar enhancement request filed as bug #567998. Perhaphs both reports are duplicates or can at least be handled together.
No these bugs are different.
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
Guideline from microsoft: http://msdn.microsoft.com/en-us/library/windows/desktop/hh848047%28v=vs.85%29.aspx
-- 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.