[gnome-builder/wip/chergert/perspective] directory: stub out genesis for local project



commit 9a4ef740a2330a8920ee65d7fbb08381a82b7f6d
Author: Christian Hergert <chergert redhat com>
Date:   Mon Nov 30 23:40:45 2015 -0800

    directory: stub out genesis for local project

 libide/directory/ide-directory-genesis-addin.c |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/libide/directory/ide-directory-genesis-addin.c b/libide/directory/ide-directory-genesis-addin.c
index 67fa5d3..f5f404c 100644
--- a/libide/directory/ide-directory-genesis-addin.c
+++ b/libide/directory/ide-directory-genesis-addin.c
@@ -23,7 +23,9 @@
 
 struct _IdeDirectoryGenesisAddin
 {
-  GObject parent_instance;
+  GObject               parent_instance;
+
+  GtkFileChooserWidget *widget;
 };
 
 static void genesis_addin_iface_init (IdeGenesisAddinInterface *iface);
@@ -56,7 +58,19 @@ ide_directory_genesis_addin_get_title (IdeGenesisAddin *addin)
 static GtkWidget *
 ide_directory_genesis_addin_get_widget (IdeGenesisAddin *addin)
 {
-  return NULL;
+  IdeDirectoryGenesisAddin *self = (IdeDirectoryGenesisAddin *)addin;
+
+  g_assert (IDE_IS_DIRECTORY_GENESIS_ADDIN (self));
+
+  if (self->widget == NULL)
+    {
+      self->widget = g_object_new (GTK_TYPE_FILE_CHOOSER_WIDGET,
+                                   "action", GTK_FILE_CHOOSER_ACTION_OPEN,
+                                   "visible", TRUE,
+                                   NULL);
+    }
+
+  return GTK_WIDGET (self->widget);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]