[ekiga] Removed calls to GetServicesCore



commit 5e8d2fdeacd59ee7daf73bfcd1dcef2e0c5cc241
Author: Julien Puydt <jpuydt gnome org>
Date:   Tue Oct 13 22:08:50 2009 +0200

    Removed calls to GetServicesCore
    
    If a piece of code needs it, it should get it at initialization time, not through some static variable

 src/ekiga.cpp    |    8 ++++----
 src/ekiga.h      |    2 +-
 src/gui/main.cpp |    4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/ekiga.cpp b/src/ekiga.cpp
index 62a89ca..4c1f411 100644
--- a/src/ekiga.cpp
+++ b/src/ekiga.cpp
@@ -182,17 +182,17 @@ void GnomeMeeting::Main ()
 }
 
 
-void GnomeMeeting::BuildGUI ()
+void GnomeMeeting::BuildGUI (Ekiga::ServiceCorePtr services)
 {
   /* Init the stock icons */
   gnomemeeting_stock_icons_init ();
   
   /* Build the GUI */
   gtk_window_set_default_icon_name (GM_ICON_LOGO);
-  accounts_window = gm_accounts_window_new (*GetServiceCore ());
+  accounts_window = gm_accounts_window_new (*services);
 
-  statusicon = statusicon_new (*GetServiceCore ());
-  main_window = gm_main_window_new (*GetServiceCore ());
+  statusicon = statusicon_new (*services);
+  main_window = gm_main_window_new (*services);
   // FIXME should be moved inside the gm_accounts_window_new code
   gtk_window_set_transient_for (GTK_WINDOW (accounts_window), GTK_WINDOW (main_window));
 
diff --git a/src/ekiga.h b/src/ekiga.h
index 0849cac..67d771d 100644
--- a/src/ekiga.h
+++ b/src/ekiga.h
@@ -141,7 +141,7 @@ class GnomeMeeting : public PProcess
    *                 stored in config.
    * PRE          :  /
    */
-  void BuildGUI ();
+  void BuildGUI (Ekiga::ServiceCorePtr services);
 
  private:
   
diff --git a/src/gui/main.cpp b/src/gui/main.cpp
index 684fe0c..5d42af3 100644
--- a/src/gui/main.cpp
+++ b/src/gui/main.cpp
@@ -4477,14 +4477,14 @@ main (int argc,
   Ekiga::Runtime::init ();
   engine_init (service_core, argc, argv);
 
-  GnomeMeeting::Process ()->BuildGUI ();
+  GnomeMeeting::Process ()->BuildGUI (service_core);
 
   /* Show the window if there is no error, exit with a popup if there
    * is a fatal error.
    */
   main_window = GnomeMeeting::Process ()->GetMainWindow ();
   EkigaMainWindow *mw = EKIGA_MAIN_WINDOW (main_window); //TODO no priv here
-  boost::shared_ptr<Ekiga::CallCore> call_core = mw->priv->core->get<Ekiga::CallCore> ("call-core");
+  boost::shared_ptr<Ekiga::CallCore> call_core = service_core->get<Ekiga::CallCore> ("call-core");
   if (error == -1) {
 
     if (gm_conf_get_int (GENERAL_KEY "version") 



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