Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--archivo.py16
-rw-r--r--calendario.py2
2 files changed, 13 insertions, 5 deletions
diff --git a/archivo.py b/archivo.py
index 0ffda53..854bc3a 100644
--- a/archivo.py
+++ b/archivo.py
@@ -23,6 +23,14 @@ import logging
from gettext import gettext as _
_log = logging.getLogger('Log archivo')
+def separar_cadena(texto):
+ nuevo_texto = ''
+ for i in range(0, len(texto), 50):
+ texto_temporal = texto[i: i + 50] + '\n'
+ nuevo_texto = nuevo_texto + texto_temporal
+
+ return nuevo_texto
+
def indice_entero(cadena):
'''Convert a turple's index to an interger number, for
be used by others functions'''
@@ -86,8 +94,8 @@ def guardar_efemeride(path, file_name):
'''import, convert and save a new ephemeris database'''
path = path + '/data/efemerides.pkl'
di = {}
- file = open(file_name, 'r')
- lines = file.readlines()
+ archivo = open(file_name, 'r')
+ lines = archivo.readlines()
for i in range(len(lines)):
current_text = lines[i][10 : len(lines[i]) - 2]
@@ -98,7 +106,7 @@ def guardar_efemeride(path, file_name):
file_new = open(path, 'wb')
pickle.dump(di,file_new)
file_new.close()
- file.close()
+ archivo.close()
def guardar_dato(indice, contenido, categoria, bolean, path):
'''save the content in a file, add the content to a dictionary->list'''
@@ -113,7 +121,7 @@ def guardar_dato(indice, contenido, categoria, bolean, path):
if not indice in dia:
dia[indice] = []
-
+ contenido = separar_cadena(contenido)
dia[indice].append([contenido, categoria, prioridad])
f.seek(0)
pickle.dump(dia, f)
diff --git a/calendario.py b/calendario.py
index 0ffe530..a58618d 100644
--- a/calendario.py
+++ b/calendario.py
@@ -316,7 +316,7 @@ class CalendarioActivity(activity.Activity):
self.columna = gtk.TreeViewColumn('', self.celda, text = 0)
self.actividades.append_column(self.columna)
self.columna = gtk.TreeViewColumn(self.actividad, self.celda, text = 1)
- self.columna.set_min_width(400)
+ self.columna.set_min_width(365)
self.actividades.append_column(self.columna)
self.columna = gtk.TreeViewColumn(self.categoria, self.celda, text = 2)
self.actividades.append_column(self.columna)