~flimm/epidermis/icon-theme-bugfix

« back to all changes in this revision

Viewing changes to epidermis/pigments/metacity_.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:
58
58
 
59
59
    
60
60
    def is_installed(self, installationDirectory=None):
61
 
        """Returns whether this pigment is installed
62
 
        installationDirectory: the directory in which to search for already 
63
 
        installed pigments"""
64
61
        if DirBasedPigment.is_installed(self, installationDirectory):
65
62
            if os.path.isdir(os.path.join(self.type.publicBaseDir, self.attDirname, "metacity-1")):
66
63
                return True
67
64
        return False
68
65
    
69
66
    def is_activated(self):
70
 
        """Returns whether this pigment is applied. To check if the effects
71
 
        have been activated regardless of Epidermis' pigments, use is_meat_activated"""
72
67
        return self.is_meat_activated()
73
68
    
74
69
    def is_attachment_correct(self, attachmentIndex=None):
114
109
        
115
110
    
116
111
    def is_meat_activated(self):
117
 
        """Returns whether the meat of this pigment or similar to it is activated"""
118
112
        (md1, md2) = (hashlib.md5(), hashlib.md5())
119
113
        client = gconf.client_get_default()
120
114
        try:
162
156
            return pb  
163
157
    
164
158
    def does_activation_require_root(self):
165
 
        """Returns whether the activation requires root rights.
166
 
        If it does, the pigment object will need a pexpect bash shell as root
167
 
        to be passed to some of its methods"""
168
159
        return False
169
160
    
170
161
    def get_display_data(self, index=0):
171
 
        """Returns the object of index to be added to a gtk.ListStore, this
172
 
        could be a string, a gtk.gdk.Pixbuf or a custom widget, it should
173
 
        be rendered using type.create_cell_renderer"""
174
162
        return
175
 
 
176
 
def main():
177
 
    wp = Metacity()
178
 
    print wp.information_xml().toxml()
179
 
 
180
 
if __name__ == "__main__":
181
 
    main()