diff options
author | Cristhofer Travieso <cristhofert97@gmail.com> | 2012-09-13 15:33:40 (GMT) |
---|---|---|
committer | Cristhofer Travieso <cristhofert97@gmail.com> | 2012-09-13 15:33:40 (GMT) |
commit | 72ae1dea8324a8cc94ad37d5d60307d22699cc56 (patch) | |
tree | 6f4837f0d8709ed41761d01ccd7f8437133403a4 | |
parent | 19a555a25ce4add58cafa62e8b5e9b3a42d13953 (diff) |
Add temp toolbutton
-rw-r--r-- | activity.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/activity.py b/activity.py index 4c32eda..8ba898c 100644 --- a/activity.py +++ b/activity.py @@ -62,7 +62,8 @@ class ConvertActivity(activity.Activity): self.label_box = gtk.HBox() - self.adjustment = gtk.Adjustment(1.0, 0.0000000001, 10.0 ** 20.0, 0.1, 1.0) + self.adjustment = gtk.Adjustment(1.0, 0.0000000001, 10.0 ** 20.0, 0.1, + 1.0) self.spin = gtk.SpinButton(self.adjustment, 0.0, 2) self.label = gtk.Label() @@ -142,12 +143,20 @@ class ConvertActivity(activity.Activity): self._time_btn.props.icon_name = 'time' self._time_btn.props.group = self._lenght_btn + self._temp_btn = RadioToolButton() + self._temp_btn.connect('clicked', + lambda w: self._update_combo(convert.temp)) + self._temp_btn.set_tooltip(_('Temperature')) + self._temp_btn.props.icon_name = 'temp' + self._temp_btn.props.group = self._lenght_btn + toolbarbox.toolbar.insert(self._lenght_btn, -1) toolbarbox.toolbar.insert(self._volume_btn, -1) toolbarbox.toolbar.insert(self._area_btn, -1) toolbarbox.toolbar.insert(self._weight_btn, -1) toolbarbox.toolbar.insert(self._speed_btn, -1) toolbarbox.toolbar.insert(self._time_btn, -1) + toolbarbox.toolbar.insert(self._temp_btn, -1) separator = gtk.SeparatorToolItem() separator.set_expand(True) |