diff options
author | jmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-07-26 19:01:01 +0000 |
---|---|---|
committer | jmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-07-26 19:01:01 +0000 |
commit | d204300f059fe4a679a7e5ca1cac474096968499 (patch) | |
tree | 1231ce936463c6fc3526a91bb54404fd87fefc6d /gtk/tcp_graph.c | |
parent | 51643c0ad41e2c3f84e1ee5392f04c7cfa24ad53 (diff) |
Replace access to ...->allocation by gtk_widget_get_allocation +
using the return val - part 1
Maybe the call needs to be done more often.
Replace GTK_WIDGET_STATE by gtk_widget_get_state
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38215 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'gtk/tcp_graph.c')
-rw-r--r-- | gtk/tcp_graph.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk/tcp_graph.c b/gtk/tcp_graph.c index be82a06c99..7faa0df8e9 100644 --- a/gtk/tcp_graph.c +++ b/gtk/tcp_graph.c @@ -679,6 +679,7 @@ static void create_drawing_area (struct graph *g) char window_title[WINDOW_TITLE_LENGTH]; struct segment current; struct tcpheader *thdr; + GtkAllocation widget_alloc; debug(DBS_FENTRY) puts ("create_drawing_area()"); #if 0 @@ -761,10 +762,9 @@ static void create_drawing_area (struct graph *g) gtk_widget_show (g->toplevel); /* in case we didn't get what we asked for */ - g->wp.width = GTK_WIDGET (g->drawing_area)->allocation.width - - g->wp.x - RMARGIN_WIDTH; - g->wp.height = GTK_WIDGET (g->drawing_area)->allocation.height - - g->wp.y - g->x_axis->s.height; + gtk_widget_get_allocation(GTK_WIDGET (g->drawing_area), &widget_alloc); + g->wp.width = widget_alloc.width - g->wp.x - RMARGIN_WIDTH; + g->wp.height = widget_alloc.height - g->wp.y - g->x_axis->s.height; g->font = gtk_widget_get_style(g->drawing_area)->font_desc; |