Convert from gtk_object style object initialization to g_object style

initialization.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/branches/gnucash-gnome2-dev@9237 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
David Hampton
2003-09-06 07:16:22 +00:00
parent 6e88813550
commit 5acd706be9
12 changed files with 172 additions and 160 deletions

View File

@@ -8,6 +8,7 @@ AM_CFLAGS = \
-I${top_srcdir}/src/gnome-utils \
-I${top_srcdir}/src/gnc-module \
-I${top_srcdir}/src/business/business-core \
-I${top_srcdir}/lib/egg \
${G_WRAP_COMPILE_ARGS} \
${GUILE_INCS} \
${GTKHTML_CFLAGS} \

View File

@@ -81,18 +81,21 @@ gnc_general_search_get_type (void)
static guint general_search_type = 0;
if (!general_search_type){
GtkTypeInfo general_search_info = {
"GNCGeneralSearch",
sizeof (GNCGeneralSearch),
sizeof (GNCGeneralSearchClass),
(GtkClassInitFunc) gnc_general_search_class_init,
(GtkObjectInitFunc) gnc_general_search_init,
NULL,
NULL,
static const GTypeInfo our_info = {
sizeof (GNCGeneralSearchClass), /* class_size */
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc) gnc_general_search_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GNCGeneralSearch), /* */
0, /* n_preallocs */
(GInstanceInitFunc) gnc_general_search_init,
};
general_search_type = gtk_type_unique (gtk_hbox_get_type (),
&general_search_info);
general_search_type = g_type_register_static (GTK_TYPE_HBOX,
"GNCGeneralSearch",
&our_info, 0);
}
return general_search_type;
@@ -225,7 +228,7 @@ new_item_selected_cb (gpointer item, gpointer user_data)
/* The search dialog has closed; let's forget about her */
static int
on_close_cb (GnomeDialog *dialog, gpointer user_data)
on_close_cb (GtkDialog *dialog, gpointer user_data)
{
GNCGeneralSearch *gsl = user_data;
gsl->priv->sw = NULL;
@@ -298,7 +301,7 @@ gnc_general_search_new (GNCIdTypeConst type, const char *label,
get_guid = gncQueryObjectGetParameterGetter (type, QUERY_PARAM_GUID);
g_return_val_if_fail (get_guid, NULL);
gsl = gtk_type_new (gnc_general_search_get_type ());
gsl = g_object_new (gnc_general_search_get_type (), NULL);
create_children (gsl, label);

View File

@@ -32,7 +32,7 @@
#ifndef GNC_GENERAL_SEARCH_H
#define GNC_GENERAL_SEARCH_H
#include <gnome.h>
#include <gtk/gtk.h>
#include "dialog-search.h"
#include "gnc-book.h"

View File

@@ -22,11 +22,11 @@
#include <config.h>
#endif
#include <gnome.h>
#include <gtk/gtk.h>
#include "Account.h"
#include "QueryCore.h"
#include "gnc-account-tree.h"
#include "gnc-tree-view-account.h"
#include "gnc-gui-query.h"
#include "search-account.h"
@@ -51,13 +51,6 @@ struct _GNCSearchAccountPrivate {
static GNCSearchCoreTypeClass *parent_class;
enum {
LAST_SIGNAL
};
#if LAST_SIGNAL > 0
static guint signals[LAST_SIGNAL] = { 0 };
#endif
guint
gnc_search_account_get_type (void)
@@ -65,17 +58,21 @@ gnc_search_account_get_type (void)
static guint type = 0;
if (!type) {
GtkTypeInfo type_info = {
"GNCSearchAccount",
sizeof(GNCSearchAccount),
sizeof(GNCSearchAccountClass),
(GtkClassInitFunc)gnc_search_account_class_init,
(GtkObjectInitFunc)gnc_search_account_init,
NULL,
NULL
GTypeInfo type_info = {
sizeof(GNCSearchAccountClass), /* class_size */
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc)gnc_search_account_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof(GNCSearchAccount), /* */
0, /* n_preallocs */
(GInstanceInitFunc)gnc_search_account_init,
};
type = gtk_type_unique(gnc_search_core_type_get_type (), &type_info);
type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
"GNCSearchAccount",
&type_info, 0);
}
return type;
@@ -88,7 +85,7 @@ gnc_search_account_class_init (GNCSearchAccountClass *class)
GNCSearchCoreTypeClass *gnc_search_core_type = (GNCSearchCoreTypeClass *)class;
object_class = G_OBJECT_CLASS (class);
parent_class = gtk_type_class(gnc_search_core_type_get_type ());
parent_class = g_type_class_peek_parent (class);
object_class->finalize = gnc_search_account_finalize;
@@ -127,7 +124,7 @@ gnc_search_account_finalize (GObject *obj)
GNCSearchAccount *
gnc_search_account_new (void)
{
GNCSearchAccount *o = (GNCSearchAccount *)gtk_type_new(gnc_search_account_get_type ());
GNCSearchAccount *o = g_object_new(gnc_search_account_get_type (), NULL);
return o;
}
@@ -141,7 +138,7 @@ gnc_search_account_new (void)
GNCSearchAccount *
gnc_search_account_matchall_new (void)
{
GNCSearchAccount *o = (GNCSearchAccount *)gtk_type_new(gnc_search_account_get_type ());
GNCSearchAccount *o = g_object_new(gnc_search_account_get_type (), NULL);
o->priv->match_all = TRUE;
o->how = GUID_MATCH_ALL;
return o;
@@ -234,19 +231,18 @@ button_clicked (GtkButton *button, GNCSearchAccount *fi)
GtkWidget *accounts_scroller;
GtkWidget *label;
char *desc;
GtkTreeSelection *selection;
/* Create the account tree */
account_tree = gnc_account_tree_new ();
gtk_clist_column_titles_hide(GTK_CLIST(account_tree));
gnc_account_tree_hide_all_but_name(GNC_ACCOUNT_TREE(account_tree));
gnc_account_tree_refresh(GNC_ACCOUNT_TREE(account_tree));
gtk_clist_set_selection_mode(GTK_CLIST(account_tree),
GTK_SELECTION_MULTIPLE);
account_tree = GTK_WIDGET(gnc_tree_view_account_new (FALSE));
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW(account_tree), FALSE);
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(account_tree));
gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE);
/* Select the currently-selected accounts */
if (fi->priv->selected_accounts)
gnc_account_tree_select_accounts (GNC_ACCOUNT_TREE(account_tree),
fi->priv->selected_accounts, FALSE);
gnc_tree_view_account_set_selected_accounts (GNC_TREE_VIEW_ACCOUNT(account_tree),
fi->priv->selected_accounts, FALSE);
/* Create the account scroller and put the tree in it */
accounts_scroller = gtk_scrolled_window_new (NULL, NULL);
@@ -279,7 +275,7 @@ button_clicked (GtkButton *button, GNCSearchAccount *fi)
g_list_free (fi->priv->selected_accounts);
fi->priv->selected_accounts =
gnc_account_tree_get_current_accounts (GNC_ACCOUNT_TREE (account_tree));
gnc_tree_view_account_get_selected_accounts (GNC_TREE_VIEW_ACCOUNT (account_tree));
desc = describe_button (fi);
gtk_label_set_text (GTK_LABEL (GTK_BIN (button)->child), desc);

