Addon window name

To discuss development of addons / skins / customization of MediaMonkey.

Moderators: jiri, drakinite, Addon Administrators

gexptwo
Posts: 7
Joined: Sun Sep 11, 2022 1:00 pm

Addon window name

Post by gexptwo »

I'm creating a display Addon. I'm a not seeing the name of the window displayed when it opens.
I've referenced the Case Checker addon that comes with MM, so my actions_add.js does

Code: Select all

var dlg = uitools.openDialog('myaddon', {
When I start Case Checker, it opens a window, the upper left, it indicates "Case Checker" as the name/title of the window. When I start my addon, I do not see my addon name, it's blank. Looking through Case Checker, the only place I see the text "Case Checker" is the action_add.js _title() call. I'm doing the same thing but do not understand why mine is not shown.

Code: Select all

actions.myNewAction = {
    title: _('MyAddonName') + '...',
    hotkeyAble: false,
    category: actionCategories.tools,
    execute: function () {
        var dlg = uitools.openDialog('display', {
            show: true,
            modal: false,
            title: _('MyAddonName'),
        });
    }
}
Any suggestions?
drakinite
Posts: 965
Joined: Tue May 12, 2020 10:06 am
Contact:

Re: Addon window name

Post by drakinite »

Add this.title = 'myAddonName' to your dialog script's init function.

In dlgCaseChecker.js, it's using the title param as you discovered. It passes 'Case Checker' to params.title and sets it on line 231.

Another example: https://github.com/ventismedia/mediamon ... Control.js
Image
Student electrical-computer engineer, web programmer, part-time MediaMonkey developer, full-time MediaMonkey enthusiast
I uploaded many addons to MM's addon page, but not all of those were created by me. "By drakinite, Submitted by drakinite" means I made it on my own time. "By Ventis Media, Inc., Submitted by drakinite" means it may have been made by me or another MediaMonkey developer, so instead of crediting/thanking me, please thank the team. You can still ask me for support on any of our addons.
gexptwo
Posts: 7
Joined: Sun Sep 11, 2022 1:00 pm

Re: Addon window name

Post by gexptwo »

I see both this.title and function init options working, thanks!!
Post Reply