SessionDialog: create actions

This commit is contained in:
Paul Davis 2025-11-12 15:38:30 -07:00
parent 2301f7c55a
commit e7f0234c38
2 changed files with 15 additions and 0 deletions

View file

@ -82,6 +82,16 @@ SessionDialog::SessionDialog (DialogTab initial_tab, const std::string& session_
, new_name_was_edited (false)
, new_folder_chooser (FILE_CHOOSER_ACTION_SELECT_FOLDER)
{
action_group = ActionGroup::create (X_("SessionDialog"));
/* No string translation because these don't show anywhere */
new_session_action = Action::create (X_("New"));
action_group->add (new_session_action, sigc::mem_fun (this, &SessionDialog::new_button_choice_action));
recent_session_action = Action::create (X_("Recent"));
action_group->add (recent_session_action, sigc::mem_fun (this, &SessionDialog::recent_button_choice_action));
existing_session_action = Action::create (X_("Open"));
action_group->add (existing_session_action, sigc::mem_fun (this, &SessionDialog::existing_button_choice_action));
set_position (WIN_POS_CENTER);
get_vbox()->set_spacing (6);
get_vbox()->pack_start (_open_table, false, false);

View file

@ -248,6 +248,11 @@ private:
void updates_button_clicked ();
Gtk::Notebook _tabs;
Glib::RefPtr<Gtk::ActionGroup> action_group;
Glib::RefPtr<Gtk::Action> new_session_action;
Glib::RefPtr<Gtk::Action> recent_session_action;
Glib::RefPtr<Gtk::Action> existing_session_action;
};
#endif /* __gtk2_ardour_session_dialog_h__ */