Commit 837091b5 authored by Plamena Manolova's avatar Plamena Manolova Committed by Cosimo Cecchi

sendto-extension: Check for available mail client

The sendto extension now checks for an available client
supported by nautilus sendto and conditionaly adds the
"Email" option to the file menu list.
parent 034806e4
......@@ -56,6 +56,20 @@ sendto_callback (NautilusMenuItem *item,
g_string_free (cmd, TRUE);
static gboolean
check_available_mailer ()
GAppInfo *app_info;
app_info = g_app_info_get_default_for_uri_scheme ("mailto");
if (app_info) {
g_clear_object (&app_info);
return TRUE;
return FALSE;
static GList *
nautilus_nste_get_file_items (NautilusMenuProvider *provider,
GtkWidget *window,
......@@ -72,6 +86,9 @@ nautilus_nste_get_file_items (NautilusMenuProvider *provider,
if (files == NULL)
return NULL;
if (!check_available_mailer ())
return NULL;
one_item = (files != NULL) && (files->next == NULL);
if (one_item &&
......@@ -161,4 +178,3 @@ nautilus_nste_register_type (GTypeModule *module)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment