diff --git a/data/speeddial-head.html b/data/speeddial-head.html index bf38d672..b68d1099 100644 --- a/data/speeddial-head.html +++ b/data/speeddial-head.html @@ -108,6 +108,9 @@ margin: 0px; padding: 5px 0px 0px; color: #222; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; } div.clear { @@ -194,14 +197,6 @@ \n", + cols, rows, thumb_size); + + while (slot <= rows * cols) + { + gchar* position; + gchar* dial_entry = g_strdup_printf ("Dial %d", slot); + if (slot < cols) + position = g_strdup (" top"); + else if (slot == cols) + position = g_strdup (" top right"); + else if (slot > cols && slot % cols == 0) + position = g_strdup (" right"); + else + position = g_strdup (""); + + if (g_key_file_has_group (key_file, dial_entry)) + { + gchar* slot_id = g_strdup_printf ("s%d", slot); + gchar* thumb_file = sokoke_build_thumbnail_path (slot_id); + gchar* uri = g_key_file_get_string (key_file, dial_entry, "uri", NULL); + gchar* title = g_key_file_get_string (key_file, dial_entry, "title", NULL); + gsize sz; + gchar* encoded; + gchar* thumb_content; + + g_file_get_contents (thumb_file, &thumb_content, &sz, NULL); + encoded = g_base64_encode ((guchar*)thumb_content, sz); + g_free (thumb_file); + g_free (thumb_content); + g_free (slot_id); + + g_string_append_printf (markup, + "
" + "%s