]> spindle.queued.net Git - midori/commitdiff
Refresh speed dial tabs when adding a new shortcut
authorChristian Dywan <christian@twotoasts.de>
Tue, 2 Jun 2009 17:16:59 +0000 (19:16 +0200)
committerChristian Dywan <christian@twotoasts.de>
Tue, 2 Jun 2009 17:16:59 +0000 (19:16 +0200)
midori/midori-browser.c

index a98da174237766cbd8db0edd6221ffbee7ff47c2..217dd1d1454541c53505169abe29d6ae9f0a90b5 100644 (file)
@@ -968,6 +968,8 @@ midori_browser_add_speed_dial (MidoriBrowser* browser)
 
         if (g_file_get_contents (body_fname, &speed_dial_body, NULL, NULL))
         {
+            gint i;
+
             gdk_pixbuf_save_to_buffer (img, &file_content, &sz, "png", NULL, NULL);
             encoded = g_base64_encode ((guchar *)file_content, sz);
 
@@ -984,6 +986,12 @@ midori_browser_add_speed_dial (MidoriBrowser* browser)
 
             g_file_set_contents (body_fname, replace, -1, NULL);
 
+            i = 0;
+            while ((view = gtk_notebook_get_nth_page (GTK_NOTEBOOK (
+                                                      browser->notebook), i++)))
+                if (midori_view_is_blank (MIDORI_VIEW (view)))
+                    midori_view_reload (MIDORI_VIEW (view), FALSE);
+
             g_object_unref (img);
             g_regex_unref (regex);
             g_free (encoded);