Re: PROPOSAL: revise GLib message system
- From: johannes nada kth se (Johannes Keukelaar)
- To: gtk-devel-list redhat com
- Subject: Re: PROPOSAL: revise GLib message system
- Date: Fri, 07 Aug 1998 11:09:13 +0200
//> ** Gtk+-WARNING: unable to register exit function
//>
//> ** Gdk-WARNING: shmget failed!
//>
//> ** GLib-WARNING: trying to realloc freed memory
I absolutely agree. Much more useful. However, if you're going to go this way anyway, why not implement this in a more generic way. What I mean is a system where people can register their own message classes, then call g_warning, g_error and all the others with an integer representing this message class, and the proper string would be plugged in in the right place. Say:
gint g_message_class_new (gchar *name);
void g_warning (gint class, gchar *message);
Then you could say:
gnome_class = g_messaga_class_new ("Gnome");
...
g_warning (gnome_class, "Something went wrong!");
You could even extend it to:
GWarningFunc g_set_warning_handler (gint class, GWarningFunc func);
That way, you can easily select which kinds of messages for which message classes you want to display neat windows for.
Perhaps a bit harder to transparently integrate back into all the gtk sources (not really, with global search-replace), and not backwards compatible, but then that was (one of) the idea(s) of the development release, now wasn't it?
Just my 2 cents,
Johannes.
--
"If we aren't supposed to eat animals, why are they made of meat?" -Lars Petrus
Visually inspecting visual programming languages.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]