Christian Dywan wrote:
Am Fri, 27 Jun 2008 11:52:42 +0200 schrieb Carlos Garnacho<carlos@xxxxxxxxxxx>: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.
I agree.
But much people would like to have an option to show close button only on active tab (e.g. some firefox users). I like the idea of "action area" but I think that some common behaviors must be implemented in GtkNotebook (like putting close buttons into "action area"). This way putting close button on tab will be trivial."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.
Alexander Semenov <bohtvaroh@xxxxxxxxx> _______________________________________________ gtk-devel-list mailing list gtk-devel-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-devel-list