[gnome-photos/wip/facebook] search-type: Use better defaults for "filter" and "where"
- From: Álvaro Peña <alvaropg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/facebook] search-type: Use better defaults for "filter" and "where"
- Date: Fri, 22 Nov 2013 22:03:14 +0000 (UTC)
commit 7d075198b8a1224504d29dc91781364f1acfc90e
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Oct 8 18:31:43 2013 +0200
search-type: Use better defaults for "filter" and "where"
Fixes: https://bugzilla.gnome.org/709367
src/photos-search-type.c | 16 ++++------------
1 files changed, 4 insertions(+), 12 deletions(-)
---
diff --git a/src/photos-search-type.c b/src/photos-search-type.c
index 633e138..e0b8441 100644
--- a/src/photos-search-type.c
+++ b/src/photos-search-type.c
@@ -59,11 +59,7 @@ static gchar *
photos_search_type_get_filter (PhotosFilterable *iface)
{
PhotosSearchType *self = PHOTOS_SEARCH_TYPE (iface);
- PhotosSearchTypePrivate *priv = self->priv;
- const gchar *filter;
-
- filter = (priv->filter != NULL && priv->filter[0] != '\0') ? priv->filter : "";
- return g_strdup (filter);
+ return g_strdup (self->priv->filter);
}
@@ -71,11 +67,7 @@ static gchar *
photos_search_type_get_where (PhotosFilterable *iface)
{
PhotosSearchType *self = PHOTOS_SEARCH_TYPE (iface);
- PhotosSearchTypePrivate *priv = self->priv;
- const gchar *where;
-
- where = (priv->where != NULL && priv->where[0] != '\0') ? priv->where : "";
- return g_strdup (where);
+ return g_strdup (self->priv->where);
}
@@ -164,7 +156,7 @@ photos_search_type_class_init (PhotosSearchTypeClass *class)
g_param_spec_string ("filter",
"",
"",
- NULL,
+ "(true)",
G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE));
g_object_class_install_property (object_class,
@@ -188,7 +180,7 @@ photos_search_type_class_init (PhotosSearchTypeClass *class)
g_param_spec_string ("where",
"",
"",
- NULL,
+ "",
G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]