Re: [Patch] Fix for bug 134134



On Fri, 2004-02-13 at 19:36, Alexander Winston wrote:
> > I just followed the guidelines at
> > http://developer.gnome.org/doc/guides/programming-guidelines/robust.html
> > and applied for the code in gnome-panel and fixed the issue.
> > 
> > Please review and comment if any issues.
> 
> I see that you've already attached this patch to bug 134134, so I'm
> leaving this one as is. Thanks again. :)

Ugh, the Programming Guidelines were horribly out-of-date in this
respect.  I've just updated them.  The right way to test for modifiers,
say, for Control-F10, is:

  guint modifiers;

  modifiers = gtk_accelerator_get_default_mod_mask ();

  if (event->keysym == GDK_F10
      && (event->state & modifiers) == GDK_CONTROL_MASK) {
          /* do something */
  }

I've also added a section to the GTK+ checklist about this:

  http://tinyurl.com/3ae6b

Sorry about the out-of-datedness; I intend to update the rest of the
Programming Guidelines soon.

  Federico




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]