[gnome-builder] context: remove IdeContext:root-build-dir
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] context: remove IdeContext:root-build-dir
- Date: Tue, 21 Nov 2017 07:51:15 +0000 (UTC)
commit ba26628f39ade47ddd612ec357b974f47cfd0901
Author: Christian Hergert <chergert redhat com>
Date: Mon Nov 20 23:46:25 2017 -0800
context: remove IdeContext:root-build-dir
We weren't using this, so we should just get rid of it.
src/libide/ide-context.c | 64 ------------------------------------------
src/libide/ide-context.h | 5 ---
src/tests/test-ide-context.c | 4 --
3 files changed, 0 insertions(+), 73 deletions(-)
---
diff --git a/src/libide/ide-context.c b/src/libide/ide-context.c
index cf007c3..b4b56ae 100644
--- a/src/libide/ide-context.c
+++ b/src/libide/ide-context.c
@@ -117,7 +117,6 @@ struct _IdeContext
IdeTestManager *test_manager;
IdeProject *project;
GFile *project_file;
- gchar *root_build_dir;
gchar *recent_projects_path;
PeasExtensionSet *services;
GHashTable *services_by_gtype;
@@ -148,7 +147,6 @@ enum {
PROP_DOCUMENTATION,
PROP_PROJECT_FILE,
PROP_PROJECT,
- PROP_ROOT_BUILD_DIR,
PROP_RUNTIME_MANAGER,
PROP_SEARCH_ENGINE,
PROP_SNIPPETS_MANAGER,
@@ -259,47 +257,6 @@ ide_context_get_documentation (IdeContext *self)
return self->documentation;
}
-
-/**
- * ide_context_get_root_build_dir:
- *
- * Retrieves the "root-build-dir" for the context. This is the root directory
- * that will contain builds made for various devices.
- *
- * Returns: A string containing the "root-build-dir" property.
- */
-const gchar *
-ide_context_get_root_build_dir (IdeContext *self)
-{
- g_return_val_if_fail (IDE_IS_CONTEXT (self), NULL);
-
- return self->root_build_dir;
-}
-
-/**
- * ide_context_set_root_build_dir:
- * @root_build_dir: the path to the root build directory.
- *
- * Sets the "root-build-dir" property. This is the root directory that will
- * be used when building projects for projects that support building out of
- * tree.
- */
-void
-ide_context_set_root_build_dir (IdeContext *self,
- const gchar *root_build_dir)
-{
- g_return_if_fail (IDE_IS_CONTEXT (self));
- g_return_if_fail (root_build_dir);
-
- if (self->root_build_dir != root_build_dir)
- {
- g_free (self->root_build_dir);
- self->root_build_dir = g_strdup (root_build_dir);
- g_object_notify_by_pspec (G_OBJECT (self),
- properties [PROP_ROOT_BUILD_DIR]);
- }
-}
-
/**
* ide_context_get_snippets_manager:
*
@@ -559,7 +516,6 @@ ide_context_finalize (GObject *object)
g_clear_pointer (&self->build_system_hint, g_free);
g_clear_pointer (&self->services_by_gtype, g_hash_table_unref);
- g_clear_pointer (&self->root_build_dir, g_free);
g_clear_pointer (&self->recent_projects_path, g_free);
g_clear_object (&self->build_system);
@@ -622,10 +578,6 @@ ide_context_get_property (GObject *object,
g_value_set_object (value, ide_context_get_project_file (self));
break;
- case PROP_ROOT_BUILD_DIR:
- g_value_set_string (value, ide_context_get_root_build_dir (self));
- break;
-
case PROP_RUNTIME_MANAGER:
g_value_set_object (value, ide_context_get_runtime_manager (self));
break;
@@ -665,10 +617,6 @@ ide_context_set_property (GObject *object,
ide_context_set_project_file (self, g_value_get_object (value));
break;
- case PROP_ROOT_BUILD_DIR:
- ide_context_set_root_build_dir (self, g_value_get_string (value));
- break;
-
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
@@ -735,13 +683,6 @@ ide_context_class_init (IdeContextClass *klass)
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS));
- properties [PROP_ROOT_BUILD_DIR] =
- g_param_spec_string ("root-build-dir",
- "Root Build Directory",
- "The root directory to perform builds within.",
- NULL,
- (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
properties [PROP_RUNTIME_MANAGER] =
g_param_spec_object ("runtime-manager",
"Runtime Manager",
@@ -809,11 +750,6 @@ ide_context_init (IdeContext *self)
self->recent_manager = g_object_ref (gtk_recent_manager_get_default ());
- self->root_build_dir = g_build_filename (g_get_user_cache_dir (),
- ide_get_program_name (),
- "builds",
- NULL);
-
self->recent_projects_path = g_build_filename (g_get_user_data_dir (),
ide_get_program_name (),
IDE_RECENT_PROJECTS_BOOKMARK_FILENAME,
diff --git a/src/libide/ide-context.h b/src/libide/ide-context.h
index 5aef22e..7a7c8c9 100644
--- a/src/libide/ide-context.h
+++ b/src/libide/ide-context.h
@@ -72,8 +72,6 @@ IdeUnsavedFiles *ide_context_get_unsaved_files (IdeContext
IDE_AVAILABLE_IN_ALL
IdeVcs *ide_context_get_vcs (IdeContext *self);
IDE_AVAILABLE_IN_ALL
-const gchar *ide_context_get_root_build_dir (IdeContext *self);
-IDE_AVAILABLE_IN_ALL
gpointer ide_context_get_service_typed (IdeContext *self,
GType service_type);
IDE_AVAILABLE_IN_ALL
@@ -94,9 +92,6 @@ IDE_AVAILABLE_IN_ALL
IdeContext *ide_context_new_finish (GAsyncResult *result,
GError **error);
IDE_AVAILABLE_IN_ALL
-void ide_context_set_root_build_dir (IdeContext *self,
- const gchar *root_build_dir);
-IDE_AVAILABLE_IN_ALL
void ide_context_restore_async (IdeContext *self,
GCancellable *cancellable,
GAsyncReadyCallback callback,
diff --git a/src/tests/test-ide-context.c b/src/tests/test-ide-context.c
index 2be9103..c57b451 100644
--- a/src/tests/test-ide-context.c
+++ b/src/tests/test-ide-context.c
@@ -27,7 +27,6 @@ test_new_async_cb1 (GObject *object,
GAsyncResult *result,
gpointer user_data)
{
- const gchar *root_build_dir;
g_autoptr(GTask) task = user_data;
g_autoptr(IdeContext) context = NULL;
IdeVcs *vcs;
@@ -44,9 +43,6 @@ test_new_async_cb1 (GObject *object,
vcs = ide_context_get_vcs (context);
g_assert_cmpstr (G_OBJECT_TYPE_NAME (vcs), ==, "IdeDirectoryVcs");
- root_build_dir = ide_context_get_root_build_dir (context);
- g_assert (g_str_has_suffix (root_build_dir, "/gnome-builder/builds"));
-
g_task_return_boolean (task, TRUE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]