Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xMANIFEST4
-rw-r--r--archivo.py7
-rw-r--r--calendario.py12
-rw-r--r--fecha.py2
4 files changed, 16 insertions, 9 deletions
diff --git a/MANIFEST b/MANIFEST
index fc69572..64133d3 100755
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,8 +1,12 @@
archivo.py
LICENSE
+README
setup.py
fecha.py
COPYING
calendario.py
+po/Calendario.pot
activity/activity.info
activity/icono_calendario.svg
+.calendario.py.swp
+efe.pkl
diff --git a/archivo.py b/archivo.py
index 28f47fe..be4b5a4 100644
--- a/archivo.py
+++ b/archivo.py
@@ -69,18 +69,17 @@ def crear_modelo(indice, path):
def abrir_efemeride(path):
'''open the ephemeris file and return a data dictionary'''
path = path + '/data/efemerides.pkl'
-
if not os.path.exists(path):
_log.debug('THE FILE EFEMERIDES DID NOT EXISTS')
archivo = open(path, 'wb')
texto = {}
pickle.dump(texto, archivo)
-
+ archivo.close()
else:
- #_log.debug('THE FILE EXISTS')
+ _log.debug('THE FILE EPHEMERIS EXISTS')
archivo = open(path, 'rb')
texto = pickle.load(archivo)
-
+ archivo.close()
return texto
def guardar_dato(indice, contenido, categoria, bolean, path):
diff --git a/calendario.py b/calendario.py
index 32271d9..420f761 100644
--- a/calendario.py
+++ b/calendario.py
@@ -22,6 +22,7 @@ import gtk
import logging
from sugar.activity import activity
+from sugar.graphics.toolbutton import ToolButton
class CalendarioActivity(activity.Activity):
'''the sugar class'''
@@ -29,9 +30,12 @@ class CalendarioActivity(activity.Activity):
def __init__(self, handle, create_jobject=True):
''' init class'''
activity.Activity.__init__(self, handle, False)
- #super(CalendarioActivity, self).__init__(handle)
self.set_title(_('Calendario'))
+
+ barra_nueva = gtk.Toolbar()
+ barra_nueva.show()
barra_herramientas = activity.ActivityToolbox(self)
+ barra_herramientas.add_toolbar(_('Opciones'),barra_nueva)
self.set_toolbox(barra_herramientas)
barra_herramientas.show()
self.fecha_normal = FechaNormal()
@@ -71,11 +75,11 @@ class CalendarioActivity(activity.Activity):
#ephemeris files
self.texto = abrir_efemeride(self.path)
- if self.texto.has_key(self.fecha_normal.fecha_especial()):
+ if self.texto.has_key(self.fecha_normal.fecha_especial()):
self.buffer.set_text(self.texto[self.fecha_normal.fecha_especial()])
-
+
else:
- self.buffer.set_text('Hoy no se celebra ninguna efemeride')
+ self.buffer.set_text(_('Sin efemerides'))
self.efemeride = gtk.TextView(self.buffer)
self.efemeride.set_editable(False)
diff --git a/fecha.py b/fecha.py
index a76fb89..782475a 100644
--- a/fecha.py
+++ b/fecha.py
@@ -51,5 +51,5 @@ class FechaNormal(object):
'''special format of a date for
be use it like a dicctionary key'''
self.fecha = datetime.today()
- return self.fecha.strftime("%y-%b-%d")
+ return self.fecha.strftime("%d/%m/%y")