[libgdata] youtube: Fix default values of GDataYouTubeQuery location properties



commit 7fc7b3ad68ddca2c838651734b0c8a1d32da8449
Author: Philip Withnall <philip tecnocode co uk>
Date:   Sun Apr 19 20:44:14 2015 +0100

    youtube: Fix default values of GDataYouTubeQuery location properties
    
    The latitude and longitude properties previously had 0.0 as their
    default value, which is a valid location. They should instead have
    G_MAXDOUBLE as their default, which is not a valid location — and hence
    doesn’t affect query results before the properties are set explicitly.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=687597

 gdata/services/youtube/gdata-youtube-query.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gdata/services/youtube/gdata-youtube-query.c b/gdata/services/youtube/gdata-youtube-query.c
index bf95730..fefc8f3 100644
--- a/gdata/services/youtube/gdata-youtube-query.c
+++ b/gdata/services/youtube/gdata-youtube-query.c
@@ -131,7 +131,7 @@ gdata_youtube_query_class_init (GDataYouTubeQueryClass *klass)
        g_object_class_install_property (gobject_class, PROP_LATITUDE,
                                         g_param_spec_double ("latitude",
                                                              "Latitude", "The latitude of a particular 
location of which videos should be found.",
-                                                             -G_MAXDOUBLE, G_MAXDOUBLE, 0.0,
+                                                             -G_MAXDOUBLE, G_MAXDOUBLE, G_MAXDOUBLE,
                                                              G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
        /**
@@ -149,7 +149,7 @@ gdata_youtube_query_class_init (GDataYouTubeQueryClass *klass)
        g_object_class_install_property (gobject_class, PROP_LONGITUDE,
                                         g_param_spec_double ("longitude",
                                                              "Longitude", "The longitude of a particular 
location of which videos should be found.",
-                                                             -G_MAXDOUBLE, G_MAXDOUBLE, 0.0,
+                                                             -G_MAXDOUBLE, G_MAXDOUBLE, G_MAXDOUBLE,
                                                              G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
        /**
@@ -325,6 +325,9 @@ static void
 gdata_youtube_query_init (GDataYouTubeQuery *self)
 {
        self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_YOUTUBE_QUERY, GDataYouTubeQueryPrivate);
+
+       self->priv->latitude = G_MAXDOUBLE;
+       self->priv->longitude = G_MAXDOUBLE;
 }
 
 static void


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