gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r18570 - gnunet-gtk/src/statistics


From: gnunet
Subject: [GNUnet-SVN] r18570 - gnunet-gtk/src/statistics
Date: Tue, 13 Dec 2011 14:50:17 +0100

Author: grothoff
Date: 2011-12-13 14:50:17 +0100 (Tue, 13 Dec 2011)
New Revision: 18570

Modified:
   gnunet-gtk/src/statistics/gtk_statistics.c
Log:
-improved gtk 2.x fixes

Modified: gnunet-gtk/src/statistics/gtk_statistics.c
===================================================================
--- gnunet-gtk/src/statistics/gtk_statistics.c  2011-12-13 13:17:33 UTC (rev 
18569)
+++ gnunet-gtk/src/statistics/gtk_statistics.c  2011-12-13 13:50:17 UTC (rev 
18570)
@@ -129,13 +129,21 @@
 statistics_expose (GtkWidget *statistics,
                   GdkEventExpose *event)
 {
+  GtkAllocation alloc;
   cairo_t *cr;
+  gint x;
+  gint y;
 
-  cr = gdk_cairo_create (statistics->window);
-  cairo_translate (cr, event->area.x, event->area.y);
+  gtk_widget_translate_coordinates (statistics,
+                                   GTK_WIDGET (gtk_widget_get_toplevel 
(statistics)), 
+                                   0, 0,
+                                   &x, &y);
+  gtk_widget_get_allocation (statistics, &alloc);
+   cr = gdk_cairo_create (statistics->window);
+  cairo_translate (cr, x, y);
   cairo_rectangle (cr,            
-                  0, 0,
-                  event->area.width, event->area.height);
+                  0, 0, 
+                  alloc.width, alloc.height);
   cairo_clip (cr);
 
   gtk_statistics_draw (statistics, cr);  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]