ekiga r7379 - in trunk: lib/engine lib/engine/addressbook/call-history lib/engine/addressbook/evolution lib/engine/addressbook/ldap lib/engine/chat/echo lib/engine/components/avahi-publisher lib/engine/components/gmconf-personal-details lib/engine/components/opal lib/engine/gui/gtk-core lib/engine/gui/gtk-frontend lib/engine/presence/avahi lib/engine/presence/local-roster lib/engine/presence/skel lib/engine/protocol/skel lib/gmref src/gui



Author: jpuydt
Date: Tue Nov 18 08:52:45 2008
New Revision: 7379
URL: http://svn.gnome.org/viewvc/ekiga?rev=7379&view=rev

Log:
Made conversions from pointer to gmref_ptr explicit (since it seems to be a convention everywhere)

Modified:
   trunk/lib/engine/addressbook/call-history/history-book.cpp
   trunk/lib/engine/addressbook/call-history/history-contact.cpp
   trunk/lib/engine/addressbook/call-history/history-main.cpp
   trunk/lib/engine/addressbook/call-history/history-source.cpp
   trunk/lib/engine/addressbook/evolution/evolution-book.cpp
   trunk/lib/engine/addressbook/evolution/evolution-contact.cpp
   trunk/lib/engine/addressbook/evolution/evolution-main.cpp
   trunk/lib/engine/addressbook/evolution/evolution-source.cpp
   trunk/lib/engine/addressbook/ldap/ldap-book.cpp
   trunk/lib/engine/addressbook/ldap/ldap-contact.cpp
   trunk/lib/engine/addressbook/ldap/ldap-main.cpp
   trunk/lib/engine/addressbook/ldap/ldap-source.cpp
   trunk/lib/engine/chat/echo/echo-main.cpp
   trunk/lib/engine/components/avahi-publisher/avahi-publisher-main.cpp
   trunk/lib/engine/components/gmconf-personal-details/gmconf-personal-details-main.cpp
   trunk/lib/engine/components/opal/opal-call-manager.cpp
   trunk/lib/engine/components/opal/opal-main.cpp
   trunk/lib/engine/components/opal/sip-chat-simple.cpp
   trunk/lib/engine/engine.cpp
   trunk/lib/engine/gui/gtk-core/gtk-core-main.cpp
   trunk/lib/engine/gui/gtk-frontend/gtk-frontend.cpp
   trunk/lib/engine/gui/gtk-frontend/presentity-view.cpp
   trunk/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
   trunk/lib/engine/presence/avahi/avahi-cluster.cpp
   trunk/lib/engine/presence/avahi/avahi-heap.cpp
   trunk/lib/engine/presence/avahi/avahi-main.cpp
   trunk/lib/engine/presence/local-roster/local-cluster.cpp
   trunk/lib/engine/presence/local-roster/local-heap.cpp
   trunk/lib/engine/presence/local-roster/local-presentity.cpp
   trunk/lib/engine/presence/local-roster/local-roster-bridge.cpp
   trunk/lib/engine/presence/local-roster/local-roster-main.cpp
   trunk/lib/engine/presence/skel/uri-presentity.cpp
   trunk/lib/engine/protocol/skel/call-manager.cpp
   trunk/lib/gmref/gmref.h
   trunk/src/gui/main.cpp

Modified: trunk/lib/engine/addressbook/call-history/history-book.cpp
==============================================================================
--- trunk/lib/engine/addressbook/call-history/history-book.cpp	(original)
+++ trunk/lib/engine/addressbook/call-history/history-book.cpp	Tue Nov 18 08:52:45 2008
@@ -105,7 +105,7 @@
 void
 History::Book::add (xmlNodePtr node)
 {
-  add_contact (new Contact (core, node));
+  add_contact (gmref_ptr<Contact>(new Contact (core, node)));
 }
 
 void
@@ -120,8 +120,8 @@
 
     xmlNodePtr root = xmlDocGetRootElement (doc);
 
-    gmref_ptr<Contact> contact = new Contact (core, name, uri,
-					      call_start, call_duration, c_t);
+    gmref_ptr<Contact> contact(new Contact (core, name, uri,
+					    call_start, call_duration, c_t));
 
     xmlAddChild (root, contact->get_node ());
 

