Milan Crha bd4d13
diff -up evolution-3.12.1/addressbook/gui/contact-editor/e-contact-editor.c.help-contents evolution-3.12.1/addressbook/gui/contact-editor/e-contact-editor.c
Milan Crha bd4d13
--- evolution-3.12.1/addressbook/gui/contact-editor/e-contact-editor.c.help-contents	2014-04-13 16:33:29.000000000 +0200
Milan Crha bd4d13
+++ evolution-3.12.1/addressbook/gui/contact-editor/e-contact-editor.c	2014-04-14 11:15:36.606320997 +0200
Milan Crha 00c8f5
@@ -4281,6 +4281,11 @@ e_contact_editor_init (EContactEditor *e
Milan Crha 15ce82
 	g_signal_connect (
Milan Crha 15ce82
 		widget, "clicked",
Milan Crha 15ce82
 		G_CALLBACK (show_help_cb), e_contact_editor);
Milan Crha 15ce82
+	if (!e_misc_utils_is_help_package_installed ()) {
Milan Crha 15ce82
+		gtk_widget_set_sensitive (widget, FALSE);
Milan Crha 15ce82
+		gtk_widget_hide (widget);
Milan Crha 15ce82
+	}
Milan Crha 15ce82
+
Milan Crha 15ce82
 	widget = e_builder_get_widget (
Milan Crha 321ca3
 		e_contact_editor->priv->builder, "button-web-expand");
Milan Crha 15ce82
 	g_signal_connect_swapped (
Milan Crha bd4d13
diff -up evolution-3.12.1/calendar/gui/dialogs/comp-editor.c.help-contents evolution-3.12.1/calendar/gui/dialogs/comp-editor.c
Milan Crha bd4d13
--- evolution-3.12.1/calendar/gui/dialogs/comp-editor.c.help-contents	2014-04-13 16:33:29.000000000 +0200
Milan Crha bd4d13
+++ evolution-3.12.1/calendar/gui/dialogs/comp-editor.c	2014-04-14 11:15:36.606320997 +0200
Milan Crha c0178d
@@ -2168,6 +2168,12 @@ comp_editor_init (CompEditor *editor)
Milan Crha 15ce82
 			G_BINDING_SYNC_CREATE);
Milan Crha 15ce82
 	}
Milan Crha 15ce82
 
Milan Crha 15ce82
+	action = gtk_action_group_get_action (action_group, "help");
Milan Crha 15ce82
+	if (action && !e_misc_utils_is_help_package_installed ()) {
Milan Crha 15ce82
+		gtk_action_set_visible (action, FALSE);
Milan Crha 15ce82
+		gtk_action_set_sensitive (action, FALSE);
Milan Crha 15ce82
+	}
Milan Crha 15ce82
+
Milan Crha 15ce82
 	action_group = gtk_action_group_new ("individual");
Milan Crha 15ce82
 	gtk_action_group_set_translation_domain (
Milan Crha 15ce82
 		action_group, GETTEXT_PACKAGE);
Milan Crha bd4d13
diff -up evolution-3.12.1/e-util/e-misc-utils.c.help-contents evolution-3.12.1/e-util/e-misc-utils.c
Milan Crha bd4d13
--- evolution-3.12.1/e-util/e-misc-utils.c.help-contents	2014-04-14 11:15:36.606320997 +0200
Milan Crha bd4d13
+++ evolution-3.12.1/e-util/e-misc-utils.c	2014-04-14 11:15:47.698320550 +0200
Milan Crha bd4d13
@@ -2103,6 +2103,23 @@ e_binding_transform_uid_to_source (GBind
Milan Crha 15ce82
 	return success;
Milan Crha 15ce82
 }
Milan Crha bd4d13
 
