diff --git a/data/close.png b/data/close.png new file mode 100644 index 00000000..ba38c3b3 Binary files /dev/null and b/data/close.png differ diff --git a/data/speeddial-head.html b/data/speeddial-head.html index 556221eb..58cea24a 100644 --- a/data/speeddial-head.html +++ b/data/speeddial-head.html @@ -4,166 +4,81 @@ This file is licensed under the terms of the expat license, see the file EXPAT. --> - {title} ", - thumb_size + 40, (int)((thumb_size / 1.5) + 43), - thumb_size, (int)(thumb_size / 1.5), - thumb_size + 20, - (int)((thumb_size / 4) + 10), (int)((thumb_size / 4) - 10), - cols * (thumb_size + 60), - thumb_size < 160 ? "hidden" : "visible"); + /* try to guess the best X by X grid size */ + while ((grid_index * grid_index) < slot_count) + grid_index++; - g_string_append (markup, - ""); + /* percent width size of one slot */ + slot_size = (100 / grid_index); + g_string_append_printf (markup, + "\n", + slot_size + 1, slot_size - 4); - while (slot <= rows * cols) + while (slot <= slot_count) { gchar* dial_entry = g_strdup_printf ("Dial %d", slot); gchar* uri = g_key_file_get_string (key_file, dial_entry, "uri", NULL); - const gchar* position; - if (slot < cols) - position = " top"; - else if (slot == cols) - position = " top right"; - else if (slot > cols && slot % cols == 0) - position = " right"; - else - position = ""; if (uri && *uri && *uri != '#') { @@ -3794,13 +3763,13 @@ prepare_speed_dial_html (MidoriView* view) g_free (thumb_file); g_string_append_printf (markup, - "
\n" - "
\n" - "\n" - "

" - "‪%s

\n", - position, slot, slot, uri, encoded, slot, title); + "
" + "" + "
%s
\n", + slot, uri, encoded, slot, slot, title); g_free (title); g_free (encoded); @@ -3808,12 +3777,11 @@ prepare_speed_dial_html (MidoriView* view) else { g_string_append_printf (markup, - "
" - "\n" - "

%d

\n

" - "
\n

\n", - position, slot, slot, slot); + "
" + "
" + "
%s
\n", + slot, slot, _("Click to add a shortcut")); } slot++; @@ -3821,7 +3789,7 @@ prepare_speed_dial_html (MidoriView* view) g_free (uri); } g_string_append_printf (markup, - "\n\n\n\n"); + "\n\n\n"); return g_string_free (markup, FALSE); }