]> saetta.ns0.it Git - libgtkmaskedentry/commitdiff
Changes to compile it under win32 and without libgtkform.
authorAndrea Zagli <azagli@libero.it>
Wed, 18 May 2011 14:03:22 +0000 (16:03 +0200)
committerAndrea Zagli <azagli@libero.it>
Wed, 18 May 2011 14:03:22 +0000 (16:03 +0200)
16 files changed:
.gitignore
configure.ac
docs/reference/gtkmaskedentry-decl-list.txt [deleted file]
docs/reference/gtkmaskedentry-decl.txt [deleted file]
docs/reference/gtkmaskedentry-undeclared.txt [deleted file]
docs/reference/gtkmaskedentry-undocumented.txt [deleted file]
docs/reference/gtkmaskedentry-unused.txt [deleted file]
docs/reference/gtkmaskedentry.args [deleted file]
docs/reference/gtkmaskedentry.hierarchy [deleted file]
docs/reference/gtkmaskedentry.interfaces [deleted file]
docs/reference/gtkmaskedentry.prerequisites [deleted file]
docs/reference/gtkmaskedentry.signals [deleted file]
glade/Makefile.am
src/Makefile.am
src/gtkmaskedentry.c
tests/plugin_gtkform.c

index d5b4dc42a894bf346741e7e8b6f378be9d570d7b..e12f3776d08dfdd547e2e0340b6ca313e4c7a41f 100644 (file)
@@ -47,3 +47,4 @@ stamp-it
 intltool-*
 Rules-quot
 tests/plugin_gtkform
