Attachments you submit will be routed for moderation. If you have an account, please log in first.

Ticket #1341: dslo1341_3.patch

File dslo1341_3.patch, 2.1 KB (added by sayamindu, 4 years ago)

Patch to fix the new issues

  • bin/sugar-session

    diff --git a/bin/sugar-session b/bin/sugar-session
    index eb38fb8..41c9255 100644
    a b  
    164164 
    165165        model = gconf_client.get_string(\ 
    166166            '/desktop/sugar/peripherals/keyboard/model') 
    167         if model is not None: 
     167        if model: 
    168168            configrec.set_model(model) 
    169169 
    170170        options = gconf_client.get_list(\ 
  • extensions/cpsection/keyboard/model.py

    diff --git a/extensions/cpsection/keyboard/model.py b/extensions/cpsection/keyboard/model.py
    index b0c48c9..9d61c0c 100644
    a b  
    133133 
    134134    def set_model(self, model): 
    135135        """Sets the supplied keyboard model""" 
     136        if model is None or not model: 
     137            return 
    136138        self._gconf_client.set_string(_MODEL_KEY, model) 
    137139        self._configrec.set_model(model) 
    138140        self._configrec.activate(self._engine) 
     
    150152 
    151153    def set_layouts(self, layouts): 
    152154        """Sets the supplied keyboard layouts (with variants)""" 
     155        if layouts is None or not layouts: 
     156            return 
    153157        self._gconf_client.set_list(_LAYOUTS_KEY, gconf.VALUE_STRING, layouts) 
    154158        layouts_list = [] 
    155159        variants_list = [] 
  • extensions/cpsection/keyboard/view.py

    diff --git a/extensions/cpsection/keyboard/view.py b/extensions/cpsection/keyboard/view.py
    index 074d298..5527cc8 100644
    a b  
    204204        kmodel_combo.add_attribute(cell, 'text', 1) 
    205205 
    206206        self._kmodel = self._keyboard_manager.get_current_model() 
    207         for row in kmodel_store: 
    208             if self._kmodel in row[0]: 
    209                 kmodel_combo.set_active_iter(row.iter) 
    210                 break 
     207        if self._kmodel is not None: 
     208            for row in kmodel_store: 
     209                if self._kmodel in row[0]: 
     210                    kmodel_combo.set_active_iter(row.iter) 
     211                    break 
    211212 
    212213        box_kmodel.pack_start(kmodel_combo, expand = False) 
    213214        self._vbox.pack_start(box_kmodel, expand=False)