[gnome-builder/wip/chergert/completion] xml: remove dynamic type for completion provider



commit 5587f2eecce23e10c928831405f67fe96904035a
Author: Christian Hergert <chergert redhat com>
Date:   Tue Jun 5 22:02:17 2018 -0700

    xml: remove dynamic type for completion provider
    
    We don't need to use dynamic types.

 src/plugins/xml-pack/ide-xml-completion-provider.c | 23 ++++++----------------
 src/plugins/xml-pack/xml-pack-plugin.c             |  2 --
 2 files changed, 6 insertions(+), 19 deletions(-)
---
diff --git a/src/plugins/xml-pack/ide-xml-completion-provider.c 
b/src/plugins/xml-pack/ide-xml-completion-provider.c
index 39140ee33..b06a1eb3a 100644
--- a/src/plugins/xml-pack/ide-xml-completion-provider.c
+++ b/src/plugins/xml-pack/ide-xml-completion-provider.c
@@ -83,12 +83,12 @@ static void      completion_provider_init (GtkSourceCompletionProviderIface *);
 static gboolean  process_matching_state   (MatchingState                    *state,
                                            IdeXmlRngDefine                  *define);
 
-G_DEFINE_DYNAMIC_TYPE_EXTENDED (IdeXmlCompletionProvider,
-                                ide_xml_completion_provider,
-                                IDE_TYPE_OBJECT,
-                                0,
-                                G_IMPLEMENT_INTERFACE (GTK_SOURCE_TYPE_COMPLETION_PROVIDER, 
completion_provider_init)
-                                G_IMPLEMENT_INTERFACE (IDE_TYPE_COMPLETION_PROVIDER, NULL))
+G_DEFINE_TYPE_EXTENDED (IdeXmlCompletionProvider,
+                        ide_xml_completion_provider,
+                        IDE_TYPE_OBJECT,
+                        0,
+                        G_IMPLEMENT_INTERFACE (GTK_SOURCE_TYPE_COMPLETION_PROVIDER, completion_provider_init)
+                        G_IMPLEMENT_INTERFACE (IDE_TYPE_COMPLETION_PROVIDER, NULL))
 
 enum {
   PROP_0,
@@ -1140,11 +1140,6 @@ ide_xml_completion_provider_set_property (GObject      *object,
     }
 }
 
-static void
-ide_xml_completion_provider_class_finalize (IdeXmlCompletionProviderClass *klass)
-{
-}
-
 static void
 ide_xml_completion_provider_class_init (IdeXmlCompletionProviderClass *klass)
 {
@@ -1167,9 +1162,3 @@ completion_provider_init (GtkSourceCompletionProviderIface *iface)
   iface->get_icon = ide_xml_completion_provider_get_icon;
   iface->populate = ide_xml_completion_provider_populate;
 }
-
-void
-_ide_xml_completion_provider_register_type (GTypeModule *module)
-{
-  ide_xml_completion_provider_register_type (module);
-}
diff --git a/src/plugins/xml-pack/xml-pack-plugin.c b/src/plugins/xml-pack/xml-pack-plugin.c
index 997545c1a..658b674b6 100644
--- a/src/plugins/xml-pack/xml-pack-plugin.c
+++ b/src/plugins/xml-pack/xml-pack-plugin.c
@@ -25,7 +25,6 @@
 #include "ide-xml-service.h"
 #include "ide-xml-symbol-resolver.h"
 
-void _ide_xml_completion_provider_register_type (GTypeModule *module);
 void _ide_xml_highlighter_register_type (GTypeModule *module);
 void _ide_xml_indenter_register_type (GTypeModule *module);
 void _ide_xml_symbol_resolver_register_type (GTypeModule *module);
@@ -34,7 +33,6 @@ void _ide_xml_service_register_type (GTypeModule *module);
 void
 ide_xml_register_types (PeasObjectModule *module)
 {
-  _ide_xml_completion_provider_register_type (G_TYPE_MODULE (module));
   _ide_xml_highlighter_register_type (G_TYPE_MODULE (module));
   _ide_xml_indenter_register_type (G_TYPE_MODULE (module));
   _ide_xml_symbol_resolver_register_type (G_TYPE_MODULE (module));


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