how to import/read data from one plugin to another?

Mark Doliner mark at kingant.net
Tue Mar 31 03:37:05 EDT 2009


Yes, just have the translation plugin read the preference value using
purple_prefs_get_string().  But it might be slightly more efficient to
connect to the pref and just keep a reference to it in memory.  That
way you can avoid having to look up the preference for every IM.  It's
a pretty minor difference though.

-Mark

On Mon, Mar 30, 2009 at 1:01 AM, arun kumar <arunkumar0107 at gmail.com> wrote:
> i dont want to call translation plugin as and when there is an update
> in lang_prefs plugin..i want to read the lan_prefs plugin when im
> translating a message......
>
> for ex.
> x's lang is eng and y's lang is french
>
> x has translation plugin in his pidgin. x  specifies in his lan_pref
> plugin that y' s lang is french
>
> now assume x wants to send a message to y
>
> x's translation plugin doesnot know to which lang should the x's
> message be  translated into
>
> it now reads the lan_pref plugin to find out that y's lang is french
>
> hence translates x's message into french and sends it
>
>
>
> tell me if  there is a way to do it please...
>
>
>
> cheers,
> arun
>
>
>
>
>
> On Mon, Mar 30, 2009 at 12:32 AM, Ka-Hing Cheung <khc at hxbc.us> wrote:
>> On Sun, 2009-03-29 at 23:48 -0700, Mark Doliner wrote:
>>> But I wonder, does it make sense for that to be two separate plugins?
>>> It seems like the translation plugin depends on the lan_pref plugin.
>>> And the lan_pref plugin doesn't seem very useful without the
>>> translation plugin.
>>
>> A language option makes sense even without translation though, such as
>> to enable better locale conversion on legacy protocols.
>>
>> -khc
>>
>>
>>
>




More information about the Devel mailing list