[Pidgin] #10641: perl add_choice adds same choices within a loop

Pidgin trac at pidgin.im
Mon Apr 26 20:14:17 EDT 2010


#10641: perl add_choice adds same choices within a loop
--------------------+-------------------------------------------------------
 Reporter:  rlazur  |        Owner:  deryni 
     Type:  defect  |       Status:  new    
Milestone:          |    Component:  plugins
  Version:  2.6.3   |   Resolution:         
 Keywords:  perl    |  
--------------------+-------------------------------------------------------

Comment(by FreeElla):

 I added the following debug line at libpurple/pluginpref.c:

 {{{

 249: void
 250: purple_plugin_pref_add_choice(PurplePluginPref *pref, const char
 *label, gpointer choice)
 251: {
 252:    g_return_if_fail(pref  != NULL);
 253:    g_return_if_fail(label != NULL);
 254:    g_return_if_fail(choice || purple_prefs_get_type(pref->name) ==
 PURPLE_PREF_INT);
 255:  /* DEBUG: Kai */ printf(" Kai -- ADD_CHOICE:
 '%s'='%s'",label,choice);
 256:    pref->choices = g_list_append(pref->choices, (gpointer)label);
 257:    pref->choices = g_list_append(pref->choices, choice);
 258: }

 }}}

 The resulting debug output together with my test plug-in is:

 {{{

 Kai -- ADD_CHOICE: 'test_a (0)'='test_a:PROTO:0'(02:15:48) mytest:
 prefs_info_cb() LOOP - test_a (0) -- test_a:PROTO:0
  Kai -- ADD_CHOICE: 'test_b (1)'='test_b:PROTO:1'(02:15:48) mytest:
 prefs_info_cb() LOOP - test_b (1) -- test_b:PROTO:1
  Kai -- ADD_CHOICE: 'test_c (2)'='test_c:PROTO:2'(02:15:48) mytest:
 prefs_info_cb() LOOP - test_c (2) -- test_c:PROTO:2
  Kai -- ADD_CHOICE: 'test_d (3)'='test_d:PROTO:3'(02:15:48) mytest:
 prefs_info_cb() LOOP - test_d (3) -- test_d:PROTO:3
  Kai -- ADD_CHOICE: 'test_e (4)'='test_e:PROTO:4'(02:15:48) mytest:
 prefs_info_cb() LOOP - test_e (4) -- test_e:PROTO:4
  Kai -- ADD_CHOICE: 'test_a (0)'='test_a:PROTO:0'(02:15:48) mytest:
 prefs_info_cb() NOLOOP - test_a (0) -- test_a:PROTO:0
  Kai -- ADD_CHOICE: 'test_b (1)'='test_b:PROTO:1'(02:15:48) mytest:
 prefs_info_cb() NOLOOP - test_b (1) -- test_b:PROTO:1
  Kai -- ADD_CHOICE: 'test_c (2)'='test_c:PROTO:2'(02:15:48) mytest:
 prefs_info_cb() NOLOOP - test_c (2) -- test_c:PROTO:2
  Kai -- ADD_CHOICE: 'test_d (3)'='test_d:PROTO:3'(02:15:48) mytest:
 prefs_info_cb() NOLOOP - test_d (3) -- test_d:PROTO:3
  Kai -- ADD_CHOICE: 'test_e (4)'='test_e:PROTO:4'(02:15:48) mytest:
 prefs_info_cb() NOLOOP - test_e (4) -- test_e:PROTO:4

 }}}

-- 
Ticket URL: <http://developer.pidgin.im/ticket/10641#comment:7>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list