aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-map.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/misc/e-map.c')
-rw-r--r--widgets/misc/e-map.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c
index 89ca22b76a..842d396c7e 100644
--- a/widgets/misc/e-map.c
+++ b/widgets/misc/e-map.c
@@ -388,20 +388,35 @@ e_map_unrealize (GtkWidget *widget)
}
static void
-e_map_size_request (GtkWidget *widget, GtkRequisition *requisition)
+e_map_get_preferred_width (GtkWidget *widget, gint *minimum, gint *natural)
{
EMap *map;
g_return_if_fail (widget != NULL);
g_return_if_fail (E_IS_MAP (widget));
- g_return_if_fail (requisition != NULL);
map = E_MAP (widget);
/* TODO: Put real sizes here. */
- requisition->width = gdk_pixbuf_get_width (map->priv->map_pixbuf);
- requisition->height = gdk_pixbuf_get_height (map->priv->map_pixbuf);
+ *minimum = *natural = gdk_pixbuf_get_width (map->priv->map_pixbuf);
+}
+
+static void
+e_map_get_preferred_height (GtkWidget *widget, gint *minimum, gint *natural)
+{
+ EMap *view;
+ EMapPrivate *priv;
+
+ g_return_if_fail (widget != NULL);
+ g_return_if_fail (E_IS_MAP (widget));
+
+ view = E_MAP (widget);
+ priv = view->priv;
+
+ /* TODO: Put real sizes here. */
+
+ *minimum = *natural = gdk_pixbuf_get_height (priv->map_pixbuf);
}
static void
@@ -621,7 +636,8 @@ e_map_class_init (EMapClass *class)
widget_class = GTK_WIDGET_CLASS (class);
widget_class->realize = e_map_realize;
widget_class->unrealize = e_map_unrealize;
- widget_class->size_request = e_map_size_request;
+ widget_class->get_preferred_height = e_map_get_preferred_height;
+ widget_class->get_preferred_width = e_map_get_preferred_width;
widget_class->size_allocate = e_map_size_allocate;
widget_class->button_press_event = e_map_button_press;
widget_class->button_release_event = e_map_button_release;