def on_shownotes_message_expose_event(self, drawingarea, ctx): background = get_background_color() if background is None: background = Gdk.RGBA(1, 1, 1, 1) ctx.set_source_rgba(background.red, background.green, background.blue, 1) x1, y1, x2, y2 = ctx.clip_extents() ctx.rectangle(x1, y1, x2 - x1, y2 - y1) ctx.fill() width, height = drawingarea.get_allocated_width(), drawingarea.get_allocated_height(), text = _('Please select an episode') draw_text_box_centered(ctx, drawingarea, width, height, text, None, None) return False
def on_shownotes_message_expose_event(self, drawingarea, ctx): # paint the background white ctx.set_source_rgba(1, 1, 1) x1, y1, x2, y2 = ctx.clip_extents() ctx.rectangle(x1, y1, x2 - x1, y2 - y1) ctx.fill() width, height = drawingarea.get_allocated_width( ), drawingarea.get_allocated_height(), text = _('Please select an episode') draw_text_box_centered(ctx, drawingarea, width, height, text, None, None) return False
def on_shownotes_message_expose_event(self, drawingarea, event): ctx = event.window.cairo_create() ctx.rectangle(event.area.x, event.area.y, \ event.area.width, event.area.height) ctx.clip() # paint the background white colormap = event.window.get_colormap() gc = event.window.new_gc(foreground=colormap.alloc_color('white')) event.window.draw_rectangle(gc, True, event.area.x, event.area.y, \ event.area.width, event.area.height) x, y, width, height, depth = event.window.get_geometry() text = _('Please select an episode') draw_text_box_centered(ctx, drawingarea, width, height, text, None, None) return False
def on_treeview_expose_event(self, treeview, event): if event.window == treeview.get_bin_window(): model = treeview.get_model() if (model is not None and model.get_iter_first() is not None): return False ctx = event.window.cairo_create() ctx.rectangle(event.area.x, event.area.y, event.area.width, event.area.height) ctx.clip() x, y, width, height, depth = event.window.get_geometry() if self._is_updating: text = _('Loading podcast list') else: text = _('No podcasts') from gpodder.gtkui.frmntl import style font_desc = style.get_font_desc('LargeSystemFont') draw_text_box_centered(ctx, treeview, width, height, text, font_desc) return False