SessionDialog: add methods that can be used in Actions for new/recent/open

This commit is contained in:
Paul Davis 2025-11-12 15:25:29 -07:00
parent 39d069a6a2
commit 2301f7c55a
2 changed files with 25 additions and 6 deletions

View file

@ -586,27 +586,42 @@ SessionDialog::session_selected ()
{
}
void
SessionDialog::new_button_choice_action ()
{
_tabs.set_current_page(0);
}
void
SessionDialog::recent_button_choice_action ()
{
_tabs.set_current_page(1);
}
void
SessionDialog::existing_button_choice_action ()
{
_tabs.set_current_page(2);
}
bool
SessionDialog::new_button_pressed (GdkEventButton*)
{
_tabs.set_current_page(0);
new_button_choice_action ();
return true;
}
bool
SessionDialog::recent_button_pressed (GdkEventButton*)
{
_tabs.set_current_page(1);
recent_button_choice_action ();
return true;
}
bool
SessionDialog::existing_button_pressed (GdkEventButton*)
{
_tabs.set_current_page(2);
existing_button_choice_action ();
return true;
}

View file

@ -105,6 +105,10 @@ private:
bool existing_button_pressed (GdkEventButton*);
bool prefs_button_pressed (GdkEventButton*);
void new_button_choice_action ();
void recent_button_choice_action ();
void existing_button_choice_action ();
bool open_button_pressed (GdkEventButton*);
Gtk::HBox _info_box;