mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-06 03:39:51 +00:00
Remove "Enter license" menu item when DRM feature is not enabled
This commit is contained in:
parent
3db8267270
commit
22de483fc7
@ -1024,8 +1024,8 @@
|
||||
<param name="type" value="url" />
|
||||
<param name="path" value="http://twitter.com/aseprite" />
|
||||
</item>
|
||||
<separator />
|
||||
<item command="EnterLicense" text="@.help_enter_license" group="help_enter_license" />
|
||||
<separator id="enter_license_separator" />
|
||||
<item command="EnterLicense" id="enter_license" text="@.help_enter_license" group="help_enter_license" />
|
||||
<separator />
|
||||
<item command="About" text="@.help_about" group="help_about" />
|
||||
</menu>
|
||||
|
@ -393,6 +393,20 @@ void AppMenus::reload()
|
||||
#endif
|
||||
}
|
||||
|
||||
// Remove the "Enter license" menu item when DRM is not enabled.
|
||||
#ifndef ENABLE_DRM
|
||||
if (auto helpMenuItem = m_rootMenu->findItemById("help_menu")) {
|
||||
if (Menu* helpMenu = dynamic_cast<MenuItem*>(helpMenuItem)->getSubmenu()) {
|
||||
delete helpMenu->findChild("enter_license_separator");
|
||||
delete helpMenu->findChild("enter_license");
|
||||
}
|
||||
|
||||
auto it = m_groups.find("help_enter_license");
|
||||
if (it != m_groups.end())
|
||||
m_groups.erase(it);
|
||||
}
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////
|
||||
// Re-add menu items in groups (recent files & scripts)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user