[ekiga/gnome-2-26] Syntactic sugar : Ekiga::ContactPtr instead of gmref_ptr<Ekiga::Contact>
- From: Eugen Dedu <ededu src gnome org>
- To: svn-commits-list gnome org
- Subject: [ekiga/gnome-2-26] Syntactic sugar : Ekiga::ContactPtr instead of gmref_ptr<Ekiga::Contact>
- Date: Mon, 27 Apr 2009 11:59:05 -0400 (EDT)
commit 38311580f227ee326ae70a0cb4ac8b42ddf3340e
Author: Julien Puydt <jpuydt src gnome org>
Date: Tue Mar 24 21:07:55 2009 +0000
Syntactic sugar : Ekiga::ContactPtr instead of gmref_ptr<Ekiga::Contact>
svn path=/trunk/; revision=7809
---
lib/engine/addressbook/contact.h | 2 +
lib/engine/components/kab/kab-contact.cpp | 2 +-
.../local-roster/local-roster-bridge.cpp | 4 +-
lib/engine/components/opal/h323-endpoint.cpp | 2 +-
lib/engine/components/opal/h323-endpoint.h | 2 +-
lib/engine/components/opal/sip-endpoint.cpp | 2 +-
lib/engine/components/opal/sip-endpoint.h | 2 +-
lib/engine/gui/gtk-frontend/book-view-gtk.cpp | 28 ++++++++++----------
.../gui/gtk-frontend/call-history-view-gtk.cpp | 2 +-
9 files changed, 24 insertions(+), 22 deletions(-)
diff --git a/lib/engine/addressbook/contact.h b/lib/engine/addressbook/contact.h
index 5c9b93d..92a2c87 100644
--- a/lib/engine/addressbook/contact.h
+++ b/lib/engine/addressbook/contact.h
@@ -111,6 +111,8 @@ namespace Ekiga
ChainOfResponsibility<FormRequest*> questions;
};
+
+ typedef gmref_ptr<Contact> ContactPtr;
/**
* @}
*/
diff --git a/lib/engine/components/kab/kab-contact.cpp b/lib/engine/components/kab/kab-contact.cpp
index 8104639..982dd13 100644
--- a/lib/engine/components/kab/kab-contact.cpp
+++ b/lib/engine/components/kab/kab-contact.cpp
@@ -84,7 +84,7 @@ KAB::Contact::populate_menu (Ekiga::MenuBuilder &builder)
std::string precision = (*iter).typeLabel ().toUtf8 ().constData ();
result = result
- || core.populate_contact_menu (gmref_ptr<Ekiga::Contact>(this),
+ || core.populate_contact_menu (Ekiga::ContactPtr(this),
(*iter).number ().toUtf8 ().constData (),
builder);
}
diff --git a/lib/engine/components/local-roster/local-roster-bridge.cpp b/lib/engine/components/local-roster/local-roster-bridge.cpp
index e252352..f0dac0c 100644
--- a/lib/engine/components/local-roster/local-roster-bridge.cpp
+++ b/lib/engine/components/local-roster/local-roster-bridge.cpp
@@ -66,7 +66,7 @@ namespace Local
const std::string get_description () const
{ return "\tComponent to push contacts into the local roster"; }
- bool populate_menu (gmref_ptr<Ekiga::Contact> contact,
+ bool populate_menu (Ekiga::ContactPtr contact,
const std::string uri,
Ekiga::MenuBuilder &builder);
@@ -78,7 +78,7 @@ namespace Local
bool
-Local::ContactDecorator::populate_menu (gmref_ptr<Ekiga::Contact> contact,
+Local::ContactDecorator::populate_menu (Ekiga::ContactPtr contact,
const std::string uri,
Ekiga::MenuBuilder &builder)
{
diff --git a/lib/engine/components/opal/h323-endpoint.cpp b/lib/engine/components/opal/h323-endpoint.cpp
index 09b4264..5fa8883 100644
--- a/lib/engine/components/opal/h323-endpoint.cpp
+++ b/lib/engine/components/opal/h323-endpoint.cpp
@@ -108,7 +108,7 @@ Opal::H323::EndPoint::~EndPoint ()
{
}
-bool Opal::H323::EndPoint::populate_menu (gmref_ptr<Ekiga::Contact> contact,
+bool Opal::H323::EndPoint::populate_menu (Ekiga::ContactPtr contact,
std::string uri,
Ekiga::MenuBuilder &builder)
{
diff --git a/lib/engine/components/opal/h323-endpoint.h b/lib/engine/components/opal/h323-endpoint.h
index bdf8497..b9521b1 100644
--- a/lib/engine/components/opal/h323-endpoint.h
+++ b/lib/engine/components/opal/h323-endpoint.h
@@ -70,7 +70,7 @@ namespace Opal {
~EndPoint ();
/* ContactDecorator and PresentityDecorator */
- bool populate_menu (gmref_ptr<Ekiga::Contact> contact,
+ bool populate_menu (Ekiga::ContactPtr contact,
const std::string uri,
Ekiga::MenuBuilder &builder);
diff --git a/lib/engine/components/opal/sip-endpoint.cpp b/lib/engine/components/opal/sip-endpoint.cpp
index b1d0ed1..8816157 100644
--- a/lib/engine/components/opal/sip-endpoint.cpp
+++ b/lib/engine/components/opal/sip-endpoint.cpp
@@ -176,7 +176,7 @@ Opal::Sip::EndPoint::~EndPoint ()
}
-bool Opal::Sip::EndPoint::populate_menu (gmref_ptr<Ekiga::Contact> contact,
+bool Opal::Sip::EndPoint::populate_menu (Ekiga::ContactPtr contact,
const std::string uri,
Ekiga::MenuBuilder &builder)
{
diff --git a/lib/engine/components/opal/sip-endpoint.h b/lib/engine/components/opal/sip-endpoint.h
index 56ad061..b79a6ab 100644
--- a/lib/engine/components/opal/sip-endpoint.h
+++ b/lib/engine/components/opal/sip-endpoint.h
@@ -86,7 +86,7 @@ namespace Opal {
~EndPoint ();
/* ContactDecorator and PresentityDecorator */
- bool populate_menu (gmref_ptr<Ekiga::Contact> contact,
+ bool populate_menu (Ekiga::ContactPtr contact,
const std::string uri,
Ekiga::MenuBuilder &builder);
diff --git a/lib/engine/gui/gtk-frontend/book-view-gtk.cpp b/lib/engine/gui/gtk-frontend/book-view-gtk.cpp
index 34609a2..08576fa 100644
--- a/lib/engine/gui/gtk-frontend/book-view-gtk.cpp
+++ b/lib/engine/gui/gtk-frontend/book-view-gtk.cpp
@@ -84,7 +84,7 @@ static GObjectClass *parent_class = NULL;
* BEHAVIOR : Update the BookView.
* PRE : The gpointer must point to the BookViewGtk GObject.
*/
-static void on_contact_added (gmref_ptr<Ekiga::Contact> contact,
+static void on_contact_added (Ekiga::ContactPtr contact,
gpointer data);
@@ -92,7 +92,7 @@ static void on_contact_added (gmref_ptr<Ekiga::Contact> contact,
* BEHAVIOR : Update the BookView.
* PRE : The gpointer must point to the BookViewGtk GObject.
*/
-static void on_contact_updated (gmref_ptr<Ekiga::Contact> contact,
+static void on_contact_updated (Ekiga::ContactPtr contact,
gpointer data);
@@ -107,7 +107,7 @@ static void on_updated (gpointer data);
* BEHAVIOR : Update the BookView.
* PRE : The gpointer must point to the BookViewGtk GObject.
*/
-static void on_contact_removed (gmref_ptr<Ekiga::Contact> contact,
+static void on_contact_removed (Ekiga::ContactPtr contact,
gpointer data);
@@ -155,7 +155,7 @@ static gint on_contact_clicked (GtkWidget *tree_view,
*/
static void
book_view_gtk_add_contact (BookViewGtk *self,
- gmref_ptr<Ekiga::Contact> contact);
+ Ekiga::ContactPtr contact);
/* DESCRIPTION : /
@@ -164,7 +164,7 @@ book_view_gtk_add_contact (BookViewGtk *self,
*/
static void
book_view_gtk_update_contact (BookViewGtk *self,
- gmref_ptr<Ekiga::Contact> contact,
+ Ekiga::ContactPtr contact,
GtkTreeIter *iter);
@@ -174,7 +174,7 @@ book_view_gtk_update_contact (BookViewGtk *self,
*/
static void
book_view_gtk_remove_contact (BookViewGtk *self,
- gmref_ptr<Ekiga::Contact> contact);
+ Ekiga::ContactPtr contact);
/* DESCRIPTION : /
@@ -184,14 +184,14 @@ book_view_gtk_remove_contact (BookViewGtk *self,
*/
static gboolean
book_view_gtk_find_iter_for_contact (BookViewGtk *view,
- gmref_ptr<Ekiga::Contact> contact,
+ Ekiga::ContactPtr contact,
GtkTreeIter *iter);
/* Implementation of the callbacks */
static void
-on_contact_added (gmref_ptr<Ekiga::Contact> contact,
+on_contact_added (Ekiga::ContactPtr contact,
gpointer data)
{
book_view_gtk_add_contact (BOOK_VIEW_GTK (data), contact);
@@ -199,7 +199,7 @@ on_contact_added (gmref_ptr<Ekiga::Contact> contact,
static void
-on_contact_updated (gmref_ptr<Ekiga::Contact> contact,
+on_contact_updated (Ekiga::ContactPtr contact,
gpointer data)
{
BookViewGtk *view = NULL;
@@ -232,7 +232,7 @@ on_updated (gpointer data)
static void
-on_contact_removed (gmref_ptr<Ekiga::Contact> contact,
+on_contact_removed (Ekiga::ContactPtr contact,
gpointer data)
{
BookViewGtk *view = NULL;
@@ -342,7 +342,7 @@ on_contact_clicked (GtkWidget *tree_view,
/* Implementation of the static functions */
static void
book_view_gtk_add_contact (BookViewGtk *self,
- gmref_ptr<Ekiga::Contact> contact)
+ Ekiga::ContactPtr contact)
{
GtkTreeModel *model = NULL;
GtkListStore *store = NULL;
@@ -359,7 +359,7 @@ book_view_gtk_add_contact (BookViewGtk *self,
static void
book_view_gtk_update_contact (BookViewGtk *self,
- gmref_ptr<Ekiga::Contact> contact,
+ Ekiga::ContactPtr contact,
GtkTreeIter *iter)
{
GdkPixbuf *icon = NULL;
@@ -382,7 +382,7 @@ book_view_gtk_update_contact (BookViewGtk *self,
static void
book_view_gtk_remove_contact (BookViewGtk *self,
- gmref_ptr<Ekiga::Contact> contact)
+ Ekiga::ContactPtr contact)
{
GtkTreeModel *model = NULL;
GtkListStore *store = NULL;
@@ -401,7 +401,7 @@ book_view_gtk_remove_contact (BookViewGtk *self,
static gboolean
book_view_gtk_find_iter_for_contact (BookViewGtk *view,
- gmref_ptr<Ekiga::Contact> contact,
+ Ekiga::ContactPtr contact,
GtkTreeIter *iter)
{
GtkTreeModel *model = NULL;
diff --git a/lib/engine/gui/gtk-frontend/call-history-view-gtk.cpp b/lib/engine/gui/gtk-frontend/call-history-view-gtk.cpp
index e1ce825..0054fc4 100644
--- a/lib/engine/gui/gtk-frontend/call-history-view-gtk.cpp
+++ b/lib/engine/gui/gtk-frontend/call-history-view-gtk.cpp
@@ -69,7 +69,7 @@ destroy_connections (gpointer data,
/* react to a new call being inserted in history */
static void
-on_contact_added (gmref_ptr<Ekiga::Contact> contact,
+on_contact_added (Ekiga::ContactPtr contact,
GtkListStore *store)
{
time_t t;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]