~flimm/epidermis/icon-theme-bugfix

« back to all changes in this revision

Viewing changes to epidermis/pigments/gtk_.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:
59
59
 
60
60
    
61
61
    def is_installed(self, installationDirectory=None):
62
 
        """Returns whether this pigment is installed
63
 
        installationDirectory: the directory in which to search for already 
64
 
        installed pigments"""
65
62
        if DirBasedPigment.is_installed(self, installationDirectory):
66
63
            if os.path.exists(os.path.join(self.type.publicBaseDir,self.attDirname, "gtk-2.0")):
67
64
                return True
68
65
        return False
69
66
    
70
67
    def is_activated(self):
71
 
        """Returns whether this pigment is applied. To check if the effects
72
 
        have been activated regardless of Epidermis' pigments, use is_meat_activated"""
73
68
        return self.is_meat_activated()
74
69
 
75
70
    def is_attachment_correct(self, attachmentIndex=None):
95
90
        return True
96
91
    
97
92
    def is_meat_installed(self):
98
 
        """Returns whether the meat of this pigment or similar to it is installed"""
99
93
        (md1, md2) = (hashlib.md5(), hashlib.md5())
100
94
        try:
101
95
            f1 = glob(self.attPath + "/gtk-2.0/*") # = file(self.attPath, 'rb')
115
109
        
116
110
    
117
111
    def is_meat_activated(self):
118
 
        """Returns whether the meat of this pigment or similar to it is activated"""
119
112
        (md1, md2) = (hashlib.md5(), hashlib.md5())
120
113
        client = gconf.client_get_default()
121
114
        try:
157
150
            return None  
158
151
    
159
152
    def does_activation_require_root(self):
160
 
        """Returns whether the activation requires root rights.
161
 
        If it does, the pigment object will need a pexpect bash shell as root
162
 
        to be passed to some of its methods"""
163
153
        return False
164
154
    
165
155
    def get_display_data(self, index=0):
166
 
        """Returns the object of index to be added to a gtk.ListStore, this
167
 
        could be a string, a gtk.gdk.Pixbuf or a custom widget, it should
168
 
        be rendered using type.create_cell_renderer"""
169
156
        return
170
 
 
171
 
def main():
172
 
    wp = GTK()
173
 
    print wp.information_xml().toxml()
174
 
 
175
 
if __name__ == "__main__":
176
 
    main()