[gnome-color-manager/gnome-3-12] Actually show the gcm-viewer preview when changing profiles



commit 4b4a3f3c2d84750466326b7e97d1e783413c9a27
Author: Richard Hughes <richard hughsie com>
Date:   Fri Apr 4 00:06:12 2014 +0200

    Actually show the gcm-viewer preview when changing profiles
    
    GTK now caches the surface data when show/hiding, and so our old trick didn't
    work anymore.

 src/gcm-image.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/gcm-image.c b/src/gcm-image.c
index 7479a76..9081b64 100644
--- a/src/gcm-image.c
+++ b/src/gcm-image.c
@@ -236,8 +236,9 @@ gcm_image_cms_convert_pixbuf (GcmImage *image)
 
        /* refresh widget */
        if (gtk_widget_get_visible (GTK_WIDGET(image))) {
-               gtk_widget_set_visible (GTK_WIDGET(image), FALSE);
-               gtk_widget_set_visible (GTK_WIDGET(image), TRUE);
+               g_object_ref (pixbuf_cms);
+               gtk_image_set_from_pixbuf (GTK_IMAGE (image), pixbuf_cms);
+               g_object_unref (pixbuf_cms);
        }
 out:
        /* destroy lcms state */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]