gimp r28073 - in trunk: . app/gui app/widgets
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r28073 - in trunk: . app/gui app/widgets
- Date: Thu, 26 Feb 2009 22:58:19 +0000 (UTC)
Author: neo
Date: Thu Feb 26 22:58:19 2009
New Revision: 28073
URL: http://svn.gnome.org/viewvc/gimp?rev=28073&view=rev
Log:
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.
Modified:
trunk/ChangeLog
trunk/app/gui/gui.c
trunk/app/widgets/gimphelp.c
trunk/app/widgets/gimphelp.h
Modified: trunk/app/gui/gui.c
==============================================================================
--- trunk/app/gui/gui.c (original)
+++ trunk/app/gui/gui.c Thu Feb 26 22:58:19 2009
@@ -111,6 +111,9 @@
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 @@
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);
@@ -587,6 +593,9 @@
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);
@@ -636,6 +645,14 @@
}
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,
GtkUIManager *manager)
Modified: trunk/app/widgets/gimphelp.c
==============================================================================
--- trunk/app/widgets/gimphelp.c (original)
+++ trunk/app/widgets/gimphelp.c Thu Feb 26 22:58:19 2009
@@ -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 @@
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 */
Modified: trunk/app/widgets/gimphelp.h
==============================================================================
--- trunk/app/widgets/gimphelp.h (original)
+++ trunk/app/widgets/gimphelp.h Thu Feb 26 22:58:19 2009
@@ -36,5 +36,10 @@
*/
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__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]