Skip to content

Add "Configure" option to image converter context menu submenu#22

Merged
pg94au merged 4 commits into
mainfrom
copilot/add-context-menu-option
Mar 6, 2026
Merged

Add "Configure" option to image converter context menu submenu#22
pg94au merged 4 commits into
mainfrom
copilot/add-context-menu-option

Conversation

Copilot AI commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

Adds a localized "Configure" menu item to the Convertster shell extension submenu, separated from the JPG/PNG conversion options by a divider. Selecting it launches Configure.exe from the install directory.

Changes

  • resource.h — New string ID IDS_CONFIGURE (204)
  • common.h — Fallback hardcoded constant L_Configure
  • FileContextMenuExt.hIDM_CONFIGURE = 2 enum value, m_configureTextBuf member, OnConfigure() declaration
  • FileContextMenuExt.cpp
    • QueryContextMenu: appends MF_SEPARATOR then the Configure item after JPG/PNG entries; largestId is now always IDM_CONFIGURE
    • OnConfigure: reads the InstallPath registry value to locate Configure.exe, validates existence, launches via CreateProcessW
    • RunConverterCommand: updated to read InstallPath and append ImageConverter.exe, consistent with how OnConfigure resolves its path
    • InvokeCommand: dispatches IDM_CONFIGURE to OnConfigure
  • ConvertsterContextMenuHandler.rcIDS_CONFIGURE added to all five language string tables:
Language String
English Configure
French Configurer
Spanish Configurar
German Konfigurieren
Italian Configura
  • Installer/Installer.iss — Replaced the ExecutablePath registry value with a single InstallPath value (set to {app}). Both ImageConverter.exe and Configure.exe are located at runtime by appending their filename to this path.
Original prompt

This section details on the original issue you should resolve

<issue_title>Add context menu option to configure settings</issue_title>
<issue_description>It should be possible to open the Configure application from a context menu option that comes below the JPG and PNG options. A spacer line separating Configure would be nice. This should of course also be localized.</issue_description>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI changed the title [WIP] Add context menu option to configure settings Add "Configure" option to image converter context menu submenu Mar 4, 2026
exePath.resize(wcslen(exePath.c_str()));
RegCloseKey(hKey);

// Replace the ImageConverter.exe filename with Configure.exe in the same directory.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it make more sense to have the folder name stored in the registry by the installer, and then just append either ImageConverter.exe or Configure.exe to that as needed, than to do a string replacement like this? Or possibly have two registry entries, one for each full executable path?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Wouldn't it make more sense to have the folder name stored in the registry by the installer, and then just append either ImageConverter.exe or Configure.exe to that as needed, than to do a string replacement like this? Or possibly have two registry entries, one for each full executable path? Can you make whichever change ends up being simpler?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Went with storing the install folder in the registry — added an InstallPath value (set to {app} by the installer) so OnConfigure can directly append Configure.exe without any string manipulation. Commit 697680c.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot ExecutablePath is still there in there in the registry, now that InstallPath is there. What do you think about just leveraging that one value and executing the converter application by building the full path in the same way that it is being done with configuration?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in commit 3c72134. ExecutablePath has been removed from the registry — both RunConverterCommand and OnConfigure now read InstallPath and append the respective filename (ImageConverter.exe / Configure.exe).

@pg94au pg94au marked this pull request as ready for review March 4, 2026 23:11
@pg94au pg94au merged commit abdffaa into main Mar 6, 2026
1 check passed
@pg94au pg94au deleted the copilot/add-context-menu-option branch March 6, 2026 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add context menu option to configure settings

2 participants