__pretty_app_name__ = "quicknote"
__app_name__ = "quicknote"
- __version__ = "0.7.5"
+ __version__ = "0.7.7"
def __init__(self):
super(quicknoteclass, self).__init__()
self.db.speichereDirekt('datenbank', fileName)
self.db.openDB()
- self.topBox.loadCategories()
- self.notizen.loadNotes()
+ self.topBox.load_categories()
+ self.notizen.load_notes()
dlg.destroy()
def show_about(self, widget = None, data = None):
sqldiag.destroy()
def delete_Category(self, widget = None, data = None):
- if (self.topBox.getCategory() == "%") or (self.topBox.getCategory() == "undefined"):
+ if self.topBox.get_category() == "%" or self.topBox.get_category() == "undefined":
mbox = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, _("This category can not be deleted"))
response = mbox.run()
mbox.hide()
mbox.destroy()
if response == gtk.RESPONSE_YES:
sql = "UPDATE notes SET category = ? WHERE category = ?"
- self.db.speichereSQL(sql, ("undefined", self.topBox.getCategory()))
+ self.db.speichereSQL(sql, ("undefined", self.topBox.get_category()))
sql = "DELETE FROM categories WHERE liste = ?"
- self.db.speichereSQL(sql, (self.topBox.getCategory(), ))
- model = self.topBox.comboCategory.get_model()
- pos = self.topBox.comboCategory.get_active()
+ self.db.speichereSQL(sql, (self.topBox.get_category(), ))
+ model = self.topBox.categoryCombo.get_model()
+ pos = self.topBox.categoryCombo.get_active()
if (pos>1):
- self.topBox.comboCategory.remove_text(pos)
- self.topBox.comboCategory.set_active(0)
+ self.topBox.categoryCombo.remove_text(pos)
+ self.topBox.categoryCombo.set_active(0)
def move_Category(self, widget = None, data = None):
dialog = gtk.Dialog(_("Choose category"), self.window, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, (gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT, gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))
if dialog.run() == gtk.RESPONSE_ACCEPT:
n = comboCategory.get_active()
- if (n>-1) and (self.notizen.noteid!= -1):
+ if -1 < n and self.notizen.noteId != -1:
model = comboCategory.get_model()
active = comboCategory.get_active()
if active < 0:
return None
cat_id = model[active][0]
- noteid, category, note = self.db.loadNote(self.notizen.noteid)
+ noteid, category, note = self.db.loadNote(self.notizen.noteId)
#print noteid, category, cat_id
self.db.saveNote(noteid, note, cat_id, pcdatum = None)
- self.topBox.comboCategoryChanged()
+ self.topBox.category_combo_changed()
else:
mbox = gtk.MessageDialog(self.window, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, _("No note selected."))
response = mbox.run()
dialog.destroy()
def sync_finished(self, data = None, data2 = None):
- self.topBox.loadCategories()
- self.notizen.loadNotes()
+ self.topBox.load_categories()
+ self.notizen.load_notes()
def prepare_sync_dialog(self):
self.sync_dialog = gtk.Dialog(_("Sync"), None, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, (gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))