[eog-plugins] Make eog-plugins close to fully GSEAL-compatibile



commit 7622c4f8aa075e9b86ba9677b62a83dd3508e7f1
Author: Felix Riemann <friemann gnome org>
Date:   Sun Jan 10 00:43:49 2010 +0100

    Make eog-plugins close to fully GSEAL-compatibile
    
    This makes the package work with GSEAL enable libraries.
    There is only one GTK_WIDGET_REALIZED pending replacement.

 plugins/exif-display/eog-exif-display-plugin.c |    9 +++++----
 plugins/fit-to-width/eog-fit-to-width-plugin.c |    5 ++++-
 2 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/plugins/exif-display/eog-exif-display-plugin.c b/plugins/exif-display/eog-exif-display-plugin.c
index ba82728..28646a4 100644
--- a/plugins/exif-display/eog-exif-display-plugin.c
+++ b/plugins/exif-display/eog-exif-display-plugin.c
@@ -462,8 +462,8 @@ drawing_area_expose (GtkDrawingArea *drawing_area, GdkEventExpose *event,
 		calculate_histogram (data, eog_image);
 	}
 
-	cr = gdk_cairo_create (GTK_WIDGET (drawing_area)->window);
-	gdk_drawable_get_size ((GTK_WIDGET (drawing_area)->window),
+	cr = gdk_cairo_create (gtk_widget_get_window (GTK_WIDGET (drawing_area)));
+	gdk_drawable_get_size (gtk_widget_get_window (GTK_WIDGET (drawing_area)),
 			&drawing_area_width, &drawing_area_height);
 
 	scale_factor_y = drawing_area_height;
@@ -477,8 +477,9 @@ drawing_area_expose (GtkDrawingArea *drawing_area, GdkEventExpose *event,
 
 	/* clear the display */
 	gtk_style = gtk_widget_get_style (GTK_WIDGET (drawing_area));
-	gtk_style_apply_default_background (gtk_style, GTK_WIDGET (drawing_area)->window,
-		TRUE, GTK_STATE_NORMAL, NULL, 0, 0, drawing_area_width, drawing_area_height);
+	gtk_style_apply_default_background (gtk_style,
+		gtk_widget_get_window (GTK_WIDGET (drawing_area)), TRUE,
+		GTK_STATE_NORMAL, NULL, 0, 0, drawing_area_width, drawing_area_height);
 
 	if (data->histogram_values_red == NULL) {
 		/* it's possible, if the image
diff --git a/plugins/fit-to-width/eog-fit-to-width-plugin.c b/plugins/fit-to-width/eog-fit-to-width-plugin.c
index 508db11..a7766a6 100644
--- a/plugins/fit-to-width/eog-fit-to-width-plugin.c
+++ b/plugins/fit-to-width/eog-fit-to-width-plugin.c
@@ -50,6 +50,8 @@ fit_to_width_cb (GtkAction *action,
 	gint           image_height;
 	gint           view_width;
 	double         zoom;
+	GtkAllocation  allocation;
+
 
 	g_return_if_fail (EOG_IS_WINDOW (window));
 
@@ -60,7 +62,8 @@ fit_to_width_cb (GtkAction *action,
 	g_return_if_fail (EOG_IS_IMAGE (image));
 
 	eog_image_get_size (image, &image_width, &image_height);
-	view_width = view->allocation.width;
+	gtk_widget_get_allocation (view, &allocation);
+	view_width = allocation.width;
 
 	// HACK: It's necessary subtract the width size (15) of vscrollbar
 	//       to scrollview for obtain the display area.



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