gimp r28193 - in trunk: . app/widgets



Author: mitch
Date: Sun Mar 22 16:35:53 2009
New Revision: 28193
URL: http://svn.gnome.org/viewvc/gimp?rev=28193&view=rev

Log:
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.



Modified:
   trunk/ChangeLog
   trunk/app/widgets/gimpblobeditor.c
   trunk/app/widgets/gimpbrushselect.c
   trunk/app/widgets/gimpcolorbar.c
   trunk/app/widgets/gimpcolordialog.c
   trunk/app/widgets/gimpcolorframe.c
   trunk/app/widgets/gimpcontainergridview.c
   trunk/app/widgets/gimpcontainerpopup.c
   trunk/app/widgets/gimpcontainertreeview.c
   trunk/app/widgets/gimpcontrollereditor.c
   trunk/app/widgets/gimpcontrollerlist.c
   trunk/app/widgets/gimpcursor.c
   trunk/app/widgets/gimpcurveview.c
   trunk/app/widgets/gimpdasheditor.c
   trunk/app/widgets/gimpdialogfactory.c
   trunk/app/widgets/gimpdnd-xds.c
   trunk/app/widgets/gimpdockable.c
   trunk/app/widgets/gimperrordialog.c
   trunk/app/widgets/gimpfgbgeditor.c
   trunk/app/widgets/gimpfgbgview.c
   trunk/app/widgets/gimpfiledialog.c
   trunk/app/widgets/gimpfontselect.c
   trunk/app/widgets/gimpgradienteditor.c
   trunk/app/widgets/gimpgradientselect.c
   trunk/app/widgets/gimphandlebar.c
   trunk/app/widgets/gimphistogrambox.c
   trunk/app/widgets/gimphistogramview.c
   trunk/app/widgets/gimpmessagedialog.c
   trunk/app/widgets/gimpnavigationview.c
   trunk/app/widgets/gimppaletteselect.c
   trunk/app/widgets/gimppaletteview.c
   trunk/app/widgets/gimppatternselect.c
   trunk/app/widgets/gimpprogressbox.c
   trunk/app/widgets/gimpprogressdialog.c
   trunk/app/widgets/gimpscalebutton.c
   trunk/app/widgets/gimpselectiondata.c
   trunk/app/widgets/gimpsessioninfo.c
   trunk/app/widgets/gimpsettingsbox.c
   trunk/app/widgets/gimpstrokeeditor.c
   trunk/app/widgets/gimptexteditor.c
   trunk/app/widgets/gimptoolbox.c
   trunk/app/widgets/gimpuimanager.c
   trunk/app/widgets/gimpview-popup.c
   trunk/app/widgets/gimpview.c
   trunk/app/widgets/gimpviewabledialog.c
   trunk/app/widgets/gimpwidgets-utils.c

Modified: trunk/app/widgets/gimpblobeditor.c
==============================================================================
--- trunk/app/widgets/gimpblobeditor.c	(original)
+++ trunk/app/widgets/gimpblobeditor.c	Sun Mar 22 16:35:53 2009
@@ -197,7 +197,7 @@
   if (r0 < 2)
     return TRUE;
 
-  cr = gdk_cairo_create (widget->window);
+  cr = gdk_cairo_create (gtk_widget_get_window (widget));
 
   gimp_blob_editor_draw_blob (editor, cr,
                               widget->allocation.width  / 2.0,

Modified: trunk/app/widgets/gimpbrushselect.c
==============================================================================
--- trunk/app/widgets/gimpbrushselect.c	(original)
+++ trunk/app/widgets/gimpbrushselect.c	Sun Mar 22 16:35:53 2009
@@ -132,6 +132,7 @@
   GObject         *object;
   GimpPdbDialog   *dialog;
   GimpBrushSelect *select;
+  GtkWidget       *content_area;
   GtkWidget       *table;
   GtkAdjustment   *spacing_adj;
 
@@ -163,7 +164,9 @@
                                        5 * (GIMP_VIEW_SIZE_MEDIUM + 2));
 
   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);
 
   /*  Create the frame and the table for the options  */

Modified: trunk/app/widgets/gimpcolorbar.c
==============================================================================
--- trunk/app/widgets/gimpcolorbar.c	(original)
+++ trunk/app/widgets/gimpcolorbar.c	Sun Mar 22 16:35:53 2009
@@ -204,7 +204,7 @@
       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,
                       width, height,
                       GDK_RGB_DITHER_NORMAL,

Modified: trunk/app/widgets/gimpcolordialog.c
==============================================================================
--- trunk/app/widgets/gimpcolordialog.c	(original)
+++ trunk/app/widgets/gimpcolordialog.c	Sun Mar 22 16:35:53 2009
@@ -126,7 +126,7 @@
 
   dialog->selection = gimp_color_selection_new ();
   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);
   gtk_widget_show (dialog->selection);
 
@@ -277,10 +277,19 @@
                          NULL);
 
   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
-    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;
 

Modified: trunk/app/widgets/gimpcolorframe.c
==============================================================================
--- trunk/app/widgets/gimpcolorframe.c	(original)
+++ trunk/app/widgets/gimpcolorframe.c	Sun Mar 22 16:35:53 2009
@@ -277,7 +277,7 @@
       gint      w, h;
       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]);
 
       g_snprintf (buf, sizeof (buf), "%d", frame->number);

Modified: trunk/app/widgets/gimpcontainergridview.c
==============================================================================
--- trunk/app/widgets/gimpcontainergridview.c	(original)
+++ trunk/app/widgets/gimpcontainergridview.c	Sun Mar 22 16:35:53 2009
@@ -359,7 +359,7 @@
   else
     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))
     {

Modified: trunk/app/widgets/gimpcontainerpopup.c
==============================================================================
--- trunk/app/widgets/gimpcontainerpopup.c	(original)
+++ trunk/app/widgets/gimpcontainerpopup.c	Sun Mar 22 16:35:53 2009
@@ -185,12 +185,13 @@
    *  receive events. we filter away events outside this toplevel
    *  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_POINTER_MOTION_MASK,
                         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);
           return;
@@ -402,7 +403,7 @@
   g_return_if_fail (GTK_IS_WIDGET (widget));
 
   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))
     {

Modified: trunk/app/widgets/gimpcontainertreeview.c
==============================================================================
--- trunk/app/widgets/gimpcontainertreeview.c	(original)
+++ trunk/app/widgets/gimpcontainertreeview.c	Sun Mar 22 16:35:53 2009
@@ -315,7 +315,7 @@
   GtkWidget             *widget    = GTK_WIDGET (tree_view->view);
   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))
     {

Modified: trunk/app/widgets/gimpcontrollereditor.c
==============================================================================
--- trunk/app/widgets/gimpcontrollereditor.c	(original)
+++ trunk/app/widgets/gimpcontrollereditor.c	Sun Mar 22 16:35:53 2009
@@ -696,7 +696,7 @@
       view = gimp_action_editor_new (gimp_ui_managers_from_name ("<Image>")->data,
                                      action_name, FALSE);
       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);
       gtk_widget_show (view);
 

