[gtkmm] Problem with set_transient_for()



I am having a problem with the usage of the set_transient_for() function
for a pop up Dialog window.  I want the Dialog to force focus until the
user dismisses it, e.g. to force the user to take care of the pop up
Dialog before they can access the main window again.  Here's a snippet
of how I am using set_transient_for():

void window1::on_quick_connect1_activate()  // callback for a menu item
{  
	quick_dialog *quick_dialog = new class quick_dialog();	//force on
top!!!
	quick_dialog->set_transient_for(*this);
	int result = quick_dialog->run();	
	...

The code compiles, but the main window can still gain focus without
dismissing the Dialog.  Note that 'window1' is my main window.  I also
have the Dialog window set as modal.  What am I doing wrong?

Thanks in advance,
Dan Pixley




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