From 9f4d84dcb47c3ffe4214f93e4e2f7b7d6069c536 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 27 Jul 2025 13:19:59 -0600 Subject: [PATCH] fix StepEntry code to use new action registration API --- gtk2_ardour/step_entry.cc | 12 ++++++------ gtk2_ardour/step_entry.h | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/gtk2_ardour/step_entry.cc b/gtk2_ardour/step_entry.cc index 396e15c5f0..c019a86f46 100644 --- a/gtk2_ardour/step_entry.cc +++ b/gtk2_ardour/step_entry.cc @@ -649,10 +649,10 @@ StepEntry::toggle_chord () } void -StepEntry::dot_change (GtkAction* act) +StepEntry::dot_change (GtkRadioAction* act) { if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION(act))) { - gint v = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (act)); + gint v = gtk_radio_action_get_current_value (act); dot_adjustment.set_value (v); } } @@ -804,7 +804,7 @@ StepEntry::insert_b () } void -StepEntry::note_length_change (GtkAction* act) +StepEntry::note_length_change (GtkRadioAction* act) { /* it doesn't matter which note length action we look up - we are interested in the current_value which is global across the whole group of note length @@ -815,13 +815,13 @@ StepEntry::note_length_change (GtkAction* act) */ if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION(act))) { - gint v = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (act)); + gint v = gtk_radio_action_get_current_value (act); length_divisor_adjustment.set_value (v); } } void -StepEntry::note_velocity_change (GtkAction* act) +StepEntry::note_velocity_change (GtkRadioAction* act) { /* it doesn't matter which note velocity action we look up - we are interested in the current_value which is global across the whole group of note velocity @@ -832,7 +832,7 @@ StepEntry::note_velocity_change (GtkAction* act) */ if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION(act))) { - gint v = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (act)); + gint v = gtk_radio_action_get_current_value (act); velocity_adjustment.set_value (v); } } diff --git a/gtk2_ardour/step_entry.h b/gtk2_ardour/step_entry.h index 17ecee45dc..9ab42077c3 100644 --- a/gtk2_ardour/step_entry.h +++ b/gtk2_ardour/step_entry.h @@ -177,8 +177,8 @@ private: void insert_fsharp (); void insert_g (); void insert_gsharp (); - void note_length_change (GtkAction*); - void note_velocity_change (GtkAction*); + void note_length_change (GtkRadioAction*); + void note_velocity_change (GtkRadioAction*); bool radio_button_press (GdkEventButton*); void inc_note_velocity (); void dec_note_velocity (); @@ -202,7 +202,7 @@ private: void octave_8 () { octave_n (8); } void octave_9 () { octave_n (9); } void octave_10 () { octave_n (10); } - void dot_change (GtkAction*); + void dot_change (GtkRadioAction*); void dot_value_change (); void toggle_triplet(); void toggle_chord(); @@ -228,8 +228,8 @@ private: static void se_insert_fsharp () { if (_instance) { _instance->insert_fsharp (); } } static void se_insert_g () { if (_instance) { _instance->insert_g (); } } static void se_insert_gsharp () { if (_instance) { _instance->insert_gsharp (); } } - static void se_note_length_change (GtkAction* act) { if (_instance) { _instance->note_length_change (act); } } - static void se_note_velocity_change (GtkAction* act) { if (_instance) { _instance->note_velocity_change (act); } } + static void se_note_length_change (GtkRadioAction* act) { if (_instance) { _instance->note_length_change (act); } } + static void se_note_velocity_change (GtkRadioAction* act) { if (_instance) { _instance->note_velocity_change (act); } } static void se_inc_note_velocity () { if (_instance) { _instance->inc_note_velocity (); } } static void se_dec_note_velocity () { if (_instance) { _instance->dec_note_velocity (); } } static void se_next_note_velocity () { if (_instance) { _instance->next_note_velocity (); } } @@ -252,7 +252,7 @@ private: static void se_octave_8 () { if (_instance) { _instance->octave_8 (); } } static void se_octave_9 () { if (_instance) { _instance->octave_9 (); } } static void se_octave_10 () { if (_instance) { _instance->octave_10 (); } } - static void se_dot_change (GtkAction* act) { if (_instance) { _instance->dot_change (act); } } + static void se_dot_change (GtkRadioAction* act) { if (_instance) { _instance->dot_change (act); } } static void se_dot_value_change () { if (_instance) { _instance->dot_value_change (); } } static void se_toggle_triplet() { if (_instance) { _instance->toggle_triplet (); } } static void se_toggle_chord() { if (_instance) { _instance->toggle_chord (); } }