Skip to content

Add licensing acknowledgment dialog on startup and update About dialog#2169

Merged
rjhancock merged 3 commits intomainfrom
Implement-Licensing-Dialog
Apr 4, 2026
Merged

Add licensing acknowledgment dialog on startup and update About dialog#2169
rjhancock merged 3 commits intomainfrom
Implement-Licensing-Dialog

Conversation

@HammerGS
Copy link
Copy Markdown
Member

@HammerGS HammerGS commented Apr 4, 2026

Note: Depends on MegaMek PR (uses LicensingDialog from megamek) MegaMek/megamek#8164

Summary

Integrates the MegaMek Suite licensing dialog into MegaMekLab startup and updates the About dialog to use aligned legal text with clickable links.

Changes

  1. MegaMekLab.java - Added LicensingDialog.showIfNeeded() call in startup() after GUI scaling, showing "Welcome to
    MegaMekLab [VERSION]".
  2. MenuBar.java - Updated aboutAction() to use aligned legal text from MegaMek's LicensingDialog.* message keys via
    Messages.getString(), replacing outdated GPL-only text.

Files Changed

  • megameklab/src/megameklab/MegaMekLab.java
  • megameklab/src/megameklab/ui/MenuBar.java

Integrates the MegaMek Suite licensing dialog into MegaMekLab startup
and updates the About dialog to use aligned legal text with clickable
links, replacing outdated GPL-only text.

Depends on MegaMek PR (Implement-Licensing-Dialog branch).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@HammerGS HammerGS requested a review from a team as a code owner April 4, 2026 17:09
@HammerGS HammerGS added the AI Generated Code AI-generated fix. Requires human testing and review before merging. label Apr 4, 2026
Copilot AI review requested due to automatic review settings April 4, 2026 17:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Integrates MegaMek Suite’s licensing acknowledgment flow into MegaMekLab by showing the shared licensing dialog on startup and aligning MegaMekLab’s About dialog legal text with MegaMek’s message keys (including clickable links).

Changes:

  • Show LicensingDialog.showIfNeeded() during MegaMekLab startup with a “Welcome to MegaMekLab [VERSION]” message.
  • Update the About dialog to render HTML assembled from MegaMek’s LicensingDialog.* / CommonAboutDialog.* i18n keys and enable hyperlink navigation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
megameklab/src/megameklab/MegaMekLab.java Adds licensing/welcome dialog invocation during startup.
megameklab/src/megameklab/ui/MenuBar.java Reworks About dialog body to use MegaMek legal/community text keys and clickable links.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Guard LicensingDialog with !noStartup to prevent blocking batch/CLI runs
- Move dialog to after startup screen is visible so both appear together
- Use MMLConstants.PROJECT_NAME constant instead of hardcoded string
- Use UIUtil.browse() for platform-safe hyperlink handling in MenuBar
- Replace duplicate buildAboutHtml() with LicensingDialog.buildLegalHtml()

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@HammerGS
Copy link
Copy Markdown
Member Author

HammerGS commented Apr 4, 2026

Copilot feedback addressed in commit 65da303:

1. --no-startup guardLicensingDialog.showIfNeeded() is now guarded with if (!noStartup) so it won't pop a GUI dialog during batch .mul processing.

2. Dialog timing — Moved the dialog call to after the startup screen is displayed, so both appear together instead of the dialog blocking before the main window.

Additional fixes:

  • Uses MMLConstants.PROJECT_NAME constant instead of hardcoded string
  • Replaced Desktop.getDesktop().browse() with UIUtil.browse() in MenuBar for platform-safe hyperlink handling
  • Replaced duplicate buildAboutHtml() with shared LicensingDialog.buildLegalHtml() from the megamek PR

@rjhancock rjhancock merged commit 69be26c into main Apr 4, 2026
7 checks passed
@rjhancock rjhancock deleted the Implement-Licensing-Dialog branch April 4, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Generated Code AI-generated fix. Requires human testing and review before merging.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants