notebook: Set the current page when none is set

This case happens when you gtk_widget_show_all (notebook).
This commit is contained in:
Benjamin Otte 2015-12-19 06:56:04 +01:00
parent 0045e57e96
commit 1190efebce

View File

@ -4771,6 +4771,13 @@ page_visible_cb (GtkWidget *child,
if (next)
gtk_notebook_switch_page (notebook, GTK_NOTEBOOK_PAGE (next));
}
if (!priv->cur_page && gtk_widget_get_visible (child))
{
gtk_notebook_switch_page (notebook, page);
/* focus_tab is set in the switch_page method */
gtk_notebook_switch_focus_tab (notebook, priv->focus_tab);
}
}
static gint