From b140884fec56d0ac5f15fe3937879a7a1dd6f0c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jard=C3=B3n?= Date: Tue, 14 Sep 2010 03:33:06 +0200 Subject: [PATCH] Use gtk_size_request_get_size() instead deprecated gtk_widget_size_request() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes https://bugzilla.gnome.org/show_bug.cgi?id=629598 Signed-off-by: Javier Jardón Signed-off-by: Tristan Van Berkom --- demos/gtk-demo/offscreen_window.c | 3 ++- demos/gtk-demo/offscreen_window2.c | 3 ++- docs/reference/gtk/tmpl/gtkcontainer.sgml | 2 +- .../gtk/tmpl/gtkfilechooserbutton.sgml | 2 +- gtk/gtkaccellabel.c | 3 ++- gtk/gtkassistant.c | 15 +++++++---- gtk/gtkbbox.c | 3 ++- gtk/gtkcellrendereraccel.c | 11 +++++--- gtk/gtkcellrenderertext.c | 11 +++++--- gtk/gtkcheckbutton.c | 5 ++-- gtk/gtkcolorsel.c | 8 ++++-- gtk/gtkcombobox.c | 21 ++++++++++----- gtk/gtkcontainer.c | 10 ++++--- gtk/gtkentry.c | 3 ++- gtk/gtkentrycompletion.c | 11 +++++--- gtk/gtkeventbox.c | 9 +++++-- gtk/gtkfilechooserdefault.c | 16 +++++++---- gtk/gtkfilechooserdialog.c | 11 +++++--- gtk/gtkfilechooserentry.c | 8 ++++-- gtk/gtkfixed.c | 3 ++- gtk/gtkhandlebox.c | 5 +++- gtk/gtkiconview.c | 5 ++-- gtk/gtkimagemenuitem.c | 4 +-- gtk/gtklabel.c | 3 ++- gtk/gtklayout.c | 3 ++- gtk/gtklinkbutton.c | 8 +++--- gtk/gtkmenu.c | 12 ++++++--- gtk/gtkmenubar.c | 3 ++- gtk/gtkmenutoolbutton.c | 9 +++++-- gtk/gtknotebook.c | 18 ++++++++----- gtk/gtkoffscreenwindow.c | 10 +++++-- gtk/gtkpaned.c | 6 +++-- gtk/gtkpathbar.c | 11 +++++--- gtk/gtkprintoperation-win32.c | 5 ++-- gtk/gtkrecentchooserdefault.c | 7 +++-- gtk/gtkscrolledwindow.c | 8 +++--- gtk/gtksocket.c | 8 ++++-- gtk/gtkstatusicon.c | 7 +++-- gtk/gtktable.c | 3 ++- gtk/gtktextview.c | 12 ++++----- gtk/gtktoolbar.c | 25 +++++++++-------- gtk/gtktoolitem.c | 7 +++-- gtk/gtktoolitemgroup.c | 27 ++++++++++++------- gtk/gtktoolpalette.c | 3 ++- gtk/gtktooltip.c | 7 +++-- gtk/gtktreeview.c | 23 ++++++++++------ gtk/gtkwidget.c | 2 +- gtk/gtkwin32embedwidget.c | 3 ++- gtk/gtkwindow.c | 12 +++++---- modules/input/gtkimcontextxim.c | 5 ++-- tests/gtkoffscreenbox.c | 6 +++-- tests/testgtk.c | 3 ++- 52 files changed, 284 insertions(+), 144 deletions(-) diff --git a/demos/gtk-demo/offscreen_window.c b/demos/gtk-demo/offscreen_window.c index 622250efd6..0e0d067206 100644 --- a/demos/gtk-demo/offscreen_window.c +++ b/demos/gtk-demo/offscreen_window.c @@ -392,7 +392,8 @@ gtk_rotated_bin_size_request (GtkWidget *widget, child_requisition.height = 0; if (bin->child && gtk_widget_get_visible (bin->child)) - gtk_widget_size_request (bin->child, &child_requisition); + gtk_size_request_get_size (GTK_SIZE_REQUEST (bin->child), + &child_requisition, NULL); s = sin (bin->angle); c = cos (bin->angle); diff --git a/demos/gtk-demo/offscreen_window2.c b/demos/gtk-demo/offscreen_window2.c index 6e7cceeb4c..d162a360e7 100644 --- a/demos/gtk-demo/offscreen_window2.c +++ b/demos/gtk-demo/offscreen_window2.c @@ -316,7 +316,8 @@ gtk_mirror_bin_size_request (GtkWidget *widget, child_requisition.height = 0; if (bin->child && gtk_widget_get_visible (bin->child)) - gtk_widget_size_request (bin->child, &child_requisition); + gtk_size_request_get_size (GTK_SIZE_REQUEST (bin->child), + &child_requisition, NULL); border_width = gtk_container_get_border_width (GTK_CONTAINER (widget)); requisition->width = border_width * 2 + child_requisition.width + 10; diff --git a/docs/reference/gtk/tmpl/gtkcontainer.sgml b/docs/reference/gtk/tmpl/gtkcontainer.sgml index 3218186cd4..ea2ff059f0 100644 --- a/docs/reference/gtk/tmpl/gtkcontainer.sgml +++ b/docs/reference/gtk/tmpl/gtkcontainer.sgml @@ -58,7 +58,7 @@ of their children. The size requisition phase of the widget layout process operates top-down. It starts at a top-level widget, typically a #GtkWindow. The top-level widget -asks its child for its size requisition by calling gtk_widget_size_request(). +asks its child for its size requisition by calling gtk_size_request_get_size(). To determine its requisition, the child asks its own children for their requisitions and so on. Finally, the top-level widget will get a requisition back from its child. diff --git a/docs/reference/gtk/tmpl/gtkfilechooserbutton.sgml b/docs/reference/gtk/tmpl/gtkfilechooserbutton.sgml index 6042343797..4f338198a5 100644 --- a/docs/reference/gtk/tmpl/gtkfilechooserbutton.sgml +++ b/docs/reference/gtk/tmpl/gtkfilechooserbutton.sgml @@ -37,7 +37,7 @@ The #GtkFileChooserButton supports the #GtkFileChooserAction