[gimp] Remove "gimp-" prefix from the shell's "icon" and "title" properties



commit 35588efaa1466ab38cb46e2ae11a421e92f5b74c
Author: Michael Natterer <mitch gimp org>
Date:   Tue Sep 29 22:20:12 2009 +0200

    Remove "gimp-" prefix from the shell's "icon" and "title" properties
    
    The prefix was needed because GtkWindow also has "icon" and "title"
    properties.

 app/display/gimpdisplayshell-icon.c  |   20 ++++++++------------
 app/display/gimpdisplayshell-title.c |    6 ++----
 app/display/gimpdisplayshell.c       |    6 ++----
 app/display/gimpimagewindow.c        |    6 ++----
 app/display/gimpstatusbar.c          |    3 +--
 5 files changed, 15 insertions(+), 26 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-icon.c b/app/display/gimpdisplayshell-icon.c
index 9699f98..4a130f8 100644
--- a/app/display/gimpdisplayshell-icon.c
+++ b/app/display/gimpdisplayshell-icon.c
@@ -40,6 +40,7 @@ void
 gimp_display_shell_icon_update (GimpDisplayShell *shell)
 {
   GimpImage *image;
+  GdkPixbuf *pixbuf = NULL;
 
   g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
 
@@ -47,12 +48,11 @@ gimp_display_shell_icon_update (GimpDisplayShell *shell)
 
   if (image)
     {
-      Gimp      *gimp   = shell->display->gimp;
-      GdkPixbuf *pixbuf;
-      gint       width;
-      gint       height;
-      gdouble    factor = ((gdouble) gimp_image_get_height (image) /
-                           (gdouble) gimp_image_get_width  (image));
+      Gimp    *gimp   = shell->display->gimp;
+      gint     width;
+      gint     height;
+      gdouble  factor = ((gdouble) gimp_image_get_height (image) /
+                         (gdouble) gimp_image_get_width  (image));
 
       if (factor >= 1)
         {
@@ -68,13 +68,9 @@ gimp_display_shell_icon_update (GimpDisplayShell *shell)
       pixbuf = gimp_viewable_get_pixbuf (GIMP_VIEWABLE (image),
                                          gimp_get_user_context (gimp),
                                          width, height);
-
-      g_object_set (shell, "gimp-icon", pixbuf, NULL);
-    }
-  else
-    {
-      g_object_set (shell, "gimp-icon", NULL, NULL);
     }
+
+  g_object_set (shell, "icon", pixbuf, NULL);
 }
 
 void
diff --git a/app/display/gimpdisplayshell-title.c b/app/display/gimpdisplayshell-title.c
index 9068613..2a1ad60 100644
--- a/app/display/gimpdisplayshell-title.c
+++ b/app/display/gimpdisplayshell-title.c
@@ -109,16 +109,14 @@ gimp_display_shell_update_title_idle (gpointer data)
                                        config->image_status_format);
 
       g_object_set (shell,
-                    /* FIXME: "title" later */
-                    "gimp-title",  title,
+                    "title",  title,
                     "status", status,
                     NULL);
     }
   else
     {
       g_object_set (shell,
-                    /* FIXME: "title" later */
-                    "gimp-title",  GIMP_NAME,
+                    "title",  GIMP_NAME,
                     "status", " ",
                     NULL);
     }
diff --git a/app/display/gimpdisplayshell.c b/app/display/gimpdisplayshell.c
index 7ee6c04..e302066 100644
--- a/app/display/gimpdisplayshell.c
+++ b/app/display/gimpdisplayshell.c
@@ -226,8 +226,7 @@ gimp_display_shell_class_init (GimpDisplayShellClass *klass)
                                                          GIMP_PARAM_READWRITE));
 
   g_object_class_install_property (object_class, PROP_TITLE,
-                                   /* FIXME: "title" later */
-                                   g_param_spec_string ("gimp-title", NULL, NULL,
+                                   g_param_spec_string ("title", NULL, NULL,
                                                         NULL,
                                                         GIMP_PARAM_READWRITE));
 
@@ -237,8 +236,7 @@ gimp_display_shell_class_init (GimpDisplayShellClass *klass)
                                                         GIMP_PARAM_READWRITE));
 
   g_object_class_install_property (object_class, PROP_ICON,
-                                   /* FIXME: "icon" later */
-                                   g_param_spec_object ("gimp-icon", NULL, NULL,
+                                   g_param_spec_object ("icon", NULL, NULL,
                                                         GDK_TYPE_PIXBUF,
                                                         GIMP_PARAM_READWRITE));
 
diff --git a/app/display/gimpimagewindow.c b/app/display/gimpimagewindow.c
index ebe41fe..c705153 100644
--- a/app/display/gimpimagewindow.c
+++ b/app/display/gimpimagewindow.c
@@ -896,15 +896,13 @@ gimp_image_window_switch_page (GtkNotebook     *notebook,
   g_signal_connect (private->active_shell, "scaled",
                     G_CALLBACK (gimp_image_window_shell_scaled),
                     window);
-  /* FIXME: "title" later */
-  g_signal_connect (private->active_shell, "notify::gimp-title",
+  g_signal_connect (private->active_shell, "notify::title",
                     G_CALLBACK (gimp_image_window_shell_title_notify),
                     window);
   g_signal_connect (private->active_shell, "notify::status",
                     G_CALLBACK (gimp_image_window_shell_status_notify),
                     window);
-  /* FIXME: "icon" later */
-  g_signal_connect (private->active_shell, "notify::gimp-icon",
+  g_signal_connect (private->active_shell, "notify::icon",
                     G_CALLBACK (gimp_image_window_shell_icon_notify),
                     window);
 
diff --git a/app/display/gimpstatusbar.c b/app/display/gimpstatusbar.c
index bfbaec0..edb3bbb 100644
--- a/app/display/gimpstatusbar.c
+++ b/app/display/gimpstatusbar.c
@@ -766,8 +766,7 @@ gimp_statusbar_restore_window_title (GimpStatusbar *statusbar)
 
   if (gimp_image_window_is_iconified (GIMP_IMAGE_WINDOW (toplevel)))
     {
-      /* FIXME title later */
-      g_object_notify (G_OBJECT (statusbar->shell), "gimp-title");
+      g_object_notify (G_OBJECT (statusbar->shell), "title");
     }
 }
 



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