GtkWidget* label;
view = midori_view_new (NULL);
- browser = MIDORI_BROWSER (gtk_widget_get_toplevel (notebook));
+ browser = midori_browser_get_for_widget (notebook);
settings = katze_object_get_object (browser, "settings");
midori_view_set_settings (MIDORI_VIEW (view), settings);
g_object_unref (settings);
if (n < 0)
n = page_holder_notebook_append_view (notebook);
- browser = MIDORI_BROWSER (gtk_widget_get_toplevel (notebook));
+ browser = midori_browser_get_for_widget (notebook);
uri = midori_browser_get_current_uri (browser);
view = gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), n);
midori_view_set_uri (MIDORI_VIEW (view), uri);
n = page_holder_notebook_append_view (notebook);
view = gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), n);
- browser = MIDORI_BROWSER (gtk_widget_get_toplevel (notebook));
+ browser = midori_browser_get_for_widget (notebook);
uri = midori_browser_get_current_uri (browser);
midori_view_set_uri (MIDORI_VIEW (view), uri);
}