gimp r27693 - in trunk: . app/actions app/core app/gui app/widgets



Author: martinn
Date: Thu Nov 20 23:43:58 2008
New Revision: 27693
URL: http://svn.gnome.org/viewvc/gimp?rev=27693&view=rev

Log:
Use GimpContainer getters instead of poking into the class
instance struct.

* app/actions/context-commands.c
* app/actions/data-commands.c
* app/actions/plug-in-commands.c
* app/actions/templates-commands.c
* app/core/gimp-utils.c
* app/core/gimpdrawablestack.c
* app/core/gimpitemstack.c
* app/core/gimplist.c
* app/gui/gui-vtable.c
* app/widgets/gimpcontainerbox.c
* app/widgets/gimpcontainercombobox.c
* app/widgets/gimpcontainereditor.c
* app/widgets/gimpcontainerentry.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainerpopup.c
* app/widgets/gimpcontainertreeview-dnd.c
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpcontainerview-utils.c
* app/widgets/gimpcontainerview.c
* app/widgets/gimpdataeditor.c
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpsettingsbox.c
* app/widgets/gimpviewablebutton.c


Modified:
   trunk/ChangeLog
   trunk/app/actions/context-commands.c
   trunk/app/actions/data-commands.c
   trunk/app/actions/plug-in-commands.c
   trunk/app/actions/templates-commands.c
   trunk/app/core/gimp-utils.c
   trunk/app/core/gimpdrawablestack.c
   trunk/app/core/gimpitemstack.c
   trunk/app/core/gimplist.c
   trunk/app/gui/gui-vtable.c
   trunk/app/widgets/gimpcontainerbox.c
   trunk/app/widgets/gimpcontainercombobox.c
   trunk/app/widgets/gimpcontainereditor.c
   trunk/app/widgets/gimpcontainerentry.c
   trunk/app/widgets/gimpcontainergridview.c
   trunk/app/widgets/gimpcontainerpopup.c
   trunk/app/widgets/gimpcontainertreeview-dnd.c
   trunk/app/widgets/gimpcontainertreeview.c
   trunk/app/widgets/gimpcontainerview-utils.c
   trunk/app/widgets/gimpcontainerview.c
   trunk/app/widgets/gimpdataeditor.c
   trunk/app/widgets/gimpdatafactoryview.c
   trunk/app/widgets/gimpsettingsbox.c
   trunk/app/widgets/gimpviewablebutton.c

Modified: trunk/app/actions/context-commands.c
==============================================================================
--- trunk/app/actions/context-commands.c	(original)
+++ trunk/app/actions/context-commands.c	Thu Nov 20 23:43:58 2008
@@ -679,12 +679,14 @@
 {
   GimpObject *current;
 
-  current = gimp_context_get_by_type (context, container->children_type);
+  current = gimp_context_get_by_type (context,
+                                      gimp_container_get_children_type (container));
 
   current = action_select_object (select_type, container, current);
 
   if (current)
-    gimp_context_set_by_type (context, container->children_type, current);
+    gimp_context_set_by_type (context,
+                              gimp_container_get_children_type (container), current);
 }
 
 static gint

