Skip to content

Commit

Permalink
[contentaction] Switch x-maemo-urischeme to linux desktop x-scheme-ha…
Browse files Browse the repository at this point in the history
…ndler. Contributes to JB#41792
  • Loading branch information
pvuorela committed May 2, 2018
1 parent 8a7ddba commit 961ee6e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/doc.h
Expand Up @@ -24,7 +24,7 @@ Actions can target one of the following:
-# MIME types (\c image/jpeg)
-# Tracker-query based conditions (\c x-maemo-nepomuk/contact)
-# regular expressions (\c x-maemo-highlight/phonenumber)
-# URI schemes (\c x-maemo-urischeme/mailto)
-# URI schemes (\c x-scheme-handler/mailto)
\section detaileddescription Detailed description
Expand Down Expand Up @@ -242,8 +242,8 @@ More information:
The libcontentaction library is also able to dispatch URIs based on the scheme
(ContentAction::Action::actionsForScheme). To this end, applications can
define that they handle a custom MIME type, for example,
\c x-maemo-urischeme/http. When actionsForScheme("http://www.example.com") is
called, applications declaring \c x-maemo-urischeme/http appear in the list of
\c x-scheme-handler/http. When actionsForScheme("http://www.example.com") is
called, applications declaring \c x-scheme-handler/http appear in the list of
applicable actions. When launched, an action gets the string
"http://www.example.com" as a parameter.
Expand Down Expand Up @@ -298,7 +298,7 @@ MimeType=x-maemo-nepomuk/contact;
;; 3. pre-defined regexps for the highlighter
MimeType=x-maemo-highlight/phonenumber;
;; 4. URI schemes
MimeType=x-maemo-urischeme/mailto;
MimeType=x-scheme-handler/mailto;
;; Defining how to trigger the action:
;; 1. invoke a MApplication based program by calling
Expand Down
6 changes: 3 additions & 3 deletions src/mime.cpp
Expand Up @@ -134,7 +134,7 @@ namespace ContentAction {

using namespace ContentAction::Internal;

const QString UriSchemeMimeClass("x-maemo-urischeme/");
const QString UriSchemeMimeClass("x-scheme-handler/");

static const QString DesktopFileMimeType("application/x-desktop");

Expand Down Expand Up @@ -553,8 +553,8 @@ Action Action::defaultActionForScheme(const QString& uri)

/// Returns all actions handling the scheme of the given \a uri. The uri
/// scheme is mapped to mime types by prefixing it with \c
/// "x-maemo-urischeme/". For example an email client may declare to handle
/// the \c "x-maemo-urischeme/mailto" mimetype and a browser then just
/// "x-scheme-handler/". For example an email client may declare to handle
/// the \c "x-scheme-handler/mailto" mimetype and a browser then just
/// triggers the returned Action to activate a \c mailto: link.
QList<Action> Action::actionsForScheme(const QString& uri)
{
Expand Down
2 changes: 1 addition & 1 deletion tests/applications/emailer.desktop
Expand Up @@ -5,4 +5,4 @@ Exec=echo "emailer with params:" %U
Terminal=false
Type=Application
NotShowIn=X-MeeGo;
MimeType=x-maemo-highlight/email;x-maemo-urischeme/mailto;
MimeType=x-maemo-highlight/email;x-scheme-handler/mailto;
2 changes: 1 addition & 1 deletion tests/applications/mimeinfo.cache
Expand Up @@ -8,7 +8,7 @@ text/plain=uberexec.desktop;ubermeego.desktop;ubermimeopen.desktop;unterexec.des
audio/mpeg=complexmusic.desktop
audio/*=plainmusicplayer.desktop
x-maemo-nepomuk/music-piece=complexmusic.desktop
x-maemo-urischeme/mailto=emailer.desktop
x-scheme-handler/mailto=emailer.desktop
x-maemo-highlight/email-address=emailer.desktop;
x-maemo-highlight/http-url=browser.desktop;
x-maemo-highlight/ftp-url=browser.desktop;
Expand Down

0 comments on commit 961ee6e

Please sign in to comment.