|
|
86b3b9 |
--- evince-3.8.3/shell/ev-window.c
|
|
|
86b3b9 |
+++ evince-3.8.3/shell/ev-window.c
|
|
|
86b3b9 |
@@ -228,6 +228,9 @@ struct _EvWindowPrivate {
|
|
|
86b3b9 |
#endif
|
|
|
86b3b9 |
|
|
|
86b3b9 |
guint presentation_mode_inhibit_id;
|
|
|
86b3b9 |
+
|
|
|
86b3b9 |
+ /* Send to */
|
|
|
86b3b9 |
+ gboolean has_mailto_handler;
|
|
|
86b3b9 |
};
|
|
|
86b3b9 |
|
|
|
86b3b9 |
#define EV_WINDOW_GET_PRIVATE(object) \
|
|
|
86b3b9 |
@@ -456,7 +459,8 @@ ev_window_setup_action_sensitivity (EvWi
|
|
|
86b3b9 |
ev_window_set_action_sensitive (ev_window, "FilePrint", has_pages && ok_to_print);
|
|
|
86b3b9 |
ev_window_set_action_sensitive (ev_window, "FileProperties", has_document && has_properties);
|
|
|
86b3b9 |
ev_window_set_action_sensitive (ev_window, "FileOpenContainingFolder", has_document);
|
|
|
86b3b9 |
- ev_window_set_action_sensitive (ev_window, "FileSendTo", has_document);
|
|
|
86b3b9 |
+ ev_window_set_action_sensitive (ev_window, "FileSendTo",
|
|
|
86b3b9 |
+ has_document && ev_window->priv->has_mailto_handler);
|
|
|
86b3b9 |
ev_window_set_action_sensitive (ev_window, "ViewPresentation", has_document);
|
|
|
86b3b9 |
|
|
|
86b3b9 |
/* Edit menu */
|
|
|
86b3b9 |
@@ -7025,6 +7029,7 @@ ev_window_init (EvWindow *ev_window)
|
|
|
86b3b9 |
GDBusConnection *connection;
|
|
|
86b3b9 |
static gint window_id = 0;
|
|
|
86b3b9 |
#endif
|
|
|
86b3b9 |
+ GAppInfo *app_info;
|
|
|
86b3b9 |
|
|
|
86b3b9 |
g_signal_connect (ev_window, "configure_event",
|
|
|
86b3b9 |
G_CALLBACK (window_configure_event_cb), NULL);
|
|
|
86b3b9 |
@@ -7075,6 +7080,10 @@ ev_window_init (EvWindow *ev_window)
|
|
|
86b3b9 |
G_CALLBACK (activate_link_cb),
|
|
|
86b3b9 |
ev_window);
|
|
|
86b3b9 |
|
|
|
86b3b9 |
+ app_info = g_app_info_get_default_for_uri_scheme ("mailto");
|
|
|
86b3b9 |
+ ev_window->priv->has_mailto_handler = app_info != NULL;
|
|
|
86b3b9 |
+ g_clear_object (&app_info);
|
|
|
86b3b9 |
+
|
|
|
86b3b9 |
ev_window->priv->main_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
|
|
86b3b9 |
gtk_container_add (GTK_CONTAINER (ev_window), ev_window->priv->main_box);
|
|
|
86b3b9 |
gtk_widget_show (ev_window->priv->main_box);
|