Modified: trunk/app/actions/data-commands.c
==============================================================================
--- trunk/app/actions/data-commands.c	(original)
+++ trunk/app/actions/data-commands.c	Thu Nov 20 23:43:58 2008
@@ -82,7 +82,7 @@
 
   data = (GimpData *)
     gimp_context_get_by_type (context,
-                              view->factory->container->children_type);
+                              gimp_container_get_children_type (view->factory->container));
 
   if (data && data->filename)
     {
@@ -135,7 +135,7 @@
       if (data)
         {
           gimp_context_set_by_type (context,
-                                    view->factory->container->children_type,
+                                    gimp_container_get_children_type (view->factory->container),
                                     GIMP_OBJECT (data));
 
           gtk_button_clicked (GTK_BUTTON (view->edit_button));
@@ -155,7 +155,7 @@
 
   data = (GimpData *)
     gimp_context_get_by_type (context,
-                              view->factory->container->children_type);
+                              gimp_container_get_children_type (view->factory->container));
 
   if (data && gimp_container_have (view->factory->container,
                                    GIMP_OBJECT (data)))
@@ -167,7 +167,7 @@
       if (new_data)
         {
           gimp_context_set_by_type (context,
-                                    view->factory->container->children_type,
+                                    gimp_container_get_children_type (view->factory->container),
                                     GIMP_OBJECT (new_data));
 
           gtk_button_clicked (GTK_BUTTON (view->edit_button));
@@ -187,7 +187,7 @@
 
   data = (GimpData *)
     gimp_context_get_by_type (context,
-                              view->factory->container->children_type);
+                              gimp_container_get_children_type (view->factory->container));
 
   if (data && data->filename && *data->filename)
     {
@@ -214,7 +214,7 @@
 
   data = (GimpData *)
     gimp_context_get_by_type (context,
-                              view->factory->container->children_type);
+                              gimp_container_get_children_type (view->factory->container));
 
   if (data && data->deletable && gimp_container_have (view->factory->container,
                                                       GIMP_OBJECT (data)))
@@ -288,7 +288,7 @@
 
   data = (GimpData *)
     gimp_context_get_by_type (context,
-                              view->factory->container->children_type);
+                              gimp_container_get_children_type (view->factory->container));
 
   if (data && gimp_container_have (view->factory->container,
                                    GIMP_OBJECT (data)))
@@ -335,7 +335,7 @@
 
       if (new_active)
         gimp_context_set_by_type (delete_data->context,
-                                  factory->container->children_type,
+                                  gimp_container_get_children_type (factory->container),
                                   new_active);
     }
 

