dgutov / bmreplace

Quickly replace an existing bookmark in Mozilla Firefox
https://addons.mozilla.org/en-US/firefox/addon/bmreplace/
MIT License
24 stars 3 forks source link

Toolbar button and multiple windows #15

Closed matthewgertner closed 11 years ago

matthewgertner commented 11 years ago

Currently when I moved a button from the toolbar to the palette in one window, it remains in the other windows? Is this by design? I'm working on similar functionality in my extension and my gut feeling was that removing/adding the button should apply to all windows.

dgutov commented 11 years ago

Is this by design?

Yep!

Try that with any other button, from the default set, or installed by a traditional extension. If our button behavior was different, it would be odd, wouldn't it?

matthewgertner commented 11 years ago

Yeah, I guess so. The behavior of the default set seems strange to me but I agree that it's correct to do the same. Anyway, it's a pleasure reading your code... very nicely organized with consistent method headers, etc. I'm implementing a toolbar button in my bootstrapped extension and it's really helpful. Thanks!

dgutov commented 11 years ago

You're welcome! To be fair, though, this extension is based on restartless restart (two of the includes are from there), so I shouldn't take all the credit.

matthewgertner commented 11 years ago

Ah cool, thanks for the pointer. The restartless stuff is unfortunately rather underdocumented still.

dgutov commented 11 years ago

Yeah, going restartless pretty much forces you to dig around.

Some further reading, if you haven't already:

matthewgertner commented 11 years ago

Yeah, Wladimir's blog is a great resource. We've had our restartless extension running for a while but I wasn't sure exactly how to handle the toolbar button. I should write a blog post about it. :-)