Newly installed scripts' icons don't show #1535

Closed
arantius opened this Issue Apr 11, 2012 · 4 comments

Comments

Projects
None yet
2 participants
@arantius
Collaborator

arantius commented Apr 11, 2012

The script.icon.fileURL is using the wrong path.

@niknah

This comment has been minimized.

Show comment
Hide comment
@niknah

niknah Apr 22, 2012

In RemoteScript.prototype.install

If you move this line to the end of the function...

GM_config.install(this.script, aOldScript);

Then the icon appears on install. Looks like script._basedir has not been set when the icon is initialized.

niknah commented Apr 22, 2012

In RemoteScript.prototype.install

If you move this line to the end of the function...

GM_config.install(this.script, aOldScript);

Then the icon appears on install. Looks like script._basedir has not been set when the icon is initialized.

@arantius

This comment has been minimized.

Show comment
Hide comment
@arantius

arantius Apr 23, 2012

Collaborator

So, this was originally at the bottom, but moved up intentionally: 3caceb2. Finding the underlying cause will make the fix (taking that issue into account as well) easier, though. Thanks.

Collaborator

arantius commented Apr 23, 2012

So, this was originally at the bottom, but moved up intentionally: 3caceb2. Finding the underlying cause will make the fix (taking that issue into account as well) easier, though. Thanks.

@niknah

This comment has been minimized.

Show comment
Hide comment
@niknah

niknah Apr 23, 2012

GM_config.install causes it to read the icon's filename which reads script._basedir,
But that is null cause the script hasn't been moved to it's directory.

niknah commented Apr 23, 2012

GM_config.install causes it to read the icon's filename which reads script._basedir,
But that is null cause the script hasn't been moved to it's directory.

@arantius

This comment has been minimized.

Show comment
Hide comment
@arantius

arantius Apr 23, 2012

Collaborator

GM_config.install causes it to read the icon's filename

Yes, indirectly, via the ._changed(...) observer/callback that the addons manager registers. So this only happens while the AOM is open, and sees the callback immediately, before RemoteScript.install() finishes setting the value correctly.

Collaborator

arantius commented Apr 23, 2012

GM_config.install causes it to read the icon's filename

Yes, indirectly, via the ._changed(...) observer/callback that the addons manager registers. So this only happens while the AOM is open, and sees the callback immediately, before RemoteScript.install() finishes setting the value correctly.

@arantius arantius closed this in 638c2af Apr 23, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment