From 736e7b854a676a3d4a30046a8ad7b900b0b04c3b Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Thu, 16 Jul 2009 23:45:45 +0200 Subject: [PATCH] Use the icon of the view for the window in web app mode --- midori/main.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/midori/main.c b/midori/main.c index 203c20b5..a6718fca 100644 --- a/midori/main.c +++ b/midori/main.c @@ -1401,6 +1401,19 @@ snapshot_load_finished_cb (GtkWidget* web_view, } #endif +static void +midori_web_app_browser_notify_load_status_cb (MidoriBrowser* browser, + GParamSpec* pspec, + gpointer data) +{ + if (katze_object_get_enum (browser, "load-status") != MIDORI_LOAD_PROVISIONAL) + { + GtkWidget* view = midori_browser_get_current_tab (browser); + GdkPixbuf* icon = midori_view_get_icon (MIDORI_VIEW (view)); + gtk_window_set_icon (GTK_WINDOW (browser), icon); + } +} + int main (int argc, char** argv) @@ -1554,6 +1567,8 @@ main (int argc, NULL); g_object_unref (settings); g_object_set (browser, "settings", settings, NULL); + g_signal_connect (browser, "notify::load-status", + G_CALLBACK (midori_web_app_browser_notify_load_status_cb), NULL); midori_browser_add_uri (browser, webapp); g_object_set_data (G_OBJECT (browser), "locked", (void*)1); g_signal_connect (browser, "destroy", -- 2.39.5