[ekiga] Moved some initialization code directly to the 'main' function



commit 323acb2abaaf649a1ae51e5b333204b71d2c6582
Author: Julien Puydt <jpuydt gnome org>
Date:   Tue Oct 13 17:38:24 2009 +0200

    Moved some initialization code directly to the 'main' function

 src/ekiga.cpp    |   27 ++-------------------------
 src/ekiga.h      |   17 -----------------
 src/gui/main.cpp |    9 +++++++--
 3 files changed, 9 insertions(+), 44 deletions(-)
---
diff --git a/src/ekiga.cpp b/src/ekiga.cpp
index 56279c1..62a89ca 100644
--- a/src/ekiga.cpp
+++ b/src/ekiga.cpp
@@ -52,12 +52,12 @@
 #include "dbus.h"
 #endif
 
+#include "engine.h"
+
 #include "gmdialog.h"
 #include "gmstockicons.h"
 #include "gmconf.h"
 
-#include "engine.h"
-
 #define new PNEW
 
 
@@ -227,26 +227,3 @@ void GnomeMeeting::BuildGUI ()
   PTRACE (1, "ESound support disabled");
 #endif
 }
-
-
-void
-GnomeMeeting::InitEngine (Ekiga::ServiceCorePtr service_core,
-			  int argc,
-			  char* argv[])
-{
-  PWaitAndSignal m(ep_var_mutex);
-
-  Ekiga::Runtime::init ();
-
-  engine_init (service_core, argc, argv);
-}
-
-void
-GnomeMeeting::StopEngine ()
-{
-  PWaitAndSignal m(ep_var_mutex);
-
-  engine_stop ();
-
-  Ekiga::Runtime::quit ();
-}
diff --git a/src/ekiga.h b/src/ekiga.h
index d2ce6e1..0849cac 100644
--- a/src/ekiga.h
+++ b/src/ekiga.h
@@ -75,23 +75,6 @@ class GnomeMeeting : public PProcess
    */
   ~GnomeMeeting ();
 
-  
-  /* DESCRIPTION  : / 
-   * BEHAVIOR     : Vroom.
-   * PRE          : /
-   */
-  void InitEngine (Ekiga::ServiceCorePtr service_core,
-		   int argc,
-		   char* argv[]);
-
-  
-  /* DESCRIPTION  : / 
-   * BEHAVIOR     : No more vroom.
-   * PRE          : /
-   */
-  void StopEngine ();
-
-
 
   /* DESCRIPTION  :  /
    * BEHAVIOR     :  Prepare the endpoint to exit by removing all
diff --git a/src/gui/main.cpp b/src/gui/main.cpp
index c4c1dfa..6da8323 100644
--- a/src/gui/main.cpp
+++ b/src/gui/main.cpp
@@ -91,6 +91,8 @@
 
 #include <libxml/parser.h>
 
+#include "engine.h"
+
 #include "videoinput-core.h"
 #include "audioinput-core.h"
 #include "audiooutput-core.h"
@@ -4468,7 +4470,9 @@ main (int argc,
   /* Init gm_conf */
   gm_conf_watch ();
 
-  GnomeMeeting::Process ()->InitEngine (service_core, argc, argv);
+  Ekiga::Runtime::init ();
+  engine_init (service_core, argc, argv);
+
   GnomeMeeting::Process ()->BuildGUI ();
 
   /* Show the window if there is no error, exit with a popup if there
@@ -4564,7 +4568,8 @@ main (int argc,
   /* Exit Ekiga */
   GnomeMeeting::Process ()->Exit ();
 
-  GnomeMeeting::Process ()->StopEngine ();
+  engine_stop ();
+  Ekiga::Runtime::quit ();
 
   /* Save and shutdown the configuration */
   gm_conf_save ();



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