is there an event that I can set up a listener for when another tab is
activated? I have a folder listener set up that reacts to the active
folder being changed:
mailSession.AddFolderListener(qfFolderListener,
Components.interfaces.nsIFolderListener.all);
but this event is not thrown when the active tab changes (which can
result in the folder tree selection changing as well)
thanks
Axel
Hi,
I think you want this:
https://developer.mozilla.org/en/Code_snippets/Tabbed_browser#Detecting_tab_selection
Eric
Hi Eric,
I tried that but there seem to be no events in thunderbird? Is there a
folder change event that is triggered by activaing a tab with a
different folder? Also which DOM element is the tabbrowser in TB, do you
think getElementById('tabmail') is the correct one?
var qfTabListener = {
mailTabSelected: function(evt){
qfLocalErrorLogger('mailTabSelected');
try {
QuickFolders.Util.logToConsole('event ' + evt);
if(QuickFolders)
QuickFolders.Interface.onFolderSelected();
}
catch(e) {
qfLocalErrorLogger(
"Exception in Item event - calling mailTabSelected: "
+ e)};
}
}
addTabEventListener: function() {
if (((QuickFolders.Util.Appver() < 3) &&
(QuickFolders.Util.Application()=='Thunderbird')))
return;
try{
this.tabContainer = document.getElementById('tabmail');
// also tried: tabbrowser // .tabContainer; // tabmail-container
//other events tried: "TabClose", "TabOpen"
document.getElementById('tabmail')
.addEventListener("TabSelect",
qfTabListener.mailTabSelected, false);
}
catch (e) {
this.tabContainer = null;
}
}
}
PS: not much editing possible at the moment, I am having trouble with my
internet at the moment my provider (three Ireland) gives me no bandwidth
at all (secure pages alway time out). An I will likely need 10 tries(*)
... until I can send out this message!
see also :
http://www.youtube.com/watch?v=d62jQ22w360
(Hitler gets 3 broadband)
(*)well let's see, this is the second try ... pressing send again.
connection timed out, ok third try ... Sending of message failed
again, 4th time...
failed, timed out - okay restart my routed ... 30 secs later .. dial PPP
.. another 20 secs... lets send again, 5th time...
> Eric Jung wrote:
> > On Sat, Dec 19, 2009 at 9:35 AM, Axel Grude <axel....@gmaii.com>
> wrote:
> >
> >> Hi,
> >>
> >> is there an event that I can set up a listener for when another tab is
> >> activated? I have a folder listener set up that reacts to the active
> >> folder being changed:
> >>
> >> mailSession.AddFolderListener(qfFolderListener,
> >> Components.interfaces.nsIFolderListener.all);
> >>
> >> but this event is not thrown when the active tab changes (which can
> >> result in the folder tree selection changing as well)
> >>
> >>
> >>
> > Hi,
> >
> > I think you want this:
> >
> >
> https://developer.mozilla.org/en/Code_snippets/Tabbed_browser#Detecting_tab_selection
> >
> > Eric
>
> Hi Eric,
>
> I tried that but there seem to be no events in thunderbird? Is there a
> folder change event that is triggered by activaing a tab with a
> different folder?
Sorry I don't know TB events.
> Also which DOM element is the tabbrowser in TB, do you
> think getElementById('tabmail') is the correct one?
>
>
I think you want getElementById('mail:3pane'). If not, use DOM Inspector to
get the ID of the one you want.
see also :
http://www.youtube.com/watch?v=d62jQ22w360
(Hitler gets 3 broadband)
Nice video! :)
Eric
I got the tabmail id from the DOM inspector (and I am pretty sure it is
a tabbrowser) the question is is it possible to listen for ALL events to
see if I can fish out a suitable one?
Axel