Modified: trunk/app/actions/plug-in-commands.c
==============================================================================
--- trunk/app/actions/plug-in-commands.c	(original)
+++ trunk/app/actions/plug-in-commands.c	Thu Nov 20 23:43:58 2008
@@ -135,7 +135,7 @@
           context   = gimp_container_view_get_context (editor->view);
 
           object = gimp_context_get_by_type (context,
-                                             container->children_type);
+                                             gimp_container_get_children_type (container));
 
           n_args = plug_in_collect_data_args (action, object,
                                               procedure->args,

Modified: trunk/app/actions/templates-commands.c
==============================================================================
--- trunk/app/actions/templates-commands.c	(original)
+++ trunk/app/actions/templates-commands.c	Thu Nov 20 23:43:58 2008
@@ -144,7 +144,8 @@
       new_template = gimp_config_duplicate (GIMP_CONFIG (template));
 
       gimp_container_add (container, GIMP_OBJECT (new_template));
-      gimp_context_set_by_type (context, container->children_type,
+      gimp_context_set_by_type (context,
+                                gimp_container_get_children_type (container),
                                 GIMP_OBJECT (new_template));
       g_object_unref (new_template);
 
@@ -299,7 +300,7 @@
         {
           if (new_active)
             gimp_context_set_by_type (delete_data->context,
-                                      delete_data->container->children_type,
+                                      gimp_container_get_children_type (delete_data->container),
                                       new_active);
 
           gimp_container_remove (delete_data->container,

Modified: trunk/app/core/gimp-utils.c
==============================================================================
--- trunk/app/core/gimp-utils.c	(original)
+++ trunk/app/core/gimp-utils.c	Thu Nov 20 23:43:58 2008
@@ -508,7 +508,8 @@
   g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
   g_return_val_if_fail (GIMP_IS_OBJECT (active), NULL);
 
-  if (active == gimp_context_get_by_type (context, container->children_type))
+  if (active == gimp_context_get_by_type (context,
+                                          gimp_container_get_children_type (container)))
     {
       gint index = gimp_container_get_child_index (container, active);
 

Modified: trunk/app/core/gimpdrawablestack.c
==============================================================================
--- trunk/app/core/gimpdrawablestack.c	(original)
+++ trunk/app/core/gimpdrawablestack.c	Thu Nov 20 23:43:58 2008
@@ -136,7 +136,8 @@
 
   container = GIMP_CONTAINER (object);
 
-  g_assert (g_type_is_a (container->children_type, GIMP_TYPE_DRAWABLE));
+  g_assert (g_type_is_a (gimp_container_get_children_type (container),
+                         GIMP_TYPE_DRAWABLE));
 
   gimp_container_add_handler (container, "update",
                               G_CALLBACK (gimp_drawable_stack_drawable_update),

Modified: trunk/app/core/gimpitemstack.c
==============================================================================
--- trunk/app/core/gimpitemstack.c	(original)
+++ trunk/app/core/gimpitemstack.c	Thu Nov 20 23:43:58 2008
@@ -75,7 +75,8 @@
 
   container = GIMP_CONTAINER (object);
 
-  g_assert (g_type_is_a (container->children_type, GIMP_TYPE_ITEM));
+  g_assert (g_type_is_a (gimp_container_get_children_type (container),
+                         GIMP_TYPE_ITEM));
 
   return object;
 }

Modified: trunk/app/core/gimplist.c
==============================================================================
--- trunk/app/core/gimplist.c	(original)
+++ trunk/app/core/gimplist.c	Thu Nov 20 23:43:58 2008
@@ -259,7 +259,8 @@
 
   list->list = g_list_remove (list->list, object);
 
-  if (new_index == -1 || new_index == container->num_children - 1)
+  if (new_index == -1 ||
+      new_index == gimp_container_get_n_children (container) - 1)
     list->list = g_list_append (list->list, object);
   else
     list->list = g_list_insert (list->list, object, new_index);
@@ -414,7 +415,7 @@
 {
   g_return_if_fail (GIMP_IS_LIST (list));
 
-  if (GIMP_CONTAINER (list)->num_children > 1)
+  if (gimp_container_get_n_children (GIMP_CONTAINER (list)) > 1)
     {
       gimp_container_freeze (GIMP_CONTAINER (list));
       list->list = g_list_reverse (list->list);
@@ -462,7 +463,7 @@
   g_return_if_fail (GIMP_IS_LIST (list));
   g_return_if_fail (sort_func != NULL);
 
-  if (GIMP_CONTAINER (list)->num_children > 1)
+  if (gimp_container_get_n_children (GIMP_CONTAINER (list)) > 1)
     {
       gimp_container_freeze (GIMP_CONTAINER (list));
       list->list = g_list_sort (list->list, sort_func);

Modified: trunk/app/gui/gui-vtable.c
==============================================================================
--- trunk/app/gui/gui-vtable.c	(original)
+++ trunk/app/gui/gui-vtable.c	Thu Nov 20 23:43:58 2008
@@ -421,31 +421,31 @@
   const gchar *dialog_role = NULL;
   const gchar *help_id     = NULL;
 
-  if (container->children_type == GIMP_TYPE_BRUSH)
+  if (gimp_container_get_children_type (container) == GIMP_TYPE_BRUSH)
     {
       dialog_type = GIMP_TYPE_BRUSH_SELECT;
       dialog_role = "gimp-brush-selection";
       help_id     = GIMP_HELP_BRUSH_DIALOG;
     }
-  else if (container->children_type == GIMP_TYPE_FONT)
+  else if (gimp_container_get_children_type (container) == GIMP_TYPE_FONT)
     {
       dialog_type = GIMP_TYPE_FONT_SELECT;
       dialog_role = "gimp-font-selection";
       help_id     = GIMP_HELP_FONT_DIALOG;
     }
-  else if (container->children_type == GIMP_TYPE_GRADIENT)
+  else if (gimp_container_get_children_type (container) == GIMP_TYPE_GRADIENT)
     {
       dialog_type = GIMP_TYPE_GRADIENT_SELECT;
       dialog_role = "gimp-gradient-selection";
       help_id     = GIMP_HELP_GRADIENT_DIALOG;
     }
-  else if (container->children_type == GIMP_TYPE_PALETTE)
+  else if (gimp_container_get_children_type (container) == GIMP_TYPE_PALETTE)
     {
       dialog_type = GIMP_TYPE_PALETTE_SELECT;
       dialog_role = "gimp-palette-selection";
       help_id     = GIMP_HELP_PALETTE_DIALOG;
     }
-  else if (container->children_type == GIMP_TYPE_PATTERN)
+  else if (gimp_container_get_children_type (container) == GIMP_TYPE_PATTERN)
     {
       dialog_type = GIMP_TYPE_PATTERN_SELECT;
       dialog_role = "gimp-pattern-selection";
@@ -460,7 +460,8 @@
         object = gimp_container_get_child_by_name (container, object_name);
 
       if (! object)
-        object = gimp_context_get_by_type (context, container->children_type);
+        object = gimp_context_get_by_type (context,
+                                           gimp_container_get_children_type (container));
 
       if (object)
         {
@@ -476,7 +477,7 @@
                                            "help-id",        help_id,
                                            "pdb",            gimp->pdb,
                                            "context",        context,
-                                           "select-type",    container->children_type,
+                                           "select-type",    gimp_container_get_children_type (container),
                                            "initial-object", object,
                                            "callback-name",  callback_name,
                                            "menu-factory",   global_menu_factory,
@@ -533,15 +534,15 @@
 {
   GimpPdbDialogClass *klass = NULL;
 
-  if (container->children_type == GIMP_TYPE_BRUSH)
+  if (gimp_container_get_children_type (container) == GIMP_TYPE_BRUSH)
     klass = g_type_class_peek (GIMP_TYPE_BRUSH_SELECT);
-  else if (container->children_type == GIMP_TYPE_FONT)
+  else if (gimp_container_get_children_type (container) == GIMP_TYPE_FONT)
     klass = g_type_class_peek (GIMP_TYPE_FONT_SELECT);
-  else if (container->children_type == GIMP_TYPE_GRADIENT)
+  else if (gimp_container_get_children_type (container) == GIMP_TYPE_GRADIENT)
     klass = g_type_class_peek (GIMP_TYPE_GRADIENT_SELECT);
-  else if (container->children_type == GIMP_TYPE_PALETTE)
+  else if (gimp_container_get_children_type (container) == GIMP_TYPE_PALETTE)
     klass = g_type_class_peek (GIMP_TYPE_PALETTE_SELECT);
-  else if (container->children_type == GIMP_TYPE_PATTERN)
+  else if (gimp_container_get_children_type (container) == GIMP_TYPE_PATTERN)
     klass = g_type_class_peek (GIMP_TYPE_PATTERN_SELECT);
 
   if (klass)
@@ -550,7 +551,7 @@
 
       dialog = gimp_pdb_dialog_get_by_callback (klass, callback_name);
 
-      if (dialog && dialog->select_type == container->children_type)
+      if (dialog && dialog->select_type == gimp_container_get_children_type (container))
         {
           GimpObject *object;
 
@@ -583,15 +584,15 @@
 {
   GimpPdbDialogClass *klass = NULL;
 
-  if (container->children_type == GIMP_TYPE_BRUSH)
+  if (gimp_container_get_children_type (container) == GIMP_TYPE_BRUSH)
     klass = g_type_class_peek (GIMP_TYPE_BRUSH_SELECT);
-  else if (container->children_type == GIMP_TYPE_FONT)
+  else if (gimp_container_get_children_type (container) == GIMP_TYPE_FONT)
     klass = g_type_class_peek (GIMP_TYPE_FONT_SELECT);
-  else if (container->children_type == GIMP_TYPE_GRADIENT)
+  else if (gimp_container_get_children_type (container) == GIMP_TYPE_GRADIENT)
     klass = g_type_class_peek (GIMP_TYPE_GRADIENT_SELECT);
-  else if (container->children_type == GIMP_TYPE_PALETTE)
+  else if (gimp_container_get_children_type (container) == GIMP_TYPE_PALETTE)
     klass = g_type_class_peek (GIMP_TYPE_PALETTE_SELECT);
-  else if (container->children_type == GIMP_TYPE_PATTERN)
+  else if (gimp_container_get_children_type (container) == GIMP_TYPE_PATTERN)
     klass = g_type_class_peek (GIMP_TYPE_PATTERN_SELECT);
 
   if (klass)
@@ -600,7 +601,7 @@
 
       dialog = gimp_pdb_dialog_get_by_callback (klass, callback_name);
 
-      if (dialog && dialog->select_type == container->children_type)
+      if (dialog && dialog->select_type == gimp_container_get_children_type (container))
         {
           gtk_widget_destroy (GTK_WIDGET (dialog));
           return TRUE;

Modified: trunk/app/widgets/gimpcontainerbox.c
==============================================================================
--- trunk/app/widgets/gimpcontainerbox.c	(original)
+++ trunk/app/widgets/gimpcontainerbox.c	Thu Nov 20 23:43:58 2008
@@ -175,7 +175,7 @@
   gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (GTK_WIDGET (box)),
                                      size, &width, &height);
 
-  prop_name = gimp_context_type_to_prop_name (container->children_type);
+  prop_name = gimp_context_type_to_prop_name (gimp_container_get_children_type (container));
 
   preview = gimp_prop_view_new (G_OBJECT (context), prop_name,
                                 context, height);

Modified: trunk/app/widgets/gimpcontainercombobox.c
==============================================================================
--- trunk/app/widgets/gimpcontainercombobox.c	(original)
+++ trunk/app/widgets/gimpcontainercombobox.c	Thu Nov 20 23:43:58 2008
@@ -379,7 +379,7 @@
   if (!iter)
     return;
 
-  if (new_index == -1 || new_index == container->num_children - 1)
+  if (new_index == -1 || new_index == gimp_container_get_n_children (container) - 1)
     {
       gtk_list_store_move_before (GTK_LIST_STORE (model), iter, NULL);
     }

Modified: trunk/app/widgets/gimpcontainereditor.c
==============================================================================
--- trunk/app/widgets/gimpcontainereditor.c	(original)
+++ trunk/app/widgets/gimpcontainereditor.c	Thu Nov 20 23:43:58 2008
@@ -175,7 +175,7 @@
 
   {
     GimpObject *object = gimp_context_get_by_type (context,
-                                                   container->children_type);
+                                                   gimp_container_get_children_type (container));
 
     gimp_container_editor_select_item (GTK_WIDGET (editor->view),
                                        (GimpViewable *) object, NULL,

Modified: trunk/app/widgets/gimpcontainerentry.c
==============================================================================
--- trunk/app/widgets/gimpcontainerentry.c	(original)
+++ trunk/app/widgets/gimpcontainerentry.c	Thu Nov 20 23:43:58 2008
@@ -297,7 +297,8 @@
   if (!iter)
     return;
 
-  if (new_index == -1 || new_index == container->num_children - 1)
+  if (new_index == -1 ||
+      new_index == gimp_container_get_n_children (container) - 1)
     {
       gtk_list_store_move_before (GTK_LIST_STORE (model), iter, NULL);
     }

Modified: trunk/app/widgets/gimpcontainergridview.c
==============================================================================
--- trunk/app/widgets/gimpcontainergridview.c	(original)
+++ trunk/app/widgets/gimpcontainergridview.c	Thu Nov 20 23:43:58 2008
@@ -263,12 +263,12 @@
   index = gimp_container_get_child_index (container, GIMP_OBJECT (item));
 
   index += x;
-  index = CLAMP (index, 0, container->num_children - 1);
+  index = CLAMP (index, 0, gimp_container_get_n_children (container) - 1);
 
   index += y * grid_view->columns;
   while (index < 0)
     index += grid_view->columns;
-  while (index >= container->num_children)
+  while (index >= gimp_container_get_n_children (container))
     index -= grid_view->columns;
 
   item = (GimpViewable *) gimp_container_get_child_by_index (container, index);
@@ -299,7 +299,7 @@
                                                count * grid_view->visible_rows);
 
     case GTK_MOVEMENT_BUFFER_ENDS:
-      count = count < 0 ? 0 : container->num_children - 1;
+      count = count < 0 ? 0 : gimp_container_get_n_children (container) - 1;
 
       item = (GimpViewable *) gimp_container_get_child_by_index (container,
                                                                  count);

Modified: trunk/app/widgets/gimpcontainerpopup.c
==============================================================================
--- trunk/app/widgets/gimpcontainerpopup.c	(original)
+++ trunk/app/widgets/gimpcontainerpopup.c	Thu Nov 20 23:43:58 2008
@@ -287,9 +287,9 @@
   GimpObject *object;
 
   object = gimp_context_get_by_type (popup->context,
-                                     popup->container->children_type);
+                                     gimp_container_get_children_type (popup->container));
   gimp_context_set_by_type (popup->orig_context,
-                            popup->container->children_type,
+                            gimp_container_get_children_type (popup->container),
                             object);
 
   if (gtk_grab_get_current () == widget)
@@ -369,7 +369,7 @@
   popup->view_border_width = view_border_width;
 
   g_signal_connect (popup->context,
-                    gimp_context_type_to_signal_name (container->children_type),
+                    gimp_context_type_to_signal_name (gimp_container_get_children_type (container)),
                     G_CALLBACK (gimp_container_popup_context_changed),
                     popup);
 

Modified: trunk/app/widgets/gimpcontainertreeview-dnd.c
==============================================================================
--- trunk/app/widgets/gimpcontainertreeview-dnd.c	(original)
+++ trunk/app/widgets/gimpcontainertreeview-dnd.c	Thu Nov 20 23:43:58 2008
@@ -485,7 +485,7 @@
   gint               dest_index = -1;
 
   if (src_viewable && g_type_is_a (G_TYPE_FROM_INSTANCE (src_viewable),
-                                   container->children_type))
+                                   gimp_container_get_children_type (container)))
     {
       if (src_viewable == dest_viewable)
         return FALSE;
@@ -525,7 +525,7 @@
   if (return_drag_action)
     {
       if (src_viewable && g_type_is_a (G_TYPE_FROM_INSTANCE (src_viewable),
-                                       container->children_type))
+                                       gimp_container_get_children_type (container)))
         *return_drag_action = GDK_ACTION_MOVE;
       else
         *return_drag_action = GDK_ACTION_COPY;

Modified: trunk/app/widgets/gimpcontainertreeview.c
==============================================================================
--- trunk/app/widgets/gimpcontainertreeview.c	(original)
+++ trunk/app/widgets/gimpcontainertreeview.c	Thu Nov 20 23:43:58 2008
@@ -509,9 +509,9 @@
       if (! container)
         {
           if (gimp_dnd_viewable_source_remove (GTK_WIDGET (tree_view->view),
-                                               old_container->children_type))
+                                               gimp_container_get_children_type (old_container)))
             {
-              if (GIMP_VIEWABLE_CLASS (g_type_class_peek (old_container->children_type))->get_size)
+              if (GIMP_VIEWABLE_CLASS (g_type_class_peek (gimp_container_get_children_type (old_container)))->get_size)
                 gimp_dnd_pixbuf_source_remove (GTK_WIDGET (tree_view->view));
 
               gtk_drag_source_unset (GTK_WIDGET (tree_view->view));
@@ -526,15 +526,15 @@
     {
       if (gimp_dnd_drag_source_set_by_type (GTK_WIDGET (tree_view->view),
                                             GDK_BUTTON1_MASK | GDK_BUTTON2_MASK,
-                                            container->children_type,
+                                            gimp_container_get_children_type (container),
                                             GDK_ACTION_COPY))
         {
           gimp_dnd_viewable_source_add (GTK_WIDGET (tree_view->view),
-                                        container->children_type,
+                                        gimp_container_get_children_type (container),
                                         gimp_container_tree_view_drag_viewable,
                                         tree_view);
 
-          if (GIMP_VIEWABLE_CLASS (g_type_class_peek (container->children_type))->get_size)
+          if (GIMP_VIEWABLE_CLASS (g_type_class_peek (gimp_container_get_children_type (container)))->get_size)
             gimp_dnd_pixbuf_source_add (GTK_WIDGET (tree_view->view),
                                         gimp_container_tree_view_drag_pixbuf,
                                         tree_view);
@@ -663,7 +663,8 @@
           g_object_unref (renderer);
         }
 
-      if (new_index == -1 || new_index == container->num_children - 1)
+      if (new_index == -1 ||
+          new_index == gimp_container_get_n_children (container) - 1)
         {
           gtk_list_store_move_before (GTK_LIST_STORE (tree_view->model),
                                       iter, NULL);

Modified: trunk/app/widgets/gimpcontainerview-utils.c
==============================================================================
--- trunk/app/widgets/gimpcontainerview-utils.c	(original)
+++ trunk/app/widgets/gimpcontainerview-utils.c	Thu Nov 20 23:43:58 2008
@@ -73,7 +73,7 @@
     {
       GimpObject *active;
 
-      active = gimp_context_get_by_type (context, container->children_type);
+      active = gimp_context_get_by_type (context, gimp_container_get_children_type (container));
 
       if (active)
         {
@@ -83,7 +83,8 @@
                                                        active);
 
           if (new)
-            gimp_context_set_by_type (context, container->children_type,
+            gimp_context_set_by_type (context,
+                                      gimp_container_get_children_type (container),
                                       new);
 
           gimp_container_remove (container, active);

Modified: trunk/app/widgets/gimpcontainerview.c
==============================================================================
--- trunk/app/widgets/gimpcontainerview.c	(original)
+++ trunk/app/widgets/gimpcontainerview.c	Thu Nov 20 23:43:58 2008
@@ -347,7 +347,7 @@
   g_return_if_fail (GIMP_IS_CONTAINER_VIEW (view));
   g_return_if_fail (container == NULL || GIMP_IS_CONTAINER (container));
   if (container)
-    g_return_if_fail (g_type_is_a (container->children_type,
+    g_return_if_fail (g_type_is_a (gimp_container_get_children_type (container),
                                    GIMP_TYPE_VIEWABLE));
 
   private = GIMP_CONTAINER_VIEW_GET_PRIVATE (view);
@@ -392,7 +392,7 @@
 
       if (private->context)
         {
-          GType        children_type = private->container->children_type;
+          GType        children_type = gimp_container_get_children_type (private->container);
           const gchar *signal_name;
 
           signal_name = gimp_context_type_to_signal_name (children_type);
@@ -417,7 +417,7 @@
 
   if (private->container)
     {
-      GType              children_type = private->container->children_type;
+      GType              children_type = gimp_container_get_children_type (private->container);
       GimpViewableClass *viewable_class;
 
       viewable_class = g_type_class_ref (children_type);
@@ -526,7 +526,7 @@
     {
       if (private->container)
         {
-          GType        children_type = private->container->children_type;
+          GType        children_type = gimp_container_get_children_type (private->container);
           const gchar *signal_name;
 
           signal_name = gimp_context_type_to_signal_name (children_type);
@@ -557,7 +557,7 @@
 
       if (private->container)
         {
-          GType        children_type = private->container->children_type;
+          GType        children_type = gimp_container_get_children_type (private->container);
           const gchar *signal_name;
 
           signal_name = gimp_context_type_to_signal_name (children_type);
@@ -800,7 +800,7 @@
   /* HACK */
   if (private->container && private->context)
     {
-      GType        children_type = private->container->children_type;
+      GType        children_type = gimp_container_get_children_type (private->container);
       const gchar *signal_name;
 
       signal_name = gimp_context_type_to_signal_name (children_type);
@@ -830,7 +830,7 @@
                                        view);
 
       gimp_context_set_by_type (context,
-                                private->container->children_type,
+                                gimp_container_get_children_type (private->container),
                                 GIMP_OBJECT (viewable));
 
       g_signal_handlers_unblock_by_func (context,
@@ -1081,7 +1081,7 @@
 
   if (private->context)
     {
-      GType        children_type = private->container->children_type;
+      GType        children_type = gimp_container_get_children_type (private->container);
       const gchar *signal_name;
 
       signal_name = gimp_context_type_to_signal_name (children_type);

Modified: trunk/app/widgets/gimpdataeditor.c
==============================================================================
--- trunk/app/widgets/gimpdataeditor.c	(original)
+++ trunk/app/widgets/gimpdataeditor.c	Thu Nov 20 23:43:58 2008
@@ -353,7 +353,7 @@
 
       g_object_ref (editor->context);
 
-      data_type = editor->data_factory->container->children_type;
+      data_type = gimp_container_get_children_type (editor->data_factory->container);
       data = GIMP_DATA (gimp_context_get_by_type (editor->context, data_type));
 
       g_signal_connect (editor->context,
@@ -496,7 +496,7 @@
   g_return_if_fail (data == NULL || GIMP_IS_DATA (data));
   g_return_if_fail (data == NULL ||
                     g_type_is_a (G_TYPE_FROM_INSTANCE (data),
-                                 editor->data_factory->container->children_type));
+                                 gimp_container_get_children_type (editor->data_factory->container)));
 
   if (editor->data != data)
     {
@@ -533,7 +533,7 @@
           GType     data_type;
           GimpData *data;
 
-          data_type = editor->data_factory->container->children_type;
+          data_type = gimp_container_get_children_type (editor->data_factory->container);
           data = GIMP_DATA (gimp_context_get_by_type (editor->context,
                                                       data_type));
 

Modified: trunk/app/widgets/gimpdatafactoryview.c
==============================================================================
--- trunk/app/widgets/gimpdatafactoryview.c	(original)
+++ trunk/app/widgets/gimpdatafactoryview.c	Thu Nov 20 23:43:58 2008
@@ -198,13 +198,13 @@
 
   gimp_container_view_enable_dnd (editor->view,
                                   GTK_BUTTON (factory_view->edit_button),
-                                  factory->container->children_type);
+                                  gimp_container_get_children_type (factory->container));
   gimp_container_view_enable_dnd (editor->view,
                                   GTK_BUTTON (factory_view->duplicate_button),
-                                  factory->container->children_type);
+                                  gimp_container_get_children_type (factory->container));
   gimp_container_view_enable_dnd (editor->view,
                                   GTK_BUTTON (factory_view->delete_button),
-                                  factory->container->children_type);
+                                  gimp_container_get_children_type (factory->container));
 
   gimp_ui_manager_update (GIMP_EDITOR (editor->view)->ui_manager, editor);
 

Modified: trunk/app/widgets/gimpsettingsbox.c
==============================================================================
--- trunk/app/widgets/gimpsettingsbox.c	(original)
+++ trunk/app/widgets/gimpsettingsbox.c	Thu Nov 20 23:43:58 2008
@@ -427,7 +427,7 @@
 static void
 gimp_settings_box_separator_add (GimpContainer *container)
 {
-  GimpObject *sep = g_object_new (container->children_type, NULL);
+  GimpObject *sep = g_object_new (gimp_container_get_children_type (container), NULL);
 
   gimp_container_add (container, sep);
   g_object_unref (sep);

Modified: trunk/app/widgets/gimpviewablebutton.c
==============================================================================
--- trunk/app/widgets/gimpviewablebutton.c	(original)
+++ trunk/app/widgets/gimpviewablebutton.c	Thu Nov 20 23:43:58 2008
@@ -190,7 +190,7 @@
   gint                index;
 
   object = gimp_context_get_by_type (button->context,
-                                     button->container->children_type);
+                                     gimp_container_get_children_type (button->container));
 
   index = gimp_container_get_child_index (button->container, object);
 
@@ -223,7 +223,7 @@
 
           if (object)
             gimp_context_set_by_type (button->context,
-                                      button->container->children_type,
+                                      gimp_container_get_children_type (button->container),
                                       object);
         }
     }
@@ -321,7 +321,7 @@
       button->dialog_tooltip    = g_strdup (dialog_tooltip);
     }
 
-  prop_name = gimp_context_type_to_prop_name (container->children_type);
+  prop_name = gimp_context_type_to_prop_name (gimp_container_get_children_type (container));
 
   button->view = gimp_prop_view_new (G_OBJECT (context), prop_name,
                                      context, button->button_view_size);



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