UI debugging with grep



Here's a common UI bug with an easy fix for everyone.

GNOME alerts are supposed to use OK buttons, not Close buttons.

 http://developer.gnome.org/projects/gup/hig/1.0/windows.html#alert-windows

or

 http://developer.gnome.org/projects/gup/hig/draft_hig/windows.html#alert-windows

There are at least 20 instances of this bug in gnome-applets. Those 20, and
others elsewhere, can be corrected by running the following shell command
within a module.

 for i in `grep -l -r GTK_BUTTONS_CLOSE ./`; do `sed s/GTK_BUTTONS_CLOSE/GTK_BUTTONS_OK/g $i > $i.tmp`; mv $i.tmp $i; done

GTK_BUTTONS_CLOSE is a value of the GtkButtonsType enumeration used by
GtkMessageDialog. Insofar as you are not changing that value, using it outside
of GtkMessageDialog, and are using GtkMessageDialog for alerts, that shell
command should catch all instances of the bug and nothing else. You may want
to check by running `grep -B5 -r GTK_BUTTONS_CLOSE ./` to see that the value
appears as an argument to gtk_message_dialog_new().

I'll be filing a bug report against gnome-applets in a moment. Life will
be simpler if everyone corrects this before more bug reports are filed.

Cheers,
Greg



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