[Xfce4-commits] <midori:master> Keep a reference on the geolocation decision

Christian Dywan noreply at xfce.org
Mon May 14 23:06:01 CEST 2012


Updating branch refs/heads/master
         to 8ba3053b4194d485736f910d1582ccb154065aec (commit)
       from 3d720c530334d8dc43ff6dcb595971d3d3483d70 (commit)

commit 8ba3053b4194d485736f910d1582ccb154065aec
Author: Christian Dywan <christian at twotoasts.de>
Date:   Mon May 14 22:57:56 2012 +0200

    Keep a reference on the geolocation decision

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

diff --git a/midori/midori-view.c b/midori/midori-view.c
index ee4f12c..7459c44 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -1394,6 +1394,7 @@ midori_view_location_response_cb (GtkWidget*                       infobar,
         webkit_geolocation_policy_allow (decision);
     else
         webkit_geolocation_policy_deny (decision);
+    g_object_unref (decision);
 }
 
 static gboolean
@@ -1406,8 +1407,9 @@ midori_view_web_view_geolocation_decision_cb (WebKitWebView*                   w
     gchar* hostname = midori_uri_parse_hostname (uri, NULL);
     gchar* message = g_strdup_printf (_("%s wants to know your location."),
                                      hostname && *hostname ? hostname : uri);
+    /* FIXME: decision should be released even if neither buttons's pressed */
     midori_view_add_info_bar (view, GTK_MESSAGE_QUESTION,
-        message, G_CALLBACK (midori_view_location_response_cb), decision,
+        message, G_CALLBACK (midori_view_location_response_cb), g_object_ref (decision),
         _("_Deny"), GTK_RESPONSE_REJECT, _("_Allow"), GTK_RESPONSE_ACCEPT,
         NULL);
     g_free (hostname);


More information about the Xfce4-commits mailing list