diff options
author | Reinier Heeres <reinier@heeres.eu> | 2007-09-03 21:40:02 (GMT) |
---|---|---|
committer | Reinier Heeres <reinier@heeres.eu> | 2007-09-03 21:40:02 (GMT) |
commit | 4d159fe530290c50214db120be518fdd3124d4f0 (patch) | |
tree | e56e45681e99e37113eb90c28d77bfe84fdbcc93 /layout.py | |
parent | ce442beeda3bff8b2f7b302ce9002587e341fdda (diff) |
See NEWS, major upgrade
Diffstat (limited to 'layout.py')
-rw-r--r-- | layout.py | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -79,10 +79,8 @@ class CalcLayout: self.grid.set_border_width(6) self.grid.set_row_spacings(6) self.grid.set_col_spacings(6) - if issubclass(type(self._parent), gtk.Bin) and self._parent.get_child() is not None: - self._parent.get_child().add(self.grid) - else: - self._parent.add(self.grid) + + self._parent.set_canvas(self.grid) # Left part: container and input hc1 = gtk.HBox(False, 10) @@ -104,10 +102,10 @@ class CalcLayout: self.pad.set_col_spacings(6) #self.pad. self.create_button_data() - self.buttons = [] + self.buttons = {} for x, y, w, cap, bgcol, cb in self.button_data: button = self.create_button(_(cap), cb, self.col_white, bgcol, w) - self.buttons.append(button) + self.buttons[cap] = button self.pad.attach(button, x, x+w, y, y+1) self.grid.attach(self.pad, 0, 6, 5, 16) |