Re: Problem with Tabs



Hi,
just a quick note to say I found a soloution. Unfortunately, it required a change to the code behind the gtkwindow.

What was happening was that when moving through the list of items, forwards or backwards, it would order the list of widgets accordingly and set the focus to the next in the list. When it was moving back from the first or forwards from the last it would no find the appropriate next item because it wouldn't wrap. It would fall back and try to focus the default object, which seemed to be null in some of my code, and the first item in others. The lead to nothing being made active up until this morning, and the first item in the list being half activated since then.

I changed the code so that if it failed to find the next item it would run the function again. Because the current item in focus was null (not yet having been set to the default ) it would select the first item it came across. Because the list was sorted according to how I was moving it selected the correct item.

The function in gtkwindow.c I changed was gtk_window_key_press_event(), and I changed it to call gtk_container_focus() twice if it failed the first time.

   Anyone know of a better way to have done this?

Scott Burns




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