Skip to content

Commit 837033a

Browse files
andreas56perexg
authored andcommitted
envy24control: fix GtkSpinButton runtime warnings
Change the parameters to gtk_adjustment_new to get rid of this runtime warning from GTK: GtkSpinButton: setting an adjustment with non-zero page size is deprecated The change is also important when envy24control is ported to GTK 3, as the spin buttons will stop working if it's not done. Closes: #31 Signed-off-by: Andreas Persson <[email protected]> Signed-off-by: Jaroslav Kysela <[email protected]>
1 parent 65a201f commit 837033a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

envy24control/envy24control.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ static void create_volume_change(GtkWidget *box)
665665
gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, FALSE, 0);
666666
gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT);
667667

668-
spinbutton_adj = gtk_adjustment_new(16, 0, 255, 1, 10, 10);
668+
spinbutton_adj = gtk_adjustment_new(16, 0, 255, 1, 10, 0);
669669
hw_volume_change_adj = spinbutton_adj;
670670
spinbutton = gtk_spin_button_new(GTK_ADJUSTMENT(spinbutton_adj), 1, 0);
671671
gtk_box_pack_start(GTK_BOX(hbox), spinbutton, TRUE, FALSE, 0);
@@ -1677,7 +1677,7 @@ static void create_profiles(GtkWidget *main, GtkWidget *notebook, int page)
16771677
gtk_box_pack_start(GTK_BOX(hbox1), label_card_nr, FALSE, FALSE, 20);
16781678
gtk_label_set_justify(GTK_LABEL(label_card_nr), GTK_JUSTIFY_LEFT);
16791679

1680-
card_button_adj = gtk_adjustment_new(16, 0, MAX_CARD_NUMBERS - 1, 1, 10, 10);
1680+
card_button_adj = gtk_adjustment_new(16, 0, MAX_CARD_NUMBERS - 1, 1, 10, 0);
16811681
card_number_adj = card_button_adj;
16821682
card_button = gtk_spin_button_new(GTK_ADJUSTMENT (card_button_adj), 1, 0);
16831683
gtk_box_pack_start(GTK_BOX (hbox1), card_button, TRUE, FALSE, 0);

0 commit comments

Comments
 (0)