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/table/e-table.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/table/e-table.c')
-rw-r--r-- | widgets/table/e-table.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index d21137ef04..6a4d276e1b 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -226,13 +226,20 @@ current_search_col (ETable *et) } static void -et_size_request (GtkWidget *widget, GtkRequisition *request) +et_get_preferred_width (GtkWidget *widget, gint *minimum, gint *natural) { ETable *et = E_TABLE (widget); - if (GTK_WIDGET_CLASS (e_table_parent_class)->size_request) - GTK_WIDGET_CLASS (e_table_parent_class)->size_request (widget, request); - if (et->horizontal_resize) - request->width = MAX (request->width, et->header_width); + GTK_WIDGET_CLASS (e_table_parent_class)->get_preferred_width (widget, minimum, natural); + if (et->horizontal_resize) { + *minimum = MAX (*minimum, et->header_width); + *natural = MAX (*natural, et->header_width); + } +} + +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); } static void @@ -3239,7 +3246,8 @@ e_table_class_init (ETableClass *class) widget_class->grab_focus = et_grab_focus; widget_class->unrealize = et_unrealize; - widget_class->size_request = et_size_request; + widget_class->get_preferred_width = et_get_preferred_width; + widget_class->get_preferred_height = et_get_preferred_height; widget_class->focus = et_focus; |