app: update the display profile transform when the color config changes
This commit is contained in:
@ -58,6 +58,7 @@
|
||||
#include "gimpdisplayshell-expose.h"
|
||||
#include "gimpdisplayshell-handlers.h"
|
||||
#include "gimpdisplayshell-icon.h"
|
||||
#include "gimpdisplayshell-profile.h"
|
||||
#include "gimpdisplayshell-scale.h"
|
||||
#include "gimpdisplayshell-scroll.h"
|
||||
#include "gimpdisplayshell-selection.h"
|
||||
@ -162,6 +163,9 @@ static void gimp_display_shell_ants_speed_notify_handler (GObject *c
|
||||
static void gimp_display_shell_quality_notify_handler (GObject *config,
|
||||
GParamSpec *param_spec,
|
||||
GimpDisplayShell *shell);
|
||||
static void gimp_display_shell_color_config_notify_handler(GObject *config,
|
||||
GParamSpec *param_spec,
|
||||
GimpDisplayShell *shell);
|
||||
|
||||
|
||||
/* public functions */
|
||||
@ -348,8 +352,15 @@ gimp_display_shell_connect (GimpDisplayShell *shell)
|
||||
G_CALLBACK (gimp_display_shell_quality_notify_handler),
|
||||
shell);
|
||||
|
||||
g_signal_connect (GIMP_CORE_CONFIG (shell->display->config)->color_management,
|
||||
"notify",
|
||||
G_CALLBACK (gimp_display_shell_color_config_notify_handler),
|
||||
shell);
|
||||
|
||||
gimp_display_shell_invalidate_preview_handler (image, shell);
|
||||
gimp_display_shell_quick_mask_changed_handler (image, shell);
|
||||
gimp_display_shell_profile_changed_handler (GIMP_COLOR_MANAGED (image),
|
||||
shell);
|
||||
|
||||
gimp_canvas_layer_boundary_set_layer (GIMP_CANVAS_LAYER_BOUNDARY (shell->layer_boundary),
|
||||
gimp_image_get_active_layer (image));
|
||||
@ -376,6 +387,10 @@ gimp_display_shell_disconnect (GimpDisplayShell *shell)
|
||||
gimp_canvas_layer_boundary_set_layer (GIMP_CANVAS_LAYER_BOUNDARY (shell->layer_boundary),
|
||||
NULL);
|
||||
|
||||
g_signal_handlers_disconnect_by_func (GIMP_CORE_CONFIG (shell->display->config)->color_management,
|
||||
gimp_display_shell_color_config_notify_handler,
|
||||
shell);
|
||||
|
||||
g_signal_handlers_disconnect_by_func (shell->display->config,
|
||||
gimp_display_shell_quality_notify_handler,
|
||||
shell);
|
||||
@ -1041,3 +1056,12 @@ gimp_display_shell_quality_notify_handler (GObject *config,
|
||||
{
|
||||
gimp_display_shell_expose_full (shell);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_display_shell_color_config_notify_handler (GObject *config,
|
||||
GParamSpec *param_spec,
|
||||
GimpDisplayShell *shell)
|
||||
{
|
||||
gimp_display_shell_profile_update (shell);
|
||||
gimp_display_shell_expose_full (shell);
|
||||
}
|
||||
|
Reference in New Issue
Block a user