commit 0634ab2ffa9fa10e0b0854080e7ad6f052f68b10
Author: Vibha Yadav <gtk3@linux-qoy7.site>
Date:   Thu Dec 9 11:59:41 2010 +0530

    remaining size_request replacements

diff --git a/calendar/gui/weekday-picker.c b/calendar/gui/weekday-picker.c
index 8cf6367..72be0c1 100644
--- a/calendar/gui/weekday-picker.c
+++ b/calendar/gui/weekday-picker.c
@@ -222,8 +222,9 @@ weekday_picker_realize (GtkWidget *widget)
 }
 
 static void
-weekday_picker_size_request (GtkWidget *widget,
-                             GtkRequisition *requisition)
+weekday_picker_get_preferred_width (GtkWidget *widget,
+                             	    gint *minimum_width,
+				    gint *natural_width)
 {
 	WeekdayPicker *wp;
 	WeekdayPickerPrivate *priv;
@@ -231,8 +232,20 @@ weekday_picker_size_request (GtkWidget *widget,
 	wp = WEEKDAY_PICKER (widget);
 	priv = wp->priv;
 
-	requisition->width = (priv->max_letter_width + 2 * PADDING + 1) * 7 + 1;
-	requisition->height = (priv->font_ascent + priv->font_descent + 2 * PADDING + 2);
+	*minimum_width = *natural_width = (priv->max_letter_width + 2 * PADDING + 1) * 7 + 1;
+}
+static void
+weekday_picker_get_preferred_height (GtkWidget *widget,
+                             	    gint *minimum_height,
+				    gint *natural_height)
+{
+	WeekdayPicker *wp;
+	WeekdayPickerPrivate *priv;
+
+	wp = WEEKDAY_PICKER (widget);
+	priv = wp->priv;
+
+	*minimum_height = *natural_height = (priv->font_ascent + priv->font_descent + 2 * PADDING + 2);
 }
 
 static void
@@ -349,7 +362,8 @@ weekday_picker_class_init (WeekdayPickerClass *class)
 
 	widget_class = GTK_WIDGET_CLASS (class);
 	widget_class->realize = weekday_picker_realize;
-	widget_class->size_request = weekday_picker_size_request;
+	widget_class->get_preferred_width = weekday_picker_get_preferred_width;
+	widget_class->get_preferred_height = weekday_picker_get_preferred_height;
 	widget_class->size_allocate = weekday_picker_size_allocate;
 	widget_class->style_set = weekday_picker_style_set;
 	widget_class->focus = weekday_picker_focus;
diff --git a/modules/mail/e-mail-shell-sidebar.c b/modules/mail/e-mail-shell-sidebar.c
index 2b24aae..7c538de 100644
--- a/modules/mail/e-mail-shell-sidebar.c
+++ b/modules/mail/e-mail-shell-sidebar.c
@@ -231,8 +231,17 @@ guess_screen_width (EMailShellSidebar *sidebar)
 }
 
 static void
-mail_shell_sidebar_size_request (GtkWidget *widget,
-                                 GtkRequisition *requisition)
+mail_shell_sidebar_get_preferred_height (GtkWidget *widget,
+					 gint *minimum_height,
+					 gint *natural_height)
+{
+	GTK_WIDGET_CLASS (parent_class)->get_preferred_height (widget, minimum_height, natural_height);
+}
+
+static void
+mail_shell_sidebar_get_preferred_width (GtkWidget *widget,
+					gint *minimum_width,
+					gint *natural_width)
 {
 	/* We override the normal size-request handler so that we can
 	 * spit out a treeview with a suitable width.  We measure the
@@ -258,7 +267,7 @@ mail_shell_sidebar_size_request (GtkWidget *widget,
 
 	sidebar = E_MAIL_SHELL_SIDEBAR (widget);
 
-	GTK_WIDGET_CLASS (parent_class)->size_request (widget, requisition);
+	GTK_WIDGET_CLASS (parent_class)->get_preferred_width (widget, minimum_width, natural_width);
 
 	/* This string is a mockup only; it doesn't need to be translated */
 	layout = gtk_widget_create_pango_layout (
@@ -274,7 +283,7 @@ mail_shell_sidebar_size_request (GtkWidget *widget,
 	border = 2 * style->xthickness + 4;
 	sidebar_width = ink_rect.width + border;
 	sidebar_width = MIN (sidebar_width, screen_width / 4);
-	requisition->width = MAX (requisition->width, sidebar_width);
+	*minimum_width = *natural_width = MAX (*natural_width, sidebar_width);
 }
 
 static guint32
@@ -305,7 +314,8 @@ mail_shell_sidebar_class_init (EMailShellSidebarClass *class)
 	object_class->constructed = mail_shell_sidebar_constructed;
 
 	widget_class = GTK_WIDGET_CLASS (class);
-	widget_class->size_request = mail_shell_sidebar_size_request;
+	widget_class->get_preferred_width = mail_shell_sidebar_get_preferred_width;
+	widget_class->get_preferred_height = mail_shell_sidebar_get_preferred_height;
 
 	shell_sidebar_class = E_SHELL_SIDEBAR_CLASS (class);
 	shell_sidebar_class->check_state = mail_shell_sidebar_check_state;
diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c
index 7ec162a..f310926 100644
--- a/widgets/misc/e-map.c
+++ b/widgets/misc/e-map.c
@@ -458,7 +458,7 @@ e_map_get_preferred_width (GtkWidget *widget, gint *minimum, gint *natural)
 
 	/* TODO: Put real sizes here. */
 
-	*minimum = *natural = gdk_pixbuf_get_width (priv->map_pixbuf);
+	*minimum = *natural = gdk_pixbuf_get_width (map->priv->map_pixbuf);
 }
 
 static void
diff --git a/widgets/misc/e-menu-tool-button.c b/widgets/misc/e-menu-tool-button.c
index 612ed80..89b20c2 100644
--- a/widgets/misc/e-menu-tool-button.c
+++ b/widgets/misc/e-menu-tool-button.c
@@ -100,14 +100,28 @@ menu_tool_button_update_button (GtkToolButton *tool_button)
 }
 
 static void
