diff options
author | Yader Velásquez <yajosev@gmail.com> | 2011-02-01 22:02:08 (GMT) |
---|---|---|
committer | Yader Velásquez <yajosev@gmail.com> | 2011-02-01 22:02:08 (GMT) |
commit | 307971bb5757a88b368d31ba698fbf3851707ecd (patch) | |
tree | 5534a8099f6d64bd5c1792f1cdc53d7762517924 /calendario.py | |
parent | 4c60122f53a1823964d795a65ea4ef9a5cf7d39e (diff) |
new fuction for mark the days of the calendar
Diffstat (limited to 'calendario.py')
-rw-r--r-- | calendario.py | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/calendario.py b/calendario.py index 1f4dfc4..d037143 100644 --- a/calendario.py +++ b/calendario.py @@ -17,7 +17,7 @@ from gettext import gettext as _ from fecha import FechaUnix, FechaNormal -from archivo import crear_modelo, abrir_efemeride, guardar_efemeride, guardar_dato, borrar_dato, comprobar_efemeride +from archivo import crear_modelo, abrir_efemeride, guardar_efemeride, guardar_dato, borrar_dato, comprobar_efemeride, lista_meses import gtk import logging @@ -52,8 +52,8 @@ class CalendarioActivity(activity.Activity): self.fecha_normal = FechaNormal() self._log = logging.getLogger('log principal') self.path = self.get_activity_root() - - + self.lista_dias_marcados = lista_meses(self.path) + self._log.debug(type(self.lista_dias_marcados)) ######################### set interface ######################## @@ -208,7 +208,8 @@ class CalendarioActivity(activity.Activity): self.modelo = crear_modelo(self.indice_dia, self.path) self.actividades.set_model(self.modelo) - + + def _nuevo_ingreso_cb(self, widget, data=None): '''when the user clicked on the save button, the content is added to a python object and @@ -220,16 +221,18 @@ class CalendarioActivity(activity.Activity): #if the buffer is not empty or does not have space if self.cadena is not ' ' and self.cadena is not '' and self.cadena is not ' ': self.lista_fecha = self.calendario.get_date() - self.indice_dia = FechaUnix(self.lista_fecha) - self.indice_dia = self.indice_dia.fecha_unix() + self.indice_dia = FechaUnix(self.lista_fecha) #id for save the date + self.indice = self.indice_dia.fecha_unix() + self.marcar_dia = self.indice_dia.fecha_formato(self.indice)#id for mark the day self.modelocombo = self.combo.get_model() self.index = self.combo.get_active() self.categoria = self.modelocombo[self.index][0] - guardar_dato(self.indice_dia, self.cadena, self.categoria, self.check_status, self.path) + guardar_dato(self.indice, self.cadena, self.categoria, self.check_status, self.path) self.buffer.set_text(' ') - self.modelo = crear_modelo(self.indice_dia, self.path) + self.modelo = crear_modelo(self.indice, self.path) self.actividades.set_model(self.modelo) - + #self.marcar_calendario(self.marcar_dia) + if self.check_status is 1: #make inactive again the checkbutton self.check.set_active(False) @@ -265,7 +268,13 @@ class CalendarioActivity(activity.Activity): self.actividades.append_column(self.columna) self.columna = gtk.TreeViewColumn(self.prioridad, self.icono, stock_id = 3) self.actividades.append_column(self.columna) - + + #def marcar_calendario(self, fecha): + # '''mark the days that have activities stored''' + # fecha = int(fecha[:2]) + # self._log.debug(fecha) + # self.calendario.mark_day(fecha) + def close(self, skip_save=False): '''Override the close method so we don't try to create a Journal entry''' |