Re: Submenu hysteresis patch
- From: Nils Philippsen <nils redhat de>
- To: David Santiago <mrcooger cyberverse com>
- Cc: gtk-devel-list redhat com
- Subject: Re: Submenu hysteresis patch
- Date: Thu, 6 Jul 2000 10:14:35 +0200 (CEST)
On Thu, 6 Jul 2000, David Santiago wrote:
> On Thu, 6 Jul 2000, Nils Philippsen wrote:
>
> > On Wed, 5 Jul 2000, Mrcooger wrote:
> >
> > > * Added a timeout of about 1/3rd of a second. Easily changable with a
> > > #define.
> >
> > I'd suggest to make this configurable (gtk_menu_hysteresis_timeout_set ()).
> > GNOME could then have this configured via the control-center.
> >
> > Nils
> >
>
> I'm all for configurability, and I'd love to have this configurable, along
> with a hundred other little things in GTK+ (the space between menu items,
> the minimum size of a scrollbar thumb, double-click timeout, etc). It
> wasn't the aim of the patch, at this point, to add a new function to the
> API. I thought I'd heard something about a global configuration system
> coming along at some point...in any case, I'd be glad to participate in
> that when something gets figured out.
Hmmm, 'til then something along this should do it (warning: pseudo code, I
don't really know what I'm talking about when it comes to thread safety,
one probably would have to do something with GMutex'es):
...
static guint menu_hyst_timeout_msecs;
...
void gtk_menu_hysteresis_timeout_set (guint timeout)
{
lock_set (&menu_hyst_timeout_msecs);
menu_hyst_timeout_msecs = timeout;
lock_release (&menu_hyst_timeout_msecs);
}
...
giunt gtk_menu_hysteresis_timeout_get (void)
{
guint timeout;
lock_set (&menu_hyst_timeout_msecs);
timeout = menu_hyst_timeout_msecs;
lock_release (&menu_hyst_timeout_msecs);
return timeout;
}
...
Nils
--
Nils Philippsen / +49.711.96437.250 / nils@redhat.de
Red Hat GmbH / Hauptstätter Straße 58 / D70178 Stuttgart
The use of COBOL cripples the mind; its teaching should, therefore, be
regarded as a criminal offence. -- Edsger W. Dijkstra
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]