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

Jean-François Wauthy pollux at xfce.org
Wed Jul 21 18:55:51 CEST 2004


Le mer 21/07/2004 à 18:53, Jean-François Wauthy a écrit :
> Le mer 21/07/2004 à 18:44, Brian J. Tarricone a écrit :
> > 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 reason is simply the fact that in place of XFCE_CUSTOM_BUTTON you
> can directly pass a GTK_STOCK_* that is a gchar *
> 
or perhaps, i can set an enum and make pass the GTK_STOCK_* in an extra
param but i think it would make it "harder" to use (and i know you find
it already "hard" to use :þ) and less logical IMHO

> >   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
> > 
> > 
> > _______________________________________________
> > Xfce4-dev mailing list
> > Xfce4-dev at xfce.org
> > http://lunar-linux.org/mailman/listinfo/xfce4-dev
-- 
Jean-François Wauthy <pollux at xfce.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Ceci est une partie de message num?riquement sign?e.
URL: <http://mail.xfce.org/pipermail/xfce4-dev/attachments/20040721/feed3b12/attachment.pgp>


More information about the Xfce4-dev mailing list