~flimm/epidermis/icon-theme-bugfix

« back to all changes in this revision

Viewing changes to epidermis/pigments/cursors.py

  • Committer: David D Lowe
  • Date: 2011-01-04 22:50:19 UTC
  • Revision ID: daviddlowe.flimm@gmail.com-20110104225019-uo31kb54cbxjt5vt
Tidy up code with better comments.
Deleted unused functions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
    
67
67
    
68
68
    def is_installed(self, installationDirectory=None):
69
 
        """Returns whether this pigment is installed
70
 
        installationDirectory: the directory in which to search for already 
71
 
        installed pigments"""
72
69
        if DirBasedPigment.is_installed(self, installationDirectory):
73
70
            if os.path.isdir(os.path.join(self.type.publicBasedDir, self.attDirname, "cursors")):
74
71
                return True
75
72
        return False
76
73
    
77
74
    def is_activated(self):
78
 
        """Returns whether this pigment is applied. To check if the effects
79
 
        have been activated regardless of Epidermis' pigments, use is_meat_activated"""
80
75
        return self.is_meat_activated()
81
76
    
82
77
    def is_attachment_correct(self, attachmentIndex=None):
108
103
    
109
104
    
110
105
    def is_meat_installed(self):
111
 
        """Returns whether the meat of this pigment or similar to it is installed"""
112
106
        (md1, md2) = (hashlib.md5(), hashlib.md5())
113
107
        # FIXME: cursors is_installed
114
108
        try:
129
123
        
130
124
    
131
125
    def is_meat_activated(self):
132
 
        """Returns whether the meat of this pigment or similar to it is activated"""
133
126
        (md1, md2) = (hashlib.md5(), hashlib.md5())
134
127
        client = gconf.client_get_default()
135
128
        # FIXME: meat_activated
173
166
            return pb
174
167
        
175
168
    def _ReadXCursor(self,  filename):
176
 
        """Reads an xcursor file and returns list:
 
169
        """Read an xcursor file and returns list:
177
170
        [xhot, yhot, delay, picList]
178
171
        on failure, returns False
179
 
        Taken from GursorMaker which was released under the GPL v2"""
 
172
        Taken from GursorMaker which was released under the GPL v2
 
173
        
 
174
        """
180
175
        try:
181
176
            file = open(filename,'r+b')
182
177
        except IOError:
240
235
        return [xhot, yhot, delay, pics]
241
236
    
242
237
    def does_activation_require_root(self):
243
 
        """Returns whether the activation requires root rights.
244
 
        If it does, the pigment object will need a pexpect bash shell as root
245
 
        to be passed to some of its methods"""
246
238
        return False
247
239
    
248
240
    def get_display_data(self, index=0):
249
 
        """Returns the object of index to be added to a gtk.ListStore, this
250
 
        could be a string, a gtk.gdk.Pixbuf or a custom widget, it should
251
 
        be rendered using type.create_cell_renderer"""
252
241
        return
253
 
 
254
 
def main():
255
 
    print >> sys.stderr, "Don't run"
256
 
 
257
 
if __name__ == "__main__":
258
 
    main()