[ekiga] Made the assistant use Ekiga::scoped_connections
- From: Julien Puydt <jpuydt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] Made the assistant use Ekiga::scoped_connections
- Date: Sat, 9 Feb 2013 22:51:29 +0000 (UTC)
commit 2004edc2ef4f5606088a844109fb2968efef3f40
Author: Julien Puydt <jpuydt free fr>
Date: Sat Feb 9 22:28:20 2013 +0100
Made the assistant use Ekiga::scoped_connections
src/gui/assistant.cpp | 24 ++++++++++--------------
1 files changed, 10 insertions(+), 14 deletions(-)
---
diff --git a/src/gui/assistant.cpp b/src/gui/assistant.cpp
index b7a05c4..f416cd7 100644
--- a/src/gui/assistant.cpp
+++ b/src/gui/assistant.cpp
@@ -38,10 +38,12 @@
#include <glib/gi18n.h>
-#include "framework/services.h"
+#include "services.h"
+#include "scoped-connections.h"
#include "account-core.h"
#include "account.h"
+
#include "ekiga.h"
#include "gmconf.h"
#include "platform.h"
@@ -95,7 +97,7 @@ struct _EkigaAssistantPrivate
gint last_active_page;
GtkListStore *summary_model;
- std::vector<boost::signals::connection> connections;
+ Ekiga::scoped_connections connections;
std::list<gpointer> notifiers;
};
@@ -1638,12 +1640,6 @@ ekiga_assistant_dispose (GObject *object)
gm_conf_notifier_remove (*iter);
assistant->priv->notifiers.clear (); // dispose might be called several times
- for (std::vector<boost::signals::connection>::iterator iter = assistant->priv->connections.begin ();
- iter != assistant->priv->connections.end ();
- ++iter)
- iter->disconnect();
- assistant->priv->connections.clear ();
-
if (assistant->priv->icon) {
g_object_unref (assistant->priv->icon);
@@ -1713,19 +1709,19 @@ ekiga_assistant_new (Ekiga::ServiceCore& service_core)
assistant->priv->bank = service_core.get<Opal::Bank> ("opal-account-store");
conn = assistant->priv->videoinput_core->device_added.connect (boost::bind (&on_videoinput_device_added_cb, _1, _2, assistant));
- assistant->priv->connections.push_back (conn);
+ assistant->priv->connections.add (conn);
conn = assistant->priv->videoinput_core->device_removed.connect (boost::bind (&on_videoinput_device_removed_cb, _1, _2, assistant));
- assistant->priv->connections.push_back (conn);
+ assistant->priv->connections.add (conn);
conn = assistant->priv->audioinput_core->device_added.connect (boost::bind (&on_audioinput_device_added_cb, _1, _2, assistant));
- assistant->priv->connections.push_back (conn);
+ assistant->priv->connections.add (conn);
conn = assistant->priv->audioinput_core->device_removed.connect (boost::bind (&on_audioinput_device_removed_cb, _1, _2, assistant));
- assistant->priv->connections.push_back (conn);
+ assistant->priv->connections.add (conn);
conn = assistant->priv->audiooutput_core->device_added.connect (boost::bind (&on_audiooutput_device_added_cb, _1, _2, assistant));
- assistant->priv->connections.push_back (conn);
+ assistant->priv->connections.add (conn);
conn = assistant->priv->audiooutput_core->device_removed.connect (boost::bind (&on_audiooutput_device_removed_cb, _1, _2, assistant));
- assistant->priv->connections.push_back (conn);
+ assistant->priv->connections.add (conn);
/* Notifiers for the VIDEO_CODECS_KEY keys */
notifier =
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]