Blame SOURCES/evolution-2.30.1-help-contents.patch

4b6d7b
diff -up evolution-3.12.11/addressbook/gui/contact-editor/e-contact-editor.c.help-contents evolution-3.12.11/addressbook/gui/contact-editor/e-contact-editor.c
4b6d7b
--- evolution-3.12.11/addressbook/gui/contact-editor/e-contact-editor.c.help-contents	2014-09-02 10:21:25.000000000 +0200
4b6d7b
+++ evolution-3.12.11/addressbook/gui/contact-editor/e-contact-editor.c	2015-05-04 16:57:36.707723419 +0200
4b6d7b
@@ -4302,6 +4302,11 @@ e_contact_editor_init (EContactEditor *e
79117e
 	g_signal_connect (
79117e
 		widget, "clicked",
79117e
 		G_CALLBACK (show_help_cb), e_contact_editor);
79117e
+	if (!e_misc_utils_is_help_package_installed ()) {
79117e
+		gtk_widget_set_sensitive (widget, FALSE);
79117e
+		gtk_widget_hide (widget);
79117e
+	}
79117e
+
79117e
 	widget = e_builder_get_widget (
4b6d7b
 		e_contact_editor->priv->builder, "button-web-expand");
79117e
 	g_signal_connect_swapped (
4b6d7b
diff -up evolution-3.12.11/calendar/gui/dialogs/comp-editor.c.help-contents evolution-3.12.11/calendar/gui/dialogs/comp-editor.c
4b6d7b
--- evolution-3.12.11/calendar/gui/dialogs/comp-editor.c.help-contents	2014-04-23 14:36:23.000000000 +0200
4b6d7b
+++ evolution-3.12.11/calendar/gui/dialogs/comp-editor.c	2015-05-04 16:57:36.708723419 +0200
4b6d7b
@@ -2168,6 +2168,12 @@ comp_editor_init (CompEditor *editor)
79117e
 			G_BINDING_SYNC_CREATE);
79117e
 	}
79117e
 
79117e
+	action = gtk_action_group_get_action (action_group, "help");
79117e
+	if (action && !e_misc_utils_is_help_package_installed ()) {
79117e
+		gtk_action_set_visible (action, FALSE);
79117e
+		gtk_action_set_sensitive (action, FALSE);
79117e
+	}
79117e
+
79117e
 	action_group = gtk_action_group_new ("individual");
79117e
 	gtk_action_group_set_translation_domain (
79117e
 		action_group, GETTEXT_PACKAGE);
4b6d7b
diff -up evolution-3.12.11/e-util/e-misc-utils.c.help-contents evolution-3.12.11/e-util/e-misc-utils.c
4b6d7b
--- evolution-3.12.11/e-util/e-misc-utils.c.help-contents	2015-01-06 15:05:43.000000000 +0100
4b6d7b
+++ evolution-3.12.11/e-util/e-misc-utils.c	2015-05-04 16:57:36.708723419 +0200
4b6d7b
@@ -2402,6 +2402,23 @@ e_binding_transform_uid_to_source (GBind
79117e
 	return success;
79117e
 }
4b6d7b
 
