[gedit/gnome-3-12] snippets: update ginterface snippet



commit 1230eddca5278ed713b0e3acddf30c281ff25d25
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Thu May 15 10:51:20 2014 +0200

    snippets: update ginterface snippet

 plugins/snippets/data/c.xml |   32 ++------------------------------
 1 files changed, 2 insertions(+), 30 deletions(-)
---
diff --git a/plugins/snippets/data/c.xml b/plugins/snippets/data/c.xml
index ee47641..9cd474c 100644
--- a/plugins/snippets/data/c.xml
+++ b/plugins/snippets/data/c.xml
@@ -215,6 +215,8 @@ camel_str = ''
 for t in components:
   camel_str += t.capitalize()

+G_DEFINE_INTERFACE ($<[1]: return camel_str >, $<[1]: return low_str >, ${2:G_TYPE_OBJECT})
+
 /* Default implementation */
 static const gchar *
 $<[1]: return low_str>_example_method_default ($<[1]: return camel_str > *self)
@@ -243,36 +245,6 @@ $<[1]: return low_str>_example_method ($<[1]: return camel_str > *self)
 {
        g_return_val_if_fail ($<[1]: return up_str> (self), NULL);
        return $<[1]: return up_str>_GET_INTERFACE (self)->example_method (self);
-}
-
-GType
-$<[1]: return low_str>_get_type ()
-{
-       static GType $<[1]: return low_str>_type_id = 0;
-
-       if (!$<[1]: return low_str>_type_id)
-       {
-               static const GTypeInfo g_define_type_info =
-               {
-                       sizeof ($<[1]: return camel_str >Iface),
-                       (GBaseInitFunc) $<[1]: return low_str>_init,
-                       NULL,
-                       NULL,
-                       NULL,
-                       NULL,
-                       0,
-                       0,
-                       NULL
-               };
-
-               $<[1]: return low_str>_type_id =
-                       g_type_register_static (G_TYPE_INTERFACE,
-                                               "$<[1]: return camel_str>",
-                                               &g_define_type_info,
-                                               0);
-       }
-
-       return $<[1]: return low_str>_type_id;
 }]]></text>
     <tag>ginterface</tag>
     <description>GObject interface</description>


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