Re: Comments on toolbar



On Tue, 2003-07-01 at 23:45, Owen Taylor wrote:

> I really didn't mean literally GdkPixbuf *icon if we don't offer
> a GdkPixbuf API elsewhere. With the current API, GtkWidget *icon_widget
> seems most sensible.

Done.

> > > I think TAB_FORWARD definitely should have a reversed since for
> > > RTL. That it doesn't for gtkcontainer is very much a bug,.
> > 
> > I have done this for gtktoolbar in the attached patch. If the patch
> > is applied, I'll close 116301 and open a new one about RTL focusing
> > in gtkcontainer.c and elsewhere.
> 
> Hmm, the handling in your patch is I think not quite what I would
> expect - the double flip of the list is perhaps confusing? 
> Also, should TAB_BACKWARD be special cased along with TAB_FORWARD.
> And does focus() handle RTL correctly now?

I re-wrote it like this:

  /* generate list of children in reverse logical order */

  [...]

  /* move in logical order when
   *
   *	- dir is TAB_FORWARD
   *
   *	- in RTL mode and moving left or up
   *
   *    - in LTR mode and moving right or down
   */
  if (dir == GTK_DIR_TAB_FORWARD                             ||
      (rtl  && (dir == GTK_DIR_UP   || dir == GTK_DIR_LEFT)) ||
      (!rtl && (dir == GTK_DIR_DOWN || dir == GTK_DIR_RIGHT)))
    {
      result = g_list_reverse (result);
    }

Since both focus and move_focus use this function, both work correctly
in the RTL case.

I added testtoolbar.c from libegg to the tests directory with a new
checkbutton to toggle RTL/LTR so people can try it out.

Soeren



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