[gtk+] fix build for gtkdial example



commit 812e129cd612f1b374be310c06d6f5142bb4603b
Author: Tomasz Mon <desowin gmail com>
Date:   Tue Apr 28 14:34:44 2009 -0400

    fix build for gtkdial example
    
    Replace use of deprecated GTK_SIGNAL_FUNC with G_CALLBACK,
    and add depth to blankstyle.  Fixes Bug #578634.
---
 examples/gtkdial/gtkdial.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/examples/gtkdial/gtkdial.c b/examples/gtkdial/gtkdial.c
index 87c8dbb..385ed42 100644
--- a/examples/gtkdial/gtkdial.c
+++ b/examples/gtkdial/gtkdial.c
@@ -190,11 +190,11 @@ gtk_dial_set_adjustment (GtkDial      *dial,
   dial->adjustment = adjustment;
   g_object_ref (GTK_OBJECT (dial->adjustment));
 
-  g_signal_connect (GTK_OBJECT (adjustment), "changed",
-		    GTK_SIGNAL_FUNC (gtk_dial_adjustment_changed),
+  g_signal_connect (G_OBJECT (adjustment), "changed",
+		    G_CALLBACK (gtk_dial_adjustment_changed),
 		    (gpointer) dial);
-  g_signal_connect (GTK_OBJECT (adjustment), "value_changed",
-		    GTK_SIGNAL_FUNC (gtk_dial_adjustment_value_changed),
+  g_signal_connect (G_OBJECT (adjustment), "value_changed",
+		    G_CALLBACK (gtk_dial_adjustment_value_changed),
 		    (gpointer) dial);
 
   dial->old_value = adjustment->value;
@@ -333,6 +333,8 @@ gtk_dial_expose( GtkWidget      *widget,
                 widget->style->bg_gc[GTK_STATE_NORMAL];
   blankstyle->black_gc =
                 widget->style->bg_gc[GTK_STATE_NORMAL];
+  blankstyle->depth =
+                gdk_drawable_get_depth( GDK_DRAWABLE (widget->window));
 
   gtk_paint_polygon (blankstyle,
                     widget->window,



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