Modified: trunk/app/widgets/gimpcontrollerlist.c
==============================================================================
--- trunk/app/widgets/gimpcontrollerlist.c	(original)
+++ trunk/app/widgets/gimpcontrollerlist.c	Sun Mar 22 16:35:53 2009
@@ -645,7 +645,8 @@
   editor = gimp_controller_editor_new (list->dest_info,
                                        gimp_get_user_context (list->gimp));
   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);
 
   g_object_set_data (G_OBJECT (list->dest_info), "gimp-controller-editor-dialog",

Modified: trunk/app/widgets/gimpcursor.c
==============================================================================
--- trunk/app/widgets/gimpcursor.c	(original)
+++ trunk/app/widgets/gimpcursor.c	Sun Mar 22 16:35:53 2009
@@ -816,6 +816,6 @@
                             cursor_type,
                             tool_cursor,
                             modifier);
-  gdk_window_set_cursor (widget->window, cursor);
+  gdk_window_set_cursor (gtk_widget_get_window (widget), cursor);
   gdk_cursor_unref (cursor);
 }

Modified: trunk/app/widgets/gimpcurveview.c
==============================================================================
--- trunk/app/widgets/gimpcurveview.c	(original)
+++ trunk/app/widgets/gimpcurveview.c	Sun Mar 22 16:35:53 2009
@@ -356,7 +356,7 @@
   width  = widget->allocation.width  - 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);
   cairo_clip (cr);
@@ -508,7 +508,7 @@
       GdkDisplay *display = gtk_widget_get_display (GTK_WIDGET (view));
       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);
 
       view->cursor_type = new_cursor;

Modified: trunk/app/widgets/gimpdasheditor.c
==============================================================================
--- trunk/app/widgets/gimpdasheditor.c	(original)
+++ trunk/app/widgets/gimpdasheditor.c	Sun Mar 22 16:35:53 2009
@@ -238,7 +238,7 @@
 {
   GimpDashEditor *editor = GIMP_DASH_EDITOR (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            w, h;
 
@@ -348,7 +348,7 @@
 
   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,
                         NULL, NULL, bevent->time);
       index = dash_x_to_index (editor, bevent->x);

Modified: trunk/app/widgets/gimpdialogfactory.c
==============================================================================
--- trunk/app/widgets/gimpdialogfactory.c	(original)
+++ trunk/app/widgets/gimpdialogfactory.c	Sun Mar 22 16:35:53 2009
@@ -1505,7 +1505,7 @@
               gtk_widget_show (widget);
 
               if (GTK_WIDGET_VISIBLE (widget))
-                gdk_window_raise (widget->window);
+                gdk_window_raise (gtk_widget_get_window (widget));
             }
         }
     }
@@ -1540,8 +1540,8 @@
                                         GIMP_CURSOR_MODIFIER_NONE);
             }
 
-          if (widget->window)
-            gdk_window_set_cursor (widget->window, cursor);
+          if (gtk_widget_get_window (widget))
+            gdk_window_set_cursor (gtk_widget_get_window (widget), cursor);
         }
     }
 
@@ -1562,8 +1562,8 @@
 
       if (GTK_IS_WIDGET (widget) && GTK_WIDGET_TOPLEVEL (widget))
         {
-          if (widget->window)
-            gdk_window_set_cursor (widget->window, NULL);
+          if (gtk_widget_get_window (widget))
+            gdk_window_set_cursor (gtk_widget_get_window (widget), NULL);
         }
     }
 }

Modified: trunk/app/widgets/gimpdnd-xds.c
==============================================================================
--- trunk/app/widgets/gimpdnd-xds.c	(original)
+++ trunk/app/widgets/gimpdnd-xds.c	Sun Mar 22 16:35:53 2009
@@ -157,13 +157,15 @@
                          uri, proc, GIMP_RUN_INTERACTIVE, FALSE,
                          &error) == GIMP_PDB_SUCCESS)
             {
-              gtk_selection_data_set (selection, selection->target, 8,
-                                      (const guchar *) "S", 1);
+              gtk_selection_data_set (selection,
+                                      gtk_selection_data_get_target (selection),
+                                      8, (const guchar *) "S", 1);
             }
           else
             {
-              gtk_selection_data_set (selection, selection->target, 8,
-                                      (const guchar *) "E", 1);
+              gtk_selection_data_set (selection,
+                                      gtk_selection_data_get_target (selection),
+                                      8, (const guchar *) "E", 1);
 
               if (error)
                 {
@@ -183,8 +185,9 @@
     }
   else
     {
-      gtk_selection_data_set (selection, selection->target, 8,
-                              (const guchar *) "E", 1);
+      gtk_selection_data_set (selection,
+                              gtk_selection_data_get_target (selection),
+                              8, (const guchar *) "E", 1);
 
       gimp_message_literal (image->gimp, NULL, GIMP_MESSAGE_ERROR,
 			    _("The given filename does not have any known "

Modified: trunk/app/widgets/gimpdockable.c
==============================================================================
--- trunk/app/widgets/gimpdockable.c	(original)
+++ trunk/app/widgets/gimpdockable.c	Sun Mar 22 16:35:53 2009
@@ -430,7 +430,7 @@
                                       GDK_BUTTON_MOTION_MASK  |
                                       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,
                                                (GDK_WA_X |
                                                 GDK_WA_Y |
@@ -561,7 +561,7 @@
 
           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,
                              &expose_area, widget, "",
                              title_area.x, title_area.y,
@@ -589,7 +589,7 @@
 
           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) ?
                             GTK_STATE_SELECTED : widget->state, TRUE,
                             &expose_area, widget, NULL,
@@ -1314,6 +1314,7 @@
 
       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);
     }
 }

Modified: trunk/app/widgets/gimperrordialog.c
==============================================================================
--- trunk/app/widgets/gimperrordialog.c	(original)
+++ trunk/app/widgets/gimperrordialog.c	Sun Mar 22 16:35:53 2009
@@ -71,7 +71,7 @@
   gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
 
   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);
   gtk_widget_show (dialog->vbox);
 

Modified: trunk/app/widgets/gimpfgbgeditor.c
==============================================================================
--- trunk/app/widgets/gimpfgbgeditor.c	(original)
+++ trunk/app/widgets/gimpfgbgeditor.c	Sun Mar 22 16:35:53 2009
@@ -286,6 +286,7 @@
 {
   GimpFgBgEditor *editor = GIMP_FG_BG_EDITOR (widget);
   GtkStyle       *style  = gtk_widget_get_style (widget);
+  GdkWindow      *window = gtk_widget_get_window (widget);
   gint            width, height;
   gint            default_w, default_h;
   gint            swap_w, swap_h;
@@ -308,7 +309,7 @@
   default_h = gdk_pixbuf_get_height (editor->default_icon);
 
   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,
                      GDK_RGB_DITHER_NORMAL, 0, 0);
   else
