Merge lp:~midori/midori/adblock_openwith into lp:midori

Proposed by Paweł Forysiuk
Status: Merged
Approved by: Cris Dywan
Approved revision: 6999
Merged at revision: 7002
Proposed branch: lp:~midori/midori/adblock_openwith
Merge into: lp:midori
Diff against target: 18 lines (+5/-0)
1 file modified
extensions/open-with.vala (+5/-0)
To merge this branch: bzr merge lp:~midori/midori/adblock_openwith
Reviewer Review Type Date Requested Status
Cris Dywan Approve
Review via email: mp+264891@code.launchpad.net

Commit message

Skip open-with codepath with abp links, they are internal

To post a comment you must log in.
lp:~midori/midori/adblock_openwith updated
6998. By Paweł Forysiuk <email address hidden>

Fix typo and styling issue

6999. By Paweł Forysiuk <email address hidden>

Reword a comment a bit, re-adjust code style once more

Revision history for this message
Cris Dywan (kalikiana) wrote :

Makes sense, if a little bit awkward. I don't think we can do much better without investigating a new API.

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-06-12 21:03:40 +0000
3+++ extensions/open-with.vala 2015-07-18 05:56:22 +0000
4@@ -627,9 +627,14 @@
5 }
6
7 bool navigation_requested (Midori.Tab tab, string uri) {
8+ /* FIXME: Make this a list of known/internal uris to pass-thru */
9 if (uri.has_prefix ("file://") || Midori.URI.is_http (uri) || Midori.URI.is_blank (uri))
10 return false;
11
12+ /* Don't find app for abp links, we should handle them internally */
13+ if (uri.has_prefix("abp:"))
14+ return true;
15+
16 string content_type = get_content_type (uri, null);
17 open_with_type (uri, content_type, tab, NextStep.TRY_OPEN);
18 return true;

Subscribers

People subscribed via source and target branches

to all changes: