[Xfce4-commits] CVS: xfce4/libxfcegui4/libxfcegui4 dialogs.c, 1.24, 1.25

Brian J. Tarricone bjt23 at cornell.edu
Wed Jul 21 18:44:15 CEST 2004


On Wed, 21 Jul 2004, Jean-François Wauthy wrote:

> Le dim 18/07/2004 à 17:45, Jasper Huijsmans a écrit :
> > pollux at lunar-linux.org wrote:
> > > Update of /var/cvs/xfce/xfce4/libxfcegui4/libxfcegui4
> > > In directory dbguin.lunar-linux.org:/tmp/cvs-serv21398
> > > 
> > > Modified Files:
> > > 	dialogs.c 
> > > Log Message:
> > > xfce_confirm 'cancel' button becomes a 'no' button if stock_id is GTK_STOCK_YES
> > > 
> > 
> > I'd like to take this opportunity to say something about dialog design. 
> > In general I think we should try and follow the GNOME HIG. This means 
> > that in general Yes/No or Ok/Cancel dialogs are not what you want.
> > 
> > The button order is <alternate action>  <cancel> <default action>.
> > 
> > So, instead of this:
> > ------------------------------------------
> > Do you want to save changes to the file?
> > 
> > 			     No	     Yes
> > ------------------------------------------
> > 
> > We get this:
> > ------------------------------------------
> > Do you want to save changes to the file?
> > 
> > 	Discard changes    Cancel   Save
> > ------------------------------------------
> > 
> > 
> > It's not a very big deal, but I think it's nicer and it makes us fit in 
> > better with GNOME applications, which is a good thing IMO.
> > 
> i added xfce_message_dialog in libxfcegui4. it allows you to easily
> create dialog like that and returns the response id so you don't have to
> care about gtk_dialog_run,... and it accepts gtk stock buttons, or
> custom buttons using a gtk stock icon and text or a gdkpixbuf and text
> or just a text; i'm writing the doc

JF,

is there any reason you're using strings for the XFCE_CUSTOM_BUTTON 
defines?  it seems like an enum would be just fine here.  the only 
reason strings are used for gtk stock ids is because you can register 
new stock items, and assigning numeric ids would be problematic.  for 
this, an int comparison is much less expensive than strcmp().

	-brian





More information about the Xfce4-dev mailing list