@@ -324,7 +325,7 @@
   swap_h = gdk_pixbuf_get_height (editor->swap_icon);
 
   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,
                      GDK_RGB_DITHER_NORMAL, 0, 0);
   else
@@ -347,7 +348,7 @@
     {
       gimp_context_get_background (editor->context, &color);
       gimp_fg_bg_editor_draw_rect (editor,
-                                   widget->window,
+                                   window,
                                    style->fg_gc[0],
                                    (width - rect_w),
                                    (height - rect_h),
@@ -355,7 +356,7 @@
                                    &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 ?
                     GTK_SHADOW_OUT : GTK_SHADOW_IN,
                     NULL, widget, NULL,
@@ -370,14 +371,14 @@
     {
       gimp_context_get_foreground (editor->context, &color);
       gimp_fg_bg_editor_draw_rect (editor,
-                                   widget->window,
+                                   window,
                                    style->fg_gc[0],
                                    0, 0,
                                    rect_w, rect_h,
                                    &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 ?
                     GTK_SHADOW_OUT : GTK_SHADOW_IN,
                     NULL, widget, NULL,

Modified: trunk/app/widgets/gimpfgbgview.c
==============================================================================
--- trunk/app/widgets/gimpfgbgview.c	(original)
+++ trunk/app/widgets/gimpfgbgview.c	Sun Mar 22 16:35:53 2009
@@ -205,8 +205,9 @@
 gimp_fg_bg_view_expose (GtkWidget      *widget,
                         GdkEventExpose *eevent)
 {
-  GimpFgBgView *view  = GIMP_FG_BG_VIEW (widget);
-  GtkStyle     *style = gtk_widget_get_style (widget);
+  GimpFgBgView *view   = GIMP_FG_BG_VIEW (widget);
+  GtkStyle     *style  = gtk_widget_get_style (widget);
+  GdkWindow    *window = gtk_widget_get_window (widget);
   gint          x, y;
   gint          width, height;
   gint          rect_w, rect_h;
@@ -228,8 +229,7 @@
   if (view->context)
     {
       gimp_context_get_background (view->context, &color);
-      gimp_fg_bg_view_draw_rect (view,
-                                 widget->window,
+      gimp_fg_bg_view_draw_rect (view, window,
                                  style->fg_gc[0],
                                  x + width  - rect_w + 1,
                                  y + height - rect_h + 1,
@@ -237,7 +237,7 @@
                                  &color);
     }
 
-  gtk_paint_shadow (style, widget->window, GTK_STATE_NORMAL,
+  gtk_paint_shadow (style, window, GTK_STATE_NORMAL,
                     GTK_SHADOW_IN,
                     NULL, widget, NULL,
                     x + width - rect_w, y + height - rect_h, rect_w, rect_h);
@@ -247,15 +247,14 @@
   if (view->context)
     {
       gimp_context_get_foreground (view->context, &color);
-      gimp_fg_bg_view_draw_rect (view,
-                                 widget->window,
+      gimp_fg_bg_view_draw_rect (view, window,
                                  style->fg_gc[0],
                                  x + 1, y + 1,
                                  rect_w - 2, rect_h - 2,
                                  &color);
     }
 
-  gtk_paint_shadow (style, widget->window, GTK_STATE_NORMAL,
+  gtk_paint_shadow (style, window, GTK_STATE_NORMAL,
                     GTK_SHADOW_OUT,
                     NULL, widget, NULL,
                     x, y, rect_w, rect_h);

Modified: trunk/app/widgets/gimpfiledialog.c
==============================================================================
--- trunk/app/widgets/gimpfiledialog.c	(original)
+++ trunk/app/widgets/gimpfiledialog.c	Sun Mar 22 16:35:53 2009
@@ -354,7 +354,7 @@
 
   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);
 
       gtk_box_pack_end (GTK_BOX (action_area), button, FALSE, TRUE, 0);
@@ -384,8 +384,8 @@
                                        automatic_help_id);
 
   dialog->progress = gimp_progress_box_new ();
-  gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dialog)->vbox), dialog->progress,
-                    FALSE, FALSE, 0);
+  gtk_box_pack_end (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+                    dialog->progress, FALSE, FALSE, 0);
 
   return GTK_WIDGET (dialog);
 }
@@ -394,8 +394,9 @@
 gimp_file_dialog_set_sensitive (GimpFileDialog *dialog,
                                 gboolean        sensitive)
 {
-  GList *children;
-  GList *list;
+  GtkWidget *content_area;
+  GList     *children;
+  GList     *list;
 
   g_return_if_fail (GIMP_IS_FILE_DIALOG (dialog));
 
@@ -403,8 +404,9 @@
   if (! dialog->progress)
     return;
 
-  children =
-    gtk_container_get_children (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox));
+  content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+
+  children = gtk_container_get_children (GTK_CONTAINER (content_area));
 
   for (list = children; list; list = g_list_next (list))
     {

Modified: trunk/app/widgets/gimpfontselect.c
==============================================================================
--- trunk/app/widgets/gimpfontselect.c	(original)
+++ trunk/app/widgets/gimpfontselect.c	Sun Mar 22 16:35:53 2009
@@ -77,6 +77,7 @@
 {
   GObject       *object;
   GimpPdbDialog *dialog;
+  GtkWidget     *content_area;
 
   object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
 
@@ -93,7 +94,9 @@
                                        6 * (GIMP_VIEW_SIZE_MEDIUM + 2));
 
   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);
 
   return object;

Modified: trunk/app/widgets/gimpgradienteditor.c
==============================================================================
--- trunk/app/widgets/gimpgradienteditor.c	(original)
+++ trunk/app/widgets/gimpgradienteditor.c	Sun Mar 22 16:35:53 2009
@@ -777,7 +777,7 @@
   str2 = g_strdup_printf (_("Displaying [%0.4f, %0.4f]"),
                           gtk_adjustment_get_value (adjustment),
                           gtk_adjustment_get_value (adjustment) +
-                          adjustment->page_size);
+                          gtk_adjustment_get_page_size (adjustment));
 
   gradient_editor_set_hint (editor, str1, str2, NULL, NULL);
 
@@ -789,7 +789,7 @@
   gimp_view_renderer_gradient_set_offsets (renderer,
                                            gtk_adjustment_get_value (adjustment),
                                            gtk_adjustment_get_value (adjustment) +
-                                           adjustment->page_size,
+                                           gtk_adjustment_get_page_size (adjustment),
                                            editor->instant_update);
   gimp_gradient_editor_update (editor);
 }
@@ -1223,11 +1223,11 @@
                 GimpGradientEditor *editor)
 {
   GtkAdjustment *adj = GTK_ADJUSTMENT (editor->scroll_data);
-  cairo_t       *cr  = gdk_cairo_create (widget->window);
+  cairo_t       *cr  = gdk_cairo_create (gtk_widget_get_window (widget));
   gint           width;
   gint           height;
 
-  gdk_drawable_get_size (widget->window, &width, &height);
+  gdk_drawable_get_size (gtk_widget_get_window (widget), &width, &height);
 
   control_draw (editor,
                 GIMP_GRADIENT (GIMP_DATA_EDITOR (editor)->data),
@@ -1235,7 +1235,7 @@
                 width, height,
                 gtk_adjustment_get_value (adj),
                 gtk_adjustment_get_value (adj) +
-                adj->page_size);
+                gtk_adjustment_get_page_size (adj));
 
   cairo_destroy (cr);
 
