Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflavio <fdanesse@gmail.com>2013-07-19 23:19:29 (GMT)
committer flavio <fdanesse@gmail.com>2013-07-19 23:22:36 (GMT)
commit3dbebe72938684e85dfe8d26b5be558012362f98 (patch)
treef87b008f359983b1d5e1eed0ca99d2ea4bacf792
parentf42d2c5f042ef1fa2c27115b10cca05e62ed298e (diff)
none option checkbutton
-rw-r--r--CeibalEncuesta/gtk2/CeibalEncuesta/Widgets.py22
1 files changed, 15 insertions, 7 deletions
diff --git a/CeibalEncuesta/gtk2/CeibalEncuesta/Widgets.py b/CeibalEncuesta/gtk2/CeibalEncuesta/Widgets.py
index f507101..401fc13 100644
--- a/CeibalEncuesta/gtk2/CeibalEncuesta/Widgets.py
+++ b/CeibalEncuesta/gtk2/CeibalEncuesta/Widgets.py
@@ -1598,6 +1598,13 @@ class Widget_MultipleCheckBox(gtk.VButtonBox):
self.emit("new", activan)
+ text = widget.get_parent().get_parent().get_label().get_text()
+ if "ninguna" in text and widget.get_active():
+ for child in options:
+ child = child.get_button()
+ if child == widget: continue
+ child.set_active(False)
+
def update(self, dict):
"""
Cuando el usuario cambia de encuestado,
@@ -1647,27 +1654,28 @@ class MyContainer(gtk.HBox):
self.button = button
self.text_label = label
- self.label = None
if self.text_label:
- self.label = gtk.Label(label)
- self.label.modify_font(pango.FontDescription(OPTIONS_FONT_SIZE))
- self.label.set_line_wrap(True)
+ self.text_label = gtk.Label(self.text_label)
+ self.text_label.modify_font(pango.FontDescription(OPTIONS_FONT_SIZE))
+ self.text_label.set_line_wrap(True)
align = gtk.Alignment(0, 0, 0, 0)
align.add(self.button)
self.pack_start(align, False, False, 0)
- if self.label:
+ if self.text_label:
align = gtk.Alignment(0, 0, 0, 0)
align.set_padding(0, 0, 20, 0)
- align.add(self.label)
+ align.add(self.text_label)
self.pack_start(align, False, False, 0)
self.show_all()
def get_button(self):
return self.button
-
+
+ def get_label(self):
+ return self.text_label
class MyCheckButton(gtk.CheckButton):