Use gtk_ruler_new() instead gtk_[v|h]ruler_new()

This commit is contained in:
Javier Jardón 2010-10-30 01:41:55 +02:00 committed by Tristan Van Berkom
parent 821c3c6578
commit 524e704147
2 changed files with 4 additions and 4 deletions

View File

@ -42,7 +42,7 @@ int main( int argc,
/* The horizontal ruler goes on top. As the mouse moves across the /* The horizontal ruler goes on top. As the mouse moves across the
* drawing area, a motion_notify_event is passed to the * drawing area, a motion_notify_event is passed to the
* appropriate event handler for the ruler. */ * appropriate event handler for the ruler. */
hrule = gtk_hruler_new (); hrule = gtk_ruler_new (GTK_ORIENTATION_HORIZONTAL);
gtk_ruler_set_metric (GTK_RULER (hrule), GTK_PIXELS); gtk_ruler_set_metric (GTK_RULER (hrule), GTK_PIXELS);
gtk_ruler_set_range (GTK_RULER (hrule), 7, 13, 0, 20); gtk_ruler_set_range (GTK_RULER (hrule), 7, 13, 0, 20);
g_signal_connect_swapped (area, "motion-notify-event", g_signal_connect_swapped (area, "motion-notify-event",
@ -55,7 +55,7 @@ int main( int argc,
/* The vertical ruler goes on the left. As the mouse moves across /* The vertical ruler goes on the left. As the mouse moves across
* the drawing area, a motion_notify_event is passed to the * the drawing area, a motion_notify_event is passed to the
* appropriate event handler for the ruler. */ * appropriate event handler for the ruler. */
vrule = gtk_vruler_new (); vrule = gtk_ruler_new (GTK_ORIENTATION_VERTICAL);
gtk_ruler_set_metric (GTK_RULER (vrule), GTK_PIXELS); gtk_ruler_set_metric (GTK_RULER (vrule), GTK_PIXELS);
gtk_ruler_set_range (GTK_RULER (vrule), 0, YSIZE, 10, YSIZE ); gtk_ruler_set_range (GTK_RULER (vrule), 0, YSIZE, 10, YSIZE );
g_signal_connect_swapped (area, "motion-notify-event", g_signal_connect_swapped (area, "motion-notify-event",

View File

@ -5943,7 +5943,7 @@ create_rulers (GtkWidget *widget)
gtk_container_add (GTK_CONTAINER (window), table); gtk_container_add (GTK_CONTAINER (window), table);
gtk_widget_show (table); gtk_widget_show (table);
ruler = gtk_hruler_new (); ruler = gtk_ruler_new (GTK_ORIENTATION_HORIZONTAL);
gtk_ruler_set_metric (GTK_RULER (ruler), GTK_CENTIMETERS); gtk_ruler_set_metric (GTK_RULER (ruler), GTK_CENTIMETERS);
gtk_ruler_set_range (GTK_RULER (ruler), 100, 0, 0, 20); gtk_ruler_set_range (GTK_RULER (ruler), 100, 0, 0, 20);
@ -5957,7 +5957,7 @@ create_rulers (GtkWidget *widget)
gtk_widget_show (ruler); gtk_widget_show (ruler);
ruler = gtk_vruler_new (); ruler = gtk_ruler_new (GTK_ORIENTATION_VERTICAL);
gtk_ruler_set_range (GTK_RULER (ruler), 5, 15, 0, 20); gtk_ruler_set_range (GTK_RULER (ruler), 5, 15, 0, 20);
g_signal_connect_swapped (window, g_signal_connect_swapped (window,