aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-map-view.c
diff options
context:
space:
mode:
authorPierre-Luc Beaudoin <pierre-luc@pierlux.com>2009-05-11 12:56:21 +0800
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>2009-05-28 00:52:05 +0800
commitc387d97d12f788291974da01c315fa87eb5f8b51 (patch)
tree975d3d0b38e999f945d60d67e51a5bdbb3d23a33 /src/empathy-map-view.c
parentf09cfa0a6a26e8badaf86353b955fee593786e42 (diff)
downloadgsoc2013-empathy-c387d97d12f788291974da01c315fa87eb5f8b51.tar
gsoc2013-empathy-c387d97d12f788291974da01c315fa87eb5f8b51.tar.gz
gsoc2013-empathy-c387d97d12f788291974da01c315fa87eb5f8b51.tar.bz2
gsoc2013-empathy-c387d97d12f788291974da01c315fa87eb5f8b51.tar.lz
gsoc2013-empathy-c387d97d12f788291974da01c315fa87eb5f8b51.tar.xz
gsoc2013-empathy-c387d97d12f788291974da01c315fa87eb5f8b51.tar.zst
gsoc2013-empathy-c387d97d12f788291974da01c315fa87eb5f8b51.zip
Get rid of disconnect which is undeeded
Diffstat (limited to 'src/empathy-map-view.c')
-rw-r--r--src/empathy-map-view.c32
1 files changed, 4 insertions, 28 deletions
diff --git a/src/empathy-map-view.c b/src/empathy-map-view.c
index 108e9d929..0e7820325 100644
--- a/src/empathy-map-view.c
+++ b/src/empathy-map-view.c
@@ -79,8 +79,6 @@ static void map_view_destroy_cb (GtkWidget *widget,
EmpathyMapView *window);
static gboolean map_view_contacts_foreach (GtkTreeModel *model,
GtkTreePath *path, GtkTreeIter *iter, gpointer user_data);
-static gboolean map_view_contacts_foreach_disconnect (GtkTreeModel *model,
- GtkTreePath *path, GtkTreeIter *iter, gpointer user_data);
static void map_view_zoom_in_cb (GtkWidget *widget, EmpathyMapView *window);
static void map_view_zoom_out_cb (GtkWidget *widget, EmpathyMapView *window);
static void map_view_contact_location_notify (GObject *gobject,
@@ -151,36 +149,12 @@ empathy_map_view_show ()
return window->window;
}
-static gboolean
-map_view_contacts_foreach_disconnect (GtkTreeModel *model,
- GtkTreePath *path,
- GtkTreeIter *iter,
- gpointer user_data)
-{
- EmpathyContact *contact;
- guint handle_id;
-
- gtk_tree_model_get (model, iter, EMPATHY_CONTACT_LIST_STORE_COL_CONTACT,
- &contact, -1);
- if (!contact)
- return FALSE;
-
- handle_id = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (contact), "map-view-handle"));
- if (handle_id > 0)
- g_signal_handler_disconnect (contact, handle_id);
-
- return FALSE;
-}
-
static void
map_view_destroy_cb (GtkWidget *widget,
EmpathyMapView *window)
{
GtkTreeModel *model;
- /* Set up contact list. */
- model = GTK_TREE_MODEL (window->list_store);
- gtk_tree_model_foreach (model, map_view_contacts_foreach_disconnect, window);
g_object_unref (window->list_store);
g_free (window);
}
@@ -260,7 +234,9 @@ map_view_marker_update (ChamplainMarker *marker,
GValue *value;
GHashTable *location = empathy_contact_get_location (contact);
- if (g_hash_table_size (location) == 0)
+
+ if (location == NULL ||
+ g_hash_table_size (location) == 0)
{
clutter_actor_hide (CLUTTER_ACTOR (marker));
return;
@@ -335,7 +311,7 @@ map_view_contacts_foreach (GtkTreeModel *model,
gtk_tree_model_get (model, iter, EMPATHY_CONTACT_LIST_STORE_COL_CONTACT,
&contact, -1);
- if (!contact)
+ if (contact == NULL)
return FALSE;
marker = champlain_marker_new ();