On 26 May 2010, at 20:52, Tadej Borovšak wrote: > Hello. > >> I've added an about dialog to my gtk application, using GtkAboutDialog. >> However, when the dialog is displayed, the user can still switch to the >> main window, which is undesirable. The dialog should steal focus of the >> whole application. How can I do that ? I have looked at >> gtk_widget_set_parent_window () but couldn't get it to work. > > Have a look at gtk_window_set_modal() and > gtk_window_set_transient_for() functions.
You might also consider why you consider the behaviour to be 'undesirable', though. Modal dialogs sometimes cause users more problems than modeless ones, especially if, from prior experience (e.g. the About dialog in other gtk+ apps), they're expecting a familiar-looking dialog to behave a particular way. Cheeri, Calum. -- CALUM BENSON, Interaction Designer Oracle Corporation, Ireland mailto:calum.ben...@oracle.com Solaris Desktop Team http://blogs.sun.com/calum +353 1 819 9771 Any opinions are personal and not necessarily those of Oracle Corp. _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list