Re: [BUG 1.1.1] scrollable notebook arrows



Hi Juergen!

On Mon, Oct 05, 1998 at 04:45:05PM +0200, Juergen A. Erhard wrote:

> GTK is a GUI.  GUIs need consistency.  Visual consistency.  I don't
> *see* that no tab has the focus.  I *see* that the first tab is shown.
> Which I assume means it has the focus.

As long as your notebook has the focus, you'll see it. Sure, if the notebook
don't has the focus, you can't say which tab is the current focus tab. But
that problem is the same in GtkList, Gtk{H,V}Box, GtkTable, etc..

> Now I see I can see that I can scroll left... nice, it wraps!  But
> when I scroll around, and get back, I suddenly can't anymore!

That's only a Problem with mouse navigation. Keyboard navigation is
completely consistent. The problem is to make it consistent to both.

> How about a fix that shows what I want:
> 
> - --- gtknotebook.c~	Wed Jul 29 03:05:39 1998
> +++ gtknotebook.c	Sun Sep 13 01:36:31 1998
> @@ -685,7 +685,7 @@
>    if (!notebook->cur_page)
>      {
>        gtk_notebook_switch_page (notebook, page, 0);
> - -      gtk_notebook_switch_focus_tab (notebook, NULL);
> +/*      gtk_notebook_switch_focus_tab (notebook, NULL);*/
>      }
>  
>    if (GTK_WIDGET_VISIBLE (notebook))
> 
> 
> My proposal: the tab that is active (=shown) has the focus, period.

That's not a valid option. switch_page is very expensive for pages with
more than one label (many map and unmap events). Direct scrolling through
the pages by cursor keys looks very ugly.

[...]
> I meant that there's nothing that is obviously related.  As one sees
> in gtknotebook.c, you made sure that no tab has the focus after
> inserting a page, which is not noted in the ChangeLog (I'm not saying
> that it should be... ChangeLog entries are not always easy to get
> right).

No. Only the first page_insert set's focus_tab to NULL. Following page_inserts
don't change anything. That was done because it looks better with keyboard
navigation. Open an unchanged notebook in testgtk, press <Tab>. The first
notebook tab receives the focus. With your patch the second notebook receives
the focus. 

bye,
  Lars



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