Re: [BUG 1.1.1] scrollable notebook arrows



-----BEGIN PGP SIGNED MESSAGE-----

Hallöchen Lars,

>>>>> "Lars" == Lars Hamann <lars@gtk.org> writes:

    Lars> On Wed, Sep 30, 1998 at 04:32:53PM +0200, Juergen A. Erhard wrote:
    >> SYMPTOMS:
    >> 
    >> Start testgtk, go to the notebook example.  Now make it scrollable.
    >> Okay... why's the left arrow active?  Click on it... it jumps to the
    >> last page.  Keep the arrow pressed... it stops at the first page.
    >> 
    >> WHY'S THIS A BUG?
    >> 
    >> Well, that should be bleedin' obvious, yeh bollicks![1]
    >> 
    >> I mean, the arrows should always behave the same way, no matter
    >> whether it's already been open for a couple hours or we just opened
    >> it.  Consistency.

    Lars> They behave the same way. As long as no tab has the focus, both arrows
    Lars> are active. You'll get the same state if you switch through the tabs
    Lars> by keyboard. E.g. activate tab one, press cursor left.
    Lars> Maybe this behaviour is a bit ugly, but the way it is now is the normal
    Lars> gtkcontainer focus model. I.e. it's a legal state to have no actual
    Lars> focus tab (notebook->focus_tab == NULL). In this state both arrows are
    Lars> sensitive.

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.

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 a visual inconsisteny, at least to me.

    >> WHAT TO DO?
    >> 
    >> I looked at the code... and I got to odd feeling that this is
    >> deliberate.  Then I diff'd it with the 1.0.4 source...
    >> 
    >> Can anyone (Owen?) tell me why this was done?  Excuse me, but the
    >> way it is now is bullsh*t!

    Lars> Make a consistent proposal and I'll fix it.

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.
Anything else is BS, if you ask me.  (The state of the notebook when
it is not visible is not my concern).

    >> And there's nothing in the ChangeLog, nil.

    Lars> Sat Jul 18 00:54:01 1998  Lars Hamann  <lars@gtk.org>

    Lars> 	* gtk/gtknotebook.c (gtk_notebook_set_child_arg): added support for
    Lars> 	CHILD_ARG_MENU_LABEL, CHILD_ARG_TAB_LABEL
    Lars> 	(gtk_notebook_get_child_arg): added support for CHILD_ARG_MENU_LABEL,
    Lars> 	CHILD_ARG_POSITION
    Lars> 	(gtk_notebook_reorder_child): new funktion to change position of a
    Lars> 	notebook page
    Lars> 	(gtk_notebook_draw_arrow): draw left/right arrow with
    Lars> 	GTK_SHADOW_ETCHED_IN if focus_tab is first/last tab.
    Lars> 	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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).

Bye, J

- -- 
Jürgen A. Erhard  eMail: jae@laden.ilk.de  phone: (GERMANY) 0721 27326
	My WebHome: http://members.tripod.com/~Juergen_Erhard
 Mesa - Free OpenGL API (http://www.ssec.wisc.edu/~brianp/Mesa.html)
   Codito, ergo sum - "I code, therefore I am" -- raster@redhat.com

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQEVAwUBNhVGgAIG66LugGzRAQF/bQgAvfn51yqqNzT4JknnMW4p9VQRDzpKi6+i
Uk+JyupFDFd9Rg8rrVCnhfZcIoV6Bet5H7nX0Kaxa4oI1JUI19Aiy4eTBtJu84sb
u7BijOwYdLebp6rTiKqYyrPzMvMvh2JceDA40fDnqEAHWof891HaEG+OHLR/Lmak
+ulV/r7jNFBuRFd/O9E4Zu+Ny9g8HG4+H3NZHOPRDP94T6G9i/0lR+6WKldQ98JG
wI0O6SrFK0Uv3Zi48EhV19WR8kjcUfOY3aCHaZZTMdG9I1DXH7n1EVipcNErbJCs
ffhMF62uMipLDdENsBrX86XjEd8AkVCIu1XLpzB2jb+UyvNMHlTYBQ==QDBM
-----END PGP SIGNATURE-----



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