[gtranslator] Use gtk_widget_get_preferred_size instead of gtk_widget_size_request
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtranslator] Use gtk_widget_get_preferred_size instead of gtk_widget_size_request
- Date: Thu, 2 Feb 2012 13:38:25 +0000 (UTC)
commit 15322ba1696e12a5e529a25f3f48cabb848b66cb
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Thu Feb 2 14:42:28 2012 +0100
Use gtk_widget_get_preferred_size instead of gtk_widget_size_request
src/gtr-utils.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/gtr-utils.c b/src/gtr-utils.c
index 65cf9c5..a20abc0 100644
--- a/src/gtr-utils.c
+++ b/src/gtr-utils.c
@@ -223,7 +223,8 @@ gtr_utils_menu_position_under_widget (GtkMenu * menu,
GtkAllocation allocation;
gdk_window_get_origin (gtk_widget_get_window (w), x, y);
- gtk_widget_size_request (GTK_WIDGET (menu), &requisition);
+ gtk_widget_get_preferred_size (GTK_WIDGET (menu), &requisition,
+ NULL);
gtk_widget_get_allocation (w, &allocation);
if (gtk_widget_get_direction (w) == GTK_TEXT_DIR_RTL)
@@ -286,7 +287,8 @@ gtr_utils_menu_position_under_tree_view (GtkMenu * menu,
if (gtk_widget_get_direction (GTK_WIDGET (tree)) == GTK_TEXT_DIR_RTL)
{
GtkRequisition requisition;
- gtk_widget_size_request (GTK_WIDGET (menu), &requisition);
+ gtk_widget_get_preferred_size (GTK_WIDGET (menu),
+ &requisition, NULL);
*x += rect.width - requisition.width;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]