Re: API for putting close buttons on tabs (proposal)



On vie, 2008-06-27 at 12:18 +0200, Christian Dywan wrote:
> Am Fri, 27 Jun 2008 11:52:42 +0200
> schrieb Carlos Garnacho <carlos imendio com>:
> 
> > Hi!,
> > 
> > On jue, 2008-06-26 at 17:38 +0200, Sebastian Rittau wrote:
> > > On Thu, Jun 26, 2008 at 04:00:26PM +0300, Alexander Semenov wrote:
> > > 
> > > > I think that GtkNotebook API is missing methods for putting close 
> > > > buttons on tabs. Different implementations of this task look
> > > > different and sometime ugly. It could be cool to add methods such
> > > > as "gtk_notebook_tab_s(g)et_close_button_visible (...)" to the
> > > > standard API. What does the community think about this?
> > > 
> > > http://bugzilla.gnome.org/show_bug.cgi?id=116650 (five years old by
> > > now)
> > 
> > The patch in that bug is actually about adding an "action area" to
> > GtkNotebook, so people can pack widgets besides the tabs area. 
> > 
> > For the specific use case of close buttons, I'm not sure whether
> > people has been implementing the "one button per tab" approach
> > because it was impossible to do another thing from outside, and I at
> > least see a few advantages (less space taken, no moving targets, you
> > have to set up things once, less checks for tab widget hierarchy,...).
> > So, which would be the best approach to follow? while certainly the
> > close buttons is the main use case, a more generic API could bring
> > other benefits here, or is there any usability reason behind the one
> > button per tab approach?
> 
> The one close button aproach clearly has a disadvantage: it is too damn
> easy to close more than one tab accidentally. This is a problem for
> people who may have somewhat shivery hands and also if your mouse
> doesn't quite work reliably. I have seen the first and experienced
> the second problem, so I'm not talking about theory.

Sure, but I don't think this applies only to this case, I've also
experienced that with notebooks with homogeneous tabs and close buttons
(say, gossip), This can happen in general when a single pointer position
could trigger different actions during time, and others could argue that
it'd make things faster if you want to close a bunch of contiguous tabs,
not sure if it's worthwhile enough though :)

> 
> > "gtk_notebook_tab_s(g)et_close_button_visible (...)"
> 
> I tend to like the idea of an option in GtkNotebook that
> particularly adds close buttons on all tabs. That would solve the
> problem that buttons in applications use different icons and alignments.
> 
> I tend to say "gtk_notebook_set_show_close_buttons" instead, though.
> 
> Yours,
>     Christian
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list



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