def update(self, app): if app is not None: name, icon, cl = mime_operations.get_app_bio(app, ICON_SIZE) self.app_icon_view.set_from_pixbuf(icon) self.app_name_label.set_text(name) self.app_command_label.set_text(cl)
def add_custom_app(self, app): if app is not None: name, icon, cl = mime_operations.get_app_bio(app, ICON_SIZE) iter_ = self.list_store.append([app, name, icon, True, True]) path = self.list_store.get_path(iter_) self.apps_view.set_cursor(path)
def _set_data(self): for app in mime_operations.get_all_apps(): name, icon, cl = mime_operations.get_app_bio(app, ICON_SIZE) visible = app.should_show() f_support = app.supports_files() or app.supports_uris() self.list_store.append([app, name, icon, visible, f_support])
def set_data(self): #if self.vbox is not None: return apps = mime_operations.get_apps_for_mtypes(self.mtypes) for app in apps: name, icon, cl = mime_operations.get_app_bio(app, ICON_SIZE) self.list_store.append([app, name, icon, cl])
def _get_model_data_row(self, mtype): mtype, category, descr, icon = super(MimeViewCategories, self)._get_model_data_row(mtype) app = mime_operations.get_default_app(mtype) app_name, app_icon, *extra = mime_operations.get_app_bio( app, ICON_SIZE) return [mtype, category, descr, icon, app_name, app_icon]
def update_data(self, mtypes_to_change): for model, tree_iter in self.iterate_by_values(self.MIME_TYPE, mtypes_to_change): row_mtype = self.list_store.get_value(tree_iter, self.MIME_TYPE) app = mime_operations.get_default_app(row_mtype) name, icon, *extra = mime_operations.get_app_bio(app, ICON_SIZE) self.list_store.set_value(tree_iter, self.MIME_APP, name) self.list_store.set_value(tree_iter, self.MIME_APP_IMG, icon)
def on_add_new_app(self, new_app): if new_app is not None: name, icon, cl = mime_operations.get_app_bio(new_app, ICON_SIZE) tree_iter = self.list_store.append([new_app, name, icon, cl]) self.alt_view.get_selection().select_iter(tree_iter)
def on_application_selected(self, widget, app): self.selected_app = app name, icon, self.cline_text = mime_operations.get_app_bio(app, ICON_SIZE) self.custom_entry.set_text(self.cline_text)