Commit 1b3c1fb9 authored by Ell's avatar Ell

app: fix CRITICAL in GimpNavigationEditor

... after commit 2c9a8a56.  Don't
use the same function as a handler for GimpContext::display-changed
and GimpContext::image-changed -- their signatures are different.
parent 49640ebf
Pipeline #113716 passed with stages
in 15 minutes and 43 seconds
......@@ -199,6 +199,20 @@ gimp_navigation_editor_display_changed (GimpContext *context,
gimp_navigation_editor_set_shell (editor, shell);
static void
gimp_navigation_editor_image_chaged (GimpContext *context,
GimpImage *image,
GimpNavigationEditor *editor)
GimpDisplay *display = gimp_context_get_display (context);
GimpDisplayShell *shell = NULL;
if (display && image)
shell = gimp_display_get_shell (display);
gimp_navigation_editor_set_shell (editor, shell);
static void
gimp_navigation_editor_set_context (GimpDocked *docked,
GimpContext *context)
......@@ -211,6 +225,9 @@ gimp_navigation_editor_set_context (GimpDocked *docked,
g_signal_handlers_disconnect_by_func (editor->context,
g_signal_handlers_disconnect_by_func (editor->context,
editor->context = context;
......@@ -220,12 +237,12 @@ gimp_navigation_editor_set_context (GimpDocked *docked,
g_signal_connect (context, "display-changed",
G_CALLBACK (gimp_navigation_editor_display_changed),
/* make sure to also run gimp_navigation_editor_display_changed() when\
* the last image is closed, but its display doesn't, so that the editor
* is properly cleared.
/* make sure to also call gimp_navigation_editor_set_shell() when the
* last image is closed, even though the display isn't changed, so that
* the editor is properly cleared.
g_signal_connect (context, "image-changed",
G_CALLBACK (gimp_navigation_editor_display_changed),
G_CALLBACK (gimp_navigation_editor_image_chaged),
display = gimp_context_get_display (context);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment