]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkiconview.c
Include "config.h" instead of <config.h> Command used: find -name
[~andy/gtk] / gtk / gtkiconview.c
index 7d87781877944ed0c782ad6844a77c8bc758a822..0c46efb3abde2528f13e94e03731cb70ac8dce12 100644 (file)
@@ -17,7 +17,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#include <config.h>
+#include "config.h"
 #include <string.h>
 
 #include <atk/atk.h>
@@ -33,7 +33,6 @@
 #include "gtkbindings.h"
 #include "gtkdnd.h"
 #include "gtkmain.h"
-#include "gtksignal.h"
 #include "gtkintl.h"
 #include "gtkaccessible.h"
 #include "gtkwindow.h"
@@ -158,6 +157,8 @@ struct _GtkIconViewPrivate
   gint pixbuf_cell;
   gint text_cell;
 
+  gint tooltip_column;
+
   /* Drag-and-drop. */
   GdkModifierType start_button_mask;
   gint pressed_button;
@@ -218,11 +219,11 @@ enum
   PROP_ROW_SPACING,
   PROP_COLUMN_SPACING,
   PROP_MARGIN,
-  PROP_REORDERABLE
+  PROP_REORDERABLE,
+  PROP_TOOLTIP_COLUMN
 };
 
 /* GObject vfuncs */
