diff options
author | flavio <fdanesse@gmail.com> | 2013-05-05 22:07:37 (GMT) |
---|---|---|
committer | flavio <fdanesse@gmail.com> | 2013-05-05 22:07:37 (GMT) |
commit | f891a96a510f43ada7818f77a267bc95edf0f1c3 (patch) | |
tree | fdcc1e1bca601c2d674d061a9da0a0521a1879b2 | |
parent | d890e130b2e5dec9dabf39abb6576f248526b8a9 (diff) |
Correcciones
-rw-r--r-- | Widgets.py | 60 |
1 files changed, 45 insertions, 15 deletions
@@ -433,7 +433,10 @@ class DialogoProyecto(Gtk.Dialog): boton = button break - if self.nombre.get_text().strip(): + nombre = self.nombre.get_text() + if nombre: nombre = nombre.strip() + + if nombre: boton.set_sensitive(True) else: @@ -507,17 +510,37 @@ class DialogoProyecto(Gtk.Dialog): buffer = self.descripcion.get_buffer() + nombre = self.nombre.get_text() + main = self.main.get_active_text() + path = self.path.get_text() + + buffer = buffer.get_text( + buffer.get_start_iter(), + buffer.get_end_iter(), True) + + version = self.version.get_text() + licencia = self.licencia.get_active_text() + icon_path = self.icon_path.get_text() + url = self.url.get_text() + + if nombre: nombre = nombre.strip() + if main: main = main.strip() + if path: path = path.strip() + if buffer: buffer = buffer.strip() + if version: version = version.strip() + if licencia: licencia = licencia.strip() + if icon_path: icon_path = icon_path.strip() + if url: url = url.strip() + dict = { - "nombre": self.nombre.get_text().strip(), - "main": self.main.get_active_text().strip(), - "path": self.path.get_text().strip(), - "descripcion": buffer.get_text( - buffer.get_start_iter(), - buffer.get_end_iter(), True).strip(), - "version": self.version.get_text().strip(), - "licencia": self.licencia.get_active_text().strip(), - "icon_path": self.icon_path.get_text().strip(), - "url": self.url.get_text().strip(), + "nombre": nombre, + "main": main, + "path": path, + "descripcion": buffer, + "version": version, + "licencia": licencia, + "icon_path": icon_path, + "url": url, "autores": self.autores.get_autores() } @@ -570,7 +593,10 @@ class DialogoProyecto(Gtk.Dialog): for button in self.get_action_area().get_children(): if self.get_response_for_widget(button) == Gtk.ResponseType.ACCEPT: - if not self.nombre.get_text().strip(): + nombre = self.nombre.get_text() + if nombre: nombre.strip() + + if not nombre: button.set_sensitive(False) else: @@ -707,10 +733,14 @@ class WidgetAutores(Gtk.Box): nombre = autor.get_children()[0] mail = autor.get_children()[1] + nombre = nombre.get_text() + nombre = nombre.strip() + + mail = mail.get_text() + mail = mail.strip() + if nombre and mail: - autores.append( - (nombre.get_text().strip(), - mail.get_text().strip()) ) + autores.append( (nombre, mail) ) return autores |