[gnome-builder] tools: print mined project info
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] tools: print mined project info
- Date: Tue, 31 Mar 2015 01:54:05 +0000 (UTC)
commit 1da2f71c3eb54d660a93ce863970ea8912fe0031
Author: Christian Hergert <christian hergert me>
Date: Mon Mar 30 18:53:58 2015 -0700
tools: print mined project info
tools/ide-mine-projects.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/tools/ide-mine-projects.c b/tools/ide-mine-projects.c
index 4e68eab..90b2c68 100644
--- a/tools/ide-mine-projects.c
+++ b/tools/ide-mine-projects.c
@@ -37,6 +37,21 @@ mine_cb (GObject *object,
g_main_loop_quit (main_loop);
}
+static void
+discovered_cb (IdeProjectMiner *miner,
+ IdeProjectInfo *info)
+{
+ GFile *file;
+ gchar *path;
+
+ file = ide_project_info_get_file (info);
+ path = g_file_get_path (file);
+
+ g_print ("%s (%s)\n", path, ide_project_info_get_name (info));
+
+ g_free (path);
+}
+
static gboolean
verbose_cb (void)
{
@@ -72,6 +87,7 @@ main (int argc,
miner = g_object_new (IDE_TYPE_AUTOTOOLS_PROJECT_MINER,
"root-directory", NULL,
NULL);
+ g_signal_connect (miner, "discovered", G_CALLBACK (discovered_cb), NULL);
main_loop = g_main_loop_new (NULL, FALSE);
ide_project_miner_mine_async (miner, NULL, mine_cb, main_loop);
g_main_loop_run (main_loop);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]