+tests/*.exe
index 38915cec80f2c98dc4a03faa6645eb90c50bd18d..311fac7085581ecd9b82da5fa47b19d634a0c3a6 100644 (file)
@@ -45,6 +45,20 @@ AC_SUBST(GTKFORM_CFLAGS)
 AC_SUBST(GTKFORM_LIBS)
 fi
 
+dnl ******************************
+dnl Check for Operating System
+dnl ******************************
+
+platform_win32=no
+
+case "$host" in
+*-mingw*)
+    platform_win32=yes
+    ;;
+esac
+
+AM_CONDITIONAL(PLATFORM_WIN32, [test $platform_win32 = yes])
+
 # Output files
 AC_CONFIG_FILES([
   libgtkmaskedentry.pc
diff --git a/docs/reference/gtkmaskedentry-decl-list.txt b/docs/reference/gtkmaskedentry-decl-list.txt
deleted file mode 100644 (file)
index 8072024..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<SECTION>
-<FILE>gtkmaskedentry</FILE>
-<TITLE>GtkMaskedEntry</TITLE>
-GtkMaskedEntry
-GtkMaskedEntryClass
-gtk_masked_entry_new
-gtk_masked_entry_new_with_mask
-gtk_masked_entry_set_mask
-gtk_masked_entry_get_mask
-gtk_masked_entry_get_text
-<SUBSECTION Standard>
-GTK_MASKED_ENTRY
-GTK_IS_MASKED_ENTRY
-GTK_TYPE_MASKED_ENTRY
-gtk_masked_entry_get_type
-GTK_MASKED_ENTRY_CLASS
-GTK_IS_MASKED_ENTRY_CLASS
-GTK_MASKED_ENTRY_GET_CLASS
-</SECTION>
-
-<SECTION>
-<FILE>gtkformwidgetmaskedentry</FILE>
-<TITLE>GtkFormWidgetMaskedEntry</TITLE>
-GtkFormWidgetMaskedEntry
-GtkFormWidgetMaskedEntryClass
-gtk_form_widget_masked_entry_new
-gtk_form_widget_masked_entry_get_value_stringify
-gtk_form_widget_masked_entry_set_value_stringify
-gtk_form_widget_masked_entry_set_editable
-<SUBSECTION Standard>
-GTK_FORM_WIDGET_MASKED_ENTRY
-GTK_FORM_IS_WIDGET_MASKED_ENTRY
-GTK_FORM_TYPE_WIDGET_MASKED_ENTRY
-gtk_form_widget_masked_entry_get_type
-GTK_FORM_WIDGET_MASKED_ENTRY_CLASS
-GTK_FORM_IS_WIDGET_MASKED_ENTRY_CLASS
-GTK_FORM_WIDGET_MASKED_ENTRY_GET_CLASS
-</SECTION>
-
-<SECTION>
-<FILE>gtkcellrenderermasked</FILE>
-<TITLE>GtkCellRendererMasked</TITLE>
-GtkCellRendererMasked
-GtkCellRendererMaskedClass
-gtk_cell_renderer_masked_new
-gtk_cell_renderer_masked_new_with_mask
-gtk_cell_renderer_masked_set_mask
-<SUBSECTION Standard>
-GTK_CELL_RENDERER_MASKED
-GTK_IS_CELL_RENDERER_MASKED
-GTK_TYPE_CELL_RENDERER_MASKED
-gtk_cell_renderer_masked_get_type
-GTK_CELL_RENDERER_MASKED_CLASS
-GTK_IS_CELL_RENDERER_MASKED_CLASS
-GTK_CELL_RENDERER_MASKED_GET_CLASS
-</SECTION>
-
diff --git a/docs/reference/gtkmaskedentry-decl.txt b/docs/reference/gtkmaskedentry-decl.txt
deleted file mode 100644 (file)
index 1f77ab1..0000000
+++ /dev/null
@@ -1,207 +0,0 @@
-<MACRO>
-<NAME>GTK_TYPE_MASKED_ENTRY</NAME>
-#define GTK_TYPE_MASKED_ENTRY                 (gtk_masked_entry_get_type ())
-</MACRO>
-<MACRO>
-<NAME>GTK_MASKED_ENTRY</NAME>
-#define GTK_MASKED_ENTRY(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_MASKED_ENTRY, GtkMaskedEntry))
-</MACRO>
-<MACRO>
-<NAME>GTK_MASKED_ENTRY_CLASS</NAME>
-#define GTK_MASKED_ENTRY_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_MASKED_ENTRY, GtkMaskedEntry))
-</MACRO>
-<MACRO>
-<NAME>GTK_IS_MASKED_ENTRY</NAME>
-#define GTK_IS_MASKED_ENTRY(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_MASKED_ENTRY))
-</MACRO>
-<MACRO>
-<NAME>GTK_IS_MASKED_ENTRY_CLASS</NAME>
-#define GTK_IS_MASKED_ENTRY_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_MASKED_ENTRY))
-</MACRO>
-<MACRO>
-<NAME>GTK_MASKED_ENTRY_GET_CLASS</NAME>
-#define GTK_MASKED_ENTRY_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_MASKED_ENTRY, GtkMaskedEntry))
-</MACRO>
-<STRUCT>
-<NAME>GtkMaskedEntry</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>GtkMaskedEntryClass</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>GtkMaskedEntry</NAME>
-struct _GtkMaskedEntry
-{
-       GtkEntry entry;
-};
-</STRUCT>
-<STRUCT>
-<NAME>GtkMaskedEntryClass</NAME>
-struct _GtkMaskedEntryClass
-{
-       GtkEntryClass parent_class;
-};
-</STRUCT>
-<FUNCTION>
-<NAME>gtk_masked_entry_get_type</NAME>
-<RETURNS>GType </RETURNS>
-void 
-</FUNCTION>
-<FUNCTION>
-<NAME>gtk_masked_entry_new</NAME>
-<RETURNS>GtkWidget *</RETURNS>
-void 
-</FUNCTION>
-<FUNCTION>
-<NAME>gtk_masked_entry_new_with_mask</NAME>
-<RETURNS>GtkWidget *</RETURNS>
-const gchar *mask 
-</FUNCTION>
-<FUNCTION>
-<NAME>gtk_masked_entry_set_mask</NAME>
-<RETURNS>void </RETURNS>
-GtkMaskedEntry *masked_entry, const gchar *mask 
-</FUNCTION>
-<FUNCTION>
-<NAME>gtk_masked_entry_get_mask</NAME>
-<RETURNS>G_CONST_RETURN gchar *</RETURNS>
-GtkMaskedEntry *masked_entry 
-</FUNCTION>
-<FUNCTION>
-<NAME>gtk_masked_entry_get_text</NAME>
-<RETURNS>G_CONST_RETURN gchar *</RETURNS>
-GtkMaskedEntry *masked_entry 
-</FUNCTION>
-<MACRO>
-<NAME>GTK_FORM_TYPE_WIDGET_MASKED_ENTRY</NAME>
-#define GTK_FORM_TYPE_WIDGET_MASKED_ENTRY                 (gtk_form_widget_masked_entry_get_type ())
-</MACRO>
-<MACRO>
-<NAME>GTK_FORM_WIDGET_MASKED_ENTRY</NAME>
-#define GTK_FORM_WIDGET_MASKED_ENTRY(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_FORM_TYPE_WIDGET_MASKED_ENTRY, GtkFormWidgetMaskedEntry))
-</MACRO>
-<MACRO>
-<NAME>GTK_FORM_WIDGET_MASKED_ENTRY_CLASS</NAME>
-#define GTK_FORM_WIDGET_MASKED_ENTRY_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_FORM_TYPE_WIDGET_MASKED_ENTRY, GtkFormWidgetMaskedEntryClass))
-</MACRO>
-<MACRO>
-<NAME>GTK_FORM_IS_WIDGET_MASKED_ENTRY</NAME>
-#define GTK_FORM_IS_WIDGET_MASKED_ENTRY(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_FORM_TYPE_WIDGET_MASKED_ENTRY))
-</MACRO>
-<MACRO>
-<NAME>GTK_FORM_IS_WIDGET_MASKED_ENTRY_CLASS</NAME>
-#define GTK_FORM_IS_WIDGET_MASKED_ENTRY_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_FORM_TYPE_WIDGET_MASKED_ENTRY))
-</MACRO>
-<MACRO>
-<NAME>GTK_FORM_WIDGET_MASKED_ENTRY_GET_CLASS</NAME>
-#define GTK_FORM_WIDGET_MASKED_ENTRY_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_FORM_TYPE_WIDGET_MASKED_ENTRY, GtkFormWidgetMaskedEntryClass))
-</MACRO>
-<STRUCT>
-<NAME>GtkFormWidgetMaskedEntry</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>GtkFormWidgetMaskedEntryClass</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>GtkFormWidgetMaskedEntry</NAME>
-struct _GtkFormWidgetMaskedEntry
-       {
-               GtkFormWidget parent;
-       };
-</STRUCT>
-<STRUCT>
-<NAME>GtkFormWidgetMaskedEntryClass</NAME>
-struct _GtkFormWidgetMaskedEntryClass
-       {
-               GtkFormWidgetClass parent_class;
-       };
-</STRUCT>
-<FUNCTION>
-<NAME>gtk_form_widget_masked_entry_get_type</NAME>
-<RETURNS>GType </RETURNS>
-void 
-</FUNCTION>
-<FUNCTION>
-<NAME>gtk_form_widget_masked_entry_new</NAME>
-<RETURNS>GtkFormWidget *</RETURNS>
-void 
-</FUNCTION>
-<FUNCTION>
-<NAME>gtk_form_widget_masked_entry_get_value_stringify</NAME>
-<RETURNS>gchar *</RETURNS>
-GtkFormWidget *widget 
-</FUNCTION>
-<FUNCTION>
-<NAME>gtk_form_widget_masked_entry_set_value_stringify</NAME>
-<RETURNS>gboolean </RETURNS>
-GtkFormWidget *fwidget, const gchar *value 
-</FUNCTION>
-<FUNCTION>
-<NAME>gtk_form_widget_masked_entry_set_editable</NAME>
-<RETURNS>void </RETURNS>
-GtkFormWidget *fwidget, gboolean editable 
-</FUNCTION>
-<MACRO>
-<NAME>GTK_TYPE_CELL_RENDERER_MASKED</NAME>
-#define GTK_TYPE_CELL_RENDERER_MASKED                 (gtk_cell_renderer_masked_get_type ())
-</MACRO>
-<MACRO>
-<NAME>GTK_CELL_RENDERER_MASKED</NAME>
-#define GTK_CELL_RENDERER_MASKED(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CELL_RENDERER_MASKED, GtkCellRendererMasked))
-</MACRO>
-<MACRO>
-<NAME>GTK_CELL_RENDERER_MASKED_CLASS</NAME>
-#define GTK_CELL_RENDERER_MASKED_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_CELL_RENDERER_MASKED, GtkCellRendererMasked))
-</MACRO>
-<MACRO>
-<NAME>GTK_IS_CELL_RENDERER_MASKED</NAME>
-#define GTK_IS_CELL_RENDERER_MASKED(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CELL_RENDERER_MASKED))
-</MACRO>
-<MACRO>
-<NAME>GTK_IS_CELL_RENDERER_MASKED_CLASS</NAME>
-#define GTK_IS_CELL_RENDERER_MASKED_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CELL_RENDERER_MASKED))
-</MACRO>
-<MACRO>
-<NAME>GTK_CELL_RENDERER_MASKED_GET_CLASS</NAME>
-#define GTK_CELL_RENDERER_MASKED_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CELL_RENDERER_MASKED, GtkCellRendererMasked))
-</MACRO>
-<STRUCT>
-<NAME>GtkCellRendererMasked</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>GtkCellRendererMaskedClass</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>GtkCellRendererMasked</NAME>
-struct _GtkCellRendererMasked
-{
-  GtkCellRendererText parent;
-};
-</STRUCT>
-<STRUCT>
-<NAME>GtkCellRendererMaskedClass</NAME>
-struct _GtkCellRendererMaskedClass
-{
-  GtkCellRendererTextClass parent_class;
-};
-</STRUCT>
-<FUNCTION>
-<NAME>gtk_cell_renderer_masked_get_type</NAME>
-<RETURNS>GType </RETURNS>
-void 
-</FUNCTION>
-<FUNCTION>
-<NAME>gtk_cell_renderer_masked_new</NAME>
-<RETURNS>GtkCellRenderer *</RETURNS>
-void 
-</FUNCTION>
-<FUNCTION>
-<NAME>gtk_cell_renderer_masked_new_with_mask</NAME>
-<RETURNS>GtkCellRenderer *</RETURNS>
-const gchar *mask 
-</FUNCTION>
-<FUNCTION>
-<NAME>gtk_cell_renderer_masked_set_mask</NAME>
-<RETURNS>void </RETURNS>
-GtkCellRendererMasked *renderer, const gchar *mask 
-</FUNCTION>
diff --git a/docs/reference/gtkmaskedentry-undeclared.txt b/docs/reference/gtkmaskedentry-undeclared.txt
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/docs/reference/gtkmaskedentry-undocumented.txt b/docs/reference/gtkmaskedentry-undocumented.txt
deleted file mode 100644 (file)
index cdaec98..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-48% symbol docs coverage.
-10 symbols documented.
-0 symbols incomplete.
-11 not documented.
-
-
-GtkCellRendererMasked
-GtkMaskedEntry
-gtk_form_widget_masked_entry_get_value_stringify
-gtk_form_widget_masked_entry_new
-gtk_form_widget_masked_entry_set_value_stringify
-gtk_form_widget_set_editable
-gtk_masked_entry_get_mask
-gtk_masked_entry_get_text
-
-
-gtkcellrenderermasked:Short_Description
-gtkmaskedentry:Long_Description
-gtkmaskedentry:Short_Description
diff --git a/docs/reference/gtkmaskedentry-unused.txt b/docs/reference/gtkmaskedentry-unused.txt
deleted file mode 100644 (file)
index 4b5f0f9..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-GTK_FORM_IS_WIDGET_MASKED_ENTRY
-GTK_FORM_IS_WIDGET_MASKED_ENTRY_CLASS
-GTK_FORM_TYPE_WIDGET_MASKED_ENTRY
-GTK_FORM_WIDGET_MASKED_ENTRY
-GTK_FORM_WIDGET_MASKED_ENTRY_CLASS
-GTK_FORM_WIDGET_MASKED_ENTRY_GET_CLASS
-GtkFormWidgetMaskedEntry
-GtkFormWidgetMaskedEntryClass
-gtk_form_widget_masked_entry_get_type
-gtk_form_widget_masked_entry_get_value_stringify
-gtk_form_widget_masked_entry_new
-gtk_form_widget_masked_entry_set_editable
-gtk_form_widget_masked_entry_set_value_stringify
diff --git a/docs/reference/gtkmaskedentry.args b/docs/reference/gtkmaskedentry.args
deleted file mode 100644 (file)
index 3f5fd46..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<ARG>
-<NAME>GtkMaskedEntry::mask</NAME>
-<TYPE>gchar*</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>The mask</NICK>
-<BLURB>The mask.</BLURB>
-<DEFAULT>""</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GtkMaskedEntry::tab-inside</NAME>
-<TYPE>gboolean</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Tabulation inside the widget</NICK>
-<BLURB>Whether pressing tab moves between mask's parts or outside the widget.</BLURB>
-<DEFAULT>FALSE</DEFAULT>
-</ARG>
-
-<ARG>
-<NAME>GtkCellRendererMasked::mask</NAME>
-<TYPE>gchar*</TYPE>
-<RANGE></RANGE>
-<FLAGS>rw</FLAGS>
-<NICK>Mask</NICK>
-<BLURB>Mask.</BLURB>
-<DEFAULT>NULL</DEFAULT>
-</ARG>
-
diff --git a/docs/reference/gtkmaskedentry.hierarchy b/docs/reference/gtkmaskedentry.hierarchy
deleted file mode 100644 (file)
index 1c316eb..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-GObject
-  GInitiallyUnowned
-    GtkObject
-      GtkWidget
-        GtkEntry
-          GtkMaskedEntry
-        GtkContainer
-          GtkMenuShell
-            GtkMenu
-      GtkCellRenderer
-        GtkCellRendererText
-          GtkCellRendererMasked
-  GtkStyle
-  GdkDrawable
-    GdkWindow
-  GdkDragContext
-  GtkTooltip
-  GdkScreen
-  GtkEntryBuffer
-  GdkPixbuf
-  GtkSettings
-GInterface
-  GTypePlugin
-  AtkImplementorIface
-  GtkBuildable
-  GtkEditable
-  GtkCellEditable
-  GIcon
diff --git a/docs/reference/gtkmaskedentry.interfaces b/docs/reference/gtkmaskedentry.interfaces
deleted file mode 100644 (file)
index 8c1b33d..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-GtkWidget AtkImplementorIface GtkBuildable
-GtkEntry AtkImplementorIface GtkBuildable GtkEditable GtkCellEditable
-GtkMaskedEntry AtkImplementorIface GtkBuildable GtkEditable GtkCellEditable
-GtkContainer AtkImplementorIface GtkBuildable
-GtkMenuShell AtkImplementorIface GtkBuildable
-GtkMenu AtkImplementorIface GtkBuildable
diff --git a/docs/reference/gtkmaskedentry.prerequisites b/docs/reference/gtkmaskedentry.prerequisites
deleted file mode 100644 (file)
index 5c1f531..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-GtkCellEditable GtkWidget
-GIcon GObject
diff --git a/docs/reference/gtkmaskedentry.signals b/docs/reference/gtkmaskedentry.signals
deleted file mode 100644 (file)
index e69de29..0000000
index 681c2424b260acbf4ba74ae23092a91c84771920..53a54ef5608bfa2157d06a19a87209502fdb6606 100644 (file)
@@ -1,16 +1,24 @@
 SUBDIRS = icons
 
-moduledir = `pkg-config --variable=moduledir gladeui-1.0`
+glademodulesdir = `pkg-config --variable=moduledir gladeui-1.0`
 
-catalogsdir = `pkg-config --variable=catalogdir gladeui-1.0`
+gladecatalogsdir = `pkg-config --variable=catalogdir gladeui-1.0`
 
-catalogs_DATA = gtkmaskedentry.xml
+gladecatalogs_DATA = gtkmaskedentry.xml
 
-EXTRA_DIST = $(catalogs_DATA)
+EXTRA_DIST = $(gladecatalogs_DATA)
+
+if PLATFORM_WIN32
+libmodulesext = -0.dll
+libmodulesdir = $(bindir)
+else
+libmodulesext = .so
+libmodulesdir = $(libdir)
+endif
 
 install-exec-hook:
-       cd $(moduledir) && \
-       ln -s -f $(libdir)/libgtkmaskedentry.so .
+       cd $(glademodulesdir) && \
+       ln -s -f $(libmodulesdir)/libgtkmaskedentry$(libmodulesext) .
 
 uninstall-hook:
-       rm -f $(moduledir)/libgtkmaskedentry.so
+       rm -f $(glademodulesdir)/libgtkmaskedentry$(libmodulesext)
index 12b0eda959278966474144e256c57ada8fc72eb3..3abeab064cb31bf158d954fc728079263d136912 100644 (file)
@@ -1,4 +1,4 @@
-INCLUDES = $(WARN_CFLAGS) \
+AM_CPPFLAGS = $(WARN_CFLAGS) \
            $(DISABLE_DEPRECATED_CFLAGS) \
            $(GTK_CFLAGS) \
            $(GTKFORM_CFLAGS)
@@ -18,6 +18,14 @@ GTKFORM_H =
 libgtkformmodulesdir =
 endif
 
+if PLATFORM_WIN32
+libmodulesext = -0.dll
+libmodulesdir = $(bindir)
+else
+libmodulesext = .so
+libmodulesdir = $(libdir)
+endif
+
 libgtkmaskedentry_la_SOURCES = gtkmaskedentry.c \
                                gtkcellrenderermasked.c \
                                $(GTKFORM_C)
@@ -28,9 +36,13 @@ include_HEADERS = gtkmaskedentry.h \
                   gtkcellrenderermasked.h \
                   $(GTKFORM_H)
 
+if LIBGTKFORM_FOUND
 install-exec-hook:
        cd $(libgtkformmodulesdir) && \
-       ln -s -f $(libdir)/libgtkmaskedentry.so .
+               ln -s -f $(libmodulesdir)/libgtkmaskedentry$(libmodulesext) .
+endif
 
+if LIBGTKFORM_FOUND
 uninstall-hook:
-       rm -f $(libgtkformmodulesdir)/libgtkmaskedentry.so
+       rm -f $(libgtkformmodulesdir)/libgtkmaskedentry$(libmodulesext)
+endif
\ No newline at end of file
index b1cd903a49770f504f9cac8a46bef39a4129ea32..bcab164a2924cc3fac23d27c9a033c84ee520961 100644 (file)
  * Boston, MA 02111-1307, USA.
  */
 
