diff --git a/midori/midori-app.c b/midori/midori-app.c index 4c77f0c8..4d2ebb1f 100644 --- a/midori/midori-app.c +++ b/midori/midori-app.c @@ -228,7 +228,7 @@ midori_browser_message_received_cb (UniqueApp* instance, "history", app->history, NULL); /* FIXME: Should open the homepage according to settings */ - midori_browser_add_uri (browser, "about:blank"); + midori_browser_add_uri (browser, ""); midori_app_add_browser (app, browser); gtk_window_set_screen (GTK_WINDOW (app->browser), unique_message_data_get_screen (message)); diff --git a/midori/midori-view.c b/midori/midori-view.c index 32181953..a061c144 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -2191,8 +2191,9 @@ midori_view_get_icon (MidoriView* view) * midori_view_get_display_uri: * @view: a #MidoriView * - * Retrieves a string that is suitable for displaying, - * particularly an empty URI is represented as "about:blank". + * Retrieves a string that is suitable for displaying. + * + * Note that "about:blank" is represented as "". * * You can assume that the string is not %NULL. * @@ -2201,11 +2202,16 @@ midori_view_get_icon (MidoriView* view) const gchar* midori_view_get_display_uri (MidoriView* view) { - g_return_val_if_fail (MIDORI_IS_VIEW (view), "about:blank"); + g_return_val_if_fail (MIDORI_IS_VIEW (view), ""); + + /* Something in the stack tends to turn "" into "about:blank". + Yet for practical purposes we prefer "". */ + if (view->uri && !strcmp (view->uri, "about:blank")) + return ""; if (view->uri && *view->uri) return view->uri; - return "about:blank"; + return ""; } /** @@ -2216,6 +2222,8 @@ midori_view_get_display_uri (MidoriView* view) * as a title. Most of the time this will be the title * or the current URI. * + * An empty page is represented as "about:blank". + * * You can assume that the string is not %NULL. * * Return value: a title string @@ -2225,6 +2233,9 @@ midori_view_get_display_title (MidoriView* view) { g_return_val_if_fail (MIDORI_IS_VIEW (view), "about:blank"); + if (view->title && !strcmp (view->title, "")) + return "about:blank"; + if (view->title && *view->title) return view->title; return midori_view_get_display_uri (view);