forked from AuroraMiddleware/gtk
gtk_adjustment_new() should return a GtkAdjustment*
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=630731
This commit is contained in:
parent
948768c708
commit
42f480a537
@ -2584,12 +2584,12 @@ but some cases will be shown in later examples where you may need to
|
||||
create one yourself. You create an adjustment using:</para>
|
||||
|
||||
<programlisting role="C">
|
||||
GtkObject *gtk_adjustment_new( gdouble value,
|
||||
gdouble lower,
|
||||
gdouble upper,
|
||||
gdouble step_increment,
|
||||
gdouble page_increment,
|
||||
gdouble page_size );
|
||||
GtkAdjustment *gtk_adjustment_new( gdouble value,
|
||||
gdouble lower,
|
||||
gdouble upper,
|
||||
gdouble step_increment,
|
||||
gdouble page_increment,
|
||||
gdouble page_size );
|
||||
</programlisting>
|
||||
|
||||
<para>The <literal>value</literal> argument is the initial value you want to give to the
|
||||
@ -3151,7 +3151,7 @@ static void create_range_controls( void )
|
||||
GtkWidget *opt, *menu, *item;
|
||||
GtkWidget *label;
|
||||
GtkWidget *scale;
|
||||
GtkObject *adj1, *adj2;
|
||||
GtkAdjustment *adj1, *adj2;
|
||||
|
||||
/* Standard window-creating stuff */
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
@ -4732,12 +4732,12 @@ button can take. This makes for a powerful Spin Button widget.</para>
|
||||
function, which illustrates the information that it holds:</para>
|
||||
|
||||
<programlisting role="C">
|
||||
GtkObject *gtk_adjustment_new( gdouble value,
|
||||
gdouble lower,
|
||||
gdouble upper,
|
||||
gdouble step_increment,
|
||||
gdouble page_increment,
|
||||
gdouble page_size );
|
||||
GtkAdjustment *gtk_adjustment_new( gdouble value,
|
||||
gdouble lower,
|
||||
gdouble upper,
|
||||
gdouble step_increment,
|
||||
gdouble page_increment,
|
||||
gdouble page_size );
|
||||
</programlisting>
|
||||
|
||||
<para>These attributes of an Adjustment are used by the Spin Button in the
|
||||
@ -5030,9 +5030,8 @@ int main( int argc,
|
||||
label = gtk_label_new ("Day :");
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, TRUE, 0);
|
||||
|
||||
adj = (GtkAdjustment *) gtk_adjustment_new (1.0, 1.0, 31.0, 1.0,
|
||||
5.0, 0.0);
|
||||
|
||||
adj = gtk_adjustment_new (1.0, 1.0, 31.0, 1.0, 5.0, 0.0);
|
||||
spinner = gtk_spin_button_new (adj, 0, 0);
|
||||
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (spinner), TRUE);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), spinner, FALSE, TRUE, 0);
|
||||
@ -5043,9 +5042,8 @@ int main( int argc,
|
||||
label = gtk_label_new ("Month :");
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, TRUE, 0);
|
||||
|
||||
adj = (GtkAdjustment *) gtk_adjustment_new (1.0, 1.0, 12.0, 1.0,
|
||||
5.0, 0.0);
|
||||
|
||||
adj = gtk_adjustment_new (1.0, 1.0, 12.0, 1.0, 5.0, 0.0);
|
||||
spinner = gtk_spin_button_new (adj, 0, 0);
|
||||
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (spinner), TRUE);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), spinner, FALSE, TRUE, 0);
|
||||
@ -5056,9 +5054,8 @@ int main( int argc,
|
||||
label = gtk_label_new ("Year :");
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, TRUE, 0);
|
||||
|
||||
adj = (GtkAdjustment *) gtk_adjustment_new (1998.0, 0.0, 2100.0,
|
||||
1.0, 100.0, 0.0);
|
||||
|
||||
adj = gtk_adjustment_new (1998.0, 0.0, 2100.0, 1.0, 100.0, 0.0);
|
||||
spinner = gtk_spin_button_new (adj, 0, 0);
|
||||
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (spinner), FALSE);
|
||||
gtk_widget_set_size_request (spinner, 55, -1);
|
||||
@ -5080,9 +5077,8 @@ int main( int argc,
|
||||
label = gtk_label_new ("Value :");
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, TRUE, 0);
|
||||
|
||||
adj = (GtkAdjustment *) gtk_adjustment_new (0.0, -10000.0, 10000.0,
|
||||
0.5, 100.0, 0.0);
|
||||
|
||||
adj = gtk_adjustment_new (0.0, -10000.0, 10000.0, 0.5, 100.0, 0.0);
|
||||
spinner1 = gtk_spin_button_new (adj, 1.0, 2);
|
||||
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (spinner1), TRUE);
|
||||
gtk_widget_set_size_request (spinner1, 100, -1);
|
||||
@ -5094,8 +5090,8 @@ int main( int argc,
|
||||
label = gtk_label_new ("Digits :");
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, TRUE, 0);
|
||||
|
||||
adj = (GtkAdjustment *) gtk_adjustment_new (2, 1, 5, 1, 1, 0);
|
||||
|
||||
adj = gtk_adjustment_new (2, 1, 5, 1, 1, 0);
|
||||
spinner2 = gtk_spin_button_new (adj, 0.0, 0);
|
||||
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (spinner2), TRUE);
|
||||
g_signal_connect (adj, "value_changed",
|
||||
@ -11796,7 +11792,7 @@ gtk_dial_new (GtkAdjustment *adjustment)
|
||||
dial = gtk_type_new (gtk_dial_get_type ());
|
||||
|
||||
if (!adjustment)
|
||||
adjustment = (GtkAdjustment*) gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
|
||||
adjustment = gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
|
||||
|
||||
gtk_dial_set_adjustment (dial, adjustment);
|
||||
|
||||
@ -15002,7 +14998,7 @@ gtk_dial_new (GtkAdjustment *adjustment)
|
||||
dial = g_object_new (gtk_dial_get_type (), NULL);
|
||||
|
||||
if (!adjustment)
|
||||
adjustment = (GtkAdjustment*) gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
|
||||
adjustment = gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
|
||||
|
||||
gtk_dial_set_adjustment (dial, adjustment);
|
||||
|
||||
@ -15590,9 +15586,9 @@ int main( int argc,
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||
gtk_widget_show (frame);
|
||||
|
||||
adjustment = GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 100, 0.01, 0.1, 0));
|
||||
|
||||
|
||||
adjustment = gtk_adjustment_new (0, 0, 100, 0.01, 0.1, 0);
|
||||
|
||||
dial = gtk_dial_new (adjustment);
|
||||
gtk_dial_set_update_policy (GTK_DIAL (dial), GTK_UPDATE_DELAYED);
|
||||
/* gtk_widget_set_size_request (dial, 100, 100); */
|
||||
|
@ -87,7 +87,7 @@ static void create_range_controls( void )
|
||||
GtkWidget *opt, *menu, *item;
|
||||
GtkWidget *label;
|
||||
GtkWidget *scale;
|
||||
GtkObject *adj1, *adj2;
|
||||
GtkAdjustment *adj1, *adj2;
|
||||
|
||||
/* Standard window-creating stuff */
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
|
@ -318,7 +318,7 @@ gtk_adjustment_dispatch_properties_changed (GObject *object,
|
||||
}
|
||||
}
|
||||
|
||||
GObject *
|
||||
GtkAdjustment *
|
||||
gtk_adjustment_new (gdouble value,
|
||||
gdouble lower,
|
||||
gdouble upper,
|
||||
|
@ -74,7 +74,7 @@ struct _GtkAdjustmentClass
|
||||
|
||||
|
||||
GType gtk_adjustment_get_type (void) G_GNUC_CONST;
|
||||
GObject* gtk_adjustment_new (gdouble value,
|
||||
GtkAdjustment* gtk_adjustment_new (gdouble value,
|
||||
gdouble lower,
|
||||
gdouble upper,
|
||||
gdouble step_increment,
|
||||
|
@ -83,7 +83,7 @@ gtk_hscale_new_with_range (gdouble min,
|
||||
gdouble max,
|
||||
gdouble step)
|
||||
{
|
||||
GObject *adj;
|
||||
GtkAdjustment *adj;
|
||||
GtkScale *scale;
|
||||
gint digits;
|
||||
|
||||
|
@ -546,7 +546,7 @@ gtk_scale_new_with_range (GtkOrientation orientation,
|
||||
gdouble max,
|
||||
gdouble step)
|
||||
{
|
||||
GObject *adj;
|
||||
GtkAdjustment *adj;
|
||||
gint digits;
|
||||
|
||||
g_return_val_if_fail (min < max, NULL);
|
||||
|
@ -580,7 +580,7 @@ gtk_scale_button_new (GtkIconSize size,
|
||||
const gchar **icons)
|
||||
{
|
||||
GtkScaleButton *button;
|
||||
GObject *adj;
|
||||
GtkAdjustment *adj;
|
||||
|
||||
adj = gtk_adjustment_new (min, min, max, step, 10 * step, 0);
|
||||
|
||||
|
@ -1782,7 +1782,7 @@ gtk_spin_button_new_with_range (gdouble min,
|
||||
gdouble max,
|
||||
gdouble step)
|
||||
{
|
||||
GObject *adj;
|
||||
GtkAdjustment *adj;
|
||||
GtkSpinButton *spin;
|
||||
gint digits;
|
||||
|
||||
@ -1801,7 +1801,7 @@ gtk_spin_button_new_with_range (gdouble min,
|
||||
digits = MAX_DIGITS;
|
||||
}
|
||||
|
||||
gtk_spin_button_configure (spin, GTK_ADJUSTMENT (adj), step, digits);
|
||||
gtk_spin_button_configure (spin, adj, step, digits);
|
||||
|
||||
gtk_spin_button_set_numeric (spin, TRUE);
|
||||
|
||||
|
@ -69,7 +69,7 @@ static void
|
||||
gtk_volume_button_init (GtkVolumeButton *button)
|
||||
{
|
||||
GtkScaleButton *sbutton = GTK_SCALE_BUTTON (button);
|
||||
GObject *adj;
|
||||
GtkAdjustment *adj;
|
||||
GtkWidget *minus_button, *plus_button;
|
||||
const char *icons[] = {
|
||||
"audio-volume-muted",
|
||||
|
@ -102,7 +102,7 @@ gtk_vscale_new_with_range (gdouble min,
|
||||
gdouble max,
|
||||
gdouble step)
|
||||
{
|
||||
GObject *adj;
|
||||
GtkAdjustment *adj;
|
||||
GtkScale *scale;
|
||||
gint digits;
|
||||
|
||||
|
@ -7,51 +7,51 @@ create_flicker (void)
|
||||
GtkWidget *hpaned1;
|
||||
GtkWidget *vpaned2;
|
||||
GtkWidget *hbox2;
|
||||
GObject *spinbutton7_adj;
|
||||
GtkAdjustment *spinbutton7_adj;
|
||||
GtkWidget *spinbutton7;
|
||||
GObject *spinbutton8_adj;
|
||||
GtkAdjustment *spinbutton8_adj;
|
||||
GtkWidget *spinbutton8;
|
||||
GtkWidget *vbox1;
|
||||
GObject *spinbutton9_adj;
|
||||
GtkAdjustment *spinbutton9_adj;
|
||||
GtkWidget *spinbutton9;
|
||||
GObject *spinbutton10_adj;
|
||||
GtkAdjustment *spinbutton10_adj;
|
||||
GtkWidget *spinbutton10;
|
||||
GObject *spinbutton11_adj;
|
||||
GtkAdjustment *spinbutton11_adj;
|
||||
GtkWidget *spinbutton11;
|
||||
GObject *spinbutton12_adj;
|
||||
GtkAdjustment *spinbutton12_adj;
|
||||
GtkWidget *spinbutton12;
|
||||
GObject *spinbutton13_adj;
|
||||
GtkAdjustment *spinbutton13_adj;
|
||||
GtkWidget *spinbutton13;
|
||||
GObject *spinbutton14_adj;
|
||||
GtkAdjustment *spinbutton14_adj;
|
||||
GtkWidget *spinbutton14;
|
||||
GObject *spinbutton15_adj;
|
||||
GtkAdjustment *spinbutton15_adj;
|
||||
GtkWidget *spinbutton15;
|
||||
GObject *spinbutton16_adj;
|
||||
GtkAdjustment *spinbutton16_adj;
|
||||
GtkWidget *spinbutton16;
|
||||
GtkWidget *vpaned1;
|
||||
GtkWidget *hbox1;
|
||||
GObject *spinbutton17_adj;
|
||||
GtkAdjustment *spinbutton17_adj;
|
||||
GtkWidget *spinbutton17;
|
||||
GObject *spinbutton18_adj;
|
||||
GtkAdjustment *spinbutton18_adj;
|
||||
GtkWidget *spinbutton18;
|
||||
GObject *spinbutton19_adj;
|
||||
GtkAdjustment *spinbutton19_adj;
|
||||
GtkWidget *spinbutton19;
|
||||
GtkWidget *vbox2;
|
||||
GObject *spinbutton20_adj;
|
||||
GtkAdjustment *spinbutton20_adj;
|
||||
GtkWidget *spinbutton20;
|
||||
GObject *spinbutton21_adj;
|
||||
GtkAdjustment *spinbutton21_adj;
|
||||
GtkWidget *spinbutton21;
|
||||
GObject *spinbutton22_adj;
|
||||
GtkAdjustment *spinbutton22_adj;
|
||||
GtkWidget *spinbutton22;
|
||||
GObject *spinbutton23_adj;
|
||||
GtkAdjustment *spinbutton23_adj;
|
||||
GtkWidget *spinbutton23;
|
||||
GObject *spinbutton24_adj;
|
||||
GtkAdjustment *spinbutton24_adj;
|
||||
GtkWidget *spinbutton24;
|
||||
GObject *spinbutton25_adj;
|
||||
GtkAdjustment *spinbutton25_adj;
|
||||
GtkWidget *spinbutton25;
|
||||
GObject *spinbutton26_adj;
|
||||
GtkAdjustment *spinbutton26_adj;
|
||||
GtkWidget *spinbutton26;
|
||||
GObject *spinbutton27_adj;
|
||||
GtkAdjustment *spinbutton27_adj;
|
||||
GtkWidget *spinbutton27;
|
||||
|
||||
window1 = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
|
@ -5959,7 +5959,7 @@ create_range_controls (GtkWidget *widget)
|
||||
GtkWidget *scrollbar;
|
||||
GtkWidget *scale;
|
||||
GtkWidget *separator;
|
||||
GObject *adjustment;
|
||||
GtkAdjustment *adjustment;
|
||||
GtkWidget *hbox;
|
||||
|
||||
if (!window)
|
||||
|
@ -327,7 +327,7 @@ set_columns_type (GtkTreeView *tree_view, ColumnsType type)
|
||||
GtkCellRenderer *rend;
|
||||
GdkPixbuf *pixbuf;
|
||||
GtkWidget *image;
|
||||
GObject *adjustment;
|
||||
GtkAdjustment *adjustment;
|
||||
|
||||
current_column_type = type;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user