Modified: trunk/lib/engine/addressbook/call-history/history-contact.cpp
==============================================================================
--- trunk/lib/engine/addressbook/call-history/history-contact.cpp	(original)
+++ trunk/lib/engine/addressbook/call-history/history-contact.cpp	Tue Nov 18 08:52:45 2008
@@ -170,7 +170,8 @@
 History::Contact::populate_menu (Ekiga::MenuBuilder &builder)
 {
   gmref_ptr<Ekiga::ContactCore> contact_core = core.get ("contact-core");
-  return contact_core->populate_contact_menu (this, uri, builder);
+  return contact_core->populate_contact_menu (gmref_ptr<Contact>(this),
+					      uri, builder);
 }
 
 xmlNodePtr

Modified: trunk/lib/engine/addressbook/call-history/history-main.cpp
==============================================================================
--- trunk/lib/engine/addressbook/call-history/history-main.cpp	(original)
+++ trunk/lib/engine/addressbook/call-history/history-main.cpp	Tue Nov 18 08:52:45 2008
@@ -51,7 +51,7 @@
 
   if (contact_core && call_core) {
 
-    gmref_ptr<History::Source> source =  new History::Source (core);
+    gmref_ptr<History::Source> source (new History::Source (core));
     core.add (source);
     contact_core->add_source (source);
     result = true;

Modified: trunk/lib/engine/addressbook/call-history/history-source.cpp
==============================================================================
--- trunk/lib/engine/addressbook/call-history/history-source.cpp	(original)
+++ trunk/lib/engine/addressbook/call-history/history-source.cpp	Tue Nov 18 08:52:45 2008
@@ -39,7 +39,7 @@
 
 History::Source::Source (Ekiga::ServiceCore &_core): core(_core)
 {
-  book = new Book (core);
+  book = gmref_ptr<Book>(new Book (core));
 
   add_book (book);
 }

Modified: trunk/lib/engine/addressbook/evolution/evolution-book.cpp
==============================================================================
--- trunk/lib/engine/addressbook/evolution/evolution-book.cpp	(original)
+++ trunk/lib/engine/addressbook/evolution/evolution-book.cpp	Tue Nov 18 08:52:45 2008
@@ -65,8 +65,8 @@
 
     if (e_contact_get_const (econtact, E_CONTACT_FULL_NAME) != NULL) {
 
-      gmref_ptr<Contact> contact =  new Evolution::Contact (services, book,
-							    econtact);
+      gmref_ptr<Contact> contact(new Evolution::Contact (services, book,
+							 econtact));
 
       add_contact (contact);
       nbr++;

Modified: trunk/lib/engine/addressbook/evolution/evolution-contact.cpp
==============================================================================
--- trunk/lib/engine/addressbook/evolution/evolution-contact.cpp	(original)
+++ trunk/lib/engine/addressbook/evolution/evolution-contact.cpp	Tue Nov 18 08:52:45 2008
@@ -217,7 +217,8 @@
       std::string attr_value = get_attribute_value (attr_type);
       if ( !attr_value.empty ()) {
 
-	if (core->populate_contact_menu (this, attr_value, tmp_builder)) {
+	if (core->populate_contact_menu (gmref_ptr<Contact>(this),
+					 attr_value, tmp_builder)) {
 
 	  builder.add_ghost ("", get_attribute_name_from_type (attr_type));
 	  tmp_builder.populate_menu (builder);

Modified: trunk/lib/engine/addressbook/evolution/evolution-main.cpp
==============================================================================
--- trunk/lib/engine/addressbook/evolution/evolution-main.cpp	(original)
+++ trunk/lib/engine/addressbook/evolution/evolution-main.cpp	Tue Nov 18 08:52:45 2008
@@ -49,7 +49,7 @@
 
   if (core) {
 
-    gmref_ptr<Evolution::Source> source = new Evolution::Source (services);
+    gmref_ptr<Evolution::Source> source (new Evolution::Source (services));
     services.add (source);
     core->add_source (source);
     result = true;

Modified: trunk/lib/engine/addressbook/evolution/evolution-source.cpp
==============================================================================
--- trunk/lib/engine/addressbook/evolution/evolution-source.cpp	(original)
+++ trunk/lib/engine/addressbook/evolution/evolution-source.cpp	Tue Nov 18 08:52:45 2008
@@ -80,7 +80,7 @@
     ebook = e_book_new (s, NULL);
     g_object_unref (s);
 
-    gmref_ptr<Book> book = new Evolution::Book (services, ebook);
+    gmref_ptr<Book> book (new Evolution::Book (services, ebook));
 
     g_object_unref (ebook);
 

Modified: trunk/lib/engine/addressbook/ldap/ldap-book.cpp
==============================================================================
--- trunk/lib/engine/addressbook/ldap/ldap-book.cpp	(original)
+++ trunk/lib/engine/addressbook/ldap/ldap-book.cpp	Tue Nov 18 08:52:45 2008
@@ -110,7 +110,7 @@
 
   if (!username.empty () && !call_addresses.empty()) {
 
-    result = new Contact (core, fix_to_utf8 (username), call_addresses);
+    result = gmref_ptr<Contact>(new Contact (core, fix_to_utf8 (username), call_addresses));
   }
 
   return result;

Modified: trunk/lib/engine/addressbook/ldap/ldap-contact.cpp
==============================================================================
--- trunk/lib/engine/addressbook/ldap/ldap-contact.cpp	(original)
+++ trunk/lib/engine/addressbook/ldap/ldap-contact.cpp	Tue Nov 18 08:52:45 2008
@@ -77,13 +77,14 @@
 
   bool result = false;
   for (std::map<std::string, std::string>::const_iterator iter
-    = uris.begin ();
-    iter != uris.end ();
-    iter++) {
-      if (contact_core->populate_contact_menu (this, iter->second, tmp_builder)) {
-	  builder.add_ghost ("", iter->first);
-	  tmp_builder.populate_menu (builder);
-	  result = true;
+	 = uris.begin ();
+       iter != uris.end ();
+       iter++) {
+    if (contact_core->populate_contact_menu (gmref_ptr<Contact>(this),
+					     iter->second, tmp_builder)) {
+      builder.add_ghost ("", iter->first);
+      tmp_builder.populate_menu (builder);
+      result = true;
     }
   }
   return result;

Modified: trunk/lib/engine/addressbook/ldap/ldap-main.cpp
==============================================================================
--- trunk/lib/engine/addressbook/ldap/ldap-main.cpp	(original)
+++ trunk/lib/engine/addressbook/ldap/ldap-main.cpp	Tue Nov 18 08:52:45 2008
@@ -53,7 +53,7 @@
 
   if (contact_core && runtime) {
 
-    gmref_ptr<OPENLDAP::Source> service = new OPENLDAP::Source (core);
+    gmref_ptr<OPENLDAP::Source> service (new OPENLDAP::Source (core));
     core.add (service);
     contact_core->add_source (service);
     sasl_client_init (NULL); // FIXME: shouldn't it be done by the source!?

Modified: trunk/lib/engine/addressbook/ldap/ldap-source.cpp
==============================================================================
--- trunk/lib/engine/addressbook/ldap/ldap-source.cpp	(original)
+++ trunk/lib/engine/addressbook/ldap/ldap-source.cpp	Tue Nov 18 08:52:45 2008
@@ -97,7 +97,7 @@
 void
 OPENLDAP::Source::add (xmlNodePtr node)
 {
-  common_add (new Book (core, node));
+  common_add (gmref_ptr<Book>(new Book (core, node)));
 }
 
 void
@@ -106,7 +106,7 @@
   xmlNodePtr root;
 
   root = xmlDocGetRootElement (doc);
-  gmref_ptr<Book> book = new Book (core, bookinfo);
+  gmref_ptr<Book> book (new Book (core, bookinfo));
 
   xmlAddChild (root, book->get_node ());
 

Modified: trunk/lib/engine/chat/echo/echo-main.cpp
==============================================================================
--- trunk/lib/engine/chat/echo/echo-main.cpp	(original)
+++ trunk/lib/engine/chat/echo/echo-main.cpp	Tue Nov 18 08:52:45 2008
@@ -49,7 +49,7 @@
 
   if (chat_core) {
 
-    gmref_ptr<Echo::Dialect> dialect = new Echo::Dialect;
+    gmref_ptr<Echo::Dialect> dialect (new Echo::Dialect);
     core.add (dialect);
     chat_core->add_dialect (*dialect);
     result = true;

Modified: trunk/lib/engine/components/avahi-publisher/avahi-publisher-main.cpp
==============================================================================
--- trunk/lib/engine/components/avahi-publisher/avahi-publisher-main.cpp	(original)
+++ trunk/lib/engine/components/avahi-publisher/avahi-publisher-main.cpp	Tue Nov 18 08:52:45 2008
@@ -53,8 +53,7 @@
 
   if (presence_core && call_core && details) {
 
-    gmref_ptr<Avahi::PresencePublisher> publisher
-      = new Avahi::PresencePublisher (core, *details, *call_core);
+    gmref_ptr<Avahi::PresencePublisher> publisher (new Avahi::PresencePublisher (core, *details, *call_core));
     presence_core->add_presence_publisher (publisher);
     core.add (publisher);
     result = true;

Modified: trunk/lib/engine/components/gmconf-personal-details/gmconf-personal-details-main.cpp
==============================================================================
--- trunk/lib/engine/components/gmconf-personal-details/gmconf-personal-details-main.cpp	(original)
+++ trunk/lib/engine/components/gmconf-personal-details/gmconf-personal-details-main.cpp	Tue Nov 18 08:52:45 2008
@@ -50,8 +50,7 @@
 
   if ( !personal_details) {
 
-    Gmconf::PersonalDetails* gmconf_details
-      = new Gmconf::PersonalDetails ();
+    gmref_ptr<Gmconf::PersonalDetails> gmconf_details (new Gmconf::PersonalDetails ());
     core.add (gmconf_details);
     result = true;
   }

Modified: trunk/lib/engine/components/opal/opal-call-manager.cpp
==============================================================================
--- trunk/lib/engine/components/opal/opal-call-manager.cpp	(original)
+++ trunk/lib/engine/components/opal/opal-call-manager.cpp	Tue Nov 18 08:52:45 2008
@@ -629,10 +629,10 @@
 
 OpalCall *CallManager::CreateCall ()
 {
-  gmref_ptr<Ekiga::Call> call = new Opal::Call (*this, core);
-  call_core->add_call (call, this);
+  gmref_ptr<Opal::Call> call (new Opal::Call (*this, core));
+  call_core->add_call (call, gmref_ptr<CallManager>(this));
 
-  return dynamic_cast<OpalCall *> (&*call);
+  return &*call;
 }
 
 

Modified: trunk/lib/engine/components/opal/opal-main.cpp
==============================================================================
--- trunk/lib/engine/components/opal/opal-main.cpp	(original)
+++ trunk/lib/engine/components/opal/opal-main.cpp	Tue Nov 18 08:52:45 2008
@@ -85,7 +85,7 @@
 on_call_manager_ready_cb (Ekiga::ServiceCore *core)
 {
   gmref_ptr<Ekiga::AccountCore> account_core = core->get ("account-core");
-  gmref_ptr<Opal::Bank> bank = new Bank (*core);
+  gmref_ptr<Opal::Bank> bank (new Bank (*core));
 
   account_core->add_bank (*bank);
   core->add (bank);
@@ -104,18 +104,18 @@
 
   bool result = true;
 
-  gmref_ptr<CallManager> call_manager = new CallManager (core);
+  gmref_ptr<CallManager> call_manager (new CallManager (core));
 
 #ifdef HAVE_SIP
   unsigned sip_port = gm_conf_get_int (SIP_KEY "listen_port");
-  gmref_ptr<Sip::EndPoint> sip_manager = new Sip::EndPoint (*call_manager, core, sip_port);
+  gmref_ptr<Sip::EndPoint> sip_manager (new Sip::EndPoint (*call_manager, core, sip_port));
   call_manager->add_protocol_manager (sip_manager);
   account_core->add_account_subscriber (*sip_manager);
 #endif
 
 #ifdef HAVE_H323
   unsigned h323_port = gm_conf_get_int (H323_KEY "listen_port");
-  gmref_ptr<H323::EndPoint> h323_manager = new H323::EndPoint (*call_manager, core, h323_port);
+  gmref_ptr<H323::EndPoint> h323_manager (new H323::EndPoint (*call_manager, core, h323_port));
   call_manager->add_protocol_manager (h323_manager);
   account_core->add_account_subscriber (*h323_manager);
 #endif

Modified: trunk/lib/engine/components/opal/sip-chat-simple.cpp
==============================================================================
--- trunk/lib/engine/components/opal/sip-chat-simple.cpp	(original)
+++ trunk/lib/engine/components/opal/sip-chat-simple.cpp	Tue Nov 18 08:52:45 2008
@@ -45,8 +45,8 @@
 			     sigc::slot<bool, std::string> sender_)
   : core(core_), sender(sender_), uri(uri_)
 {
-  presentity = new Ekiga::URIPresentity (core, name, uri,
-					 std::set<std::string>());
+  presentity = gmref_ptr<Ekiga::URIPresentity> (new Ekiga::URIPresentity (core, name, uri,
+									  std::set<std::string>()));
 }
 
 SIP::SimpleChat::~SimpleChat ()

Modified: trunk/lib/engine/engine.cpp
==============================================================================
--- trunk/lib/engine/engine.cpp	(original)
+++ trunk/lib/engine/engine.cpp	Tue Nov 18 08:52:45 2008
@@ -113,7 +113,7 @@
 void
 engine_init (int argc,
              char *argv [],
-             Ekiga::Runtime *runtime,
+             Ekiga::Runtime* runtime,
              Ekiga::ServiceCore * &core)
 {
   core = new Ekiga::ServiceCore;
@@ -121,19 +121,15 @@
   /* VideoInputCore depends on VideoOutputCore and must this              *
    * be constructed thereafter                                      */
 
-  gmref_ptr<Ekiga::AccountCore> account_core = new Ekiga::AccountCore;
-  gmref_ptr<Ekiga::ContactCore> contact_core = new Ekiga::ContactCore;
-  gmref_ptr<Ekiga::CallCore> call_core = new Ekiga::CallCore;
-  gmref_ptr<Ekiga::ChatCore> chat_core = new Ekiga::ChatCore;
-  gmref_ptr<Ekiga::VideoOutputCore> videooutput_core
-    = new Ekiga::VideoOutputCore;
-  gmref_ptr<Ekiga::VideoInputCore> videoinput_core =
-    new Ekiga::VideoInputCore(*runtime, *videooutput_core);
-  gmref_ptr<Ekiga::AudioOutputCore> audiooutput_core
-    = new Ekiga::AudioOutputCore(*runtime);
-  gmref_ptr<Ekiga::AudioInputCore> audioinput_core
-    = new Ekiga::AudioInputCore(*runtime, *audiooutput_core);
-  gmref_ptr<Ekiga::HalCore> hal_core = new Ekiga::HalCore;
+  gmref_ptr<Ekiga::AccountCore> account_core (new Ekiga::AccountCore);
+  gmref_ptr<Ekiga::ContactCore> contact_core (new Ekiga::ContactCore);
+  gmref_ptr<Ekiga::CallCore> call_core (new Ekiga::CallCore);
+  gmref_ptr<Ekiga::ChatCore> chat_core (new Ekiga::ChatCore);
+  gmref_ptr<Ekiga::VideoOutputCore> videooutput_core (new Ekiga::VideoOutputCore);
+  gmref_ptr<Ekiga::VideoInputCore> videoinput_core (new Ekiga::VideoInputCore(*runtime, *videooutput_core));
+  gmref_ptr<Ekiga::AudioOutputCore> audiooutput_core (new Ekiga::AudioOutputCore(*runtime));
+  gmref_ptr<Ekiga::AudioInputCore> audioinput_core (new Ekiga::AudioInputCore(*runtime, *audiooutput_core));
+  gmref_ptr<Ekiga::HalCore> hal_core (new Ekiga::HalCore);
 
 
   /* The last item in the following list will be destroyed first.   *
@@ -143,7 +139,7 @@
    *   components may still call runtime functions until destroyed  *
    *   (e.g. VideoOutputCore).                                          */
 
-  core->add (runtime);
+  core->add (gmref_ptr<Ekiga::Runtime>(runtime));
   core->add (account_core);
   core->add (contact_core);
   core->add (chat_core);
@@ -159,8 +155,7 @@
     return;
   }
 
-  gmref_ptr<Ekiga::PresenceCore> presence_core
-    = new Ekiga::PresenceCore (*core);
+  gmref_ptr<Ekiga::PresenceCore> presence_core (new Ekiga::PresenceCore (*core));
   core->add (presence_core);
 
 #ifndef WIN32

Modified: trunk/lib/engine/gui/gtk-core/gtk-core-main.cpp
==============================================================================
--- trunk/lib/engine/gui/gtk-core/gtk-core-main.cpp	(original)
+++ trunk/lib/engine/gui/gtk-core/gtk-core-main.cpp	Tue Nov 18 08:52:45 2008
@@ -48,7 +48,7 @@
 {
   if (gtk_init_check (argc, argv)) {
 
-    gmref_ptr<Gtk::Core> gtk = new Gtk::Core ();
+    gmref_ptr<Gtk::Core> gtk (new Gtk::Core);
 
     core.add (gtk);
 

Modified: trunk/lib/engine/gui/gtk-frontend/gtk-frontend.cpp
==============================================================================
--- trunk/lib/engine/gui/gtk-frontend/gtk-frontend.cpp	(original)
+++ trunk/lib/engine/gui/gtk-frontend/gtk-frontend.cpp	Tue Nov 18 08:52:45 2008
@@ -70,7 +70,7 @@
 
   if (presence_core && contact_core && chat_core && history_source) {
 
-    gmref_ptr<GtkFrontend> gtk_frontend = new GtkFrontend (core);
+    gmref_ptr<GtkFrontend> gtk_frontend (new GtkFrontend (core));
     core.add (gtk_frontend);
     result = true;
   }

Modified: trunk/lib/engine/gui/gtk-frontend/presentity-view.cpp
==============================================================================
--- trunk/lib/engine/gui/gtk-frontend/presentity-view.cpp	(original)
+++ trunk/lib/engine/gui/gtk-frontend/presentity-view.cpp	Tue Nov 18 08:52:45 2008
@@ -121,7 +121,7 @@
 {
   if (self->priv->presentity) {
 
-    self->priv->presentity = NULL;
+    self->priv->presentity = gmref_ptr<Ekiga::Presentity>(0);
     self->priv->updated_conn.disconnect ();
     self->priv->removed_conn.disconnect ();
   }
@@ -159,7 +159,7 @@
 
   case PRESENTITY_VIEW_PROP_PRESENTITY:
     presentity = (Ekiga::Presentity*)g_value_get_pointer (value);
-    presentity_view_set_presentity (self, presentity);
+    presentity_view_set_presentity (self, gmref_ptr<Ekiga::Presentity>(presentity));
 
     break;
 

Modified: trunk/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
==============================================================================
--- trunk/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp	(original)
+++ trunk/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp	Tue Nov 18 08:52:45 2008
@@ -703,21 +703,24 @@
 	if (event->type == GDK_BUTTON_PRESS && event->button == 1 && name)
 	  on_clicked_fold (self, path, name);
 	if (event->type == GDK_BUTTON_PRESS && event->button == 3)
-	  on_clicked_show_heap_menu (heap, event);
+	  on_clicked_show_heap_menu (gmref_ptr<Ekiga::Heap>(heap), event);
 	break;
       case TYPE_GROUP:
 
 	if (event->type == GDK_BUTTON_PRESS && event->button == 1 && name)
 	  on_clicked_fold (self, path, name);
 	if (event->type == GDK_BUTTON_PRESS && event->button == 3)
-	  on_clicked_show_heap_group_menu (heap, name, event);
+	  on_clicked_show_heap_group_menu (gmref_ptr<Ekiga::Heap>(heap),
+					   name, event);
 	break;
       case TYPE_PRESENTITY:
 
 	if (event->type == GDK_BUTTON_PRESS && event->button == 3)
-	  on_clicked_show_presentity_menu (heap, presentity, event);
+	  on_clicked_show_presentity_menu (gmref_ptr<Ekiga::Heap>(heap),
+					   gmref_ptr<Ekiga::Presentity>(presentity),
+					   event);
 	if (event->type == GDK_2BUTTON_PRESS)
-	  on_clicked_trigger_presentity (presentity);
+	  on_clicked_trigger_presentity (gmref_ptr<Ekiga::Presentity>(presentity));
 	break;
       default:
 

Modified: trunk/lib/engine/presence/avahi/avahi-cluster.cpp
==============================================================================
--- trunk/lib/engine/presence/avahi/avahi-cluster.cpp	(original)
+++ trunk/lib/engine/presence/avahi/avahi-cluster.cpp	Tue Nov 18 08:52:45 2008
@@ -39,7 +39,7 @@
 
 Avahi::Cluster::Cluster (Ekiga::ServiceCore &_core): core(_core)
 {
-  heap = new Heap (core);
+  heap = gmref_ptr<Heap>(new Heap (core));
 
   add_heap (heap);
 

Modified: trunk/lib/engine/presence/avahi/avahi-heap.cpp
==============================================================================
--- trunk/lib/engine/presence/avahi/avahi-heap.cpp	(original)
+++ trunk/lib/engine/presence/avahi/avahi-heap.cpp	Tue Nov 18 08:52:45 2008
@@ -305,8 +305,7 @@
 
 	groups.insert (_("Neighbours"));
 	url = g_strdup_printf ("%s:neighbour %s:%d", broken[1], host_name, port);
-	gmref_ptr<Ekiga::URIPresentity> presentity
-	  = new Ekiga::URIPresentity (core, name, url, groups);
+	gmref_ptr<Ekiga::URIPresentity> presentity (new Ekiga::URIPresentity (core, name, url, groups));
 	status_received.emit (url, status);
 	presence_received.emit (url, presence);
 	add_presentity (presentity);

Modified: trunk/lib/engine/presence/avahi/avahi-main.cpp
==============================================================================
--- trunk/lib/engine/presence/avahi/avahi-main.cpp	(original)
+++ trunk/lib/engine/presence/avahi/avahi-main.cpp	Tue Nov 18 08:52:45 2008
@@ -49,7 +49,7 @@
 
   if (presence_core) {
 
-    gmref_ptr<Avahi::Cluster> cluster = new Avahi::Cluster (core);
+    gmref_ptr<Avahi::Cluster> cluster (new Avahi::Cluster (core));
     core.add (cluster);
     presence_core->add_cluster (cluster);
     result = true;

Modified: trunk/lib/engine/presence/local-roster/local-cluster.cpp
==============================================================================
--- trunk/lib/engine/presence/local-roster/local-cluster.cpp	(original)
+++ trunk/lib/engine/presence/local-roster/local-cluster.cpp	Tue Nov 18 08:52:45 2008
@@ -44,7 +44,7 @@
 {
   gmref_ptr<Ekiga::PresenceCore> presence_core = core.get ("presence-core");
 
-  heap = new Heap (core);
+  heap = gmref_ptr<Heap> (new Heap (core));
 
   presence_core->presence_received.connect (sigc::mem_fun (this, &Local::Cluster::on_presence_received));
   presence_core->status_received.connect (sigc::mem_fun (this, &Local::Cluster::on_status_received));

Modified: trunk/lib/engine/presence/local-roster/local-heap.cpp
==============================================================================
--- trunk/lib/engine/presence/local-roster/local-heap.cpp	(original)
+++ trunk/lib/engine/presence/local-roster/local-heap.cpp	Tue Nov 18 08:52:45 2008
@@ -244,7 +244,7 @@
 void
 Local::Heap::add (xmlNodePtr node)
 {
-  gmref_ptr<Presentity> presentity = new Presentity (core, node);
+  gmref_ptr<Presentity> presentity (new Presentity (core, node));
 
   common_add (presentity);
 }
@@ -258,7 +258,7 @@
   xmlNodePtr root = NULL;
 
   root = xmlDocGetRootElement (doc);
-  gmref_ptr<Presentity> presentity = new Presentity (core, name, uri, groups);
+  gmref_ptr<Presentity> presentity (new Presentity (core, name, uri, groups));
 
   xmlAddChild (root, presentity->get_node ());
 

Modified: trunk/lib/engine/presence/local-roster/local-presentity.cpp
==============================================================================
--- trunk/lib/engine/presence/local-roster/local-presentity.cpp	(original)
+++ trunk/lib/engine/presence/local-roster/local-presentity.cpp	Tue Nov 18 08:52:45 2008
@@ -187,7 +187,9 @@
   bool populated = false;
   gmref_ptr<Ekiga::PresenceCore> presence_core = core.get ("presence-core");
 
-  populated = presence_core->populate_presentity_menu (this, uri, builder);
+  populated
+    = presence_core->populate_presentity_menu (gmref_ptr<Presentity>(this),
+					       uri, builder);
 
   if (populated)
     builder.add_separator ();

Modified: trunk/lib/engine/presence/local-roster/local-roster-bridge.cpp
==============================================================================
--- trunk/lib/engine/presence/local-roster/local-roster-bridge.cpp	(original)
+++ trunk/lib/engine/presence/local-roster/local-roster-bridge.cpp	Tue Nov 18 08:52:45 2008
@@ -86,7 +86,7 @@
 
   if (cluster->is_supported_uri (uri)) {
 
-    gmref_ptr<Heap> heap = cluster->get_heap ();
+    gmref_ptr<Heap> heap(cluster->get_heap ());
 
     if (!heap->has_presentity_with_uri (uri)) {
 
@@ -114,8 +114,7 @@
 
   if (cluster && contact_core) {
 
-    gmref_ptr<Local::ContactDecorator> decorator
-      = new Local::ContactDecorator (cluster);
+    gmref_ptr<Local::ContactDecorator> decorator (new Local::ContactDecorator (cluster));
     core.add (decorator);
     contact_core->add_contact_decorator (decorator);
     result = true;

Modified: trunk/lib/engine/presence/local-roster/local-roster-main.cpp
==============================================================================
--- trunk/lib/engine/presence/local-roster/local-roster-main.cpp	(original)
+++ trunk/lib/engine/presence/local-roster/local-roster-main.cpp	Tue Nov 18 08:52:45 2008
@@ -49,7 +49,7 @@
 
   if (presence_core) {
 
-    gmref_ptr<Local::Cluster> cluster = new Local::Cluster (core);
+    gmref_ptr<Local::Cluster> cluster (new Local::Cluster (core));
     core.add (cluster);
     presence_core->add_cluster (cluster);
     result = true;

Modified: trunk/lib/engine/presence/skel/uri-presentity.cpp
==============================================================================
--- trunk/lib/engine/presence/skel/uri-presentity.cpp	(original)
+++ trunk/lib/engine/presence/skel/uri-presentity.cpp	Tue Nov 18 08:52:45 2008
@@ -93,7 +93,8 @@
 Ekiga::URIPresentity::populate_menu (Ekiga::MenuBuilder &builder)
 {
   gmref_ptr<Ekiga::PresenceCore> presence_core = core.get ("presence-core");
-  return presence_core->populate_presentity_menu (this, uri, builder);
+  return presence_core->populate_presentity_menu (gmref_ptr<Presentity>(this),
+						  uri, builder);
 }
 
 void

Modified: trunk/lib/engine/protocol/skel/call-manager.cpp
==============================================================================
--- trunk/lib/engine/protocol/skel/call-manager.cpp	(original)
+++ trunk/lib/engine/protocol/skel/call-manager.cpp	Tue Nov 18 08:52:45 2008
@@ -58,7 +58,7 @@
     if ((*iter)->get_protocol_name () == protocol)
       return (*iter);
 
-  return NULL;
+  return gmref_ptr<CallProtocolManager>(0);
 }
 
 

Modified: trunk/lib/gmref/gmref.h
==============================================================================
--- trunk/lib/gmref/gmref.h	(original)
+++ trunk/lib/gmref/gmref.h	Tue Nov 18 08:52:45 2008
@@ -70,7 +70,7 @@
 {
 public:
 
-  gmref_ptr (T* obj_);
+  explicit gmref_ptr (T* obj_);
 
   gmref_ptr (const gmref_ptr<T>& ptr);
 

Modified: trunk/src/gui/main.cpp
==============================================================================
--- trunk/src/gui/main.cpp	(original)
+++ trunk/src/gui/main.cpp	Tue Nov 18 08:52:45 2008
@@ -684,7 +684,7 @@
   ekiga_main_window_update_logo_have_window (mw);
 
   if (mw->priv->current_call && mw->priv->current_call->get_id () == call->get_id ()) {
-    mw->priv->current_call = NULL;
+    mw->priv->current_call = gmref_ptr<Ekiga::Call>(0);
     g_source_remove (mw->priv->timeout_id);
     mw->priv->timeout_id = -1;
   }
@@ -3725,7 +3725,7 @@
 
   mw->priv->presentity = NULL;
   mw->priv->transfer_call_popup = NULL;
-  mw->priv->current_call = NULL;
+  mw->priv->current_call = gmref_ptr<Ekiga::Call>(0);
   mw->priv->timeout_id = -1;
   mw->priv->levelmeter_timeout_id = -1;
   mw->priv->audio_transmission_active = false;



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