View File

@@ -22,7 +22,7 @@
#include <config.h>
#endif
#include <gnome.h>
#include <gtk/gtk.h>
#include "QueryCore.h"
@@ -46,31 +46,27 @@ struct _GNCSearchBooleanPrivate {
static GNCSearchCoreTypeClass *parent_class;
enum {
LAST_SIGNAL
};
#if LAST_SIGNAL > 0
static guint signals[LAST_SIGNAL] = { 0 };
#endif
guint
gnc_search_boolean_get_type (void)
{
static guint type = 0;
if (!type) {
GtkTypeInfo type_info = {
"GNCSearchBoolean",
sizeof(GNCSearchBoolean),
sizeof(GNCSearchBooleanClass),
(GtkClassInitFunc)gnc_search_boolean_class_init,
(GtkObjectInitFunc)gnc_search_boolean_init,
NULL,
NULL
GTypeInfo type_info = {
sizeof(GNCSearchBooleanClass), /* class_size */
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc)gnc_search_boolean_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof(GNCSearchBoolean), /* */
0, /* n_preallocs */
(GInstanceInitFunc)gnc_search_boolean_init,
};
type = gtk_type_unique(gnc_search_core_type_get_type (), &type_info);
type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
"GNCSearchBoolean",
&type_info, 0);
}
return type;
@@ -83,7 +79,7 @@ gnc_search_boolean_class_init (GNCSearchBooleanClass *class)
GNCSearchCoreTypeClass *gnc_search_core_type = (GNCSearchCoreTypeClass *)class;
object_class = G_OBJECT_CLASS (class);
parent_class = gtk_type_class(gnc_search_core_type_get_type ());
parent_class = g_type_class_peek_parent (class);
object_class->finalize = gnc_search_boolean_finalize;
@@ -123,7 +119,7 @@ gnc_search_boolean_finalize (GObject *obj)
GNCSearchBoolean *
gnc_search_boolean_new (void)
{
GNCSearchBoolean *o = (GNCSearchBoolean *)gtk_type_new(gnc_search_boolean_get_type ());
GNCSearchBoolean *o = g_object_new(gnc_search_boolean_get_type (), NULL);
return o;
}

View File

@@ -23,7 +23,7 @@
#endif
#include <string.h>
#include <gnome.h>
#include <gtk/gtk.h>
#include "QueryCore.h"
#include "QueryNew.h"
@@ -54,16 +54,8 @@ struct _GNCSearchCoreTypePrivate {
static GtkObjectClass *parent_class;
enum {
LAST_SIGNAL
};
static GHashTable *typeTable = NULL;
#if LAST_SIGNAL > 0
static guint signals[LAST_SIGNAL] = { 0 };
#endif
GType
gnc_search_core_type_get_type (void)
{

View File

@@ -22,7 +22,7 @@
#include <config.h>
#endif
#include <gnome.h>
#include <gtk/gtk.h>
#include "gnc-date.h"
#include "gnc-date-edit.h"
@@ -51,31 +51,27 @@ struct _GNCSearchDatePrivate {
static GNCSearchCoreTypeClass *parent_class;
enum {
LAST_SIGNAL
};
#if LAST_SIGNAL > 0
static guint signals[LAST_SIGNAL] = { 0 };
#endif
guint
gnc_search_date_get_type (void)
{
static guint type = 0;
if (!type) {
GtkTypeInfo type_info = {
"GNCSearchDate",
sizeof(GNCSearchDate),
sizeof(GNCSearchDateClass),
(GtkClassInitFunc)gnc_search_date_class_init,
(GtkObjectInitFunc)gnc_search_date_init,
NULL,
NULL
GTypeInfo type_info = {
sizeof(GNCSearchDateClass), /* class_size */
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc)gnc_search_date_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof(GNCSearchDate), /* */
0, /* n_preallocs */
(GInstanceInitFunc)gnc_search_date_init,
};
type = gtk_type_unique(gnc_search_core_type_get_type (), &type_info);
type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
"GNCSearchDate",
&type_info, 0);
}
return type;
@@ -88,7 +84,7 @@ gnc_search_date_class_init (GNCSearchDateClass *class)
GNCSearchCoreTypeClass *gnc_search_core_type = (GNCSearchCoreTypeClass *)class;
object_class = G_OBJECT_CLASS (class);
parent_class = gtk_type_class(gnc_search_core_type_get_type ());
parent_class = g_type_class_peek_parent (class);
object_class->finalize = gnc_search_date_finalize;
@@ -130,7 +126,7 @@ gnc_search_date_finalize (GObject *obj)
GNCSearchDate *
gnc_search_date_new (void)
{
GNCSearchDate *o = (GNCSearchDate *)gtk_type_new(gnc_search_date_get_type ());
GNCSearchDate *o = g_object_new(gnc_search_date_get_type (), NULL);
return o;
}
@@ -243,7 +239,7 @@ editable_enters (GNCSearchCoreType *fe)
g_return_if_fail (IS_GNCSEARCH_DATE (fi));
if (fi->priv->entry)
gtk_entry_set_activates_default(GTK_ENTRY (fi->priv->entry), TRUE);
gnc_date_editable_enters (GNC_DATE_EDIT (fi->priv->entry), TRUE);
}
static GtkWidget *

View File

@@ -22,7 +22,7 @@
#include <config.h>
#endif
#include <gnome.h>
#include <gtk/gtk.h>
#include "gnc-amount-edit.h"
#include "QueryCore.h"
@@ -57,17 +57,21 @@ gnc_search_double_get_type (void)
static guint type = 0;
if (!type) {
GtkTypeInfo type_info = {
"GNCSearchDouble",
sizeof(GNCSearchDouble),
sizeof(GNCSearchDoubleClass),
(GtkClassInitFunc)gnc_search_double_class_init,
(GtkObjectInitFunc)gnc_search_double_init,
NULL,
NULL
GTypeInfo type_info = {
sizeof(GNCSearchDoubleClass), /* class_size */
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc)gnc_search_double_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof(GNCSearchDouble), /* */
0, /* n_preallocs */
(GInstanceInitFunc)gnc_search_double_init,
};
type = gtk_type_unique(gnc_search_core_type_get_type (), &type_info);
type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
"GNCSearchDouble",
&type_info, 0);
}
return type;
@@ -80,7 +84,7 @@ gnc_search_double_class_init (GNCSearchDoubleClass *class)
GNCSearchCoreTypeClass *gnc_search_core_type = (GNCSearchCoreTypeClass *)class;
object_class = G_OBJECT_CLASS (class);
parent_class = gtk_type_class(gnc_search_core_type_get_type ());
parent_class = g_type_class_peek_parent (class);
object_class->finalize = gnc_search_double_finalize;
@@ -121,7 +125,7 @@ gnc_search_double_finalize (GObject *obj)
GNCSearchDouble *
gnc_search_double_new (void)
{
GNCSearchDouble *o = (GNCSearchDouble *)gtk_type_new(gnc_search_double_get_type ());
GNCSearchDouble *o = g_object_new(gnc_search_double_get_type (), NULL);
return o;
}

View File

@@ -22,7 +22,7 @@
#include <config.h>
#endif
#include <gnome.h>
#include <gtk/gtk.h>
#include "gnc-amount-edit.h"
#include "QueryCore.h"
@@ -57,17 +57,21 @@ gnc_search_int64_get_type (void)
static guint type = 0;
if (!type) {
GtkTypeInfo type_info = {
"GNCSearchInt64",
sizeof(GNCSearchInt64),
sizeof(GNCSearchInt64Class),
(GtkClassInitFunc)gnc_search_int64_class_init,
(GtkObjectInitFunc)gnc_search_int64_init,
NULL,
NULL
GTypeInfo type_info = {
sizeof(GNCSearchInt64Class), /* class_size */
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc)gnc_search_int64_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof(GNCSearchInt64), /* */
0, /* n_preallocs */
(GInstanceInitFunc)gnc_search_int64_init,
};
type = gtk_type_unique(gnc_search_core_type_get_type (), &type_info);
type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
"GNCSearchInt64",
&type_info, 0);
}
return type;
@@ -80,7 +84,7 @@ gnc_search_int64_class_init (GNCSearchInt64Class *class)
GNCSearchCoreTypeClass *gnc_search_core_type = (GNCSearchCoreTypeClass *)class;
object_class = G_OBJECT_CLASS (class);
parent_class = gtk_type_class(gnc_search_core_type_get_type ());
parent_class = g_type_class_peek_parent (class);
object_class->finalize = gnc_search_int64_finalize;
@@ -121,7 +125,7 @@ gnc_search_int64_finalize (GObject *obj)
GNCSearchInt64 *
gnc_search_int64_new (void)
{
GNCSearchInt64 *o = (GNCSearchInt64 *)gtk_type_new(gnc_search_int64_get_type ());
GNCSearchInt64 *o = g_object_new(gnc_search_int64_get_type (), NULL);
return o;
}

View File

@@ -22,7 +22,7 @@
#include <config.h>
#endif
#include <gnome.h>
#include <gtk/gtk.h>
#include "gnc-amount-edit.h"
#include "QueryCore.h"
@@ -58,17 +58,21 @@ gnc_search_numeric_get_type (void)
static guint type = 0;
if (!type) {
GtkTypeInfo type_info = {
"GNCSearchNumeric",
sizeof(GNCSearchNumeric),
sizeof(GNCSearchNumericClass),
(GtkClassInitFunc)gnc_search_numeric_class_init,
(GtkObjectInitFunc)gnc_search_numeric_init,
NULL,
NULL
GTypeInfo type_info = {
sizeof(GNCSearchNumericClass), /* class_size */
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc)gnc_search_numeric_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof(GNCSearchNumeric), /* */
0, /* n_preallocs */
(GInstanceInitFunc)gnc_search_numeric_init,
};
type = gtk_type_unique(gnc_search_core_type_get_type (), &type_info);
type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
"GNCSearchNumeric",
&type_info, 0);
}
return type;
@@ -81,7 +85,7 @@ gnc_search_numeric_class_init (GNCSearchNumericClass *class)
GNCSearchCoreTypeClass *gnc_search_core_type = (GNCSearchCoreTypeClass *)class;
object_class = G_OBJECT_CLASS (class);
parent_class = gtk_type_class(gnc_search_core_type_get_type ());
parent_class = g_type_class_peek_parent (class);
object_class->finalize = gnc_search_numeric_finalize;
@@ -124,7 +128,7 @@ gnc_search_numeric_finalize (GObject *obj)
GNCSearchNumeric *
gnc_search_numeric_new (void)
{
GNCSearchNumeric *o = (GNCSearchNumeric *)gtk_type_new(gnc_search_numeric_get_type ());
GNCSearchNumeric *o = g_object_new(gnc_search_numeric_get_type (), NULL);
return o;
}
@@ -138,7 +142,7 @@ gnc_search_numeric_new (void)
GNCSearchNumeric *
gnc_search_numeric_debcred_new (void)
{
GNCSearchNumeric *o = (GNCSearchNumeric *)gtk_type_new(gnc_search_numeric_get_type ());
GNCSearchNumeric *o = g_object_new(gnc_search_numeric_get_type (), NULL);
o->priv->is_debcred = TRUE;
return o;
}

