fix GUI enum registration so that UIConfiguration can load with variables that use some of them

This commit is contained in:
Paul Davis 2023-04-08 13:58:25 -06:00
parent 13311b7a32
commit 786f71f7f1
4 changed files with 6 additions and 3 deletions

View File

@ -483,7 +483,6 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
/* lets get this party started */
setup_gtk_ardour_enums ();
setup_profile ();
SessionEvent::create_per_thread_pool ("GUI", 4096);

View File

@ -208,6 +208,8 @@ Editor::typed_event (ArdourCanvas::Item* item, GdkEvent *event, ItemType type)
return false;
}
std::cerr << "event for " << enum_2_string (type) << ' ' << item->whoami() << std::endl;
gint ret = FALSE;
switch (event->type) {

View File

@ -229,7 +229,7 @@ setup_gtk_ardour_enums ()
REGISTER_CLASS_ENUM (AddRouteDialog, FoldbackBus);
REGISTER (type_wanted);
REGISTER_ENUM (TempoMapping);
REGISTER_ENUM (TempoChanging);
REGISTER_CLASS_ENUM (Editing, TempoMapping);
REGISTER_CLASS_ENUM (Editing, TempoChanging);
REGISTER (tempo_edit_behavior);
}

View File

@ -450,6 +450,8 @@ int main (int argc, char *argv[])
DEBUG_TRACE (DEBUG::Locale, string_compose ("main() locale '%1'\n", setlocale (LC_NUMERIC, NULL)));
setup_gtk_ardour_enums ();
if (UIConfiguration::instance().pre_gui_init ()) {
error << _("Could not complete pre-GUI initialization") << endmsg;
exit (EXIT_FAILURE);