Handle 'delay' without the pseudo pause: scheme
Behavior change: Tabs won't remain delayed beyond the session. If some users rely on this, it will need discussion.
This commit is contained in:
parent
9888ad610d
commit
bd3c1b50fb
2 changed files with 4 additions and 16 deletions
|
@ -7063,19 +7063,7 @@ midori_browser_add_item (MidoriBrowser* browser,
|
||||||
view = midori_view_new_with_item (item, browser->settings,
|
view = midori_view_new_with_item (item, browser->settings,
|
||||||
g_object_get_data (G_OBJECT (item), "midori-view-append") ? TRUE : FALSE);
|
g_object_get_data (G_OBJECT (item), "midori-view-append") ? TRUE : FALSE);
|
||||||
page = midori_browser_add_tab (browser, view);
|
page = midori_browser_add_tab (browser, view);
|
||||||
|
|
||||||
/* Blank pages should not be delayed */
|
|
||||||
if (katze_item_get_meta_integer (item, "delay") > 0
|
|
||||||
&& !midori_uri_is_blank (uri)
|
|
||||||
&& strncmp (uri, "pause:", 6) != 0)
|
|
||||||
{
|
|
||||||
gchar* new_uri = g_strdup_printf ("pause:%s", uri);
|
|
||||||
midori_view_set_uri (MIDORI_VIEW (view), new_uri);
|
|
||||||
g_free (new_uri);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
midori_view_set_uri (MIDORI_VIEW (view), uri);
|
midori_view_set_uri (MIDORI_VIEW (view), uri);
|
||||||
|
|
||||||
return page;
|
return page;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3961,9 +3961,10 @@ midori_view_set_uri (MidoriView* view,
|
||||||
g_object_notify (G_OBJECT (view), "uri");
|
g_object_notify (G_OBJECT (view), "uri");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (g_str_has_prefix (uri, "pause:"))
|
else if (katze_item_get_meta_integer (view->item, "delay") > 0)
|
||||||
{
|
{
|
||||||
katze_assign (view->uri, g_strdup (&uri[6]));
|
katze_assign (view->uri, g_strdup (uri));
|
||||||
|
katze_item_set_meta_integer (view->item, "delay", -1);
|
||||||
midori_view_display_error (
|
midori_view_display_error (
|
||||||
view, view->uri, view->title ? view->title : view->uri,
|
view, view->uri, view->title ? view->title : view->uri,
|
||||||
_("Page loading delayed"),
|
_("Page loading delayed"),
|
||||||
|
@ -3994,7 +3995,6 @@ midori_view_set_uri (MidoriView* view,
|
||||||
{
|
{
|
||||||
katze_assign (view->uri, midori_uri_format_for_display (uri));
|
katze_assign (view->uri, midori_uri_format_for_display (uri));
|
||||||
katze_item_set_uri (view->item, uri);
|
katze_item_set_uri (view->item, uri);
|
||||||
katze_item_set_meta_integer (view->item, "delay", -1);
|
|
||||||
g_object_notify (G_OBJECT (view), "uri");
|
g_object_notify (G_OBJECT (view), "uri");
|
||||||
webkit_web_view_open (WEBKIT_WEB_VIEW (view->web_view), uri);
|
webkit_web_view_open (WEBKIT_WEB_VIEW (view->web_view), uri);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue