# Fixes compilation errors. Stolen from Debian. Index: libgtkdatabox-0.9.1.1/examples/addremove.c =================================================================== --- libgtkdatabox-0.9.1.1.orig/examples/addremove.c 2011-05-21 12:39:01.703594722 +0200 +++ libgtkdatabox-0.9.1.1/examples/addremove.c 2011-05-21 12:36:16.739594810 +0200 @@ -203,7 +203,7 @@ g_signal_connect_swapped (GTK_OBJECT (close_button), "clicked", G_CALLBACK (gtk_main_quit), GTK_OBJECT (box)); gtk_box_pack_start (GTK_BOX (box2), close_button, TRUE, TRUE, 0); - GTK_WIDGET_SET_FLAGS (close_button, GTK_CAN_DEFAULT); + gtk_widget_set_can_default(close_button, GTK_CAN_DEFAULT); gtk_widget_grab_default (close_button); gtk_widget_show_all (window); Index: libgtkdatabox-0.9.1.1/examples/basics.c =================================================================== --- libgtkdatabox-0.9.1.1.orig/examples/basics.c 2011-05-21 12:39:02.075594722 +0200 +++ libgtkdatabox-0.9.1.1/examples/basics.c 2011-05-21 12:36:16.759594820 +0200 @@ -113,7 +113,7 @@ g_signal_connect_swapped (GTK_OBJECT (close_button), "clicked", G_CALLBACK (gtk_main_quit), GTK_OBJECT (box)); gtk_box_pack_start (GTK_BOX (vbox), close_button, FALSE, FALSE, 0); - GTK_WIDGET_SET_FLAGS (close_button, GTK_CAN_DEFAULT); + gtk_widget_set_can_default(close_button, GTK_CAN_DEFAULT); gtk_widget_grab_default (close_button); gtk_widget_grab_focus (close_button); Index: libgtkdatabox-0.9.1.1/examples/basics2.c =================================================================== --- libgtkdatabox-0.9.1.1.orig/examples/basics2.c 2011-05-21 12:39:01.911594722 +0200 +++ libgtkdatabox-0.9.1.1/examples/basics2.c 2011-05-21 12:36:16.747594818 +0200 @@ -225,7 +225,7 @@ g_signal_connect_swapped (GTK_OBJECT (close_button), "clicked", G_CALLBACK (gtk_main_quit), GTK_OBJECT (box)); gtk_box_pack_start (GTK_BOX (vbox), close_button, FALSE, FALSE, 0); - GTK_WIDGET_SET_FLAGS (close_button, GTK_CAN_DEFAULT); + gtk_widget_set_can_default(close_button, GTK_CAN_DEFAULT); gtk_widget_grab_default (close_button); gtk_widget_grab_focus (close_button); Index: libgtkdatabox-0.9.1.1/examples/colors.c =================================================================== --- libgtkdatabox-0.9.1.1.orig/examples/colors.c 2011-05-21 12:39:02.115594722 +0200 +++ libgtkdatabox-0.9.1.1/examples/colors.c 2011-05-21 12:36:16.763594819 +0200 @@ -194,7 +194,7 @@ g_signal_connect (G_OBJECT (close_button), "clicked", G_CALLBACK (gtk_main_quit), (gpointer) NULL); gtk_box_pack_start (GTK_BOX (box2), close_button, TRUE, TRUE, 0); - GTK_WIDGET_SET_FLAGS (close_button, GTK_CAN_DEFAULT); + gtk_widget_set_can_default(close_button, GTK_CAN_DEFAULT); gtk_widget_grab_default (close_button); Index: libgtkdatabox-0.9.1.1/examples/enable_disable.c =================================================================== --- libgtkdatabox-0.9.1.1.orig/examples/enable_disable.c 2011-05-21 12:39:01.787594722 +0200 +++ libgtkdatabox-0.9.1.1/examples/enable_disable.c 2011-05-21 12:36:16.743594812 +0200 @@ -145,7 +145,7 @@ g_signal_connect_swapped (GTK_OBJECT (close_button), "clicked", G_CALLBACK (gtk_main_quit), GTK_OBJECT (box)); gtk_box_pack_start (GTK_BOX (box2), close_button, TRUE, TRUE, 0); - GTK_WIDGET_SET_FLAGS (close_button, GTK_CAN_DEFAULT); + gtk_widget_set_can_default(close_button, GTK_CAN_DEFAULT); for (i = 0; i < noEnableSets; ++i) { GtkWidget *vbox = gtk_vbox_new (FALSE, 10); Index: libgtkdatabox-0.9.1.1/examples/grid.c =================================================================== --- libgtkdatabox-0.9.1.1.orig/examples/grid.c 2011-05-21 12:39:01.995594722 +0200 +++ libgtkdatabox-0.9.1.1/examples/grid.c 2011-05-21 12:36:16.755594821 +0200 @@ -133,7 +133,7 @@ G_CALLBACK (gtk_main_quit), GTK_OBJECT (box)); gtk_box_pack_start (GTK_BOX (box2), close_button, TRUE, TRUE, 0); - GTK_WIDGET_SET_FLAGS (close_button, GTK_CAN_DEFAULT); + gtk_widget_set_can_default(close_button, GTK_CAN_DEFAULT); gtk_widget_grab_default (close_button); gtk_widget_show_all (window); Index: libgtkdatabox-0.9.1.1/examples/grid_array.c =================================================================== --- libgtkdatabox-0.9.1.1.orig/examples/grid_array.c 2011-05-21 12:39:01.951594722 +0200 +++ libgtkdatabox-0.9.1.1/examples/grid_array.c 2011-05-21 12:36:16.751594821 +0200 @@ -134,7 +134,7 @@ G_CALLBACK (gtk_main_quit), GTK_OBJECT (box)); gtk_box_pack_start (GTK_BOX (box2), close_button, TRUE, TRUE, 0); - GTK_WIDGET_SET_FLAGS (close_button, GTK_CAN_DEFAULT); + gtk_widget_set_can_default(close_button, GTK_CAN_DEFAULT); gtk_widget_grab_default (close_button); gtk_widget_show_all (window); Index: libgtkdatabox-0.9.1.1/examples/keycontrol.c =================================================================== --- libgtkdatabox-0.9.1.1.orig/examples/keycontrol.c 2011-05-21 12:39:02.155594722 +0200 +++ libgtkdatabox-0.9.1.1/examples/keycontrol.c 2011-05-21 12:37:15.211595055 +0200 @@ -133,7 +133,8 @@ gtk_databox_create_box_with_scrollbars_and_rulers (&box, &table, TRUE, TRUE, TRUE, TRUE); gtk_widget_add_events (box, GDK_KEY_PRESS_MASK); - GTK_WIDGET_SET_FLAGS (box, GTK_CAN_FOCUS | GTK_CAN_DEFAULT); + gtk_widget_set_can_focus(box, GTK_CAN_FOCUS); + gtk_widget_set_can_default(box, GTK_CAN_DEFAULT); gtk_box_pack_start (GTK_BOX (box1), table, TRUE, TRUE, 0); Index: libgtkdatabox-0.9.1.1/examples/lissajous.c =================================================================== --- libgtkdatabox-0.9.1.1.orig/examples/lissajous.c 2011-05-21 12:39:02.035594722 +0200 +++ libgtkdatabox-0.9.1.1/examples/lissajous.c 2011-05-21 12:36:16.759594820 +0200 @@ -154,7 +154,7 @@ G_CALLBACK (gtk_main_quit), G_OBJECT (box)); gtk_box_pack_start (GTK_BOX (box2), close_button, TRUE, TRUE, 0); - GTK_WIDGET_SET_FLAGS (close_button, GTK_CAN_DEFAULT); + gtk_widget_set_can_default(close_button, GTK_CAN_DEFAULT); gtk_widget_grab_default (close_button); lissajous_idle = g_idle_add ((GSourceFunc) lissajous_idle_func, box); Index: libgtkdatabox-0.9.1.1/examples/logarithmic.c =================================================================== --- libgtkdatabox-0.9.1.1.orig/examples/logarithmic.c 2011-05-21 12:39:01.827594722 +0200 +++ libgtkdatabox-0.9.1.1/examples/logarithmic.c 2011-05-21 12:36:16.743594812 +0200 @@ -207,7 +207,7 @@ g_signal_connect (GTK_OBJECT (close_button), "clicked", G_CALLBACK (gtk_main_quit), NULL); gtk_box_pack_start (GTK_BOX (vbox), close_button, FALSE, FALSE, 0); - GTK_WIDGET_SET_FLAGS (close_button, GTK_CAN_DEFAULT); + gtk_widget_set_can_default(close_button, GTK_CAN_DEFAULT); gtk_widget_grab_default (close_button); gtk_widget_grab_focus (close_button); Index: libgtkdatabox-0.9.1.1/examples/markers.c =================================================================== --- libgtkdatabox-0.9.1.1.orig/examples/markers.c 2011-05-21 12:39:01.871594722 +0200 +++ libgtkdatabox-0.9.1.1/examples/markers.c 2011-05-21 12:36:16.747594818 +0200 @@ -220,7 +220,7 @@ g_signal_connect_swapped (GTK_OBJECT (close_button), "clicked", G_CALLBACK (gtk_main_quit), GTK_OBJECT (box)); gtk_box_pack_start (GTK_BOX (box2), close_button, TRUE, TRUE, 0); - GTK_WIDGET_SET_FLAGS (close_button, GTK_CAN_DEFAULT); + gtk_widget_set_can_default(close_button, GTK_CAN_DEFAULT); gtk_widget_grab_default (close_button); gtk_widget_show_all (window); Index: libgtkdatabox-0.9.1.1/examples/signals.c =================================================================== --- libgtkdatabox-0.9.1.1.orig/examples/signals.c 2011-05-21 12:39:01.751594722 +0200 +++ libgtkdatabox-0.9.1.1/examples/signals.c 2011-05-21 12:36:16.743594812 +0200 @@ -287,7 +287,7 @@ g_signal_connect_swapped (G_OBJECT (close_button), "clicked", G_CALLBACK (gtk_main_quit), G_OBJECT (box)); gtk_box_pack_start (GTK_BOX (box2), close_button, TRUE, TRUE, 0); - GTK_WIDGET_SET_FLAGS (close_button, GTK_CAN_DEFAULT); + gtk_widget_set_can_default(close_button, GTK_CAN_DEFAULT); gtk_widget_grab_default (close_button); g_signal_connect (G_OBJECT (box), "zoomed", Index: libgtkdatabox-0.9.1.1/gtk/gtkdatabox.c =================================================================== --- libgtkdatabox-0.9.1.1.orig/gtk/gtkdatabox.c 2011-05-21 12:39:01.583594722 +0200 +++ libgtkdatabox-0.9.1.1/gtk/gtkdatabox.c 2011-05-21 12:38:43.523595004 +0200 @@ -453,7 +453,8 @@ gint width; gint height; - gdk_drawable_get_size (widget->window, &width, &height); + width = gdk_window_get_width(widget->window); + height = gdk_window_get_height(widget->window); x = MAX (0, MIN (width - 1, x)); y = MAX (0, MIN (height - 1, y)); @@ -587,7 +588,7 @@ gint attributes_mask; box = GTK_DATABOX (widget); - GTK_WIDGET_SET_FLAGS (box, GTK_REALIZED); + gtk_widget_set_realized(box, GTK_REALIZED); attributes.window_type = GDK_WINDOW_CHILD; attributes.x = widget->allocation.x; Index: libgtkdatabox-0.9.1.1/gtk/gtkdatabox_ruler.c =================================================================== --- libgtkdatabox-0.9.1.1.orig/gtk/gtkdatabox_ruler.c 2011-05-21 12:39:01.631594722 +0200 +++ libgtkdatabox-0.9.1.1/gtk/gtkdatabox_ruler.c 2011-05-21 12:38:59.963594710 +0200 @@ -842,7 +842,7 @@ gint attributes_mask; ruler = GTK_DATABOX_RULER (widget); - GTK_WIDGET_SET_FLAGS (ruler, GTK_REALIZED); + gtk_widget_set_realized(ruler, GTK_REALIZED); attributes.window_type = GDK_WINDOW_CHILD; attributes.x = widget->allocation.x;