gimp r25095 - in trunk: . app/actions app/dialogs app/display app/gui app/tools app/widgets libgimp libgimpwidgets plug-ins/MapObject plug-ins/common plug-ins/flame plug-ins/helpbrowser plug-ins/script-fu



Author: mitch
Date: Wed Mar 12 16:58:28 2008
New Revision: 25095
URL: http://svn.gnome.org/viewvc/gimp?rev=25095&view=rev

Log:
2008-03-12  Michael Natterer  <mitch gimp org>

	* app/actions/data-commands.c
	* app/actions/debug-commands.c
	* app/actions/dockable-commands.c
	* app/dialogs/stroke-dialog.c
	* app/display/gimpdisplayshell-handlers.c
	* app/gui/gui-message.c
	* app/gui/gui.c
	* app/tools/gimpforegroundselectoptions.c
	* app/tools/gimpinkoptions-gui.c
	* app/widgets/gimpcolordialog.c
	* app/widgets/gimpcontainerpopup.c
	* app/widgets/gimpcontainerview-utils.c
	* app/widgets/gimpdock.c
	* app/widgets/gimpdockable.c
	* app/widgets/gimpsessioninfo-book.c
	* app/widgets/gimpsessioninfo-dock.c
	* app/widgets/gimptoolbox.c
	* app/widgets/gimpunitcombobox.c
	* app/widgets/gimpviewablebox.c
	* libgimp/gimpexport.c
	* libgimpmodule/gimpmodule.h
	* libgimpwidgets/gimpenumwidgets.c
	* libgimpwidgets/gimpframe.c
	* libgimpwidgets/gimpoldwidgets.c
	* libgimpwidgets/gimpwidgets.c
	* plug-ins/MapObject/mapobject_ui.c
	* plug-ins/common/papertile.c
	* plug-ins/common/sinus.c
	* plug-ins/flame/flame.c
	* plug-ins/helpbrowser/gimpthrobber.c
	* plug-ins/script-fu/scheme-wrapper.c
	* plug-ins/script-fu/script-fu-console.c: use accessors instead of
	accessing GtkBin.child and GtkPaned.child1,2 directly.



Modified:
   trunk/ChangeLog
   trunk/app/actions/data-commands.c
   trunk/app/actions/debug-commands.c
   trunk/app/actions/dockable-commands.c
   trunk/app/dialogs/stroke-dialog.c
   trunk/app/display/gimpdisplayshell-handlers.c
   trunk/app/gui/gui-message.c
   trunk/app/gui/gui.c
   trunk/app/tools/gimpforegroundselectoptions.c
   trunk/app/tools/gimpinkoptions-gui.c
   trunk/app/widgets/gimpcolordialog.c
   trunk/app/widgets/gimpcontainerpopup.c
   trunk/app/widgets/gimpcontainerview-utils.c
   trunk/app/widgets/gimpdock.c
   trunk/app/widgets/gimpdockable.c
   trunk/app/widgets/gimpsessioninfo-book.c
   trunk/app/widgets/gimpsessioninfo-dock.c
   trunk/app/widgets/gimptoolbox.c
   trunk/app/widgets/gimpunitcombobox.c
   trunk/app/widgets/gimpviewablebox.c
   trunk/libgimp/gimpexport.c
   trunk/libgimpwidgets/gimpenumwidgets.c
   trunk/libgimpwidgets/gimpframe.c
   trunk/libgimpwidgets/gimpoldwidgets.c
   trunk/libgimpwidgets/gimpwidgets.c
   trunk/plug-ins/MapObject/mapobject_ui.c
   trunk/plug-ins/common/papertile.c
   trunk/plug-ins/common/sinus.c
   trunk/plug-ins/flame/flame.c
   trunk/plug-ins/helpbrowser/gimpthrobber.c
   trunk/plug-ins/script-fu/script-fu-console.c

Modified: trunk/app/actions/data-commands.c
==============================================================================
--- trunk/app/actions/data-commands.c	(original)
+++ trunk/app/actions/data-commands.c	Wed Mar 12 16:58:28 2008
@@ -299,7 +299,7 @@
       dockable = gimp_dialog_factory_dialog_raise (global_dock_factory, screen,
                                                    value, -1);
 
-      gimp_data_editor_set_data (GIMP_DATA_EDITOR (GTK_BIN (dockable)->child),
+      gimp_data_editor_set_data (GIMP_DATA_EDITOR (gtk_bin_get_child (GTK_BIN (dockable))),
                                  data);
     }
 }