+#ifdef HAVE_CONFIG_H
+       #include "config.h"
+#endif
+
 #include <ctype.h>
 #include <string.h>
 
@@ -83,32 +87,7 @@ struct _GtkMaskedEntryPrivate
                gboolean tab_inside;
        };
 
-GType
-gtk_masked_entry_get_type (void)
-{
-       static GType masked_entry_type = 0;
-
-       if (!masked_entry_type)
-               {
-                       static const GTypeInfo masked_entry_info =
-                               {
-                                       sizeof (GtkMaskedEntryClass),
-                                       NULL,           /* base_init */
-                                       NULL,           /* base_finalize */
-                                       (GClassInitFunc) gtk_masked_entry_class_init,
-                                       NULL,           /* class_finalize */
-                                       NULL,           /* class_data */
-                                       sizeof (GtkMaskedEntry),
-                                       0,              /* n_preallocs */
-                                       (GInstanceInitFunc) gtk_masked_entry_init,
-                               };
-
-                       masked_entry_type = g_type_register_static (GTK_TYPE_ENTRY, "GtkMaskedEntry",
-                                                                   &masked_entry_info, 0);
-               }
-
-  return masked_entry_type;
-}
+G_DEFINE_TYPE (GtkMaskedEntry, gtk_masked_entry, GTK_TYPE_ENTRY)
 
 static void
 gtk_masked_entry_class_init (GtkMaskedEntryClass *klass)
index 3b251b7689e22d0225b32db31c2ef1dd407f97f5..d7fd864deef5ac49e1345154586eb37205a36256 100644 (file)
@@ -58,6 +58,10 @@ main (int argc, char **argv)
        error = NULL;
        builder = gtk_builder_new ();
        gtk_builder_add_from_file (builder, "plugin_gtkform.ui", &error);
+       if (error != NULL && error->message != NULL)
+               {
+                       g_warning ("%s", error->message);
+               }
 
        gtk_builder_connect_signals (builder, NULL);