gimp r28147 - in branches/gimp-2-6: . app/gui app/widgets



Author: neo
Date: Thu Mar 12 22:30:19 2009
New Revision: 28147
URL: http://svn.gnome.org/viewvc/gimp?rev=28147&view=rev

Log:
2009-03-12  Sven Neumann  <sven gimp org>

	Merged from trunk:

	Bug 575154 â changing the help browser preference may not work

	* 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:
   branches/gimp-2-6/ChangeLog
   branches/gimp-2-6/app/gui/gui.c
   branches/gimp-2-6/app/widgets/gimphelp.c
   branches/gimp-2-6/app/widgets/gimphelp.h

Modified: branches/gimp-2-6/app/gui/gui.c
==============================================================================
--- branches/gimp-2-6/app/gui/gui.c	(original)
+++ branches/gimp-2-6/app/gui/gui.c	Thu Mar 12 22:30:19 2009
@@ -112,6 +112,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);
@@ -369,6 +372,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);
@@ -588,6 +594,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);
 
@@ -637,6 +646,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: branches/gimp-2-6/app/widgets/gimphelp.c
==============================================================================
--- branches/gimp-2-6/app/widgets/gimphelp.c	(original)
+++ branches/gimp-2-6/app/widgets/gimphelp.c	Thu Mar 12 22:30:19 2009
@@ -41,7 +41,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"
@@ -187,6 +189,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: branches/gimp-2-6/app/widgets/gimphelp.h
==============================================================================
--- branches/gimp-2-6/app/widgets/gimphelp.h	(original)
+++ branches/gimp-2-6/app/widgets/gimphelp.h	Thu Mar 12 22:30:19 2009
@@ -37,5 +37,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]