Only look for missing speed dial thumbs in the first pass
Otherwise updating after loading a thumb may trigger an infinite loop by looking for the very same thumb again.
This commit is contained in:
parent
db51b7d575
commit
a762ba5a16
1 changed files with 6 additions and 4 deletions
|
@ -3651,7 +3651,8 @@ list_video_formats ()
|
||||||
}
|
}
|
||||||
|
|
||||||
static gchar*
|
static gchar*
|
||||||
prepare_speed_dial_html (MidoriView* view)
|
prepare_speed_dial_html (MidoriView* view,
|
||||||
|
gboolean load_missing)
|
||||||
{
|
{
|
||||||
MidoriBrowser* browser = midori_browser_get_for_widget (GTK_WIDGET (view));
|
MidoriBrowser* browser = midori_browser_get_for_widget (GTK_WIDGET (view));
|
||||||
GKeyFile* key_file;
|
GKeyFile* key_file;
|
||||||
|
@ -3742,6 +3743,7 @@ prepare_speed_dial_html (MidoriView* view)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
encoded = g_strdup ("");
|
encoded = g_strdup ("");
|
||||||
|
if (load_missing)
|
||||||
midori_view_speed_dial_get_thumb (view, dial_entry, uri);
|
midori_view_speed_dial_get_thumb (view, dial_entry, uri);
|
||||||
}
|
}
|
||||||
g_free (thumb_file);
|
g_free (thumb_file);
|
||||||
|
@ -3816,7 +3818,7 @@ midori_view_set_uri (MidoriView* view,
|
||||||
katze_item_set_uri (view->item, "");
|
katze_item_set_uri (view->item, "");
|
||||||
|
|
||||||
if (speeddial_markup == NULL)
|
if (speeddial_markup == NULL)
|
||||||
speeddial_markup = prepare_speed_dial_html (view);
|
speeddial_markup = prepare_speed_dial_html (view, TRUE);
|
||||||
|
|
||||||
midori_view_load_alternate_string (view,
|
midori_view_load_alternate_string (view,
|
||||||
speeddial_markup, "about:blank", NULL);
|
speeddial_markup, "about:blank", NULL);
|
||||||
|
@ -5530,7 +5532,7 @@ midori_view_save_speed_dial_config (MidoriView* view,
|
||||||
sokoke_key_file_save_to_file (key_file, config_file, NULL);
|
sokoke_key_file_save_to_file (key_file, config_file, NULL);
|
||||||
g_free (config_file);
|
g_free (config_file);
|
||||||
|
|
||||||
katze_assign (speeddial_markup, prepare_speed_dial_html (view));
|
katze_assign (speeddial_markup, prepare_speed_dial_html (view, FALSE));
|
||||||
|
|
||||||
while ((tab = midori_browser_get_nth_tab (browser, i++)))
|
while ((tab = midori_browser_get_nth_tab (browser, i++)))
|
||||||
if (midori_view_is_blank (MIDORI_VIEW (tab)))
|
if (midori_view_is_blank (MIDORI_VIEW (tab)))
|
||||||
|
|
Loading…
Reference in a new issue