I would expect this to work:
while (gtk_main_level () != 0)
gtk_main_quit ();
Look at the implementations:
guint
gtk_main_level (void)
{
return gtk_main_loop_level;
}
void
gtk_main_quit (void)
{
g_return_if_fail (main_loops != NULL);
g_main_quit (main_loops-data);
}
void
Though it isn't an abuse of gtk_main, as someone
pointed out earlier (I lost the original email :( )
it does seem to bring up an unpleasant reentrance
issue: basically, when you call something
like gnome_dialog_run_and_close it can cause
your handlers to reenter at that point [this is a call
Except that I think they get the same style as
popup windows. That tends to give low constrast in
most themes. (Indeed basically all the time)
Would a patch to add
GdkColor tooltip_fg;
GdkColor tooltip_bg;
GdkGC *tooltip_fg_gc;
GdkGC *tooltip_bg_gc;
to GtkStyle be acceptable?
In order to *sometimes* read from a socket, I think you must use
g_source_add and g_main_add_poll. Very briefly, something like:
GPollFD poll_fd;
gboolean needs_input; /* indicates whether the fd should be
* read from. */
static gboolean
The problem I think is that applications (and esp
derived classes) have already written been which do not
fundamentally distinguish between `click' and `toggle'.
You really need to modify your callbacks
to ignore the emission you are causing -- probably
by setting a variable somewhere, although
There is a *lot* of pretty good documentation.
In per-object, per-function API documentation form:
http://developer.gnome.org/doc/API/
For gtk is mostly a community-based documenation project,
(with sgml-templates generated from the code, courtesy of Damon Chaplin),
so if you notice
I presume you need to read the documentation for
g_source_add
g_main_add_poll
to do socket i/o in the gtk framework.
Assuming you always want to read or write if the fd is ready,
you call
g_main_add_watch(channel,
G_IO_IN or G_IO_OUT,
I too have some could that would be radically simplified
with a double-based GtkAdjustment.
You see in my application there is a "rate" slider
which the user can manually fiddle with.
There is also a "synchronize rates" button that computes
the rate from other sources.
For this latter
Probably you don't have the linux kernel headers. [under redhat]
ftp://ftp.redhat.com/pub/redhat/redhat-6.1/i386/RedHat/RPMS
or [under debian]
apt-get install kernel-headers
Or you may need a symlink in /usr/include/linux
to /usr/src/linux/include/linux.
On Tue, 23 Nov 1999,