145
145
FilteredCommand.ok_handler(self)
147
147
class MythbuntuThemes(FilteredCommand):
148
#since all themes are pre-installed, we are seeding the ones
149
#that will be *removed*
148
150
def prepare(self):
149
151
questions = ['^mythbuntu/officialthemes',
150
152
'^mythbuntu/communitythemes']
153
155
def run(self,priority,question):
154
156
if question.startswith('mythbuntu/officialthemes'):
155
157
official = self.frontend.get_officialthemes()
156
self.preseed_bool('mythbuntu/officialthemes', official)
159
for theme in official:
160
if not official[theme].get_active():
161
official_string+=theme + " "
162
self.preseed('mythbuntu/officialthemes', official_string)
157
163
elif question.startswith('mythbuntu/communitythemes'):
158
164
community = self.frontend.get_communitythemes()
159
self.preseed_bool('mythbuntu/communitythemes', community)
166
for theme in community:
167
if not community[theme].get_active():
168
community_string+=theme + " "
169
self.preseed('mythbuntu/communitythemes', community_string)
161
171
return FilteredCommand.run(self, priority, question)
163
173
def ok_handler(self):
164
174
official = self.frontend.get_officialthemes()
165
self.preseed_bool('mythbuntu/officialthemes', official)
176
for theme in official:
177
if not official[theme].get_active():
178
official_string+=theme + " "
179
self.preseed('mythbuntu/officialthemes', official_string)
166
180
community = self.frontend.get_communitythemes()
167
self.preseed_bool('mythbuntu/communitythemes', community)
182
for theme in community:
183
if not community[theme].get_active():
184
community_string+=theme + " "
185
self.preseed('mythbuntu/communitythemes', community_string)
168
186
FilteredCommand.ok_handler(self)
170
188
class MythbuntuServices(FilteredCommand):