Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Custom Filters
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Onno Ekker  
View profile  
 More options Jun 28 2012, 8:50 am
Newsgroups: mozilla.dev.apps.thunderbird
From: Onno Ekker <o.e.ek...@gmail.com>
Date: Thu, 28 Jun 2012 14:50:44 +0200
Local: Thurs, Jun 28 2012 8:50 am
Subject: Custom Filters
Hi,

I'm trying to add Custom Filters to my extension, but I run into
problems. I want the Filters to be only available for Inbox/mail and
thought I could use the isValidForType function for that.

>From what I understand the type should be set to any value defined in

nsMsgFilterCore.idl, but I only get the value 0 for both filters on a
mail folder as for filters on a news account.

I also notice that when I go to the Message Filters definition that the
function isValidForType is called twice. I don't understand why this is
happening.

isValidForType has scope as its second parameter, but I cannot find any
documentation on that either...

Can someone please help me with the problems mentioned above me in
adding custom filters to my extension?

Onno


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Onno Ekker  
View profile  
 More options Jun 28 2012, 1:46 pm
Newsgroups: mozilla.dev.apps.thunderbird
From: Onno Ekker <o.e.ek...@gmail.com>
Date: Thu, 28 Jun 2012 19:46:36 +0200
Local: Thurs, Jun 28 2012 1:46 pm
Subject: Re: Custom Filters
Op 28-6-2012 14:50 schreef Onno Ekker het volgende:

I found the scope is defined in nsMsgSearchCore.idl and it looks like
this can be used too to determine if it's a news filter.

I still would like to know why type is always zero and why
isValidForType is called twice.

Onno


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kent James  
View profile  
 More options Jul 2 2012, 10:30 am
Newsgroups: mozilla.dev.apps.thunderbird
From: Kent James <k...@caspia.com>
Date: Mon, 02 Jul 2012 07:30:50 -0700
Local: Mon, Jul 2 2012 10:30 am
Subject: Re: Custom Filters
On 6/28/2012 10:46 AM, Onno Ekker wrote:

> I still would like to know why type is always zero and why
> isValidForType is called twice.

The custom filter code was added to the core Thunderbird by me many
years ago, and I am probably its biggest user in my FiltaQuilla extension.

But I don't really know the answer to your questions. I spent a couple
of minutes searching through the raw code using
http://mxr.mozilla.org/comm-aurora/, but that did not provide any
obvious answers to your questions. I doubt if anyone can answer your
questions short of instrumenting and debugging in the core code.

I can tell you that type comes from a global set in the filter editor.

rkent


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Onno Ekker  
View profile  
 More options Jul 2 2012, 2:13 pm
Newsgroups: mozilla.dev.apps.thunderbird
From: Onno Ekker <o.e.ek...@gmail.com>
Date: Mon, 02 Jul 2012 20:13:23 +0200
Local: Mon, Jul 2 2012 2:13 pm
Subject: Re: Custom Filters
On 7/2/2012 16:30, Kent James wrote:

Hi Kent,

Thanks for your answer. I think the isValidForType function being called
twice might have been my mistake. I don't see it anymore in the latest
version of my extension.

When toying around some more I found out that type is set depending on
when the filters are applied. I haven't found any real logic in the
returned values yet though :-)

Onno


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »