[Pidgin] #7687: Perl Purple::Prefs::add_string_list drops the last item when initializing
Pidgin
trac at pidgin.im
Wed Dec 3 11:39:14 EST 2008
#7687: Perl Purple::Prefs::add_string_list drops the last item when initializing
---------------------+------------------------------------------------------
Reporter: samwyse | Owner:
Type: defect | Status: new
Milestone: | Component: plugins
Version: 2.5.2 | Resolution:
Keywords: |
---------------------+------------------------------------------------------
Description changed by samwyse:
Old description:
> I added this code to the plugin_load routine of the Perl example plugin:
> {{{
> Purple::Prefs::add_string_list(
> "/plugins/core/perl_test/my_stringlist",
> [qw/ one two three four five /]);
> }}}
> After restarting Pidgin and enabling the plugin, I looked in the
> prefs.xml file and found this:
> {{{
> <pref name='perl_test'>
> <pref name='my_stringlist' type='stringlist'>
> <item value='one'/>
> <item value='two'/>
> <item value='three'/>
> <item value='four'/>
> </pref>
> </pref>
> }}}
> This happens consistently with lists of various lengths. Lists of zero
> or one items create the same empty list in the XML file.
New description:
I added this code to the plugin_load routine of the Perl example plugin:
{{{
Purple::Prefs::add_string_list(
"/plugins/core/perl_test/my_stringlist",
[qw/ one two three four five /]);
}}}
After restarting Pidgin and enabling the plugin, I looked in the prefs.xml
file and found this:
{{{
<pref name='perl_test'>
<pref name='my_stringlist' type='stringlist'>
<item value='one'/>
<item value='two'/>
<item value='three'/>
<item value='four'/>
</pref>
</pref>
}}}
This happens consistently with lists of various lengths. Lists of zero or
one items create an empty list in the XML file.
--
--
Ticket URL: <http://developer.pidgin.im/ticket/7687#comment:1>
Pidgin <http://pidgin.im>
Pidgin
More information about the Tracker
mailing list