[gimp] app: Don't call the dock title a title, but "description"



commit a915132ee6f3d3d8a5cdd7f265d4ca86e1e88364
Author: Martin Nordholts <martinn src gnome org>
Date:   Sat Mar 13 17:18:47 2010 +0100

    app: Don't call the dock title a title, but "description"
    
    Don't call the dock title a title, but "description". Title is an old
    name from when a GimpDock was a GtkWindow.

 app/widgets/gimpdock.c       |   74 +++++++++++++++++++++---------------------
 app/widgets/gimpdock.h       |    6 ++--
 app/widgets/gimpdockwindow.c |    4 +-
 app/widgets/gimptoolbox.c    |   20 ++++++------
 4 files changed, 52 insertions(+), 52 deletions(-)
---
diff --git a/app/widgets/gimpdock.c b/app/widgets/gimpdock.c
index 1ea4785..c4fd026 100644
--- a/app/widgets/gimpdock.c
+++ b/app/widgets/gimpdock.c
@@ -52,7 +52,7 @@ enum
 {
   BOOK_ADDED,
   BOOK_REMOVED,
-  TITLE_INVALIDATED,
+  DESCRIPTION_INVALIDATED,
   GEOMETRY_INVALIDATED,
   LAST_SIGNAL
 };
@@ -69,19 +69,19 @@ struct _GimpDockPrivate
 };
 
 
-static void              gimp_dock_style_set         (GtkWidget    *widget,
-                                                      GtkStyle     *prev_style);
-static void              gimp_dock_destroy           (GtkObject    *object);
-static gchar           * gimp_dock_real_get_title    (GimpDock     *dock);
-static void              gimp_dock_real_book_added   (GimpDock     *dock,
-                                                      GimpDockbook *dockbook);
-static void              gimp_dock_real_book_removed (GimpDock     *dock,
-                                                      GimpDockbook *dockbook);
-static void              gimp_dock_invalidate_title  (GimpDock     *dock);
-static gboolean          gimp_dock_dropped_cb        (GtkWidget    *source,
-                                                      gint          insert_index,
-                                                      gpointer      data);
-static GimpDockColumns * gimp_dock_get_dock_columns  (GimpDock     *dock);
+static void              gimp_dock_style_set              (GtkWidget    *widget,
+                                                           GtkStyle     *prev_style);
+static void              gimp_dock_destroy                (GtkObject    *object);
+static gchar           * gimp_dock_real_get_description   (GimpDock     *dock);
+static void              gimp_dock_real_book_added        (GimpDock     *dock,
+                                                           GimpDockbook *dockbook);
+static void              gimp_dock_real_book_removed      (GimpDock     *dock,
+                                                           GimpDockbook *dockbook);
+static void              gimp_dock_invalidate_description (GimpDock     *dock);
+static gboolean          gimp_dock_dropped_cb             (GtkWidget    *source,
+                                                           gint          insert_index,
+                                                           gpointer      data);
+static GimpDockColumns * gimp_dock_get_dock_columns       (GimpDock     *dock);
 
 
 G_DEFINE_TYPE (GimpDock, gimp_dock, GTK_TYPE_VBOX)
@@ -117,11 +117,11 @@ gimp_dock_class_init (GimpDockClass *klass)
                   G_TYPE_NONE, 1,
                   GIMP_TYPE_DOCKBOOK);
 
