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

app/widgets/gimpblobeditor.c app/widgets/gimpbrushselect.c

2009-03-22  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpblobeditor.c
	* app/widgets/gimpbrushselect.c
	* app/widgets/gimpcolorbar.c
	* app/widgets/gimpcolordialog.c
	* app/widgets/gimpcolorframe.c
	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimpcontainerpopup.c
	* app/widgets/gimpcontainertreeview.c
	* app/widgets/gimpcontrollereditor.c
	* app/widgets/gimpcontrollerlist.c
	* app/widgets/gimpcursor.c
	* app/widgets/gimpcurveview.c
	* app/widgets/gimpdasheditor.c
	* app/widgets/gimpdialogfactory.c
	* app/widgets/gimpdnd-xds.c
	* app/widgets/gimpdockable.c
	* app/widgets/gimperrordialog.c
	* app/widgets/gimpfgbgeditor.c
	* app/widgets/gimpfgbgview.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimpfontselect.c
	* app/widgets/gimpgradienteditor.c
	* app/widgets/gimpgradientselect.c
	* app/widgets/gimphandlebar.c
	* app/widgets/gimphistogrambox.c
	* app/widgets/gimphistogramview.c
	* app/widgets/gimpmessagedialog.c
	* app/widgets/gimpnavigationview.c
	* app/widgets/gimppaletteselect.c
	* app/widgets/gimppaletteview.c
	* app/widgets/gimppatternselect.c
	* app/widgets/gimpprogressbox.c
	* app/widgets/gimpprogressdialog.c
	* app/widgets/gimpscalebutton.c
	* app/widgets/gimpselectiondata.c
	* app/widgets/gimpsessioninfo.c
	* app/widgets/gimpsettingsbox.c
	* app/widgets/gimpstrokeeditor.c
	* app/widgets/gimptexteditor.c
	* app/widgets/gimptoolbox.c
	* app/widgets/gimpuimanager.c
	* app/widgets/gimpview-popup.c
	* app/widgets/gimpview.c
	* app/widgets/gimpviewabledialog.c
	* app/widgets/gimpwidgets-utils.c: use accessors for various
	members of GTK+ structures that don't exist any longer when
	GSEAL_ENABLE is defined.