@@ -1894,7 +1894,8 @@
    * and the gradient control's handles.
    */
 
-  return RINT ((pwidth - 1) * (pos - adjustment->value) / adjustment->page_size);
+  return RINT ((pwidth - 1) * (pos - gtk_adjustment_get_value (adjustment)) /
+               gtk_adjustment_get_page_size (adjustment));
 }
 
 static gdouble
@@ -1906,7 +1907,8 @@
 
   /* Calculate the gradient position that corresponds to widget's coordinates */
 
-  return adjustment->page_size * pos / (pwidth - 1) + adjustment->value;
+  return (gtk_adjustment_get_page_size (adjustment) * pos / (pwidth - 1) +
+          gtk_adjustment_get_value (adjustment));
 }
 
 /***** Segment functions *****/

Modified: trunk/app/widgets/gimpgradientselect.c
==============================================================================
--- trunk/app/widgets/gimpgradientselect.c	(original)
+++ trunk/app/widgets/gimpgradientselect.c	Sun Mar 22 16:35:53 2009
@@ -95,6 +95,7 @@
 {
   GObject       *object;
   GimpPdbDialog *dialog;
+  GtkWidget     *content_area;
 
   object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
 
@@ -114,7 +115,9 @@
                                        6 * (GIMP_VIEW_SIZE_MEDIUM + 2));
 
   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);
 
   return object;

Modified: trunk/app/widgets/gimphandlebar.c
==============================================================================
--- trunk/app/widgets/gimphandlebar.c	(original)
+++ trunk/app/widgets/gimphandlebar.c	Sun Mar 22 16:35:53 2009
@@ -161,7 +161,7 @@
       y += widget->allocation.y;
     }
 
-  cr = gdk_cairo_create (widget->window);
+  cr = gdk_cairo_create (gtk_widget_get_window (widget));
 
   gdk_cairo_region (cr, eevent->region);
   cairo_clip (cr);
@@ -176,7 +176,7 @@
       if (bar->slider_adj[i])
         {
           bar->slider_pos[i] = ROUND ((gdouble) width *
-                                      (bar->slider_adj[i]->value - bar->lower) /
+                                      (gtk_adjustment_get_value (bar->slider_adj[i]) - bar->lower) /
                                       (bar->upper - bar->lower + 1));
 
           cairo_set_source_rgb (cr, 0.5 * i, 0.5 * i, 0.5 * i);
@@ -325,14 +325,14 @@
       }
 
     if (bar->slider_adj[0])
-      bar->lower = bar->slider_adj[0]->lower;
+      bar->lower = gtk_adjustment_get_lower (bar->slider_adj[0]);
     else
-      bar->lower = bar->slider_adj[handle_no]->lower;
+      bar->lower = gtk_adjustment_get_lower (bar->slider_adj[handle_no]);
 
     if (bar->slider_adj[2])
-      bar->upper = bar->slider_adj[2]->upper;
+      bar->upper = gtk_adjustment_get_upper (bar->slider_adj[2]);
     else
-      bar->upper = bar->slider_adj[handle_no]->upper;
+      bar->upper = gtk_adjustment_get_upper (bar->slider_adj[handle_no]);
 
     gimp_handle_bar_adjustment_changed (bar->slider_adj[handle_no], bar);
 }

Modified: trunk/app/widgets/gimphistogrambox.c
==============================================================================
--- trunk/app/widgets/gimphistogrambox.c	(original)
+++ trunk/app/widgets/gimphistogrambox.c	Sun Mar 22 16:35:53 2009
@@ -196,8 +196,7 @@
 
   if (box->view->start != value)
     {
-      box->high_adj->lower = value;
-      gtk_adjustment_changed (box->high_adj);
+      gtk_adjustment_set_lower (box->high_adj, value);
 
       gimp_histogram_view_set_range (box->view, value, box->view->end);
     }
@@ -211,8 +210,7 @@
 
   if (box->view->end != value)
     {
-      box->low_adj->upper = value;
-      gtk_adjustment_changed (box->low_adj);
+      gtk_adjustment_set_upper (box->low_adj, value);
 
       gimp_histogram_view_set_range (box->view, box->view->start, value);
     }
