diff options
author | Yader Velásquez <yajosev@gmail.com> | 2012-02-22 19:37:42 (GMT) |
---|---|---|
committer | Yader Velásquez <yajosev@gmail.com> | 2012-02-22 19:37:42 (GMT) |
commit | 506c6faad6a82eeb551561db41bbe2683e05f23c (patch) | |
tree | 89ed4d443b10ad772efe31a638da783638f82e84 | |
parent | c89b5f26609272a729568fa953376337a87c6cfb (diff) |
new pot
-rw-r--r-- | calendario.py | 13 | ||||
-rw-r--r-- | database.py | 7 | ||||
-rw-r--r-- | po/Calendario.pot | 132 |
3 files changed, 45 insertions, 107 deletions
diff --git a/calendario.py b/calendario.py index cf5a55c..89d7b89 100644 --- a/calendario.py +++ b/calendario.py @@ -38,6 +38,7 @@ class CalendarioActivity(activity.Activity): toolbox = widgets.ActivityToolbox(self) self.set_toolbar_box(toolbox) toolbox.show() + self.path = self.get_activity_root() ###left side### self.left_container = gtk.VBox() d = datetime.today() @@ -153,7 +154,7 @@ class CalendarioActivity(activity.Activity): def get_tasks(self): '''Get the rows''' date_formated = date_format(self.calendar.get_date()) - db = DataBase() + db = DataBase(self.path) data = db.get(date_formated) reminder = db.get_reminder() db.close() @@ -196,7 +197,7 @@ class CalendarioActivity(activity.Activity): date = date_format(self.calendar.get_date()) #just the month data = (date[3:],) - db = DataBase() + db = DataBase(self.path) day_list = db.get_days(data) db.close() for i in day_list: @@ -217,7 +218,7 @@ class CalendarioActivity(activity.Activity): self.combobox_priority.set_active(-1) date_formated = date_format(self.calendar.get_date()) data = (text, category, priority, 0, date_formated) - db = DataBase() + db = DataBase(self.path) db.add(data) db.close() self.get_tasks() @@ -233,7 +234,7 @@ class CalendarioActivity(activity.Activity): #task, completed, id for the moment category and #priority are excluded data = (row[4], row[0]) - db = DataBase() + db = DataBase(self.path) db.update(data) db.close() self.get_tasks() @@ -244,7 +245,7 @@ class CalendarioActivity(activity.Activity): model, row_iter = selection.get_selected() row = model[row_iter] data = (row[0],) - db = DataBase() + db = DataBase(self.path) db.delete(data) db.close() self.get_tasks() @@ -252,7 +253,7 @@ class CalendarioActivity(activity.Activity): def _day_selected_cb(self, widget, data=None): '''Select new day''' date_formated = date_format(self.calendar.get_date()) - db = DataBase() + db = DataBase(self.path) data = db.get(date_formated) db.close() tasks_model = TasksModel(data) diff --git a/database.py b/database.py index c017b12..0008d45 100644 --- a/database.py +++ b/database.py @@ -24,11 +24,12 @@ log = logging.getLogger('DataBase-Log') class DataBase(object): """Connection to the database""" - def __init__(self): + def __init__(self, db_path): create = False - if not path.exists('test'): + if not path.exists(db_path + '/data/calendario.db'): create = True - self.connection = sqlite3.connect('test') + + self.connection = sqlite3.connect(db_path + '/data/calendario.db') self.cursor = self.connection.cursor() if create: diff --git a/po/Calendario.pot b/po/Calendario.pot index 221f4e9..aa9b2ae 100644 --- a/po/Calendario.pot +++ b/po/Calendario.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-08-27 21:19-0600\n" +"POT-Creation-Date: 2012-02-22 13:35-0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -17,134 +17,70 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: activity/activity.info:2 calendario.py:35 +#: activity/activity.info:2 msgid "Calendario" msgstr "" -#: calendario.py:40 -msgid "Import ephemeris" +#: model.py:30 model.py:66 +msgid "Personal" msgstr "" -#: calendario.py:41 -msgid "Calendar" +#: model.py:30 model.py:68 +msgid "Work" msgstr "" -#: calendario.py:51 -msgid "Tools" -msgstr "" - -#: calendario.py:62 -msgid "Today " -msgstr "" - -#: calendario.py:92 -msgid "Pending Tasks" -msgstr "" - -#: calendario.py:113 -msgid "There are no ephemeris" -msgstr "" - -#: calendario.py:115 -msgid "There are no ephemeris imported" -msgstr "" - -#: calendario.py:120 -msgid "Daily Ephemeris" -msgstr "" - -#: calendario.py:136 -msgid "There are no phrases" -msgstr "" - -#: calendario.py:138 -msgid "There are no phrases imported" -msgstr "" - -#: calendario.py:144 -msgid "Phrase of the week" -msgstr "" - -#: calendario.py:156 -msgid "Add new" -msgstr "" - -#: calendario.py:157 -msgid "Remove" -msgstr "" - -#: calendario.py:158 -msgid "Import" -msgstr "" - -#: calendario.py:159 -msgid "Modify" +#: model.py:30 model.py:70 +msgid "Study" msgstr "" -#: calendario.py:162 -msgid "Notes" +#: model.py:31 model.py:76 +msgid "Low" msgstr "" -#: calendario.py:168 -msgid "Activities:" +#: model.py:31 model.py:78 +msgid "Medium" msgstr "" -#: calendario.py:174 -msgid "Mathematics" +#: model.py:31 model.py:80 +msgid "High" msgstr "" -#: calendario.py:175 -msgid "Geography" -msgstr "" - -#: calendario.py:176 -msgid "Natural Science" -msgstr "" - -#: calendario.py:177 -msgid "Language" -msgstr "" - -#: calendario.py:178 -msgid "Without category" -msgstr "" - -#: calendario.py:182 -msgid "Expand for options" +#: calendario.py:53 +msgid "Tools" msgstr "" -#: calendario.py:184 -msgid "Important" +#: calendario.py:54 +msgid "Tasks reminder" msgstr "" -#: calendario.py:186 -msgid "In Progress" +#: calendario.py:55 +msgid "View by" msgstr "" -#: calendario.py:188 -msgid "Completed" +#: calendario.py:68 calendario.py:101 calendario.py:171 +msgid "Priority" msgstr "" -#: calendario.py:202 -msgid "Ephemeris" +#: calendario.py:69 calendario.py:106 calendario.py:171 +msgid "Category" msgstr "" -#: calendario.py:203 -msgid "Phrases" +#: calendario.py:87 +msgid "Tasks list" msgstr "" -#: calendario.py:421 -msgid "Activity" +#: calendario.py:97 +msgid "Options" msgstr "" -#: calendario.py:422 -msgid "Category" +#: calendario.py:133 +msgid "Add new" msgstr "" -#: calendario.py:423 -msgid "Priority" +#: calendario.py:135 +msgid "Remove" msgstr "" -#: calendario.py:424 -msgid "Status" +#: calendario.py:171 +msgid "Tasks" msgstr "" |