Modified: trunk/app/actions/debug-commands.c
==============================================================================
--- trunk/app/actions/debug-commands.c	(original)
+++ trunk/app/actions/debug-commands.c	Wed Mar 12 16:58:28 2008
@@ -154,20 +154,21 @@
                                gint       depth,
                                gchar     *path)
 {
-  GtkWidget   *menu_item;
-  GList       *list;
-  const gchar *label;
-  gchar       *help_page;
-  gchar       *full_path;
-  gchar       *format_str;
+  GList *list;
 
   for (list = GTK_MENU_SHELL (menu)->children; list; list = g_list_next (list))
     {
-      menu_item = GTK_WIDGET (list->data);
+      GtkWidget *menu_item = GTK_WIDGET (list->data);
+      GtkWidget *child     = gtk_bin_get_child (GTK_BIN (menu_item));
 
-      if (GTK_IS_LABEL (GTK_BIN (menu_item)->child))
+      if (GTK_IS_LABEL (child))
         {
-          label = gtk_label_get_text (GTK_LABEL (GTK_BIN (menu_item)->child));
+          const gchar *label;
+          gchar       *full_path;
+          gchar       *help_page;
+          gchar       *format_str;
+
+          label = gtk_label_get_text (GTK_LABEL (child));
           full_path = g_strconcat (path, "/", label, NULL);
 
           help_page = g_object_get_data (G_OBJECT (menu_item), "gimp-help-id");

Modified: trunk/app/actions/dockable-commands.c
==============================================================================
--- trunk/app/actions/dockable-commands.c	(original)
+++ trunk/app/actions/dockable-commands.c	Wed Mar 12 16:58:28 2008
@@ -181,10 +181,13 @@
 
               if (new_dockable)
                 {
-                  GimpDocked *old = GIMP_DOCKED (GTK_BIN (dockable)->child);
-                  GimpDocked *new = GIMP_DOCKED (GTK_BIN (new_dockable)->child);
+                  GimpDocked *old;
+                  GimpDocked *new;
                   gboolean    show;
 
+                  old = GIMP_DOCKED (gtk_bin_get_child (GTK_BIN (dockable)));
+                  new = GIMP_DOCKED (gtk_bin_get_child (GTK_BIN (new_dockable)));
+
                   show = gimp_docked_get_show_button_bar (old);
                   gimp_docked_set_show_button_bar (new, show);
                 }
@@ -291,9 +294,12 @@
 
   if (dockable)
     {
-      gboolean show = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
+      GimpDocked *docked;
+      gboolean    show;
+
+      docked = GIMP_DOCKED (gtk_bin_get_child (GTK_BIN (dockable)));
+      show   = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
 
-      gimp_docked_set_show_button_bar (GIMP_DOCKED (GTK_BIN (dockable)->child),
-                                       show);
+      gimp_docked_set_show_button_bar (docked, show);
     }
 }

Modified: trunk/app/dialogs/stroke-dialog.c
==============================================================================
--- trunk/app/dialogs/stroke-dialog.c	(original)
+++ trunk/app/dialogs/stroke-dialog.c	Wed Mar 12 16:58:28 2008
@@ -151,8 +151,10 @@
     font_desc = pango_font_description_new ();
     pango_font_description_set_weight (font_desc, PANGO_WEIGHT_BOLD);
 
-    gtk_widget_modify_font (GTK_BIN (libart_radio)->child, font_desc);
-    gtk_widget_modify_font (GTK_BIN (paint_radio)->child,  font_desc);
+    gtk_widget_modify_font (gtk_bin_get_child (GTK_BIN (libart_radio)),
+                            font_desc);
+    gtk_widget_modify_font (gtk_bin_get_child (GTK_BIN (paint_radio)),
+                            font_desc);
 
     pango_font_description_free (font_desc);
   }

Modified: trunk/app/display/gimpdisplayshell-handlers.c
==============================================================================
--- trunk/app/display/gimpdisplayshell-handlers.c	(original)
+++ trunk/app/display/gimpdisplayshell-handlers.c	Wed Mar 12 16:58:28 2008
@@ -453,7 +453,9 @@
 gimp_display_shell_quick_mask_changed_handler (GimpImage        *image,
                                                GimpDisplayShell *shell)
 {
-  GtkImage *gtk_image = GTK_IMAGE (GTK_BIN (shell->quick_mask_button)->child);
+  GtkImage *gtk_image;
+
+  gtk_image = GTK_IMAGE (gtk_bin_get_child (GTK_BIN (shell->quick_mask_button)));
 
   g_signal_handlers_block_by_func (shell->quick_mask_button,
                                    gimp_display_shell_quick_mask_toggled,

Modified: trunk/app/gui/gui-message.c
==============================================================================
--- trunk/app/gui/gui-message.c	(original)
+++ trunk/app/gui/gui-message.c	Wed Mar 12 16:58:28 2008
@@ -117,7 +117,9 @@
 
   if (dockable)
     {
-      gimp_error_console_add (GIMP_ERROR_CONSOLE (GTK_BIN (dockable)->child),
+      GtkWidget *child = gtk_bin_get_child (GTK_BIN (dockable));
+
+      gimp_error_console_add (GIMP_ERROR_CONSOLE (child),
                               severity, domain, message);
 
       return TRUE;

Modified: trunk/app/gui/gui.c
==============================================================================
--- trunk/app/gui/gui.c	(original)
+++ trunk/app/gui/gui.c	Wed Mar 12 16:58:28 2008
@@ -665,7 +665,7 @@
     {
       GtkWidget *device_status;
 
-      device_status = GTK_BIN (session_info->widget)->child;
+      device_status = gtk_bin_get_child (GTK_BIN (session_info->widget));
 
       gimp_device_status_update (GIMP_DEVICE_STATUS (device_status));
     }

Modified: trunk/app/tools/gimpforegroundselectoptions.c
==============================================================================
--- trunk/app/tools/gimpforegroundselectoptions.c	(original)
+++ trunk/app/tools/gimpforegroundselectoptions.c	Wed Mar 12 16:58:28 2008
@@ -291,7 +291,7 @@
 
   /*  stroke width  */
   inner_frame = gtk_vbox_new (FALSE, 0);
-  gtk_box_pack_start (GTK_BOX (GTK_BIN (frame)->child),
+  gtk_box_pack_start (GTK_BOX (gtk_bin_get_child (GTK_BIN (frame))),
                       inner_frame, FALSE, FALSE, 2);
   gtk_widget_show (inner_frame);
 

Modified: trunk/app/tools/gimpinkoptions-gui.c
==============================================================================
--- trunk/app/tools/gimpinkoptions-gui.c	(original)
+++ trunk/app/tools/gimpinkoptions-gui.c	Wed Mar 12 16:58:28 2008
@@ -120,12 +120,12 @@
   gtk_widget_show (frame);
 
   {
+    GtkWidget       *frame_child = gtk_bin_get_child (GTK_BIN (frame));
     GList           *children;
     GList           *list;
     GimpInkBlobType  blob_type;
 
-    children =
-      gtk_container_get_children (GTK_CONTAINER (GTK_BIN (frame)->child));
+    children = gtk_container_get_children (GTK_CONTAINER (frame_child));
 
     for (list = children, blob_type = GIMP_INK_BLOB_TYPE_ELLIPSE;
          list;
@@ -134,7 +134,8 @@
         GtkWidget *radio = GTK_WIDGET (list->data);
         GtkWidget *blob;
 
-        gtk_container_remove (GTK_CONTAINER (radio), GTK_BIN (radio)->child);
+        gtk_container_remove (GTK_CONTAINER (radio),
+                              gtk_bin_get_child (GTK_BIN (radio)));
 
         blob = blob_image_new (blob_type);
         gtk_container_add (GTK_CONTAINER (radio), blob);

Modified: trunk/app/widgets/gimpcolordialog.c
==============================================================================
--- trunk/app/widgets/gimpcolordialog.c	(original)
+++ trunk/app/widgets/gimpcolordialog.c	Wed Mar 12 16:58:28 2008
@@ -387,7 +387,7 @@
   GimpColorArea *color_area;
   GimpRGB        color;
 
-  color_area = GIMP_COLOR_AREA (GTK_BIN (widget)->child);
+  color_area = GIMP_COLOR_AREA (gtk_bin_get_child (GTK_BIN (widget)));
 
   gimp_color_area_get_color (color_area, &color);
   gimp_color_selection_set_color (GIMP_COLOR_SELECTION (dialog->selection),

Modified: trunk/app/widgets/gimpcontainerpopup.c
==============================================================================
--- trunk/app/widgets/gimpcontainerpopup.c	(original)
+++ trunk/app/widgets/gimpcontainerpopup.c	Wed Mar 12 16:58:28 2008
@@ -477,13 +477,15 @@
                                     gint                view_size)
 {
   GtkWidget *scrolled_win;
+  GtkWidget *viewport;
   gint       viewport_width;
 
   g_return_if_fail (GIMP_IS_CONTAINER_POPUP (popup));
 
   scrolled_win = GIMP_CONTAINER_BOX (popup->editor->view)->scrolled_win;
+  viewport     = gtk_bin_get_child (GTK_BIN (scrolled_win));
 
-  viewport_width = GTK_BIN (scrolled_win)->child->allocation.width;
+  viewport_width = viewport->allocation.width;
 
   view_size = CLAMP (view_size, GIMP_VIEW_SIZE_TINY,
                      MIN (GIMP_VIEW_SIZE_GIGANTIC,

Modified: trunk/app/widgets/gimpcontainerview-utils.c
==============================================================================
--- trunk/app/widgets/gimpcontainerview-utils.c	(original)
+++ trunk/app/widgets/gimpcontainerview-utils.c	Wed Mar 12 16:58:28 2008
@@ -37,21 +37,21 @@
 GimpContainerView *
 gimp_container_view_get_by_dockable (GimpDockable *dockable)
 {
-  GtkBin *bin;
+  GtkWidget *child;
 
   g_return_val_if_fail (GIMP_IS_DOCKABLE (dockable), NULL);
 
-  bin = GTK_BIN (dockable);
+  child = gtk_bin_get_child (GTK_BIN (dockable));
 
-  if (bin->child)
+  if (child)
     {
-      if (GIMP_IS_CONTAINER_EDITOR (bin->child))
+      if (GIMP_IS_CONTAINER_EDITOR (child))
         {
-          return GIMP_CONTAINER_EDITOR (bin->child)->view;
+          return GIMP_CONTAINER_EDITOR (child)->view;
         }
-      else if (GIMP_IS_CONTAINER_VIEW (bin->child))
+      else if (GIMP_IS_CONTAINER_VIEW (child))
         {
-          return GIMP_CONTAINER_VIEW (bin->child);
+          return GIMP_CONTAINER_VIEW (child);
         }
     }
 

Modified: trunk/app/widgets/gimpdock.c
==============================================================================
--- trunk/app/widgets/gimpdock.c	(original)
+++ trunk/app/widgets/gimpdock.c	Wed Mar 12 16:58:28 2008
@@ -579,9 +579,9 @@
       grandparent = parent->parent;
 
       if (index == 0)
-        other_book = GTK_PANED (parent)->child2;
+        other_book = gtk_paned_get_child2 (GTK_PANED (parent));
       else
-        other_book = GTK_PANED (parent)->child1;
+        other_book = gtk_paned_get_child1 (GTK_PANED (parent));
 
       g_object_ref (other_book);
 

Modified: trunk/app/widgets/gimpdockable.c
==============================================================================
--- trunk/app/widgets/gimpdockable.c	(original)
+++ trunk/app/widgets/gimpdockable.c	Wed Mar 12 16:58:28 2008
@@ -243,8 +243,8 @@
                             GtkRequisition *requisition)
 {
   GtkContainer   *container = GTK_CONTAINER (widget);
-  GtkBin         *bin       = GTK_BIN (widget);
   GimpDockable   *dockable  = GIMP_DOCKABLE (widget);
+  GtkWidget      *child     = gtk_bin_get_child (GTK_BIN (widget));
   GtkRequisition  child_requisition;
 
   requisition->width  = container->border_width * 2;
@@ -254,15 +254,15 @@
     {
       gtk_widget_size_request (dockable->menu_button, &child_requisition);
 
-      if (! bin->child)
+      if (! child)
         requisition->width += child_requisition.width;
 
       requisition->height += child_requisition.height;
     }
 
-  if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+  if (child && GTK_WIDGET_VISIBLE (child))
     {
-      gtk_widget_size_request (bin->child, &child_requisition);
+      gtk_widget_size_request (child, &child_requisition);
 
       requisition->width  += child_requisition.width;
       requisition->height += child_requisition.height;
@@ -274,8 +274,8 @@
                              GtkAllocation *allocation)
 {
   GtkContainer   *container = GTK_CONTAINER (widget);
-  GtkBin         *bin       = GTK_BIN (widget);
   GimpDockable   *dockable  = GIMP_DOCKABLE (widget);
+  GtkWidget      *child     = gtk_bin_get_child (GTK_BIN (widget));
 
   GtkRequisition  button_requisition = { 0, };
   GtkAllocation   child_allocation;
@@ -301,7 +301,7 @@
       gtk_widget_size_allocate (dockable->menu_button, &child_allocation);
     }
 
-  if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+  if (child && GTK_WIDGET_VISIBLE (child))
     {
       child_allocation.x      = allocation->x + container->border_width;
       child_allocation.y      = allocation->y + container->border_width;
@@ -315,7 +315,7 @@
 
       child_allocation.y += button_requisition.height;
 
-      gtk_widget_size_allocate (bin->child, &child_allocation);
+      gtk_widget_size_allocate (child, &child_allocation);
     }
 
   if (dockable->title_window)
@@ -469,12 +469,12 @@
                                    GtkWidget    *widget,
                                    gint          width)
 {
-  PangoLayout    *layout;
-  GtkBin         *bin  = GTK_BIN (dockable);
-  gchar          *title = NULL;
+  GtkWidget   *child = gtk_bin_get_child (GTK_BIN (dockable));
+  PangoLayout *layout;
+  gchar       *title = NULL;
 
-  if (bin->child)
-    title = gimp_docked_get_title (GIMP_DOCKED (bin->child));
+  if (child)
+    title = gimp_docked_get_title (GIMP_DOCKED (child));
 
   layout = gtk_widget_create_pango_layout (widget,
                                            title ? title : dockable->blurb);
@@ -588,7 +588,7 @@
 {
   GimpDockable *dockable;
 
-  g_return_if_fail (GTK_BIN (container)->child == NULL);
+  g_return_if_fail (gtk_bin_get_child (GTK_BIN (container)) == NULL);
 
   GTK_CONTAINER_CLASS (parent_class)->add (container, widget);
 
@@ -605,7 +605,7 @@
 gimp_dockable_remove (GtkContainer *container,
                       GtkWidget    *widget)
 {
-  g_return_if_fail (GTK_BIN (container)->child == widget);
+  g_return_if_fail (gtk_bin_get_child (GTK_BIN (container)) == widget);
 
   g_signal_handlers_disconnect_by_func (widget,
                                         gimp_dockable_title_changed,
@@ -617,7 +617,7 @@
 static GType
 gimp_dockable_child_type (GtkContainer *container)
 {
-  if (GTK_BIN (container)->child)
+  if (gtk_bin_get_child (GTK_BIN (container)))
     return G_TYPE_NONE;
 
   return GIMP_TYPE_DOCKED;
@@ -681,12 +681,16 @@
     case GIMP_TAB_STYLE_PREVIEW:
     case GIMP_TAB_STYLE_PREVIEW_NAME:
     case GIMP_TAB_STYLE_PREVIEW_BLURB:
-      if (GTK_BIN (dockable)->child)
-        icon = gimp_docked_get_preview (GIMP_DOCKED (GTK_BIN (dockable)->child),
-                                        context, size);
+      {
+        GtkWidget *child = gtk_bin_get_child (GTK_BIN (dockable));
+
+        if (child)
+          icon = gimp_docked_get_preview (GIMP_DOCKED (child),
+                                          context, size);
 
-      if (! icon)
-        icon = gtk_image_new_from_stock (dockable->stock_id, size);
+        if (! icon)
+          icon = gtk_image_new_from_stock (dockable->stock_id, size);
+      }
       break;
 
     default:
@@ -761,21 +765,27 @@
 gimp_dockable_set_aux_info (GimpDockable *dockable,
                             GList        *aux_info)
 {
+  GtkWidget *child;
+
   g_return_if_fail (GIMP_IS_DOCKABLE (dockable));
 
-  if (GTK_BIN (dockable)->child)
-    gimp_docked_set_aux_info (GIMP_DOCKED (GTK_BIN (dockable)->child),
-                              aux_info);
+  child = gtk_bin_get_child (GTK_BIN (dockable));
+
+  if (child)
+    gimp_docked_set_aux_info (GIMP_DOCKED (child), aux_info);
 }
 
 GList *
 gimp_dockable_get_aux_info (GimpDockable *dockable)
 {
+  GtkWidget *child;
+
   g_return_val_if_fail (GIMP_IS_DOCKABLE (dockable), NULL);
 
+  child = gtk_bin_get_child (GTK_BIN (dockable));
 
-  if (GTK_BIN (dockable)->child)
-    return gimp_docked_get_aux_info (GIMP_DOCKED (GTK_BIN (dockable)->child));
+  if (child)
+    return gimp_docked_get_aux_info (GIMP_DOCKED (child));
 
   return NULL;
 }
@@ -784,10 +794,13 @@
 gimp_dockable_set_tab_style (GimpDockable *dockable,
                              GimpTabStyle  tab_style)
 {
+  GtkWidget *child;
+
   g_return_if_fail (GIMP_IS_DOCKABLE (dockable));
 
-  if (GTK_BIN (dockable)->child &&
-      ! GIMP_DOCKED_GET_INTERFACE (GTK_BIN (dockable)->child)->get_preview)
+  child = gtk_bin_get_child (GTK_BIN (dockable));
+
+  if (child && ! GIMP_DOCKED_GET_INTERFACE (child)->get_preview)
     {
       switch (tab_style)
         {
@@ -856,9 +869,10 @@
 
   if (context != dockable->context)
     {
-      if (GTK_BIN (dockable)->child)
-        gimp_docked_set_context (GIMP_DOCKED (GTK_BIN (dockable)->child),
-                                 context);
+      GtkWidget *child = gtk_bin_get_child (GTK_BIN (dockable));
+
+      if (child)
+        gimp_docked_set_context (GIMP_DOCKED (child), context);
 
       dockable->context = context;
     }
@@ -869,13 +883,16 @@
                         const gchar  **ui_path,
                         gpointer      *popup_data)
 {
+  GtkWidget *child;
+
   g_return_val_if_fail (GIMP_IS_DOCKABLE (dockable), NULL);
   g_return_val_if_fail (ui_path != NULL, NULL);
   g_return_val_if_fail (popup_data != NULL, NULL);
 
-  if (GTK_BIN (dockable)->child)
-    return gimp_docked_get_menu (GIMP_DOCKED (GTK_BIN (dockable)->child),
-                                 ui_path, popup_data);
+  child = gtk_bin_get_child (GTK_BIN (dockable));
+
+  if (child)
+    return gimp_docked_get_menu (GIMP_DOCKED (child), ui_path, popup_data);
 
   return NULL;
 }

Modified: trunk/app/widgets/gimpsessioninfo-book.c
==============================================================================
--- trunk/app/widgets/gimpsessioninfo-book.c	(original)
+++ trunk/app/widgets/gimpsessioninfo-book.c	Wed Mar 12 16:58:28 2008
@@ -83,7 +83,7 @@
     {
       GtkPaned *paned = GTK_PANED (GTK_WIDGET (dockbook)->parent);
 
-      if (GTK_WIDGET (dockbook) == paned->child2)
+      if (GTK_WIDGET (dockbook) == gtk_paned_get_child2 (paned))
         {
           gimp_config_writer_open (writer, "position");
           gimp_config_writer_printf (writer, "%d",

Modified: trunk/app/widgets/gimpsessioninfo-dock.c
==============================================================================
--- trunk/app/widgets/gimpsessioninfo-dock.c	(original)
+++ trunk/app/widgets/gimpsessioninfo-dock.c	Wed Mar 12 16:58:28 2008
@@ -174,7 +174,7 @@
         {
           GtkPaned *paned = GTK_PANED (dockbook->parent);
 
-          if (dockbook == paned->child2)
+          if (dockbook == gtk_paned_get_child2 (paned))
             g_signal_connect_after (paned, "map",
                                     G_CALLBACK (gimp_session_info_dock_paned_map),
                                     GINT_TO_POINTER (book_info->position));

Modified: trunk/app/widgets/gimptoolbox.c
==============================================================================
--- trunk/app/widgets/gimptoolbox.c	(original)
+++ trunk/app/widgets/gimptoolbox.c	Wed Mar 12 16:58:28 2008
@@ -462,7 +462,7 @@
           GtkImage *image;
           gchar    *stock_id;
 
-          image = GTK_IMAGE (GTK_BIN (tool_button)->child);
+          image = GTK_IMAGE (gtk_bin_get_child (GTK_BIN (tool_button)));
 
           gtk_image_get_stock (image, &stock_id, NULL);
           gtk_image_set_from_stock (image, stock_id, tool_icon_size);

Modified: trunk/app/widgets/gimpunitcombobox.c
==============================================================================
--- trunk/app/widgets/gimpunitcombobox.c	(original)
+++ trunk/app/widgets/gimpunitcombobox.c	Wed Mar 12 16:58:28 2008
@@ -52,7 +52,7 @@
                                   NULL);
 
   /*  hackedehack ...  */
-  layout = GTK_CELL_LAYOUT (GTK_BIN (combo)->child);
+  layout = GTK_CELL_LAYOUT (gtk_bin_get_child (GTK_BIN (combo)));
   gtk_cell_layout_clear (layout);
 
   cell = gtk_cell_renderer_text_new ();

Modified: trunk/app/widgets/gimpviewablebox.c
==============================================================================
--- trunk/app/widgets/gimpviewablebox.c	(original)
+++ trunk/app/widgets/gimpviewablebox.c	Wed Mar 12 16:58:28 2008
@@ -228,7 +228,7 @@
       gtk_container_add (GTK_CONTAINER (toggle), image);
       gtk_widget_show (image);
 
-      view = GTK_BIN (button)->child;
+      view = gtk_bin_get_child (GTK_BIN (button));
 
       signal_name = g_strconcat ("notify::", reverse_prop, NULL);
       g_signal_connect_object (context, signal_name,

Modified: trunk/libgimp/gimpexport.c
==============================================================================
--- trunk/libgimp/gimpexport.c	(original)
+++ trunk/libgimp/gimpexport.c	Wed Mar 12 16:58:28 2008
@@ -534,7 +534,7 @@
 
           button = gtk_radio_button_new_with_label (radio_group,
                                                     gettext (action->possibilities[0]));
-          gtk_label_set_justify (GTK_LABEL (GTK_BIN (button)->child),
+          gtk_label_set_justify (GTK_LABEL (gtk_bin_get_child (GTK_BIN (button))),
                                  GTK_JUSTIFY_LEFT);
           radio_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button));
           gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
@@ -547,7 +547,7 @@
 
           button = gtk_radio_button_new_with_label (radio_group,
                                                     gettext (action->possibilities[1]));
-          gtk_label_set_justify (GTK_LABEL (GTK_BIN (button)->child),
+          gtk_label_set_justify (GTK_LABEL (gtk_bin_get_child (GTK_BIN (button))),
                                  GTK_JUSTIFY_LEFT);
           radio_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button));
           gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);

Modified: trunk/libgimpwidgets/gimpenumwidgets.c
==============================================================================
--- trunk/libgimpwidgets/gimpenumwidgets.c	(original)
+++ trunk/libgimpwidgets/gimpenumwidgets.c	Wed Mar 12 16:58:28 2008
@@ -414,11 +414,11 @@
 
   for (list = children; list; list = g_list_next (list))
     {
-      GtkBin *bin = list->data;
+      GtkWidget *child = gtk_bin_get_child (GTK_BIN (list->data));
 
-      if (GTK_IS_MISC (bin->child))
+      if (GTK_IS_MISC (child))
         {
-          GtkMisc *misc = GTK_MISC (bin->child);
+          GtkMisc *misc = GTK_MISC (child);
 
           gtk_misc_set_padding (misc,
                                 xpad < 0 ? misc->xpad : xpad,

Modified: trunk/libgimpwidgets/gimpframe.c
==============================================================================
--- trunk/libgimpwidgets/gimpframe.c	(original)
+++ trunk/libgimpwidgets/gimpframe.c	Wed Mar 12 16:58:28 2008
@@ -99,7 +99,7 @@
                          GtkRequisition *requisition)
 {
   GtkFrame       *frame = GTK_FRAME (widget);
-  GtkBin         *bin   = GTK_BIN (widget);
+  GtkWidget      *child = gtk_bin_get_child (GTK_BIN (widget));
   GtkRequisition  child_requisition;
 
   if (frame->label_widget && GTK_WIDGET_VISIBLE (frame->label_widget))
@@ -114,11 +114,11 @@
 
   requisition->height += gimp_frame_get_label_spacing (frame);
 
-  if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+  if (child && GTK_WIDGET_VISIBLE (child))
     {
       gint indent = gimp_frame_get_indent (widget);
 
-      gtk_widget_size_request (bin->child, &child_requisition);
+      gtk_widget_size_request (child, &child_requisition);
 
       requisition->width = MAX (requisition->width,
                                 child_requisition.width + indent);
@@ -133,15 +133,15 @@
 gimp_frame_size_allocate (GtkWidget     *widget,
                           GtkAllocation *allocation)
 {
-  GtkFrame *frame = GTK_FRAME (widget);
-  GtkBin   *bin   = GTK_BIN (widget);
+  GtkFrame  *frame = GTK_FRAME (widget);
+  GtkWidget *child = gtk_bin_get_child (GTK_BIN (widget));
 
   widget->allocation = *allocation;
 
   gimp_frame_child_allocate (frame, &frame->child_allocation);
 
-  if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
-    gtk_widget_size_allocate (bin->child, &frame->child_allocation);
+  if (child && GTK_WIDGET_VISIBLE (child))
+    gtk_widget_size_allocate (child, &frame->child_allocation);
 
   if (frame->label_widget && GTK_WIDGET_VISIBLE (frame->label_widget))
     {

Modified: trunk/libgimpwidgets/gimpoldwidgets.c
==============================================================================
--- trunk/libgimpwidgets/gimpoldwidgets.c	(original)
+++ trunk/libgimpwidgets/gimpoldwidgets.c	Wed Mar 12 16:58:28 2008
@@ -384,9 +384,8 @@
 gimp_option_menu_set_history (GtkOptionMenu *option_menu,
                               gpointer       item_data)
 {
-  GtkWidget *menu_item;
-  GList     *list;
-  gint       history = 0;
+  GList *list;
+  gint   history = 0;
 
   g_return_if_fail (GTK_IS_OPTION_MENU (option_menu));
 
@@ -394,9 +393,9 @@
        list;
        list = g_list_next (list))
     {
-      menu_item = GTK_WIDGET (list->data);
+      GtkWidget *menu_item = GTK_WIDGET (list->data);
 
-      if (GTK_IS_LABEL (GTK_BIN (menu_item)->child) &&
+      if (GTK_IS_LABEL (gtk_bin_get_child (GTK_BIN (menu_item))) &&
           g_object_get_data (G_OBJECT (menu_item),
                              "gimp-item-data") == item_data)
         {
@@ -447,10 +446,7 @@
                                 GimpOptionMenuSensitivityCallback  callback,
                                 gpointer                           callback_data)
 {
-  GtkWidget *menu_item;
-  GList     *list;
-  gpointer   item_data;
-  gboolean   sensitive;
+  GList *list;
 
   g_return_if_fail (GTK_IS_OPTION_MENU (option_menu));
   g_return_if_fail (callback != NULL);
@@ -459,10 +455,13 @@
        list;
        list = g_list_next (list))
     {
-      menu_item = GTK_WIDGET (list->data);
+      GtkWidget *menu_item = GTK_WIDGET (list->data);
 
-      if (GTK_IS_LABEL (GTK_BIN (menu_item)->child))
+      if (GTK_IS_LABEL (gtk_bin_get_child (GTK_BIN (menu_item))))
         {
+          gpointer item_data;
+          gboolean sensitive;
+
           item_data = g_object_get_data (G_OBJECT (menu_item),
                                          "gimp-item-data");
           sensitive = callback (item_data, callback_data);
@@ -490,10 +489,7 @@
                                     GimpIntOptionMenuSensitivityCallback  callback,
                                     gpointer                              callback_data)
 {
-  GtkWidget *menu_item;
-  GList     *list;
-  gint       item_data;
-  gboolean   sensitive;
+  GList *list;
 
   g_return_if_fail (GTK_IS_OPTION_MENU (option_menu));
   g_return_if_fail (callback != NULL);
@@ -502,10 +498,13 @@
        list;
        list = g_list_next (list))
     {
-      menu_item = GTK_WIDGET (list->data);
+      GtkWidget *menu_item = GTK_WIDGET (list->data);
 
-      if (GTK_IS_LABEL (GTK_BIN (menu_item)->child))
+      if (GTK_IS_LABEL (gtk_bin_get_child (GTK_BIN (menu_item))))
         {
+          gint     item_data;
+          gboolean sensitive;
+
           item_data = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (menu_item),
                                                           "gimp-item-data"));
           sensitive = callback (item_data, callback_data);
@@ -525,9 +524,7 @@
 gimp_menu_item_update (GtkWidget *widget,
                        gpointer   data)
 {
-  gint *item_val;
-
-  item_val = (gint *) data;
+  gint *item_val = (gint *) data;
 
   *item_val = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget),
                                                   "gimp-item-data"));

Modified: trunk/libgimpwidgets/gimpwidgets.c
==============================================================================
--- trunk/libgimpwidgets/gimpwidgets.c	(original)
+++ trunk/libgimpwidgets/gimpwidgets.c	Wed Mar 12 16:58:28 2008
@@ -513,7 +513,7 @@
                              "given \"random\" operation"), NULL);
 
   button = gtk_button_new_with_mnemonic (_("_New Seed"));
-  gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 2, 0);
+  gtk_misc_set_padding (GTK_MISC (gtk_bin_get_child (GTK_BIN (button))), 2, 0);
   gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
   gtk_widget_show (button);
 

Modified: trunk/plug-ins/MapObject/mapobject_ui.c
==============================================================================
--- trunk/plug-ins/MapObject/mapobject_ui.c	(original)
+++ trunk/plug-ins/MapObject/mapobject_ui.c	Wed Mar 12 16:58:28 2008
@@ -1386,7 +1386,7 @@
   gtk_widget_show (hbox);
 
   button = gtk_button_new_with_mnemonic (_("_Preview!"));
-  gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 2, 0);
+  gtk_misc_set_padding (GTK_MISC (gtk_bin_get_child (GTK_BIN (button))), 2, 0);
   gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
   gtk_widget_show (button);
 

Modified: trunk/plug-ins/common/papertile.c
==============================================================================
--- trunk/plug-ins/common/papertile.c	(original)
+++ trunk/plug-ins/common/papertile.c	Wed Mar 12 16:58:28 2008
@@ -403,7 +403,7 @@
                                         p.drawable_has_alpha ?
                                         GIMP_COLOR_AREA_SMALL_CHECKS :
                                         GIMP_COLOR_AREA_FLAT);
-  gtk_box_pack_start (GTK_BOX (GTK_BIN (frame)->child),
+  gtk_box_pack_start (GTK_BOX (gtk_bin_get_child (GTK_BIN (frame))),
                       color_button, TRUE, TRUE, 0);
   gtk_widget_show (color_button);
 

Modified: trunk/plug-ins/common/sinus.c
==============================================================================
--- trunk/plug-ins/common/sinus.c	(original)
+++ trunk/plug-ins/common/sinus.c	Wed Mar 12 16:58:28 2008
@@ -811,7 +811,7 @@
       gtk_box_pack_start(GTK_BOX(page), frame, FALSE, FALSE, 0);
       gtk_widget_show (frame);
 
-      vbox = GTK_BIN (frame)->child;
+      vbox = gtk_bin_get_child (GTK_BIN (frame));
 
       hbox = gtk_hbox_new (FALSE, 12);
       gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);

Modified: trunk/plug-ins/flame/flame.c
==============================================================================
--- trunk/plug-ins/flame/flame.c	(original)
+++ trunk/plug-ins/flame/flame.c	Wed Mar 12 16:58:28 2008
@@ -733,7 +733,8 @@
       gtk_widget_show (hbox);
 
       button = gtk_button_new_with_mnemonic( _("_Randomize"));
-      gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 2, 0);
+      gtk_misc_set_padding (GTK_MISC (gtk_bin_get_child (GTK_BIN (button))),
+                            2, 0);
       gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
       gtk_widget_show (button);
 

Modified: trunk/plug-ins/helpbrowser/gimpthrobber.c
==============================================================================
--- trunk/plug-ins/helpbrowser/gimpthrobber.c	(original)
+++ trunk/plug-ins/helpbrowser/gimpthrobber.c	Wed Mar 12 16:58:28 2008
@@ -176,8 +176,8 @@
     gtk_container_remove (GTK_CONTAINER (button->priv->image->parent),
                           button->priv->image);
 
-  if (GTK_BIN (button->priv->button)->child)
-    gtk_widget_destroy (GTK_BIN (button->priv->button)->child);
+  if (gtk_bin_get_child (GTK_BIN (button->priv->button)))
+    gtk_widget_destroy (gtk_bin_get_child (GTK_BIN (button->priv->button)));
 
   if (gtk_tool_item_get_toolbar_style (tool_item) == GTK_TOOLBAR_TEXT)
     {

Modified: trunk/plug-ins/script-fu/script-fu-console.c
==============================================================================
--- trunk/plug-ins/script-fu/script-fu-console.c	(original)
+++ trunk/plug-ins/script-fu/script-fu-console.c	Wed Mar 12 16:58:28 2008
@@ -236,7 +236,7 @@
                     &console);
 
   button = gtk_button_new_with_mnemonic (_("_Browse..."));
-  gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 2, 0);
+  gtk_misc_set_padding (GTK_MISC (gtk_bin_get_child (GTK_BIN (button))), 2, 0);
   gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, TRUE, 0);
   gtk_widget_show (button);
 



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