dialog problems . . .



Hi,
  I am having problems with dialogs, my application freezes and the
following GTK messages appear on the console

(serial_gtk:3662): GLib-GObject-CRITICAL **: file gobject.c: line 1310
(g_object_unref): assertion `G_IS_OBJECT (object)' failed

(serial_gtk:3662): Gtk-CRITICAL **: file gtkwidget.c: line 3568
(gtk_widget_set_state): assertion `GTK_IS_WIDGET (widget)' failed

(serial_gtk:3662): GLib-GObject-CRITICAL **: file gobject.c: line 1310
(g_object_unref): assertion `G_IS_OBJECT (object)' failed

. . . and on . . .


What I want to do is pretty simple. I want to  have a preference dialog
containing 2 buttons (ok and cancel). Whenever you press on the Ok button it
should call another function (my_log_it) which does some checking and pop-ups
another dialog to tell the user wether everything is fine or not.

here's the code:

void my_callback_dialog(GtkWidget *widget, struct mystruct *ok)
{
...

        res = gtk_dialog_run (GTK_DIALOG (dialog));
	switch (res)
	{
	case GTK_RESPONSE_ACCEPT:
		my_log_it(dialog, ok);
		break;
	default:
		break;
	}
	gtk_widget_destroy (dialog);

}

then in function my_log_it() I call another function which displays
another dialog


void my_second_dialog(GtkWindow *main_window)
{

 . . .

	gtk_dialog_run (GTK_DIALOG(dialog));
	gtk_widget_destroy(dialog);
}

I don't know what I'm doing wrong. Both dialogs have the same parent
(main_window) and use the new_dialog_with_button() function.

Any Ideas ?

thanks. Robert Walker.




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