On Mon, Apr 19, 2004 at 11:48:44PM +0200, Rodrigo Moya wrote: > On Sun, 2004-04-18 at 12:27 -0300, Gustavo R. Montesino wrote: > > Hi all, > > > > On a project that I'm developing, I've found the need to a simple, > > convenience widget to show a dialog to the user, that lets him/her > > choose a field (in a combo) and enter some search string/pattern. > > > > I would be glad to contribute such widget to libgnomedb and maintain it > > in the future if there is interest. > > > thanks, that sounds pretty good. Could you send it the files to the list > with a test program, please? > I've finally managed to make the widget; please see the attached file. I didn't develop a test program (yet), but besides that the patch is fairly complete, with gtk-doc, i18n, and a changelog entry. It also has an copy-and-paste glade support, but I didn't test it, and don't know if it actually works... The widget uses the GtkComboBoxEntry, and so needs the Gtk+ 2.4. I think it would be possible to add somo conditionals and make it compile and run with GtkCombo from 2.2 also, but didn't look deeper at it. Would that be needed/desirable? (I've patched configure.in to check for GTK+ 2.4) About the test program, would a quick proof-of-concept application be better, or should I take a look at mergeant and see if I can add some search capability for it? Please send comments/sugestions, and I'll do my best trying to implement them. -- Gustavo R. Montesino GPG Key BACAB6C2
diff -r -u -N libgnomedb.orig/ChangeLog libgnomedb/ChangeLog
--- libgnomedb.orig/ChangeLog 2004-05-08 17:16:37.000000000 -0300
+++ libgnomedb/ChangeLog 2004-05-08 17:34:19.000000000 -0300
@@ -1,3 +1,8 @@
+2004-05-08 Gustavo R. Montesino <ikki_gerrard yahoo com br>
+
+ * libgnomedb/gnome-db-find-dialog.[ch]: New widget to get a search
+ field and a search text from the user.
+
2004-05-07 Vivien Malerba <malerba gnome-db org>
* Added GnomeDb stock icons for relations
diff -r -u -N libgnomedb.orig/configure.in libgnomedb/configure.in
--- libgnomedb.orig/configure.in 2004-05-08 17:16:37.000000000 -0300
+++ libgnomedb/configure.in 2004-05-08 16:06:02.000000000 -0300
@@ -78,7 +78,7 @@
CFLAGS="$CFLAGS $WARN_CFLAGS"
CPPFLAGS="$CPPFLAGS $WARN_FLAGS"
-GTK_MODULES="gtk+-2.0 >= 2.0.0"
+GTK_MODULES="gtk+-2.0 >= 2.4.0"
LIBGDA_MODULES="libgda >= 1.1.1"
GNOME_MODULES="libgnomeui-2.0 >= 1.103 bonobo-activation-2.0 libbonoboui-2.0"
LIBGLADE_MODULES="libglade-2.0"
diff -r -u -N libgnomedb.orig/doc/C/libgnomedb-docs.sgml libgnomedb/doc/C/libgnomedb-docs.sgml
--- libgnomedb.orig/doc/C/libgnomedb-docs.sgml 2003-07-06 15:55:34.000000000 -0300
+++ libgnomedb/doc/C/libgnomedb-docs.sgml 2004-04-30 18:27:06.000000000 -0300
@@ -15,6 +15,7 @@
<!ENTITY libgnomedb-error-dialog SYSTEM "sgml/gnome-db-error-dialog.sgml">
<!ENTITY libgnomedb-error SYSTEM "sgml/gnome-db-error.sgml">
<!ENTITY libgnomedb-form SYSTEM "sgml/gnome-db-form.sgml">
+<!ENTITY libgnomedb-find-dialog SYSTEM "sgml/gnome-db-find-dialog.sgml">
<!ENTITY libgnomedb-gray-bar SYSTEM "sgml/gnome-db-gray-bar.sgml">
<!ENTITY libgnomedb-grid SYSTEM "sgml/gnome-db-grid.sgml">
<!ENTITY libgnomedb-icon-list SYSTEM "sgml/gnome-db-icon-list.sgml">
@@ -120,6 +121,7 @@
&libgnomedb-error-dialog;
&libgnomedb-error;
&libgnomedb-form;
+ &libgnomedb-find-dialog;
&libgnomedb-grid;
&libgnomedb-icon-list;
&libgnomedb-list;
diff -r -u -N libgnomedb.orig/doc/C/libgnomedb-sections.txt libgnomedb/doc/C/libgnomedb-sections.txt
--- libgnomedb.orig/doc/C/libgnomedb-sections.txt 2003-08-24 20:42:17.000000000 -0300
+++ libgnomedb/doc/C/libgnomedb-sections.txt 2004-04-30 18:57:38.000000000 -0300
@@ -209,6 +209,32 @@
</SECTION>
<SECTION>
+<FILE>gnome-db-find-dialog</FILE>
+<TITLE>GnomeDbFindDialog</TITLE>
+GnomeDbFindDialog
+<SUBSECTION>
+gnome_db_find_dialog_new
+gnome_db_find_dialog_new_with_model
+<SUBSECTION>
+gnome_db_find_dialog_add_field
+gnome_db_find_dialog_add_fields_from_model
+<SUBSECTION>
+gnome_db_find_dialog_run
+gnome_db_find_dialog_get_field
+gnome_db_find_dialog_get_text
+<SUBSECTION Standard>
+GNOME_DB_FIND_DIALOG
+GNOME_DB_IS_FIND_DIALOG
+GNOME_DB_TYPE_FIND_DIALOG
+gnome_db_find_dialog_get_type
+GNOME_DB_FIND_DIALOG_CLASS
+GNOME_DB_IS_FIND_DIALOG_CLASS
+<SUBSECTION Private>
+GnomeDbFindDialogPrivate
+GnomeDbFindDialogClass
+</SECTION>
+
+<SECTION>
<FILE>gnome-db-form</FILE>
GnomeDbFormPrivate
<TITLE>GnomeDbForm</TITLE>
diff -r -u -N libgnomedb.orig/doc/C/tmpl/gnome-db-find-dialog.sgml libgnomedb/doc/C/tmpl/gnome-db-find-dialog.sgml
--- libgnomedb.orig/doc/C/tmpl/gnome-db-find-dialog.sgml 1969-12-31 21:00:00.000000000 -0300
+++ libgnomedb/doc/C/tmpl/gnome-db-find-dialog.sgml 2004-05-05 12:15:32.000000000 -0300
@@ -0,0 +1,91 @@
+<!-- ##### SECTION Title ##### -->
+GnomeDbFindDialog
+
+<!-- ##### SECTION Short_Description ##### -->
+Find dialog.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+The #GnomeDbFindDialog widget shows a find dialog to the user, where he
+may choose a field and type a text to search. Do the search and show
+the results are left for the application.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT GnomeDbFindDialog ##### -->
+<para>
+The #GnomeDbFindDialog-struct struct contains private data only,
+and should be accessed using the functions below.
+</para>
+
+ dialog:
+ priv:
+
+<!-- ##### FUNCTION gnome_db_find_dialog_new ##### -->
+<para>
+
+</para>
+
+ title:
+ Returns:
+
+
+<!-- ##### FUNCTION gnome_db_find_dialog_new_with_model ##### -->
+<para>
+
+</para>
+
+ title:
+ dm:
+ Returns:
+
+
+<!-- ##### FUNCTION gnome_db_find_dialog_add_field ##### -->
+<para>
+
+</para>
+
+ dialog:
+ field:
+
+
+<!-- ##### FUNCTION gnome_db_find_dialog_add_fields_from_model ##### -->
+<para>
+
+</para>
+
+ dialog:
+ dm:
+
+
+<!-- ##### FUNCTION gnome_db_find_dialog_run ##### -->
+<para>
+
+</para>
+
+ dialog:
+ Returns:
+
+
+<!-- ##### FUNCTION gnome_db_find_dialog_get_field ##### -->
+<para>
+
+</para>
+
+ dialog:
+ Returns:
+
+
+<!-- ##### FUNCTION gnome_db_find_dialog_get_text ##### -->
+<para>
+
+</para>
+
+ dialog:
+ Returns:
+
+
diff -r -u -N libgnomedb.orig/glade/glade-gnomedb.c libgnomedb/glade/glade-gnomedb.c
--- libgnomedb.orig/glade/glade-gnomedb.c 2004-01-10 19:18:06.000000000 -0200
+++ libgnomedb/glade/glade-gnomedb.c 2004-05-08 10:33:12.000000000 -0300
@@ -105,6 +105,9 @@
glade_register_widget (GNOME_DB_TYPE_ERROR_DIALOG,
NULL, glade_standard_build_children,
gnomedb_dialog_find_internal_child);
+ glade_register_widget (GNOME_DB_TYPE_FIND_DIALOG,
+ NULL, glade_standard_build_children,
+ gnomedb_dialog_find_internal_child);
glade_register_widget (GNOME_DB_TYPE_FORM,
glade_standard_build_widget,
NULL, NULL);
diff -r -u -N libgnomedb.orig/libgnomedb/gnome-db-find-dialog.c libgnomedb/libgnomedb/gnome-db-find-dialog.c
--- libgnomedb.orig/libgnomedb/gnome-db-find-dialog.c 1969-12-31 21:00:00.000000000 -0300
+++ libgnomedb/libgnomedb/gnome-db-find-dialog.c 2004-05-05 12:13:47.000000000 -0300
@@ -0,0 +1,311 @@
+/* GNOME DB library
+ * Copyright (C) 1999-2002 The GNOME Foundation.
+ *
+ * AUTHORS:
+ * Gustavo R. Montesino <ikki_gerrard yahoo com br>
+ *
+ * This Library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this Library; see the file COPYING.LIB. If not,
+ * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+
+#include <gtk/gtkcomboboxentry.h>
+#include <gtk/gtkdialog.h>
+#include <gtk/gtkentry.h>
+#include <gtk/gtklabel.h>
+#include <gtk/gtkstock.h>
+#include <gtk/gtktable.h>
+#include <libgda/gda-data-model.h>
+
+#include "gnome-db-find-dialog.h"
+#include "gnome-db-i18n.h"
+
+struct _GnomeDbFindDialogPrivate
+{
+ GtkComboBoxEntry *fields;
+ GtkEntry *text;
+};
+
+enum {
+ P_FIELD = 1,
+ P_STRING
+};
+
+static GObjectClass *parent_class = NULL;
+
+/* Private misc functions */
+
+static void gnome_db_find_dialog_set_property (GObject *object, guint param_id,
+ const GValue *value, GParamSpec *spec)
+{
+ GnomeDbFindDialog *dialog = (GnomeDbFindDialog *) object;
+ g_return_if_fail (GNOME_DB_IS_FIND_DIALOG (dialog));
+
+ switch (param_id)
+ {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, spec);
+ break;
+ }
+}
+
+static void gnome_db_find_dialog_get_property (GObject *object, guint param_id,
+ GValue *value, GParamSpec *spec)
+{
+ GnomeDbFindDialog *dialog = (GnomeDbFindDialog *) object;
+ g_return_if_fail (GNOME_DB_IS_FIND_DIALOG (dialog));
+
+ switch (param_id)
+ {
+ case P_FIELD:
+ g_value_set_string (value, gtk_entry_get_text (
+ GTK_ENTRY (GTK_BIN (dialog -> priv -> fields) -> child)));
+ break;
+
+ case P_STRING:
+ g_value_set_string (value,
+ gtk_entry_get_text (dialog -> priv -> text));
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, spec);
+ break;
+ }
+}
+
+static void gnome_db_find_dialog_init (GnomeDbFindDialog *dialog, GnomeDbFindDialogClass *klass)
+{
+ GtkTable *table;
+ GtkLabel *label;
+
+ g_return_if_fail (GNOME_DB_IS_FIND_DIALOG (dialog));
+
+ dialog -> priv = g_new0 (GnomeDbFindDialogPrivate, 1);
+
+ gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_FIND, GTK_RESPONSE_OK);
+ gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
+ gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
+
+ table = GTK_TABLE (gtk_table_new (2, 2, FALSE));
+ gtk_widget_show (GTK_WIDGET (table));
+ gtk_container_set_border_width (GTK_CONTAINER (table), 10);
+ gtk_table_set_col_spacings (table, 30);
+ gtk_table_set_row_spacings (table, 5);
+ gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog) -> vbox), GTK_WIDGET (table));
+
+ label = GTK_LABEL (gtk_label_new_with_mnemonic (_("_Field:")));
+ gtk_widget_show (GTK_WIDGET (label));
+ gtk_table_attach_defaults (table, GTK_WIDGET (label), 0, 1, 0, 1);
+
+ dialog -> priv -> fields = GTK_COMBO_BOX_ENTRY (gtk_combo_box_entry_new_text());
+ gtk_widget_show (GTK_WIDGET (dialog -> priv -> fields));
+ gtk_table_attach_defaults (table, GTK_WIDGET (dialog -> priv -> fields), 1, 2, 0, 1);
+
+ gtk_label_set_mnemonic_widget (label, GTK_WIDGET (dialog -> priv -> fields));
+
+ label = GTK_LABEL (gtk_label_new_with_mnemonic (_("_Text:")));
+ gtk_widget_show (GTK_WIDGET (label));
+ gtk_table_attach_defaults (table, GTK_WIDGET (label), 0, 1, 1, 2);
+
+ dialog -> priv -> text = GTK_ENTRY (gtk_entry_new());
+ gtk_widget_show (GTK_WIDGET (dialog -> priv -> text));
+ gtk_table_attach_defaults (table, GTK_WIDGET (dialog -> priv -> text), 1, 2, 1, 2);
+
+ gtk_label_set_mnemonic_widget (GTK_LABEL (label), GTK_WIDGET (dialog -> priv -> text));
+}
+
+/* Class */
+
+static void gnome_db_find_dialog_finalize (GObject *object)
+{
+ GnomeDbFindDialog *dialog = (GnomeDbFindDialog *) object;
+ g_return_if_fail (GNOME_DB_IS_FIND_DIALOG (dialog));
+
+ g_free (dialog -> priv);
+ dialog -> priv = NULL;
+
+ parent_class -> finalize (object);
+}
+
+static void gnome_db_find_dialog_class_init (GnomeDbFindDialogClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ parent_class = g_type_class_peek_parent (klass);
+
+ object_class -> set_property = gnome_db_find_dialog_set_property;
+ object_class -> get_property = gnome_db_find_dialog_get_property;
+ object_class -> finalize = gnome_db_find_dialog_finalize;
+
+ /* Properties */
+ g_object_class_install_property (object_class, P_FIELD,
+ g_param_spec_string ("field", NULL, NULL, NULL, G_PARAM_READABLE));
+
+ g_object_class_install_property (object_class, P_STRING,
+ g_param_spec_string ("text", NULL, NULL, NULL, G_PARAM_READABLE));
+}
+
+/* Type Registration */
+
+GType gnome_db_find_dialog_get_type (void)
+{
+ static GType type = 0;
+
+ if (!type)
+ {
+ static const GTypeInfo info = {
+ sizeof (GnomeDbFindDialogClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) gnome_db_find_dialog_class_init,
+ NULL,
+ NULL,
+ sizeof (GnomeDbFindDialog),
+ 0,
+ (GInstanceInitFunc) gnome_db_find_dialog_init,
+ };
+ type = g_type_register_static (GTK_TYPE_DIALOG, "GnomeDbFindDialog", &info, 0);
+ }
+
+ return type;
+}
+
+/**
+ * gnome_db_find_dialog_new
+ * @title: the title of the dialog
+ *
+ * Creates a new #GnomeDbFindDialog.
+ *
+ * Returns: a #GnomeDbFindDialog
+ */
+GnomeDbFindDialog *gnome_db_find_dialog_new (const gchar *title)
+{
+ GnomeDbFindDialog *dialog;
+
+ dialog = g_object_new (GNOME_DB_TYPE_FIND_DIALOG, NULL);
+
+ gtk_window_set_title (GTK_WINDOW (dialog), title);
+
+ return dialog;
+}
+
+/**
+ * gnome_db_find_dialog_new_with_model
+ * @title: the title of the dialog
+ * @dm: a #GdaDataModel
+ *
+ * Creates a new #GnomeDbFindDialog and adds the fields of @dm to the Fields
+ * combo.
+ *
+ * Returns: a #GnomeDbFindDialog
+ */
+GnomeDbFindDialog *gnome_db_find_dialog_new_with_model (const gchar *title, GdaDataModel *dm)
+{
+ g_return_val_if_fail (GDA_IS_DATA_MODEL (dm), NULL);
+
+ g_object_ref (dm);
+
+ GnomeDbFindDialog *dialog = gnome_db_find_dialog_new (title);
+ gnome_db_find_dialog_add_fields_from_model (dialog, dm);
+
+ g_object_unref (dm);
+
+ return dialog;
+}
+
+/**
+ * gnome_db_find_dialog_run
+ * @dialog: a #GnomeDbFindDialog
+ *
+ * Shows the @dialog to the user and wait for his/her input.
+ *
+ * Returns: true if the user clicks "find", false otherwise.
+ */
+gboolean gnome_db_find_dialog_run (GnomeDbFindDialog *dialog)
+{
+ g_return_val_if_fail (GNOME_DB_IS_FIND_DIALOG (dialog), FALSE);
+
+ if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK)
+ return TRUE;
+
+ return FALSE;
+}
+
+/**
+ * gnome_db_find_dialog_add_field
+ * @dialog: a #GnomeDbFindDialog
+ * @field: the field's name
+ *
+ * Adds @field to the Fields combo.
+ */
+void gnome_db_find_dialog_add_field (GnomeDbFindDialog *dialog, const gchar *field)
+{
+ g_return_if_fail (GNOME_DB_IS_FIND_DIALOG (dialog));
+
+ gtk_combo_box_append_text (GTK_COMBO_BOX (dialog -> priv -> fields), field);
+}
+
+/**
+ * gnome_db_find_dialog_add_fields_from_model
+ * @dialog: a #GnomeDbFindDialog
+ * @dm: a #GdaDataModel
+ *
+ * Adds all the fields of @dm into the Fields combo.
+ */
+void gnome_db_find_dialog_add_fields_from_model (GnomeDbFindDialog *dialog, GdaDataModel *dm)
+{
+ gint i;
+
+ g_return_if_fail (GNOME_DB_IS_FIND_DIALOG (dialog));
+ g_return_if_fail (GDA_IS_DATA_MODEL (dm));
+
+ g_object_ref (dm);
+
+ for (i = 0; i < gda_data_model_get_n_columns (dm); i++)
+ gnome_db_find_dialog_add_field (dialog,
+ gda_data_model_get_column_title (dm, i));
+
+ g_object_unref (dm);
+}
+
+/**
+ * gnome_db_find_dialog_get_text
+ * @dialog: a #GnomeDbFindDialog widget
+ *
+ * Gets the current search text in @dialog.
+ *
+ * Returns: text to find
+ */
+G_CONST_RETURN gchar* gnome_db_find_dialog_get_text (GnomeDbFindDialog *dialog)
+{
+ g_return_val_if_fail (GNOME_DB_IS_FIND_DIALOG (dialog), NULL);
+
+ return gtk_entry_get_text (GTK_ENTRY (dialog -> priv -> text));
+}
+
+/**
+ * gnome_db_find_dialog_get_field
+ * @dialog: a #GnomeDbFindDialog widget
+ *
+ * Gets the currently selected field in @dialog.
+ *
+ * Returns: name of the selected field
+ */
+G_CONST_RETURN gchar* gnome_db_find_dialog_get_field (GnomeDbFindDialog *dialog)
+{
+ g_return_val_if_fail (GNOME_DB_IS_FIND_DIALOG (dialog), NULL);
+
+ return gtk_entry_get_text (GTK_ENTRY (GTK_BIN (
+ dialog -> priv -> fields) -> child));
+}
diff -r -u -N libgnomedb.orig/libgnomedb/gnome-db-find-dialog.h libgnomedb/libgnomedb/gnome-db-find-dialog.h
--- libgnomedb.orig/libgnomedb/gnome-db-find-dialog.h 1969-12-31 21:00:00.000000000 -0300
+++ libgnomedb/libgnomedb/gnome-db-find-dialog.h 2004-05-05 12:03:58.000000000 -0300
@@ -0,0 +1,66 @@
+/* GNOME DB library
+ * Copyright (C) 1999-2002 The GNOME Foundation.
+ *
+ * AUTHORS:
+ * Gustavo R. Montesino <ikki_gerrard yahoo com br>
+ *
+ * This Library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this Library; see the file COPYING.LIB. If not,
+ * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#if !defined(__gnome_db_find_dialog_h__)
+#define __gnome_db_find_dialog_h__ 1
+
+G_BEGIN_DECLS
+
+#define GNOME_DB_TYPE_FIND_DIALOG (gnome_db_find_dialog_get_type())
+#define GNOME_DB_FIND_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST (obj, GNOME_DB_TYPE_FIND_DIALOG, GnomeDbFindDialog))
+#define GNOME_DB_FIND_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST (obj, GNOME_DB_TYPE_FIND_DIALOG, GnomeDbFindDialogClass))
+#define GNOME_DB_IS_FIND_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE (obj, GNOME_DB_TYPE_FIND_DIALOG))
+#define GNOME_DB_IS_FIND_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_DB_TYPE_FIND_DIALOG))
+
+typedef struct _GnomeDbFindDialog GnomeDbFindDialog;
+typedef struct _GnomeDbFindDialogClass GnomeDbFindDialogClass;
+typedef struct _GnomeDbFindDialogPrivate GnomeDbFindDialogPrivate;
+
+
+struct _GnomeDbFindDialog
+{
+ /*< PRIVATE >*/
+ GtkDialog dialog;
+ GnomeDbFindDialogPrivate *priv;
+};
+
+struct _GnomeDbFindDialogClass
+{
+ GtkDialogClass parent_class;
+};
+
+GType gnome_db_find_dialog_get_type (void);
+
+GnomeDbFindDialog *gnome_db_find_dialog_new (const gchar *title);
+GnomeDbFindDialog *gnome_db_find_dialog_new_with_model (const gchar *title, GdaDataModel *dm);
+
+gboolean gnome_db_find_dialog_run (GnomeDbFindDialog *dialog);
+
+void gnome_db_find_dialog_add_field (GnomeDbFindDialog *dialog, const gchar *field);
+void gnome_db_find_dialog_add_fields_from_model (GnomeDbFindDialog *dialog, GdaDataModel *dm);
+
+G_CONST_RETURN gchar* gnome_db_find_dialog_get_field (GnomeDbFindDialog *dialog);
+G_CONST_RETURN gchar* gnome_db_find_dialog_get_text (GnomeDbFindDialog *dialog);
+
+G_END_DECLS
+
+#endif /* __gnome_db_find_dialog_h__ */
diff -r -u -N libgnomedb.orig/libgnomedb/libgnomedb.h libgnomedb/libgnomedb/libgnomedb.h
--- libgnomedb.orig/libgnomedb/libgnomedb.h 2003-08-27 19:42:07.000000000 -0300
+++ libgnomedb/libgnomedb/libgnomedb.h 2004-04-20 08:23:43.000000000 -0300
@@ -37,6 +37,7 @@
#include <libgnomedb/gnome-db-editor.h>
#include <libgnomedb/gnome-db-error.h>
#include <libgnomedb/gnome-db-error-dialog.h>
+#include <libgnomedb/gnome-db-find-dialog.h>
#include <libgnomedb/gnome-db-form.h>
#include <libgnomedb/gnome-db-gray-bar.h>
#include <libgnomedb/gnome-db-grid.h>
diff -r -u -N libgnomedb.orig/libgnomedb/Makefile.am libgnomedb/libgnomedb/Makefile.am
--- libgnomedb.orig/libgnomedb/Makefile.am 2003-08-24 08:37:26.000000000 -0300
+++ libgnomedb/libgnomedb/Makefile.am 2004-04-20 09:44:25.000000000 -0300
@@ -40,6 +40,7 @@
gnome-db-dsn-config.h \
gnome-db-error.h \
gnome-db-error-dialog.h \
+ gnome-db-find-dialog.h \
gnome-db-form.h \
gnome-db-gray-bar.h \
gnome-db-grid.h \
@@ -102,6 +103,7 @@
gnome-db-form.c \
gnome-db-gray-bar.c \
gnome-db-grid.c \
+ gnome-db-find-dialog.c \
gnome-db-init.c \
gnome-db-list.c \
gnome-db-model.c \
diff -r -u -N libgnomedb.orig/po/POTFILES.in libgnomedb/po/POTFILES.in
--- libgnomedb.orig/po/POTFILES.in 2004-01-26 06:46:08.000000000 -0200
+++ libgnomedb/po/POTFILES.in 2004-04-22 08:41:14.000000000 -0300
@@ -19,6 +19,7 @@
libgnomedb/gnome-db-dsn-config.c
libgnomedb/gnome-db-error-dialog.c
libgnomedb/gnome-db-error.c
+libgnomedb/gnome-db-find-dialog.c
libgnomedb/gnome-db-form.c
libgnomedb/gnome-db-grid.c
libgnomedb/gnome-db-init.c
Attachment:
signature.asc
Description: Digital signature