--
You received this message because you are subscribed to the Google Groups "mozilla-labs-jetpack" group.
To post to this group, send email to mozilla-la...@googlegroups.com.
To unsubscribe from this group, send email to mozilla-labs-jet...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mozilla-labs-jetpack?hl=en.
--
You received this message because you are subscribed to the Google Groups "mozilla-labs-jetpack" group.
To post to this group, send email to mozilla-la...@googlegroups.com.
To unsubscribe from this group, send email to mozilla-labs-jet...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mozilla-labs-jetpack?hl=en.
One problem left. If I remove my button with the customize dialog, after a restart the button is there again. Your code had an unload function (require('unload+')) which I had to remove -it doesn't worked. Do you have other ideas to not attach the button when removed by user?
I can write a lock-mechanisme, but than I must know when the buttons is removed. Register a DomChange/OnChange listener to the nav-bar? Any better idea?
On Fri, Jun 24, 2011 at 17:46, Tobias Redmann <tobias....@googlemail.com> wrote:
One problem left. If I remove my button with the customize dialog, after a restart the button is there again. Your code had an unload function (require('unload+')) which I had to remove -it doesn't worked. Do you have other ideas to not attach the button when removed by user?
..
this is probably because it's being inserted into the toolbarID that you provided again.. maybe providing a moveTo method that would only be called by the addon during install/first run (and could be used at other times) would be better..
exports.main = function(options) {
// create toolbarbutton
var tbb = require("toolbarbutton").ToolbarButton({
id: "TBB-TEST",
label: "TBB TEST",
//image: "",
onCommand: function () {
tbb.destroy();
}
});
if (options.loadReason == "install") {
tbb.moveTo({
toolbarID: "nav-bar",
forceMove: false // don't move if button is already in the window
});
}
};
I recently talked to someone who has used your toolbar button and
noted that the button does not show up right away. Is there some trick
you know of to have xul elements show up directly after install?
cheers, Jeff
- Do you know how can we add a badge to the toolbarbutton, the same
way Firebug or Chrome extension do?
- How can we change the image of the toolbarbutton after it has been created?
Any pointers would be great :)
Hernán
--
You received this message because you are subscribed to the Google Groups "mozilla-labs-jetpack" group.
To post to this group, send email to mozilla-la...@googlegroups.com.
To unsubscribe from this group, send email to mozilla-labs-jet...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mozilla-labs-jetpack?hl=en.
I've seen it implemented using a css overlay, setting a :after
pseudo-element after the button itself. I tried that, but didn't make
much progress, I'm at a loss trying to add CSS rules by javascript in
XUL files.
> I haven't yet added the ability to change a tbb's properties, but I just
> made a issue for that too.
Great, I'm going to watch those issues, and try to help getting them fixed :)
Hernán
On Sat, Sep 17, 2011 at 20:22, Erik Vold <erik...@gmail.com> wrote:I've seen it implemented using a css overlay, setting a :after
> Hey Hernán,
> I've got a issue open for badges, so far I've only seen xbl used to
> implement this, so I'll either need to find a way to use xbl within a jp
> module (which should be possible right?) or work around the xbl somehow..
pseudo-element after the button itself. I tried that, but didn't make
much progress, I'm at a loss trying to add CSS rules by javascript in
XUL files.
@-moz-document url-prefix('chrome://url') {
/* css here */
}
Thanks for the suggestion erik, that did the trick :)
Hernán
If you want to follow my suggestion, if it's your first time at
developing any firefox addon, try starting out with the default
modules in the SDK. Leave trying out 3rd arty modules like Erik's
toolbarbutton for later, as it sometimes require a bit of
addon-kung-fu to get them working as expected.
If you want something like a toolbarbutton try using the widget API
and then customize it (context click on the widget -> customize) and
move it to wherever you want.
Hernán
--
You received this message because you are subscribed to the Google Groups "mozilla-labs-jetpack" group.
To post to this group, send email to mozilla-la...@googlegroups.com.
To unsubscribe from this group, send email to mozilla-labs-jet...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mozilla-labs-jetpack?hl=en.
FYI, I pinged Daniel about that bug in #flightdeck on IRC, it should get
re-looked-at soon.