]> git.alsa-project.org Git - alsa-tools.git/commitdiff
envy24control: fix GtkSpinButton runtime warnings
authorAndreas Persson <andreasp56@outlook.com>
Fri, 28 Mar 2025 20:40:08 +0000 (21:40 +0100)
committerJaroslav Kysela <perex@perex.cz>
Wed, 9 Apr 2025 09:48:37 +0000 (11:48 +0200)
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: https://github.com/alsa-project/alsa-tools/pull/31
Signed-off-by: Andreas Persson <andreasp56@outlook.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
envy24control/envy24control.c

index a7e40f0e275a50d039b6bb09311becb8cab642e9..419e88a5b8cbf9acb53b1b497c1a64960094fa79 100644 (file)
@@ -665,7 +665,7 @@ static void create_volume_change(GtkWidget *box)
        gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, FALSE, 0);
        gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT);
 
-       spinbutton_adj = gtk_adjustment_new(16, 0, 255, 1, 10, 10);
+       spinbutton_adj = gtk_adjustment_new(16, 0, 255, 1, 10, 0);
        hw_volume_change_adj = spinbutton_adj;
        spinbutton = gtk_spin_button_new(GTK_ADJUSTMENT(spinbutton_adj), 1, 0);
        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)
        gtk_box_pack_start(GTK_BOX(hbox1), label_card_nr, FALSE, FALSE, 20);
        gtk_label_set_justify(GTK_LABEL(label_card_nr), GTK_JUSTIFY_LEFT);
 
-       card_button_adj = gtk_adjustment_new(16, 0, MAX_CARD_NUMBERS - 1, 1, 10, 10);
+       card_button_adj = gtk_adjustment_new(16, 0, MAX_CARD_NUMBERS - 1, 1, 10, 0);
        card_number_adj = card_button_adj;
        card_button = gtk_spin_button_new(GTK_ADJUSTMENT (card_button_adj), 1, 0);
        gtk_box_pack_start(GTK_BOX (hbox1), card_button, TRUE, FALSE, 0);