Re: suggestion/request: gtk_init returns on failure
- From: Owen Taylor <otaylor redhat com>
- To: Andy Kahn <kahn zk3 dec com>
- Cc: gtk-list redhat com
- Subject: Re: suggestion/request: gtk_init returns on failure
- Date: 19 Feb 1999 16:44:40 -0500
Andy Kahn <kahn@zk3.dec.com> writes:
> this might be a bit late in the development cycle, but i've run into
> a case where this is really needed.  here goes:
> 
> currently, if the gtk_init() code path has an error (e.g., gdk_init()
> or some other routine fails), gtk exits immediately.  this makes sense
> if the application is purely a graphical application.
> 
> however, i'm doing some work with the GTK version of vim, and the
> behavior needed is that if vim is unable to start the gui, then it
> should default and continue with the console version.  in order for
> it to do this, vim needs to know if gtk_init() failed for whatever
> reason.
> 
> basically, it would be something like this:
> 
> 	/*
> 	 * returns 0 on success, some other value if error
> 	 */
> 	int gtk_init(int *argc, char ***argv);
> 
> 
> would this be something that can be squeezed in before 1.2 is released?
We can't change the default behavior of gtk_init() because
a lot of people are presumably assumming that it is going
to abort on failure. However, I think we could do:
Either 
 void gtk_set_abort_on_error (gboolean abort);
Or, (perhaps better)
 gboolean gdk_check_init (int *argc, char ***argv);
Regards,
                                        Owen
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]