-static void             gtk_icon_view_class_init                (GtkIconViewClass   *klass);
 static void             gtk_icon_view_cell_layout_init          (GtkCellLayoutIface *iface);
 static void             gtk_icon_view_finalize                  (GObject            *object);
 static void             gtk_icon_view_set_property              (GObject            *object,
@@ -240,6 +241,10 @@ static void             gtk_icon_view_destroy                   (GtkObject
 /* GtkWidget vfuncs */
 static void             gtk_icon_view_realize                   (GtkWidget          *widget);
 static void             gtk_icon_view_unrealize                 (GtkWidget          *widget);
+static void             gtk_icon_view_style_set                 (GtkWidget        *widget,
+                                                                GtkStyle         *previous_style);
+static void             gtk_icon_view_state_changed             (GtkWidget        *widget,
+                                                                GtkStateType      previous_state);
 static void             gtk_icon_view_size_request              (GtkWidget          *widget,
                                                                 GtkRequisition     *requisition);
 static void             gtk_icon_view_size_allocate             (GtkWidget          *widget,
@@ -252,6 +257,10 @@ static gboolean         gtk_icon_view_button_press              (GtkWidget
                                                                 GdkEventButton     *event);
 static gboolean         gtk_icon_view_button_release            (GtkWidget          *widget,
                                                                 GdkEventButton     *event);
+static gboolean         gtk_icon_view_key_press                 (GtkWidget          *widget,
+                                                                GdkEventKey        *event);
+static gboolean         gtk_icon_view_key_release               (GtkWidget          *widget,
+                                                                GdkEventKey        *event);
 static AtkObject       *gtk_icon_view_get_accessible            (GtkWidget          *widget);
 
 
@@ -380,10 +389,14 @@ static void                 gtk_icon_view_cell_layout_set_cell_data_func (GtkCel
 static void                 gtk_icon_view_cell_layout_reorder            (GtkCellLayout          *layout,
                                                                          GtkCellRenderer        *cell,
                                                                          gint                    position);
+static GList *              gtk_icon_view_cell_layout_get_cells          (GtkCellLayout          *layout);
+
 static void                 gtk_icon_view_item_activate_cell             (GtkIconView            *icon_view,
                                                                          GtkIconViewItem        *item,
                                                                          GtkIconViewCellInfo    *cell_info,
                                                                          GdkEvent               *event);
+static void                 gtk_icon_view_item_selected_changed          (GtkIconView            *icon_view,
+                                                                         GtkIconViewItem        *item);
 static void                 gtk_icon_view_put                            (GtkIconView            *icon_view,
                                                                          GtkWidget              *widget,
                                                                          GtkIconViewItem        *item,
@@ -435,13 +448,34 @@ static gboolean gtk_icon_view_maybe_begin_drag   (GtkIconView             *icon_
                                                  GdkEventMotion          *event);
 
 static void     remove_scroll_timeout            (GtkIconView *icon_view);
-
+static void     clear_dest_info                  (GtkIconView *icon_view);
+static void     clear_source_info                (GtkIconView *icon_view);
+
+static void     adjust_wrap_width                (GtkIconView     *icon_view,
+                                                 GtkIconViewItem *item);
+
+/* GtkBuildable */
+static GtkBuildableIface *parent_buildable_iface;
+static void     gtk_icon_view_buildable_init             (GtkBuildableIface *iface);
+static gboolean gtk_icon_view_buildable_custom_tag_start (GtkBuildable  *buildable,
+                                                         GtkBuilder    *builder,
+                                                         GObject       *child,
+                                                         const gchar   *tagname,
+                                                         GMarkupParser *parser,
+                                                         gpointer      *data);
+static void     gtk_icon_view_buildable_custom_tag_end   (GtkBuildable  *buildable,
+                                                         GtkBuilder    *builder,
+                                                         GObject       *child,
+                                                         const gchar   *tagname,
+                                                         gpointer      *data);
 
 static guint icon_view_signals[LAST_SIGNAL] = { 0 };
 
 G_DEFINE_TYPE_WITH_CODE (GtkIconView, gtk_icon_view, GTK_TYPE_CONTAINER,
                         G_IMPLEMENT_INTERFACE (GTK_TYPE_CELL_LAYOUT,
-                                               gtk_icon_view_cell_layout_init));
+                                               gtk_icon_view_cell_layout_init)
+                        G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE,
+                                               gtk_icon_view_buildable_init))
 
 static void
 gtk_icon_view_class_init (GtkIconViewClass *klass)
@@ -469,12 +503,16 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
   
   widget_class->realize = gtk_icon_view_realize;
   widget_class->unrealize = gtk_icon_view_unrealize;
+  widget_class->style_set = gtk_icon_view_style_set;
+  widget_class->get_accessible = gtk_icon_view_get_accessible;
   widget_class->size_request = gtk_icon_view_size_request;
   widget_class->size_allocate = gtk_icon_view_size_allocate;
   widget_class->expose_event = gtk_icon_view_expose;
   widget_class->motion_notify_event = gtk_icon_view_motion;
   widget_class->button_press_event = gtk_icon_view_button_press;
   widget_class->button_release_event = gtk_icon_view_button_release;
+  widget_class->key_press_event = gtk_icon_view_key_press;
+  widget_class->key_release_event = gtk_icon_view_key_release;
   widget_class->drag_begin = gtk_icon_view_drag_begin;
   widget_class->drag_end = gtk_icon_view_drag_end;
   widget_class->drag_data_get = gtk_icon_view_drag_data_get;
@@ -483,7 +521,7 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
   widget_class->drag_motion = gtk_icon_view_drag_motion;
   widget_class->drag_drop = gtk_icon_view_drag_drop;
   widget_class->drag_data_received = gtk_icon_view_drag_data_received;
-  widget_class->get_accessible = gtk_icon_view_get_accessible;
+  widget_class->state_changed = gtk_icon_view_state_changed;
 
   container_class->remove = gtk_icon_view_remove;
   container_class->forall = gtk_icon_view_forall;
@@ -598,7 +636,7 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
   
 
   /**
-   * GtkIconView::item-width:
+   * GtkIconView:item-width:
    *
    * The item-width property specifies the width to use for each item. 
    * If it is set to -1, the icon view will automatically determine a 
@@ -615,7 +653,7 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
                                                     GTK_PARAM_READWRITE));  
 
   /**
-   * GtkIconView::spacing:
+   * GtkIconView:spacing:
    *
    * The spacing property specifies the space which is inserted between
    * the cells (i.e. the icon and the text) of an item.
@@ -631,7 +669,7 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
                                                     GTK_PARAM_READWRITE));
 
   /**
-   * GtkIconView::row-spacing:
+   * GtkIconView:row-spacing:
    *
    * The row-spacing property specifies the space which is inserted between
    * the rows of the icon view.
@@ -647,7 +685,7 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
                                                     GTK_PARAM_READWRITE));
 
   /**
-   * GtkIconView::column-spacing:
+   * GtkIconView:column-spacing:
    *
    * The column-spacing property specifies the space which is inserted between
    * the columns of the icon view.
@@ -658,12 +696,12 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
                                    PROP_COLUMN_SPACING,
                                    g_param_spec_int ("column-spacing",
                                                     P_("Column Spacing"),
-                                                    P_("Space which is inserted between grid column"),
+                                                    P_("Space which is inserted between grid columns"),
                                                     0, G_MAXINT, 6,
                                                     GTK_PARAM_READWRITE));
 
   /**
-   * GtkIconView::margin:
+   * GtkIconView:margin:
    *
    * The margin property specifies the space which is inserted 
    * at the edges of the icon view.
@@ -680,7 +718,7 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
 
 
   /**
-   * GtkIconView::orientation:
+   * GtkIconView:orientation:
    *
    * The orientation property specifies how the cells (i.e. the icon and 
    * the text) of the item are positioned relative to each other.
@@ -697,7 +735,7 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
                                                      GTK_PARAM_READWRITE));
 
   /**
-   * GtkIconView:orientation:
+   * GtkIconView:reorderable:
    *
    * The reorderable property specifies if the items can be reordered
    * by DND.
@@ -712,6 +750,18 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
                                                         FALSE,
                                                         G_PARAM_READWRITE));
 
+    g_object_class_install_property (gobject_class,
+                                     PROP_TOOLTIP_COLUMN,
+                                     g_param_spec_int ("tooltip-column",
+                                                       P_("Tooltip Column"),
+                                                       P_("The column in the model containing the tooltip texts for the items"),
+                                                       -1,
+                                                       G_MAXINT,
+                                                       -1,
+                                                       GTK_PARAM_READWRITE));
+
+
+
   /* Style properties */
   gtk_widget_class_install_style_property (widget_class,
                                            g_param_spec_boxed ("selection-box-color",
@@ -730,7 +780,7 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
 
   /* Signals */
   widget_class->set_scroll_adjustments_signal =
-    g_signal_new ("set_scroll_adjustments",
+    g_signal_new (I_("set_scroll_adjustments"),
                  G_TYPE_FROM_CLASS (gobject_class),
                  G_SIGNAL_RUN_LAST,
                  G_STRUCT_OFFSET (GtkIconViewClass, set_scroll_adjustments),
@@ -740,7 +790,7 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
                  GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT);
 
   icon_view_signals[ITEM_ACTIVATED] =
-    g_signal_new ("item_activated",
+    g_signal_new (I_("item_activated"),
                  G_TYPE_FROM_CLASS (gobject_class),
                  G_SIGNAL_RUN_LAST,
                  G_STRUCT_OFFSET (GtkIconViewClass, item_activated),
@@ -750,7 +800,7 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
                  GTK_TYPE_TREE_PATH);
 
   icon_view_signals[SELECTION_CHANGED] =
-    g_signal_new ("selection_changed",
+    g_signal_new (I_("selection-changed"),
                  G_TYPE_FROM_CLASS (gobject_class),
                  G_SIGNAL_RUN_FIRST,
                  G_STRUCT_OFFSET (GtkIconViewClass, selection_changed),
@@ -759,7 +809,7 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
                  G_TYPE_NONE, 0);
   
   icon_view_signals[SELECT_ALL] =
-    g_signal_new ("select_all",
+    g_signal_new (I_("select_all"),
                  G_TYPE_FROM_CLASS (gobject_class),
                  G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
                  G_STRUCT_OFFSET (GtkIconViewClass, select_all),
@@ -768,7 +818,7 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
                  G_TYPE_NONE, 0);
   
   icon_view_signals[UNSELECT_ALL] =
-    g_signal_new ("unselect_all",
+    g_signal_new (I_("unselect_all"),
                  G_TYPE_FROM_CLASS (gobject_class),
                  G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
                  G_STRUCT_OFFSET (GtkIconViewClass, unselect_all),
@@ -777,7 +827,7 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
                  G_TYPE_NONE, 0);
 
   icon_view_signals[SELECT_CURSOR_ITEM] =
-    g_signal_new ("select_cursor_item",
+    g_signal_new (I_("select_cursor_item"),
                  G_TYPE_FROM_CLASS (gobject_class),
                  G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
                  G_STRUCT_OFFSET (GtkIconViewClass, select_cursor_item),
@@ -786,7 +836,7 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
                  G_TYPE_NONE, 0);
 
   icon_view_signals[TOGGLE_CURSOR_ITEM] =
-    g_signal_new ("toggle_cursor_item",
+    g_signal_new (I_("toggle_cursor_item"),
                  G_TYPE_FROM_CLASS (gobject_class),
                  G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
                  G_STRUCT_OFFSET (GtkIconViewClass, toggle_cursor_item),
@@ -795,7 +845,7 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
                  G_TYPE_NONE, 0);
 
   icon_view_signals[ACTIVATE_CURSOR_ITEM] =
-    g_signal_new ("activate_cursor_item",
+    g_signal_new (I_("activate_cursor_item"),
                  G_TYPE_FROM_CLASS (gobject_class),
                  G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
                  G_STRUCT_OFFSET (GtkIconViewClass, activate_cursor_item),
@@ -804,7 +854,7 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
                  G_TYPE_BOOLEAN, 0);
   
   icon_view_signals[MOVE_CURSOR] =
-    g_signal_new ("move_cursor",
+    g_signal_new (I_("move_cursor"),
                  G_TYPE_FROM_CLASS (gobject_class),
                  G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
                  G_STRUCT_OFFSET (GtkIconViewClass, move_cursor),
@@ -815,14 +865,25 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
                  G_TYPE_INT);
 
   /* Key bindings */
-  gtk_binding_entry_add_signal (binding_set, GDK_a, GDK_CONTROL_MASK, "select_all", 0);
-  gtk_binding_entry_add_signal (binding_set, GDK_a, GDK_CONTROL_MASK | GDK_SHIFT_MASK, "unselect_all", 0);
-  gtk_binding_entry_add_signal (binding_set, GDK_space, GDK_CONTROL_MASK, "toggle_cursor_item", 0);
-
-  gtk_binding_entry_add_signal (binding_set, GDK_space, 0, "activate_cursor_item", 0);
-  gtk_binding_entry_add_signal (binding_set, GDK_Return, 0, "activate_cursor_item", 0);
-  gtk_binding_entry_add_signal (binding_set, GDK_ISO_Enter, 0, "activate_cursor_item", 0);
-  gtk_binding_entry_add_signal (binding_set, GDK_KP_Enter, 0, "activate_cursor_item", 0);
+  gtk_binding_entry_add_signal (binding_set, GDK_a, GDK_CONTROL_MASK, 
+                               "select_all", 0);
+  gtk_binding_entry_add_signal (binding_set, GDK_a, GDK_CONTROL_MASK | GDK_SHIFT_MASK, 
+                               "unselect_all", 0);
+  gtk_binding_entry_add_signal (binding_set, GDK_space, GDK_CONTROL_MASK, 
+                               "toggle_cursor_item", 0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Space, GDK_CONTROL_MASK,
+                               "toggle_cursor_item", 0);
+
+  gtk_binding_entry_add_signal (binding_set, GDK_space, 0, 
+                               "activate_cursor_item", 0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Space, 0,
+                               "activate_cursor_item", 0);
+  gtk_binding_entry_add_signal (binding_set, GDK_Return, 0, 
+                               "activate_cursor_item", 0);
+  gtk_binding_entry_add_signal (binding_set, GDK_ISO_Enter, 0, 
+                               "activate_cursor_item", 0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Enter, 0, 
+                               "activate_cursor_item", 0);
 
   gtk_icon_view_add_move_binding (binding_set, GDK_Up, 0,
                                  GTK_MOVEMENT_DISPLAY_LINES, -1);
@@ -871,6 +932,15 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
                                  GTK_MOVEMENT_VISUAL_POSITIONS, -1);
 }
 
+static void
+gtk_icon_view_buildable_init (GtkBuildableIface *iface)
+{
+  parent_buildable_iface = g_type_interface_peek_parent (iface);
+  iface->add_child = _gtk_cell_layout_buildable_add_child;
+  iface->custom_tag_start = gtk_icon_view_buildable_custom_tag_start;
+  iface->custom_tag_end = gtk_icon_view_buildable_custom_tag_end;
+}
+
 static void
 gtk_icon_view_cell_layout_init (GtkCellLayoutIface *iface)
 {
@@ -881,6 +951,7 @@ gtk_icon_view_cell_layout_init (GtkCellLayoutIface *iface)
   iface->set_cell_data_func = gtk_icon_view_cell_layout_set_cell_data_func;
   iface->clear_attributes = gtk_icon_view_cell_layout_clear_attributes;
   iface->reorder = gtk_icon_view_cell_layout_reorder;
+  iface->get_cells = gtk_icon_view_cell_layout_get_cells;
 }
 
 static void
@@ -899,6 +970,7 @@ gtk_icon_view_init (GtkIconView *icon_view)
   icon_view->priv->pixbuf_column = -1;
   icon_view->priv->text_cell = -1;
   icon_view->priv->pixbuf_cell = -1;  
+  icon_view->priv->tooltip_column = -1;  
 
   GTK_WIDGET_SET_FLAGS (icon_view, GTK_CAN_FOCUS);
   
@@ -942,7 +1014,22 @@ gtk_icon_view_destroy (GtkObject *object)
     }
 
   remove_scroll_timeout (icon_view);
+
+  if (icon_view->priv->hadjustment != NULL)
+    {
+      g_object_unref (icon_view->priv->hadjustment);
+      icon_view->priv->hadjustment = NULL;
+    }
+
+  if (icon_view->priv->vadjustment != NULL)
+    {
+      g_object_unref (icon_view->priv->vadjustment);
+      icon_view->priv->vadjustment = NULL;
+    }
   
+  clear_dest_info (icon_view);
+  clear_source_info (icon_view);
+
   (* GTK_OBJECT_CLASS (gtk_icon_view_parent_class)->destroy) (object);
 }
 
@@ -1008,6 +1095,10 @@ gtk_icon_view_set_property (GObject      *object,
       gtk_icon_view_set_reorderable (icon_view, g_value_get_boolean (value));
       break;
       
+    case PROP_TOOLTIP_COLUMN:
+      gtk_icon_view_set_tooltip_column (icon_view, g_value_get_int (value));
+      break;
+
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -1065,6 +1156,9 @@ gtk_icon_view_get_property (GObject      *object,
     case PROP_REORDERABLE:
       g_value_set_boolean (value, icon_view->priv->reorderable);
       break;
+    case PROP_TOOLTIP_COLUMN:
+      g_value_set_int (value, icon_view->priv->tooltip_column);
+      break;
 
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -1099,6 +1193,7 @@ gtk_icon_view_realize (GtkWidget *widget)
 
   widget->window = gdk_window_new (gtk_widget_get_parent_window (widget),
                                   &attributes, attributes_mask);
+  gdk_window_set_back_pixmap (widget->window, NULL, FALSE);
   gdk_window_set_user_data (widget->window, widget);
 
   /* Make the window for the icon view */
@@ -1121,7 +1216,6 @@ gtk_icon_view_realize (GtkWidget *widget)
 
   widget->style = gtk_style_attach (widget->style, widget->window);
   gdk_window_set_background (icon_view->priv->bin_window, &widget->style->base[widget->state]);
-  gdk_window_set_background (widget->window, &widget->style->base[widget->state]);
 
   gdk_window_show (icon_view->priv->bin_window);
 }
@@ -1142,15 +1236,43 @@ gtk_icon_view_unrealize (GtkWidget *widget)
     (* GTK_WIDGET_CLASS (gtk_icon_view_parent_class)->unrealize) (widget);
 }
 
+static void
+gtk_icon_view_state_changed (GtkWidget      *widget,
+                            GtkStateType    previous_state)
+{
+  GtkIconView *icon_view = GTK_ICON_VIEW (widget);
+
+  if (GTK_WIDGET_REALIZED (widget))
+    {
+      gdk_window_set_background (widget->window, &widget->style->base[widget->state]);
+      gdk_window_set_background (icon_view->priv->bin_window, &widget->style->base[widget->state]);
+    }
+
+  gtk_widget_queue_draw (widget);
+}
+
+static void
+gtk_icon_view_style_set (GtkWidget *widget,
+                        GtkStyle *previous_style)
+{
+  GtkIconView *icon_view = GTK_ICON_VIEW (widget);
+
+  if (GTK_WIDGET_REALIZED (widget))
+    {
+      gdk_window_set_background (widget->window, &widget->style->base[widget->state]);
+      gdk_window_set_background (icon_view->priv->bin_window, &widget->style->base[widget->state]);
+    }
+
+  gtk_widget_queue_resize (widget);
+}
+
 static void
 gtk_icon_view_size_request (GtkWidget      *widget,
                            GtkRequisition *requisition)
 {
-  GtkIconView *icon_view;
+  GtkIconView *icon_view = GTK_ICON_VIEW (widget);
   GList *tmp_list;
 
-  icon_view = GTK_ICON_VIEW (widget);
-
   requisition->width = icon_view->priv->width;
   requisition->height = icon_view->priv->height;
 
@@ -1403,8 +1525,6 @@ rubberband_scroll_timeout (gpointer data)
   GtkIconView *icon_view;
   gdouble value;
 
-  GDK_THREADS_ENTER ();
-  
   icon_view = data;
 
   value = MIN (icon_view->priv->vadjustment->value +
@@ -1416,8 +1536,6 @@ rubberband_scroll_timeout (gpointer data)
 
   gtk_icon_view_update_rubberband (icon_view);
   
-  GDK_THREADS_LEAVE ();
-
   return TRUE;
 }
 
@@ -1452,7 +1570,7 @@ gtk_icon_view_motion (GtkWidget      *widget,
          icon_view->priv->event_last_y = event->y;
 
          if (icon_view->priv->scroll_timeout_id == 0)
-           icon_view->priv->scroll_timeout_id = g_timeout_add (30, rubberband_scroll_timeout, 
+           icon_view->priv->scroll_timeout_id = gdk_threads_add_timeout (30, rubberband_scroll_timeout, 
                                                                icon_view);
        }
       else 
@@ -1550,6 +1668,25 @@ gtk_icon_view_item_activate_cell (GtkIconView         *icon_view,
     }
 }
 
+static void 
+gtk_icon_view_item_selected_changed (GtkIconView      *icon_view,
+                                     GtkIconViewItem  *item)
+{
+  AtkObject *obj;
+  AtkObject *item_obj;
+
+  obj = gtk_widget_get_accessible (GTK_WIDGET (icon_view));
+  if (obj != NULL)
+    {
+      item_obj = atk_object_ref_accessible_child (obj, item->index);
+      if (item_obj != NULL)
+        {
+          atk_object_notify_state_change (item_obj, ATK_STATE_SELECTED, item->selected);
+          g_object_unref (item_obj);
+        }
+    }
+}
+
 static void 
 gtk_icon_view_put (GtkIconView     *icon_view,
                   GtkWidget       *widget,
@@ -1643,7 +1780,7 @@ gtk_icon_view_start_editing (GtkIconView         *icon_view,
 
       /* FIXME ugly special case */ 
       if (GTK_IS_ENTRY (editable) || GTK_IS_COMBO_BOX (editable))
-       g_object_set (editable, "has_frame", TRUE, NULL);
+       g_object_set (editable, "has-frame", TRUE, NULL);
 
       /* the rest corresponds to tree_view_real_start_editing... */
       icon_view->priv->edited_item = item;
@@ -1713,7 +1850,7 @@ gtk_icon_view_stop_editing (GtkIconView *icon_view,
  * gtk_icon_view_set_cursor:
  * @icon_view: A #GtkIconView
  * @path: A #GtkTreePath
- * @cell: A #GtkCellRenderer or %NULL
+ * @cell: One of the cell renderers of @icon_view, or %NULL
  * @start_editing: %TRUE if the specified cell should start being edited.
  *
  * Sets the current keyboard focus to be at @path, and selects it.  This is
@@ -1734,7 +1871,7 @@ gtk_icon_view_set_cursor (GtkIconView     *icon_view,
                          GtkCellRenderer *cell,
                          gboolean         start_editing)
 {
-  GtkIconViewItem *item;
+  GtkIconViewItem *item = NULL;
   GtkIconViewCellInfo *info =  NULL;
   GList *l;
   gint i, cell_pos;
@@ -1746,34 +1883,32 @@ gtk_icon_view_set_cursor (GtkIconView     *icon_view,
   gtk_icon_view_stop_editing (icon_view, TRUE);
 
   if (gtk_tree_path_get_depth (path) == 1)
-    item = g_list_nth (icon_view->priv->items,
-                      gtk_tree_path_get_indices(path)[0])->data;
+    item = g_list_nth_data (icon_view->priv->items,
+                           gtk_tree_path_get_indices(path)[0]);
   
   if (!item)
     return;
-  
+
   cell_pos = -1;
   for (l = icon_view->priv->cell_list, i = 0; l; l = l->next, i++)
     {
       info = l->data;
-
+      
       if (info->cell == cell)
        {
          cell_pos = i;
          break;
        }
-
+         
       info = NULL;
     }
+  
+  g_return_if_fail (cell == NULL || info != NULL);
 
   gtk_icon_view_set_cursor_item (icon_view, item, cell_pos);
-  if (FALSE && GTK_WIDGET_REALIZED (icon_view))
-    gtk_icon_view_scroll_to_item (icon_view, item);
-  else
-    gtk_icon_view_scroll_to_path (icon_view, path,
-                                 FALSE, 0.0, 0.0);
-
-  if (start_editing)
+  gtk_icon_view_scroll_to_path (icon_view, path, FALSE, 0.0, 0.0);
+  
+  if (info && start_editing)
     gtk_icon_view_start_editing (icon_view, item, info, NULL);
 }
 
@@ -1961,6 +2096,7 @@ gtk_icon_view_button_press (GtkWidget      *widget,
        }
 
       icon_view->priv->last_single_clicked = NULL;
+      icon_view->priv->pressed_button = -1;
     }
   
   if (dirty)
@@ -1987,6 +2123,35 @@ gtk_icon_view_button_release (GtkWidget      *widget,
   return TRUE;
 }
 
+static gboolean
+gtk_icon_view_key_press (GtkWidget      *widget,
+                        GdkEventKey    *event)
+{
+  GtkIconView *icon_view = GTK_ICON_VIEW (widget);
+
+  if (icon_view->priv->doing_rubberband)
+    {
+      if (event->keyval == GDK_Escape)
+       gtk_icon_view_stop_rubberbanding (icon_view);
+
+      return TRUE;
+    }
+
+  return (* GTK_WIDGET_CLASS (gtk_icon_view_parent_class)->key_press_event) (widget, event);
+}
+
+static gboolean
+gtk_icon_view_key_release (GtkWidget      *widget,
+                          GdkEventKey    *event)
+{
+  GtkIconView *icon_view = GTK_ICON_VIEW (widget);
+
+  if (icon_view->priv->doing_rubberband)
+    return TRUE;
+
+  return (* GTK_WIDGET_CLASS (gtk_icon_view_parent_class)->key_press_event) (widget, event);
+}
+
 static void
 gtk_icon_view_update_rubberband (gpointer data)
 {
@@ -2137,6 +2302,10 @@ gtk_icon_view_item_hit_test (GtkIconView      *icon_view,
   GList *l;
   GdkRectangle box;
  
+  if (MIN (x + width, item->x + item->width) - MAX (x, item->x) <= 0 ||
+      MIN (y + height, item->y + item->height) - MAX (y, item->y) <= 0)
+    return FALSE;
+
   for (l = icon_view->priv->cell_list; l; l = l->next)
     {
       GtkIconViewCellInfo *info = (GtkIconViewCellInfo *)l->data;
@@ -2172,6 +2341,7 @@ gtk_icon_view_unselect_all_internal (GtkIconView  *icon_view)
          item->selected = FALSE;
          dirty = TRUE;
          gtk_icon_view_queue_draw_item (icon_view, item);
+         gtk_icon_view_item_selected_changed (icon_view, item);
        }
     }
 
@@ -2213,8 +2383,7 @@ gtk_icon_view_set_adjustments (GtkIconView   *icon_view,
   if (icon_view->priv->hadjustment != hadj)
     {
       icon_view->priv->hadjustment = hadj;
-      g_object_ref (icon_view->priv->hadjustment);
-      gtk_object_sink (GTK_OBJECT (icon_view->priv->hadjustment));
+      g_object_ref_sink (icon_view->priv->hadjustment);
 
       g_signal_connect (icon_view->priv->hadjustment, "value_changed",
                        G_CALLBACK (gtk_icon_view_adjustment_changed),
@@ -2225,8 +2394,7 @@ gtk_icon_view_set_adjustments (GtkIconView   *icon_view,
   if (icon_view->priv->vadjustment != vadj)
     {
       icon_view->priv->vadjustment = vadj;
-      g_object_ref (icon_view->priv->vadjustment);
-      gtk_object_sink (GTK_OBJECT (icon_view->priv->vadjustment));
+      g_object_ref_sink (icon_view->priv->vadjustment);
 
       g_signal_connect (icon_view->priv->vadjustment, "value_changed",
                        G_CALLBACK (gtk_icon_view_adjustment_changed),
@@ -2322,6 +2490,7 @@ gtk_icon_view_real_toggle_cursor_item (GtkIconView *icon_view)
       icon_view->priv->cursor_item->selected = !icon_view->priv->cursor_item->selected;
       g_signal_emit (icon_view, icon_view_signals[SELECTION_CHANGED], 0); 
       
+      gtk_icon_view_item_selected_changed (icon_view, icon_view->priv->cursor_item);      
       gtk_icon_view_queue_draw_item (icon_view, icon_view->priv->cursor_item);
       break;
     }
@@ -2354,7 +2523,6 @@ gtk_icon_view_layout_single_row (GtkIconView *icon_view,
                                 gint        *maximum_width)
 {
   gint focus_width;
-  gint spacing;
   gint x, current_width;
   GList *items, *last_item;
   gint col;
@@ -2375,8 +2543,6 @@ gtk_icon_view_layout_single_row (GtkIconView *icon_view,
                        "focus-line-width", &focus_width,
                        NULL);
 
-  spacing = icon_view->priv->spacing;
-
   x += icon_view->priv->margin + focus_width;
   current_width += 2 * (icon_view->priv->margin + focus_width);
 
@@ -2474,6 +2640,12 @@ gtk_icon_view_layout (GtkIconView *icon_view)
   gint row;
   gint item_width;
 
+  if (icon_view->priv->layout_idle_id != 0)
+    {
+      g_source_remove (icon_view->priv->layout_idle_id);
+      icon_view->priv->layout_idle_id = 0;
+    }
+  
   if (icon_view->priv->model == NULL)
     return;
 
@@ -2491,9 +2663,16 @@ gtk_icon_view_layout (GtkIconView *icon_view)
        }
     }
 
+
   icons = icon_view->priv->items;
   y += icon_view->priv->margin;
   row = 0;
+
+  if (icons)
+    {
+      gtk_icon_view_set_cell_data (icon_view, icons->data);
+      adjust_wrap_width (icon_view, icons->data);
+    }
   
   do
     {
@@ -2505,33 +2684,43 @@ gtk_icon_view_layout (GtkIconView *icon_view)
   while (icons != NULL);
 
   if (maximum_width != icon_view->priv->width)
-    {
-      icon_view->priv->width = maximum_width;
-    }
+    icon_view->priv->width = maximum_width;
+
   y += icon_view->priv->margin;
   
   if (y != icon_view->priv->height)
-    {
-      icon_view->priv->height = y;
-    }
+    icon_view->priv->height = y;
+
+  gtk_icon_view_set_adjustment_upper (icon_view->priv->hadjustment, 
+                                     icon_view->priv->width);
+  gtk_icon_view_set_adjustment_upper (icon_view->priv->vadjustment, 
+                                     icon_view->priv->height);
 
-  gtk_icon_view_set_adjustment_upper (icon_view->priv->hadjustment, icon_view->priv->width);
-  gtk_icon_view_set_adjustment_upper (icon_view->priv->vadjustment, icon_view->priv->height);
+  if (icon_view->priv->width != widget->requisition.width ||
+      icon_view->priv->height != widget->requisition.height)
+    gtk_widget_queue_resize_no_redraw (widget);
 
   if (GTK_WIDGET_REALIZED (icon_view))
-    {
-      gdk_window_resize (icon_view->priv->bin_window,
-                        MAX (icon_view->priv->width, widget->allocation.width),
-                        MAX (icon_view->priv->height, widget->allocation.height));
-    }
+    gdk_window_resize (icon_view->priv->bin_window,
+                      MAX (icon_view->priv->width, widget->allocation.width),
+                      MAX (icon_view->priv->height, widget->allocation.height));
 
-  if (icon_view->priv->layout_idle_id != 0)
+  if (icon_view->priv->scroll_to_path)
     {
-      g_source_remove (icon_view->priv->layout_idle_id);
-      icon_view->priv->layout_idle_id = 0;
-    }
+      GtkTreePath *path;
 
-  gtk_widget_queue_draw (GTK_WIDGET (icon_view));
+      path = gtk_tree_row_reference_get_path (icon_view->priv->scroll_to_path);
+      gtk_tree_row_reference_free (icon_view->priv->scroll_to_path);
+      icon_view->priv->scroll_to_path = NULL;
+      
+      gtk_icon_view_scroll_to_path (icon_view, path,
+                                   icon_view->priv->scroll_to_use_align,
+                                   icon_view->priv->scroll_to_row_align,
+                                   icon_view->priv->scroll_to_col_align);
+      gtk_tree_path_free (path);
+    }
+  
+  gtk_widget_queue_draw (widget);
 }
 
 static void 
@@ -2540,6 +2729,8 @@ gtk_icon_view_get_cell_area (GtkIconView         *icon_view,
                             GtkIconViewCellInfo *info,
                             GdkRectangle        *cell_area)
 {
+  g_return_if_fail (info->position < item->n_cells);
+
   if (icon_view->priv->orientation == GTK_ORIENTATION_HORIZONTAL)
     {
       cell_area->x = item->box[info->position].x - item->before[info->position];
@@ -2564,6 +2755,8 @@ gtk_icon_view_get_cell_box (GtkIconView         *icon_view,
                            GtkIconViewCellInfo *info,
                            GdkRectangle        *box)
 {
+  g_return_if_fail (info->position < item->n_cells);
+
   *box = item->box[info->position];
 }
 
@@ -2577,10 +2770,11 @@ adjust_wrap_width (GtkIconView     *icon_view,
   GtkIconViewCellInfo *pixbuf_info;
   gint pixbuf_width, wrap_width;
       
-  if (icon_view->priv->item_width < 0 &&
-      icon_view->priv->text_cell != -1 &&
+  if (icon_view->priv->text_cell != -1 &&
       icon_view->priv->pixbuf_cell != -1)
     {
+      gint item_width;
+
       text_info = g_list_nth_data (icon_view->priv->cell_list,
                                   icon_view->priv->text_cell);
       pixbuf_info = g_list_nth_data (icon_view->priv->cell_list,
@@ -2592,14 +2786,26 @@ adjust_wrap_width (GtkIconView     *icon_view,
                                  &pixbuf_width, 
                                  NULL);
          
+
+      if (icon_view->priv->item_width > 0)
+       item_width = icon_view->priv->item_width;
+      else
+       item_width = item->width;
+
       if (item->width == -1)
-       wrap_width = pixbuf_width;
+        {
+         if (item_width > 0)
+           wrap_width = item_width - pixbuf_width - icon_view->priv->spacing;
+         else
+           wrap_width = MAX (2 * pixbuf_width, 50);
+       }
       else if (icon_view->priv->orientation == GTK_ORIENTATION_VERTICAL)
-       wrap_width = item->width;
+       wrap_width = item_width;
       else
-       wrap_width = item->width - pixbuf_width - icon_view->priv->spacing;
+       wrap_width = item_width - pixbuf_width - icon_view->priv->spacing;
 
       g_object_set (text_info->cell, "wrap-width", wrap_width, NULL);
+      g_object_set (text_info->cell, "width", wrap_width, NULL);
     }
 }
 
@@ -2643,7 +2849,7 @@ gtk_icon_view_calculate_item_size (GtkIconView     *icon_view,
                                  NULL, NULL, NULL,
                                  &item->box[info->position].width, 
                                  &item->box[info->position].height);
-      
+
       if (icon_view->priv->orientation == GTK_ORIENTATION_HORIZONTAL)
        {
          item->width += item->box[info->position].width 
@@ -2696,45 +2902,45 @@ gtk_icon_view_calculate_item_size2 (GtkIconView     *icon_view,
          continue;
 
        if (!info->cell->visible)
-        continue;
-
-      if (icon_view->priv->orientation == GTK_ORIENTATION_HORIZONTAL)
-       {
-         cell_area.width = item->box[info->position].width;
-         cell_area.height = item->height;
-       }
-      else
-       {
-         cell_area.width = item->width;
-         cell_area.height = max_height[i];
-       }
-
-      gtk_cell_renderer_get_size (info->cell, GTK_WIDGET (icon_view), 
-                                 &cell_area,
-                                 &item->box[info->position].x, &item->box[info->position].y,
-                                 &item->box[info->position].width, &item->box[info->position].height);
-
-      item->box[info->position].x += cell_area.x;
-      item->box[info->position].y += cell_area.y;
-      if (icon_view->priv->orientation == GTK_ORIENTATION_HORIZONTAL)
-       {
-         item->before[info->position] = item->box[info->position].x - cell_area.x;
-         item->after[info->position] = cell_area.width - item->box[info->position].width - item->before[info->position];
-         cell_area.x += cell_area.width + spacing;
-       }
-      else
-       {
-         if (item->box[info->position].width > item->width)
-           {
-             item->width = item->box[info->position].width;
-             cell_area.width = item->width;
-           }
-         item->before[info->position] = item->box[info->position].y - cell_area.y;
-         item->after[info->position] = cell_area.height - item->box[info->position].height - item->before[info->position];
-         cell_area.y += cell_area.height + spacing;
-       }
-    }
+         continue;
 
+       if (icon_view->priv->orientation == GTK_ORIENTATION_HORIZONTAL)
+         {
+           cell_area.width = item->box[info->position].width;
+           cell_area.height = item->height;
+         }
+       else
+         {
+           cell_area.width = item->width;
+           cell_area.height = max_height[i];
+         }
+       
+       gtk_cell_renderer_get_size (info->cell, GTK_WIDGET (icon_view), 
+                                   &cell_area,
+                                   &item->box[info->position].x, &item->box[info->position].y,
+                                   &item->box[info->position].width, &item->box[info->position].height);
+       
+       item->box[info->position].x += cell_area.x;
+       item->box[info->position].y += cell_area.y;
+       if (icon_view->priv->orientation == GTK_ORIENTATION_HORIZONTAL)
+         {
+           item->before[info->position] = item->box[info->position].x - cell_area.x;
+           item->after[info->position] = cell_area.width - item->box[info->position].width - item->before[info->position];
+           cell_area.x += cell_area.width + spacing;
+         }
+       else
+         {
+           if (item->box[info->position].width > item->width)
+             {
+               item->width = item->box[info->position].width;
+               cell_area.width = item->width;
+             }
+           item->before[info->position] = item->box[info->position].y - cell_area.y;
+           item->after[info->position] = cell_area.height - item->box[info->position].height - item->before[info->position];
+           cell_area.y += cell_area.height + spacing;
+         }
+      }
+  
   if (rtl && icon_view->priv->orientation == GTK_ORIENTATION_HORIZONTAL)
     {
       for (i = 0; i < icon_view->priv->n_cells; i++)
@@ -2769,13 +2975,12 @@ gtk_icon_view_paint_item (GtkIconView     *icon_view,
                          gint             y,
                          gboolean         draw_focus)
 {
-  gint focus_width, focus_pad;
-  gint spacing, padding;
+  gint focus_width;
+  gint padding;
   GdkRectangle cell_area, box;
   GList *l;
   gint i;
   GtkStateType state;
-  gboolean rtl;
   GtkCellRendererState flags;
       
   if (icon_view->priv->model == NULL)
@@ -2783,14 +2988,10 @@ gtk_icon_view_paint_item (GtkIconView     *icon_view,
   
   gtk_icon_view_set_cell_data (icon_view, item);
 
-  rtl = gtk_widget_get_direction (GTK_WIDGET (icon_view)) == GTK_TEXT_DIR_RTL;
-  
   gtk_widget_style_get (GTK_WIDGET (icon_view),
                        "focus-line-width", &focus_width,
-                       "focus-padding", &focus_pad,
                        NULL);
   
-  spacing = icon_view->priv->spacing;
   padding = focus_width; 
   
   if (item->selected)
@@ -3008,16 +3209,12 @@ layout_callback (gpointer user_data)
 {
   GtkIconView *icon_view;
 
-  GDK_THREADS_ENTER ();
-
   icon_view = GTK_ICON_VIEW (user_data);
   
   icon_view->priv->layout_idle_id = 0;
 
   gtk_icon_view_layout (icon_view);
   
-  GDK_THREADS_LEAVE();
-
   return FALSE;
 }
 
@@ -3027,7 +3224,7 @@ gtk_icon_view_queue_layout (GtkIconView *icon_view)
   if (icon_view->priv->layout_idle_id != 0)
     return;
 
-  icon_view->priv->layout_idle_id = g_idle_add (layout_callback, icon_view);
+  icon_view->priv->layout_idle_id = gdk_threads_add_idle (layout_callback, icon_view);
 }
 
 static void
@@ -3037,14 +3234,23 @@ gtk_icon_view_set_cursor_item (GtkIconView     *icon_view,
 {
   AtkObject *obj;
   AtkObject *item_obj;
+  AtkObject *cursor_item_obj;
 
   if (icon_view->priv->cursor_item == item &&
       (cursor_cell < 0 || cursor_cell == icon_view->priv->cursor_cell))
     return;
 
+  obj = gtk_widget_get_accessible (GTK_WIDGET (icon_view));
   if (icon_view->priv->cursor_item != NULL)
-    gtk_icon_view_queue_draw_item (icon_view, icon_view->priv->cursor_item);
-  
+    {
+      gtk_icon_view_queue_draw_item (icon_view, icon_view->priv->cursor_item);
+      if (obj != NULL)
+        {
+          cursor_item_obj = atk_object_ref_accessible_child (obj, icon_view->priv->cursor_item->index);
+          if (cursor_item_obj != NULL)
+            atk_object_notify_state_change (cursor_item_obj, ATK_STATE_FOCUSED, FALSE);
+        }
+    }
   icon_view->priv->cursor_item = item;
   if (cursor_cell >= 0)
     icon_view->priv->cursor_cell = cursor_cell;
@@ -3052,12 +3258,12 @@ gtk_icon_view_set_cursor_item (GtkIconView     *icon_view,
   gtk_icon_view_queue_draw_item (icon_view, item);
   
   /* Notify that accessible focus object has changed */
-  obj = gtk_widget_get_accessible (GTK_WIDGET (icon_view));
   item_obj = atk_object_ref_accessible_child (obj, item->index);
 
   if (item_obj != NULL)
     {
       atk_focus_tracker_notify (item_obj);
+      atk_object_notify_state_change (item_obj, ATK_STATE_FOCUSED, TRUE);
       g_object_unref (item_obj); 
     }
 }
@@ -3103,8 +3309,8 @@ gtk_icon_view_get_item_at_coords (GtkIconView          *icon_view,
     {
       GtkIconViewItem *item = items->data;
 
-      if (x >= item->x - icon_view->priv->row_spacing/2 && x <= item->x + item->width + icon_view->priv->row_spacing/2 &&
-         y >= item->y - icon_view->priv->column_spacing/2 && y <= item->y + item->height + icon_view->priv->column_spacing/2)
+      if (x >= item->x - icon_view->priv->column_spacing/2 && x <= item->x + item->width + icon_view->priv->column_spacing/2 &&
+         y >= item->y - icon_view->priv->row_spacing/2 && y <= item->y + item->height + icon_view->priv->row_spacing/2)
        {
          if (only_in_cell || cell_at_pos)
            {
@@ -3164,9 +3370,10 @@ gtk_icon_view_select_item (GtkIconView      *icon_view,
 
   item->selected = TRUE;
 
-  gtk_icon_view_queue_draw_item (icon_view, item);
-
+  gtk_icon_view_item_selected_changed (icon_view, item);
   g_signal_emit (icon_view, icon_view_signals[SELECTION_CHANGED], 0);
+
+  gtk_icon_view_queue_draw_item (icon_view, item);
 }
 
 
@@ -3186,6 +3393,7 @@ gtk_icon_view_unselect_item (GtkIconView      *icon_view,
   
   item->selected = FALSE;
 
+  gtk_icon_view_item_selected_changed (icon_view, item);
   g_signal_emit (icon_view, icon_view_signals[SELECTION_CHANGED], 0);
 
   gtk_icon_view_queue_draw_item (icon_view, item);
@@ -3238,7 +3446,7 @@ gtk_icon_view_row_inserted (GtkTreeModel *model,
                            GtkTreeIter  *iter,
                            gpointer      data)
 {
-  gint length, index;
+  gint index;
   GtkIconViewItem *item;
   gboolean iters_persist;
   GtkIconView *icon_view;
@@ -3248,7 +3456,6 @@ gtk_icon_view_row_inserted (GtkTreeModel *model,
 
   iters_persist = gtk_tree_model_get_flags (icon_view->priv->model) & GTK_TREE_MODEL_ITERS_PERSIST;
   
-  length = gtk_tree_model_iter_n_children (model, NULL);
   index = gtk_tree_path_get_indices(path)[0];
 
   item = gtk_icon_view_item_new ();
@@ -3274,6 +3481,8 @@ gtk_icon_view_row_inserted (GtkTreeModel *model,
     }
     
   verify_items (icon_view);
+
+  gtk_icon_view_queue_layout (icon_view);
 }
 
 static void
@@ -3316,10 +3525,10 @@ gtk_icon_view_row_deleted (GtkTreeModel *model,
   
   icon_view->priv->items = g_list_delete_link (icon_view->priv->items, list);
 
-  gtk_icon_view_queue_layout (icon_view);
-
   verify_items (icon_view);  
   
+  gtk_icon_view_queue_layout (icon_view);
+
   if (emit)
     g_signal_emit (icon_view, icon_view_signals[SELECTION_CHANGED], 0);
 }
@@ -3411,7 +3620,7 @@ gtk_icon_view_add_move_binding (GtkBindingSet  *binding_set,
 {
   
   gtk_binding_entry_add_signal (binding_set, keyval, modmask,
-                                "move_cursor", 2,
+                                I_("move_cursor"), 2,
                                 G_TYPE_ENUM, step,
                                 G_TYPE_INT, count);
 
@@ -3682,10 +3891,11 @@ gtk_icon_view_select_all_between (GtkIconView     *icon_view,
          col1 <= item->col && item->col <= col2)
        {
          if (!item->selected)
-           dirty = TRUE;
-
-         item->selected = TRUE;
-         
+           {
+             dirty = TRUE;
+             item->selected = TRUE;
+             gtk_icon_view_item_selected_changed (icon_view, item);
+           }
          gtk_icon_view_queue_draw_item (icon_view, item);
        }
     }
@@ -3736,7 +3946,10 @@ gtk_icon_view_move_cursor_up_down (GtkIconView *icon_view,
     }
 
   if (!item)
-    return;
+    {
+      gtk_widget_error_bell (GTK_WIDGET (icon_view));
+      return;
+    }
 
   if (icon_view->priv->ctrl_pressed ||
       !icon_view->priv->shift_pressed ||
@@ -3787,6 +4000,9 @@ gtk_icon_view_move_cursor_page_up_down (GtkIconView *icon_view,
                                   icon_view->priv->cursor_item,
                                   count);
 
+  if (item == icon_view->priv->cursor_item)
+    gtk_widget_error_bell (GTK_WIDGET (icon_view));
+
   if (!item)
     return;
 
@@ -3855,7 +4071,10 @@ gtk_icon_view_move_cursor_left_right (GtkIconView *icon_view,
     }
 
   if (!item)
-    return;
+    {
+      gtk_widget_error_bell (GTK_WIDGET (icon_view));
+      return;
+    }
 
   if (icon_view->priv->ctrl_pressed ||
       !icon_view->priv->shift_pressed ||
@@ -3898,6 +4117,9 @@ gtk_icon_view_move_cursor_start_end (GtkIconView *icon_view,
   
   item = list ? list->data : NULL;
 
+  if (item == icon_view->priv->cursor_item)
+    gtk_widget_error_bell (GTK_WIDGET (icon_view));
+
   if (!item)
     return;
 
@@ -3930,21 +4152,22 @@ gtk_icon_view_move_cursor_start_end (GtkIconView *icon_view,
  * @path: The path of the item to move to.
  * @use_align: whether to use alignment arguments, or %FALSE.
  * @row_align: The vertical alignment of the item specified by @path.
- * @col_align: The horizontal alignment of the item specified by @column.
+ * @col_align: The horizontal alignment of the item specified by @path.
  *
  * Moves the alignments of @icon_view to the position specified by @path.  
- * @row_align determines where the row is placed, and @col_align determines where 
- * @column is placed.  Both are expected to be between 0.0 and 1.0. 
- * 0.0 means left/top alignment, 1.0 means right/bottom alignment, 0.5 means center.
+ * @row_align determines where the row is placed, and @col_align determines 
+ * where @column is placed.  Both are expected to be between 0.0 and 1.0. 
+ * 0.0 means left/top alignment, 1.0 means right/bottom alignment, 0.5 means 
+ * center.
  *
  * If @use_align is %FALSE, then the alignment arguments are ignored, and the
  * tree does the minimum amount of work to scroll the item onto the screen.
  * This means that the item will be scrolled to the edge closest to its current
  * position.  If the item is currently visible on the screen, nothing is done.
  *
- * This function only works if the model is set, and @path is a valid row on the
- * model.  If the model changes before the @icon_view is realized, the centered
- * path will be modified to reflect this change.
+ * This function only works if the model is set, and @path is a valid row on 
+ * the model. If the model changes before the @icon_view is realized, the 
+ * centered path will be modified to reflect this change.
  *
  * Since: 2.8
  **/
@@ -3962,7 +4185,11 @@ gtk_icon_view_scroll_to_path (GtkIconView *icon_view,
   g_return_if_fail (row_align >= 0.0 && row_align <= 1.0);
   g_return_if_fail (col_align >= 0.0 && col_align <= 1.0);
 
-  if (! GTK_WIDGET_REALIZED (icon_view))
+  if (gtk_tree_path_get_depth (path) > 0)
+    item = g_list_nth_data (icon_view->priv->items,
+                           gtk_tree_path_get_indices(path)[0]);
+  
+  if (!GTK_WIDGET_REALIZED (icon_view) || !item || item->width < 0)
     {
       if (icon_view->priv->scroll_to_path)
        gtk_tree_row_reference_free (icon_view->priv->scroll_to_path);
@@ -3979,16 +4206,9 @@ gtk_icon_view_scroll_to_path (GtkIconView *icon_view,
       return;
     }
 
-  if (gtk_tree_path_get_depth (path) > 0)
-    item = g_list_nth_data (icon_view->priv->items,
-                           gtk_tree_path_get_indices(path)[0]);
-  
-  if (!item)
-    return;
-
   if (use_align)
     {
-      gint x, y, width, height;
+      gint x, y;
       gint focus_width;
       gfloat offset, value;
 
@@ -4034,7 +4254,7 @@ gtk_icon_view_scroll_to_item (GtkIconView     *icon_view,
   gdk_drawable_get_size (GDK_DRAWABLE (icon_view->priv->bin_window), 
                         &width, &height);
   gdk_window_get_position (icon_view->priv->bin_window, &x, &y);
-
+  
   if (y + item->y - focus_width < 0)
     gtk_adjustment_set_value (icon_view->priv->vadjustment, 
                              icon_view->priv->vadjustment->value + y + item->y - focus_width);
@@ -4088,7 +4308,8 @@ gtk_icon_view_set_cell_data (GtkIconView     *icon_view,
       GtkTreePath *path;
 
       path = gtk_tree_path_new_from_indices (item->index, -1);
-      gtk_tree_model_get_iter (icon_view->priv->model, &iter, path);
+      if (!gtk_tree_model_get_iter (icon_view->priv->model, &iter, path))
+        return;
       gtk_tree_path_free (path);
     }
   else
@@ -4123,8 +4344,6 @@ gtk_icon_view_set_cell_data (GtkIconView     *icon_view,
       
       g_object_thaw_notify (G_OBJECT (info->cell));
     }  
-  
-  adjust_wrap_width (icon_view, item);
 }
 
 static void 
@@ -4167,8 +4386,7 @@ gtk_icon_view_cell_layout_pack_start (GtkCellLayout   *layout,
   g_return_if_fail (GTK_IS_CELL_RENDERER (renderer));
   g_return_if_fail (!gtk_icon_view_get_cell_info (icon_view, renderer));
 
-  g_object_ref (renderer);
-  gtk_object_sink (GTK_OBJECT (renderer));
+  g_object_ref_sink (renderer);
 
   info = g_new0 (GtkIconViewCellInfo, 1);
   info->cell = renderer;
@@ -4191,8 +4409,7 @@ gtk_icon_view_cell_layout_pack_end (GtkCellLayout   *layout,
   g_return_if_fail (GTK_IS_CELL_RENDERER (renderer));
   g_return_if_fail (!gtk_icon_view_get_cell_info (icon_view, renderer));
 
-  g_object_ref (renderer);
-  gtk_object_sink (GTK_OBJECT (renderer));
+  g_object_ref_sink (renderer);
 
   info = g_new0 (GtkIconViewCellInfo, 1);
   info->cell = renderer;
@@ -4298,8 +4515,8 @@ gtk_icon_view_cell_layout_reorder (GtkCellLayout   *layout,
 
   g_return_if_fail (link != NULL);
 
-  icon_view->priv->cell_list = g_list_remove_link (icon_view->priv->cell_list,
-                                                  link);
+  icon_view->priv->cell_list = g_list_delete_link (icon_view->priv->cell_list,
+                                                   link);
   icon_view->priv->cell_list = g_list_insert (icon_view->priv->cell_list,
                                              info, position);
 
@@ -4313,6 +4530,22 @@ gtk_icon_view_cell_layout_reorder (GtkCellLayout   *layout,
   gtk_widget_queue_draw (GTK_WIDGET (icon_view));
 }
 
+static GList *
+gtk_icon_view_cell_layout_get_cells (GtkCellLayout *layout)
+{
+  GtkIconView *icon_view = (GtkIconView *)layout;
+  GList *retval = NULL, *l;
+
+  for (l = icon_view->priv->cell_list; l; l = l->next)
+    {
+      GtkIconViewCellInfo *info = (GtkIconViewCellInfo *)l->data;
+
+      retval = g_list_prepend (retval, info->cell);
+    }
+
+  return g_list_reverse (retval);
+}
+
 /* Public API */
 
 
@@ -4347,6 +4580,39 @@ gtk_icon_view_new_with_model (GtkTreeModel *model)
   return g_object_new (GTK_TYPE_ICON_VIEW, "model", model, NULL);
 }
 
+/**
+ * gtk_icon_view_convert_widget_to_bin_window_coords:
+ * @wx: X coordinate relative to the widget
+ * @wy: Y coordinate relative to the widget
+ * @bx: return location for bin_window X coordinate
+ * @by: return location for bin_window Y coordinate
+ * 
+ * Converts widget coordinates to coordinates for the bin_window,
+ * as expected by e.g. gtk_icon_view_get_path_at_pos(). 
+ *
+ * Since: 2.12
+ */
+void
+gtk_icon_view_convert_widget_to_bin_window_coords (GtkIconView *icon_view,
+                                                   gint         wx,
+                                                   gint         wy, 
+                                                   gint        *bx,
+                                                   gint        *by)
+{
+  gint x, y;
+
+  g_return_if_fail (GTK_IS_ICON_VIEW (icon_view));
+
+  if (icon_view->priv->bin_window) 
+    gdk_window_get_position (icon_view->priv->bin_window, &x, &y);
+  else
+    x = y = 0;
+  if (bx)
+    *bx = wx - x;
+  if (by)
+    *by = wy - y;
+}
 
 /**
  * gtk_icon_view_get_path_at_pos:
@@ -4354,9 +4620,11 @@ gtk_icon_view_new_with_model (GtkTreeModel *model)
  * @x: The x position to be identified
  * @y: The y position to be identified
  * 
- * Finds the path at the point (@x, @y), relative to widget coordinates.
+ * Finds the path at the point (@x, @y), relative to bin_window coordinates.
  * See gtk_icon_view_get_item_at_pos(), if you are also interested in
- * the cell at the specified position.
+ * the cell at the specified position. 
+ * See gtk_icon_view_convert_widget_to_bin_window_coords() for converting
+ * widget coordinates to bin_window coordinates.
  * 
  * Return value: The #GtkTreePath corresponding to the icon or %NULL
  * if no icon exists at that position.
@@ -4392,10 +4660,12 @@ gtk_icon_view_get_path_at_pos (GtkIconView *icon_view,
  * @cell: Return location for the renderer responsible for the cell
  *   at (@x, @y), or %NULL
  * 
- * Finds the path at the point (@x, @y), relative to widget coordinates.
+ * Finds the path at the point (@x, @y), relative to bin_window coordinates.
  * In contrast to gtk_icon_view_get_path_at_pos(), this function also 
  * obtains the cell at the specified position. The returned path should
  * be freed with gtk_tree_path_free().
+ * See gtk_icon_view_convert_widget_to_bin_window_coords() for converting
+ * widget coordinates to bin_window coordinates.
  * 
  * Return value: %TRUE if an item exists at the specified position
  *
@@ -4434,6 +4704,261 @@ gtk_icon_view_get_item_at_pos (GtkIconView      *icon_view,
   return (item != NULL);
 }
 
+/**
+ * gtk_icon_view_set_tooltip_item:
+ * @icon_view: a #GtkIconView
+ * @tooltip: a #GtkTooltip
+ * @path: a #GtkTreePath
+ * 
+ * Sets the tip area of @tooltip to be the area covered by the item at @path.
+ * See also gtk_tooltip_set_tip_area().
+ * 
+ * Since: 2.12
+ */
+void 
+gtk_icon_view_set_tooltip_item (GtkIconView     *icon_view,
+                                GtkTooltip      *tooltip,
+                                GtkTreePath     *path)
+{
+  g_return_if_fail (GTK_IS_ICON_VIEW (icon_view));
+  g_return_if_fail (GTK_IS_TOOLTIP (tooltip));
+
+  gtk_icon_view_set_tooltip_cell (icon_view, tooltip, path, NULL);
+}
+
+/**
+ * gtk_icon_view_set_tooltip_cell:
+ * @icon_view: a #GtkIconView
+ * @tooltip: a #GtkTooltip
+ * @path: a #GtkTreePath
+ * @cell: a #GtkCellRenderer or %NULL
+ *
+ * Sets the tip area of @tooltip to the area which @cell occupies in
+ * the item pointed to by @path. See also gtk_tooltip_set_tip_area().
+ *
+ * Since: 2.12
+ */
+void
+gtk_icon_view_set_tooltip_cell (GtkIconView     *icon_view,
+                                GtkTooltip      *tooltip,
+                                GtkTreePath     *path,
+                                GtkCellRenderer *cell)
+{
+  GdkRectangle rect;
+  GtkIconViewItem *item = NULL;
+  GtkIconViewCellInfo *info = NULL;
+  gint x, y;
+  g_return_if_fail (GTK_IS_ICON_VIEW (icon_view));
+  g_return_if_fail (GTK_IS_TOOLTIP (tooltip));
+  g_return_if_fail (cell == NULL || GTK_IS_CELL_RENDERER (cell));
+
+  if (gtk_tree_path_get_depth (path) > 0)
+    item = g_list_nth_data (icon_view->priv->items,
+                            gtk_tree_path_get_indices(path)[0]);
+  if (!item)
+    return;
+
+  if (cell)
+    {
+      info = gtk_icon_view_get_cell_info (icon_view, cell);
+      gtk_icon_view_get_cell_area (icon_view, item, info, &rect);
+    }
+  else
+    {
+      rect.x = item->x;
+      rect.y = item->y;
+      rect.width = item->width;
+      rect.height = item->height;
+    }
+  
+  if (icon_view->priv->bin_window)
+    {
+      gdk_window_get_position (icon_view->priv->bin_window, &x, &y);
+      rect.x += x;
+      rect.y += y; 
+    }
+
+  gtk_tooltip_set_tip_area (tooltip, &rect); 
+}
+
+
+/**
+ * gtk_icon_view_get_tooltip_context:
+ * @icon_view: an #GtkIconView
+ * @x: the x coordinate (relative to widget coordinates)
+ * @y: the y coordinate (relative to widget coordinates)
+ * @keyboard_tip: whether this is a keyboard tooltip or not
+ * @model: a pointer to receive a #GtkTreeModel or %NULL
+ * @path: a pointer to receive a #GtkTreePath or %NULL
+ * @iter: a pointer to receive a #GtkTreeIter or %NULL
+ *
+ * This function is supposed to be used in a #GtkWidget::query-tooltip
+ * signal handler for #GtkIconView.  The @x, @y and @keyboard_tip values
+ * which are received in the signal handler, should be passed to this
+ * function without modification.
+ *
+ * The return value indicates whether there is an icon view item at the given
+ * coordinates (%TRUE) or not (%FALSE) for mouse tooltips. For keyboard
+ * tooltips the item returned will be the cursor item. When %TRUE, then any of
+ * @model, @path and @iter which have been provided will be set to point to
+ * that row and the corresponding model. @x and @y will always be converted
+ * to be relative to @icon_view's bin_window if @keyboard_tooltip is %FALSE.
+ *
+ * Return value: whether or not the given tooltip context points to a item
+ *
+ * Since: 2.12
+ */
+gboolean
+gtk_icon_view_get_tooltip_context (GtkIconView   *icon_view,
+                                   gint          *x,
+                                   gint          *y,
+                                   gboolean       keyboard_tip,
+                                   GtkTreeModel **model,
+                                   GtkTreePath  **path,
+                                   GtkTreeIter   *iter)
+{
+  GtkTreePath *tmppath = NULL;
+
+  g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), FALSE);
+  g_return_val_if_fail (x != NULL, FALSE);
+  g_return_val_if_fail (y != NULL, FALSE);
+
+  if (keyboard_tip)
+    {
+      gtk_icon_view_get_cursor (icon_view, &tmppath, NULL);
+
+      if (!tmppath)
+        return FALSE;
+    }
+  else
+    {
+      gtk_icon_view_convert_widget_to_bin_window_coords (icon_view, *x, *y,
+                                                         x, y);
+
+      if (!gtk_icon_view_get_item_at_pos (icon_view, *x, *y, &tmppath, NULL))
+        return FALSE;
+    }
+
+  if (model)
+    *model = gtk_icon_view_get_model (icon_view);
+
+  if (iter)
+    gtk_tree_model_get_iter (gtk_icon_view_get_model (icon_view),
+                             iter, tmppath);
+
+  if (path)
+    *path = tmppath;
+  else
+    gtk_tree_path_free (tmppath);
+
+  return TRUE;
+}
+
+static gboolean
+gtk_icon_view_set_tooltip_query_cb (GtkWidget  *widget,
+                                    gint        x,
+                                    gint        y,
+                                    gboolean    keyboard_tip,
+                                    GtkTooltip *tooltip,
+                                    gpointer    data)
+{
+  gchar *str;
+  GtkTreeIter iter;
+  GtkTreePath *path;
+  GtkTreeModel *model;
+  GtkIconView *icon_view = GTK_ICON_VIEW (widget);
+
+  if (!gtk_icon_view_get_tooltip_context (GTK_ICON_VIEW (widget),
+                                          &x, &y,
+                                          keyboard_tip,
+                                          &model, &path, &iter))
+    return FALSE;
+
+  gtk_tree_model_get (model, &iter, icon_view->priv->tooltip_column, &str, -1);
+
+  if (!str)
+    {
+      gtk_tree_path_free (path);
+      return FALSE;
+    }
+
+  gtk_tooltip_set_markup (tooltip, str);
+  gtk_icon_view_set_tooltip_item (icon_view, tooltip, path);
+
+  gtk_tree_path_free (path);
+  g_free (str);
+
+  return TRUE;
+}
+
+
+/**
+ * gtk_icon_view_set_tooltip_column:
+ * @icon_view: a #GtkIconView
+ * 
+ * @column: an integer, which is a valid column number for @icon_view's model
+ *
+ * If you only plan to have simple (text-only) tooltips on full items, you
+ * can use this function to have #GtkIconView handle these automatically
+ * for you. @column should be set to the column in @icon_view's model
+ * containing the tooltip texts, or -1 to disable this feature.
+ *
+ * When enabled, #GtkWidget::has-tooltip will be set to %TRUE and
+ * @icon_view will connect a #GtkWidget::query-tooltip signal handler.
+ *
+ * Since: 2.12
+ */
+void
+gtk_icon_view_set_tooltip_column (GtkIconView *icon_view,
+                                  gint         column)
+{
+  g_return_if_fail (GTK_IS_ICON_VIEW (icon_view));
+
+  if (column == icon_view->priv->tooltip_column)
+    return;
+
+  if (column == -1)
+    {
+      g_signal_handlers_disconnect_by_func (icon_view,
+                                            gtk_icon_view_set_tooltip_query_cb,
+                                            NULL);
+      gtk_widget_set_has_tooltip (GTK_WIDGET (icon_view), FALSE);
+    }
+  else
+    {
+      if (icon_view->priv->tooltip_column == -1)
+        {
+          g_signal_connect (icon_view, "query-tooltip",
+                            G_CALLBACK (gtk_icon_view_set_tooltip_query_cb), NULL);
+          gtk_widget_set_has_tooltip (GTK_WIDGET (icon_view), TRUE);
+        }
+    }
+
+  icon_view->priv->tooltip_column = column;
+  g_object_notify (G_OBJECT (icon_view), "tooltip-column");
+}
+
+/** 
+ * gtk_icon_view_get_tooltip_column:
+ * @icon_view: a #GtkIconView
+ *
+ * Returns the column of @icon_view's model which is being used for
+ * displaying tooltips on @icon_view's rows.
+ *
+ * Return value: the index of the tooltip column that is currently being
+ * used, or -1 if this is disabled.
+ *
+ * Since: 2.12
+ */
+gint
+gtk_icon_view_get_tooltip_column (GtkIconView *icon_view)
+{
+  g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), 0);
+
+  return icon_view->priv->tooltip_column;
+}
 
 /**
  * gtk_icon_view_get_visible_range:
@@ -4457,7 +4982,6 @@ gtk_icon_view_get_visible_range (GtkIconView  *icon_view,
 {
   gint start_index = -1;
   gint end_index = -1;
-  GtkIconViewItem *item;
   GList *icons;
 
   g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), FALSE);
@@ -4720,10 +5244,13 @@ update_text_cell (GtkIconView *icon_view)
     {
       if (icon_view->priv->text_cell != -1)
        {
+         if (icon_view->priv->pixbuf_cell > icon_view->priv->text_cell)
+           icon_view->priv->pixbuf_cell--;
+
          info = g_list_nth_data (icon_view->priv->cell_list, 
                                  icon_view->priv->text_cell);
          
-         g_list_remove (icon_view->priv->cell_list, info);
+         icon_view->priv->cell_list = g_list_remove (icon_view->priv->cell_list, info);
          
          free_cell_info (info);
          
@@ -4764,15 +5291,15 @@ update_text_cell (GtkIconView *icon_view)
 
       if (icon_view->priv->orientation == GTK_ORIENTATION_VERTICAL)
        g_object_set (info->cell,
-                     "wrap_mode", PANGO_WRAP_CHAR,
-                     "wrap_width", icon_view->priv->item_width,
-                     "xalign", 0.5,
+                      "alignment", PANGO_ALIGN_CENTER,
+                     "wrap-mode", PANGO_WRAP_WORD_CHAR,
+                     "xalign", 0.0,
                      "yalign", 0.0,
                      NULL);
       else
        g_object_set (info->cell,
-                     "wrap_mode", PANGO_WRAP_CHAR,
-                     "wrap_width", icon_view->priv->item_width,
+                      "alignment", PANGO_ALIGN_LEFT,
+                     "wrap-mode", PANGO_WRAP_WORD_CHAR,
                      "xalign", 0.0,
                      "yalign", 0.0,
                      NULL);
@@ -4790,10 +5317,13 @@ update_pixbuf_cell (GtkIconView *icon_view)
     {
       if (icon_view->priv->pixbuf_cell != -1)
        {
+         if (icon_view->priv->text_cell > icon_view->priv->pixbuf_cell)
+           icon_view->priv->text_cell--;
+
          info = g_list_nth_data (icon_view->priv->cell_list, 
                                  icon_view->priv->pixbuf_cell);
          
-         g_list_remove (icon_view->priv->cell_list, info);
+         icon_view->priv->cell_list = g_list_remove (icon_view->priv->cell_list, info);
          
          free_cell_info (info);
          
@@ -4829,13 +5359,13 @@ update_pixbuf_cell (GtkIconView *icon_view)
 
        if (icon_view->priv->orientation == GTK_ORIENTATION_VERTICAL)
          g_object_set (info->cell,
-                       "follow_state", TRUE, 
+                       "follow-state", TRUE, 
                        "xalign", 0.5,
                        "yalign", 1.0,
                        NULL);
        else
          g_object_set (info->cell,
-                       "follow_state", TRUE, 
+                       "follow-state", TRUE, 
                        "xalign", 0.0,
                        "yalign", 0.0,
                        NULL);
@@ -4845,7 +5375,7 @@ update_pixbuf_cell (GtkIconView *icon_view)
 /**
  * gtk_icon_view_set_text_column:
  * @icon_view: A #GtkIconView.
- * @column: A column in the currently used model.
+ * @column: A column in the currently used model, or -1 to display no text
  * 
  * Sets the column with text for @icon_view to be @column. The text
  * column must be of type #G_TYPE_STRING.
@@ -4906,7 +5436,7 @@ gtk_icon_view_get_text_column (GtkIconView  *icon_view)
 /**
  * gtk_icon_view_set_markup_column:
  * @icon_view: A #GtkIconView.
- * @column: A column in the currently used model.
+ * @column: A column in the currently used model, or -1 to display no text
  * 
  * Sets the column with markup information for @icon_view to be
  * @column. The markup column must be of type #G_TYPE_STRING.
@@ -4969,7 +5499,7 @@ gtk_icon_view_get_markup_column (GtkIconView  *icon_view)
 /**
  * gtk_icon_view_set_pixbuf_column:
  * @icon_view: A #GtkIconView.
- * @column: A column in the currently used model.
+ * @column: A column in the currently used model, or -1 to disable
  * 
  * Sets the column with pixbufs for @icon_view to be @column. The pixbuf
  * column must be of type #GDK_TYPE_PIXBUF
@@ -5074,8 +5604,8 @@ gtk_icon_view_unselect_path (GtkIconView *icon_view,
   g_return_if_fail (icon_view->priv->model != NULL);
   g_return_if_fail (path != NULL);
 
-  item = g_list_nth (icon_view->priv->items,
-                    gtk_tree_path_get_indices(path)[0])->data;
+  item = g_list_nth_data (icon_view->priv->items,
+                         gtk_tree_path_get_indices(path)[0]);
 
   if (!item)
     return;
@@ -5093,10 +5623,10 @@ gtk_icon_view_unselect_path (GtkIconView *icon_view,
  * To do this, you can use gtk_tree_row_reference_new().
  *
  * To free the return value, use:
- * <informalexample><programlisting>
+ * |[
  * g_list_foreach (list, gtk_tree_path_free, NULL);
  * g_list_free (list);
- * </programlisting></informalexample>
+ * ]|
  *
  * Return value: A #GList containing a #GtkTreePath for each selected row.
  *
@@ -5191,7 +5721,7 @@ gtk_icon_view_unselect_all (GtkIconView *icon_view)
  * @path: A #GtkTreePath to check selection on.
  * 
  * Returns %TRUE if the icon pointed to by @path is currently
- * selected. If @icon does not point to a valid location, %FALSE is returned.
+ * selected. If @path does not point to a valid location, %FALSE is returned.
  * 
  * Return value: %TRUE if @path is selected.
  *
@@ -5207,8 +5737,8 @@ gtk_icon_view_path_is_selected (GtkIconView *icon_view,
   g_return_val_if_fail (icon_view->priv->model != NULL, FALSE);
   g_return_val_if_fail (path != NULL, FALSE);
   
-  item = g_list_nth (icon_view->priv->items,
-                    gtk_tree_path_get_indices(path)[0])->data;
+  item = g_list_nth_data (icon_view->priv->items,
+                         gtk_tree_path_get_indices(path)[0]);
 
   if (!item)
     return FALSE;
@@ -5579,7 +6109,7 @@ set_status_pending (GdkDragContext *context,
                     GdkDragAction   suggested_action)
 {
   g_object_set_data (G_OBJECT (context),
-                     "gtk-icon-view-status-pending",
+                     I_("gtk-icon-view-status-pending"),
                      GINT_TO_POINTER (suggested_action));
 }
 
@@ -5627,12 +6157,12 @@ set_source_row (GdkDragContext *context,
 {
   if (source_row)
     g_object_set_data_full (G_OBJECT (context),
-                           "gtk-icon-view-source-row",
+                           I_("gtk-icon-view-source-row"),
                            gtk_tree_row_reference_new (model, source_row),
                            (GDestroyNotify) gtk_tree_row_reference_free);
   else
     g_object_set_data_full (G_OBJECT (context),
-                           "gtk-icon-view-source-row",
+                           I_("gtk-icon-view-source-row"),
                            NULL, NULL);
 }
 
@@ -5677,7 +6207,7 @@ set_dest_row (GdkDragContext *context,
   if (!dest_row)
     {
       g_object_set_data_full (G_OBJECT (context),
-                             "gtk-icon-view-dest-row",
+                             I_("gtk-icon-view-dest-row"),
                              NULL, NULL);
       return;
     }
@@ -5688,7 +6218,7 @@ set_dest_row (GdkDragContext *context,
   dr->empty_view_drop = empty_view_drop;
   dr->drop_append_mode = drop_append_mode;
   g_object_set_data_full (G_OBJECT (context),
-                          "gtk-icon-view-dest-row",
+                          I_("gtk-icon-view-dest-row"),
                           dr, (GDestroyNotify) dest_row_free);
 }
 
@@ -5795,12 +6325,8 @@ drag_scroll_timeout (gpointer data)
 {
   GtkIconView *icon_view = GTK_ICON_VIEW (data);
 
-  GDK_THREADS_ENTER ();
-
   gtk_icon_view_autoscroll (icon_view);
 
-  GDK_THREADS_LEAVE ();
-
   return TRUE;
 }
 
@@ -6106,7 +6632,7 @@ gtk_icon_view_drag_data_get (GtkWidget        *widget,
     goto done;
 
   /* If drag_data_get does nothing, try providing row data. */
-  if (selection_data->target == gdk_atom_intern ("GTK_TREE_MODEL_ROW", FALSE))
+  if (selection_data->target == gdk_atom_intern_static_string ("GTK_TREE_MODEL_ROW"))
     gtk_tree_set_row_drag_data (selection_data,
                                model,
                                source_row);
@@ -6171,7 +6697,6 @@ gtk_icon_view_drag_motion (GtkWidget      *widget,
                           guint           time)
 {
   GtkTreePath *path = NULL;
-  GtkTreeModel *model;
   GtkIconViewDropPosition pos;
   GtkIconView *icon_view;
   GdkDragAction suggested_action = 0;
@@ -6186,7 +6711,6 @@ gtk_icon_view_drag_motion (GtkWidget      *widget,
   gtk_icon_view_get_drag_dest_item (icon_view, &path, &pos);
 
   /* we only know this *after* set_desination_row */
-  model = gtk_icon_view_get_model (icon_view);
   empty = icon_view->priv->empty_view_drop;
 
   if (path == NULL && !empty)
@@ -6199,10 +6723,10 @@ gtk_icon_view_drag_motion (GtkWidget      *widget,
       if (icon_view->priv->scroll_timeout_id == 0)
        {
          icon_view->priv->scroll_timeout_id =
-           g_timeout_add (50, drag_scroll_timeout, icon_view);
+           gdk_threads_add_timeout (50, drag_scroll_timeout, icon_view);
        }
 
-      if (target == gdk_atom_intern ("GTK_TREE_MODEL_ROW", FALSE))
+      if (target == gdk_atom_intern_static_string ("GTK_TREE_MODEL_ROW"))
         {
           /* Request data so we can use the source row when
            * determining whether to accept the drop
@@ -6404,7 +6928,7 @@ gtk_icon_view_enable_model_drag_source (GtkIconView              *icon_view,
  * @icon_view: a #GtkIconView
  * @targets: the table of targets that the drag will support
  * @n_targets: the number of items in @targets
- * @actions: the bitmask of possible actions for a drag from this
+ * @actions: the bitmask of possible actions for a drag to this
  *    widget
  * 
  * Turns @icon_view into a drop destination for automatic DND.
@@ -6480,7 +7004,7 @@ gtk_icon_view_unset_model_drag_dest (GtkIconView *icon_view)
  * gtk_icon_view_set_drag_dest_item:
  * @icon_view: a #GtkIconView
  * @path: The path of the item to highlight, or %NULL.
- * @pos: Specifies whether to drop, relative to the item
+ * @pos: Specifies where to drop, relative to the item
  * 
  * Sets the item that is highlighted for feedback.
  *
@@ -6569,7 +7093,7 @@ gtk_icon_view_get_drag_dest_item (GtkIconView              *icon_view,
  * @icon_view: a #GtkIconView
  * @drag_x: the position to determine the destination item for
  * @drag_y: the position to determine the destination item for
- * @path: Return location for the path of the highlighted item, or %NULL.
+ * @path: Return location for the path of the item, or %NULL.
  * @pos: Return location for the drop position, or %NULL
  * 
  * Determines the destination item for a given position.
@@ -6651,8 +7175,14 @@ gtk_icon_view_create_drag_icon (GtkIconView *icon_view,
   gint index;
   GdkRectangle area;
 
+  g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), NULL);
+  g_return_val_if_fail (path != NULL, NULL);
+
   widget = GTK_WIDGET (icon_view);
 
+  if (!GTK_WIDGET_REALIZED (widget))
+    return NULL;
+
   index = gtk_tree_path_get_indices (path)[0];
 
   for (l = icon_view->priv->items; l; l = l->next) 
@@ -6834,8 +7364,6 @@ gtk_icon_view_item_accessible_idle_do_action (gpointer data)
   GtkIconView *icon_view;
   GtkTreePath *path;
 
-  GDK_THREADS_ENTER ();
-
   item = GTK_ICON_VIEW_ITEM_ACCESSIBLE (data);
   item->action_idle_handler = 0;
 
@@ -6847,8 +7375,6 @@ gtk_icon_view_item_accessible_idle_do_action (gpointer data)
       gtk_tree_path_free (path);
     }
 
-  GDK_THREADS_LEAVE ();
-
   return FALSE;
 }
 
@@ -6857,7 +7383,6 @@ gtk_icon_view_item_accessible_action_do_action (AtkAction *action,
                                                 gint       i)
 {
   GtkIconViewItemAccessible *item;
-  GtkIconView *icon_view;
 
   if (i < 0 || i >= LAST_ACTION) 
     return FALSE;
@@ -6870,13 +7395,11 @@ gtk_icon_view_item_accessible_action_do_action (AtkAction *action,
   if (atk_state_set_contains_state (item->state_set, ATK_STATE_DEFUNCT))
     return FALSE;
 
-  icon_view = GTK_ICON_VIEW (item->widget);
-
   switch (i)
     {
     case ACTION_ACTIVATE:
       if (!item->action_idle_handler)
-        item->action_idle_handler = g_idle_add (gtk_icon_view_item_accessible_idle_do_action, item);
+        item->action_idle_handler = gdk_threads_add_idle (gtk_icon_view_item_accessible_idle_do_action, item);
       break;
     default:
       g_assert_not_reached ();
@@ -6931,8 +7454,7 @@ gtk_icon_view_item_accessible_action_set_description (AtkAction   *action,
 
   item = GTK_ICON_VIEW_ITEM_ACCESSIBLE (action);
 
-  if (item->action_descriptions[i])
-    g_free (item->action_descriptions[i]);
+  g_free (item->action_descriptions[i]);
 
   item->action_descriptions[i] = g_strdup (description);
 
@@ -7135,6 +7657,7 @@ gtk_icon_view_item_accessible_text_get_character_at_offset (AtkText *text,
   return unichar;
 }
 
+#if 0
 static void
 get_pango_text_offsets (PangoLayout     *layout,
                         GtkTextBuffer   *buffer,
@@ -7157,7 +7680,7 @@ get_pango_text_offsets (PangoLayout     *layout,
   iter = pango_layout_get_iter (layout);
   do
     {
-      line = pango_layout_iter_get_line (iter);
+      line = pango_layout_iter_get_line_readonly (iter);
       start_index = line->start_index;
       end_index = start_index + line->length;
 
@@ -7198,7 +7721,7 @@ get_pango_text_offsets (PangoLayout     *layout,
                 {
                 case ATK_TEXT_BOUNDARY_LINE_START:
                   if (pango_layout_iter_next_line (iter))
-                    end_index = pango_layout_iter_get_line (iter)->start_index;
+                    end_index = pango_layout_iter_get_line_readonly (iter)->start_index;
                   break;
                 case ATK_TEXT_BOUNDARY_LINE_END:
                   if (prev_line)
@@ -7215,13 +7738,13 @@ get_pango_text_offsets (PangoLayout     *layout,
                 */
               if (pango_layout_iter_next_line (iter))
                 {
-                  line = pango_layout_iter_get_line (iter);
+                  line = pango_layout_iter_get_line_readonly (iter);
                   switch (boundary_type)
                     {
                     case ATK_TEXT_BOUNDARY_LINE_START:
                       start_index = line->start_index;
                       if (pango_layout_iter_next_line (iter))
-                        end_index = pango_layout_iter_get_line (iter)->start_index;
+                        end_index = pango_layout_iter_get_line_readonly (iter)->start_index;
                       else
                         end_index = start_index + line->length;
                       break;
@@ -7257,6 +7780,7 @@ get_pango_text_offsets (PangoLayout     *layout,
   gtk_text_buffer_get_iter_at_offset (buffer, start_iter, *start_offset);
   gtk_text_buffer_get_iter_at_offset (buffer, end_iter, *end_offset);
 }
+#endif
 
 static gchar*
 gtk_icon_view_item_accessible_text_get_text_before_offset (AtkText         *text,
@@ -7268,7 +7792,9 @@ gtk_icon_view_item_accessible_text_get_text_before_offset (AtkText         *text
   GtkIconViewItemAccessible *item;
   GtkTextIter start, end;
   GtkTextBuffer *buffer;
+#if 0
   GtkIconView *icon_view;
+#endif
 
   item = GTK_ICON_VIEW_ITEM_ACCESSIBLE (text);
 
@@ -7343,8 +7869,8 @@ gtk_icon_view_item_accessible_text_get_text_before_offset (AtkText         *text
       break;
    case ATK_TEXT_BOUNDARY_LINE_START:
    case ATK_TEXT_BOUNDARY_LINE_END:
-      icon_view = GTK_ICON_VIEW (item->widget);
 #if 0
+      icon_view = GTK_ICON_VIEW (item->widget);
       /* FIXME we probably have to use GailTextCell to salvage this */
       gtk_icon_view_update_item_text (icon_view, item->item);
       get_pango_text_offsets (icon_view->priv->layout,
@@ -7376,7 +7902,9 @@ gtk_icon_view_item_accessible_text_get_text_at_offset (AtkText         *text,
   GtkIconViewItemAccessible *item;
   GtkTextIter start, end;
   GtkTextBuffer *buffer;
+#if 0
   GtkIconView *icon_view;
+#endif
 
   item = GTK_ICON_VIEW_ITEM_ACCESSIBLE (text);
 
@@ -7449,8 +7977,8 @@ gtk_icon_view_item_accessible_text_get_text_at_offset (AtkText         *text,
       break;
    case ATK_TEXT_BOUNDARY_LINE_START:
    case ATK_TEXT_BOUNDARY_LINE_END:
-      icon_view = GTK_ICON_VIEW (item->widget);
 #if 0
+      icon_view = GTK_ICON_VIEW (item->widget);
       /* FIXME we probably have to use GailTextCell to salvage this */
       gtk_icon_view_update_item_text (icon_view, item->item);
       get_pango_text_offsets (icon_view->priv->layout,
@@ -7483,7 +8011,9 @@ gtk_icon_view_item_accessible_text_get_text_after_offset (AtkText         *text,
   GtkIconViewItemAccessible *item;
   GtkTextIter start, end;
   GtkTextBuffer *buffer;
+#if 0
   GtkIconView *icon_view;
+#endif
 
   item = GTK_ICON_VIEW_ITEM_ACCESSIBLE (text);
 
@@ -7563,8 +8093,8 @@ gtk_icon_view_item_accessible_text_get_text_after_offset (AtkText         *text,
       break;
    case ATK_TEXT_BOUNDARY_LINE_START:
    case ATK_TEXT_BOUNDARY_LINE_END:
-      icon_view = GTK_ICON_VIEW (item->widget);
 #if 0
+      icon_view = GTK_ICON_VIEW (item->widget);
       /* FIXME we probably have to use GailTextCell to salvage this */
       gtk_icon_view_update_item_text (icon_view, item->item);
       get_pango_text_offsets (icon_view->priv->layout,
@@ -7611,10 +8141,12 @@ gtk_icon_view_item_accessible_text_get_character_extents (AtkText      *text,
                                                           AtkCoordType coord_type)
 {
   GtkIconViewItemAccessible *item;
+#if 0
   GtkIconView *icon_view;
   PangoRectangle char_rect;
   const gchar *item_text;
   gint index;
+#endif
 
   item = GTK_ICON_VIEW_ITEM_ACCESSIBLE (text);
 
@@ -7624,8 +8156,8 @@ gtk_icon_view_item_accessible_text_get_character_extents (AtkText      *text,
   if (atk_state_set_contains_state (item->state_set, ATK_STATE_DEFUNCT))
     return;
 
-  icon_view = GTK_ICON_VIEW (item->widget);
 #if 0
+  icon_view = GTK_ICON_VIEW (item->widget);
       /* FIXME we probably have to use GailTextCell to salvage this */
   gtk_icon_view_update_item_text (icon_view, item->item);
   item_text = pango_layout_get_text (icon_view->priv->layout);
@@ -7649,11 +8181,13 @@ gtk_icon_view_item_accessible_text_get_offset_at_point (AtkText      *text,
                                                         AtkCoordType coord_type)
 {
   GtkIconViewItemAccessible *item;
+  gint offset = 0;
+#if 0
   GtkIconView *icon_view;
   const gchar *item_text;
   gint index;
-  gint offset;
   gint l_x, l_y;
+#endif
 
   item = GTK_ICON_VIEW_ITEM_ACCESSIBLE (text);
 
@@ -7663,8 +8197,8 @@ gtk_icon_view_item_accessible_text_get_offset_at_point (AtkText      *text,
   if (atk_state_set_contains_state (item->state_set, ATK_STATE_DEFUNCT))
     return -1;
 
-  icon_view = GTK_ICON_VIEW (item->widget);
 #if 0
+  icon_view = GTK_ICON_VIEW (item->widget);
       /* FIXME we probably have to use GailTextCell to salvage this */
   gtk_icon_view_update_item_text (icon_view, item->item);
   atk_component_get_position (ATK_COMPONENT (text), &l_x, &l_y, coord_type);
@@ -7990,6 +8524,10 @@ gtk_icon_view_item_accessible_ref_state_set (AtkObject *obj)
     atk_state_set_add_state (item->state_set, ATK_STATE_FOCUSED);
   else
     atk_state_set_remove_state (item->state_set, ATK_STATE_FOCUSED);
+  if (item->item->selected)
+    atk_state_set_add_state (item->state_set, ATK_STATE_SELECTED);
+  else
+    atk_state_set_remove_state (item->state_set, ATK_STATE_SELECTED);
 
   return g_object_ref (item->state_set);
 }
@@ -8018,7 +8556,7 @@ gtk_icon_view_item_accessible_get_type (void)
 
   if (!type)
     {
-      static const GTypeInfo tinfo =
+      const GTypeInfo tinfo =
       {
         sizeof (GtkIconViewItemAccessibleClass),
         (GBaseInitFunc) NULL, /* base init */
@@ -8058,7 +8596,7 @@ gtk_icon_view_item_accessible_get_type (void)
       };
 
       type = g_type_register_static (ATK_TYPE_OBJECT,
-                                     g_intern_static_string ("GtkIconViewItemAccessible"), &tinfo, 0);
+                                     I_("GtkIconViewItemAccessible"), &tinfo, 0);
       g_type_add_interface_static (type, ATK_TYPE_COMPONENT,
                                    &atk_component_info);
       g_type_add_interface_static (type, ATK_TYPE_ACTION,
@@ -8196,6 +8734,8 @@ gtk_icon_view_accessible_ref_child (AtkObject *accessible,
       obj = gtk_icon_view_accessible_find_child (accessible, index);
       if (!obj)
         {
+          gchar *text;
+
           obj = g_object_new (gtk_icon_view_item_accessible_get_type (), NULL);
           gtk_icon_view_item_accessible_info_new (accessible,
                                                   obj,
@@ -8207,8 +8747,12 @@ gtk_icon_view_accessible_ref_child (AtkObject *accessible,
           a11y_item->text_buffer = gtk_text_buffer_new (NULL);
 
          gtk_icon_view_set_cell_data (icon_view, item);
-          gtk_text_buffer_set_text (a11y_item->text_buffer, 
-                                   get_text (icon_view, item), -1);
+          text = get_text (icon_view, item);
+          if (text)
+            {
+              gtk_text_buffer_set_text (a11y_item->text_buffer, text, -1);
+              g_free (text);
+            } 
 
           gtk_icon_view_item_accessible_set_visibility (a11y_item, FALSE);
           g_object_add_weak_pointer (G_OBJECT (widget), (gpointer) &(a11y_item->widget));
@@ -8340,7 +8884,7 @@ gtk_icon_view_accessible_model_row_changed (GtkTreeModel *tree_model,
   AtkObject *atk_obj;
 
   atk_obj = gtk_widget_get_accessible (GTK_WIDGET (user_data));
-  g_signal_emit_by_name (atk_obj, "visible-data-changed");
+  g_signal_emit_by_name (atk_obj, "visible_data_changed");
 
   return;
 }
@@ -8465,27 +9009,22 @@ gtk_icon_view_accessible_model_rows_reordered (GtkTreeModel *tree_model,
 {
   GtkIconViewAccessiblePrivate *priv;
   GtkIconViewItemAccessibleInfo *info;
-  GtkIconViewAccessible *view;
   GtkIconView *icon_view;
   GtkIconViewItemAccessible *item;
   GList *items;
-  GList *tmp_list;
   AtkObject *atk_obj;
 
   atk_obj = gtk_widget_get_accessible (GTK_WIDGET (user_data));
   icon_view = GTK_ICON_VIEW (user_data);
-  view = GTK_ICON_VIEW_ACCESSIBLE (atk_obj);
   priv = gtk_icon_view_accessible_get_priv (atk_obj);
 
   items = priv->items;
-  tmp_list = NULL;
   while (items)
     {
       info = items->data;
       item = GTK_ICON_VIEW_ITEM_ACCESSIBLE (info->item);
       info->index = new_order[info->index];
-      tmp_list = g_list_nth (icon_view->priv->items, info->index);
-      item->item = tmp_list->data;
+      item->item = g_list_nth_data (icon_view->priv->items, info->index);
       items = items->next;
     }
   priv->items = g_list_sort (priv->items, 
@@ -8513,16 +9052,16 @@ gtk_icon_view_accessible_connect_model_signals (GtkIconView *icon_view)
   GObject *obj;
 
   obj = G_OBJECT (icon_view->priv->model);
-  g_signal_connect_data (obj, "row-changed",
+  g_signal_connect_data (obj, "row_changed",
                          (GCallback) gtk_icon_view_accessible_model_row_changed,
                          icon_view, NULL, 0);
-  g_signal_connect_data (obj, "row-inserted",
+  g_signal_connect_data (obj, "row_inserted",
                          (GCallback) gtk_icon_view_accessible_model_row_inserted, 
                          icon_view, NULL, G_CONNECT_AFTER);
-  g_signal_connect_data (obj, "row-deleted",
+  g_signal_connect_data (obj, "row_deleted",
                          (GCallback) gtk_icon_view_accessible_model_row_deleted, 
                          icon_view, NULL, G_CONNECT_AFTER);
-  g_signal_connect_data (obj, "rows-reordered",
+  g_signal_connect_data (obj, "rows_reordered",
                          (GCallback) gtk_icon_view_accessible_model_rows_reordered, 
                          icon_view, NULL, G_CONNECT_AFTER);
 }
@@ -8552,14 +9091,12 @@ gtk_icon_view_accessible_notify_gtk (GObject *obj,
   GtkIconView *icon_view;
   GtkWidget *widget;
   AtkObject *atk_obj;
-  GtkIconViewAccessible *view;
   GtkIconViewAccessiblePrivate *priv;
 
   if (strcmp (pspec->name, "model") == 0)
     {
       widget = GTK_WIDGET (obj); 
       atk_obj = gtk_widget_get_accessible (widget);
-      view = GTK_ICON_VIEW_ACCESSIBLE (atk_obj);
       priv = gtk_icon_view_accessible_get_priv (atk_obj);
       if (priv->model)
         {
@@ -8752,7 +9289,6 @@ gtk_icon_view_accessible_add_selection (AtkSelection *selection,
   GtkWidget *widget;
   GtkIconView *icon_view;
   GtkIconViewItem *item;
-  GList *l;
 
   widget = GTK_ACCESSIBLE (selection)->widget;
   if (widget == NULL)
@@ -8760,11 +9296,11 @@ gtk_icon_view_accessible_add_selection (AtkSelection *selection,
 
   icon_view = GTK_ICON_VIEW (widget);
 
-  l = g_list_nth (icon_view->priv->items, i);
-  if (!l)
+  item = g_list_nth_data (icon_view->priv->items, i);
+
+  if (!item)
     return FALSE;
 
-  item = l->data;
   gtk_icon_view_select_item (icon_view, item);
 
   return TRUE;
@@ -8790,10 +9326,10 @@ static AtkObject*
 gtk_icon_view_accessible_ref_selection (AtkSelection *selection,
                                         gint          i)
 {
+  GList *l;
   GtkWidget *widget;
   GtkIconView *icon_view;
   GtkIconViewItem *item;
-  GList *l;
 
   widget = GTK_ACCESSIBLE (selection)->widget;
   if (widget == NULL)
@@ -8855,18 +9391,16 @@ gtk_icon_view_accessible_is_child_selected (AtkSelection *selection,
   GtkWidget *widget;
   GtkIconView *icon_view;
   GtkIconViewItem *item;
-  GList *l;
 
   widget = GTK_ACCESSIBLE (selection)->widget;
   if (widget == NULL)
     return FALSE;
 
   icon_view = GTK_ICON_VIEW (widget);
-  l = g_list_nth (icon_view->priv->items, i);
-  if (!l)
-    return FALSE;
 
-  item = l->data;
+  item = g_list_nth_data (icon_view->priv->items, i);
+  if (!item)
+    return FALSE;
 
   return item->selected;
 }
@@ -8984,7 +9518,7 @@ gtk_icon_view_accessible_get_type (void)
       tinfo.instance_size = query.instance_size;
  
       type = g_type_register_static (derived_atk_type, 
-                                     "GtkIconViewAccessible"
+                                     I_("GtkIconViewAccessible")
                                      &tinfo, 0);
       g_type_add_interface_static (type, ATK_TYPE_COMPONENT,
                                    &atk_component_info);
@@ -9033,7 +9567,7 @@ gtk_icon_view_accessible_factory_get_type (void)
 
   if (!type)
     {
-      static const GTypeInfo tinfo =
+      const GTypeInfo tinfo =
       {
         sizeof (AtkObjectFactoryClass),
         NULL,           /* base_init */
@@ -9047,7 +9581,7 @@ gtk_icon_view_accessible_factory_get_type (void)
       };
 
       type = g_type_register_static (ATK_TYPE_OBJECT_FACTORY, 
-                                    "GtkIconViewAccessibleFactory",
+                                    I_("GtkIconViewAccessibleFactory"),
                                     &tinfo, 0);
     }
   return type;
@@ -9086,5 +9620,38 @@ gtk_icon_view_get_accessible (GtkWidget *widget)
   return (* GTK_WIDGET_CLASS (gtk_icon_view_parent_class)->get_accessible) (widget);
 }
 
+static gboolean
+gtk_icon_view_buildable_custom_tag_start (GtkBuildable  *buildable,
+                                         GtkBuilder    *builder,
+                                         GObject       *child,
+                                         const gchar   *tagname,
+                                         GMarkupParser *parser,
+                                         gpointer      *data)
+{
+  if (parent_buildable_iface->custom_tag_start (buildable, builder, child,
+                                               tagname, parser, data))
+    return TRUE;
+
+  return _gtk_cell_layout_buildable_custom_tag_start (buildable, builder, child,
+                                                     tagname, parser, data);
+}
+
+static void
+gtk_icon_view_buildable_custom_tag_end (GtkBuildable *buildable,
+                                       GtkBuilder   *builder,
+                                       GObject      *child,
+                                       const gchar  *tagname,
+                                       gpointer     *data)
+{
+  if (strcmp (tagname, "attributes") == 0)
+    _gtk_cell_layout_buildable_custom_tag_end (buildable, builder, child, tagname,
+                                              data);
+  else
+    parent_buildable_iface->custom_tag_end (buildable, builder, child, tagname,
+                                           data);
+}
+
+
+
 #define __GTK_ICON_VIEW_C__
 #include "gtkaliasdef.c"