lost key accelerators...

 Hi folks!

 I jave a darea, created like this (take a look specially to the keys

	darea = gtk_drawing_area_new ();

	if ( !GTK_IS_WIDGET(darea) )
		DK_ERROR ("unable to create the draw area");
		return (NULL);

	if ( GTK_WIDGET_CAN_FOCUS(darea) )
		gtk_window_set_focus ( GTK_WINDOW (appGlobal), darea );
	gtk_widget_set_events ( darea, GDK_KEY_PRESS_MASK );
	gtk_widget_set_name (darea, "main drawing area");

	gtk_drawing_area_size ( GTK_DRAWING_AREA(darea), width, height);

	gtk_signal_connect ( GTK_OBJECT(darea), "draw",
						GTK_SIGNAL_FUNC(cbDrawAreaDraw), 0 );

	gtk_signal_connect ( GTK_OBJECT(darea), "expose-event",
						GTK_SIGNAL_FUNC(cbDrawAreaExpose), 0 );
	gtk_signal_connect ( GTK_OBJECT(darea), "key-press-event",
						GTK_SIGNAL_FUNC(cbDrawAreaKeyPress), 0 );
	gdk_flush ();

	gtk_object_ref ( GTK_OBJECT(darea) );

	while ( gtk_events_pending() ) gtk_main_iteration();

	return (darea);

 This code works very well till now.. but when I destroy the widget, I
cant use the main menu accelerators anymore (like Ctrl+W to close the
app). It works before and while I have the darea... but After I close
it... bye bye!

 Thanks in advance

          derethor of centolos

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