[seahorse] search-provider: use g_icon_serialize()
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse] search-provider: use g_icon_serialize()
- Date: Tue, 19 Jan 2016 08:19:53 +0000 (UTC)
commit fa273b0e9770c0a2db9cd898e23f41c0a3ad4cb2
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sat Nov 21 13:58:52 2015 -0800
search-provider: use g_icon_serialize()
Instead of g_icon_to_string().
https://bugzilla.gnome.org/show_bug.cgi?id=758472
libseahorse/seahorse-search-provider.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/libseahorse/seahorse-search-provider.c b/libseahorse/seahorse-search-provider.c
index 337a9eb..8ade89c 100644
--- a/libseahorse/seahorse-search-provider.c
+++ b/libseahorse/seahorse-search-provider.c
@@ -291,7 +291,8 @@ handle_get_result_metas (SeahorseShellSearchProvider2 *skeleton,
SeahorseSearchProvider *self = SEAHORSE_SEARCH_PROVIDER (skeleton);
int i;
GVariantBuilder builder;
- char *name, *description, *escaped_description, *icon_string;
+ char *name, *description, *escaped_description;
+ GVariant *icon_variant;
GIcon *icon;
if (error_request_if_not_loaded (self, invocation))
@@ -324,11 +325,12 @@ handle_get_result_metas (SeahorseShellSearchProvider2 *skeleton,
g_free (name);
}
if (icon) {
- icon_string = g_icon_to_string (icon);
- g_variant_builder_add (&builder, "{sv}",
- "gicon",
- icon_string ? g_variant_new_string (icon_string) : NULL);
- g_free (icon_string);
+ icon_variant = g_icon_serialize (icon);
+ if (icon_variant) {
+ g_variant_builder_add (&builder, "{sv}",
+ "icon", icon_variant);
+ g_variant_unref (icon_variant);
+ }
g_object_unref (icon);
}
if (description) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]