Commit bc9424a2 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

app/actions/data-commands.c app/actions/debug-commands.c

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.


svn path=/trunk/; revision=25095
parent b811506a
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.
2008-03-12 Sven Neumann <sven@gimp.org>
* plug-ins/uri/uri-backend-gio.c: added password and question
......
......@@ -299,7 +299,7 @@ data_edit_cmd_callback (GtkAction *action,
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);
}
}
......
......@@ -154,20 +154,21 @@ debug_dump_menus_recurse_menu (GtkWidget *menu,
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");
......
......@@ -181,10 +181,13 @@ dockable_toggle_view_cmd_callback (GtkAction *action,
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 @@ dockable_show_button_bar_cmd_callback (GtkAction *action,
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);
}
}
......@@ -151,8 +151,10 @@ stroke_dialog_new (GimpItem *item,
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);
}
......
......@@ -453,7 +453,9 @@ static void
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,
......
......@@ -117,7 +117,9 @@ gui_message_error_console (GimpMessageSeverity severity,
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;
......
......@@ -665,7 +665,7 @@ gui_device_change_notify (Gimp *gimp)
{
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));
}
......
......@@ -291,7 +291,7 @@ gimp_foreground_select_options_gui (GimpToolOptions *tool_options)
/* 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);
......
......@@ -120,12 +120,12 @@ gimp_ink_options_gui (GimpToolOptions *tool_options)
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 @@ gimp_ink_options_gui (GimpToolOptions *tool_options)
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);
......
......@@ -387,7 +387,7 @@ gimp_color_history_color_clicked (GtkWidget *widget,
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),
......
......@@ -477,13 +477,15 @@ gimp_container_popup_set_view_size (GimpContainerPopup *popup,
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,
......
......@@ -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);
}
}
......
......@@ -579,9 +579,9 @@ gimp_dock_remove_book (GimpDock *dock,
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);
......
......@@ -243,8 +243,8 @@ gimp_dockable_size_request (GtkWidget *widget,
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 @@ gimp_dockable_size_request (GtkWidget *widget,
{
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 @@ gimp_dockable_size_allocate (GtkWidget *widget,
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 @@ gimp_dockable_size_allocate (GtkWidget *widget,
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 @@ gimp_dockable_size_allocate (GtkWidget *widget,
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 @@ gimp_dockable_create_title_layout (GimpDockable *dockable,
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 @@ gimp_dockable_add (GtkContainer *container,
{
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 @@ static void
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 @@ gimp_dockable_remove (GtkContainer *container,
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 @@ gimp_dockable_get_tab_widget_internal (GimpDockable *dockable,
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 @@ void
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 @@ void
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 @@ gimp_dockable_set_context (GimpDockable *dockable,
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 @@ gimp_dockable_get_menu (GimpDockable *dockable,
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;
}
......
......@@ -83,7 +83,7 @@ gimp_session_info_book_serialize (GimpConfigWriter *writer,
{
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",
......
......@@ -174,7 +174,7 @@ gimp_session_info_dock_restore (GimpSessionInfo *info,
{
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));
......
......@@ -462,7 +462,7 @@ gimp_toolbox_style_set (GtkWidget *widget,
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);
......
......@@ -52,7 +52,7 @@ gimp_unit_combo_box_init (GimpUnitComboBox *combo)
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 ();
......
......@@ -228,7 +228,7 @@ gradient_box_new (GimpContainer *container,
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,
......
......@@ -534,7 +534,7 @@ export_dialog (GSList *actions,
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 @@ export_dialog (GSList *actions,
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);
......
......@@ -414,11 +414,11 @@ gimp_enum_stock_box_set_child_padding (GtkWidget *stock_box,
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,
......
......@@ -99,7 +99,7 @@ gimp_frame_size_request (GtkWidget *widget,
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 @@ gimp_frame_size_request (GtkWidget *widget,
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 @@ static void
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))
{
......
......@@ -384,9 +384,8 @@ void
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 @@ gimp_option_menu_set_history (GtkOptionMenu *option_menu,
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 @@ gimp_option_menu_set_sensitive (GtkOptionMenu *option_menu,
GimpOptionMenuSensitivityCallback callback,
gpointer callback_data)