Commit 1fe2636a authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

plug-ins/help/domain.c plug-ins/help/gimp-help-lookup.c if the help files

2004-12-05  Sven Neumann  <sven@gimp.org>

	* plug-ins/help/domain.c
	* plug-ins/help/gimp-help-lookup.c
	* plug-ins/help/help.[ch]: if the help files are not installed,
	uninstall the temporary procedure and quit. Fixes bug #160258.
parent 92b0e87f
2004-12-05 Sven Neumann <sven@gimp.org>
* plug-ins/help/domain.c
* plug-ins/help/gimp-help-lookup.c
* plug-ins/help/help.[ch]: if the help files are not installed,
uninstall the temporary procedure and quit. Fixes bug #160258.
2004-12-05 Sven Neumann <sven@gimp.org>
* plug-ins/common/lic.c: applied patch from Joao S. O. Bueno that
......
......@@ -182,6 +182,8 @@ domain_map (HelpDomain *domain,
_("Please check your installation."));
g_error_free (error);
help_exit ();
}
else
{
......
......@@ -140,6 +140,12 @@ main (gint argc,
return uri ? EXIT_SUCCESS : EXIT_FAILURE;
}
void
help_exit (void)
{
/* nothing */
}
static gchar *
lookup (const gchar *help_domain,
const gchar *help_locales,
......
......@@ -182,6 +182,8 @@ domain_map (HelpDomain *domain,
_("Please check your installation."));
g_error_free (error);
help_exit ();
}
else
{
......
......@@ -182,6 +182,8 @@ domain_map (HelpDomain *domain,
_("Please check your installation."));
g_error_free (error);
help_exit ();
}
else
{
......
......@@ -182,6 +182,8 @@ domain_map (HelpDomain *domain,
_("Please check your installation."));
g_error_free (error);
help_exit ();
}
else
{
......
......@@ -76,6 +76,8 @@ static gboolean load_help_idle (gpointer data);
/* local variables */
static GMainLoop *main_loop = NULL;
GimpPlugInInfo PLUG_IN_INFO =
{
NULL, /* init_proc */
......@@ -87,6 +89,14 @@ GimpPlugInInfo PLUG_IN_INFO =
MAIN ()
void
help_exit (void)
{
if (main_loop)
g_main_loop_quit (main_loop);
}
static void
query (void)
{
......@@ -182,16 +192,19 @@ run (const gchar *name,
if (status == GIMP_PDB_SUCCESS)
{
GMainLoop *loop = g_main_loop_new (NULL, FALSE);
main_loop = g_main_loop_new (NULL, FALSE);
temp_proc_install ();
gimp_extension_ack ();
gimp_extension_enable ();
g_main_loop_run (loop);
g_main_loop_run (main_loop);
g_main_loop_unref (main_loop);
main_loop = NULL;
g_main_loop_unref (loop);
gimp_uninstall_temp_proc (GIMP_HELP_TEMP_EXT_NAME);
}
values[0].type = GIMP_PDB_STATUS;
......@@ -292,11 +305,9 @@ load_help (const gchar *procedure,
static gboolean
load_help_idle (gpointer data)
{
IdleHelp *idle_help;
IdleHelp *idle_help = data;
HelpDomain *domain;
idle_help = (IdleHelp *) data;
domain = domain_lookup (idle_help->help_domain);
if (domain)
......
......@@ -32,8 +32,10 @@
#define GIMP_HELP_PREFIX "help"
#define GIMP_HELP_ENV_URI "GIMP2_HELP_URI"
/* #define GIMP_HELP_DEBUG */
void help_exit (void);
#endif /* ! __HELP_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment