~umang/indicator-stickynotes/trunk

« back to all changes in this revision

Viewing changes to backend.py

  • Committer: Umang Varma
  • Date: 2012-06-01 22:49:40 UTC
  • Revision ID: git-v1:8a154a1ec2fe9173dfacb89ebe2e4041bb622b8d
Implemented indicator.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
        self.gui.update_note()
26
26
        if not self.uuid:
27
27
            self.uuid = str(uuid.uuid4())
 
28
        self.properties = self.gui.properties()
28
29
        return {"uuid":self.uuid, "body":self.body,
29
30
                "last_modified":self.last_modified.strftime(
30
 
                    "%Y-%m-%dT%H:%M:%S"), "properties":self.gui.properties()}
 
31
                    "%Y-%m-%dT%H:%M:%S"), "properties":self.properties}
31
32
 
32
33
    def update(self,body=None):
33
34
        if not body == None:
39
40
        self.noteset.save()
40
41
        del self
41
42
 
42
 
    def show(self):
 
43
    def show(self, *args):
43
44
        if not self.gui:
44
45
            self.gui = self.gui_class(note=self)
45
 
        self.gui.show()
 
46
        self.gui.show(*args)
46
47
 
47
48
    def hide(self):
48
49
        self.gui.hide()
83
84
        note.show()
84
85
        return note
85
86
 
86
 
    def showall(self):
 
87
    def showall(self, *args):
87
88
        for note in self.notes:
88
 
            note.show()
 
89
            note.show(*args)
89
90
 
90
 
    def hideall(self):
 
91
    def hideall(self, *args):
 
92
        self.save()
91
93
        for note in self.notes:
92
 
            note.hide()
 
94
            note.hide(*args)
93
95
 
94
96
class dGUI:
95
97
    def __init__(self, *args, **kwargs):