forked from AuroraMiddleware/gtk
Use gtk_ruler_new() instead gtk_[v|h]ruler_new()
This commit is contained in:
parent
821c3c6578
commit
524e704147
@ -42,7 +42,7 @@ int main( int argc,
|
||||
/* The horizontal ruler goes on top. As the mouse moves across the
|
||||
* drawing area, a motion_notify_event is passed to the
|
||||
* 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_range (GTK_RULER (hrule), 7, 13, 0, 20);
|
||||
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 drawing area, a motion_notify_event is passed to the
|
||||
* 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_range (GTK_RULER (vrule), 0, YSIZE, 10, YSIZE );
|
||||
g_signal_connect_swapped (area, "motion-notify-event",
|
||||
|
@ -5943,7 +5943,7 @@ create_rulers (GtkWidget *widget)
|
||||
gtk_container_add (GTK_CONTAINER (window), 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_range (GTK_RULER (ruler), 100, 0, 0, 20);
|
||||
|
||||
@ -5957,7 +5957,7 @@ create_rulers (GtkWidget *widget)
|
||||
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);
|
||||
|
||||
g_signal_connect_swapped (window,
|
||||
|
Loading…
Reference in New Issue
Block a user