[beast: 12/28] BEAST: bstmain.cc: extract method main_init_core_plugins



commit f58dcdff0fb4fb466803826a975f870c392b1354
Author: Tim Janik <timj gnu org>
Date:   Tue Dec 1 00:51:07 2015 +0100

    BEAST: bstmain.cc: extract method main_init_core_plugins
    
    Signed-off-by: Tim Janik <timj gnu org>

 beast-gtk/bstmain.cc |   41 ++++++++++++++++++++++-------------------
 1 files changed, 22 insertions(+), 19 deletions(-)
---
diff --git a/beast-gtk/bstmain.cc b/beast-gtk/bstmain.cc
index d9b9c24..bddd069 100644
--- a/beast-gtk/bstmain.cc
+++ b/beast-gtk/bstmain.cc
@@ -60,6 +60,7 @@ server_registration (SfiProxy     server,
     }
 }
 
+static void     main_init_core_plugins();
 static void     main_init_ladspa();
 static void     main_sleep4gdb();
 static void     main_init_scripts();
@@ -165,14 +166,31 @@ main (int argc, char *argv[])
       g_object_unref (anim);
     }
 
-  /* start BSE core and connect */
+  main_init_core_plugins();
+  main_init_ladspa();
+  main_sleep4gdb();
+  main_init_scripts();
+  main_init_dialogs();
+  BstApp *app = main_open_files (argc - 1, &argv[1]);
+  if (!app)
+    app = main_open_default_window();
+  main_show_release_notes();
+  main_splash_down();
+  main_run_event_loops();
+  main_save_rc_files();
+  main_cleanup();
+
+  return 0;
+}
+
+static void
+main_init_core_plugins()
+{
   bst_splash_update_item (beast_splash, _("BSE Core"));
-  /* watch registration notifications on server */
+  // watch registration notifications on server
   bse_proxy_connect (BSE_SERVER,
                     "signal::registration", server_registration, beast_splash,
                     NULL);
-
-  /* register core plugins */
   if (register_core_plugins)
     {
       bst_splash_update_entity (beast_splash, _("Plugins"));
@@ -190,21 +208,6 @@ main (int argc, char *argv[])
          sfi_glue_gc_run ();
        }
     }
-
-  main_init_ladspa();
-  main_sleep4gdb();
-  main_init_scripts();
-  main_init_dialogs();
-  BstApp *app = main_open_files (argc - 1, &argv[1]);
-  if (!app)
-    app = main_open_default_window();
-  main_show_release_notes();
-  main_splash_down();
-  main_run_event_loops();
-  main_save_rc_files();
-  main_cleanup();
-
-  return 0;
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]