View File

@@ -22,7 +22,7 @@
#include <config.h>
#endif
#include <gnome.h>
#include <gtk/gtk.h>
#include "QueryCore.h"
#include "Transaction.h" /* for ?REC */
@@ -53,17 +53,21 @@ gnc_search_reconciled_get_type (void)
static guint type = 0;
if (!type) {
GtkTypeInfo type_info = {
"GNCSearchReconciled",
sizeof(GNCSearchReconciled),
sizeof(GNCSearchReconciledClass),
(GtkClassInitFunc)gnc_search_reconciled_class_init,
(GtkObjectInitFunc)gnc_search_reconciled_init,
NULL,
NULL
GTypeInfo type_info = {
sizeof(GNCSearchReconciledClass), /* class_size */
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc)gnc_search_reconciled_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof(GNCSearchReconciled), /* */
0, /* n_preallocs */
(GInstanceInitFunc)gnc_search_reconciled_init,
};
type = gtk_type_unique(gnc_search_core_type_get_type (), &type_info);
type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
"GNCSearchReconciled",
&type_info, 0);
}
return type;
@@ -76,7 +80,7 @@ gnc_search_reconciled_class_init (GNCSearchReconciledClass *class)
GNCSearchCoreTypeClass *gnc_search_core_type = (GNCSearchCoreTypeClass *)class;
object_class = G_OBJECT_CLASS (class);
parent_class = gtk_type_class(gnc_search_core_type_get_type ());
parent_class = g_type_class_peek_parent (class);
object_class->finalize = gnc_search_reconciled_finalize;
@@ -116,7 +120,7 @@ gnc_search_reconciled_finalize (GObject *obj)
GNCSearchReconciled *
gnc_search_reconciled_new (void)
{
GNCSearchReconciled *o = (GNCSearchReconciled *)gtk_type_new(gnc_search_reconciled_get_type ());
GNCSearchReconciled *o = g_object_new(gnc_search_reconciled_get_type (), NULL);
return o;
}

