[Epiphany] Bookmarks, History, first focus



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);
}

Cheers,
Greg



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