@@ -224,10 +222,8 @@
                                     gint               end,
                                     GimpHistogramBox  *box)
 {
-  box->high_adj->lower = start;
-  box->low_adj->upper  = end;
-  gtk_adjustment_changed (box->high_adj);
-  gtk_adjustment_changed (box->low_adj);
+  gtk_adjustment_set_lower (box->high_adj, start);
+  gtk_adjustment_set_upper (box->low_adj,  end);
 
   gtk_adjustment_set_value (box->low_adj,  start);
   gtk_adjustment_set_value (box->high_adj, end);

Modified: trunk/app/widgets/gimphistogramview.c
==============================================================================
--- trunk/app/widgets/gimphistogramview.c	(original)
+++ trunk/app/widgets/gimphistogramview.c	Sun Mar 22 16:35:53 2009
@@ -278,8 +278,9 @@
 gimp_histogram_view_expose (GtkWidget      *widget,
                             GdkEventExpose *event)
 {
-  GimpHistogramView *view  = GIMP_HISTOGRAM_VIEW (widget);
-  GtkStyle          *style = gtk_widget_get_style (widget);
+  GimpHistogramView *view   = GIMP_HISTOGRAM_VIEW (widget);
+  GtkStyle          *style  = gtk_widget_get_style (widget);
+  GdkWindow         *window = gtk_widget_get_window (widget);
   gint               x;
   gint               x1, x2;
   gint               border;
@@ -303,14 +304,14 @@
   x1 = CLAMP (MIN (view->start, view->end), 0, 255);
   x2 = CLAMP (MAX (view->start, view->end), 0, 255);
 
-  gdk_draw_rectangle (widget->window,
+  gdk_draw_rectangle (window,
                       style->base_gc[GTK_STATE_NORMAL], TRUE,
                       0, 0,
                       widget->allocation.width,
                       widget->allocation.height);
 
   /*  Draw the outer border  */
-  gdk_draw_rectangle (widget->window,
+  gdk_draw_rectangle (window,
                       style->dark_gc[GTK_STATE_NORMAL], FALSE,
                       border, border,
                       width - 1, height - 1);
@@ -338,7 +339,7 @@
 
       for (x = 0; x < 3; x++)
         {
-          rgb_gc[x] = gdk_gc_new_with_values (widget->window,
+          rgb_gc[x] = gdk_gc_new_with_values (window,
                                               &values, GDK_GC_FUNCTION);
 
           color.red   = (x == 0 ? 0xFFFF : 0x0);
@@ -368,7 +369,7 @@
 
       if (view->subdivisions > 1 && x >= (xstop * width / view->subdivisions))
         {
-          gdk_draw_line (widget->window,
+          gdk_draw_line (window,
                          style->dark_gc[GTK_STATE_NORMAL],
                          x + border, border,
                          x + border, border + height - 1);
@@ -376,7 +377,7 @@
         }
       else if (in_selection)
         {
-          gdk_draw_line (widget->window,
+          gdk_draw_line (window,
                          style->base_gc[GTK_STATE_SELECTED],
                          x + border, border,
                          x + border, border + height - 1);
@@ -434,10 +435,11 @@
                                 gint                  height,
                                 gint                  border)
 {
-  gdouble  value    = 0.0;
-  gdouble  bg_value = 0.0;
-  gint     y;
-  gint     bg_y;
+  GdkWindow *window   = gtk_widget_get_window (GTK_WIDGET (view));
+  gdouble    value    = 0.0;
+  gdouble    bg_value = 0.0;
+  gint       y;
+  gint       bg_y;
 
   if (view->histogram)
     {
@@ -485,11 +487,11 @@
     }
 
   if (bg_gc)
-    gdk_draw_line (GTK_WIDGET (view)->window, bg_gc,
+    gdk_draw_line (window, bg_gc,
                    x + border, height + border - 1,
                    x + border, height + border - bg_y - 1);
 
-  gdk_draw_line (GTK_WIDGET (view)->window, gc,
+  gdk_draw_line (window, gc,
                  x + border, height + border - 1,
                  x + border, height + border - y - 1);
 }
@@ -504,7 +506,7 @@
     {
       gint width;
 
-      gdk_pointer_grab (widget->window, FALSE,
+      gdk_pointer_grab (gtk_widget_get_window (widget), FALSE,
                         GDK_BUTTON_RELEASE_MASK | GDK_BUTTON1_MOTION_MASK,
                         NULL, NULL, bevent->time);
 

Modified: trunk/app/widgets/gimpmessagedialog.c
==============================================================================
--- trunk/app/widgets/gimpmessagedialog.c	(original)
+++ trunk/app/widgets/gimpmessagedialog.c	Sun Mar 22 16:35:53 2009
@@ -99,7 +99,7 @@
                               "stock-id",  stock_id,
                               NULL);
 
-  gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
+  gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
                       GTK_WIDGET (dialog->box), FALSE, FALSE, 0);
   gtk_widget_show (GTK_WIDGET (dialog->box));
 

Modified: trunk/app/widgets/gimpnavigationview.c
==============================================================================
--- trunk/app/widgets/gimpnavigationview.c	(original)
+++ trunk/app/widgets/gimpnavigationview.c	Sun Mar 22 16:35:53 2009
@@ -194,7 +194,7 @@
 
       GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event);
 
-      cr = gdk_cairo_create (widget->window);
+      cr = gdk_cairo_create (gtk_widget_get_window (widget));
 
       gdk_cairo_region (cr, event->region);
       cairo_clip (cr);

Modified: trunk/app/widgets/gimppaletteselect.c
==============================================================================
--- trunk/app/widgets/gimppaletteselect.c	(original)
+++ trunk/app/widgets/gimppaletteselect.c	Sun Mar 22 16:35:53 2009
@@ -76,6 +76,7 @@
 {
   GObject       *object;
   GimpPdbDialog *dialog;
+  GtkWidget     *content_area;
 
   object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
 
@@ -95,7 +96,9 @@
                                        8 * (GIMP_VIEW_SIZE_MEDIUM + 2));
 
   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);
 
   return object;

Modified: trunk/app/widgets/gimppaletteview.c
==============================================================================
--- trunk/app/widgets/gimppaletteview.c	(original)
+++ trunk/app/widgets/gimppaletteview.c	Sun Mar 22 16:35:53 2009
@@ -182,7 +182,7 @@
       row = pal_view->selected->position / renderer->columns;
       col = pal_view->selected->position % renderer->columns;
 
-      cr = gdk_cairo_create (widget->window);
+      cr = gdk_cairo_create (gtk_widget_get_window (widget));
       gdk_cairo_region (cr, eevent->region);
       cairo_clip (cr);
 

Modified: trunk/app/widgets/gimppatternselect.c
==============================================================================
--- trunk/app/widgets/gimppatternselect.c	(original)
+++ trunk/app/widgets/gimppatternselect.c	Sun Mar 22 16:35:53 2009
@@ -78,6 +78,7 @@
 {
   GObject       *object;
   GimpPdbDialog *dialog;
+  GtkWidget     *content_area;
 
   object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
 
@@ -95,7 +96,9 @@
                                        6 * (GIMP_VIEW_SIZE_MEDIUM + 2));
 
   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);
 
   return object;

Modified: trunk/app/widgets/gimpprogressbox.c
==============================================================================
--- trunk/app/widgets/gimpprogressbox.c	(original)
+++ trunk/app/widgets/gimpprogressbox.c	Sun Mar 22 16:35:53 2009
@@ -131,7 +131,8 @@
       box->value      = 0.0;
 
       if (GTK_WIDGET_DRAWABLE (box->progress))
-        gdk_window_process_updates (box->progress->window, TRUE);
+        gdk_window_process_updates (gtk_widget_get_window (box->progress),
+                                    TRUE);
 
       return progress;
     }
@@ -175,7 +176,8 @@
       gtk_label_set_text (GTK_LABEL (box->label), message);
 
       if (GTK_WIDGET_DRAWABLE (box->progress))
-        gdk_window_process_updates (box->progress->window, TRUE);
+        gdk_window_process_updates (gtk_widget_get_window (box->progress),
+                                    TRUE);
     }
 }
 
@@ -197,7 +199,8 @@
           gtk_progress_bar_set_fraction (bar, box->value);
 
           if (GTK_WIDGET_DRAWABLE (box->progress))
-            gdk_window_process_updates (box->progress->window, TRUE);
+            gdk_window_process_updates (gtk_widget_get_window (box->progress),
+                                        TRUE);
         }
     }
 }
@@ -224,7 +227,8 @@
       gtk_progress_bar_pulse (bar);
 
       if (GTK_WIDGET_DRAWABLE (box->progress))
-        gdk_window_process_updates (box->progress->window, TRUE);
+        gdk_window_process_updates (gtk_widget_get_window (box->progress),
+                                    TRUE);
     }
 }
 

