[Bugs] #3926 sugar UNSP: CP: keyboard section crashes Sugar

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Wed Sep 19 15:31:00 EDT 2012


#3926: CP: keyboard section crashes Sugar
------------------------------------------+---------------------------------
    Reporter:  erikos                     |          Owner:  manuq   
        Type:  defect                     |         Status:  new     
    Priority:  Unspecified by Maintainer  |      Milestone:  0.98    
   Component:  sugar                      |        Version:  0.97.x  
    Severity:  Unspecified                |       Keywords:          
Distribution:  Fedora                     |   Status_field:  Assigned
------------------------------------------+---------------------------------

Comment(by manuq):

 Well it turns out gconf_client_set_list can't be workarounded like
 gconf_client_get_list, because gconf_value_set_list [1] is not
 introspectable.  So the list of values can't be made.

 [1] http://developer.gnome.org/gconf/stable/gconf-gconf-value.html#gconf-
 value-set-list

 The workaround for get_list is, for example:
 {{{
 from gi.repository import GConf

 cli = GConf.Client.get_default()

 val_list = cli.get('/desktop/sugar/protected_activities')
 assert val_list.type == GConf.ValueType.LIST

 for val in val_list.get_list():
     assert val.type == GConf.ValueType.STRING
     print val.get_string()
 }}}

 If we had gconf_value_set_list we could do something like:

 {{{
 list_of_values = []
 for string in ['one', 'two', 'three']:
     val = GConf.Value()
     val.type = GConf.ValueType.STRING
     val.set_string('hola')
     list_of_values.append(val)

 val_list = GConf.Value()
 val_list.type = GConf.ValueType.LIST
 val_list.set_list(list_of_values) #FIXME
 val_list.set_list_type(GConf.ValueType.STRING)

 cli.set('/test/layouts', val_list)
 }}}

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/3926#comment:2>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list