[gimp] Add notify callback for GimpDisplay's "image" property



commit 7e8a767e884ded1aee310cb94baae87d33d54829
Author: Michael Natterer <mitch gimp org>
Date:   Thu Sep 24 09:58:36 2009 +0200

    Add notify callback for GimpDisplay's "image" property
    
    Will be used to do NIW things later.

 app/display/gimpimagewindow.c |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/app/display/gimpimagewindow.c b/app/display/gimpimagewindow.c
index 7263032..903242c 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);
@@ -470,6 +481,19 @@ gimp_image_window_hide_tooltip (GimpUIManager   *manager,
 }
 
 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)
 {



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