[gnome-builder] ide: Remove scripting support
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] ide: Remove scripting support
- Date: Mon, 23 Jan 2017 05:16:54 +0000 (UTC)
commit 3a863aa71695ed52f28adb570a173ef4a59bf2ed
Author: Garrett Regier <garrettregier gmail com>
Date: Sat Jan 21 20:12:18 2017 -0800
ide: Remove scripting support
This is now handled by libpeas and has been
for quite some time now.
https://bugzilla.gnome.org/show_bug.cgi?id=773021
configure.ac | 22 +--
doc/reference/libide/libide-sections.txt | 30 ---
libide/Makefile.am | 21 --
libide/ide-context.c | 81 -------
libide/ide-context.h | 1 -
libide/ide.c | 12 -
libide/ide.h | 2 -
libide/pygobject/ide-pygobject-script.c | 302 -------------------------
libide/pygobject/ide-pygobject-script.h | 32 ---
libide/scripting/ide-script-manager.c | 356 ------------------------------
libide/scripting/ide-script-manager.h | 41 ----
libide/scripting/ide-script.c | 226 -------------------
libide/scripting/ide-script.h | 45 ----
po/POTFILES.in | 2 -
14 files changed, 6 insertions(+), 1167 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ebaf46a..d9292f9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -248,22 +248,18 @@ AM_CONDITIONAL(ENABLE_WEBKIT, [test "x$enable_webkit" = "xyes"])
dnl ***********************************************************************
dnl Check for Required Python
dnl ***********************************************************************
-enable_python_scripting=no
AS_IF([test "x$have_pygobject" = "xyes"],[
AM_PATH_PYTHON([3.2.3])
- AC_PATH_TOOL(PYTHON3_CONFIG, "python3-config")
- AS_IF([test -z "${PYTHON3_CONFIG}"],[
- AC_MSG_RESULT([Failed to locate python3-config.])
+ AS_IF([test -z "${PYTHON}"],[
+ enable_python_scripting=no
+ AC_MSG_RESULT([Failed to locate python3.])
],[
- LIBIDE_CFLAGS="${LIBIDE_CFLAGS} `${PYTHON3_CONFIG} --includes`"
- LIBIDE_LIBS="${LIBIDE_LIBS} `${PYTHON3_CONFIG} --libs`"
- LIBIDE_LDFLAGS="${LIBIDE_LDFLAGS} `${PYTHON3_CONFIG} --ldflags`"
enable_python_scripting=yes
+ pyoverridesdir="\$(pyexecdir)/gi/overrides"
+ AC_SUBST(pyoverridesdir)
])
-
- pyoverridesdir="\$(pyexecdir)/gi/overrides"
- AC_SUBST(pyoverridesdir)
])
+AM_CONDITIONAL(ENABLE_PYTHON_SCRIPTING, test x$enable_python_scripting != xno)
dnl ***********************************************************************
@@ -320,12 +316,6 @@ m4_include([plugins/xml-pack/configure.ac])
dnl ***********************************************************************
-dnl Define automake conditionals based on what we found
-dnl ***********************************************************************
-AM_CONDITIONAL(ENABLE_PYTHON_SCRIPTING, test x$enable_python_scripting != xno)
-
-
-dnl ***********************************************************************
dnl Initialize Libtool
dnl ***********************************************************************
LT_PREREQ([2.2])
diff --git a/doc/reference/libide/libide-sections.txt b/doc/reference/libide/libide-sections.txt
index 2782611..0e5ac38 100644
--- a/doc/reference/libide/libide-sections.txt
+++ b/doc/reference/libide/libide-sections.txt
@@ -351,7 +351,6 @@ ide_context_get_device_manager
ide_context_get_project
ide_context_get_recent_manager
ide_context_get_runtime_manager
-ide_context_get_script_manager
ide_context_get_search_engine
ide_context_get_settings
ide_context_get_snippets_manager
@@ -1465,12 +1464,6 @@ IdeProjectTemplate
</SECTION>
<SECTION>
-<FILE>ide-pygobject-script</FILE>
-IDE_TYPE_PYGOBJECT_SCRIPT
-IdePyGObjectScript
-</SECTION>
-
-<SECTION>
<FILE>ide-recent-projects</FILE>
IDE_TYPE_RECENT_PROJECTS
IDE_RECENT_PROJECTS_GROUP
@@ -1555,27 +1548,6 @@ IdeRuntimeProvider
</SECTION>
<SECTION>
-<FILE>ide-script</FILE>
-<TITLE>IdeScript</TITLE>
-IDE_TYPE_SCRIPT
-IDE_SCRIPT_EXTENSION_POINT
-IdeScriptClass
-ide_script_load
-ide_script_unload
-ide_script_get_file
-IdeScript
-</SECTION>
-
-<SECTION>
-<FILE>ide-script-manager</FILE>
-IDE_TYPE_SCRIPT_MANAGER
-ide_script_manager_get_scripts_directory
-ide_script_manager_load_async
-ide_script_manager_load_finish
-IdeScriptManager
-</SECTION>
-
-<SECTION>
<FILE>ide-search-context</FILE>
IDE_TYPE_SEARCH_CONTEXT
ide_search_context_get_providers
@@ -2210,8 +2182,6 @@ IdeRefactoryInterface
IdeRuntime
IdeRuntimeManager
IdeRuntimeProvider
-IdeScript
-IdeScriptManager
IdeSearchContext
IdeSearchEngine
IdeSearchProvider
diff --git a/libide/Makefile.am b/libide/Makefile.am
index 592bbaa..1839c33 100644
--- a/libide/Makefile.am
+++ b/libide/Makefile.am
@@ -109,8 +109,6 @@ libide_1_0_la_public_headers = \
runtimes/ide-runtime-manager.h \
runtimes/ide-runtime-provider.h \
runtimes/ide-runtime.h \
- scripting/ide-script-manager.h \
- scripting/ide-script.h \
search/ide-omni-search-display.h \
search/ide-omni-search-entry.h \
search/ide-omni-search-group.h \
@@ -286,8 +284,6 @@ libide_1_0_la_public_sources = \
runtimes/ide-runtime-manager.c \
runtimes/ide-runtime-provider.c \
runtimes/ide-runtime.c \
- scripting/ide-script-manager.c \
- scripting/ide-script.c \
search/ide-omni-search-display.c \
search/ide-omni-search-entry.c \
search/ide-omni-search-group.c \
@@ -603,23 +599,6 @@ libide_1_0_la_LIBADD += $(top_builddir)/contrib/libeditorconfig/libeditorconfig.
endif
-if ENABLE_PYTHON_SCRIPTING
-libide_1_0_la_includes += -I$(srcdir)/pygobject
-
-libide_1_0_la_SOURCES += \
- pygobject/ide-pygobject-script.c \
- pygobject/ide-pygobject-script.h \
- $(NULL)
-
-libide_1_0_la_CFLAGS += \
- $(PYGOBJECT_CFLAGS) \
- -DENABLE_PYTHON_SCRIPTING \
- $(NULL)
-
-libide_1_0_la_LIBADD += $(PYGOBJECT_LIBS)
-endif
-
-
glib_enum_headers = \
buffers/ide-buffer.h \
buildsystem/ide-build-result.h \
diff --git a/libide/ide-context.c b/libide/ide-context.c
index 7e7b0d3..693dea8 100644
--- a/libide/ide-context.c
+++ b/libide/ide-context.c
@@ -45,7 +45,6 @@
#include "projects/ide-recent-projects.h"
#include "runner/ide-run-manager.h"
#include "runtimes/ide-runtime-manager.h"
-#include "scripting/ide-script-manager.h"
#include "search/ide-search-engine.h"
#include "search/ide-search-provider.h"
#include "snippets/ide-source-snippets-manager.h"
@@ -72,7 +71,6 @@ struct _IdeContext
GtkRecentManager *recent_manager;
IdeRunManager *run_manager;
IdeRuntimeManager *runtime_manager;
- IdeScriptManager *script_manager;
IdeSearchEngine *search_engine;
IdeSourceSnippetsManager *snippets_manager;
IdeTransferManager *transfer_manager;
@@ -110,7 +108,6 @@ enum {
PROP_PROJECT,
PROP_ROOT_BUILD_DIR,
PROP_RUNTIME_MANAGER,
- PROP_SCRIPT_MANAGER,
PROP_SEARCH_ENGINE,
PROP_SNIPPETS_MANAGER,
PROP_VCS,
@@ -424,21 +421,6 @@ ide_context_set_project_file (IdeContext *self,
}
/**
- * ide_context_get_script_manager:
- *
- * Retrieves the script manager for the context.
- *
- * Returns: (transfer none): An #IdeScriptManager.
- */
-IdeScriptManager *
-ide_context_get_script_manager (IdeContext *self)
-{
- g_return_val_if_fail (IDE_IS_CONTEXT (self), NULL);
-
- return self->script_manager;
-}
-
-/**
* ide_context_get_search_engine:
*
* Retrieves the search engine for the context.
@@ -628,10 +610,6 @@ ide_context_get_property (GObject *object,
g_value_set_object (value, ide_context_get_runtime_manager (self));
break;
- case PROP_SCRIPT_MANAGER:
- g_value_set_object (value, ide_context_get_script_manager (self));
- break;
-
case PROP_SEARCH_ENGINE:
g_value_set_object (value, ide_context_get_search_engine (self));
break;
@@ -751,13 +729,6 @@ ide_context_class_init (IdeContextClass *klass)
IDE_TYPE_RUNTIME_MANAGER,
(G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
- properties [PROP_SCRIPT_MANAGER] =
- g_param_spec_object ("script-manager",
- "Script Manager",
- "The script manager for the context.",
- IDE_TYPE_SCRIPT_MANAGER,
- (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
-
properties [PROP_SEARCH_ENGINE] =
g_param_spec_object ("search-engine",
"Search Engine",
@@ -808,8 +779,6 @@ ide_context_class_init (IdeContextClass *klass)
static void
ide_context_init (IdeContext *self)
{
- g_autofree gchar *scriptsdir = NULL;
-
IDE_ENTRY;
g_mutex_init (&self->unload_mutex);
@@ -872,15 +841,6 @@ ide_context_init (IdeContext *self)
self->snippets_manager = g_object_new (IDE_TYPE_SOURCE_SNIPPETS_MANAGER, NULL);
- scriptsdir = g_build_filename (g_get_user_config_dir (),
- ide_get_program_name (),
- "scripts",
- NULL);
- self->script_manager = g_object_new (IDE_TYPE_SCRIPT_MANAGER,
- "context", self,
- "scripts-directory", scriptsdir,
- NULL);
-
IDE_EXIT;
}
@@ -1124,46 +1084,6 @@ ide_context_init_unsaved_files (gpointer source_object,
}
static void
-ide_context_init_scripts_cb (GObject *object,
- GAsyncResult *result,
- gpointer user_data)
-{
- IdeScriptManager *manager = (IdeScriptManager *)object;
- g_autoptr(GTask) task = user_data;
- GError *error = NULL;
-
- g_assert (IDE_IS_SCRIPT_MANAGER (manager));
- g_assert (G_IS_TASK (task));
-
- if (!ide_script_manager_load_finish (manager, result, &error))
- {
- g_task_return_error (task, error);
- return;
- }
-
- g_task_return_boolean (task, TRUE);
-}
-
-static void
-ide_context_init_scripts (gpointer source_object,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data)
-{
- IdeContext *self = source_object;
- g_autoptr(GTask) task = NULL;
-
- g_return_if_fail (IDE_IS_CONTEXT (self));
- g_return_if_fail (!cancellable || G_IS_CANCELLABLE (cancellable));
-
- task = g_task_new (self, cancellable, callback, user_data);
- ide_script_manager_load_async (self->script_manager,
- cancellable,
- ide_context_init_scripts_cb,
- g_object_ref (task));
-}
-
-static void
ide_context_init_snippets_cb (GObject *object,
GAsyncResult *result,
gpointer user_data)
@@ -1582,7 +1502,6 @@ ide_context_init_async (GAsyncInitable *initable,
ide_context_init_project_name,
ide_context_init_back_forward_list,
ide_context_init_snippets,
- ide_context_init_scripts,
ide_context_init_unsaved_files,
ide_context_init_add_recent,
ide_context_init_search_engine,
diff --git a/libide/ide-context.h b/libide/ide-context.h
index b3395b8..c180226 100644
--- a/libide/ide-context.h
+++ b/libide/ide-context.h
@@ -42,7 +42,6 @@ IdeProject *ide_context_get_project (IdeContext
GtkRecentManager *ide_context_get_recent_manager (IdeContext *self);
IdeRunManager *ide_context_get_run_manager (IdeContext *self);
IdeRuntimeManager *ide_context_get_runtime_manager (IdeContext *self);
-IdeScriptManager *ide_context_get_script_manager (IdeContext *self);
IdeSearchEngine *ide_context_get_search_engine (IdeContext *self);
IdeSettings *ide_context_get_settings (IdeContext *self,
const gchar *schema_id,
diff --git a/libide/ide.c b/libide/ide.c
index e76f645..afa27fa 100644
--- a/libide/ide.c
+++ b/libide/ide.c
@@ -31,10 +31,6 @@
# include "editorconfig/ide-editorconfig-file-settings.h"
#endif
-#ifdef ENABLE_PYTHON_SCRIPTING
-# include "pygobject/ide-pygobject-script.h"
-#endif
-
static gboolean programNameRead;
static const gchar *programName = "libide";
@@ -70,7 +66,6 @@ static void
ide_init_ctor (void)
{
g_io_extension_point_register (IDE_FILE_SETTINGS_EXTENSION_POINT);
- g_io_extension_point_register (IDE_SCRIPT_EXTENSION_POINT);
g_io_extension_point_implement (IDE_FILE_SETTINGS_EXTENSION_POINT,
IDE_TYPE_MODELINES_FILE_SETTINGS,
@@ -86,11 +81,4 @@ ide_init_ctor (void)
IDE_TYPE_GSETTINGS_FILE_SETTINGS,
IDE_FILE_SETTINGS_EXTENSION_POINT".gsettings",
-300);
-
-#ifdef ENABLE_PYTHON_SCRIPTING
- g_io_extension_point_implement (IDE_SCRIPT_EXTENSION_POINT,
- IDE_TYPE_PYGOBJECT_SCRIPT,
- IDE_SCRIPT_EXTENSION_POINT".py",
- -100);
-#endif
}
diff --git a/libide/ide.h b/libide/ide.h
index 78aa113..b8cc8f2 100644
--- a/libide/ide.h
+++ b/libide/ide.h
@@ -101,8 +101,6 @@ G_BEGIN_DECLS
#include "runtimes/ide-runtime-manager.h"
#include "runtimes/ide-runtime-provider.h"
#include "runtimes/ide-runtime.h"
-#include "scripting/ide-script-manager.h"
-#include "scripting/ide-script.h"
#include "search/ide-omni-search-row.h"
#include "search/ide-pattern-spec.h"
#include "search/ide-search-context.h"
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 7865167..9f4afe3 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -76,12 +76,10 @@ libide/preferences/ide-preferences-perspective.c
libide/preferences/ide-preferences-perspective.ui
libide/projects/ide-project.c
libide/projects/ide-recent-projects.c
-libide/pygobject/ide-pygobject-script.c
libide/runner/ide-run-button.c
libide/runner/ide-run-manager.c
libide/runner/ide-runner.c
libide/runtimes/ide-runtime-manager.c
-libide/scripting/ide-script.c
libide/search/ide-omni-search-display.c
libide/snippets/ide-source-snippet.c
libide/snippets/ide-source-snippet-completion-provider.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]