[gnome-builder: 133/139] words: port to libide-sourceview



commit 5dd2ed2ba14765652ac9d464034b6305ddda6d14
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jan 9 17:43:51 2019 -0800

    words: port to libide-sourceview

 src/plugins/words/gbp-word-completion-provider.c |  2 +-
 src/plugins/words/gbp-word-completion-provider.h |  2 +-
 src/plugins/words/gbp-word-proposal.c            |  2 +-
 src/plugins/words/gbp-word-proposals.c           |  4 ++--
 src/plugins/words/gbp-word-proposals.h           |  2 +-
 src/plugins/words/meson.build                    | 21 ++++++++++-----------
 src/plugins/words/words-plugin.c                 |  8 +++++---
 src/plugins/words/words.gresource.xml            |  2 +-
 src/plugins/words/words.plugin                   | 11 ++++++-----
 9 files changed, 28 insertions(+), 26 deletions(-)
---
diff --git a/src/plugins/words/gbp-word-completion-provider.c 
b/src/plugins/words/gbp-word-completion-provider.c
index 90715a98e..bf4c4b78c 100644
--- a/src/plugins/words/gbp-word-completion-provider.c
+++ b/src/plugins/words/gbp-word-completion-provider.c
@@ -22,7 +22,7 @@
 
 #include "config.h"
 
-#include <ide.h>
+#include <libide-sourceview.h>
 
 #include "gbp-word-completion-provider.h"
 #include "gbp-word-proposal.h"
diff --git a/src/plugins/words/gbp-word-completion-provider.h 
b/src/plugins/words/gbp-word-completion-provider.h
index 1efcc155e..3a60a9192 100644
--- a/src/plugins/words/gbp-word-completion-provider.h
+++ b/src/plugins/words/gbp-word-completion-provider.h
@@ -20,7 +20,7 @@
 
 #pragma once
 
-#include <ide.h>
+#include <glib-object.h>
 
 G_BEGIN_DECLS
 
diff --git a/src/plugins/words/gbp-word-proposal.c b/src/plugins/words/gbp-word-proposal.c
index 1d6d00f48..8118e181c 100644
--- a/src/plugins/words/gbp-word-proposal.c
+++ b/src/plugins/words/gbp-word-proposal.c
@@ -22,7 +22,7 @@
 
 #include "config.h"
 
-#include <ide.h>
+#include <libide-sourceview.h>
 
 #include "gbp-word-proposal.h"
 
diff --git a/src/plugins/words/gbp-word-proposals.c b/src/plugins/words/gbp-word-proposals.c
index cfae421c3..ab6226705 100644
--- a/src/plugins/words/gbp-word-proposals.c
+++ b/src/plugins/words/gbp-word-proposals.c
@@ -23,7 +23,7 @@
 
 #include "config.h"
 
-#include "sourceview/ide-source-search-context.h"
+#include <libide-sourceview.h>
 
 #include "gbp-word-proposal.h"
 #include "gbp-word-proposals.h"
@@ -327,7 +327,7 @@ gbp_word_proposals_populate_finish (GbpWordProposals  *self,
 
   if (old_len || self->items->len)
     g_list_model_items_changed (G_LIST_MODEL (self), 0, old_len, self->items->len);
-  
+
   return ide_task_propagate_boolean (IDE_TASK (result), error);
 }
 
diff --git a/src/plugins/words/gbp-word-proposals.h b/src/plugins/words/gbp-word-proposals.h
index bb4b22308..f1786e7ca 100644
--- a/src/plugins/words/gbp-word-proposals.h
+++ b/src/plugins/words/gbp-word-proposals.h
@@ -20,7 +20,7 @@
 
 #pragma once
 
-#include <ide.h>
+#include <libide-sourceview.h>
 
 G_BEGIN_DECLS
 
diff --git a/src/plugins/words/meson.build b/src/plugins/words/meson.build
index 25c5f1651..0d8cfdb15 100644
--- a/src/plugins/words/meson.build
+++ b/src/plugins/words/meson.build
@@ -1,19 +1,18 @@
-if get_option('with_words')
+if get_option('plugin_words')
 
-words_resources = gnome.compile_resources(
-  'words-resources',
-  'words.gresource.xml',
-  c_name: 'gbp_words',
-)
-
-words_sources = [
+plugins_sources += files([
   'words-plugin.c',
   'gbp-word-completion-provider.c',
   'gbp-word-proposal.c',
   'gbp-word-proposals.c',
-]
+])
+
+plugin_words_resources = gnome.compile_resources(
+  'words-resources',
+  'words.gresource.xml',
+  c_name: 'gbp_words',
+)
 
-gnome_builder_plugins_sources += files(words_sources)
-gnome_builder_plugins_sources += words_resources[0]
+plugins_sources += plugin_words_resources[0]
 
 endif
diff --git a/src/plugins/words/words-plugin.c b/src/plugins/words/words-plugin.c
index e5b909fe1..69220f01d 100644
--- a/src/plugins/words/words-plugin.c
+++ b/src/plugins/words/words-plugin.c
@@ -18,13 +18,15 @@
  * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
-#include <ide.h>
+#include "config.h"
+
+#include <libide-sourceview.h>
 #include <libpeas/peas.h>
 
 #include "gbp-word-completion-provider.h"
 
-void
-gbp_words_register_types (PeasObjectModule *module)
+_IDE_EXTERN void
+_gbp_words_register_types (PeasObjectModule *module)
 {
   peas_object_module_register_extension_type (module,
                                               IDE_TYPE_COMPLETION_PROVIDER,
diff --git a/src/plugins/words/words.gresource.xml b/src/plugins/words/words.gresource.xml
index efa1f4a15..c6852157f 100644
--- a/src/plugins/words/words.gresource.xml
+++ b/src/plugins/words/words.gresource.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <gresources>
-  <gresource prefix="/org/gnome/builder/plugins">
+  <gresource prefix="/plugins/words">
     <file>words.plugin</file>
   </gresource>
 </gresources>
diff --git a/src/plugins/words/words.plugin b/src/plugins/words/words.plugin
index a92883c46..9676d2b76 100644
--- a/src/plugins/words/words.plugin
+++ b/src/plugins/words/words.plugin
@@ -1,9 +1,10 @@
 [Plugin]
-Module=words-plugin
-Name=Word Completion
-Description=Provides completiones based on words in the document
 Authors=Christian Hergert <christian hergert me>
+Builtin=true
 Copyright=Copyright © 2017-2018 Umang Jain, Christian Hergert
 Depends=editor;
-Builtin=true
-Embedded=gbp_words_register_types
+Description=Provides completiones based on words in the document
+Embedded=_gbp_words_register_types
+Hidden=true
+Module=words
+Name=Word Completion


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