Milan Crha 15ce82
+gboolean
Milan Crha 15ce82
+e_misc_utils_is_help_package_installed (void)
Milan Crha 15ce82
+{
Milan Crha 15ce82
+	gboolean is_installed;
Milan Crha 15ce82
+	gchar *path;
Milan Crha 15ce82
+
Milan Crha 15ce82
+	/* Viewing user documentation requires the evolution-help
Milan Crha 15ce82
+	 * package. Look for one of the files it installs. */
Milan Crha 15ce82
+	path = g_build_filename (EVOLUTION_DATADIR, "help", "C", PACKAGE, "index.page", NULL);
Milan Crha 15ce82
+
Milan Crha 15ce82
+	is_installed = g_file_test (path, G_FILE_TEST_IS_REGULAR);
Milan Crha 15ce82
+
Milan Crha 15ce82
+	g_free (path);
Milan Crha 15ce82
+
Milan Crha 15ce82
+	return is_installed;
Milan Crha 15ce82
+}
Milan Crha bd4d13
+
Milan Crha bd4d13
 /**
Milan Crha bd4d13
  * e_binding_transform_text_non_null:
Milan Crha bd4d13
  * @binding: a #GBinding
Milan Crha bd4d13
diff -up evolution-3.12.1/e-util/e-misc-utils.h.help-contents evolution-3.12.1/e-util/e-misc-utils.h
Milan Crha bd4d13
--- evolution-3.12.1/e-util/e-misc-utils.h.help-contents	2014-04-14 11:15:36.607320997 +0200
Milan Crha bd4d13
+++ evolution-3.12.1/e-util/e-misc-utils.h	2014-04-14 11:16:06.930319775 +0200
Milan Crha 321ca3
@@ -184,6 +184,8 @@ gboolean	e_binding_transform_uid_to_sour
Milan Crha 15ce82
 						 GValue *target_value,
Milan Crha 15ce82
 						 ESourceRegistry *registry);
Milan Crha 15ce82
 
Milan Crha 15ce82
+gboolean	e_misc_utils_is_help_package_installed (void);
Milan Crha 15ce82
+
Milan Crha bd4d13
 gboolean	e_binding_transform_text_non_null
Milan Crha bd4d13
 						(GBinding *binding,
Milan Crha bd4d13
 						 const GValue *source_value,
Milan Crha bd4d13
diff -up evolution-3.12.1/e-util/e-preferences-window.c.help-contents evolution-3.12.1/e-util/e-preferences-window.c
Milan Crha bd4d13
--- evolution-3.12.1/e-util/e-preferences-window.c.help-contents	2014-03-23 02:13:17.000000000 +0100
Milan Crha bd4d13
+++ evolution-3.12.1/e-util/e-preferences-window.c	2014-04-14 11:15:36.607320997 +0200
Milan Crha 00c8f5
@@ -385,6 +385,11 @@ e_preferences_window_init (EPreferencesW
Milan Crha 15ce82
 		GTK_BUTTON_BOX (container), widget, TRUE);
Milan Crha 15ce82
 	gtk_widget_show (widget);
Milan Crha 15ce82
 
Milan Crha 15ce82
+	if (!e_misc_utils_is_help_package_installed ()) {
Milan Crha 15ce82
+		gtk_widget_set_sensitive (widget, FALSE);
Milan Crha 15ce82
+		gtk_widget_hide (widget);
Milan Crha 15ce82
+	}
Milan Crha 15ce82
+
Milan Crha 00c8f5
 	widget = e_dialog_button_new_with_icon ("window-close", _("_Close"));
Milan Crha 15ce82
 	g_signal_connect_swapped (
Milan Crha 15ce82
 		widget, "clicked",
Milan Crha bd4d13
diff -up evolution-3.12.1/e-util/e-send-options.c.help-contents evolution-3.12.1/e-util/e-send-options.c
Milan Crha bd4d13
--- evolution-3.12.1/e-util/e-send-options.c.help-contents	2014-04-13 16:33:29.000000000 +0200
Milan Crha bd4d13
+++ evolution-3.12.1/e-util/e-send-options.c	2014-04-14 11:15:36.607320997 +0200
Milan Crha 321ca3
@@ -439,6 +439,7 @@ get_widgets (ESendOptionsDialog *sod)
Milan Crha 15ce82
 {
Milan Crha 15ce82
 	ESendOptionsDialogPrivate *priv;
Milan Crha 15ce82
 	GtkBuilder *builder;
Milan Crha 15ce82
+	GtkWidget *helpbutton;
Milan Crha 15ce82
 
Milan Crha 15ce82
 	priv = sod->priv;
Milan Crha 15ce82
 	builder = sod->priv->builder;
Milan Crha 321ca3
@@ -478,6 +479,12 @@ get_widgets (ESendOptionsDialog *sod)
Milan Crha 15ce82
 	priv->accepted_label = e_builder_get_widget (builder, "accepted-label");
Milan Crha 15ce82
 	priv->completed_label = e_builder_get_widget (builder, "completed-label");
Milan Crha 15ce82
 
Milan Crha 15ce82
+	helpbutton = e_builder_get_widget (builder, "helpbutton1");
Milan Crha 15ce82
+	if (helpbutton && !e_misc_utils_is_help_package_installed ()) {
Milan Crha 15ce82
+		gtk_widget_set_sensitive (helpbutton, FALSE);
Milan Crha 15ce82
+		gtk_widget_hide (helpbutton);
Milan Crha 15ce82
+	}
Milan Crha 15ce82
+
Milan Crha 15ce82
 	return (priv->priority
Milan Crha 15ce82
 		&& priv->security
Milan Crha 15ce82
 		&& priv->status
Milan Crha bd4d13
diff -up evolution-3.12.1/plugins/email-custom-header/email-custom-header.c.help-contents evolution-3.12.1/plugins/email-custom-header/email-custom-header.c
Milan Crha bd4d13
--- evolution-3.12.1/plugins/email-custom-header/email-custom-header.c.help-contents	2014-03-23 02:13:18.000000000 +0100
Milan Crha bd4d13
+++ evolution-3.12.1/plugins/email-custom-header/email-custom-header.c	2014-04-14 11:15:36.607320997 +0200
Milan Crha 00c8f5
@@ -118,6 +118,8 @@ static gboolean
Milan Crha 15ce82
 epech_get_widgets (CustomHeaderOptionsDialog *mch)
Milan Crha 15ce82
 {
Milan Crha 15ce82
 	CustomHeaderOptionsDialogPrivate *priv;
Milan Crha 15ce82
+	GtkWidget *helpbutton;
Milan Crha 15ce82
+
Milan Crha 15ce82
 	priv = mch->priv;
Milan Crha 15ce82
 
Milan Crha 15ce82
 #define EMAIL_CUSTOM_HEADER(name) e_builder_get_widget (priv->builder, name)
Milan Crha 00c8f5
@@ -128,6 +130,13 @@ epech_get_widgets (CustomHeaderOptionsDi
Milan Crha 15ce82
 
Milan Crha c0178d
 	priv->page = EMAIL_CUSTOM_HEADER ("email-custom-header-vbox");
Milan Crha 15ce82
 	priv->header_table = EMAIL_CUSTOM_HEADER ("email-custom-header-options");
Milan Crha 15ce82
+
Milan Crha 15ce82
+	helpbutton = EMAIL_CUSTOM_HEADER ("helpbutton1");
Milan Crha 15ce82
+	if (helpbutton && !e_misc_utils_is_help_package_installed ()) {
Milan Crha 15ce82
+		gtk_widget_set_sensitive (helpbutton, FALSE);
Milan Crha 15ce82
+		gtk_widget_hide (helpbutton);
Milan Crha 15ce82
+	}
Milan Crha 15ce82
+
Milan Crha 15ce82
 #undef EMAIL_CUSTOM_HEADER
Milan Crha 15ce82
 
Milan Crha 15ce82
 	return (priv->page
Milan Crha bd4d13
diff -up evolution-3.12.1/shell/e-shell-window-actions.c.help-contents evolution-3.12.1/shell/e-shell-window-actions.c
Milan Crha bd4d13
--- evolution-3.12.1/shell/e-shell-window-actions.c.help-contents	2014-03-23 02:13:19.000000000 +0100
Milan Crha bd4d13
+++ evolution-3.12.1/shell/e-shell-window-actions.c	2014-04-14 11:15:36.607320997 +0200
Milan Crha bd4d13
@@ -1458,6 +1458,11 @@ e_shell_window_actions_init (EShellWindo
Matthew Barnes 96034d
 	if (path == NULL)
Milan Crha 74191a
 		gtk_action_set_visible (ACTION (SUBMIT_BUG), FALSE);
Matthew Barnes 96034d
 	g_free (path);
Matthew Barnes 96034d
+
Milan Crha 15ce82
+	if (!e_misc_utils_is_help_package_installed ()) {
Matthew Barnes 96034d
+		gtk_action_set_visible (ACTION (CONTENTS), FALSE);
Milan Crha d599a2
+		gtk_action_set_sensitive (ACTION (CONTENTS), FALSE);
Milan Crha d599a2
+	}
Matthew Barnes 96034d
 }
Matthew Barnes 96034d
 
Milan Crha 025a61
 GtkWidget *