Support mailto: by passing it to gtk_show_uri or Exo
This commit is contained in:
parent
e6ea06afd3
commit
73b26c53f9
2 changed files with 12 additions and 2 deletions
|
@ -1803,6 +1803,16 @@ midori_view_set_uri (MidoriView* view,
|
||||||
{
|
{
|
||||||
midori_view_execute_script (view, &uri[11], NULL);
|
midori_view_execute_script (view, &uri[11], NULL);
|
||||||
}
|
}
|
||||||
|
else if (g_str_has_prefix (uri, "mailto:"))
|
||||||
|
{
|
||||||
|
if (!gtk_show_uri (NULL, uri, GDK_CURRENT_TIME, NULL))
|
||||||
|
{
|
||||||
|
/* Fallback to Exo for example if GConf isn't setup */
|
||||||
|
gchar* command = g_strconcat ("exo-open ", uri, NULL);
|
||||||
|
g_spawn_command_line_async (command, NULL);
|
||||||
|
g_free (command);
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
katze_assign (view->uri, g_strdup (uri));
|
katze_assign (view->uri, g_strdup (uri));
|
||||||
|
|
|
@ -220,8 +220,8 @@ sokoke_magic_uri (const gchar* uri,
|
||||||
g_return_val_if_fail (!search_engines ||
|
g_return_val_if_fail (!search_engines ||
|
||||||
katze_array_is_a (search_engines, KATZE_TYPE_ITEM), NULL);
|
katze_array_is_a (search_engines, KATZE_TYPE_ITEM), NULL);
|
||||||
|
|
||||||
/* Just return if it's a javascript: uri */
|
/* Just return if it's a javascript: or mailto: uri */
|
||||||
if (g_str_has_prefix (uri, "javascript:"))
|
if (g_str_has_prefix (uri, "javascript:") || g_str_has_prefix (uri, "mailto:"))
|
||||||
return g_strdup (uri);
|
return g_strdup (uri);
|
||||||
/* Add file:// if we have a local path */
|
/* Add file:// if we have a local path */
|
||||||
if (g_path_is_absolute (uri))
|
if (g_path_is_absolute (uri))
|
||||||
|
|
Loading…
Reference in a new issue