]> spindle.queued.net Git - midori/commitdiff
Render empty speed dial shortcuts as Add icons
authorChristian Dywan <christian@twotoasts.de>
Thu, 5 May 2011 23:59:28 +0000 (01:59 +0200)
committerChristian Dywan <christian@twotoasts.de>
Fri, 6 May 2011 00:07:11 +0000 (02:07 +0200)
And only show the icons if scripts are enabled.

midori/midori-view.c

index f18c6d1c7555a184505d68c6c925045ceb02bd75..8b72b805d398223b96f09375d17120dbd0a7e144 100644 (file)
@@ -4040,12 +4040,12 @@ prepare_speed_dial_html (MidoriView* view)
         else
         {
             g_string_append_printf (markup,
-                    "<div class=\"shortcut%s\" id=\"s%d\">"
-                    "\n<a href=\"#\" onclick='javascript:return"
-                    " getAction(\"s%d\");'>"
-                    "<h1>%d</h1>\n<h4><span></span></h4>"
-                    "</a>\n<p></p></div>\n",
-                    position, slot, slot, slot);
+                "<div class=\"shortcut%s\" id=\"s%d\">", position, slot);
+            if (katze_object_get_boolean (view->settings, "enable-scripts"))
+                g_string_append_printf (markup,
+                    "<a href=\"#\" onclick='javascript:return getAction(\"s%d\");'>"
+                    "<img src=\"stock://6/gtk-add\"></a>", slot);
+            g_string_append_printf (markup, "</div>");
         }
 
         slot++;