[gimp] Revert "app: force re-querying all plug-ins after a language change."



commit 0cff1ebe918e6106b8931d6b62c1b99afe1762b7
Author: Jehan <jehan girinstud io>
Date:   Wed Jul 6 19:39:42 2022 +0200

    Revert "app: force re-querying all plug-ins after a language change."
    
    This reverts commit 82f9ae1ab75d22fccd411df2a418987fd698cca7.
    
    This is not needed anymore. Cf. previous commit which implements the
    force-requery differently and much more widely based on actual language
    being stored and compared between runs.

 app/dialogs/preferences-dialog.c        | 10 ----------
 app/plug-in/gimppluginmanager-restore.c | 23 -----------------------
 app/plug-in/gimppluginmanager-restore.h |  9 +++------
 3 files changed, 3 insertions(+), 39 deletions(-)
---
diff --git a/app/dialogs/preferences-dialog.c b/app/dialogs/preferences-dialog.c
index 66606076e2..35a6f7e552 100644
--- a/app/dialogs/preferences-dialog.c
+++ b/app/dialogs/preferences-dialog.c
@@ -39,7 +39,6 @@
 #include "core/gimp-utils.h"
 
 #include "plug-in/gimppluginmanager.h"
-#include "plug-in/gimppluginmanager-restore.h"
 
 #include "widgets/gimpaction-history.h"
 #include "widgets/gimpcolorpanel.h"
@@ -397,15 +396,6 @@ prefs_response (GtkWidget *widget,
                  * for doing a list (U+2022).
                  */
                 g_string_append_printf (string, "\xe2\x80\xa2 %s\n", g_param_spec_get_nick (param_spec));
-
-                if (g_strcmp0 (param_spec->name, "language") == 0)
-                  {
-                    /* A language change will trigger a query() force of
-                     * all plug-ins because some of the localized
-                     * strings might be in the query() step too.
-                     */
-                    gimp_plug_in_manager_force_query_all (gimp->plug_in_manager);
-                  }
               }
 
             prefs_message (GTK_MESSAGE_INFO, FALSE, string->str);
diff --git a/app/plug-in/gimppluginmanager-restore.c b/app/plug-in/gimppluginmanager-restore.c
index 05cd12c683..5eca224644 100644
--- a/app/plug-in/gimppluginmanager-restore.c
+++ b/app/plug-in/gimppluginmanager-restore.c
@@ -176,29 +176,6 @@ gimp_plug_in_manager_restore (GimpPlugInManager  *manager,
   g_object_unref (context);
 }
 
-/*
- * This function can be used to force to query() all plug-ins at next
- * GIMP start. It basically empties out the pluginrc file.
- *
- * E.g. this is useful when updating the GUI language since some
- * strings localization may happen in the query() step, such as the
- * localization of procedure documentation and parameters' titles or
- * descriptions.
- */
-void
-gimp_plug_in_manager_force_query_all (GimpPlugInManager *manager)
-{
-  GError *error = NULL;
-  GFile  *pluginrc;
-
-  pluginrc = gimp_plug_in_manager_get_pluginrc (manager);
-  if (! plug_in_rc_write (NULL, pluginrc, &error))
-    {
-      g_printerr ("%s: %s", G_STRFUNC, error->message);
-      g_clear_error (&error);
-    }
-  g_object_unref (pluginrc);
-}
 
 /* search for binaries in the plug-in directory path */
 static void
diff --git a/app/plug-in/gimppluginmanager-restore.h b/app/plug-in/gimppluginmanager-restore.h
index 3bfe51f7c8..0389dcf837 100644
--- a/app/plug-in/gimppluginmanager-restore.h
+++ b/app/plug-in/gimppluginmanager-restore.h
@@ -21,12 +21,9 @@
 #define __GIMP_PLUG_IN_MANAGER_RESTORE_H__
 
 
-void    gimp_plug_in_manager_restore         (GimpPlugInManager  *manager,
-                                              GimpContext        *context,
-                                              GimpInitStatusFunc  status_callback);
-
-void    gimp_plug_in_manager_force_query_all (GimpPlugInManager *manager);
-
+void    gimp_plug_in_manager_restore (GimpPlugInManager  *manager,
+                                      GimpContext        *context,
+                                      GimpInitStatusFunc  status_callback);
 
 
 #endif  /* __GIMP_PLUG_IN_MANAGER_RESTORE_H__ */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]