stamp-it
intltool-*
Rules-quot
+tests/plugin_gtkform
+*.exe
PKG_CHECK_MODULES(GTKDATEENTRY, [gtk+-2.0 >= 2.6.8
libgtkmaskedentry >= 0.0.1])
PKG_CHECK_EXISTS(gladeui-1.0 >= 3.2.0, [GLADEUI_FOUND=yes], [GLADEUI_FOUND=no])
+PKG_CHECK_EXISTS(libgtkform >= 0.2.0, [LIBGTKFORM_FOUND=yes], [LIBGTKFORM_FOUND=no])
AM_CONDITIONAL(GLADEUI, test $GLADEUI_FOUND = yes)
+AM_CONDITIONAL(LIBGTKFORM_FOUND, test $LIBGTKFORM_FOUND = yes)
AC_SUBST(GTKDATEENTRY_CFLAGS)
AC_SUBST(GTKDATEENTRY_LIBS)
+if test $LIBGTKFORM_FOUND = yes; then
+PKG_CHECK_MODULES(GTKFORM, libgtkform >= 0.2.0)
+
+AC_SUBST(GTKFORM_CFLAGS)
+AC_SUBST(GTKFORM_LIBS)
+AC_SUBST(LIBGTKFORM_FOUND)
+fi
+
# Output files
AC_CONFIG_FILES([
libgtkdateentry.pc
GTK_IS_DATE_CLASS
</SECTION>
+<SECTION>
+<FILE>gtkformwidgetdateentry</FILE>
+<TITLE>GtkFormWidgetDateEntry</TITLE>
+GtkFormWidgetDateEntry
+GtkFormWidgetDateEntryClass
+gtk_form_widget_date_entry_new
+gtk_form_widget_date_entry_get_value_stringify
+gtk_form_widget_date_entry_set_value_stringify
+gtk_form_widget_date_entry_set_editable
+<SUBSECTION Standard>
+GTK_FORM_WIDGET_DATE_ENTRY
+GTK_FORM_IS_WIDGET_DATE_ENTRY
+GTK_FORM_TYPE_WIDGET_DATE_ENTRY
+gtk_form_widget_date_entry_get_type
+GTK_FORM_WIDGET_DATE_ENTRY_CLASS
+GTK_FORM_IS_WIDGET_DATE_ENTRY_CLASS
+GTK_FORM_WIDGET_DATE_ENTRY_GET_CLASS
+</SECTION>
+
<RETURNS>void </RETURNS>
GtkDateEntry *date, gboolean is_visible
</FUNCTION>
+<MACRO>
+<NAME>GTK_FORM_TYPE_WIDGET_DATE_ENTRY</NAME>
+#define GTK_FORM_TYPE_WIDGET_DATE_ENTRY (gtk_form_widget_date_entry_get_type ())
+</MACRO>
+<MACRO>
+<NAME>GTK_FORM_WIDGET_DATE_ENTRY</NAME>
+#define GTK_FORM_WIDGET_DATE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_FORM_TYPE_WIDGET_DATE_ENTRY, GtkFormWidgetDateEntry))
+</MACRO>
+<MACRO>
+<NAME>GTK_FORM_WIDGET_DATE_ENTRY_CLASS</NAME>
+#define GTK_FORM_WIDGET_DATE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_FORM_TYPE_WIDGET_DATE_ENTRY, GtkFormWidgetDateEntryClass))
+</MACRO>
+<MACRO>
+<NAME>GTK_FORM_IS_WIDGET_DATE_ENTRY</NAME>
+#define GTK_FORM_IS_WIDGET_DATE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_FORM_TYPE_WIDGET_DATE_ENTRY))
+</MACRO>
+<MACRO>
+<NAME>GTK_FORM_IS_WIDGET_DATE_ENTRY_CLASS</NAME>
+#define GTK_FORM_IS_WIDGET_DATE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_FORM_TYPE_WIDGET_DATE_ENTRY))
+</MACRO>
+<MACRO>
+<NAME>GTK_FORM_WIDGET_DATE_ENTRY_GET_CLASS</NAME>
+#define GTK_FORM_WIDGET_DATE_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_FORM_TYPE_WIDGET_DATE_ENTRY, GtkFormWidgetDateEntryClass))
+</MACRO>
+<STRUCT>
+<NAME>GtkFormWidgetDateEntry</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GtkFormWidgetDateEntryClass</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GtkFormWidgetDateEntry</NAME>
+struct _GtkFormWidgetDateEntry
+ {
+ GtkFormWidget parent;
+ };
+</STRUCT>
+<STRUCT>
+<NAME>GtkFormWidgetDateEntryClass</NAME>
+struct _GtkFormWidgetDateEntryClass
+ {
+ GtkFormWidgetClass parent_class;
+ };
+</STRUCT>
+<FUNCTION>
+<NAME>gtk_form_widget_date_entry_get_type</NAME>
+<RETURNS>GType </RETURNS>
+void
+</FUNCTION>
+<FUNCTION>
+<NAME>gtk_form_widget_date_entry_new</NAME>
+<RETURNS>GtkFormWidget *</RETURNS>
+void
+</FUNCTION>
+<FUNCTION>
+<NAME>gtk_form_widget_date_entry_get_value_stringify</NAME>
+<RETURNS>gchar *</RETURNS>
+GtkFormWidget *widget
+</FUNCTION>
+<FUNCTION>
+<NAME>gtk_form_widget_date_entry_set_value_stringify</NAME>
+<RETURNS>gboolean </RETURNS>
+GtkFormWidget *fwidget, const gchar *value
+</FUNCTION>
+<FUNCTION>
+<NAME>gtk_form_widget_date_entry_set_editable</NAME>
+<RETURNS>void </RETURNS>
+GtkFormWidget *fwidget, gboolean editable
+</FUNCTION>
-83% symbol docs coverage.
+68% symbol docs coverage.
15 symbols documented.
0 symbols incomplete.
-3 not documented.
+7 not documented.
gtk_date_entry_get_gdate
gtk_date_entry_get_strf
gtk_date_entry_get_tm
+gtk_form_widget_date_entry_get_value_stringify
+gtk_form_widget_date_entry_new
+gtk_form_widget_date_entry_set_value_stringify
+gtk_form_widget_set_editable
+GTK_FORM_IS_WIDGET_DATE_ENTRY
+GTK_FORM_IS_WIDGET_DATE_ENTRY_CLASS
+GTK_FORM_TYPE_WIDGET_DATE_ENTRY
+GTK_FORM_WIDGET_DATE_ENTRY
+GTK_FORM_WIDGET_DATE_ENTRY_CLASS
+GTK_FORM_WIDGET_DATE_ENTRY_GET_CLASS
+GtkFormWidgetDateEntry
+GtkFormWidgetDateEntryClass
gtk_date_entry_get_gdate
gtk_date_entry_get_tm
gtk_date_entry_is_valid
gtk_date_entry_set_date_tm
gtk_date_entry_set_editable
gtk_date_entry_set_editable_with_calendar
+gtk_form_widget_date_entry_get_type
+gtk_form_widget_date_entry_get_value_stringify
+gtk_form_widget_date_entry_new
+gtk_form_widget_date_entry_set_editable
+gtk_form_widget_date_entry_set_value_stringify
AM_CPPFLAGS = $(WARN_CFLAGS) \
$(DISABLE_DEPRECATED_CFLAGS) \
- $(GTKDATEENTRY_CFLAGS)
+ $(GTKDATEENTRY_CFLAGS) \
+ $(GTKFORM_CFLAGS)
-LIBS = $(GTKDATEENTRY_LIBS)
+LIBS = $(GTKDATEENTRY_LIBS) \
+ $(GTKFORM_LIBS)
+
+if LIBGTKFORM_FOUND
+GTKFORM_C = gtkformwidgetdateentry.c
+GTKFORM_H = gtkformwidgetdateentry.h
+libgtkformmodulesdir = `pkg-config --variable=modulesdir libgtkform`
+else
+GTKFORM_C =
+GTKFORM_H =
+libgtkformmodulesdir =
+endif
lib_LTLIBRARIES = libgtkdateentry.la
-libgtkdateentry_la_SOURCES = gtkdateentry.c
+libgtkdateentry_la_SOURCES = gtkdateentry.c \
+ $(GTKFORM_C)
libgtkdateentry_la_LDFLAGS = -no-undefined
-include_HEADERS = gtkdateentry.h
+include_HEADERS = gtkdateentry.h \
+ $(GTKFORM_H)
+
+install-exec-hook:
+ if test "x$(LIBGTKFORM_FOUND)" = "xyes"; then \
+ cd $(libgtkformmodulesdir) && \
+ ln -s -f $(libdir)/libgtkdateentry.so .; \
+ fi
+
+uninstall-hook:
+ if test "x$(LIBGTKFORM_FOUND)" = "xyes"; then \
+ rm -f $(libgtkformmodulesdir)/libgtkdateentry.so
+ fi
gint i, pos = 0, val;
gchar *txt;
GDate *gdate;
+ GDateDay gday;
+ GDateMonth gmon;
+ GDateYear gyear;
GtkDateEntryPrivate *priv = GTK_DATE_ENTRY_GET_PRIVATE (date);
+ gday = G_DATE_BAD_DAY;
+ gmon = G_DATE_BAD_MONTH;
+ gyear = G_DATE_BAD_YEAR;
+
txt = (gchar *)gtk_entry_get_text (GTK_ENTRY (priv->day));
- gdate = g_date_new ();
for (i = 0; i < 3; i++)
{
switch (priv->format[i])
{
case 'd':
- val = atol (g_strndup (txt + pos, 2));
+ val = strtol (g_strndup (txt + pos, 2), NULL, 10);
if (g_date_valid_day ((GDateDay)val))
{
- g_date_set_day (gdate, (GDateDay)val);
+ gday = (GDateDay)val;
pos += 3;
}
else
break;
case 'm':
- val = atol (g_strndup (txt + pos, 2));
+ val = strtol (g_strndup (txt + pos, 2), NULL, 10);
if (g_date_valid_month ((GDateMonth)val))
{
- g_date_set_month (gdate, (GDateMonth)val);
+ gmon = (GDateMonth)val;
pos += 3;
}
else
break;
case 'Y':
- val = atol (g_strndup (txt + pos, 4));
+ val = strtol (g_strndup (txt + pos, 4), NULL, 10);
if (g_date_valid_year ((GDateYear)val))
{
- g_date_set_year (gdate, (GDateYear)val);
+ gyear = (GDateYear)val;
pos += 5;
}
else
}
}
- return gdate;
+ if (g_date_valid_day (gday)
+ && g_date_valid_month (gmon)
+ && g_date_valid_year (gyear))
+ {
+ return g_date_new_dmy (gday, gmon, gyear);
+ }
+ else
+ {
+ return NULL;
+ }
}
/**
--- /dev/null
+/*
+ * Copyright (C) 2010 Andrea Zagli <azagli@libero.it>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <gtk/gtk.h>
+
+#include "gtkdateentry.h"
+#include "gtkformwidgetdateentry.h"
+
+enum
+{
+ PROP_0
+};
+
+static void gtk_form_widget_date_entry_class_init (GtkFormWidgetDateEntryClass *klass);
+static void gtk_form_widget_date_entry_init (GtkFormWidgetDateEntry *gtk_form_widget_date_entry);
+
+static void gtk_form_widget_date_entry_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void gtk_form_widget_date_entry_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec);
+
+#define GTK_FORM_WIDGET_DATE_ENTRY_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_FORM_TYPE_WIDGET_DATE_ENTRY, GtkFormWidgetDateEntryPrivate))
+
+typedef struct _GtkFormWidgetDateEntryPrivate GtkFormWidgetDateEntryPrivate;
+struct _GtkFormWidgetDateEntryPrivate
+ {
+ gpointer foo;
+ };
+
+
+G_DEFINE_TYPE (GtkFormWidgetDateEntry, gtk_form_widget_date_entry, TYPE_GTK_FORM_WIDGET)
+
+static void
+gtk_form_widget_date_entry_class_init (GtkFormWidgetDateEntryClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GtkFormWidgetClass *widget_class = GTK_FORM_WIDGET_CLASS (klass);
+
+ object_class->set_property = gtk_form_widget_date_entry_set_property;
+ object_class->get_property = gtk_form_widget_date_entry_get_property;
+
+ widget_class->get_value_stringify = gtk_form_widget_date_entry_get_value_stringify;
+ widget_class->set_value_stringify = gtk_form_widget_date_entry_set_value_stringify;
+ widget_class->set_editable = gtk_form_widget_date_entry_set_editable;
+
+ g_type_class_add_private (object_class, sizeof (GtkFormWidgetDateEntryPrivate));
+}
+
+static void
+gtk_form_widget_date_entry_init (GtkFormWidgetDateEntry *gtk_form_widget_date_entry)
+{
+}
+
+/**
+ * gtk_form_widget_date_entry_new:
+ *
+ * Returns: the newly created #GtkFormWidgetDateEntry.
+ */
+GtkFormWidget
+*gtk_form_widget_date_entry_new ()
+{
+ return g_object_new (gtk_form_widget_date_entry_get_type (), NULL);
+}
+
+/**
+ * gtk_form_widget_date_entry_get_value_stringify:
+ * @widget:
+ *
+ */
+gchar
+*gtk_form_widget_date_entry_get_value_stringify (GtkFormWidget *fwidget)
+{
+ GtkFormWidgetDateEntryPrivate *priv = GTK_FORM_WIDGET_DATE_ENTRY_GET_PRIVATE (fwidget);
+
+ GtkWidget *w = gtk_form_widget_get_widget (fwidget);
+
+ return g_strdup (gtk_date_entry_get_strf (GTK_DATE_ENTRY (w), "Ymd", '-'));
+}
+
+/**
+ * gtk_form_widget_date_entry_set_value_stringify:
+ * @fwidget:
+ * @value:
+ *
+ */
+gboolean
+gtk_form_widget_date_entry_set_value_stringify (GtkFormWidget *fwidget, const gchar *value)
+{
+ gboolean ret = FALSE;
+ GtkWidget *w;
+
+ g_object_get (G_OBJECT (fwidget),
+ "widget", &w,
+ NULL);
+
+ gtk_entry_set_text (GTK_ENTRY (w), value);
+
+ ret = TRUE;
+
+ return ret;
+}
+
+/**
+ * gtk_form_widget_set_editable:
+ * @fwidget:
+ * @editable:
+ *
+ */
+void
+gtk_form_widget_date_entry_set_editable (GtkFormWidget *fwidget, gboolean editable)
+{
+ GtkWidget *w;
+
+ g_object_get (G_OBJECT (fwidget),
+ "widget", &w,
+ NULL);
+
+ gtk_editable_set_editable (GTK_EDITABLE (w), editable);
+}
+
+/* PRIVATE */
+static void
+gtk_form_widget_date_entry_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ GtkFormWidgetDateEntry *widget_entry = (GtkFormWidgetDateEntry *)object;
+
+ GtkFormWidgetDateEntryPrivate *priv = GTK_FORM_WIDGET_DATE_ENTRY_GET_PRIVATE (widget_entry);
+
+ switch (property_id)
+ {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gtk_form_widget_date_entry_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ GtkFormWidgetDateEntry *widget_entry = (GtkFormWidgetDateEntry *)object;
+
+ GtkFormWidgetDateEntryPrivate *priv = GTK_FORM_WIDGET_DATE_ENTRY_GET_PRIVATE (widget_entry);
+
+ switch (property_id)
+ {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
--- /dev/null
+/*
+ * Copyright (C) 2010 Andrea Zagli <azagli@libero.it>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __LIBGTK_FORM_WIDGET_ENTRY_H__
+#define __LIBGTK_FORM_WIDGET_ENTRY_H__
+
+#include <libgtkform/widget.h>
+
+
+G_BEGIN_DECLS
+
+
+#define GTK_FORM_TYPE_WIDGET_DATE_ENTRY (gtk_form_widget_date_entry_get_type ())
+#define GTK_FORM_WIDGET_DATE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_FORM_TYPE_WIDGET_DATE_ENTRY, GtkFormWidgetDateEntry))
+#define GTK_FORM_WIDGET_DATE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_FORM_TYPE_WIDGET_DATE_ENTRY, GtkFormWidgetDateEntryClass))
+#define GTK_FORM_IS_WIDGET_DATE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_FORM_TYPE_WIDGET_DATE_ENTRY))
+#define GTK_FORM_IS_WIDGET_DATE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_FORM_TYPE_WIDGET_DATE_ENTRY))
+#define GTK_FORM_WIDGET_DATE_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_FORM_TYPE_WIDGET_DATE_ENTRY, GtkFormWidgetDateEntryClass))
+
+
+typedef struct _GtkFormWidgetDateEntry GtkFormWidgetDateEntry;
+typedef struct _GtkFormWidgetDateEntryClass GtkFormWidgetDateEntryClass;
+
+struct _GtkFormWidgetDateEntry
+ {
+ GtkFormWidget parent;
+ };
+
+struct _GtkFormWidgetDateEntryClass
+ {
+ GtkFormWidgetClass parent_class;
+ };
+
+GType gtk_form_widget_date_entry_get_type (void) G_GNUC_CONST;
+
+GtkFormWidget *gtk_form_widget_date_entry_new (void);
+
+gchar *gtk_form_widget_date_entry_get_value_stringify (GtkFormWidget *widget);
+
+gboolean gtk_form_widget_date_entry_set_value_stringify (GtkFormWidget *fwidget, const gchar *value);
+
+void gtk_form_widget_date_entry_set_editable (GtkFormWidget *fwidget, gboolean editable);
+
+
+G_END_DECLS
+
+
+#endif /* __LIBGTK_FORM_WIDGET_ENTRY_H__ */
AM_CPPFLAGS = $(WARN_CFLAGS) \
- $(DISABLE_DEPRECATED_CFLAGS) \
- $(GTKDATEENTRY_CFLAGS) \
- -I$(top_srcdir)/src
+ $(DISABLE_DEPRECATED_CFLAGS) \
+ $(GTKDATEENTRY_CFLAGS) \
+ $(GTKFORM_CFLAGS) \
+ -I$(top_srcdir)/src
-LIBS = $(GTKDATEENTRY_LIBS)
+LIBS = $(GTKDATEENTRY_LIBS) \
+ $(GTKFORM_LIBS)
LDADD = $(top_builddir)/src/libgtkdateentry.la
-noinst_PROGRAMS = date_entry
+if LIBGTKFORM_FOUND
+GTKFORM_NOINST = plugin_gtkform
+else
+GTKFORM_NOINST =
+endif
+
+noinst_PROGRAMS = date_entry \
+ $(GTKFORM_NOINST)
+
+plugin_gtkform_SOURCES = plugin_gtkform.c
--- /dev/null
+/*
+ * GtkDateEntry widget test - plugin for libgtkform
+ * Copyright (C) 2010 Andrea Zagli <azagli@libero.it>
+ *
+ * This software is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this software; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <stdio.h>
+
+#include <gtk/gtk.h>
+
+#include <libgtkform/form.h>
+
+GtkBuilder *builder;
+GtkForm *form;
+
+static void
+btn_insert_on_clicked (GtkButton *button,
+ gpointer user_data)
+{
+ GtkTextBuffer *buf;
+
+ buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (gtk_builder_get_object (builder, "textview1")));
+ gtk_text_buffer_set_text (buf, gtk_form_get_sql (form, GTK_FORM_SQL_INSERT), -1);
+}
+
+static void
+btn_update_on_clicked (GtkButton *button,
+ gpointer user_data)
+{
+ GtkTextBuffer *buf;
+
+ buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (gtk_builder_get_object (builder, "textview1")));
+ gtk_text_buffer_set_text (buf, gtk_form_get_sql (form, GTK_FORM_SQL_UPDATE), -1);
+}
+
+int
+main (int argc, char **argv)
+{
+ GtkWidget *w;
+ GError *error;
+
+ gtk_init (&argc, &argv);
+
+ error = NULL;
+ builder = gtk_builder_new ();
+ gtk_builder_add_from_file (builder, "plugin_gtkform.ui", &error);
+
+ gtk_builder_connect_signals (builder, NULL);
+
+ g_signal_connect (gtk_builder_get_object (builder, "button1"), "clicked", G_CALLBACK (btn_insert_on_clicked), NULL);
+ g_signal_connect (gtk_builder_get_object (builder, "button2"), "clicked", G_CALLBACK (btn_update_on_clicked), NULL);
+
+ form = gtk_form_new_from_file ("plugin_gtkform.form", builder);
+
+ w = GTK_WIDGET (gtk_builder_get_object (builder, "window1"));
+ gtk_widget_show (w);
+
+ gtk_main ();
+
+ return 0;
+}
--- /dev/null
+<?xml version="1.0"?>
+<gtkform>
+
+ <table>clients</table>
+
+ <widget type="date_entry" name="gtkdateentry1" label="label1">
+ <field type="datetime" name="data">
+ <obligatory>TRUE</obligatory>
+ <datetime-type>date</datetime-type>
+ <obligatory>TRUE</obligatory>
+ </field>
+ </widget>
+
+</gtkform>
--- /dev/null
+<?xml version="1.0"?>
+<interface>
+ <requires lib="gtk+" version="2.16"/>
+ <!-- interface-requires gtkdateentry 0.0 -->
+ <!-- interface-naming-policy project-wide -->
+ <object class="GtkWindow" id="window1">
+ <property name="window_position">center</property>
+ <property name="default_width">440</property>
+ <property name="default_height">250</property>
+ <signal name="destroy" handler="gtk_main_quit"/>
+ <signal name="delete_event" handler="gtk_false"/>
+ <child>
+ <object class="GtkTable" id="table1">
+ <property name="visible">True</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">3</property>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Date Entry</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <property name="shadow_type">etched-in</property>
+ <child>
+ <object class="GtkTextView" id="textview1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">False</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="right_attach">3</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button1">
+ <property name="label" translatable="yes">SQL Insert</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button2">
+ <property name="label" translatable="yes">SQL Update</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkDateEntry" id="gtkdateentry1">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>