Skip to content

Commit

Permalink
plugins/dac_data_manager.c: replace deprecated gtk3 function
Browse files Browse the repository at this point in the history
use gtk_widget_set_halign/valign instead of gtk_misc_set_alignment

Signed-off-by: Cristina Suteu <[email protected]>
  • Loading branch information
cristina-suteu committed Jan 29, 2024
1 parent 444d5d3 commit 3e35d58
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions plugins/dac_data_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -895,16 +895,19 @@ static GtkWidget *gui_tone_create(struct dds_tone *tone)
tone->freq = spin_button_create(0.0, 100.0, 1.0, FREQUENCY_SPIN_DIGITS);
tone->phase = spin_button_create(0.0, 360.0, 1.0, PHASE_SPIN_DIGITS);

gtk_misc_set_alignment(GTK_MISC(freq), 0.0, 0.5);
gtk_misc_set_alignment(GTK_MISC(phase), 0.0, 0.5);
gtk_widget_set_halign((GtkWidget*)freq, 0.5);
gtk_widget_set_valign((GtkWidget*)freq, 0.0);
gtk_widget_set_halign((GtkWidget*)phase, 0.5);
gtk_widget_set_valign((GtkWidget*)phase, 0.0);

if (combobox_scales) {
scale = gtk_label_new("Scale:");
tone->scale = gtk_combo_box_text_new();
} else {
scale = gtk_label_new("Scale(dBFS):");
tone->scale = spin_button_create(-91.0, 0.0, 1.0, SCALE_SPIN_DIGITS);
gtk_misc_set_alignment(GTK_MISC(scale), 0.0, 0.5);
gtk_widget_set_halign((GtkWidget*)scale, 0.5);
gtk_widget_set_valign((GtkWidget*)scale, 0.0);
gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(tone->scale), FALSE);
}

Expand Down

0 comments on commit 3e35d58

Please sign in to comment.