~umang/indicator-stickynotes/trunk

« back to all changes in this revision

Viewing changes to stickynotes/backend.py

  • Committer: Umang Varma
  • Date: 2012-07-14 02:01:28 UTC
  • Revision ID: git-v1:d60319519740328a822663b1300fd2c16b019a5d
Added pot (template) file

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
class NoteSet:
69
69
    def __init__(self, gui_class):
70
70
        self.notes = []
71
 
        self.properties = {}
72
71
        self.gui_class = gui_class
73
72
 
74
73
    def _loads_updater(self, dnoteset):
80
79
        notes = self._loads_updater(json.loads(snoteset))
81
80
        self.notes = [Note(note, gui_class=self.gui_class, noteset=self)
82
81
                for note in notes.get("notes",[])]
83
 
        self.properties = notes.get("properties", {})
84
82
 
85
83
    def dumps(self):
86
 
        return json.dumps({"notes":[x.extract() for x in self.notes],
87
 
            "properties": self.properties})
 
84
        return json.dumps({"notes":[x.extract() for x in self.notes]})
88
85
 
89
86
    def save(self, path=''):
90
87
        output = self.dumps()