Re: [Epiphany] Bookmarks, History, first focus



On Sat, 2003-10-18 at 16:48, Gregory Merchan wrote:
> Hi,
> 
>   I was looking at the archive and saw the patch which grabs focus to the
> search field in bookmarks and history. There's another way to control
> this that may work better.
> 
> You should be able to use gtk_container_set_focus_chain() to set the
> search field at the start of the chain. Docs here:
>   http://developer.gnome.org/doc/API/2.0/gtk/GtkContainer.html#gtk-container-set-focus-chain
> 
> I've not tried this, so I don't know exactly what's involved. The default
> focus chain seems to be:
> 
>   Topic list --> Search field --> Page list
> 
> and back to Topic list, which I won't try to draw.
> 
> I'm guessing something like this will do it:
> 
> set_chain (GtkContainer *hpaned,
>            GtkWidget    *search_field,
>            GtkWidget    *page_list,
>            GtkWidget    *topic_list)
> {
>   GList *focus_chain = NULL;
> 
>   focus_chain = g_list_append (focus_chain, search_field);
>   focus_chain = g_list_append (focus_chain, page_list);
>   focus_chain = g_list_append (focus_chain, topic_list);
> 
>   gtk_container_set_focus_chain (hpaned, focus_chain);
> 
>   g_list_free (focus_chain);
> }
> 

Probably this is not going to work because when closing
bookmarks/history doesnt destroy the window but just hide it. So next
time you open bookmarks/history we want to reset the focus in the entry.
This is admitelly tricky, but it was done for serious performance issue.
Now treeview are a lot faster, maybe it's time to reconsider it.

Marco




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