[gnome-builder/wip/libide] libide: alter format of search result printing
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/libide] libide: alter format of search result printing
- Date: Mon, 16 Feb 2015 21:52:42 +0000 (UTC)
commit 67a2db96da31bd4e7a65c7605410eb704d4bd579
Author: Christian Hergert <christian hergert me>
Date: Mon Feb 16 13:52:01 2015 -0800
libide: alter format of search result printing
tools/ide-search.c | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
---
diff --git a/tools/ide-search.c b/tools/ide-search.c
index c06f004..1ab70f7 100644
--- a/tools/ide-search.c
+++ b/tools/ide-search.c
@@ -43,25 +43,24 @@ on_result_added_cb (IdeSearchContext *search_context,
IdeSearchResult *result,
gpointer user_data)
{
+ const gchar *title;
+ const gchar *subtitle;
+
gCount++;
- g_print ("Result: %s\n", g_type_name (G_TYPE_FROM_INSTANCE (result)));
+ title = ide_search_result_get_title (result);
+ subtitle = ide_search_result_get_subtitle (result);
+
+ g_print ("%s\n", title);
+ g_print ("%s\n", subtitle);
+ g_print ("------------------------------------------------------------\n");
+
}
static void
on_completed_cb (IdeSearchContext *search_context)
{
- gchar *line;
- guint len;
- guint i;
-
- line = g_strdup_printf (_("%"G_GSIZE_FORMAT" results"), gCount);
- len = strlen (line);
- for (i = 0; i < len; i++)
- g_printerr ("=");
- g_printerr ("\n");
- g_printerr ("%s\n", line);
-
+ g_print (_("%"G_GSIZE_FORMAT" results\n"), gCount);
g_object_unref (search_context);
quit (gExitCode);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]