[bijiben] external Links: use gtk_show_uri



commit a2a86a30a58ddf5322effcd6c1b02ae7d15bf3e6
Author: Pierre-Yves Luyten <py luyten fr>
Date:   Sun Jan 19 10:42:47 2014 +0100

    external Links: use gtk_show_uri
    
    use external application for uri. See 721341

 src/libbiji/editor/biji-webkit-editor.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/libbiji/editor/biji-webkit-editor.c b/src/libbiji/editor/biji-webkit-editor.c
index 15a679e..a85c2e8 100644
--- a/src/libbiji/editor/biji-webkit-editor.c
+++ b/src/libbiji/editor/biji-webkit-editor.c
@@ -305,6 +305,16 @@ on_note_color_changed (BijiNoteObj *note, BijiWebkitEditor *self)
 }
 
 
+static void
+open_url ( const char *uri)
+{
+  gtk_show_uri (gdk_screen_get_default (),
+                uri,
+                gtk_get_current_event_time (),
+                NULL);
+}
+
+
 gboolean
 on_navigation_request                  (WebKitWebView             *web_view,
                                         WebKitWebFrame            *frame,
@@ -314,7 +324,7 @@ on_navigation_request                  (WebKitWebView             *web_view,
                                         gpointer                   user_data)
 {
   webkit_web_policy_decision_ignore (policy_decision);
-  /* const gchar *       webkit_network_request_get_uri      (WebKitNetworkRequest *request);*/
+  open_url (webkit_network_request_get_uri (request));
   return TRUE;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]