[beast: 6/28] BEAST: bstmain.cc: extract method main_open_default_window



commit 06e69e7fb36143e26e6ab365c7fd65efe025c7b7
Author: Tim Janik <timj gnu org>
Date:   Tue Dec 1 00:28:44 2015 +0100

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

 beast-gtk/bstmain.cc |   25 ++++++++++++++-----------
 1 files changed, 14 insertions(+), 11 deletions(-)
---
diff --git a/beast-gtk/bstmain.cc b/beast-gtk/bstmain.cc
index feda38b..f6d075e 100644
--- a/beast-gtk/bstmain.cc
+++ b/beast-gtk/bstmain.cc
@@ -60,6 +60,7 @@ server_registration (SfiProxy     server,
     }
 }
 
+static BstApp*  main_open_default_window();
 static void     main_show_release_notes();
 static void     main_splash_down ();
 static void     main_run_event_loops ();
@@ -324,18 +325,8 @@ main (int argc, char *argv[])
         }
     }
 
-  /* open default app window
-   */
   if (!app)
-    {
-      Bse::ProjectH project = bse_server.create_project ("Untitled.bse");
-      bse_project_get_wave_repo (project.proxy_id());
-      app = bst_app_new (project);
-      gxk_idle_show_widget (GTK_WIDGET (app));
-      gtk_widget_hide (beast_splash);
-    }
-  /* splash screen is definitely hidden here (still grabbing) */
-
+    app = main_open_default_window();
   main_show_release_notes();
   main_splash_down();
   main_run_event_loops();
@@ -345,6 +336,18 @@ main (int argc, char *argv[])
   return 0;
 }
 
+static BstApp*
+main_open_default_window ()
+{
+  Bse::ProjectH project = bse_server.create_project ("Untitled.bse");
+  bse_project_get_wave_repo (project.proxy_id());
+  BstApp *app = bst_app_new (project);
+  gxk_idle_show_widget (GTK_WIDGET (app));
+  if (beast_splash)
+    gtk_widget_hide (beast_splash);
+  return app;
+}
+
 static void
 main_show_release_notes ()
 {


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