diff options
author | Rodrigo Moya <rodrigo@gnome-db.org> | 2010-12-10 20:15:27 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:41:26 +0800 |
commit | b5aba428f4d7daca78a6b079e1766d9fba5a8bc3 (patch) | |
tree | c8cd9400a62f2cf2b3ba84bd6e6b01774f2b3085 /widgets/misc/e-map.c | |
parent | cd633936b1f2f2e8c678dfb4e3e38ba9713e41a4 (diff) | |
download | gsoc2013-evolution-b5aba428f4d7daca78a6b079e1766d9fba5a8bc3.tar gsoc2013-evolution-b5aba428f4d7daca78a6b079e1766d9fba5a8bc3.tar.gz gsoc2013-evolution-b5aba428f4d7daca78a6b079e1766d9fba5a8bc3.tar.bz2 gsoc2013-evolution-b5aba428f4d7daca78a6b079e1766d9fba5a8bc3.tar.lz gsoc2013-evolution-b5aba428f4d7daca78a6b079e1766d9fba5a8bc3.tar.xz gsoc2013-evolution-b5aba428f4d7daca78a6b079e1766d9fba5a8bc3.tar.zst gsoc2013-evolution-b5aba428f4d7daca78a6b079e1766d9fba5a8bc3.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; |