aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-12-13 13:50:17 +0000
committerChristian Grothoff <christian@grothoff.org>2011-12-13 13:50:17 +0000
commit8777f9ece13fe50a7e8571d585d2b1fd4ca3f94d (patch)
treed7c55fde8f462e1cac75563860d518c92e2b7c17
parentbefb57c4c9f5bb5cd3662b74c755a29dc161885a (diff)
downloadgnunet-gtk-8777f9ece13fe50a7e8571d585d2b1fd4ca3f94d.tar.gz
gnunet-gtk-8777f9ece13fe50a7e8571d585d2b1fd4ca3f94d.zip
-improved gtk 2.x fixes
-rw-r--r--src/statistics/gtk_statistics.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/statistics/gtk_statistics.c b/src/statistics/gtk_statistics.c
index adac737f..bc7797f4 100644
--- a/src/statistics/gtk_statistics.c
+++ b/src/statistics/gtk_statistics.c
@@ -129,13 +129,21 @@ static gboolean
129statistics_expose (GtkWidget *statistics, 129statistics_expose (GtkWidget *statistics,
130 GdkEventExpose *event) 130 GdkEventExpose *event)
131{ 131{
132 GtkAllocation alloc;
132 cairo_t *cr; 133 cairo_t *cr;
133 134 gint x;
134 cr = gdk_cairo_create (statistics->window); 135 gint y;
135 cairo_translate (cr, event->area.x, event->area.y); 136
137 gtk_widget_translate_coordinates (statistics,
138 GTK_WIDGET (gtk_widget_get_toplevel (statistics)),
139 0, 0,
140 &x, &y);
141 gtk_widget_get_allocation (statistics, &alloc);
142 cr = gdk_cairo_create (statistics->window);
143 cairo_translate (cr, x, y);
136 cairo_rectangle (cr, 144 cairo_rectangle (cr,
137 0, 0, 145 0, 0,
138 event->area.width, event->area.height); 146 alloc.width, alloc.height);
139 cairo_clip (cr); 147 cairo_clip (cr);
140 148
141 gtk_statistics_draw (statistics, cr); 149 gtk_statistics_draw (statistics, cr);