Merge lp:~midori/midori/openWithApp into lp:midori

Proposed by Cris Dywan
Status: Merged
Approved by: Paweł Forysiuk
Approved revision: no longer in the revision history of the source branch.
Merged at revision: 6965
Proposed branch: lp:~midori/midori/openWithApp
Merge into: lp:midori
Diff against target: 49 lines (+9/-2)
3 files modified
extensions/open-with.vala (+5/-1)
midori/midori-browser.c (+1/-1)
midori/midori-frontend.c (+3/-0)
To merge this branch: bzr merge lp:~midori/midori/openWithApp
Reviewer Review Type Date Requested Status
Paweł Forysiuk Approve
Review via email: mp+260661@code.launchpad.net

Commit message

Enable openWith in app mode and make it work with view-new

To post a comment you must log in.
Revision history for this message
Paweł Forysiuk (tuxator) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'extensions/open-with.vala'
2--- extensions/open-with.vala 2015-03-24 03:11:10 +0000
3+++ extensions/open-with.vala 2015-05-31 20:32:34 +0000
4@@ -622,7 +622,8 @@
5 }
6
7 bool open_uri (Midori.Tab tab, string uri) {
8- return open_with_type (uri, get_content_type (uri, null), tab, NextStep.TRY_OPEN);
9+ string content_type = get_content_type (uri, null);
10+ return open_with_type (uri, content_type, tab, NextStep.TRY_OPEN);
11 }
12
13 bool navigation_requested (Midori.Tab tab, string uri) {
14@@ -658,6 +659,9 @@
15 #else
16 if (!Midori.URI.is_http (uri))
17 return open_now (uri, content_type, widget, next_step);
18+ /* Don't download websites */
19+ if (content_type == "application/octet-stream")
20+ return open_now (uri, content_type, widget, next_step);
21
22 var download = new WebKit.Download (new WebKit.NetworkRequest (uri));
23 download.destination_uri = Midori.Download.prepare_destination_uri (download, null);
24
25=== modified file 'midori/midori-browser.c'
26--- midori/midori-browser.c 2015-04-28 22:01:05 +0000
27+++ midori/midori-browser.c 2015-05-31 20:32:34 +0000
28@@ -1742,7 +1742,7 @@
29 return;
30 }
31
32- if (midori_view_forward_external (new_view,
33+ if (midori_view_forward_external (view,
34 katze_item_get_uri (midori_view_get_proxy_item (MIDORI_VIEW (new_view))),
35 where))
36 return;
37
38=== modified file 'midori/midori-frontend.c'
39--- midori/midori-frontend.c 2015-03-23 11:33:24 +0000
40+++ midori/midori-frontend.c 2015-05-31 20:32:34 +0000
41@@ -120,6 +120,9 @@
42 midori_browser_activate_action (browser, execute_commands[i]);
43 }
44 midori_session_persistent_settings (settings, NULL);
45+ /* FIXME need proper stock extension mechanism */
46+ midori_browser_activate_action (browser, "libopen-with." G_MODULE_SUFFIX "=true");
47+ g_assert (g_module_error () == NULL);
48 return browser;
49 }
50

Subscribers

People subscribed via source and target branches

to all changes: