aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorPierre-Luc Beaudoin <pierre-luc@pierlux.com>2009-05-21 02:17:35 +0800
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>2009-05-28 00:52:07 +0800
commitcccf17b4460cfdd084ea40ebff895abf101d4f49 (patch)
tree549b78c5081dc0e361fa143156864a41a54df0f3 /libempathy-gtk
parent1a8aefd70a364e8b3e7eac6eda4f93bb04022d1e (diff)
downloadgsoc2013-empathy-cccf17b4460cfdd084ea40ebff895abf101d4f49.tar
gsoc2013-empathy-cccf17b4460cfdd084ea40ebff895abf101d4f49.tar.gz
gsoc2013-empathy-cccf17b4460cfdd084ea40ebff895abf101d4f49.tar.bz2
gsoc2013-empathy-cccf17b4460cfdd084ea40ebff895abf101d4f49.tar.lz
gsoc2013-empathy-cccf17b4460cfdd084ea40ebff895abf101d4f49.tar.xz
gsoc2013-empathy-cccf17b4460cfdd084ea40ebff895abf101d4f49.tar.zst
gsoc2013-empathy-cccf17b4460cfdd084ea40ebff895abf101d4f49.zip
Display user textual location even if it doesn't include a lat,lon
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-contact-widget.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c
index d95904d11..255a68297 100644
--- a/libempathy-gtk/empathy-contact-widget.c
+++ b/libempathy-gtk/empathy-contact-widget.c
@@ -1238,9 +1238,10 @@ contact_widget_location_update (EmpathyContactWidget *information)
GHashTable *location;
GValue *value;
gdouble lat, lon;
+ gboolean has_position = TRUE;
location = empathy_contact_get_location (information->contact);
- if (location == NULL)
+ if (location == NULL || g_hash_table_size (location) == 0)
{
gtk_widget_hide (information->vbox_location);
return;
@@ -1248,19 +1249,15 @@ contact_widget_location_update (EmpathyContactWidget *information)
value = g_hash_table_lookup (location, EMPATHY_LOCATION_LAT);
if (value == NULL)
- {
- gtk_widget_hide (information->vbox_location);
- return;
- }
- lat = g_value_get_double (value);
+ has_position = FALSE;
+ else
+ lat = g_value_get_double (value);
value = g_hash_table_lookup (location, EMPATHY_LOCATION_LON);
if (value == NULL)
- {
- gtk_widget_hide (information->vbox_location);
- return;
- }
- lon = g_value_get_double (value);
+ has_position = FALSE;
+ else
+ lon = g_value_get_double (value);
value = g_hash_table_lookup (location, EMPATHY_LOCATION_TIMESTAMP);
if (value == NULL)
@@ -1348,7 +1345,10 @@ contact_widget_location_update (EmpathyContactWidget *information)
}
#if HAVE_LIBCHAMPLAIN
- if (/* information->flags & EMPATHY_CONTACT_WIDGET_FOR_TOOLTIP || */
+ /* Cannot be displayed in tooltips until Clutter-Gtk can deal with such
+ * windows
+ */
+ if (has_position &&
information->flags & EMPATHY_CONTACT_WIDGET_SHOW_LOCATION)
{
ClutterActor *marker;