[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: blocking operation
- From: Gustavo Joćo Alves Marques Carneiro <ee96090 fe up pt>
- To: gtk-app-devel-list redhat com
- Subject: Re: blocking operation
- Date: Tue, 29 Feb 2000 16:33:16 +0000 (WET)
On Tue, 29 Feb 2000, Peter Wurmsdobler wrote:
> hi,
>
> > Is it a modal dialog that you want?
> Sorry, what is a modal dialog.
A modal window is a window that, while being displayed, blocks all
other widgts that don't belong to that window, so the user can't interact
with any other part of the interface of the same program.
>
> What I would like to have is to use in all callbacks requiring
> some file selection only one function like
>
> static void any_file_save_item_activate( void )
> {
> char *save_file_name;
> FILE *save_file_fd;
>
> save_file_name = dialog_file_window();
>
> save_file_fd = fopen( save_file_name, "w" );
>
> /* and here the stuff for writing data */
>
> fclose( save_file_fd );
> }
>
> from all locations of my programm without always creating
> and deleting widgets. Therfore, I nee some blocking operation
> within the dialog_file_window() waiting for an OK event.
>
> There is for sure a better solution.
> peterw
>
Yes, but you have to use the gnome-libraries. Gnome has a
gnome_dialog_run function that blocks and only returns when the user has
pressed a button in that dialog.
If you don't want to create/destroy the dialog all the time, you can
call gnome_dialog_close_hides to set the dialog to just hide the dialog
instead of closing it.
--
Gustavo J.A.M. Carneiro
[reinolinux.fe.up.pt/~ee96090]
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]