Modified: trunk/app/widgets/gimpprogressdialog.c
==============================================================================
--- trunk/app/widgets/gimpprogressdialog.c	(original)
+++ trunk/app/widgets/gimpprogressdialog.c	Sun Mar 22 16:35:53 2009
@@ -75,9 +75,11 @@
 static void
 gimp_progress_dialog_init (GimpProgressDialog *dialog)
 {
+  GtkWidget *content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+
   dialog->box = gimp_progress_box_new ();
   gtk_container_set_border_width (GTK_CONTAINER (dialog->box), 12);
-  gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), dialog->box);
+  gtk_container_add (GTK_CONTAINER (content_area), dialog->box);
   gtk_widget_show (dialog->box);
 
   g_signal_connect (dialog->box, "destroy",

Modified: trunk/app/widgets/gimpscalebutton.c
==============================================================================
--- trunk/app/widgets/gimpscalebutton.c	(original)
+++ trunk/app/widgets/gimpscalebutton.c	Sun Mar 22 16:35:53 2009
@@ -96,8 +96,8 @@
   adj = gimp_gtk_scale_button_get_adjustment (GTK_SCALE_BUTTON (button));
 
   value = gtk_adjustment_get_value (adj);
-  lower = adj->lower;
-  upper = adj->upper;
+  lower = gtk_adjustment_get_lower (adj);
+  upper = gtk_adjustment_get_upper (adj);
 
   /*  use U+2009 THIN SPACE to seperate the percent sign from the number */
 
@@ -128,10 +128,12 @@
   if (steps < 1)
     return TRUE;
 
-  value = 0.5 + ((adj->value - adj->lower) * (gdouble) steps /
-                 (adj->upper - adj->lower));
+  value = 0.5 + ((gtk_adjustment_get_value (adj) -
+                  gtk_adjustment_get_lower (adj)) * (gdouble) steps /
+                 (gtk_adjustment_get_upper (adj) -
+                  gtk_adjustment_get_lower (adj)));
 
-  cr = gdk_cairo_create (widget->window);
+  cr = gdk_cairo_create (gtk_widget_get_window (widget));
 
   gdk_cairo_rectangle (cr, &event->area);
   cairo_clip (cr);

Modified: trunk/app/widgets/gimpselectiondata.c
==============================================================================
--- trunk/app/widgets/gimpselectiondata.c	(original)
+++ trunk/app/widgets/gimpselectiondata.c	Sun Mar 22 16:35:53 2009
@@ -92,7 +92,8 @@
         }
     }
 