View File

@@ -25,7 +25,7 @@
#include <string.h>
#include <sys/types.h>
#include <regex.h>
#include <gnome.h>
#include <gtk/gtk.h>
#include "search-string.h"
#include "QueryCore.h"
@@ -57,17 +57,21 @@ gnc_search_string_get_type (void)
static guint type = 0;
if (!type) {
GtkTypeInfo type_info = {
"GNCSearchString",
sizeof(GNCSearchString),
sizeof(GNCSearchStringClass),
(GtkClassInitFunc)gnc_search_string_class_init,
(GtkObjectInitFunc)gnc_search_string_init,
NULL,
NULL
GTypeInfo type_info = {
sizeof(GNCSearchStringClass), /* class_size */
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc)gnc_search_string_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof(GNCSearchString), /* */
0, /* n_preallocs */
(GInstanceInitFunc)gnc_search_string_init,
};
type = gtk_type_unique(gnc_search_core_type_get_type (), &type_info);
type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
"GNCSearchString",
&type_info, 0);
}
return type;
@@ -80,7 +84,7 @@ gnc_search_string_class_init (GNCSearchStringClass *class)
GNCSearchCoreTypeClass *gnc_search_core_type = (GNCSearchCoreTypeClass *)class;
object_class = G_OBJECT_CLASS (class);
parent_class = gtk_type_class(gnc_search_core_type_get_type ());
parent_class = g_type_class_peek_parent (class);
object_class->finalize = gnc_search_string_finalize;
@@ -124,7 +128,7 @@ gnc_search_string_finalize (GObject *obj)
GNCSearchString *
gnc_search_string_new (void)
{
GNCSearchString *o = (GNCSearchString *)gtk_type_new(gnc_search_string_get_type ());
GNCSearchString *o = g_object_new(gnc_search_string_get_type (), NULL);
return o;
}
@@ -167,8 +171,13 @@ gncs_validate (GNCSearchCoreType *fe)
if (!fi->value || *(fi->value) == '\0') {
GtkWidget *dialog;
dialog = gnome_ok_dialog (_("You need to enter a string value"));
gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
dialog = gtk_message_dialog_new (NULL,
GTK_DIALOG_MODAL,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_OK,
_("You need to enter a string value"));
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy(dialog);
return FALSE;
}
@@ -197,10 +206,13 @@ gncs_validate (GNCSearchCoreType *fe)
fi->value, regmsg);
g_free (regmsg);
dialog = gnome_ok_dialog (errmsg);
gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
dialog = gtk_message_dialog_new (NULL,
GTK_DIALOG_MODAL,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_OK,
errmsg);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy(dialog);
g_free (errmsg);
valid = FALSE;
}