[perl-Gtk2] Avoid registering a GType for GConnectFlags if not needed



commit 77a6c7f1414d24d792bb07c7df5328d7a8be4043
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date:   Thu Jul 23 14:53:55 2015 +0200

    Avoid registering a GType for GConnectFlags if not needed
    
    perl-Glib does it already, as of version 1.260.

 xs/GtkBuilder.xs |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/xs/GtkBuilder.xs b/xs/GtkBuilder.xs
index e6b0ea9..a86c571 100644
--- a/xs/GtkBuilder.xs
+++ b/xs/GtkBuilder.xs
@@ -70,8 +70,10 @@ gtk2perl_builder_connect_func (GtkBuilder    *builder,
 MODULE = Gtk2::Builder PACKAGE = Gtk2::Builder PREFIX = gtk_builder_
 
 BOOT:
-       gperl_register_fundamental (gtk2perl_connect_flags_get_type (),
-                                   "Glib::ConnectFlags");
+       if (!gperl_type_from_package ("Glib::ConnectFlags")) {
+               gperl_register_fundamental (gtk2perl_connect_flags_get_type (),
+                                           "Glib::ConnectFlags");
+       }
        gperl_register_error_domain (GTK_BUILDER_ERROR,
                                     GTK_TYPE_BUILDER_ERROR,
                                     "Gtk2::Builder::Error");



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