Modify error messages shown when help files cannot be opened. For the main

2004-01-15  Dave Neary  <bolsh@gimp.org>

        * plug-ins/helpbrowser/domain.c: Modify error messages shown when
	help files cannot be opened. For the main GIMP help domain, the
        error message is now "Failed to open help files:\nTheGIMP help files
        are not installed." and in the general case "Failed to open help
        files:\nThe requested help file %s could not be opened.\nPlease check
        your installation." This fixes bug #128112.
This commit is contained in:
Dave Neary 2004-01-15 12:51:28 +00:00 committed by David Neary
parent 2d775c663f
commit 955de22e46
2 changed files with 23 additions and 5 deletions

View file

@ -1,3 +1,12 @@
2004-01-15 Dave Neary <bolsh@gimp.org>
* plug-ins/helpbrowser/domain.c: Modify error messages shown when
help files cannot be opened. For the main GIMP help domain, the
error message is now "Failed to open help files:\nTheGIMP help files
are not installed." and in the general case "Failed to open help
files:\nThe requested help file %s could not be opened.\nPlease check
your installation." This fixes bug #128112.
2004-01-15 Sven Neumann <sven@gimp.org>
* data/misc/Makefile.am: added a "validate" rule that attempts to

View file

@ -106,9 +106,9 @@ domain_map (HelpDomain *domain,
if (! domain_parse (domain, &error) || error)
{
if (! domain->help_id_mapping)
g_message ("Failed to open help domain:\n\n%s", error->message);
g_message ("Failed to open help files:\n%s", error->message);
else
g_message ("Parse error in help domain:\n\n%s\n\n"
g_message ("Parse error in help domain:\n%s\n\n"
"(Added entires before error anyway)", error->message);
if (error)
@ -241,9 +241,18 @@ domain_parse (HelpDomain *domain,
fp = fopen (filename, "r");
if (! fp)
{
g_set_error (error, 0, 0,
"Could not open gimp-help.xml mapping file from '%s': %s",
domain->help_uri, g_strerror (errno));
if (strcmp (domain->help_uri,
"file:///usr/local/share/gimp/1.3/help") == 0)
{
g_set_error (error, 0, 0,
"The GIMP help files are not installed.");
}
else
{
g_set_error (error, 0, 0,
"The requested help file %s could not be opened.\n"
"Please check your installation.", filename);
}
g_free (filename);
return FALSE;
}