[gnome-control-center] search-provider: Use a serialized gicon instead of a to_string'd one
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] search-provider: Use a serialized gicon instead of a to_string'd one
- Date: Fri, 26 Jul 2013 18:57:15 +0000 (UTC)
commit 78647aa74f9da05fe3929d519d2db704ba9b53b0
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Jul 25 21:40:18 2013 -0400
search-provider: Use a serialized gicon instead of a to_string'd one
This improves deserialization performance in gnome-shell.
https://bugzilla.gnome.org/show_bug.cgi?id=704948
search-provider/cc-search-provider.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/search-provider/cc-search-provider.c b/search-provider/cc-search-provider.c
index fde0fc7..19ac9ee 100644
--- a/search-provider/cc-search-provider.c
+++ b/search-provider/cc-search-provider.c
@@ -187,7 +187,7 @@ handle_get_result_metas (CcShellSearchProvider2 *skeleton,
GVariantBuilder builder;
GAppInfo *app;
const char *id;
- char *name, *description, *escaped_description, *icon_string;
+ char *name, *description, *escaped_description;
GIcon *icon;
g_variant_builder_init (&builder, G_VARIANT_TYPE ("aa{sv}"));
@@ -204,7 +204,6 @@ handle_get_result_metas (CcShellSearchProvider2 *skeleton,
COL_DESCRIPTION, &description,
-1);
id = g_app_info_get_id (app);
- icon_string = g_icon_to_string (icon);
escaped_description = g_markup_escape_text (description, -1);
g_variant_builder_open (&builder, G_VARIANT_TYPE ("a{sv}"));
@@ -213,7 +212,7 @@ handle_get_result_metas (CcShellSearchProvider2 *skeleton,
g_variant_builder_add (&builder, "{sv}",
"name", g_variant_new_string (name));
g_variant_builder_add (&builder, "{sv}",
- "gicon", g_variant_new_string (icon_string));
+ "icon", g_icon_serialize (icon));
g_variant_builder_add (&builder, "{sv}",
"description", g_variant_new_string (escaped_description));
g_variant_builder_close (&builder);
@@ -221,7 +220,6 @@ handle_get_result_metas (CcShellSearchProvider2 *skeleton,
g_free (name);
g_free (description);
g_free (escaped_description);
- g_free (icon_string);
g_object_unref (app);
g_object_unref (icon);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]