[gnome-builder] buildui: add sources directory to configuration view
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] buildui: add sources directory to configuration view
- Date: Sun, 23 Jul 2017 02:15:08 +0000 (UTC)
commit 09c75210dc5e6270685ba00a40209996436c2ebf
Author: Christian Hergert <chergert redhat com>
Date: Sat Jul 22 19:13:47 2017 -0700
buildui: add sources directory to configuration view
This isn't tied to a configuration, but it is useful to see
here alongside build system (which isn't currently tied to a
configuration either).
I can see both the sources dir and build system being
configurable someday if we get around to supporting reloading of
the build system and alternate branching workflows.
libide/buildui/ide-build-configuration-view.c | 6 ++++
libide/buildui/ide-build-configuration-view.ui | 31 ++++++++++++++++++++++++
2 files changed, 37 insertions(+), 0 deletions(-)
---
diff --git a/libide/buildui/ide-build-configuration-view.c b/libide/buildui/ide-build-configuration-view.c
index 2539996..183e576 100644
--- a/libide/buildui/ide-build-configuration-view.c
+++ b/libide/buildui/ide-build-configuration-view.c
@@ -43,6 +43,7 @@ struct _IdeBuildConfigurationView
IdeEnvironmentEditor *environment_editor;
GtkEntry *prefix_entry;
GtkListBox *runtime_list_box;
+ GtkEntry *workdir_entry;
};
enum {
@@ -376,6 +377,7 @@ ide_build_configuration_view_class_init (IdeBuildConfigurationViewClass *klass)
gtk_widget_class_bind_template_child (widget_class, IdeBuildConfigurationView, environment_editor);
gtk_widget_class_bind_template_child (widget_class, IdeBuildConfigurationView, prefix_entry);
gtk_widget_class_bind_template_child (widget_class, IdeBuildConfigurationView, runtime_list_box);
+ gtk_widget_class_bind_template_child (widget_class, IdeBuildConfigurationView, workdir_entry);
g_type_ensure (IDE_TYPE_ENVIRONMENT_EDITOR);
}
@@ -418,8 +420,12 @@ ide_build_configuration_view_set_configuration (IdeBuildConfigurationView *self,
IdeContext *context = ide_object_get_context (IDE_OBJECT (configuration));
IdeBuildSystem *build_system = ide_context_get_build_system (context);
g_autofree gchar *name = ide_build_system_get_display_name (build_system);
+ IdeVcs *vcs = ide_context_get_vcs (context);
+ GFile *workdir = ide_vcs_get_working_directory (vcs);
+ g_autofree gchar *path = g_file_get_path (workdir);
gtk_entry_set_text (self->build_system_entry, name);
+ gtk_entry_set_text (self->workdir_entry, path);
}
if (self->configuration != configuration)
diff --git a/libide/buildui/ide-build-configuration-view.ui b/libide/buildui/ide-build-configuration-view.ui
index fbc200d..1919250 100644
--- a/libide/buildui/ide-build-configuration-view.ui
+++ b/libide/buildui/ide-build-configuration-view.ui
@@ -85,6 +85,36 @@
</child>
<child>
<object class="GtkListBoxRow">
+ <property name="visible">true</property>
+ <child>
+ <object class="GtkBox">
+ <property name="spacing">12</property>
+ <property name="orientation">horizontal</property>
+ <property name="visible">true</property>
+ <child>
+ <object class="GtkLabel" id="label5">
+ <property name="label" translatable="yes">Source Directory</property>
+ <property name="visible">true</property>
+ <property name="xalign">0.0</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkEntry" id="workdir_entry">
+ <property name="sensitive">false</property>
+ <property name="visible">true</property>
+ <property name="has-frame">false</property>
+ <property name="hexpand">true</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
<property name="tooltip-text" translatable="yes">The prefix to use when installing the
project</property>
<property name="visible">true</property>
<child>
@@ -240,6 +270,7 @@
<widget name="label2"/>
<widget name="label3"/>
<widget name="label4"/>
+ <widget name="label5"/>
</widgets>
</object>
<object class="GtkListStore" id="environ_list_store">
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]