def _initialize(self): common_layouts = self._xkl_wrapper.get_common_layouts() available_layouts = self._xkl_wrapper.get_available_layouts() arranged_layouts = sorted(common_layouts, key=self._sort_layout) + \ sorted(list(set(available_layouts) - set(common_layouts)), key=self._sort_layout) # we add arranged layouts in the treeview store gtk_batch_map(self._addLayout, arranged_layouts, args=(self._store,), batch_size=20) # then, we add a separator after common keyboard layouts sep_itr = self._store.insert(len(common_layouts)) self._store.set(sep_itr, 0, DEFAULT_KEYBOARD, 1, True)
def _initialize(self): gtk_batch_map(self._addLayout, self._xkl_wrapper.get_available_layouts(), args=(self._store, ), batch_size=20)
def _initialize(self): gtk_batch_map(self._addLayout, self._xkl_wrapper.get_available_layouts(), args=(self._store,), batch_size=20)