79117e
+gboolean
79117e
+e_misc_utils_is_help_package_installed (void)
79117e
+{
79117e
+	gboolean is_installed;
79117e
+	gchar *path;
79117e
+
79117e
+	/* Viewing user documentation requires the evolution-help
79117e
+	 * package. Look for one of the files it installs. */
79117e
+	path = g_build_filename (EVOLUTION_DATADIR, "help", "C", PACKAGE, "index.page", NULL);
79117e
+
79117e
+	is_installed = g_file_test (path, G_FILE_TEST_IS_REGULAR);
79117e
+
79117e
+	g_free (path);
79117e
+
79117e
+	return is_installed;
79117e
+}
4b6d7b
+
4b6d7b
 /**
4b6d7b
  * e_binding_transform_text_non_null:
4b6d7b
  * @binding: a #GBinding
4b6d7b
diff -up evolution-3.12.11/e-util/e-misc-utils.h.help-contents evolution-3.12.11/e-util/e-misc-utils.h
4b6d7b
--- evolution-3.12.11/e-util/e-misc-utils.h.help-contents	2015-01-06 15:05:43.000000000 +0100
4b6d7b
+++ evolution-3.12.11/e-util/e-misc-utils.h	2015-05-04 16:57:36.708723419 +0200
4b6d7b
@@ -213,6 +213,8 @@ gboolean	e_binding_transform_uid_to_sour
79117e
 						 GValue *target_value,
79117e
 						 ESourceRegistry *registry);
79117e
 
79117e
+gboolean	e_misc_utils_is_help_package_installed (void);
79117e
+
4b6d7b
 gboolean	e_binding_transform_text_non_null
4b6d7b
 						(GBinding *binding,
4b6d7b
 						 const GValue *source_value,
4b6d7b
diff -up evolution-3.12.11/e-util/e-preferences-window.c.help-contents evolution-3.12.11/e-util/e-preferences-window.c
4b6d7b
--- evolution-3.12.11/e-util/e-preferences-window.c.help-contents	2014-03-24 10:25:23.000000000 +0100
4b6d7b
+++ evolution-3.12.11/e-util/e-preferences-window.c	2015-05-04 16:57:36.709723419 +0200
79117e
@@ -385,6 +385,11 @@ e_preferences_window_init (EPreferencesW
79117e
 		GTK_BUTTON_BOX (container), widget, TRUE);
79117e
 	gtk_widget_show (widget);
79117e
 
79117e
+	if (!e_misc_utils_is_help_package_installed ()) {
79117e
+		gtk_widget_set_sensitive (widget, FALSE);
79117e
+		gtk_widget_hide (widget);
79117e
+	}
79117e
+
4b6d7b
 	widget = e_dialog_button_new_with_icon ("window-close", _("_Close"));
79117e
 	g_signal_connect_swapped (
79117e
 		widget, "clicked",
4b6d7b
diff -up evolution-3.12.11/e-util/e-send-options.c.help-contents evolution-3.12.11/e-util/e-send-options.c
4b6d7b
--- evolution-3.12.11/e-util/e-send-options.c.help-contents	2014-04-23 14:36:24.000000000 +0200
4b6d7b
+++ evolution-3.12.11/e-util/e-send-options.c	2015-05-04 16:57:36.709723419 +0200
4b6d7b
@@ -439,6 +439,7 @@ get_widgets (ESendOptionsDialog *sod)
79117e
 {
79117e
 	ESendOptionsDialogPrivate *priv;
79117e
 	GtkBuilder *builder;
79117e
+	GtkWidget *helpbutton;
79117e
 
79117e
 	priv = sod->priv;
79117e
 	builder = sod->priv->builder;
4b6d7b
@@ -478,6 +479,12 @@ get_widgets (ESendOptionsDialog *sod)
79117e
 	priv->accepted_label = e_builder_get_widget (builder, "accepted-label");
79117e
 	priv->completed_label = e_builder_get_widget (builder, "completed-label");
79117e
 
79117e
+	helpbutton = e_builder_get_widget (builder, "helpbutton1");
79117e
+	if (helpbutton && !e_misc_utils_is_help_package_installed ()) {
79117e
+		gtk_widget_set_sensitive (helpbutton, FALSE);
79117e
+		gtk_widget_hide (helpbutton);
79117e
+	}
79117e
+
79117e
 	return (priv->priority
79117e
 		&& priv->security
79117e
 		&& priv->status
4b6d7b
diff -up evolution-3.12.11/plugins/email-custom-header/email-custom-header.c.help-contents evolution-3.12.11/plugins/email-custom-header/email-custom-header.c
4b6d7b
--- evolution-3.12.11/plugins/email-custom-header/email-custom-header.c.help-contents	2014-03-24 10:25:23.000000000 +0100
4b6d7b
+++ evolution-3.12.11/plugins/email-custom-header/email-custom-header.c	2015-05-04 16:57:36.709723419 +0200
4b6d7b
@@ -118,6 +118,8 @@ static gboolean
79117e
 epech_get_widgets (CustomHeaderOptionsDialog *mch)
79117e
 {
79117e
 	CustomHeaderOptionsDialogPrivate *priv;
79117e
+	GtkWidget *helpbutton;
79117e
+
79117e
 	priv = mch->priv;
79117e
 
79117e
 #define EMAIL_CUSTOM_HEADER(name) e_builder_get_widget (priv->builder, name)
4b6d7b
@@ -128,6 +130,13 @@ epech_get_widgets (CustomHeaderOptionsDi
79117e
 
4b6d7b
 	priv->page = EMAIL_CUSTOM_HEADER ("email-custom-header-vbox");
79117e
 	priv->header_table = EMAIL_CUSTOM_HEADER ("email-custom-header-options");
79117e
+
79117e
+	helpbutton = EMAIL_CUSTOM_HEADER ("helpbutton1");
79117e
+	if (helpbutton && !e_misc_utils_is_help_package_installed ()) {
79117e
+		gtk_widget_set_sensitive (helpbutton, FALSE);
79117e
+		gtk_widget_hide (helpbutton);
79117e
+	}
79117e
+
79117e
 #undef EMAIL_CUSTOM_HEADER
79117e
 
79117e
 	return (priv->page
4b6d7b
diff -up evolution-3.12.11/shell/e-shell-window-actions.c.help-contents evolution-3.12.11/shell/e-shell-window-actions.c
4b6d7b
--- evolution-3.12.11/shell/e-shell-window-actions.c.help-contents	2014-10-23 15:21:26.000000000 +0200
4b6d7b
+++ evolution-3.12.11/shell/e-shell-window-actions.c	2015-05-04 16:57:36.709723419 +0200
4b6d7b
@@ -1457,6 +1457,11 @@ e_shell_window_actions_init (EShellWindo
c72ca9
 	if (path == NULL)
c72ca9
 		gtk_action_set_visible (ACTION (SUBMIT_BUG), FALSE);
c72ca9
 	g_free (path);
c72ca9
+
79117e
+	if (!e_misc_utils_is_help_package_installed ()) {
c72ca9
+		gtk_action_set_visible (ACTION (CONTENTS), FALSE);
c72ca9
+		gtk_action_set_sensitive (ACTION (CONTENTS), FALSE);
c72ca9
+	}
c72ca9
 }
c72ca9
 
4b6d7b
 GtkWidget *