]> spindle.queued.net Git - midori/commitdiff
Implement 'Open Link as Web A_pplication' in link context menu
authorChristian Dywan <christian@twotoasts.de>
Sat, 2 Jan 2010 20:59:34 +0000 (21:59 +0100)
committerChristian Dywan <christian@twotoasts.de>
Sat, 2 Jan 2010 20:59:34 +0000 (21:59 +0100)
midori/midori-view.c

index d86a53989b0b64491fd53465ab78a269c1d11a78..950b6fb3cea265571b946cb205596fcb3978676e 100644 (file)
@@ -1431,6 +1431,14 @@ midori_web_view_menu_new_window_activate_cb (GtkWidget*  widget,
     g_signal_emit (view, signals[NEW_WINDOW], 0, view->link_uri);
 }
 
+static void
+midori_web_view_menu_web_app_activate_cb (GtkWidget*  widget,
+                                          MidoriView* view)
+{
+    /* FIXME: Use the same binary that is running right now */
+    sokoke_spawn_program ("midori -a", view->link_uri, FALSE);
+}
+
 static void
 midori_web_view_menu_link_copy_activate_cb (GtkWidget*  widget,
                                             MidoriView* view)
@@ -1824,6 +1832,9 @@ webkit_web_view_populate_popup_cb (WebKitWebView* web_view,
         midori_view_insert_menu_item (menu_shell, -1,
             _("Open Link in New _Window"), STOCK_WINDOW_NEW,
             G_CALLBACK (midori_web_view_menu_new_window_activate_cb), widget);
+        midori_view_insert_menu_item (menu_shell, -1,
+            _("Open Link as Web A_pplication"), NULL,
+            G_CALLBACK (midori_web_view_menu_web_app_activate_cb), widget);
         midori_view_insert_menu_item (menu_shell, -1,
             _("_Copy Link destination"), NULL,
             G_CALLBACK (midori_web_view_menu_link_copy_activate_cb), widget);