Re: Can't click in dialog within preference dialog.



On Wed, Jul 12, 2000 at 03:10:48AM +0100, Paul Warren wrote:

> I'm trying to add a button to a preferences dialog that causes a second
> dialog to appear, so I connect the "clicked" signal from the button to a
> callback:

I'm still having trouble here.  As far as I can tell, it is not possible
to have two GnomeDialogs visible at the same time.  Try this:  Open a
gnome-terminal, right click, hit New Terminal.  Open the prefs dialog for
both of them.  When I do this, I can't click on any buttons in either,
and I have to close the windows using the WM.

This is not specific to gnome-terminal.  Below is some simplest-case
code to demonstrate the problem.

Can others reproduce this?  Is this a bug with GnomeDialog or am I doing
something cretinous?  Normally I'd suspect the latter, but the above
behaviour in gnome-terminal is definitely buggy.  This problem is
present with gnome-libs 1.2.0 and 1.2.3.

cheers,

Paul

#include <gnome.h>

static void
callback (GtkWidget * w, void * data) 
{
	GtkWidget * dialog;
	dialog = gnome_dialog_new("Bar",GNOME_STOCK_BUTTON_OK,NULL);
	gnome_dialog_run_and_close(GNOME_DIALOG(dialog));

}

int main(int argc, char** argv) {
	GtkWidget * dialog;
	gnome_init("dialogtest","1.0",argc,argv);
	dialog = gnome_dialog_new("Foo",GNOME_STOCK_BUTTON_OK,NULL);
	gnome_dialog_button_connect(GNOME_DIALOG(dialog),0,GTK_SIGNAL_FUNC(callback),NULL);
	gtk_widget_show_all(GTK_WIDGET(dialog));
	gtk_main();
}

cc dialogtest.c -o dialogtest \
	`gnome-config --cflags --libs gnome glib gnomeui`





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