Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/archivo.py
diff options
context:
space:
mode:
authorYader Velásquez <yajosev@gmail.com>2011-03-04 04:19:36 (GMT)
committer Yader Velásquez <yajosev@gmail.com>2011-03-04 04:19:36 (GMT)
commitbfde263d7c6a33e211e0fbda1a26b72d5728ca13 (patch)
tree8dff900379af6ab419bf24e697ab56f4996a63b5 /archivo.py
parent5cb5a2ac27f5e64de75d1a23c8024d5d2ff9a00c (diff)
new colors
Diffstat (limited to 'archivo.py')
-rw-r--r--archivo.py17
1 files changed, 5 insertions, 12 deletions
diff --git a/archivo.py b/archivo.py
index fdcab18..1625bdc 100644
--- a/archivo.py
+++ b/archivo.py
@@ -23,13 +23,6 @@ import logging
from gettext import gettext as _
_log = logging.getLogger('Log Archivo')
-#def color_categoria(entero):
-# if entero >= 0:
-# color = ['#222222', '#333333', '#444444', '#555555', '#666666']
-# return color[entero]
-# else:
-# return None
-
def separar_cadena(texto):
nuevo_texto = ''
for i in range(0, len(texto), 40):
@@ -57,7 +50,7 @@ def crear_modelo(indice, path):
archivo = open(path, 'wb')
dia = {}
pickle.dump(dia, archivo)
- modelo.append(['', '', '', None])
+ modelo.append(['', '', '', None, None])
else:
archivo = open(path, 'rb')
@@ -116,7 +109,7 @@ def guardar_efemeride(path, file_name):
def guardar_dato(indice, contenido, categoria, entero_cat, bolean, path):
'''save the content in a file, add the content to a dictionary->list'''
_log.debug(entero_cat)
- color_categoria = ['#222222', '#333333', '#444444', '#555555', '#666666']
+ color_categoria = ['#6E92FF', '#82FF5F', '#FFE251', '#FF7D7D', '#FFFFFF']
path = path + '/data/actividades.pkl'
indice = str(indice)
@@ -134,7 +127,7 @@ def guardar_dato(indice, contenido, categoria, entero_cat, bolean, path):
if entero_cat > -1:
color = color_categoria[entero_cat]
else:
- color = None
+ color = '#FFFFFF'
dia[indice].append([contenido, categoria, prioridad, color])
f.seek(0)
@@ -156,9 +149,9 @@ def borrar_dato(indice, indice_lista, path):
f.close()
if len(dia[indice]): #return 1 if the date does not have data
- return 0
+ return 0
else:
- return 1
+ return 1
def dict_meses(path, fecha, opcion=0):
'''Create if not exists and return a data