[gimp/alxsa-image-simulation-intent-bpc] Removing unneeded functions



commit 738b25bd7f42e5952ee8549daabf2e0957d4baaf
Author: Alx Sa <cmyk student gmail com>
Date:   Fri Aug 12 20:24:13 2022 +0000

    Removing unneeded functions

 app/display/gimpdisplayshell-handlers.c | 58 +++++++--------------------------
 1 file changed, 11 insertions(+), 47 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-handlers.c b/app/display/gimpdisplayshell-handlers.c
index 7936afbb07..eb9a69c3b6 100644
--- a/app/display/gimpdisplayshell-handlers.c
+++ b/app/display/gimpdisplayshell-handlers.c
@@ -129,15 +129,6 @@ static void   gimp_display_shell_precision_changed_handler  (GimpImage        *i
                                                              GimpDisplayShell *shell);
 static void   gimp_display_shell_profile_changed_handler    (GimpColorManaged *image,
                                                              GimpDisplayShell *shell);
-static void   gimp_display_shell_simulation_profile_changed_handler
-                                                            (GimpColorManaged *image,
-                                                             GimpDisplayShell *shell);
-static void   gimp_display_shell_simulation_intent_changed_handler
-                                                            (GimpColorManaged *image,
-                                                             GimpDisplayShell *shell);
-static void   gimp_display_shell_simulation_bpc_changed_handler
-                                                            (GimpColorManaged *image,
-                                                             GimpDisplayShell *shell);
 static void   gimp_display_shell_saved_handler              (GimpImage        *image,
                                                              GFile            *file,
                                                              GimpDisplayShell *shell);
@@ -291,15 +282,16 @@ gimp_display_shell_connect (GimpDisplayShell *shell)
   g_signal_connect (image, "profile-changed",
                     G_CALLBACK (gimp_display_shell_profile_changed_handler),
                     shell);
-  g_signal_connect (image, "simulation-profile-changed",
-                    G_CALLBACK (gimp_display_shell_simulation_profile_changed_handler),
-                    shell);
-  g_signal_connect (image, "simulation-intent-changed",
-                    G_CALLBACK (gimp_display_shell_simulation_intent_changed_handler),
-                    shell);
-  g_signal_connect (image, "simulation-bpc-changed",
-                    G_CALLBACK (gimp_display_shell_simulation_bpc_changed_handler),
-                    shell);
+  g_signal_connect_swapped (image, "simulation-profile-changed",
+                            G_CALLBACK (gimp_display_shell_profile_update),
+                            shell);
+  g_signal_connect_swapped (image, "simulation-intent-changed",
+                            G_CALLBACK (gimp_display_shell_profile_update),
+                            shell);
+  g_signal_connect_swapped (image, "simulation-bpc-changed",
+                            G_CALLBACK (gimp_display_shell_profile_update),
+                            shell);
+
   g_signal_connect (image, "saved",
                     G_CALLBACK (gimp_display_shell_saved_handler),
                     shell);
@@ -538,13 +530,7 @@ gimp_display_shell_disconnect (GimpDisplayShell *shell)
                                         gimp_display_shell_profile_changed_handler,
                                         shell);
   g_signal_handlers_disconnect_by_func (image,
-                                        gimp_display_shell_simulation_profile_changed_handler,
-                                        shell);
-  g_signal_handlers_disconnect_by_func (image,
-                                        gimp_display_shell_simulation_intent_changed_handler,
-                                        shell);
-  g_signal_handlers_disconnect_by_func (image,
-                                        gimp_display_shell_simulation_bpc_changed_handler,
+                                        gimp_display_shell_profile_update,
                                         shell);
   g_signal_handlers_disconnect_by_func (image,
                                         gimp_display_shell_precision_changed_handler,
@@ -950,28 +936,6 @@ gimp_display_shell_profile_changed_handler (GimpColorManaged *image,
   gimp_color_managed_profile_changed (GIMP_COLOR_MANAGED (shell));
 }
 
-static void
-gimp_display_shell_simulation_profile_changed_handler (GimpColorManaged *image,
-                                                       GimpDisplayShell *shell)
-{
-  gimp_display_shell_profile_update (shell);
-  gimp_color_managed_simulation_profile_changed (GIMP_COLOR_MANAGED (shell));
-}
-
-static void
-gimp_display_shell_simulation_intent_changed_handler (GimpColorManaged *image,
-                                                      GimpDisplayShell *shell)
-{
-  gimp_display_shell_profile_update (shell);
-}
-
-static void
-gimp_display_shell_simulation_bpc_changed_handler (GimpColorManaged *image,
-                                                   GimpDisplayShell *shell)
-{
-  gimp_display_shell_profile_update (shell);
-}
-
 static void
 gimp_display_shell_saved_handler (GimpImage        *image,
                                   GFile            *file,


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