diff options
author | Rodrigo Moya <rodrigo@gnome-db.org> | 2010-12-10 20:15:27 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-01-25 23:37:16 +0800 |
commit | b7c2f49973b93c2e80bed6f10c534af17b757c04 (patch) | |
tree | 938da8b0b636884610fa745542cb85f100fc8331 /widgets/misc/e-map.c | |
parent | a2f59fe0fc9e1b8737759ecb884bca18fa8defe3 (diff) | |
download | gsoc2013-evolution-b7c2f49973b93c2e80bed6f10c534af17b757c04.tar.gz gsoc2013-evolution-b7c2f49973b93c2e80bed6f10c534af17b757c04.tar.zst gsoc2013-evolution-b7c2f49973b93c2e80bed6f10c534af17b757c04.zip |
Adapt size_request vfuncs to latest gtk+-3.0 API.
Diffstat (limited to 'widgets/misc/e-map.c')
-rw-r--r-- | widgets/misc/e-map.c | 26 |
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; |