[gedit] Use gtk_size_request_get_size instead of gtk_widget_size_request.



commit afb2840d3d45c80a8b9f8ce8e77e83c57edc935b
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Sat Sep 18 20:59:47 2010 +0200

    Use gtk_size_request_get_size instead of gtk_widget_size_request.
    
    With the last release of gtk+ gtk_widget_size_request has been deprencated
    so we bump the version and use the new function.

 configure.ac                                      |    2 +-
 gedit/gedit-documents-panel.c                     |    3 ++-
 gedit/gedit-overlay.c                             |    3 ++-
 gedit/gedit-rounded-frame.c                       |    3 ++-
 gedit/gedit-status-combo-box.c                    |   10 ++++++----
 gedit/gedit-utils.c                               |    3 ++-
 gedit/theatrics/gedit-theatrics-animated-widget.c |    3 ++-
 7 files changed, 17 insertions(+), 10 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 94f392d..b99bb83 100644
--- a/configure.ac
+++ b/configure.ac
@@ -271,7 +271,7 @@ PKG_CHECK_MODULES(GEDIT, [
 	glib-2.0 >= 2.25.15
 	gthread-2.0 >= 2.13.0
 	gio-2.0 >= 2.25.11
-	gtk+-3.0 >= 2.90.7
+	gtk+-3.0 >= 2.90.8
 	gtksourceview-3.0 >= 2.11.2
 	libpeas-1.0 >= 0.5.5
 	libpeas-gtk-1.0 >= 0.5.5
diff --git a/gedit/gedit-documents-panel.c b/gedit/gedit-documents-panel.c
index ecda4e4..b6f735d 100644
--- a/gedit/gedit-documents-panel.c
+++ b/gedit/gedit-documents-panel.c
@@ -758,7 +758,8 @@ menu_position (GtkMenu             *menu,
 
 	gdk_window_get_origin (gtk_widget_get_window (w), x, y);
 
-	gtk_widget_size_request (GTK_WIDGET (menu), &requisition);
+	gtk_size_request_get_size (GTK_SIZE_REQUEST (menu), &requisition,
+	                           NULL);
 
 	gtk_widget_get_allocation (w, &allocation);
 
diff --git a/gedit/gedit-overlay.c b/gedit/gedit-overlay.c
index dc09b51..eb0d7db 100644
--- a/gedit/gedit-overlay.c
+++ b/gedit/gedit-overlay.c
@@ -234,7 +234,8 @@ set_children_positions (GeditOverlay *overlay)
 		if (child->child == overlay->priv->main_widget)
 			continue;
 
-		gtk_widget_size_request (child->child, &req);
+		gtk_size_request_get_size (GTK_SIZE_REQUEST (child->child), &req,
+		                           NULL);
 
 		alloc.x = child->fixed_position ? child->x :
 		          child->x * gtk_adjustment_get_value (overlay->priv->hadjustment);
diff --git a/gedit/gedit-rounded-frame.c b/gedit/gedit-rounded-frame.c
index c762021..fb971d5 100644
--- a/gedit/gedit-rounded-frame.c
+++ b/gedit/gedit-rounded-frame.c
@@ -58,7 +58,8 @@ gedit_rounded_frame_size_request (GtkWidget      *widget,
 		GtkRequisition child_requisition;
 
 		/* Add the child's width/height */
-		gtk_widget_size_request (frame->priv->child, &child_requisition);
+		gtk_size_request_get_size (GTK_SIZE_REQUEST (frame->priv->child),
+		                           &child_requisition, NULL);
 
 		requisition->width = MAX (0, child_requisition.width);
 		requisition->height = child_requisition.height;
diff --git a/gedit/gedit-status-combo-box.c b/gedit/gedit-status-combo-box.c
index 18fbbb4..25411d1 100644
--- a/gedit/gedit-status-combo-box.c
+++ b/gedit/gedit-status-combo-box.c
@@ -178,8 +178,9 @@ menu_position_func (GtkMenu		*menu,
 	GtkAllocation allocation;
 	
 	*push_in = FALSE;
-	
-	gtk_widget_size_request (gtk_widget_get_toplevel (GTK_WIDGET (menu)), &request);
+
+	gtk_size_request_get_size (GTK_SIZE_REQUEST (gtk_widget_get_toplevel (GTK_WIDGET (menu))),
+	                           &request, NULL);
 	
 	/* get the origin... */
 	gdk_window_get_origin (gtk_widget_get_window (GTK_WIDGET (combo)), x, y);
@@ -203,8 +204,9 @@ show_menu (GeditStatusComboBox *combo,
 	GtkRequisition request;
 	gint max_height;
 	GtkAllocation allocation;
-	
-	gtk_widget_size_request (combo->priv->menu, &request);
+
+	gtk_size_request_get_size (GTK_SIZE_REQUEST (combo->priv->menu),
+	                           &request, NULL);
 
 	/* do something relative to our own height here, maybe we can do better */
 	gtk_widget_get_allocation (GTK_WIDGET (combo), &allocation);
diff --git a/gedit/gedit-utils.c b/gedit/gedit-utils.c
index beece59..a86d0b4 100644
--- a/gedit/gedit-utils.c
+++ b/gedit/gedit-utils.c
@@ -101,7 +101,8 @@ gedit_utils_menu_position_under_widget (GtkMenu  *menu,
 	widget = GTK_WIDGET (user_data);
 	widget_get_origin (widget, x, y);
 
-	gtk_widget_size_request (GTK_WIDGET (menu), &requisition);
+	gtk_size_request_get_size (GTK_SIZE_REQUEST (menu), &requisition,
+	                           NULL);
 
 	gtk_widget_get_allocation (widget, &allocation);
 
diff --git a/gedit/theatrics/gedit-theatrics-animated-widget.c b/gedit/theatrics/gedit-theatrics-animated-widget.c
index 4ee6ff4..5ba58a3 100644
--- a/gedit/theatrics/gedit-theatrics-animated-widget.c
+++ b/gedit/theatrics/gedit-theatrics-animated-widget.c
@@ -242,7 +242,8 @@ gedit_theatrics_animated_widget_size_request (GtkWidget      *widget,
 	{
 		GtkRequisition req;
 
-		gtk_widget_size_request (aw->priv->widget, &req);
+		gtk_size_request_get_size (GTK_SIZE_REQUEST (aw->priv->widget),
+		                           &req, NULL);
 		aw->priv->widget_alloc.width = req.width;
 		aw->priv->widget_alloc.height = req.height;
 	}



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