From 7e8a767e884ded1aee310cb94baae87d33d54829 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Thu, 24 Sep 2009 09:58:36 +0200 Subject: [PATCH] Add notify callback for GimpDisplay's "image" property Will be used to do NIW things later. --- app/display/gimpimagewindow.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/app/display/gimpimagewindow.c b/app/display/gimpimagewindow.c index 7263032109..903242cf2b 100644 --- a/app/display/gimpimagewindow.c +++ b/app/display/gimpimagewindow.c @@ -75,6 +75,9 @@ static void gimp_image_window_show_tooltip (GimpUIManager *manager, static void gimp_image_window_hide_tooltip (GimpUIManager *manager, GimpImageWindow *window); +static void gimp_image_window_image_notify (GimpDisplay *display, + const GParamSpec *pspec, + GimpImageWindow *window); static void gimp_image_window_shell_scaled (GimpDisplayShell *shell, GimpImageWindow *window); static void gimp_image_window_shell_title_notify (GimpDisplayShell *shell, @@ -377,6 +380,10 @@ gimp_image_window_set_active_display (GimpImageWindow *window, if (window->active_display) { + g_signal_handlers_disconnect_by_func (window->active_display, + gimp_image_window_image_notify, + window); + active_shell = GIMP_DISPLAY_SHELL (window->active_display->shell); g_signal_handlers_disconnect_by_func (active_shell, @@ -396,6 +403,10 @@ gimp_image_window_set_active_display (GimpImageWindow *window, window->active_display = display; #endif + g_signal_connect (window->active_display, "notify::image", + G_CALLBACK (gimp_image_window_image_notify), + window); + active_shell = GIMP_DISPLAY_SHELL (window->active_display->shell); gimp_statusbar_set_shell (GIMP_STATUSBAR (window->statusbar), active_shell); @@ -469,6 +480,19 @@ gimp_image_window_hide_tooltip (GimpUIManager *manager, gimp_statusbar_pop (GIMP_STATUSBAR (window->statusbar), "menu-tooltip"); } +static void +gimp_image_window_image_notify (GimpDisplay *display, + const GParamSpec *pspec, + GimpImageWindow *window) +{ + if (display->image) + { + } + else + { + } +} + static void gimp_image_window_shell_scaled (GimpDisplayShell *shell, GimpImageWindow *window)