Re: Generic file select
- From: "Leandro A. F. Pereira" <leandro linuxmag com br>
- To: gtk-app-devel-list gnome org
- Subject: Re: Generic file select
- Date: Fri, 21 Nov 2003 16:13:16 -0200
Quoted by a team of ultra midgets
For `Ian Bell <ian ruffrecords worldonline co uk>'
On Wednesday, 19 November 2003 (14:13):
For example i have a menu callback which needs allow the user to select a file
name, then loads it. For preference I would like to be able to write:
mystring = getavalidfilename("My File Dialog Title");
if(mystring != NULL)
{
loadfile(mystring);
}
else
{
handle_error();
}
The problem I have is the example in the gtk docs returns immediately and the
filename is set some time later in in an external variable.
You can call gtk_main() inside getavalidfilename(), set some external variable
when the OK button is pressed, then call gtk_main_quit() and return that
variable.
--
Leandro Pereira (oO) <leandro linuxmag com br>
/||\ www.mindcrisis.tk
Pontualidade e a coincidencia de duas pessoas chegarem com o
mesmo atraso.
-- Leon Eliachar
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]