Explicitly reset 'delay' status when reloading or changing location

This commit is contained in:
Christian Dywan 2010-08-23 20:08:43 +02:00
parent 5a86115a9a
commit 7d049555a5
2 changed files with 3 additions and 7 deletions

View file

@ -510,11 +510,8 @@ midori_session_add_delay (KatzeArray* session)
KatzeItem* item; KatzeItem* item;
gint i = 0; gint i = 0;
while ((item = katze_array_get_nth_item (session, i++))) while ((item = katze_array_get_nth_item (session, i++)))
{
if (katze_item_get_meta_integer (item, "delay") < 0)
katze_item_set_meta_integer (item, "delay", 1); katze_item_set_meta_integer (item, "delay", 1);
} }
}
static void static void
settings_notify_cb (MidoriWebSettings* settings, settings_notify_cb (MidoriWebSettings* settings,
@ -2043,7 +2040,6 @@ main (int argc,
uri_ready = midori_prepare_uri (uri); uri_ready = midori_prepare_uri (uri);
katze_item_set_uri (item, uri_ready); katze_item_set_uri (item, uri_ready);
g_free (uri_ready); g_free (uri_ready);
katze_item_set_meta_integer (item, "delay", 0);
katze_array_add_item (_session, item); katze_array_add_item (_session, item);
uri = strtok (NULL, "|"); uri = strtok (NULL, "|");
} }
@ -2077,9 +2073,7 @@ main (int argc,
and deleted during normal runtime, but persists in case of a crash. */ and deleted during normal runtime, but persists in case of a crash. */
katze_assign (config_file, build_config_filename ("running")); katze_assign (config_file, build_config_filename ("running"));
if (g_access (config_file, F_OK) == 0) if (g_access (config_file, F_OK) == 0)
{
back_from_crash = TRUE; back_from_crash = TRUE;
}
else else
g_file_set_contents (config_file, "RUNNING", -1, NULL); g_file_set_contents (config_file, "RUNNING", -1, NULL);

View file

@ -3644,6 +3644,7 @@ midori_view_set_uri (MidoriView* view,
{ {
katze_assign (view->uri, sokoke_format_uri_for_display (uri)); katze_assign (view->uri, sokoke_format_uri_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);
} }
@ -4454,6 +4455,7 @@ midori_view_reload (MidoriView* view,
webkit_web_view_reload (WEBKIT_WEB_VIEW (view->web_view)); webkit_web_view_reload (WEBKIT_WEB_VIEW (view->web_view));
else else
webkit_web_view_reload_bypass_cache (WEBKIT_WEB_VIEW (view->web_view)); webkit_web_view_reload_bypass_cache (WEBKIT_WEB_VIEW (view->web_view));
katze_item_set_meta_integer (view->item, "delay", -1);
g_free (title); g_free (title);
} }