[gnome-games] ui: Add GameThumbnail.invalidate_cover()
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] ui: Add GameThumbnail.invalidate_cover()
- Date: Wed, 13 Jul 2016 07:25:46 +0000 (UTC)
commit 72c88f322ccd9364d3545933ffc428d87faa960e
Author: Adrien Plazas <kekun plazas laposte net>
Date: Wed Jul 13 08:52:51 2016 +0200
ui: Add GameThumbnail.invalidate_cover()
This will be used in the next commit to invalidate the cover cache.
src/ui/game-thumbnail.vala | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/ui/game-thumbnail.vala b/src/ui/game-thumbnail.vala
index 64aacf7..b40a79f 100644
--- a/src/ui/game-thumbnail.vala
+++ b/src/ui/game-thumbnail.vala
@@ -41,9 +41,9 @@ private class Games.GameThumbnail: Gtk.DrawingArea {
_cover = value;
if (_cover != null)
- _cover.changed.connect (queue_draw);
+ _cover.changed.connect (invalidate_cover);
- queue_draw ();
+ invalidate_cover ();
}
default = null;
}
@@ -198,6 +198,10 @@ private class Games.GameThumbnail: Gtk.DrawingArea {
}
}
+ private void invalidate_cover () {
+ queue_draw ();
+ }
+
private void draw_pixbuf (DrawingContext context, Gdk.Pixbuf pixbuf) {
var surface = Gdk.cairo_surface_create_from_pixbuf (pixbuf, 1, context.window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]