diff --git a/src/gui/listmodel.py b/src/gui/listmodel.py index c9c63aa78..f0fee70dc 100644 --- a/src/gui/listmodel.py +++ b/src/gui/listmodel.py @@ -322,7 +322,7 @@ class ListModel(object): """ store, node = self.selection.get_selected() if node: - rows = store.get_path(node) + rows = store.get_path(node).get_indices() return rows[0] else: return -1 @@ -413,8 +413,8 @@ class ListModel(object): for obj in data: self.model.set_value(node, col, obj) col += 1 - self.model.set_value(node, col, info) if info: + self.model.set_value(node, col, info) self.idmap[str(info)] = node if select: self.selection.select_iter(node) diff --git a/src/gui/plug/report/_stylecombobox.py b/src/gui/plug/report/_stylecombobox.py index 318e179c0..d02f7b103 100644 --- a/src/gui/plug/report/_stylecombobox.py +++ b/src/gui/plug/report/_stylecombobox.py @@ -41,7 +41,8 @@ class StyleComboBox(Gtk.ComboBox): """ Initialize the combobox, building the display column. """ - GObject.GObject.__init__(self,model) + GObject.GObject.__init__(self) + self.set_model(model) cell = Gtk.CellRendererText() self.pack_start(cell,True) self.add_attribute(cell,'text',0)