svn path=/trunk/; revision=28193
parent d3dcff66
2009-03-22 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpblobeditor.c
* app/widgets/gimpbrushselect.c
* app/widgets/gimpcolorbar.c
* app/widgets/gimpcolordialog.c
* app/widgets/gimpcolorframe.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainerpopup.c
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpcontrollereditor.c
* app/widgets/gimpcontrollerlist.c
* app/widgets/gimpcursor.c
* app/widgets/gimpcurveview.c
* app/widgets/gimpdasheditor.c
* app/widgets/gimpdialogfactory.c
* app/widgets/gimpdnd-xds.c
* app/widgets/gimpdockable.c
* app/widgets/gimperrordialog.c
* app/widgets/gimpfgbgeditor.c
* app/widgets/gimpfgbgview.c
* app/widgets/gimpfiledialog.c
* app/widgets/gimpfontselect.c
* app/widgets/gimpgradienteditor.c
* app/widgets/gimpgradientselect.c
* app/widgets/gimphandlebar.c
* app/widgets/gimphistogrambox.c
* app/widgets/gimphistogramview.c
* app/widgets/gimpmessagedialog.c
* app/widgets/gimpnavigationview.c
* app/widgets/gimppaletteselect.c
* app/widgets/gimppaletteview.c
* app/widgets/gimppatternselect.c
* app/widgets/gimpprogressbox.c
* app/widgets/gimpprogressdialog.c
* app/widgets/gimpscalebutton.c
* app/widgets/gimpselectiondata.c
* app/widgets/gimpsessioninfo.c
* app/widgets/gimpsettingsbox.c
* app/widgets/gimpstrokeeditor.c
* app/widgets/gimptexteditor.c
* app/widgets/gimptoolbox.c
* app/widgets/gimpuimanager.c
* app/widgets/gimpview-popup.c
* app/widgets/gimpview.c
* app/widgets/gimpviewabledialog.c
* app/widgets/gimpwidgets-utils.c: use accessors for various
members of GTK+ structures that don't exist any longer when
GSEAL_ENABLE is defined.
2009-03-22 Michael Natterer <mitch@gimp.org> 2009-03-22 Michael Natterer <mitch@gimp.org>
* app/display/gimpcanvas.c * app/display/gimpcanvas.c
......
...@@ -197,7 +197,7 @@ gimp_blob_editor_expose (GtkWidget *widget, ...@@ -197,7 +197,7 @@ gimp_blob_editor_expose (GtkWidget *widget,
if (r0 < 2) if (r0 < 2)
return TRUE; return TRUE;
cr = gdk_cairo_create (widget->window); cr = gdk_cairo_create (gtk_widget_get_window (widget));
gimp_blob_editor_draw_blob (editor, cr, gimp_blob_editor_draw_blob (editor, cr,
widget->allocation.width / 2.0, widget->allocation.width / 2.0,
......
...@@ -132,6 +132,7 @@ gimp_brush_select_constructor (GType type, ...@@ -132,6 +132,7 @@ gimp_brush_select_constructor (GType type,
GObject *object; GObject *object;
GimpPdbDialog *dialog; GimpPdbDialog *dialog;
GimpBrushSelect *select; GimpBrushSelect *select;
GtkWidget *content_area;
GtkWidget *table; GtkWidget *table;
GtkAdjustment *spacing_adj; GtkAdjustment *spacing_adj;
...@@ -163,7 +164,9 @@ gimp_brush_select_constructor (GType type, ...@@ -163,7 +164,9 @@ gimp_brush_select_constructor (GType type,
5 * (GIMP_VIEW_SIZE_MEDIUM + 2)); 5 * (GIMP_VIEW_SIZE_MEDIUM + 2));
gtk_container_set_border_width (GTK_CONTAINER (dialog->view), 12); gtk_container_set_border_width (GTK_CONTAINER (dialog->view), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), dialog->view);
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
gtk_container_add (GTK_CONTAINER (content_area), dialog->view);
gtk_widget_show (dialog->view); gtk_widget_show (dialog->view);
/* Create the frame and the table for the options */ /* Create the frame and the table for the options */
......
...@@ -204,7 +204,7 @@ gimp_color_bar_expose (GtkWidget *widget, ...@@ -204,7 +204,7 @@ gimp_color_bar_expose (GtkWidget *widget,
break; break;
} }
gdk_draw_rgb_image (widget->window, style->black_gc, gdk_draw_rgb_image (gtk_widget_get_window (widget), style->black_gc,
widget->allocation.x + x, widget->allocation.y + y, widget->allocation.x + x, widget->allocation.y + y,
width, height, width, height,
GDK_RGB_DITHER_NORMAL, GDK_RGB_DITHER_NORMAL,
......
...@@ -126,7 +126,7 @@ gimp_color_dialog_init (GimpColorDialog *dialog) ...@@ -126,7 +126,7 @@ gimp_color_dialog_init (GimpColorDialog *dialog)
dialog->selection = gimp_color_selection_new (); dialog->selection = gimp_color_selection_new ();
gtk_container_set_border_width (GTK_CONTAINER (dialog->selection), 12); gtk_container_set_border_width (GTK_CONTAINER (dialog->selection), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
dialog->selection); dialog->selection);
gtk_widget_show (dialog->selection); gtk_widget_show (dialog->selection);
...@@ -277,10 +277,19 @@ gimp_color_dialog_new (GimpViewable *viewable, ...@@ -277,10 +277,19 @@ gimp_color_dialog_new (GimpViewable *viewable,
NULL); NULL);
if (viewable) if (viewable)
gimp_viewable_dialog_set_viewable (GIMP_VIEWABLE_DIALOG (dialog), {
viewable, context); gimp_viewable_dialog_set_viewable (GIMP_VIEWABLE_DIALOG (dialog),
viewable, context);
}
else else
gtk_widget_hide (GIMP_VIEWABLE_DIALOG (dialog)->icon->parent->parent); {
GtkWidget *parent;
parent = gtk_widget_get_parent (GIMP_VIEWABLE_DIALOG (dialog)->icon);
parent = gtk_widget_get_parent (parent);
gtk_widget_hide (parent);
}
dialog->wants_updates = wants_updates; dialog->wants_updates = wants_updates;
......
...@@ -277,7 +277,7 @@ gimp_color_frame_expose (GtkWidget *widget, ...@@ -277,7 +277,7 @@ gimp_color_frame_expose (GtkWidget *widget,
gint w, h; gint w, h;
gdouble scale; gdouble scale;
cr = gdk_cairo_create (widget->window); cr = gdk_cairo_create (gtk_widget_get_window (widget));
gdk_cairo_set_source_color (cr, &style->light[GTK_STATE_NORMAL]); gdk_cairo_set_source_color (cr, &style->light[GTK_STATE_NORMAL]);
g_snprintf (buf, sizeof (buf), "%d", frame->number); g_snprintf (buf, sizeof (buf), "%d", frame->number);
......
...@@ -359,7 +359,7 @@ gimp_container_grid_view_menu_position (GtkMenu *menu, ...@@ -359,7 +359,7 @@ gimp_container_grid_view_menu_position (GtkMenu *menu,
else else
widget = GTK_WIDGET (grid_view->wrap_box); widget = GTK_WIDGET (grid_view->wrap_box);
gdk_window_get_origin (widget->window, x, y); gdk_window_get_origin (gtk_widget_get_window (widget), x, y);
if (GTK_WIDGET_NO_WINDOW (widget)) if (GTK_WIDGET_NO_WINDOW (widget))
{ {
......
...@@ -185,12 +185,13 @@ gimp_container_popup_map (GtkWidget *widget) ...@@ -185,12 +185,13 @@ gimp_container_popup_map (GtkWidget *widget)
* receive events. we filter away events outside this toplevel * receive events. we filter away events outside this toplevel
* away in button_press() * away in button_press()
*/ */
if (gdk_pointer_grab (widget->window, TRUE, if (gdk_pointer_grab (gtk_widget_get_window (widget), TRUE,
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
GDK_POINTER_MOTION_MASK, GDK_POINTER_MOTION_MASK,
NULL, NULL, GDK_CURRENT_TIME) == 0) NULL, NULL, GDK_CURRENT_TIME) == 0)
{ {
if (gdk_keyboard_grab (widget->window, TRUE, GDK_CURRENT_TIME) == 0) if (gdk_keyboard_grab (gtk_widget_get_window (widget), TRUE,
GDK_CURRENT_TIME) == 0)
{ {
gtk_grab_add (widget); gtk_grab_add (widget);
return; return;
...@@ -402,7 +403,7 @@ gimp_container_popup_show (GimpContainerPopup *popup, ...@@ -402,7 +403,7 @@ gimp_container_popup_show (GimpContainerPopup *popup,
g_return_if_fail (GTK_IS_WIDGET (widget)); g_return_if_fail (GTK_IS_WIDGET (widget));
gtk_widget_size_request (GTK_WIDGET (popup), &requisition); gtk_widget_size_request (GTK_WIDGET (popup), &requisition);
gdk_window_get_origin (widget->window, &orig_x, &orig_y); gdk_window_get_origin (gtk_widget_get_window (widget), &orig_x, &orig_y);
if (GTK_WIDGET_NO_WINDOW (widget)) if (GTK_WIDGET_NO_WINDOW (widget))
{ {
......
...@@ -315,7 +315,7 @@ gimp_container_tree_view_menu_position (GtkMenu *menu, ...@@ -315,7 +315,7 @@ gimp_container_tree_view_menu_position (GtkMenu *menu,
GtkWidget *widget = GTK_WIDGET (tree_view->view); GtkWidget *widget = GTK_WIDGET (tree_view->view);
GtkTreeIter selected_iter; GtkTreeIter selected_iter;
gdk_window_get_origin (widget->window, x, y); gdk_window_get_origin (gtk_widget_get_window (widget), x, y);
if (GTK_WIDGET_NO_WINDOW (widget)) if (GTK_WIDGET_NO_WINDOW (widget))
{ {
......
...@@ -696,7 +696,7 @@ gimp_controller_editor_edit_clicked (GtkWidget *button, ...@@ -696,7 +696,7 @@ gimp_controller_editor_edit_clicked (GtkWidget *button,
view = gimp_action_editor_new (gimp_ui_managers_from_name ("<Image>")->data, view = gimp_action_editor_new (gimp_ui_managers_from_name ("<Image>")->data,
action_name, FALSE); action_name, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (view), 12); gtk_container_set_border_width (GTK_CONTAINER (view), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (editor->edit_dialog)->vbox), gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (editor->edit_dialog))),
view); view);
gtk_widget_show (view); gtk_widget_show (view);
......
...@@ -645,7 +645,8 @@ gimp_controller_list_edit_clicked (GtkWidget *button, ...@@ -645,7 +645,8 @@ gimp_controller_list_edit_clicked (GtkWidget *button,
editor = gimp_controller_editor_new (list->dest_info, editor = gimp_controller_editor_new (list->dest_info,
gimp_get_user_context (list->gimp)); gimp_get_user_context (list->gimp));
gtk_container_set_border_width (GTK_CONTAINER (editor), 12); gtk_container_set_border_width (GTK_CONTAINER (editor), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), editor); gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
editor);
gtk_widget_show (editor); gtk_widget_show (editor);
g_object_set_data (G_OBJECT (list->dest_info), "gimp-controller-editor-dialog", g_object_set_data (G_OBJECT (list->dest_info), "gimp-controller-editor-dialog",
......
...@@ -816,6 +816,6 @@ gimp_cursor_set (GtkWidget *widget, ...@@ -816,6 +816,6 @@ gimp_cursor_set (GtkWidget *widget,
cursor_type, cursor_type,
tool_cursor, tool_cursor,
modifier); modifier);
gdk_window_set_cursor (widget->window, cursor); gdk_window_set_cursor (gtk_widget_get_window (widget), cursor);
gdk_cursor_unref (cursor); gdk_cursor_unref (cursor);
} }
...@@ -356,7 +356,7 @@ gimp_curve_view_expose (GtkWidget *widget, ...@@ -356,7 +356,7 @@ gimp_curve_view_expose (GtkWidget *widget,
width = widget->allocation.width - 2 * border - 1; width = widget->allocation.width - 2 * border - 1;
height = widget->allocation.height - 2 * border - 1; height = widget->allocation.height - 2 * border - 1;
cr = gdk_cairo_create (widget->window); cr = gdk_cairo_create (gtk_widget_get_window (widget));
gdk_cairo_region (cr, event->region); gdk_cairo_region (cr, event->region);
cairo_clip (cr); cairo_clip (cr);
...@@ -508,7 +508,7 @@ set_cursor (GimpCurveView *view, ...@@ -508,7 +508,7 @@ set_cursor (GimpCurveView *view,
GdkDisplay *display = gtk_widget_get_display (GTK_WIDGET (view)); GdkDisplay *display = gtk_widget_get_display (GTK_WIDGET (view));
GdkCursor *cursor = gdk_cursor_new_for_display (display, new_cursor); GdkCursor *cursor = gdk_cursor_new_for_display (display, new_cursor);
gdk_window_set_cursor (GTK_WIDGET (view)->window, cursor); gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (view)), cursor);
gdk_cursor_unref (cursor); gdk_cursor_unref (cursor);
view->cursor_type = new_cursor; view->cursor_type = new_cursor;
......
...@@ -238,7 +238,7 @@ gimp_dash_editor_expose (GtkWidget *widget, ...@@ -238,7 +238,7 @@ gimp_dash_editor_expose (GtkWidget *widget,
{ {
GimpDashEditor *editor = GIMP_DASH_EDITOR (widget); GimpDashEditor *editor = GIMP_DASH_EDITOR (widget);
GtkStyle *style = gtk_widget_get_style (widget); GtkStyle *style = gtk_widget_get_style (widget);
cairo_t *cr = gdk_cairo_create (widget->window); cairo_t *cr = gdk_cairo_create (gtk_widget_get_window (widget));
gint x; gint x;
gint w, h; gint w, h;
...@@ -348,7 +348,7 @@ gimp_dash_editor_button_press (GtkWidget *widget, ...@@ -348,7 +348,7 @@ gimp_dash_editor_button_press (GtkWidget *widget,
if (bevent->button == 1 && bevent->type == GDK_BUTTON_PRESS) if (bevent->button == 1 && bevent->type == GDK_BUTTON_PRESS)
{ {
gdk_pointer_grab (widget->window, FALSE, gdk_pointer_grab (gtk_widget_get_window (widget), FALSE,
GDK_BUTTON_RELEASE_MASK | GDK_BUTTON1_MOTION_MASK, GDK_BUTTON_RELEASE_MASK | GDK_BUTTON1_MOTION_MASK,
NULL, NULL, bevent->time); NULL, NULL, bevent->time);
index = dash_x_to_index (editor, bevent->x); index = dash_x_to_index (editor, bevent->x);
......
...@@ -1505,7 +1505,7 @@ gimp_dialog_factories_show_foreach (gconstpointer key, ...@@ -1505,7 +1505,7 @@ gimp_dialog_factories_show_foreach (gconstpointer key,
gtk_widget_show (widget); gtk_widget_show (widget);
if (GTK_WIDGET_VISIBLE (widget)) if (GTK_WIDGET_VISIBLE (widget))
gdk_window_raise (widget->window); gdk_window_raise (gtk_widget_get_window (widget));
} }
} }
} }
...@@ -1540,8 +1540,8 @@ gimp_dialog_factories_set_busy_foreach (gconstpointer key, ...@@ -1540,8 +1540,8 @@ gimp_dialog_factories_set_busy_foreach (gconstpointer key,
GIMP_CURSOR_MODIFIER_NONE); GIMP_CURSOR_MODIFIER_NONE);
} }
if (widget->window) if (gtk_widget_get_window (widget))
gdk_window_set_cursor (widget->window, cursor); gdk_window_set_cursor (gtk_widget_get_window (widget), cursor);
} }
} }
...@@ -1562,8 +1562,8 @@ gimp_dialog_factories_unset_busy_foreach (gconstpointer key, ...@@ -1562,8 +1562,8 @@ gimp_dialog_factories_unset_busy_foreach (gconstpointer key,
if (GTK_IS_WIDGET (widget) && GTK_WIDGET_TOPLEVEL (widget)) if (GTK_IS_WIDGET (widget) && GTK_WIDGET_TOPLEVEL (widget))
{ {
if (widget->window) if (gtk_widget_get_window (widget))
gdk_window_set_cursor (widget->window, NULL); gdk_window_set_cursor (gtk_widget_get_window (widget), NULL);
} }
} }
} }
......
...@@ -157,13 +157,15 @@ gimp_dnd_xds_save_image (GdkDragContext *context, ...@@ -157,13 +157,15 @@ gimp_dnd_xds_save_image (GdkDragContext *context,
uri, proc, GIMP_RUN_INTERACTIVE, FALSE, uri, proc, GIMP_RUN_INTERACTIVE, FALSE,
&error) == GIMP_PDB_SUCCESS) &error) == GIMP_PDB_SUCCESS)
{ {
gtk_selection_data_set (selection, selection->target, 8, gtk_selection_data_set (selection,
(const guchar *) "S", 1); gtk_selection_data_get_target (selection),
8, (const guchar *) "S", 1);
} }
else else
{ {
gtk_selection_data_set (selection, selection->target, 8, gtk_selection_data_set (selection,
(const guchar *) "E", 1); gtk_selection_data_get_target (selection),
8, (const guchar *) "E", 1);
if (error) if (error)
{ {
...@@ -183,8 +185,9 @@ gimp_dnd_xds_save_image (GdkDragContext *context, ...@@ -183,8 +185,9 @@ gimp_dnd_xds_save_image (GdkDragContext *context,
} }
else else
{ {
gtk_selection_data_set (selection, selection->target, 8, gtk_selection_data_set (selection,
(const guchar *) "E", 1); gtk_selection_data_get_target (selection),
8, (const guchar *) "E", 1);
gimp_message_literal (image->gimp, NULL, GIMP_MESSAGE_ERROR, gimp_message_literal (image->gimp, NULL, GIMP_MESSAGE_ERROR,
_("The given filename does not have any known " _("The given filename does not have any known "
......
...@@ -430,7 +430,7 @@ gimp_dockable_realize (GtkWidget *widget) ...@@ -430,7 +430,7 @@ gimp_dockable_realize (GtkWidget *widget)
GDK_BUTTON_MOTION_MASK | GDK_BUTTON_MOTION_MASK |
gtk_widget_get_events (widget)); gtk_widget_get_events (widget));
dockable->title_window = gdk_window_new (widget->window, dockable->title_window = gdk_window_new (gtk_widget_get_window (widget),
&attributes, &attributes,
(GDK_WA_X | (GDK_WA_X |
GDK_WA_Y | GDK_WA_Y |
...@@ -561,7 +561,7 @@ gimp_dockable_expose_event (GtkWidget *widget, ...@@ -561,7 +561,7 @@ gimp_dockable_expose_event (GtkWidget *widget,
if (dockable->blink_counter & 1) if (dockable->blink_counter & 1)
{ {
gtk_paint_box (style, widget->window, gtk_paint_box (style, gtk_widget_get_window (widget),
GTK_STATE_SELECTED, GTK_SHADOW_NONE, GTK_STATE_SELECTED, GTK_SHADOW_NONE,
&expose_area, widget, "", &expose_area, widget, "",
title_area.x, title_area.y, title_area.x, title_area.y,
...@@ -589,7 +589,7 @@ gimp_dockable_expose_event (GtkWidget *widget, ...@@ -589,7 +589,7 @@ gimp_dockable_expose_event (GtkWidget *widget,
text_y = title_area.y + (title_area.height - layout_height) / 2; text_y = title_area.y + (title_area.height - layout_height) / 2;
gtk_paint_layout (style, widget->window, gtk_paint_layout (style, gtk_widget_get_window (widget),
(dockable->blink_counter & 1) ? (dockable->blink_counter & 1) ?
GTK_STATE_SELECTED : widget->state, TRUE, GTK_STATE_SELECTED : widget->state, TRUE,
&expose_area, widget, NULL, &expose_area, widget, NULL,
...@@ -1314,6 +1314,7 @@ gimp_dockable_title_changed (GimpDocked *docked, ...@@ -1314,6 +1314,7 @@ gimp_dockable_title_changed (GimpDocked *docked,
gimp_dockable_get_title_area (dockable, &area); gimp_dockable_get_title_area (dockable, &area);
gdk_window_invalidate_rect (GTK_WIDGET (dockable)->window, &area, FALSE); gdk_window_invalidate_rect (gtk_widget_get_window (GTK_WIDGET (dockable)),
&area, FALSE);
} }
} }
...@@ -71,7 +71,7 @@ gimp_error_dialog_init (GimpErrorDialog *dialog) ...@@ -71,7 +71,7 @@ gimp_error_dialog_init (GimpErrorDialog *dialog)
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
dialog->vbox = gtk_vbox_new (FALSE, 0); dialog->vbox = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
dialog->vbox, TRUE, TRUE, 0); dialog->vbox, TRUE, TRUE, 0);
gtk_widget_show (dialog->vbox); gtk_widget_show (dialog->vbox);
......
...@@ -286,6 +286,7 @@ gimp_fg_bg_editor_expose (GtkWidget *widget, ...@@ -286,6 +286,7 @@ gimp_fg_bg_editor_expose (GtkWidget *widget,
{ {
GimpFgBgEditor *editor = GIMP_FG_BG_EDITOR (widget); GimpFgBgEditor *editor = GIMP_FG_BG_EDITOR (widget);
GtkStyle *style = gtk_widget_get_style (widget); GtkStyle *style = gtk_widget_get_style (widget);
GdkWindow *window = gtk_widget_get_window (widget);
gint width, height; gint width, height;
gint default_w, default_h; gint default_w, default_h;
gint swap_w, swap_h; gint swap_w, swap_h;
...@@ -308,7 +309,7 @@ gimp_fg_bg_editor_expose (GtkWidget *widget, ...@@ -308,7 +309,7 @@ gimp_fg_bg_editor_expose (GtkWidget *widget,
default_h = gdk_pixbuf_get_height (editor->default_icon); default_h = gdk_pixbuf_get_height (editor->default_icon);
if (default_w < width / 2 && default_h < height / 2) if (default_w < width / 2 && default_h < height / 2)
gdk_draw_pixbuf (widget->window, NULL, editor->default_icon, gdk_draw_pixbuf (window, NULL, editor->default_icon,
0, 0, 0, height - default_h, default_w, default_h, 0, 0, 0, height - default_h, default_w, default_h,
GDK_RGB_DITHER_NORMAL, 0, 0); GDK_RGB_DITHER_NORMAL, 0, 0);
else else
...@@ -324,7 +325,7 @@ gimp_fg_bg_editor_expose (GtkWidget *widget, ...@@ -324,7 +325,7 @@ gimp_fg_bg_editor_expose (GtkWidget *widget,
swap_h = gdk_pixbuf_get_height (editor->swap_icon); swap_h = gdk_pixbuf_get_height (editor->swap_icon);
if (swap_w < width / 2 && swap_h < height / 2) if (swap_w < width / 2 && swap_h < height / 2)
gdk_draw_pixbuf (widget->window, NULL, editor->swap_icon, gdk_draw_pixbuf (window, NULL, editor->swap_icon,
0, 0, width - swap_w, 0, swap_w, swap_h, 0, 0, width - swap_w, 0, swap_w, swap_h,
GDK_RGB_DITHER_NORMAL, 0, 0); GDK_RGB_DITHER_NORMAL, 0, 0);
else else
...@@ -347,7 +348,7 @@ gimp_fg_bg_editor_expose (GtkWidget *widget, ...@@ -347,7 +348,7 @@ gimp_fg_bg_editor_expose (GtkWidget *widget,
{ {
gimp_context_get_background (editor->context, &color); gimp_context_get_background (editor->context, &color);
gimp_fg_bg_editor_draw_rect (editor, gimp_fg_bg_editor_draw_rect (editor,
widget->window, window,
style->fg_gc[0], style->fg_gc[0],
(width - rect_w), (width - rect_w),
(height - rect_h), (height - rect_h),
...@@ -355,7 +356,7 @@ gimp_fg_bg_editor_expose (GtkWidget *widget, ...@@ -355,7 +356,7 @@ gimp_fg_bg_editor_expose (GtkWidget *widget,
&color); &color);
} }
gtk_paint_shadow (style, widget->window, GTK_STATE_NORMAL, gtk_paint_shadow (style, window, GTK_STATE_NORMAL,
editor->active_color == GIMP_ACTIVE_COLOR_FOREGROUND ? editor->active_color == GIMP_ACTIVE_COLOR_FOREGROUND ?
GTK_SHADOW_OUT : GTK_SHADOW_IN, GTK_SHADOW_OUT : GTK_SHADOW_IN,
NULL, widget, NULL, NULL, widget, NULL,
...@@ -370,14 +371,14 @@ gimp_fg_bg_editor_expose (GtkWidget *widget, ...@@ -370,14 +371,14 @@ gimp_fg_bg_editor_expose (GtkWidget *widget,
{ {
gimp_context_get_foreground (editor->context, &color); gimp_context_get_foreground (editor->context, &color);
gimp_fg_bg_editor_draw_rect (editor, gimp_fg_bg_editor_draw_rect (editor,
widget->window, window,
style->fg_gc[0], style->fg_gc[0],
0, 0, 0, 0,
rect_w, rect_h, rect_w, rect_h,
&color); &color);
} }
gtk_paint_shadow (style, widget->window, GTK_STATE_NORMAL, gtk_paint_shadow (style, window, GTK_STATE_NORMAL,
editor->active_color == GIMP_ACTIVE_COLOR_BACKGROUND ? editor->active_color == GIMP_ACTIVE_COLOR_BACKGROUND ?
GTK_SHADOW_OUT : GTK_SHADOW_IN, GTK_SHADOW_OUT : GTK_SHADOW_IN,
NULL, widget, NULL, NULL, widget, NULL,
......
...@@ -205,8 +205,9 @@ static gboolean ...@@ -205,8 +205,9 @@ static gboolean
gimp_fg_bg_view_expose (GtkWidget *widget, gimp_fg_bg_view_expose (GtkWidget *widget,
GdkEventExpose *eevent) GdkEventExpose *eevent)
{ {
GimpFgBgView *view = GIMP_FG_BG_VIEW (widget); GimpFgBgView *view = GIMP_FG_BG_VIEW (widget);
GtkStyle *style = gtk_widget_get_style (widget); GtkStyle *style = gtk_widget_get_style (widget);
GdkWindow *window = gtk_widget_get_window (widget);
gint x, y; gint x, y;
gint width, height; gint width, height;
gint rect_w, rect_h; gint rect_w, rect_h;
...@@ -228,8 +229,7 @@ gimp_fg_bg_view_expose (GtkWidget *widget, ...@@ -228,8 +229,7 @@ gimp_fg_bg_view_expose (GtkWidget *widget,
if (view->context) if (view->context)
{ {
gimp_context_get_background (view->context, &color); gimp_context_get_background (view->context, &color);
gimp_fg_bg_view_draw_rect (view, gimp_fg_bg_view_draw_rect (view, window,
widget->window,
style->fg_gc[0], style->fg_gc[0],
x + width - rect_w + 1, x + width - rect_w + 1,
y + height - rect_h + 1, y + height - rect_h + 1,
...@@ -237,7 +237,7 @@ gimp_fg_bg_view_expose (GtkWidget *widget, ...@@ -237,7 +237,7 @@ gimp_fg_bg_view_expose (GtkWidget *widget,
&color); &color);
} }
gtk_paint_shadow (style, widget->window, GTK_STATE_NORMAL, gtk_paint_shadow (style, window, GTK_STATE_NORMAL,
GTK_SHADOW_IN, GTK_SHADOW_IN,
NULL, widget, NULL, NULL, widget, NULL,
x + width - rect_w, y + height - rect_h, rect_w, rect_h); x + width - rect_w, y + height - rect_h, rect_w, rect_h);
...@@ -247,15 +247,14 @@ gimp_fg_bg_view_expose (GtkWidget *widget, ...@@ -247,15 +247,14 @@ gimp_fg_bg_view_expose (GtkWidget *widget,
if (view->context) if (view->context)
{ {
gimp_context_get_foreground (view->context, &color); gimp_context_get_foreground (view->context, &color);
gimp_fg_bg_view_draw_rect (view, gimp_fg_bg_view_draw_rect (view, window,
widget->window,
style->fg_gc[0], style->fg_gc[0],
x + 1, y + 1, x + 1, y + 1,
rect_w - 2, rect_h - 2, rect_w - 2, rect_h - 2,
&color); &color);
} }
gtk_paint_shadow (style, widget->window, GTK_STATE_NORMAL, gtk_paint_shadow (style, window, GTK_STATE_NORMAL,
GTK_SHADOW_OUT, GTK_SHADOW_OUT,
NULL, widget, NULL, NULL, widget, NULL,
x, y, rect_w, rect_h); x, y, rect_w, rect_h);
......
...@@ -354,7 +354,7 @@ gimp_file_dialog_new (Gimp *gimp, ...@@ -354,7 +354,7 @@ gimp_file_dialog_new (Gimp *gimp,
if (GIMP_GUI_CONFIG (gimp->config)->show_help_button && help_id) if (GIMP_GUI_CONFIG (gimp->config)->show_help_button && help_id)
{ {
GtkWidget *action_area = GTK_DIALOG (dialog)->action_area; GtkWidget *action_area = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
GtkWidget *button = gtk_button_new_from_stock (GTK_STOCK_HELP); GtkWidget *button = gtk_button_new_from_stock (GTK_STOCK_HELP);
gtk_box_pack_end (GTK_BOX (action_area), button, FALSE, TRUE, 0); gtk_box_pack_end (GTK_BOX (action_area), button, FALSE, TRUE, 0);
...@@ -384,8 +384,8 @@ gimp_file_dialog_new (Gimp *gimp, ...@@ -384,8 +384,8 @@ gimp_file_dialog_new (Gimp *gimp,
automatic_help_id); automatic_help_id);
dialog->progress = gimp_progress_box_new (); dialog->progress = gimp_progress_box_new ();
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dialog)->vbox), dialog->progress, gtk_box_pack_end (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
FALSE, FALSE, 0); dialog->progress, FALSE, FALSE, 0);
return GTK_WIDGET (dialog); return GTK_WIDGET (dialog);
} }
...@@ -394,8 +394,9 @@ void ...@@ -394,8 +394,9 @@ void
gimp_file_dialog_set_sensitive (GimpFileDialog *dialog, gimp_file_dialog_set_sensitive (GimpFileDialog *dialog,
gboolean sensitive) gboolean sensitive)
{ {
GList *children; GtkWidget *content_area;
GList *list; GList *children;
GList *list;
g_return_if_fail (GIMP_IS_FILE_DIALOG (dialog)); g_return_if_fail (GIMP_IS_FILE_DIALOG (dialog));
...@@ -403,8 +404,9 @@ gimp_file_dialog_set_sensitive (GimpFileDialog *dialog, ...@@ -403,8 +404,9 @@ gimp_file_dialog_set_sensitive (GimpFileDialog *dialog,
if (! dialog->progress) if (! dialog->progress)