-menu_tool_button_size_request (GtkWidget *widget,
-                               GtkRequisition *requisition)
+menu_tool_button_get_preferred_height 	(GtkWidget *widget,
+					gint *minimum_height,
+                               		gint *natural_height)
 {
-	gint minimum_width;
+	/* Chain up to parent's get_preferred_height() method. */
+	GTK_WIDGET_CLASS (e_menu_tool_button_parent_class)->
+		get_preferred_height (widget, minimum_height, natural_height);
+}
+
+static void
+menu_tool_button_get_preferred_width 	(GtkWidget *widget,
+					gint *minimum_width,
+                               		gint *natural_width)
+{
+	gint minimum_height, natural_height;
+
+	/* Chain up to parent's get_preferred_width() method. */
+	GTK_WIDGET_CLASS (e_menu_tool_button_parent_class)->
+		get_preferred_width (widget, minimum_width, natural_width);
 
-	/* Chain up to parent's size_request() method. */
 	GTK_WIDGET_CLASS (e_menu_tool_button_parent_class)->
-		size_request (widget, requisition);
+		get_preferred_height (widget, &minimum_height, &natural_height);
 
 	/* XXX This is a hack.  This widget is only used for the New
 	 *     button in the main window toolbar.  The New button is
@@ -117,8 +131,8 @@ menu_tool_button_size_request (GtkWidget *widget,
 	 *
 	 *     We can't go hard-coding a width, but we -can- use a
 	 *     heuristic based on the toolbar button height. */
-	minimum_width = requisition->height * 2;
-	requisition->width = MAX (minimum_width, requisition->width);
+	*minimum_width = natural_height * 2;
+	*natural_width = MAX (*minimum_width, *natural_width);
 }
 
 static void
@@ -141,7 +155,8 @@ e_menu_tool_button_class_init (EMenuToolButtonClass *class)
 	GtkToolButtonClass *tool_button_class;
 
 	widget_class = GTK_WIDGET_CLASS (class);
-	widget_class->size_request = menu_tool_button_size_request;
+	widget_class->get_preferred_width = menu_tool_button_get_preferred_width;
+	widget_class->get_preferred_height = menu_tool_button_get_preferred_height;
 
 	tool_button_class = GTK_TOOL_BUTTON_CLASS (class);
 	tool_button_class->clicked = menu_tool_button_clicked;
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index 0b53afc..f91f4c4 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -228,7 +228,7 @@ current_search_col (ETable *et)
 	return et->current_search_col;
 }
 
-static_void
+static void
 et_get_preferred_width (GtkWidget *widget, gint *minimum, gint *natural)
 {
 	ETable *et = E_TABLE (widget);
@@ -239,7 +239,7 @@ et_get_preferred_width (GtkWidget *widget, gint *minimum, gint *natural)
         }
 }
 
-static_void
+static void
 et_get_preferred_height (GtkWidget *widget, gint *minimum, gint *natural)
 {
         GTK_WIDGET_CLASS (e_table_parent_class)->get_preferred_height (widget, minimum, natural);
