Prevent blank pages from landing in the trash

This actually used to work but meanwhile the
definition of a blank view changed.
This commit is contained in:
Christian Dywan 2008-10-10 22:50:56 +02:00
parent e1b828edf2
commit 06aa03c6a6
2 changed files with 2 additions and 2 deletions

View file

@ -714,7 +714,7 @@ midori_browser_tab_destroy_cb (GtkWidget* widget,
{
item = midori_view_get_proxy_item (MIDORI_VIEW (widget));
uri = katze_item_get_uri (item);
if (browser->trash && uri && *uri)
if (browser->trash && !midori_view_is_blank (MIDORI_VIEW (widget)))
katze_array_add_item (browser->trash, item);
katze_array_remove_item (browser->proxy_array, item);
g_object_unref (item);

View file

@ -2168,7 +2168,7 @@ midori_view_is_blank (MidoriView* view)
{
g_return_val_if_fail (MIDORI_IS_VIEW (view), TRUE);
return !(view->uri && *view->uri);
return midori_view_get_display_uri (view)[0] == '\0';
}
/**