[gnome-commander] Revert the bug introduced in commit 5c910d1102d89c8d413f6e2b6d517b1daf3c2239



commit b4387cd8e237087912cd1ef8ed225d5a8af70991
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Mon Jun 14 18:27:33 2010 +0200

    Revert the bug introduced in commit 5c910d1102d89c8d413f6e2b6d517b1daf3c2239

 src/intviewer/image-render.cc |   16 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/src/intviewer/image-render.cc b/src/intviewer/image-render.cc
index bb916c7..dc18876 100644
--- a/src/intviewer/image-render.cc
+++ b/src/intviewer/image-render.cc
@@ -358,9 +358,6 @@ static void image_render_realize (GtkWidget *widget)
     ImageRender *obj = IMAGE_RENDER (widget);
 
     GdkWindowAttr attributes;
-#if GTK_CHECK_VERSION (2,14,0)
-    GdkWindow *window = gtk_widget_get_window (widget);
-#endif
 
     attributes.x = widget->allocation.x;
     attributes.y = widget->allocation.y;
@@ -376,17 +373,16 @@ static void image_render_realize (GtkWidget *widget)
     attributes.colormap = gtk_widget_get_colormap (widget);
 
     gint attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
-    widget->window = gdk_window_new (widget->parent->window, &attributes, attributes_mask);
 
-#if GTK_CHECK_VERSION (2,14,0)
+    GdkWindow *window = gdk_window_new (widget->parent->window, &attributes, attributes_mask);
+#if GTK_CHECK_VERSION (2,18,0)
+    gtk_widget_set_window (widget, window);
+#else
+    widget->window = window;
+#endif
     widget->style = gtk_style_attach (widget->style, window);
     gdk_window_set_user_data (window, widget);
     gtk_style_set_background (widget->style, window, GTK_STATE_ACTIVE);
-#else
-    widget->style = gtk_style_attach (widget->style, widget->window);
-    gdk_window_set_user_data (widget->window, widget);
-    gtk_style_set_background (widget->style, widget->window, GTK_STATE_ACTIVE);
-#endif
 
     // image_render_prepare_disp_pixbuf (obj);
     if (!obj->priv->scaled_pixbuf_loaded)



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