[ekiga] Completed the Ekiga::Runtime glib implementation a little



commit 9cbfe9a8f3ebe3ea9f8654cccd93c49075c513b4
Author: Julien Puydt <jpuydt free fr>
Date:   Thu Jun 20 21:59:13 2013 +0200

    Completed the Ekiga::Runtime glib implementation a little

 lib/engine/framework/runtime-glib.cpp |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/lib/engine/framework/runtime-glib.cpp b/lib/engine/framework/runtime-glib.cpp
index c5acd30..068ea86 100644
--- a/lib/engine/framework/runtime-glib.cpp
+++ b/lib/engine/framework/runtime-glib.cpp
@@ -38,6 +38,7 @@
 #include <glib.h>
 
 static GAsyncQueue* queue;
+static GMainLoop* loop;
 
 /* implementation of the helper functions
  *
@@ -142,11 +143,14 @@ Ekiga::Runtime::init ()
   source->queue = queue;
   g_async_queue_ref (queue); // give a ref to the source
   g_source_attach ((GSource *)source, g_main_context_default ());
+
+  loop = g_main_loop_new (NULL, FALSE);
 }
 
 void
 Ekiga::Runtime::run ()
 {
+  g_main_loop_run (loop);
 }
 
 void
@@ -154,6 +158,9 @@ Ekiga::Runtime::quit ()
 {
   g_async_queue_unref (queue);
   queue = NULL;
+  g_main_loop_quit (loop);
+  g_main_loop_unref (loop);
+  loop = NULL;
 }
 
 void


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