-  dock_signals[TITLE_INVALIDATED] =
-    g_signal_new ("title-invalidated",
+  dock_signals[DESCRIPTION_INVALIDATED] =
+    g_signal_new ("description-invalidated",
                   G_TYPE_FROM_CLASS (klass),
                   G_SIGNAL_RUN_FIRST,
-                  G_STRUCT_OFFSET (GimpDockClass, title_invalidated),
+                  G_STRUCT_OFFSET (GimpDockClass, description_invalidated),
                   NULL, NULL,
                   gimp_marshal_VOID__VOID,
                   G_TYPE_NONE, 0);
@@ -139,11 +139,11 @@ gimp_dock_class_init (GimpDockClass *klass)
 
   widget_class->style_set        = gimp_dock_style_set;
 
-  klass->get_title               = gimp_dock_real_get_title;
+  klass->get_description         = gimp_dock_real_get_description;
   klass->set_host_geometry_hints = NULL;
   klass->book_added              = gimp_dock_real_book_added;
   klass->book_removed            = gimp_dock_real_book_removed;
-  klass->title_invalidated       = NULL;
+  klass->description_invalidated = NULL;
   klass->geometry_invalidated    = NULL;
 
   gtk_widget_class_install_style_property (widget_class,
@@ -245,12 +245,12 @@ gimp_dock_destroy (GtkObject *object)
 }
 
 static gchar *
-gimp_dock_real_get_title (GimpDock *dock)
+gimp_dock_real_get_description (GimpDock *dock)
 {
-  GString *title;
+  GString *desc;
   GList   *list;
 
-  title = g_string_new (NULL);
+  desc = g_string_new (NULL);
 
   for (list = gimp_dock_get_dockbooks (dock);
        list;
@@ -266,19 +266,19 @@ gimp_dock_real_get_title (GimpDock *dock)
         {
           GimpDockable *dockable = child->data;
 
-          g_string_append (title, gimp_dockable_get_name (dockable));
+          g_string_append (desc, gimp_dockable_get_name (dockable));
 
           if (g_list_next (child))
-            g_string_append (title, GIMP_DOCK_DOCKABLE_SEPARATOR);
+            g_string_append (desc, GIMP_DOCK_DOCKABLE_SEPARATOR);
         }
 
       g_list_free (children);
 
       if (g_list_next (list))
-        g_string_append (title, GIMP_DOCK_BOOK_SEPARATOR);
+        g_string_append (desc, GIMP_DOCK_BOOK_SEPARATOR);
     }
 
-  return g_string_free (title, FALSE);
+  return g_string_free (desc, FALSE);
 }
 
 static void
@@ -294,11 +294,11 @@ gimp_dock_real_book_removed (GimpDock     *dock,
 }
 
 static void
-gimp_dock_invalidate_title (GimpDock *dock)
+gimp_dock_invalidate_description (GimpDock *dock)
 {
   g_return_if_fail (GIMP_IS_DOCK (dock));
 
-  g_signal_emit (dock, dock_signals[TITLE_INVALIDATED], 0);
+  g_signal_emit (dock, dock_signals[DESCRIPTION_INVALIDATED], 0);
 }
 
 static gboolean
@@ -368,12 +368,12 @@ gimp_dock_get_dock_columns (GimpDock *dock)
 /*  public functions  */
 
 gchar *
-gimp_dock_get_title (GimpDock *dock)
+gimp_dock_get_description (GimpDock *dock)
 {
   g_return_val_if_fail (GIMP_IS_DOCK (dock), NULL);
 
-  if (GIMP_DOCK_GET_CLASS (dock)->get_title)
-    return GIMP_DOCK_GET_CLASS (dock)->get_title (dock);
+  if (GIMP_DOCK_GET_CLASS (dock)->get_description)
+    return GIMP_DOCK_GET_CLASS (dock)->get_description (dock);
 
   return NULL;
 }
@@ -619,13 +619,13 @@ gimp_dock_add_book (GimpDock     *dock,
   gimp_dockbook_set_dock (dockbook, dock);
 
   g_signal_connect_object (dockbook, "dockable-added",
-                           G_CALLBACK (gimp_dock_invalidate_title),
+                           G_CALLBACK (gimp_dock_invalidate_description),
                            dock, G_CONNECT_SWAPPED);
   g_signal_connect_object (dockbook, "dockable-removed",
-                           G_CALLBACK (gimp_dock_invalidate_title),
+                           G_CALLBACK (gimp_dock_invalidate_description),
                            dock, G_CONNECT_SWAPPED);
   g_signal_connect_object (dockbook, "dockable-reordered",
-                           G_CALLBACK (gimp_dock_invalidate_title),
+                           G_CALLBACK (gimp_dock_invalidate_description),
                            dock, G_CONNECT_SWAPPED);
 
   dock->p->dockbooks = g_list_insert (dock->p->dockbooks, dockbook, index);
@@ -634,7 +634,7 @@ gimp_dock_add_book (GimpDock     *dock,
                              index);
   gtk_widget_show (GTK_WIDGET (dockbook));
 
-  gimp_dock_invalidate_title (dock);
+  gimp_dock_invalidate_description (dock);
 
   g_signal_emit (dock, dock_signals[BOOK_ADDED], 0, dockbook);
 }
@@ -650,7 +650,7 @@ gimp_dock_remove_book (GimpDock     *dock,
   gimp_dockbook_set_dock (dockbook, NULL);
 
   g_signal_handlers_disconnect_by_func (dockbook,
-                                        gimp_dock_invalidate_title,
+                                        gimp_dock_invalidate_description,
                                         dock);
 
   /* Ref the dockbook so we can emit the "book-removed" signal and
@@ -662,7 +662,7 @@ gimp_dock_remove_book (GimpDock     *dock,
   gimp_paned_box_remove_widget (GIMP_PANED_BOX (dock->p->paned_vbox),
                                 GTK_WIDGET (dockbook));
 
-  gimp_dock_invalidate_title (dock);
+  gimp_dock_invalidate_description (dock);
 
   g_signal_emit (dock, dock_signals[BOOK_REMOVED], 0, dockbook);
 
diff --git a/app/widgets/gimpdock.h b/app/widgets/gimpdock.h
index b181000..f6d4339 100644
--- a/app/widgets/gimpdock.h
+++ b/app/widgets/gimpdock.h
@@ -64,7 +64,7 @@ struct _GimpDockClass
   GtkVBoxClass  parent_class;
 
   /*  virtual functions  */
-  gchar * (* get_title)               (GimpDock       *dock);
+  gchar * (* get_description)         (GimpDock       *dock);
   void    (* set_host_geometry_hints) (GimpDock       *dock,
                                        GtkWindow      *window);
 
@@ -73,14 +73,14 @@ struct _GimpDockClass
                                        GimpDockbook   *dockbook);
   void    (* book_removed)            (GimpDock       *dock,
                                        GimpDockbook   *dockbook);
-  void    (* title_invalidated)       (GimpDock       *dock);
+  void    (* description_invalidated) (GimpDock       *dock);
   void    (* geometry_invalidated)    (GimpDock       *dock);
 };
 
 
 GType               gimp_dock_get_type                (void) G_GNUC_CONST;
 
