~flimm/epidermis/icon-theme-bugfix

« back to all changes in this revision

Viewing changes to epidermis/pigments/wallpaper.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:
95
95
            self.secondaryColour = ""
96
96
        
97
97
    def information_xml(self):
98
 
        """Returns the XML document describing the pigment"""
99
98
        doc = FileBasedPigment.information_xml(self)
100
99
        root = doc.getElementsByTagName("pigment")[0]
101
100
        
115
114
    
116
115
    
117
116
    def is_activated(self):
118
 
        """Returns whether this pigment is applied. To check if the effects
119
 
        have been activated regardless of Epidermis' pigments, use is_meat_activated"""
120
117
        if self.is_meat_activated():
121
118
            client = gconf.engine_get_default()
122
119
            if self.pictureOptions != client.get_string("/desktop/gnome/background/picture_options") or \
143
140
 
144
141
    
145
142
    def is_meat_activated(self):
146
 
        """Returns whether the meat of this pigment or similar to it is activated"""
147
143
        (md1, md2) = (hashlib.md5(), hashlib.md5())
148
144
        client = gconf.client_get_default()
149
145
        try:
169
165
            return pb
170
166
    
171
167
    def does_activation_require_root(self):
172
 
        """Returns whether the activation requires root rights.
173
 
        If it does, the pigment object will need a pexpect bash shell as root
174
 
        to be passed to some of its methods"""
175
168
        return False
176
169
    
177
170
    def get_display_data(self, index=0):
178
 
        """Returns the object of index to be added to a gtk.ListStore, this
179
 
        could be a string, a gtk.gdk.Pixbuf or a custom widget, it should
180
 
        be rendered using type.create_cell_renderer"""
181
171
        return
182
 
 
183
 
def main():
184
 
    wp = Wallpaper()
185
 
    print wp.information_xml().toxml()
186
 
    print wp.previewFilename
187
 
 
188
 
if __name__ == "__main__":
189
 
    main()