Commit b071dce3 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

connect to changes of the "user-manual-online" gimprc property and kill

2009-02-26  Sven Neumann  <sven@gimp.org>

	* app/gui/gui.c (gui_restore_callback): connect to changes of 
the
	"user-manual-online" gimprc property and kill the gimp-help
	plug-in as it caches the location of the help pages.

	* app/widgets/gimphelp.[ch]: added 
gimp_help_user_manual_changed()
	for this purpose.


svn path=/trunk/; revision=28073
parent c367ce33
2009-02-26 Sven Neumann <sven@gimp.org>
* app/gui/gui.c (gui_restore_callback): connect to changes of the
"user-manual-online" gimprc property and kill the gimp-help
plug-in as it caches the location of the help pages.
2009-02-25 Sven Neumann <sven@gimp.org>
* plug-ins/common/file-pcx.c: sprinkled with const qualifiers.
......
......@@ -111,6 +111,9 @@ static void gui_show_tooltips_notify (GimpGuiConfig *gui_config,
static void gui_show_help_button_notify (GimpGuiConfig *gui_config,
GParamSpec *pspec,
Gimp *gimp);
static void gui_user_manual_notify (GimpGuiConfig *gui_config,
GParamSpec *pspec,
Gimp *gimp);
static void gui_tearoff_menus_notify (GimpGuiConfig *gui_config,
GParamSpec *pspec,
GtkUIManager *manager);
......@@ -368,6 +371,9 @@ gui_restore_callback (Gimp *gimp,
g_signal_connect (gui_config, "notify::use-help",
G_CALLBACK (gui_show_help_button_notify),
gimp);
g_signal_connect (gui_config, "notify::user-manual-online",
G_CALLBACK (gui_user_manual_notify),
gimp);
g_signal_connect (gui_config, "notify::show-help-button",
G_CALLBACK (gui_show_help_button_notify),
gimp);
......@@ -586,6 +592,9 @@ gui_exit_after_callback (Gimp *gimp,
g_signal_handlers_disconnect_by_func (gimp->config,
gui_show_help_button_notify,
gimp);
g_signal_handlers_disconnect_by_func (gimp->config,
gui_user_manual_notify,
gimp);
g_signal_handlers_disconnect_by_func (gimp->config,
gui_show_tooltips_notify,
gimp);
......@@ -635,6 +644,14 @@ gui_show_help_button_notify (GimpGuiConfig *gui_config,
gui_config->show_help_button);
}
static void
gui_user_manual_notify (GimpGuiConfig *gui_config,
GParamSpec *param_spec,
Gimp *gimp)
{
gimp_help_user_manual_changed (gimp);
}
static void
gui_tearoff_menus_notify (GimpGuiConfig *gui_config,
GParamSpec *pspec,
......
......@@ -40,7 +40,9 @@
#include "pdb/gimppdb.h"
#include "pdb/gimpprocedure.h"
#include "plug-in/gimpplugin.h"
#include "plug-in/gimppluginmanager-help-domain.h"
#include "plug-in/gimptemporaryprocedure.h"
#include "gimphelp.h"
#include "gimphelp-ids.h"
......@@ -186,6 +188,22 @@ gimp_help_user_manual_is_installed (Gimp *gimp)
return found;
}
void
gimp_help_user_manual_changed (Gimp *gimp)
{
GimpProcedure *procedure;
g_return_if_fail (GIMP_IS_GIMP (gimp));
/* Check if a help parser is running */
procedure = gimp_pdb_lookup_procedure (gimp->pdb, "extension-gimp-help-temp");
if (GIMP_IS_TEMPORARY_PROCEDURE (procedure))
{
gimp_plug_in_close (GIMP_TEMPORARY_PROCEDURE (procedure)->plug_in, TRUE);
}
}
/* private functions */
......
......@@ -36,5 +36,10 @@ void gimp_help_show (Gimp *gimp,
*/
gboolean gimp_help_user_manual_is_installed (Gimp *gimp);
/* the configuration changed with respect to the location
* of the user manual, invalidate the cached information
*/
void gimp_help_user_manual_changed (Gimp *gimp);
#endif /* __GIMP_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