150
151
description = description.replace("\n\n","</p><p>")
151
152
return description
152
153
def wksub_iconpath_loading(self):
153
# FIXME: looks ugly right now, gives a black rectangle on fade-in
154
#return self.datadir+"/status/loading.gif"
154
# FIXME: use relative path here
155
return "/usr/share/icons/hicolor/32x32/animations/software-store-loading.gif"
156
156
def wksub_iconpath(self):
157
iconinfo = self.icons.lookup_icon(self.iconname, self.APP_ICON_SIZE, 0)
157
iconinfo = self.icons.lookup_icon(os.path.splitext(self.iconname)[0],
158
self.APP_ICON_SIZE, 0)
159
160
iconpath = iconinfo.get_filename()
161
162
iconpath = self.MISSING_ICON_PATH
163
# *meh* if not png -> convert
164
# FIXME: make webkit understand xpm files instead
165
if iconpath.endswith(".xpm"):
166
self.tf = tempfile.NamedTemporaryFile()
167
pix = self.icons.load_icon(self.iconname, self.APP_ICON_SIZE, 0)
168
pix.save(self.tf.name, "png")
169
iconpath = self.tf.name
163
171
def wksub_software_installed_icon(self):
164
172
# FIXME: use relative path here
165
iconpath = "/usr/share/icons/hicolor/24x24/emblems/softwarestore_installed.png"
167
def wksub_width(self):
173
return "/usr/share/icons/hicolor/24x24/emblems/software-store-installed.png"
174
def wksub_icon_width(self):
168
175
return self.APP_ICON_SIZE
169
def wksub_height(self):
176
def wksub_icon_height(self):
170
177
return self.APP_ICON_SIZE
171
178
def wksub_action_button_label(self):
172
179
return self._get_action_button_label_and_value()[0]