-  gtk_selection_data_set (selection, selection->target,
+  gtk_selection_data_set (selection,
+                          gtk_selection_data_get_target (selection),
                           8, (guchar *) vals, strlen (vals));
 
   g_free (vals);
@@ -104,24 +105,28 @@
   GList       *crap_list = NULL;
   GList       *uri_list  = NULL;
   GList       *list;
+  gint         length;
+  const gchar *data;
   const gchar *buffer;
 
   g_return_val_if_fail (selection != NULL, NULL);
 
-  if ((selection->format != 8) || (selection->length < 1))
+  length = gtk_selection_data_get_length (selection);
+
+  if (gtk_selection_data_get_format (selection) != 8 || length < 1)
     {
       g_warning ("Received invalid file data!");
       return NULL;
     }
 
-  buffer = (const gchar *) selection->data;
+  data = buffer = (const gchar *) gtk_selection_data_get_data (selection);
 
   GIMP_LOG (DND, "raw buffer >>%s<<", buffer);
 
   {
     gchar name_buffer[1024];
 
-    while (*buffer && (buffer - (gchar *) selection->data < selection->length))
+    while (*buffer && (buffer - data < length))
       {
         gchar *name = name_buffer;
         gint   len  = 0;
@@ -288,7 +293,8 @@
   vals[2] = b + (b << 8);
   vals[3] = a + (a << 8);
 
-  gtk_selection_data_set (selection, selection->target,
+  gtk_selection_data_set (selection,
+                          gtk_selection_data_get_target (selection),
                           16, (const guchar *) vals, 8);
 }
 
@@ -296,18 +302,19 @@
 gimp_selection_data_get_color (GtkSelectionData *selection,
                                GimpRGB          *color)
 {
-  guint16 *color_vals;
+  const guint16 *color_vals;
 
   g_return_val_if_fail (selection != NULL, FALSE);
   g_return_val_if_fail (color != NULL, FALSE);
 
-  if ((selection->format != 16) || (selection->length != 8))
+  if (gtk_selection_data_get_format (selection) != 16 ||
+      gtk_selection_data_get_length (selection) != 8)
     {
       g_warning ("Received invalid color data!");
       return FALSE;
     }
 
-  color_vals = (guint16 *) selection->data;
+  color_vals = (const guint16 *) gtk_selection_data_get_data (selection);
 
   gimp_rgba_set_uchar (color,
                        (guchar) (color_vals[0] >> 8),
@@ -327,7 +334,8 @@
   g_return_if_fail (stream != NULL);
   g_return_if_fail (stream_length > 0);
 
-  gtk_selection_data_set (selection, selection->target,
+  gtk_selection_data_set (selection,
+                          gtk_selection_data_get_target (selection),
                           8, (guchar *) stream, stream_length);
 }
 
@@ -335,18 +343,22 @@
 gimp_selection_data_get_stream (GtkSelectionData *selection,
                                 gsize            *stream_length)
 {
+  gint length;
+
   g_return_val_if_fail (selection != NULL, NULL);
   g_return_val_if_fail (stream_length != NULL, NULL);
 
-  if ((selection->format != 8) || (selection->length < 1))
+  length = gtk_selection_data_get_length (selection);
+
+  if (gtk_selection_data_get_format (selection) != 8 || length < 1)
     {
       g_warning ("Received invalid data stream!");
       return NULL;
     }
 
-  *stream_length = selection->length;
+  *stream_length = length;
 
-  return (const guchar *) selection->data;
+  return (const guchar *) gtk_selection_data_get_data (selection);
 }
 
 void
@@ -360,7 +372,8 @@
 
   str = g_strdup_printf ("%d:%d", get_pid (), gimp_image_get_ID (image));
 
-  gtk_selection_data_set (selection, selection->target,
+  gtk_selection_data_set (selection,
+                          gtk_selection_data_get_target (selection),
                           8, (guchar *) str, strlen (str));
 
   g_free (str);
@@ -405,7 +418,8 @@
   str = g_strdup_printf ("%d:%d:%d", get_pid (), gimp_image_get_ID (image),
                          (gint) channel);
 
-  gtk_selection_data_set (selection, selection->target,
+  gtk_selection_data_set (selection,
+                          gtk_selection_data_get_target (selection),
                           8, (guchar *) str, strlen (str));
 
   g_free (str);
@@ -458,7 +472,8 @@
 
   str = g_strdup_printf ("%d:%d", get_pid (), gimp_item_get_ID (item));
 
-  gtk_selection_data_set (selection, selection->target,
+  gtk_selection_data_set (selection,
+                          gtk_selection_data_get_target (selection),
                           8, (guchar *) str, strlen (str));
 
   g_free (str);
@@ -507,7 +522,8 @@
 
       str = g_strdup_printf ("%d:%p:%s", get_pid (), object, name);
 
-      gtk_selection_data_set (selection, selection->target,
+      gtk_selection_data_set (selection,
+                              gtk_selection_data_get_target (selection),
                               8, (guchar *) str, strlen (str));
 
       g_free (str);
@@ -638,13 +654,14 @@
 {
   const gchar *name;
 
-  if ((selection->format != 8) || (selection->length < 1))
+  if (gtk_selection_data_get_format (selection) != 8 ||
+      gtk_selection_data_get_length (selection) < 1)
     {
       g_warning ("%s: received invalid selection data", strfunc);
       return NULL;
     }
 
-  name = (const gchar *) selection->data;
+  name = (const gchar *) gtk_selection_data_get_data (selection);
 
   if (! g_utf8_validate (name, -1, NULL))
     {

Modified: trunk/app/widgets/gimpsessioninfo.c
==============================================================================
--- trunk/app/widgets/gimpsessioninfo.c	(original)
+++ trunk/app/widgets/gimpsessioninfo.c	Sun Mar 22 16:35:53 2009
@@ -471,14 +471,18 @@
 void
 gimp_session_info_get_geometry (GimpSessionInfo *info)
 {
+  GdkWindow *window;
+
   g_return_if_fail (GIMP_IS_SESSION_INFO (info));
   g_return_if_fail (GTK_IS_WINDOW (info->widget));
 
-  if (info->widget->window)
+  window = gtk_widget_get_window (info->widget);
+
+  if (window)
     {
       gint x, y;
 
-      gdk_window_get_root_origin (info->widget->window, &x, &y);
+      gdk_window_get_root_origin (window, &x, &y);
 
       /* Don't write negative values to the sessionrc, they are
        * interpreted as relative to the right, respective bottom edge
@@ -489,7 +493,7 @@
 
       if (! info->toplevel_entry || info->toplevel_entry->remember_size)
         {
-          gdk_drawable_get_size (GDK_DRAWABLE (info->widget->window),
+          gdk_drawable_get_size (GDK_DRAWABLE (window),
                                  &info->width, &info->height);
         }
       else

Modified: trunk/app/widgets/gimpsettingsbox.c
==============================================================================
--- trunk/app/widgets/gimpsettingsbox.c	(original)
+++ trunk/app/widgets/gimpsettingsbox.c	Sun Mar 22 16:35:53 2009
@@ -616,6 +616,7 @@
 {
   GtkWidget *toplevel;
   GtkWidget *editor;
+  GtkWidget *content_area;
 
   if (box->editor_dialog)
     {
@@ -647,8 +648,9 @@
                                      box->config,
                                      box->container);
   gtk_container_set_border_width (GTK_CONTAINER (editor), 12);
-  gtk_container_add (GTK_CONTAINER (GTK_DIALOG (box->editor_dialog)->vbox),
-                     editor);
+
+  content_area = gtk_dialog_get_content_area (GTK_DIALOG (box->editor_dialog));
+  gtk_container_add (GTK_CONTAINER (content_area), editor);
   gtk_widget_show (editor);
 
   gtk_widget_show (box->editor_dialog);

Modified: trunk/app/widgets/gimpstrokeeditor.c
==============================================================================
--- trunk/app/widgets/gimpstrokeeditor.c	(original)
+++ trunk/app/widgets/gimpstrokeeditor.c	Sun Mar 22 16:35:53 2009
@@ -341,7 +341,7 @@
   GtkAllocation *alloc = &widget->allocation;
   gint           w     = MIN (alloc->width, alloc->height) * 2 / 3;
 
-  gtk_paint_arrow (style, widget->window,
+  gtk_paint_arrow (style, gtk_widget_get_window (widget),
                    widget->state, GTK_SHADOW_IN,
                    &event->area, widget, NULL,
                    data ? GTK_ARROW_LEFT : GTK_ARROW_RIGHT, TRUE,

Modified: trunk/app/widgets/gimptexteditor.c
==============================================================================
--- trunk/app/widgets/gimptexteditor.c	(original)
+++ trunk/app/widgets/gimptexteditor.c	Sun Mar 22 16:35:53 2009
@@ -132,6 +132,7 @@
                       GtkTextBuffer   *text_buffer)
 {
   GimpTextEditor *editor;
+  GtkWidget      *content_area;
   GtkWidget      *toolbar;
   GtkWidget      *scrolled_window;
 
@@ -162,13 +163,14 @@
                                                       "<TextEditor>",
                                                       editor, FALSE);
 
+  content_area = gtk_dialog_get_content_area (GTK_DIALOG (editor));
+
   toolbar = gtk_ui_manager_get_widget (GTK_UI_MANAGER (editor->ui_manager),
                                        "/text-editor-toolbar");
 
   if (toolbar)
     {
-      gtk_box_pack_start (GTK_BOX (GTK_DIALOG (editor)->vbox), toolbar,
-                          FALSE, FALSE, 0);
+      gtk_box_pack_start (GTK_BOX (content_area), toolbar, FALSE, FALSE, 0);
       gtk_widget_show (toolbar);
 
       /*  language entry, disabled until it works  */
@@ -205,8 +207,7 @@
                                   GTK_POLICY_AUTOMATIC,
                                   GTK_POLICY_AUTOMATIC);
   gtk_container_set_border_width (GTK_CONTAINER (scrolled_window), 2);
-  gtk_box_pack_start (GTK_BOX (GTK_DIALOG (editor)->vbox),
-                      scrolled_window, TRUE, TRUE, 0);
+  gtk_box_pack_start (GTK_BOX (content_area), scrolled_window, TRUE, TRUE, 0);
   gtk_widget_show (scrolled_window);
 
   editor->view = gtk_text_view_new_with_buffer (text_buffer);
@@ -229,8 +230,8 @@
 
   editor->font_toggle =
     gtk_check_button_new_with_mnemonic (_("_Use selected font"));
-  gtk_box_pack_start (GTK_BOX (GTK_DIALOG (editor)->vbox),
-                      editor->font_toggle, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (content_area), editor->font_toggle,
+                      FALSE, FALSE, 0);
   gtk_widget_show (editor->font_toggle);
 
   g_signal_connect (editor->font_toggle, "toggled",

Modified: trunk/app/widgets/gimptoolbox.c
==============================================================================
--- trunk/app/widgets/gimptoolbox.c	(original)
+++ trunk/app/widgets/gimptoolbox.c	Sun Mar 22 16:35:53 2009
@@ -519,7 +519,7 @@
       gdouble   wilber_height;
       gdouble   factor;
 
-      cr = gdk_cairo_create (widget->window);
+      cr = gdk_cairo_create (gtk_widget_get_window (widget));
       gdk_cairo_rectangle (cr, &clip_rect);
       cairo_clip (cr);
 

Modified: trunk/app/widgets/gimpuimanager.c
==============================================================================
--- trunk/app/widgets/gimpuimanager.c	(original)
+++ trunk/app/widgets/gimpuimanager.c	Sun Mar 22 16:35:53 2009
@@ -947,7 +947,7 @@
 
       if (! menu_item && GTK_IS_MENU (widget))
         {
-          GdkWindow *window = GTK_MENU (widget)->toplevel->window;
+          GdkWindow *window = gtk_widget_get_window (GTK_MENU (widget)->toplevel);
           gint       x, y;
 
           gdk_window_get_pointer (window, &x, &y, NULL);
@@ -1144,7 +1144,7 @@
   if (!GTK_WIDGET_NO_WINDOW (dest_widget) && dest_widget->parent)
     {
       gint wx, wy;
-      gdk_window_get_position (dest_widget->window, &wx, &wy);
+      gdk_window_get_position (gtk_widget_get_window (dest_widget), &wx, &wy);
 
       /* Offset coordinates if widget->window is smaller than
        * widget->allocation.
@@ -1191,7 +1191,7 @@
    * coordinates stay relative to the current window.
    * We end up with window == widget->window, coordinates relative to that.
    */
-  while (window && window != event_widget->window)
+  while (window && window != gtk_widget_get_window (event_widget))
     {
       gint px, py;
 

Modified: trunk/app/widgets/gimpview-popup.c
==============================================================================
--- trunk/app/widgets/gimpview-popup.c	(original)
+++ trunk/app/widgets/gimpview-popup.c	Sun Mar 22 16:35:53 2009
@@ -228,7 +228,7 @@
   gtk_container_add (GTK_CONTAINER (frame), view);
   gtk_widget_show (view);
 
-  gdk_window_get_origin (popup->widget->window, &x, &y);
+  gdk_window_get_origin (gtk_widget_get_window (popup->widget), &x, &y);
 
   x += popup->button_x - (popup->popup_width  >> 1);
   y += popup->button_y - (popup->popup_height >> 1);

Modified: trunk/app/widgets/gimpview.c
==============================================================================
--- trunk/app/widgets/gimpview.c	(original)
+++ trunk/app/widgets/gimpview.c	Sun Mar 22 16:35:53 2009
@@ -218,7 +218,7 @@
 
   attributes_mask = GDK_WA_X | GDK_WA_Y;
 
-  view->event_window = gdk_window_new (widget->window,
+  view->event_window = gdk_window_new (gtk_widget_get_window (widget),
                                        &attributes, attributes_mask);
   gdk_window_set_user_data (view->event_window, view);
 }
@@ -386,7 +386,7 @@
   if (GTK_WIDGET_DRAWABLE (widget))
     {
       gimp_view_renderer_draw (GIMP_VIEW (widget)->renderer,
-                               widget->window, widget,
+                               gtk_widget_get_window (widget), widget,
                                &widget->allocation,
                                &event->area);
     }

Modified: trunk/app/widgets/gimpviewabledialog.c
==============================================================================
--- trunk/app/widgets/gimpviewabledialog.c	(original)
+++ trunk/app/widgets/gimpviewabledialog.c	Sun Mar 22 16:35:53 2009
@@ -109,14 +109,14 @@
 static void
 gimp_viewable_dialog_init (GimpViewableDialog *dialog)
 {
+  GtkWidget *content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
   GtkWidget *frame;
   GtkWidget *hbox;
   GtkWidget *vbox;
 
   frame = gtk_frame_new (NULL);
   gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
-  gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), frame,
-                      FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (content_area), frame, FALSE, FALSE, 0);
   gtk_widget_show (frame);
 
   hbox = gtk_hbox_new (FALSE, 6);

Modified: trunk/app/widgets/gimpwidgets-utils.c
==============================================================================
--- trunk/app/widgets/gimpwidgets-utils.c	(original)
+++ trunk/app/widgets/gimpwidgets-utils.c	Sun Mar 22 16:35:53 2009
@@ -162,7 +162,7 @@
         }
     }
 
-  gdk_window_get_origin (button->window, x, y);
+  gdk_window_get_origin (gtk_widget_get_window (button), x, y);
 
   gtk_widget_size_request (GTK_WIDGET (menu), &menu_requisition);
 
@@ -823,15 +823,15 @@
 
 #ifdef GDK_WINDOWING_WIN32
   if (window && GTK_WIDGET_REALIZED (window))
-    return (GdkNativeWindow)GDK_WINDOW_HWND (GTK_WIDGET (window)->window);
+    return (GdkNativeWindow) GDK_WINDOW_HWND (gtk_widget_get_window (GTK_WIDGET (window)));
 #endif
 
 #ifdef GDK_WINDOWING_X11
   if (window && GTK_WIDGET_REALIZED (window))
-    return GDK_WINDOW_XID (GTK_WIDGET (window)->window);
+    return GDK_WINDOW_XID (gtk_widget_get_window (GTK_WIDGET (window)));
 #endif
 
-  return (GdkNativeWindow)0;
+  return (GdkNativeWindow) 0;
 }
 
 static void
@@ -839,7 +839,7 @@
                                 GdkWindow *parent)
 {
   if (GTK_WIDGET_REALIZED (window))
-    gdk_window_set_transient_for (window->window, parent);
+    gdk_window_set_transient_for (gtk_widget_get_window (window), parent);
 }
 
 /* similar to what we have in libgimp/gimpui.c */
@@ -864,7 +864,8 @@
     return;
 
   if (GTK_WIDGET_REALIZED (window))
-    gdk_window_set_transient_for (GTK_WIDGET (window)->window, parent);
+    gdk_window_set_transient_for (gtk_widget_get_window (GTK_WIDGET (window)),
+                                  parent);
 
   g_signal_connect_object (window, "realize",
                            G_CALLBACK (gimp_window_transient_realized),



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