[eog] Fix deprecated GTK API usage



commit 9bd1a0720cb42486b87f0802a41346326af7bed6
Author: Robert Ancell <robert ancell canonical com>
Date:   Thu Feb 16 16:36:34 2012 +1100

    Fix deprecated GTK API usage
    
    https://bugzilla.gnome.org/show_bug.cgi?id=670184

 src/eog-print-image-setup.c |    2 +-
 src/eog-scroll-view.c       |    6 +++---
 src/eog-sidebar.c           |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/eog-print-image-setup.c b/src/eog-print-image-setup.c
index 7cbcf6c..4c7a726 100644
--- a/src/eog-print-image-setup.c
+++ b/src/eog-print-image-setup.c
@@ -986,7 +986,7 @@ eog_print_image_setup_init (EogPrintImageSetup *setup)
 							    2, 0);
 
 	label = gtk_label_new_with_mnemonic (_("_Scaling:"));
-	hscale = gtk_hscale_new_with_range (1, 100, 1);
+	hscale = gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, 1, 100, 1);
 	gtk_scale_set_value_pos (GTK_SCALE (hscale), GTK_POS_RIGHT);
 	gtk_range_set_value (GTK_RANGE (hscale), 100);
 	gtk_grid_attach_next_to (GTK_GRID (grid), hscale, priv->width,
diff --git a/src/eog-scroll-view.c b/src/eog-scroll-view.c
index 7f5b38a..561f6b6 100644
--- a/src/eog-scroll-view.c
+++ b/src/eog-scroll-view.c
@@ -434,9 +434,9 @@ check_scrollbar_visibility (EogScrollView *view, GtkAllocation *alloc)
 	compute_scaled_size (view, priv->zoom, &img_width, &img_height);
 
 	/* this should work fairly well in this special case for scrollbars */
-	gtk_widget_size_request (priv->hbar, &req);
+	gtk_widget_get_preferred_size (priv->hbar, &req, NULL);
 	bar_height = req.height;
-	gtk_widget_size_request (priv->vbar, &req);
+	gtk_widget_get_preferred_size (priv->vbar, &req, NULL);
 	bar_width = req.width;
 
 	eog_debug_message (DEBUG_WINDOW, "Widget Size allocate: %i, %i   Bar: %i, %i\n",
@@ -2466,7 +2466,7 @@ eog_scroll_view_init (EogScrollView *view)
 			  G_CALLBACK (adjustment_changed_cb),
 			  view);
 
-	priv->hbar = gtk_hscrollbar_new (priv->hadj);
+	priv->hbar = gtk_scrollbar_new (GTK_ORIENTATION_HORIZONTAL, priv->hadj);
 	priv->vadj = GTK_ADJUSTMENT (gtk_adjustment_new (0, 100, 0, 10, 10, 100));
 	g_signal_connect (priv->vadj, "value_changed",
 			  G_CALLBACK (adjustment_changed_cb),
diff --git a/src/eog-sidebar.c b/src/eog-sidebar.c
index a927b63..5239abc 100644
--- a/src/eog-sidebar.c
+++ b/src/eog-sidebar.c
@@ -260,7 +260,7 @@ eog_sidebar_select_button_press_cb (GtkWidget      *widget,
 		gtk_widget_get_allocation (widget, &allocation);
 
 		gtk_widget_set_size_request (eog_sidebar->priv->menu, -1, -1);
-		gtk_widget_size_request (eog_sidebar->priv->menu, &requisition);
+		gtk_widget_get_preferred_size (eog_sidebar->priv->menu, &requisition, NULL);
 		gtk_widget_set_size_request (eog_sidebar->priv->menu,
 					     MAX (allocation.width,
 						  requisition.width), -1);



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