[Xfce4-commits] <midori:master> Update tabs if speed dial changes or thumbnail loaded

Christian Dywan noreply at xfce.org
Wed Mar 23 00:08:01 CET 2011


Updating branch refs/heads/master
         to 34ef20ce4e2f775f303948d58561d35ff090fc42 (commit)
       from 616f49605bce68c018ff09c25ccce070022aa8a4 (commit)

commit 34ef20ce4e2f775f303948d58561d35ff090fc42
Author: Christian Dywan <christian at twotoasts.de>
Date:   Wed Mar 23 00:07:52 2011 +0100

    Update tabs if speed dial changes or thumbnail loaded

 midori/midori-view.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/midori/midori-view.c b/midori/midori-view.c
index 909508b..b669ec3 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -5454,6 +5454,9 @@ thumb_view_load_status_cb (MidoriView* thumb_view,
     GdkPixbuf* img;
     gchar* file_path;
     gchar* dom_id;
+    MidoriBrowser* browser;
+    gint i;
+    GtkWidget* tab;
 
     if (midori_view_get_load_status (thumb_view) != MIDORI_LOAD_FINISHED)
         return;
@@ -5477,6 +5480,12 @@ thumb_view_load_status_cb (MidoriView* thumb_view,
     gtk_widget_destroy (GTK_WIDGET (thumb_view));
     view->thumb_view = NULL;
     #endif
+
+    browser = midori_browser_get_for_widget (GTK_WIDGET (view));
+    i = 0;
+    while ((tab = midori_browser_get_nth_tab (browser, i++)))
+        if (midori_view_is_blank (MIDORI_VIEW (tab)))
+            midori_view_reload (MIDORI_VIEW (tab), FALSE);
 }
 
 /**
@@ -5550,6 +5559,8 @@ midori_view_speed_dial_save (MidoriView*  view,
     GtkWidget* notebook;
     gchar* msg = g_strdup (message + 16);
     gchar** parts = g_strsplit (msg, " ", 4);
+    gint i;
+    GtkWidget* tab;
 
     g_object_get (browser, "notebook", &notebook, NULL);
     g_object_get (browser, "speed-dial", &key_file, NULL);
@@ -5622,6 +5633,11 @@ midori_view_speed_dial_save (MidoriView*  view,
     config_file = g_build_filename (sokoke_set_config_dir (NULL), "speeddial", NULL);
     sokoke_key_file_save_to_file (key_file, config_file, NULL);
 
+    i = 0;
+    while ((tab = midori_browser_get_nth_tab (browser, i++)))
+        if (midori_view_is_blank (MIDORI_VIEW (tab)))
+            midori_view_reload (MIDORI_VIEW (tab), FALSE);
+
     g_free (msg);
     g_free (action);
     g_free (config_file);



More information about the Xfce4-commits mailing list