-gchar             * gimp_dock_get_title               (GimpDock       *dock);
+gchar             * gimp_dock_get_description         (GimpDock       *dock);
 void                gimp_dock_set_host_geometry_hints (GimpDock       *dock,
                                                        GtkWindow      *window);
 void                gimp_dock_invalidate_geometry     (GimpDock       *dock);
diff --git a/app/widgets/gimpdockwindow.c b/app/widgets/gimpdockwindow.c
index 4ed524e..deee286 100644
--- a/app/widgets/gimpdockwindow.c
+++ b/app/widgets/gimpdockwindow.c
@@ -737,7 +737,7 @@ gimp_dock_window_update_title_idle (GimpDockWindow *dock_window)
        iter;
        iter = g_list_next (iter))
     {
-      gchar *title = gimp_dock_get_title (GIMP_DOCK (iter->data));
+      gchar *title = gimp_dock_get_description (GIMP_DOCK (iter->data));
       g_string_append (complete_title, title);
       g_free (title);
 
@@ -902,7 +902,7 @@ gimp_dock_window_add_dock (GimpDockWindow *dock_window,
                               GIMP_DOCK (dock),
                               index);
 
-  g_signal_connect_object (dock, "title-invalidated",
+  g_signal_connect_object (dock, "description-invalidated",
                            G_CALLBACK (gimp_dock_window_update_title),
                            dock_window,
                            G_CONNECT_SWAPPED);
diff --git a/app/widgets/gimptoolbox.c b/app/widgets/gimptoolbox.c
index ec7d7ca..ae7125a 100644
--- a/app/widgets/gimptoolbox.c
+++ b/app/widgets/gimptoolbox.c
@@ -132,7 +132,7 @@ static gboolean    gimp_toolbox_drag_drop               (GtkWidget             *
                                                          gint                   y,
                                                          guint                  time,
                                                          GimpToolbox           *toolbox);
-static gchar     * gimp_toolbox_get_title               (GimpDock              *dock);
+static gchar     * gimp_toolbox_get_description         (GimpDock              *dock);
 static void        gimp_toolbox_set_host_geometry_hints (GimpDock              *dock,
                                                          GtkWindow             *window);
 static void        gimp_toolbox_book_added              (GimpDock              *dock,
@@ -197,7 +197,7 @@ gimp_toolbox_class_init (GimpToolboxClass *klass)
   widget_class->button_press_event    = gimp_toolbox_button_press_event;
   widget_class->expose_event          = gimp_toolbox_expose_event;
 
-  dock_class->get_title               = gimp_toolbox_get_title;
+  dock_class->get_description         = gimp_toolbox_get_description;
   dock_class->set_host_geometry_hints = gimp_toolbox_set_host_geometry_hints;
   dock_class->book_added              = gimp_toolbox_book_added;
   dock_class->book_removed            = gimp_toolbox_book_removed;
@@ -767,20 +767,20 @@ gimp_toolbox_drag_drop (GtkWidget      *widget,
 }
 
 static gchar *
-gimp_toolbox_get_title (GimpDock *dock)
+gimp_toolbox_get_description (GimpDock *dock)
 {
-  GString *title      = g_string_new (_("Toolbox"));
-  gchar   *dock_title = GIMP_DOCK_CLASS (parent_class)->get_title (dock);
+  GString *desc      = g_string_new (_("Toolbox"));
+  gchar   *dock_desc = GIMP_DOCK_CLASS (parent_class)->get_description (dock);
 
-  if (dock_title && strlen (dock_title) > 0)
+  if (dock_desc && strlen (dock_desc) > 0)
     {
-      g_string_append (title, GIMP_DOCK_BOOK_SEPARATOR);
-      g_string_append (title, dock_title);
+      g_string_append (desc, GIMP_DOCK_BOOK_SEPARATOR);
+      g_string_append (desc, dock_desc);
     }
 
-  g_free (dock_title);
+  g_free (dock_desc);
 
-  return g_string_free (title, FALSE /*free_segment*/);
+  return g_string_free (desc, FALSE /*free_segment*/);
 }
 
 static void



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