Index: gtk+/gtk/gtkentry.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkentry.c,v
retrieving revision 1.323
diff -u -r1.323 gtkentry.c
--- gtk+/gtk/gtkentry.c	1 Sep 2006 14:44:06 -0000	1.323
+++ gtk+/gtk/gtkentry.c	28 Sep 2006 20:31:14 -0000
@@ -22,7 +22,7 @@
  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
  * file for a list of people on the GTK+ Team.  See the ChangeLog
  * files for a list of changes.  These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
  */
 
 #include <config.h>
@@ -78,7 +78,7 @@
 
 #define GTK_ENTRY_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_ENTRY, GtkEntryPrivate))
 
-struct _GtkEntryPrivate 
+struct _GtkEntryPrivate
 {
   gfloat xalign;
   gint insert_pos;
@@ -124,7 +124,8 @@
   PROP_SCROLL_OFFSET,
   PROP_TEXT,
   PROP_XALIGN,
-  PROP_TRUNCATE_MULTILINE
+  PROP_TRUNCATE_MULTILINE,
+  PROP_DRAGABLE
 };
 
 static guint signals[LAST_SIGNAL] = { 0 };
@@ -384,7 +385,7 @@
 		  gint            count)
 {
   g_return_if_fail ((modmask & GDK_SHIFT_MASK) == 0);
-  
+
   gtk_binding_entry_add_signal (binding_set, keyval, modmask,
 				"move_cursor", 3,
 				G_TYPE_ENUM, step,
@@ -453,7 +454,7 @@
   class->paste_clipboard = gtk_entry_paste_clipboard;
   class->toggle_overwrite = gtk_entry_toggle_overwrite;
   class->activate = gtk_entry_real_activate;
-  
+
   quark_inner_border = g_quark_from_static_string ("gtk-entry-inner-border");
   quark_password_hint = g_quark_from_static_string ("gtk-entry-password-hint");
 
@@ -466,7 +467,7 @@
                                                      MAX_SIZE,
                                                      0,
                                                      GTK_PARAM_READABLE));
-  
+
   g_object_class_install_property (gobject_class,
                                    PROP_SELECTION_BOUND,
                                    g_param_spec_int ("selection-bound",
@@ -476,7 +477,7 @@
                                                      MAX_SIZE,
                                                      0,
                                                      GTK_PARAM_READABLE));
-  
+
   g_object_class_install_property (gobject_class,
                                    PROP_EDITABLE,
                                    g_param_spec_boolean ("editable",
@@ -484,7 +485,15 @@
 							 P_("Whether the entry contents can be edited"),
                                                          TRUE,
 							 GTK_PARAM_READWRITE));
-  
+
+  g_object_class_install_property (gobject_class,
+                                   PROP_DRAGABLE,
+                                   g_param_spec_boolean ("dragable",
+                                       P_("Dragable"),
+                                       P_("Whether the entry contents are dragable"),
+                                       TRUE,
+                                       GTK_PARAM_READWRITE));
+
   g_object_class_install_property (gobject_class,
                                    PROP_MAX_LENGTH,
                                    g_param_spec_int ("max-length",
@@ -564,9 +573,9 @@
   /**
    * GtkEntry:xalign:
    *
-   * The horizontal alignment, from 0 (left) to 1 (right). 
+   * The horizontal alignment, from 0 (left) to 1 (right).
    * Reversed for RTL layouts.
-   * 
+   *
    * Since: 2.4
    */
   g_object_class_install_property (gobject_class,
@@ -603,9 +612,9 @@
 		  _gtk_marshal_VOID__OBJECT,
 		  G_TYPE_NONE, 1,
 		  GTK_TYPE_MENU);
-  
+
  /* Action signals */
-  
+
   signals[ACTIVATE] =
     g_signal_new (I_("activate"),
 		  G_OBJECT_CLASS_TYPE (gobject_class),
@@ -616,7 +625,7 @@
 		  G_TYPE_NONE, 0);
   widget_class->activate_signal = signals[ACTIVATE];
 
-  signals[MOVE_CURSOR] = 
+  signals[MOVE_CURSOR] =
     g_signal_new (I_("move_cursor"),
 		  G_OBJECT_CLASS_TYPE (gobject_class),
 		  G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
@@ -628,7 +637,7 @@
 		  G_TYPE_INT,
 		  G_TYPE_BOOLEAN);
 
-  signals[INSERT_AT_CURSOR] = 
+  signals[INSERT_AT_CURSOR] =
     g_signal_new (I_("insert_at_cursor"),
 		  G_OBJECT_CLASS_TYPE (gobject_class),
 		  G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
@@ -638,7 +647,7 @@
 		  G_TYPE_NONE, 1,
 		  G_TYPE_STRING);
 
-  signals[DELETE_FROM_CURSOR] = 
+  signals[DELETE_FROM_CURSOR] =
     g_signal_new (I_("delete_from_cursor"),
 		  G_OBJECT_CLASS_TYPE (gobject_class),
 		  G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
@@ -703,16 +712,16 @@
   /* Moving the insertion point */
   add_move_binding (binding_set, GDK_Right, 0,
 		    GTK_MOVEMENT_VISUAL_POSITIONS, 1);
-  
+
   add_move_binding (binding_set, GDK_Left, 0,
 		    GTK_MOVEMENT_VISUAL_POSITIONS, -1);
 
   add_move_binding (binding_set, GDK_KP_Right, 0,
 		    GTK_MOVEMENT_VISUAL_POSITIONS, 1);
-  
+
   add_move_binding (binding_set, GDK_KP_Left, 0,
 		    GTK_MOVEMENT_VISUAL_POSITIONS, -1);
-  
+
   add_move_binding (binding_set, GDK_Right, GDK_CONTROL_MASK,
 		    GTK_MOVEMENT_WORDS, 1);
 
@@ -724,7 +733,7 @@
 
   add_move_binding (binding_set, GDK_KP_Left, GDK_CONTROL_MASK,
 		    GTK_MOVEMENT_WORDS, -1);
-  
+
   add_move_binding (binding_set, GDK_Home, 0,
 		    GTK_MOVEMENT_DISPLAY_LINE_ENDS, -1);
 
@@ -736,7 +745,7 @@
 
   add_move_binding (binding_set, GDK_KP_End, 0,
 		    GTK_MOVEMENT_DISPLAY_LINE_ENDS, 1);
-  
+
   add_move_binding (binding_set, GDK_Home, GDK_CONTROL_MASK,
 		    GTK_MOVEMENT_BUFFER_ENDS, -1);
 
@@ -760,7 +769,7 @@
                                 "move_cursor", 3,
                                 GTK_TYPE_MOVEMENT_STEP, GTK_MOVEMENT_BUFFER_ENDS,
                                 G_TYPE_INT, 1,
-				G_TYPE_BOOLEAN, TRUE);  
+				G_TYPE_BOOLEAN, TRUE);
 
   gtk_binding_entry_add_signal (binding_set, GDK_slash, GDK_CONTROL_MASK,
                                 "move_cursor", 3,
@@ -771,8 +780,8 @@
                                 "move_cursor", 3,
                                 GTK_TYPE_MOVEMENT_STEP, GTK_MOVEMENT_BUFFER_ENDS,
                                 G_TYPE_INT, 1,
-				G_TYPE_BOOLEAN, TRUE);  
-  /* Unselect all 
+				G_TYPE_BOOLEAN, TRUE);
+  /* Unselect all
    */
   gtk_binding_entry_add_signal (binding_set, GDK_backslash, GDK_CONTROL_MASK,
                                 "move_cursor", 3,
@@ -791,7 +800,7 @@
 				"activate", 0);
   gtk_binding_entry_add_signal (binding_set, GDK_KP_Enter, 0,
 				"activate", 0);
-  
+
   /* Deleting text */
   gtk_binding_entry_add_signal (binding_set, GDK_Delete, 0,
 				"delete_from_cursor", 2,
@@ -802,7 +811,7 @@
 				"delete_from_cursor", 2,
 				G_TYPE_ENUM, GTK_DELETE_CHARS,
 				G_TYPE_INT, 1);
-  
+
   gtk_binding_entry_add_signal (binding_set, GDK_BackSpace, 0,
 				"backspace", 0);
 
@@ -819,7 +828,7 @@
 				"delete_from_cursor", 2,
 				G_TYPE_ENUM, GTK_DELETE_WORD_ENDS,
 				G_TYPE_INT, 1);
-  
+
   gtk_binding_entry_add_signal (binding_set, GDK_BackSpace, GDK_CONTROL_MASK,
 				"delete_from_cursor", 2,
 				G_TYPE_ENUM, GTK_DELETE_WORD_ENDS,
@@ -935,16 +944,34 @@
 
 	    if (new_value && GTK_WIDGET_HAS_FOCUS (entry))
 	      gtk_im_context_focus_in (entry->im_context);
-	    
+
 	    gtk_entry_queue_draw (entry);
 	  }
       }
       break;
 
-    case PROP_MAX_LENGTH:
+      case PROP_DRAGABLE:
+      {
+        gboolean new_value = g_value_get_boolean (value);
+
+        if (new_value != entry->dragable)
+        {
+          if (entry->in_drag)
+          {
+            entry->drag_start_x = 0;
+            entry->drag_start_y = 0;
+          }
+
+          entry->dragable = new_value;
+          gtk_entry_queue_draw (entry);
+        }
+      }
+      break;
+
+      case PROP_MAX_LENGTH:
       gtk_entry_set_max_length (entry, g_value_get_int (value));
       break;
-      
+
     case PROP_VISIBILITY:
       gtk_entry_set_visibility (entry, g_value_get_boolean (value));
       break;
@@ -1009,7 +1036,7 @@
       g_value_set_boolean (value, entry->editable);
       break;
     case PROP_MAX_LENGTH:
-      g_value_set_int (value, entry->text_max_length); 
+      g_value_set_int (value, entry->text_max_length);
       break;
     case PROP_VISIBILITY:
       g_value_set_boolean (value, entry->visible);
@@ -1041,8 +1068,11 @@
     case PROP_TRUNCATE_MULTILINE:
       g_value_set_boolean (value, entry->truncate_multiline);
       break;
+    case PROP_DRAGABLE:
+      g_value_set_boolean (value, entry->dragable);
+      break;
 
-    default:
+      default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
     }
@@ -1052,7 +1082,7 @@
 gtk_entry_init (GtkEntry *entry)
 {
   GtkEntryPrivate *priv = GTK_ENTRY_GET_PRIVATE (entry);
-  
+
   GTK_WIDGET_SET_FLAGS (entry, GTK_CAN_FOCUS);
 
   entry->text_size = MIN_SIZE;
@@ -1068,6 +1098,7 @@
   entry->editing_canceled = FALSE;
   entry->has_frame = TRUE;
   entry->truncate_multiline = FALSE;
+  entry->dragable = TRUE;
   priv->xalign = 0.0;
 
   gtk_drag_dest_set (GTK_WIDGET (entry),
@@ -1080,7 +1111,7 @@
    * to it; so we create it here and destroy it in finalize().
    */
   entry->im_context = gtk_im_multicontext_new ();
-  
+
   g_signal_connect (entry->im_context, "commit",
 		    G_CALLBACK (gtk_entry_commit_cb), entry);
   g_signal_connect (entry->im_context, "preedit_changed",
@@ -1175,7 +1206,7 @@
   entry = GTK_ENTRY (widget);
 
   attributes.window_type = GDK_WINDOW_CHILD;
-  
+
   get_widget_window_size (entry, &attributes.x, &attributes.y, &attributes.width, &attributes.height);
 
   attributes.wclass = GDK_INPUT_OUTPUT;
@@ -1226,13 +1257,13 @@
   GtkClipboard *clipboard;
 
   gtk_entry_reset_layout (entry);
-  
+
   gtk_im_context_set_client_window (entry->im_context, NULL);
 
   clipboard = gtk_widget_get_clipboard (widget, GDK_SELECTION_PRIMARY);
   if (gtk_clipboard_get_owner (clipboard) == G_OBJECT (entry))
     gtk_clipboard_clear (clipboard);
-  
+
   if (entry->text_area)
     {
       gdk_window_set_user_data (entry->text_area, NULL);
@@ -1291,7 +1322,7 @@
   gint xborder, yborder;
   GtkBorder inner_border;
   PangoContext *context;
-  
+
   gtk_widget_ensure_style (widget);
   context = gtk_widget_get_pango_context (widget);
   metrics = pango_context_get_metrics (context,
@@ -1300,7 +1331,7 @@
 
   entry->ascent = pango_font_metrics_get_ascent (metrics);
   entry->descent = pango_font_metrics_get_descent (metrics);
-  
+
   _gtk_entry_get_borders (entry, &xborder, &yborder);
   _gtk_entry_effective_inner_border (entry, &inner_border);
 
@@ -1311,10 +1342,10 @@
       gint char_width = pango_font_metrics_get_approximate_char_width (metrics);
       gint digit_width = pango_font_metrics_get_approximate_digit_width (metrics);
       gint char_pixels = (MAX (char_width, digit_width) + PANGO_SCALE - 1) / PANGO_SCALE;
-      
+
       requisition->width = char_pixels * entry->width_chars + xborder * 2 + inner_border.left + inner_border.right;
     }
-    
+
   requisition->height = PANGO_PIXELS (entry->ascent + entry->descent) + yborder * 2 + inner_border.top + inner_border.bottom;
 
   pango_font_metrics_unref (metrics);
@@ -1340,7 +1371,7 @@
 
   if (y)
     *y = yborder;
-  
+
   if (width)
     *width = GTK_WIDGET (entry)->allocation.width - xborder * 2;
 
@@ -1357,7 +1388,7 @@
 {
   GtkRequisition requisition;
   GtkWidget *widget = GTK_WIDGET (entry);
-      
+
   gtk_widget_get_child_requisition (widget, &requisition);
 
   if (x)
@@ -1414,9 +1445,9 @@
 			 GtkAllocation *allocation)
 {
   GtkEntry *entry = GTK_ENTRY (widget);
-  
+
   widget->allocation = *allocation;
-  
+
   if (GTK_WIDGET_REALIZED (widget))
     {
       /* We call gtk_widget_get_child_requisition, since we want (for
@@ -1426,12 +1457,12 @@
       gint x, y, width, height;
 
       get_widget_window_size (entry, &x, &y, &width, &height);
-      
+
       gdk_window_move_resize (widget->window,
-                              x, y, width, height);   
+                              x, y, width, height);
 
       get_text_area_size (entry, &x, &y, &width, &height);
-      
+
       gdk_window_move_resize (entry->text_area,
                               x, y, width, height);
 
@@ -1446,14 +1477,14 @@
   gint width, height;
   gboolean interior_focus;
   gint focus_width;
-  
+
   gtk_widget_style_get (widget,
 			"interior-focus", &interior_focus,
 			"focus-line-width", &focus_width,
 			NULL);
-  
+
   gdk_drawable_get_size (widget->window, &width, &height);
-  
+
   if (GTK_WIDGET_HAS_FOCUS (widget) && !interior_focus)
     {
       x += focus_width;
@@ -1473,8 +1504,8 @@
       y -= focus_width;
       width += 2 * focus_width;
       height += 2 * focus_width;
-      
-      gtk_paint_focus (widget->style, widget->window, GTK_WIDGET_STATE (widget), 
+
+      gtk_paint_focus (widget->style, widget->window, GTK_WIDGET_STATE (widget),
 		       NULL, widget, "entry",
 		       0, 0, width, height);
     }
@@ -1494,11 +1525,11 @@
 
       get_text_area_size (entry, NULL, NULL, &area_width, &area_height);
 
-      gtk_paint_flat_box (widget->style, entry->text_area, 
+      gtk_paint_flat_box (widget->style, entry->text_area,
 			  GTK_WIDGET_STATE(widget), GTK_SHADOW_NONE,
-			  NULL, widget, "entry_bg", 
+			  NULL, widget, "entry_bg",
 			  0, 0, area_width, area_height);
-      
+
       if ((entry->visible || entry->invisible_char != 0) &&
 	  GTK_WIDGET_HAS_FOCUS (widget) &&
 	  entry->selection_bound == entry->current_pos && entry->cursor_visible)
@@ -1506,7 +1537,7 @@
 
       if (entry->dnd_position != -1)
 	gtk_entry_draw_cursor (GTK_ENTRY (widget), CURSOR_DND);
-      
+
       gtk_entry_draw_text (GTK_ENTRY (widget));
     }
 
@@ -1534,14 +1565,14 @@
       if (ranges)
 	{
 	  gint *r = *ranges;
-	  
+
 	  for (i = 0; i < real_n_ranges; ++i)
 	    {
 	      r[2 * i + 1] = (r[2 * i + 1] - r[2 * i]) / PANGO_SCALE;
 	      r[2 * i] = r[2 * i] / PANGO_SCALE;
 	    }
 	}
-      
+
       if (n_ranges)
 	*n_ranges = real_n_ranges;
     }
@@ -1576,7 +1607,7 @@
   g_free (ranges);
   return retval;
 }
-	      
+
 static gint
 gtk_entry_button_press (GtkWidget      *widget,
 			GdkEventButton *event)
@@ -1594,30 +1625,30 @@
   gtk_entry_reset_blink_time (entry);
 
   entry->button = event->button;
-  
+
   if (!GTK_WIDGET_HAS_FOCUS (widget))
     {
       entry->in_click = TRUE;
       gtk_widget_grab_focus (widget);
       entry->in_click = FALSE;
     }
-  
+
   tmp_pos = gtk_entry_find_position (entry, event->x + entry->scroll_offset);
-    
+
   if (event->button == 1)
     {
       gboolean have_selection = gtk_editable_get_selection_bounds (editable, &sel_start, &sel_end);
-      
+
       entry->select_words = FALSE;
       entry->select_lines = FALSE;
 
       if (event->state & GDK_SHIFT_MASK)
 	{
 	  _gtk_entry_reset_im_context (entry);
-	  
+
 	  if (!have_selection) /* select from the current position to the clicked position */
 	    sel_start = sel_end = entry->current_pos;
-	  
+
 	  if (tmp_pos > sel_start && tmp_pos < sel_end)
 	    {
 	      /* Truncate current selection */
@@ -1634,12 +1665,12 @@
 		case GDK_BUTTON_PRESS:
 		  gtk_entry_set_positions (entry, tmp_pos, tmp_pos);
 		  break;
-		  
+
 		case GDK_2BUTTON_PRESS:
 		  entry->select_words = TRUE;
 		  gtk_entry_select_word (entry);
 		  break;
-		  
+
 		case GDK_3BUTTON_PRESS:
 		  entry->select_lines = TRUE;
 		  gtk_entry_select_line (entry);
@@ -1651,7 +1682,7 @@
 
 	      start = MIN (entry->current_pos, entry->selection_bound);
 	      start = MIN (sel_start, start);
-	      
+
 	      end = MAX (entry->current_pos, entry->selection_bound);
 	      end = MAX (sel_end, end);
 
@@ -1659,7 +1690,7 @@
 		extend_to_left = (tmp_pos == start);
 	      else
 		extend_to_left = (end == sel_end);
-	      
+
 	      if (extend_to_left)
 		gtk_entry_set_positions (entry, start, end);
 	      else
@@ -1670,7 +1701,7 @@
 	switch (event->type)
 	{
 	case GDK_BUTTON_PRESS:
-	  if (in_selection (entry, event->x + entry->scroll_offset))
+          if (in_selection (entry, event->x + entry->scroll_offset) && (entry->dragable) )
 	    {
 	      /* Click inside the selection - we'll either start a drag, or
 	       * clear the selection
@@ -1682,9 +1713,9 @@
 	  else
             gtk_editable_set_position (editable, tmp_pos);
 	  break;
- 
+
 	case GDK_2BUTTON_PRESS:
-	  /* We ALWAYS receive a GDK_BUTTON_PRESS immediately before 
+	  /* We ALWAYS receive a GDK_BUTTON_PRESS immediately before
 	   * receiving a GDK_2BUTTON_PRESS so we need to reset
  	   * entry->in_drag which may have been set above
            */
@@ -1692,7 +1723,7 @@
 	  entry->select_words = TRUE;
 	  gtk_entry_select_word (entry);
 	  break;
-	
+
 	case GDK_3BUTTON_PRESS:
 	  /* We ALWAYS receive a GDK_BUTTON_PRESS immediately before
 	   * receiving a GDK_3BUTTON_PRESS so we need to reset
@@ -1744,11 +1775,11 @@
 
       entry->in_drag = 0;
     }
-  
+
   entry->button = 0;
-  
+
   gtk_entry_update_primary_selection (entry);
-	      
+
   return TRUE;
 }
 
@@ -1783,7 +1814,7 @@
   if (entry->mouse_cursor_obscured)
     {
       GdkCursor *cursor;
-      
+
       cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget), GDK_XTERM);
       gdk_window_set_cursor (entry->text_area, cursor);
       gdk_cursor_unref (cursor);
@@ -1821,7 +1852,7 @@
 
           context = gtk_drag_begin (widget, target_list, actions,
                                     entry->button, (GdkEvent *)event);
-          
+
           if (pixmap)
             gtk_drag_set_icon_pixmap (context,
                                       gdk_drawable_get_colormap (pixmap),
@@ -1830,14 +1861,14 @@
                                       -2, -2);
           else
             gtk_drag_set_icon_default (context);
-          
+
           if (pixmap)
             g_object_unref (pixmap);
           g_free (text);
 
           entry->in_drag = FALSE;
           entry->button = 0;
-	  
+
           gtk_target_list_unref (target_list);
         }
     }
@@ -1852,49 +1883,49 @@
 	tmp_pos = entry->text_length;
       else
 	tmp_pos = gtk_entry_find_position (entry, event->x + entry->scroll_offset);
-      
-      if (entry->select_words) 
+
+      if (entry->select_words)
 	{
 	  gint min, max;
 	  gint old_min, old_max;
 	  gint pos, bound;
-	  
+
 	  min = gtk_entry_move_backward_word (entry, tmp_pos, TRUE);
 	  max = gtk_entry_move_forward_word (entry, tmp_pos, TRUE);
-	  
+
 	  pos = entry->current_pos;
 	  bound = entry->selection_bound;
 
 	  old_min = MIN(entry->current_pos, entry->selection_bound);
 	  old_max = MAX(entry->current_pos, entry->selection_bound);
-	  
+
 	  if (min < old_min)
 	    {
 	      pos = min;
 	      bound = old_max;
 	    }
-	  else if (old_max < max) 
+	  else if (old_max < max)
 	    {
 	      pos = max;
 	      bound = old_min;
 	    }
-	  else if (pos == old_min) 
+	  else if (pos == old_min)
 	    {
 	      if (entry->current_pos != min)
 		pos = max;
 	    }
-	  else 
+	  else
 	    {
 	      if (entry->current_pos != max)
 		pos = min;
 	    }
-	
+
 	  gtk_entry_set_positions (entry, pos, bound);
 	}
       else
       gtk_entry_set_positions (entry, tmp_pos, -1);
     }
-      
+
   return TRUE;
 }
 
@@ -1904,24 +1935,24 @@
   GdkBitmap *empty_bitmap;
   GdkCursor *cursor;
   GdkColor useless;
-  char invisible_cursor_bits[] = { 0x0 };	
-	
+  char invisible_cursor_bits[] = { 0x0 };
+
   useless.red = useless.green = useless.blue = 0;
   useless.pixel = 0;
-  
+
   empty_bitmap = gdk_bitmap_create_from_data (window,
 					      invisible_cursor_bits,
 					      1, 1);
-  
+
   cursor = gdk_cursor_new_from_pixmap (empty_bitmap,
 				       empty_bitmap,
 				       &useless,
 				       &useless, 0, 0);
-  
+
   gdk_window_set_cursor (window, cursor);
-  
+
   gdk_cursor_unref (cursor);
-  
+
   g_object_unref (empty_bitmap);
 }
 
@@ -1932,8 +1963,8 @@
     return;
 
   set_invisible_cursor (entry->text_area);
-  
-  entry->mouse_cursor_obscured = TRUE;  
+
+  entry->mouse_cursor_obscured = TRUE;
 }
 
 static gint
@@ -1955,13 +1986,13 @@
 	}
     }
 
-  if (event->keyval == GDK_Return || 
-      event->keyval == GDK_KP_Enter || 
-      event->keyval == GDK_ISO_Enter || 
+  if (event->keyval == GDK_Return ||
+      event->keyval == GDK_KP_Enter ||
+      event->keyval == GDK_ISO_Enter ||
       event->keyval == GDK_Escape)
     {
       GtkEntryCompletion *completion = gtk_entry_get_completion (entry);
-      
+
       if (completion && completion->priv->completion_timeout)
         {
           g_source_remove (completion->priv->completion_timeout);
@@ -2002,9 +2033,9 @@
 		    GdkEventFocus *event)
 {
   GtkEntry *entry = GTK_ENTRY (widget);
-  
+
   gtk_widget_queue_draw (widget);
-  
+
   if (entry->editable)
     {
       entry->need_im_reset = TRUE;
@@ -2027,7 +2058,7 @@
 {
   GtkEntry *entry = GTK_ENTRY (widget);
   GtkEntryCompletion *completion;
-  
+
   gtk_widget_queue_draw (widget);
 
   if (entry->editable)
@@ -2037,7 +2068,7 @@
     }
 
   gtk_entry_check_cursor_blink (entry);
-  
+
   g_signal_handlers_disconnect_by_func (gdk_keymap_get_for_display (gtk_widget_get_display (widget)),
                                         gtk_entry_keymap_direction_changed,
                                         entry);
@@ -2045,7 +2076,7 @@
   completion = gtk_entry_get_completion (entry);
   if (completion)
     _gtk_entry_completion_popdown (completion);
-  
+
   return FALSE;
 }
 
@@ -2054,26 +2085,26 @@
 {
   GtkEntry *entry = GTK_ENTRY (widget);
   gboolean select_on_focus;
-  
+
   GTK_WIDGET_CLASS (gtk_entry_parent_class)->grab_focus (widget);
 
   g_object_get (gtk_widget_get_settings (widget),
 		"gtk-entry-select-on-focus",
 		&select_on_focus,
 		NULL);
-  
+
   if (select_on_focus && entry->editable && !entry->in_click)
     gtk_editable_select_region (GTK_EDITABLE (widget), 0, -1);
 }
 
-static void 
+static void
 gtk_entry_direction_changed (GtkWidget        *widget,
 			     GtkTextDirection  previous_dir)
 {
   GtkEntry *entry = GTK_ENTRY (widget);
 
   gtk_entry_recompute (entry);
-      
+
   GTK_WIDGET_CLASS (gtk_entry_parent_class)->direction_changed (widget, previous_dir);
 }
 
@@ -2082,7 +2113,7 @@
 			 GtkStateType    previous_state)
 {
   GtkEntry *entry = GTK_ENTRY (widget);
-  
+
   if (GTK_WIDGET_REALIZED (widget))
     {
       gdk_window_set_background (widget->window, &widget->style->base[GTK_WIDGET_STATE (widget)]);
@@ -2092,9 +2123,9 @@
   if (!GTK_WIDGET_IS_SENSITIVE (widget))
     {
       /* Clear any selection */
-      gtk_editable_select_region (GTK_EDITABLE (entry), entry->current_pos, entry->current_pos);      
+      gtk_editable_select_region (GTK_EDITABLE (entry), entry->current_pos, entry->current_pos);
     }
-  
+
   gtk_widget_queue_draw (widget);
 }
 
@@ -2119,9 +2150,9 @@
 
   if (*position < 0 || *position > entry->text_length)
     *position = entry->text_length;
-  
+
   g_object_ref (editable);
-  
+
   if (new_text_length <= 63)
     text = buf;
   else
@@ -2154,7 +2185,7 @@
     start_pos = 0;
   if (start_pos > end_pos)
     start_pos = end_pos;
-  
+
   g_object_ref (editable);
 
   g_signal_emit_by_name (editable, "delete_text", start_pos, end_pos);
@@ -2162,14 +2193,14 @@
   g_object_unref (editable);
 }
 
-static gchar *    
+static gchar *
 gtk_entry_get_chars      (GtkEditable   *editable,
 			  gint           start_pos,
 			  gint           end_pos)
 {
   GtkEntry *entry = GTK_ENTRY (editable);
   gint start_index, end_index;
-  
+
   if (end_pos < 0)
     end_pos = entry->text_length;
 
@@ -2216,7 +2247,7 @@
     start = entry->text_length;
   if (end < 0)
     end = entry->text_length;
-  
+
   _gtk_entry_reset_im_context (entry);
 
   gtk_entry_set_positions (entry,
@@ -2239,7 +2270,7 @@
   return (entry->selection_bound != entry->current_pos);
 }
 
-static void 
+static void
 gtk_entry_style_set	(GtkWidget      *widget,
 			 GtkStyle       *previous_style)
 {
@@ -2384,10 +2415,10 @@
 
   /* NUL terminate for safety and convenience */
   entry->text[entry->n_bytes] = '\0';
-  
+
   if (entry->current_pos > *position)
     entry->current_pos += n_chars;
-  
+
   if (entry->selection_bound > *position)
     entry->selection_bound += n_chars;
 
@@ -2438,7 +2469,7 @@
     start_pos = 0;
   if (end_pos < 0 || end_pos > entry->text_length)
     end_pos = entry->text_length;
-  
+
   if (start_pos < end_pos)
     {
       gint start_index = g_utf8_offset_to_pointer (entry->text, start_pos) - entry->text;
@@ -2456,7 +2487,7 @@
        */
       if (!entry->visible)
 	trash_area (entry->text + entry->n_bytes + 1, end_index - start_index - 1);
-      
+
       current_pos = entry->current_pos;
       if (current_pos > start_pos)
 	current_pos -= MIN (current_pos, end_pos) - start_pos;
@@ -2470,7 +2501,7 @@
       /* We might have deleted the selection
        */
       gtk_entry_update_primary_selection (entry);
-      
+
       gtk_entry_recompute (entry);
 
       g_signal_emit_by_name (editable, "changed");
@@ -2490,13 +2521,13 @@
   GdkKeymap *keymap = gdk_keymap_get_for_display (gtk_widget_get_display (GTK_WIDGET (entry)));
   PangoDirection keymap_direction = gdk_keymap_get_direction (keymap);
   gboolean split_cursor;
-  
+
   PangoLayout *layout = gtk_entry_ensure_layout (entry, TRUE);
   const gchar *text = pango_layout_get_text (layout);
   gint index = g_utf8_offset_to_pointer (text, offset) - text;
-  
+
   PangoRectangle strong_pos, weak_pos;
-  
+
   g_object_get (gtk_widget_get_settings (GTK_WIDGET (entry)),
 		"gtk-split-cursor", &split_cursor,
 		NULL);
@@ -2533,7 +2564,7 @@
 
 	    if (count <= 0)
 	      new_pos = current_x < bound_x ? entry->current_pos : entry->selection_bound;
-	    else 
+	    else
 	      new_pos = current_x > bound_x ? entry->current_pos : entry->selection_bound;
 
 	    break;
@@ -2596,7 +2627,7 @@
     gtk_editable_select_region (GTK_EDITABLE (entry), entry->selection_bound, new_pos);
   else
     gtk_editable_set_position (GTK_EDITABLE (entry), new_pos);
-  
+
   gtk_entry_pend_cursor_blink (entry);
 }
 
@@ -2624,7 +2655,7 @@
   GtkEditable *editable = GTK_EDITABLE (entry);
   gint start_pos = entry->current_pos;
   gint end_pos = entry->current_pos;
-  
+
   _gtk_entry_reset_im_context (entry);
 
   if (!entry->editable)
@@ -2635,7 +2666,7 @@
       gtk_editable_delete_selection (editable);
       return;
     }
-  
+
   switch (type)
     {
     case GTK_DELETE_CHARS:
@@ -2655,7 +2686,7 @@
 	  start_pos = gtk_entry_move_forward_word (entry, start_pos, FALSE);
 	  start_pos = gtk_entry_move_backward_word (entry, start_pos, FALSE);
 	}
-	
+
       /* Fall through */
     case GTK_DELETE_WORD_ENDS:
       while (count < 0)
@@ -2679,13 +2710,13 @@
       break;
     case GTK_DELETE_DISPLAY_LINES:
     case GTK_DELETE_PARAGRAPHS:
-      gtk_editable_delete_text (editable, 0, -1);  
+      gtk_editable_delete_text (editable, 0, -1);
       break;
     case GTK_DELETE_WHITESPACE:
       gtk_entry_delete_whitespace (entry);
       break;
     }
-  
+
   gtk_entry_pend_cursor_blink (entry);
 }
 
@@ -2748,7 +2779,7 @@
 	{
           gtk_editable_delete_text (editable, prev_pos, entry->current_pos);
 	}
-      
+
       g_free (log_attrs);
     }
 
@@ -2833,7 +2864,7 @@
       if (GTK_IS_WINDOW (toplevel))
 	{
 	  window = GTK_WINDOW (toplevel);
-      
+
 	  if (window &&
 	      widget != window->default_widget &&
 	      !(widget == window->focus_widget &&
@@ -2862,7 +2893,7 @@
     gtk_entry_enter_text (entry, str);
 }
 
-static void 
+static void
 gtk_entry_preedit_changed_cb (GtkIMContext *context,
 			      GtkEntry     *entry)
 {
@@ -2870,7 +2901,7 @@
     {
       gchar *preedit_string;
       gint cursor_pos;
-      
+
       gtk_im_context_get_preedit_string (entry->im_context,
                                          &preedit_string, NULL,
                                          &cursor_pos);
@@ -2878,7 +2909,7 @@
       cursor_pos = CLAMP (cursor_pos, 0, g_utf8_strlen (preedit_string, -1));
       entry->preedit_cursor = cursor_pos;
       g_free (preedit_string);
-    
+
       gtk_entry_recompute (entry);
     }
 }
@@ -2950,7 +2981,7 @@
   gboolean changed = FALSE;
 
   g_object_freeze_notify (G_OBJECT (entry));
-  
+
   if (current_pos != -1 &&
       entry->current_pos != current_pos)
     {
@@ -2965,7 +2996,7 @@
     {
       entry->selection_bound = selection_bound;
       changed = TRUE;
-      
+
       g_object_notify (G_OBJECT (entry), "selection-bound");
     }
 
@@ -3024,12 +3055,12 @@
   entry = GTK_ENTRY (data);
 
   entry->recompute_idle = 0;
-  
+
   if (gtk_widget_has_screen (GTK_WIDGET (entry)))
     {
       gtk_entry_adjust_scroll (entry);
       gtk_entry_queue_draw (entry);
-      
+
       update_im_cursor_location (entry);
     }
 
@@ -3043,11 +3074,11 @@
 {
   gtk_entry_reset_layout (entry);
   gtk_entry_check_cursor_blink (entry);
-  
+
   if (!entry->recompute_idle)
     {
       entry->recompute_idle = g_idle_add_full (G_PRIORITY_HIGH_IDLE + 15, /* between resize and redraw */
-					       recompute_idle_func, entry, NULL); 
+					       recompute_idle_func, entry, NULL);
     }
 }
 
@@ -3059,9 +3090,9 @@
   gint i;
   gint char_len;
   gchar buf[7];
-  
+
   char_len = g_unichar_to_utf8 (ch, buf);
-  
+
   i = 0;
   while (i < count)
     {
@@ -3090,7 +3121,7 @@
   GtkWidget *widget = GTK_WIDGET (entry);
   PangoLayout *layout = gtk_widget_create_pango_layout (widget, NULL);
   PangoAttrList *tmp_attrs = pango_attr_list_new ();
-  
+
   gchar *preedit_string = NULL;
   gint preedit_length = 0;
   PangoAttrList *preedit_attrs = NULL;
@@ -3107,9 +3138,9 @@
   if (preedit_length)
     {
       GString *tmp_string = g_string_new (NULL);
-      
+
       gint cursor_index = g_utf8_offset_to_pointer (entry->text, entry->current_pos) - entry->text;
-      
+
       if (entry->visible)
         {
           g_string_prepend_len (tmp_string, entry->text, entry->n_bytes);
@@ -3129,9 +3160,9 @@
             invisible_char = entry->invisible_char;
           else
             invisible_char = ' '; /* just pick a char */
-          
+
           append_char (tmp_string, invisible_char, ch_len);
-          
+
           /* Fix cursor index to point to invisible char corresponding
            * to the preedit, fix preedit_length to be the length of
            * the invisible chars representing the preedit
@@ -3143,18 +3174,18 @@
             preedit_len_chars *
             g_unichar_to_utf8 (invisible_char, NULL);
         }
-      
+
       pango_layout_set_text (layout, tmp_string->str, tmp_string->len);
-      
+
       pango_attr_list_splice (tmp_attrs, preedit_attrs,
 			      cursor_index, preedit_length);
-      
+
       g_string_free (tmp_string, TRUE);
     }
   else
     {
       PangoDirection pango_dir;
-      
+
       if (entry->visible)
 	pango_dir = pango_find_base_dir (entry->text, entry->n_bytes);
 
@@ -3187,7 +3218,7 @@
       pango_layout_set_alignment (layout, pango_dir);
 
       entry->resolved_dir = pango_dir;
-      
+
       if (entry->visible)
         {
           pango_layout_set_text (layout, entry->text, entry->n_bytes);
@@ -3255,14 +3286,14 @@
           g_string_free (str, TRUE);
         }
     }
-      
+
   pango_layout_set_attributes (layout, tmp_attrs);
 
   if (preedit_string)
     g_free (preedit_string);
   if (preedit_attrs)
     pango_attr_list_unref (preedit_attrs);
-      
+
   pango_attr_list_unref (tmp_attrs);
 
   return layout;
@@ -3281,7 +3312,7 @@
       entry->cached_layout = gtk_entry_create_layout (entry, include_preedit);
       entry->cache_includes_preedit = include_preedit;
     }
-  
+
   return entry->cached_layout;
 }
 
@@ -3296,7 +3327,7 @@
   GtkBorder inner_border;
   gint y_pos;
   PangoLayoutLine *line;
-  
+
   layout = gtk_entry_ensure_layout (entry, TRUE);
 
   get_text_area_size (entry, NULL, NULL, &area_width, &area_height);
@@ -3306,11 +3337,11 @@
 
   line = pango_layout_get_lines (layout)->data;
   pango_layout_line_get_extents (line, NULL, &logical_rect);
-  
+
   /* Align primarily for locale's ascent/descent */
-  y_pos = ((area_height - entry->ascent - entry->descent) / 2 + 
+  y_pos = ((area_height - entry->ascent - entry->descent) / 2 +
            entry->ascent + logical_rect.y);
-  
+
   /* Now see if we need to adjust to fit in actual drawn string */
   if (logical_rect.height > area_height)
     y_pos = (area_height - logical_rect.height) / 2;
@@ -3318,7 +3349,7 @@
     y_pos = 0;
   else if (y_pos + logical_rect.height > area_height)
     y_pos = area_height - logical_rect.height;
-  
+
   y_pos = inner_border.top + y_pos / PANGO_SCALE;
 
   if (x)
@@ -3332,19 +3363,19 @@
 gtk_entry_draw_text (GtkEntry *entry)
 {
   GtkWidget *widget;
-  
+
   if (!entry->visible && entry->invisible_char == 0)
     return;
-  
+
   if (GTK_WIDGET_DRAWABLE (entry))
     {
       PangoLayout *layout = gtk_entry_ensure_layout (entry, TRUE);
       cairo_t *cr;
       gint x, y;
       gint start_pos, end_pos;
-      
+
       widget = GTK_WIDGET (entry);
-      
+
       get_layout_position (entry, &x, &y);
 
       cr = gdk_cairo_create (entry->text_area);
@@ -3385,14 +3416,14 @@
 			     logical_rect.height);
 
 	  cairo_clip (cr);
-	  
+
 	  gdk_cairo_set_source_color (cr, selection_color);
 	  cairo_paint (cr);
 
 	  cairo_move_to (cr, x, y);
 	  gdk_cairo_set_source_color (cr, text_color);
 	  pango_cairo_show_layout (cr, layout);
-	  
+
 	  g_free (ranges);
 	}
 
@@ -3426,7 +3457,7 @@
 {
   GdkKeymap *keymap = gdk_keymap_get_for_display (gtk_widget_get_display (GTK_WIDGET (entry)));
   PangoDirection keymap_direction = gdk_keymap_get_direction (keymap);
-  
+
   if (GTK_WIDGET_DRAWABLE (entry))
     {
       GtkWidget *widget = GTK_WIDGET (entry);
@@ -3447,7 +3478,7 @@
       xoffset = inner_border.left - entry->scroll_offset;
 
       gdk_drawable_get_size (entry->text_area, NULL, &text_area_height);
-      
+
       gtk_entry_get_cursor_locations (entry, type, &strong_x, &weak_x);
 
       g_object_get (gtk_widget_get_settings (widget),
@@ -3455,7 +3486,7 @@
 		    NULL);
 
       dir1 = entry->resolved_dir;
-      
+
       if (split_cursor)
 	{
 	  x1 = strong_x;
@@ -3482,7 +3513,7 @@
       draw_insertion_cursor (entry,
 			     &cursor_location, TRUE, dir1,
 			     dir2 != PANGO_DIRECTION_NEUTRAL);
-      
+
       if (dir2 != PANGO_DIRECTION_NEUTRAL)
 	{
 	  cursor_location.x = xoffset + x2;
@@ -3521,11 +3552,11 @@
   gboolean trailing;
   const gchar *text;
   gint cursor_index;
-  
+
   layout = gtk_entry_ensure_layout (entry, TRUE);
   text = pango_layout_get_text (layout);
   cursor_index = g_utf8_offset_to_pointer (text, entry->current_pos) - text;
-  
+
   line = pango_layout_get_lines (layout)->data;
   pango_layout_line_x_to_index (line, x * PANGO_SCALE, &index, &trailing);
 
@@ -3556,7 +3587,7 @@
     {
       if (strong_x)
 	*strong_x = 0;
-      
+
       if (weak_x)
 	*weak_x = 0;
     }
@@ -3566,7 +3597,7 @@
       const gchar *text = pango_layout_get_text (layout);
       PangoRectangle strong_pos, weak_pos;
       gint index;
-  
+
       if (type == CURSOR_STANDARD)
 	{
 	  index = g_utf8_offset_to_pointer (text, entry->current_pos + entry->preedit_cursor) - text;
@@ -3586,12 +3617,12 @@
 		}
 	    }
 	}
-      
+
       pango_layout_get_cursor_pos (layout, index, &strong_pos, &weak_pos);
-      
+
       if (strong_x)
 	*strong_x = strong_pos.x / PANGO_SCALE;
-      
+
       if (weak_x)
 	*weak_x = weak_pos.x / PANGO_SCALE;
     }
@@ -3663,7 +3694,7 @@
    */
 
   gtk_entry_get_cursor_locations (entry, CURSOR_STANDARD, &strong_x, &weak_x);
-  
+
   strong_xoffset = strong_x - entry->scroll_offset;
 
   if (strong_xoffset < 0)
@@ -3702,7 +3733,7 @@
   const gchar *text;
 
   text = pango_layout_get_text (layout);
-  
+
   index = g_utf8_offset_to_pointer (text, start) - text;
 
   while (count != 0)
@@ -3724,7 +3755,7 @@
 
 	  strong = keymap_direction == entry->resolved_dir;
 	}
-      
+
       if (count > 0)
 	{
 	  pango_layout_move_cursor_visually (layout, strong, index, 0, 1, &new_index, &new_trailing);
@@ -3740,11 +3771,11 @@
         index = 0;
       else if (new_index != G_MAXINT)
         index = new_index;
-      
+
       while (new_trailing--)
 	index = g_utf8_next_char (text + index) - text;
     }
-  
+
   return g_utf8_pointer_to_offset (text, text + index);
 }
 
@@ -3773,7 +3804,7 @@
 	  do
 	    new_pos++;
 	  while (new_pos < entry->text_length && !log_attrs[new_pos].is_cursor_position);
-	  
+
 	  count--;
 	}
       while (count < 0 && new_pos > 0)
@@ -3781,10 +3812,10 @@
 	  do
 	    new_pos--;
 	  while (new_pos > 0 && !log_attrs[new_pos].is_cursor_position);
-	  
+
 	  count++;
 	}
-      
+
       g_free (log_attrs);
     }
 
@@ -3810,7 +3841,7 @@
       gint n_attrs;
 
       pango_layout_get_log_attrs (layout, &log_attrs, &n_attrs);
-      
+
       /* Find the next word boundary */
       new_pos++;
       while (new_pos < n_attrs - 1 && !(log_attrs[new_pos].is_word_end ||
@@ -3847,7 +3878,7 @@
       new_pos = start - 1;
 
       /* Find the previous word boundary */
-      while (new_pos > 0 && !(log_attrs[new_pos].is_word_start || 
+      while (new_pos > 0 && !(log_attrs[new_pos].is_word_start ||
                               (log_attrs[new_pos].is_word_end && allow_whitespace)))
 	new_pos--;
 
@@ -3868,7 +3899,7 @@
   pango_layout_get_log_attrs (layout, &log_attrs, &n_attrs);
 
   start = end = entry->current_pos;
-  
+
   while (start > 0 && log_attrs[start-1].is_white)
     start--;
 
@@ -3901,14 +3932,14 @@
  * Like gtk_editable_get_chars, but handle not-visible entries
  * correctly.
  */
-static char *    
+static char *
 gtk_entry_get_public_chars (GtkEntry *entry,
 			    gint      start,
 			    gint      end)
 {
   if (end < 0)
     end = entry->text_length;
-  
+
   if (entry->visible)
     return gtk_editable_get_chars (GTK_EDITABLE (entry), start, end);
   else if (!entry->invisible_char)
@@ -3941,7 +3972,7 @@
   GtkEntry *entry = GTK_ENTRY (data);
   GtkEditable *editable = GTK_EDITABLE (entry);
   GtkEntryPrivate *priv = GTK_ENTRY_GET_PRIVATE (entry);
-      
+
   if (entry->button == 2)
     {
       gint pos, start, end;
@@ -3950,7 +3981,7 @@
       if (!((start <= pos && pos <= end) || (end <= pos && pos <= start)))
 	gtk_editable_select_region (editable, pos, pos);
     }
-      
+
   if (text)
     {
       gint pos, start, end;
@@ -4007,7 +4038,7 @@
 {
   GtkEntry *entry = GTK_ENTRY (data);
   gint start, end;
-  
+
   if (gtk_editable_get_selection_bounds (GTK_EDITABLE (entry), &start, &end))
     {
       gchar *str = gtk_entry_get_public_chars (entry, start, end);
@@ -4031,13 +4062,13 @@
   static GtkTargetEntry targets[] = {
     { "UTF8_STRING", 0, 0 },
     { "STRING", 0, 0 },
-    { "TEXT",   0, 0 }, 
+    { "TEXT",   0, 0 },
     { "COMPOUND_TEXT", 0, 0 },
-    { "text/plain;charset=utf-8",   0, 0 }, 
+    { "text/plain;charset=utf-8",   0, 0 },
     { NULL,   0, 0 },
     { "text/plain", 0, 0 }
   };
-  
+
   GtkClipboard *clipboard;
   gint start, end;
 
@@ -4053,7 +4084,7 @@
     return;
 
   clipboard = gtk_widget_get_clipboard (GTK_WIDGET (entry), GDK_SELECTION_PRIMARY);
-  
+
   if (gtk_editable_get_selection_bounds (GTK_EDITABLE (entry), &start, &end))
     {
       if (!gtk_clipboard_set_with_owner (clipboard, targets, G_N_ELEMENTS (targets),
@@ -4090,14 +4121,14 @@
  *   be clamped to the range 0-65536.
  *
  * Creates a new #GtkEntry widget with the given maximum length.
- * 
+ *
  * Note: the existence of this function is inconsistent
  * with the rest of the GTK+ API. The normal setup would
  * be to just require the user to make an extra call
  * to gtk_entry_set_max_length() instead. It is not
  * expected that this function will be removed, but
  * it would be better practice not to use it.
- * 
+ *
  * Return value: a new #GtkEntry.
  **/
 GtkWidget*
@@ -4196,7 +4227,7 @@
         entry->im_context = gtk_im_multicontext_new ();
       else
         entry->im_context = gtk_im_context_simple_new ();
-      
+
       g_signal_connect (entry->im_context, "commit",
 			G_CALLBACK (gtk_entry_commit_cb), entry);
       g_signal_connect (entry->im_context, "preedit_changed",
@@ -4207,7 +4238,7 @@
 			G_CALLBACK (gtk_entry_delete_surrounding_cb), entry);
 
       if (GTK_WIDGET_HAS_FOCUS (entry) && visible)
-	gtk_im_context_focus_in (entry->im_context); 
+	gtk_im_context_focus_in (entry->im_context);
 
       entry->visible = visible;
 
@@ -4237,7 +4268,7 @@
  * gtk_entry_set_invisible_char:
  * @entry: a #GtkEntry
  * @ch: a Unicode character
- * 
+ *
  * Sets the character to use in place of the actual text when
  * gtk_entry_set_visibility() has been called to set text visibility
  * to %FALSE. i.e. this is the character used in "password mode" to
@@ -4245,7 +4276,7 @@
  * invisible char is an asterisk ('*').  If you set the invisible char
  * to 0, then the user will get no feedback at all; there will be
  * no text on the screen as they type.
- * 
+ *
  **/
 void
 gtk_entry_set_invisible_char (GtkEntry *entry,
@@ -4258,7 +4289,7 @@
 
   entry->invisible_char = ch;
   g_object_notify (G_OBJECT (entry), "invisible-char");
-  gtk_entry_recompute (entry);  
+  gtk_entry_recompute (entry);
 }
 
 /**
@@ -4269,7 +4300,7 @@
  * for entries with visisbility set to false. See gtk_entry_set_invisible_char().
  *
  * Return value: the current invisible char, or 0, if the entry does not
- *               show invisible text at all. 
+ *               show invisible text at all.
  **/
 gunichar
 gtk_entry_get_invisible_char (GtkEntry *entry)
@@ -4308,7 +4339,7 @@
   return entry->text;
 }
 
-void       
+void
 gtk_entry_select_region  (GtkEntry       *entry,
 			  gint            start,
 			  gint            end)
@@ -4322,7 +4353,7 @@
  * @max: the maximum length of the entry, or 0 for no maximum.
  *   (other than the maximum length of entries.) The value passed in will
  *   be clamped to the range 0-65536.
- * 
+ *
  * Sets the maximum allowed length of the contents of the widget. If
  * the current contents are longer than the given length, then they
  * will be truncated to fit.
@@ -4337,7 +4368,7 @@
 
   if (max > 0 && entry->text_length > max)
     gtk_editable_delete_text (GTK_EDITABLE (entry), max, -1);
-  
+
   entry->text_max_length = max;
   g_object_notify (G_OBJECT (entry), "max-length");
 }
@@ -4373,7 +4404,7 @@
  * (For experts: if @setting is %TRUE, the entry calls
  * gtk_window_activate_default() on the window containing the entry, in
  * the default handler for the "activate" signal.)
- * 
+ *
  **/
 void
 gtk_entry_set_activates_default (GtkEntry *entry,
@@ -4392,9 +4423,9 @@
 /**
  * gtk_entry_get_activates_default:
  * @entry: a #GtkEntry
- * 
+ *
  * Retrieves the value set by gtk_entry_set_activates_default().
- * 
+ *
  * Return value: %TRUE if the entry will activate the default widget
  **/
 gboolean
@@ -4415,7 +4446,7 @@
  * <emphasis>request</emphasis>, the size can still be affected by
  * how you pack the widget into containers. If @n_chars is -1, the
  * size reverts to the default entry size.
- * 
+ *
  **/
 void
 gtk_entry_set_width_chars (GtkEntry *entry,
@@ -4434,9 +4465,9 @@
 /**
  * gtk_entry_get_width_chars:
  * @entry: a #GtkEntry
- * 
+ *
  * Gets the value set by gtk_entry_set_width_chars().
- * 
+ *
  * Return value: number of chars to request space for, or negative if unset
  **/
 gint
@@ -4451,7 +4482,7 @@
  * gtk_entry_set_has_frame:
  * @entry: a #GtkEntry
  * @setting: new value
- * 
+ *
  * Sets whether the entry has a beveled frame around it.
  **/
 void
@@ -4473,9 +4504,9 @@
 /**
  * gtk_entry_get_has_frame:
  * @entry: a #GtkEntry
- * 
+ *
  * Gets the value set by gtk_entry_set_has_frame().
- * 
+ *
  * Return value: whether the entry has a beveled frame
  **/
 gboolean
@@ -4542,25 +4573,25 @@
 /**
  * gtk_entry_get_layout:
  * @entry: a #GtkEntry
- * 
+ *
  * Gets the #PangoLayout used to display the entry.
  * The layout is useful to e.g. convert text positions to
  * pixel positions, in combination with gtk_entry_get_layout_offsets().
- * The returned layout is owned by the entry and must not be 
+ * The returned layout is owned by the entry and must not be
  * modified or freed by the caller.
  *
  * Keep in mind that the layout text may contain a preedit string, so
  * gtk_entry_layout_index_to_text_index() and
  * gtk_entry_text_index_to_layout_index() are needed to convert byte
  * indices in the layout to byte indices in the entry contents.
- * 
+ *
  * Return value: the #PangoLayout for this entry
  **/
 PangoLayout*
 gtk_entry_get_layout (GtkEntry *entry)
 {
   PangoLayout *layout;
-  
+
   g_return_val_if_fail (GTK_IS_ENTRY (entry), NULL);
 
   layout = gtk_entry_ensure_layout (entry, TRUE);
@@ -4573,12 +4604,12 @@
  * gtk_entry_layout_index_to_text_index:
  * @entry: a #GtkEntry
  * @layout_index: byte index into the entry layout text
- * 
+ *
  * Converts from a position in the entry contents (returned
  * by gtk_entry_get_text()) to a position in the
  * entry's #PangoLayout (returned by gtk_entry_get_layout(),
  * with text retrieved via pango_layout_get_text()).
- * 
+ *
  * Return value: byte index into the entry contents
  **/
 gint
@@ -4588,13 +4619,13 @@
   PangoLayout *layout;
   const gchar *text;
   gint cursor_index;
-  
+
   g_return_val_if_fail (GTK_IS_ENTRY (entry), 0);
 
   layout = gtk_entry_ensure_layout (entry, TRUE);
   text = pango_layout_get_text (layout);
   cursor_index = g_utf8_offset_to_pointer (text, entry->current_pos) - text;
-  
+
   if (layout_index >= cursor_index && entry->preedit_length)
     {
       if (layout_index >= cursor_index + entry->preedit_length)
@@ -4610,11 +4641,11 @@
  * gtk_entry_text_index_to_layout_index:
  * @entry: a #GtkEntry
  * @text_index: byte index into the entry contents
- * 
+ *
  * Converts from a position in the entry's #PangoLayout (returned by
  * gtk_entry_get_layout()) to a position in the entry contents
  * (returned by gtk_entry_get_text()).
- * 
+ *
  * Return value: byte index into the entry layout text
  **/
 gint
@@ -4629,7 +4660,7 @@
   layout = gtk_entry_ensure_layout (entry, TRUE);
   text = pango_layout_get_text (layout);
   cursor_index = g_utf8_offset_to_pointer (text, entry->current_pos) - text;
-  
+
   if (text_index > cursor_index)
     text_index += entry->preedit_length;
 
@@ -4651,7 +4682,7 @@
  * Also useful to convert mouse events into coordinates inside the
  * #PangoLayout, e.g. to take some action if some part of the entry text
  * is clicked.
- * 
+ *
  * Note that as the user scrolls around in the entry the offsets will
  * change; you'll need to connect to the "notify::scroll-offset"
  * signal to track this. Remember when using the #PangoLayout
@@ -4662,7 +4693,7 @@
  * gtk_entry_layout_index_to_text_index() and
  * gtk_entry_text_index_to_layout_index() are needed to convert byte
  * indices in the layout to byte indices in the entry contents.
- * 
+ *
  **/
 void
 gtk_entry_get_layout_offsets (GtkEntry *entry,
@@ -4670,7 +4701,7 @@
                               gint     *y)
 {
   gint text_area_x, text_area_y;
-  
+
   g_return_if_fail (GTK_IS_ENTRY (entry));
 
   /* this gets coords relative to text area */
@@ -4678,7 +4709,7 @@
 
   /* convert to widget coords */
   get_text_area_size (entry, &text_area_x, &text_area_y, NULL, NULL);
-  
+
   if (x)
     *x += text_area_x;
 
@@ -4692,7 +4723,7 @@
  * @entry: a #GtkEntry
  * @xalign: The horizontal alignment, from 0 (left) to 1 (right).
  *          Reversed for RTL layouts
- * 
+ *
  * Sets the alignment for the contents of the entry. This controls
  * the horizontal positioning of the contents when the displayed
  * text is shorter than the width of the entry.
@@ -4703,7 +4734,7 @@
 gtk_entry_set_alignment (GtkEntry *entry, gfloat xalign)
 {
   GtkEntryPrivate *priv;
-  
+
   g_return_if_fail (GTK_IS_ENTRY (entry));
 
   priv = GTK_ENTRY_GET_PRIVATE (entry);
@@ -4726,9 +4757,9 @@
 /**
  * gtk_entry_get_alignment:
  * @entry: a #GtkEntry
- * 
+ *
  * Gets the value set by gtk_entry_set_alignment().
- * 
+ *
  * Return value: the alignment
  *
  * Since: 2.4
@@ -4737,7 +4768,7 @@
 gtk_entry_get_alignment (GtkEntry *entry)
 {
   GtkEntryPrivate *priv;
-  
+
   g_return_val_if_fail (GTK_IS_ENTRY (entry), 0.0);
 
   priv = GTK_ENTRY_GET_PRIVATE (entry);
@@ -4778,11 +4809,11 @@
 		    G_CALLBACK (activate_cb), entry);
 
   gtk_widget_set_sensitive (menuitem, sensitive);
-  
+
   gtk_widget_show (menuitem);
   gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
 }
-	
+
 static void
 popup_menu_detach (GtkWidget *attach_widget,
 		   GtkMenu   *menu)
@@ -4804,7 +4835,7 @@
   GdkRectangle monitor;
   GtkBorder inner_border;
   gint monitor_num, strong_x, height;
- 
+
   g_return_if_fail (GTK_WIDGET_REALIZED (entry));
 
   gdk_window_get_origin (entry->text_area, x, y);
@@ -4861,7 +4892,7 @@
 {
   PopupInfo *info = user_data;
   GtkEntry *entry = info->entry;
-  
+
   if (GTK_WIDGET_REALIZED (entry))
     {
       gboolean clipboard_contains_text;
@@ -4869,24 +4900,24 @@
       GtkWidget *submenu;
       gboolean show_input_method_menu;
       gboolean show_unicode_menu;
-      
+
         clipboard_contains_text = gtk_selection_data_targets_include_text (data);
       if (entry->popup_menu)
 	gtk_widget_destroy (entry->popup_menu);
-      
+
       entry->popup_menu = gtk_menu_new ();
-      
+
       gtk_menu_attach_to_widget (GTK_MENU (entry->popup_menu),
 				 GTK_WIDGET (entry),
 				 popup_menu_detach);
-      
+
       append_action_signal (entry, entry->popup_menu, GTK_STOCK_CUT, "cut_clipboard",
 			    entry->editable && entry->current_pos != entry->selection_bound);
       append_action_signal (entry, entry->popup_menu, GTK_STOCK_COPY, "copy_clipboard",
 			    entry->current_pos != entry->selection_bound);
       append_action_signal (entry, entry->popup_menu, GTK_STOCK_PASTE, "paste_clipboard",
 			    entry->editable && clipboard_contains_text);
-      
+
       menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_DELETE, NULL);
       gtk_widget_set_sensitive (menuitem, entry->editable && entry->current_pos != entry->selection_bound);
       g_signal_connect_swapped (menuitem, "activate",
@@ -4897,13 +4928,13 @@
       menuitem = gtk_separator_menu_item_new ();
       gtk_widget_show (menuitem);
       gtk_menu_shell_append (GTK_MENU_SHELL (entry->popup_menu), menuitem);
-      
+
       menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_SELECT_ALL, NULL);
       g_signal_connect_swapped (menuitem, "activate",
 			        G_CALLBACK (gtk_entry_select_all), entry);
       gtk_widget_show (menuitem);
       gtk_menu_shell_append (GTK_MENU_SHELL (entry->popup_menu), menuitem);
-      
+
       g_object_get (gtk_widget_get_settings (GTK_WIDGET (entry)),
                     "gtk-show-input-method-menu", &show_input_method_menu,
                     "gtk-show-unicode-menu", &show_unicode_menu,
@@ -4918,41 +4949,41 @@
           gtk_widget_show (menuitem);
           gtk_menu_shell_append (GTK_MENU_SHELL (entry->popup_menu), menuitem);
         }
-      
+
       if (show_input_method_menu)
         {
           menuitem = gtk_menu_item_new_with_mnemonic (_("Input _Methods"));
-          gtk_widget_set_sensitive (menuitem, entry->editable);      
+          gtk_widget_set_sensitive (menuitem, entry->editable);
           gtk_widget_show (menuitem);
           submenu = gtk_menu_new ();
           gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), submenu);
-          
+
           gtk_menu_shell_append (GTK_MENU_SHELL (entry->popup_menu), menuitem);
-      
+
           gtk_im_multicontext_append_menuitems (GTK_IM_MULTICONTEXT (entry->im_context),
                                                 GTK_MENU_SHELL (submenu));
         }
-      
+
       if (show_unicode_menu)
         {
           menuitem = gtk_menu_item_new_with_mnemonic (_("_Insert Unicode Control Character"));
-          gtk_widget_set_sensitive (menuitem, entry->editable);      
+          gtk_widget_set_sensitive (menuitem, entry->editable);
           gtk_widget_show (menuitem);
-          
+
           submenu = gtk_menu_new ();
           gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), submenu);
-          gtk_menu_shell_append (GTK_MENU_SHELL (entry->popup_menu), menuitem);      
-          
+          gtk_menu_shell_append (GTK_MENU_SHELL (entry->popup_menu), menuitem);
+
           _gtk_text_util_append_special_char_menuitems (GTK_MENU_SHELL (submenu),
                                                         unichar_chosen_func,
                                                         entry);
         }
-      
+
       g_signal_emit (entry,
 		     signals[POPULATE_POPUP],
 		     0,
 		     entry->popup_menu);
-  
+
 
       if (info->button)
 	gtk_menu_popup (GTK_MENU (entry->popup_menu), NULL, NULL,
@@ -4970,7 +5001,7 @@
   g_object_unref (entry);
   g_free (info);
 }
-			
+
 static void
 gtk_entry_do_popup (GtkEntry       *entry,
                     GdkEventButton *event)
@@ -4982,7 +5013,7 @@
    * we get them, then we actually pop up the menu.
    */
   info->entry = g_object_ref (entry);
-  
+
   if (event)
     {
       info->button = event->button;
@@ -5027,7 +5058,7 @@
 {
   GtkEntry *entry = GTK_ENTRY (widget);
   GdkAtom target = GDK_NONE;
-  
+
   if (entry->editable)
     target = gtk_drag_dest_find_target (widget, context, NULL);
 
@@ -5035,7 +5066,7 @@
     gtk_drag_get_data (widget, context, target, time);
   else
     gtk_drag_finish (context, FALSE, FALSE, time);
-  
+
   return TRUE;
 }
 
@@ -5051,10 +5082,10 @@
   GdkDragAction suggested_action;
   gint new_position, old_position;
   gint sel1, sel2;
-  
+
   x -= widget->style->xthickness;
   y -= widget->style->ythickness;
-  
+
   old_position = entry->dnd_position;
   new_position = gtk_entry_find_position (entry, x + entry->scroll_offset);
 
@@ -5075,14 +5106,14 @@
 	      if ((context->actions & GDK_ACTION_MOVE) != 0)
 	        suggested_action = GDK_ACTION_MOVE;
 	    }
-              
+
           entry->dnd_position = new_position;
         }
       else
         {
           if (source_widget == widget)
 	    suggested_action = 0;	/* Can't drop in selection where drag started */
-          
+
           entry->dnd_position = -1;
         }
     }
@@ -5092,9 +5123,9 @@
       suggested_action = 0;
       entry->dnd_position = -1;
     }
-  
+
   gdk_drag_status (context, suggested_action, time);
-  
+
   if (entry->dnd_position != old_position)
     gtk_widget_queue_draw (widget);
 
@@ -5141,7 +5172,7 @@
 	  gtk_editable_delete_text (editable, sel1, sel2);
 	  gtk_editable_insert_text (editable, str, length, &sel1);
 	}
-      
+
       gtk_drag_finish (context, TRUE, context->action == GDK_ACTION_MOVE, time);
     }
   else
@@ -5163,13 +5194,13 @@
   gint sel_start, sel_end;
 
   GtkEditable *editable = GTK_EDITABLE (widget);
-  
+
   if (gtk_editable_get_selection_bounds (editable, &sel_start, &sel_end))
     {
       gchar *str = gtk_entry_get_public_chars (GTK_ENTRY (widget), sel_start, sel_end);
 
       gtk_selection_data_set_text (selection_data, str, -1);
-      
+
       g_free (str);
     }
 
@@ -5182,7 +5213,7 @@
   gint sel_start, sel_end;
 
   GtkEditable *editable = GTK_EDITABLE (widget);
-  
+
   if (GTK_ENTRY (widget)->editable &&
       gtk_editable_get_selection_bounds (editable, &sel_start, &sel_end))
     gtk_editable_delete_text (editable, sel_start, sel_end);
@@ -5269,32 +5300,32 @@
 blink_cb (gpointer data)
 {
   GtkEntry *entry;
-  GtkEntryPrivate *priv; 
+  GtkEntryPrivate *priv;
   gint blink_timeout;
 
   GDK_THREADS_ENTER ();
 
   entry = GTK_ENTRY (data);
   priv = GTK_ENTRY_GET_PRIVATE (entry);
- 
+
   if (!GTK_WIDGET_HAS_FOCUS (entry))
     {
       g_warning ("GtkEntry - did not receive focus-out-event. If you\n"
 		 "connect a handler to this signal, it must return\n"
 		 "FALSE so the entry gets the event as well");
     }
-  
+
   g_assert (GTK_WIDGET_HAS_FOCUS (entry));
   g_assert (entry->selection_bound == entry->current_pos);
-  
+
   blink_timeout = get_cursor_blink_timeout (entry);
-  if (priv->blink_time > 1000 * blink_timeout && 
-      blink_timeout < G_MAXINT/1000) 
+  if (priv->blink_time > 1000 * blink_timeout &&
+      blink_timeout < G_MAXINT/1000)
     {
       /* we've blinked enough without the user doing anything, stop blinking */
       show_cursor (entry);
       entry->blink_timeout = 0;
-    } 
+    }
   else if (entry->cursor_visible)
     {
       hide_cursor (entry);
@@ -5320,8 +5351,8 @@
 static void
 gtk_entry_check_cursor_blink (GtkEntry *entry)
 {
-  GtkEntryPrivate *priv; 
-  
+  GtkEntryPrivate *priv;
+
   priv = GTK_ENTRY_GET_PRIVATE (entry);
 
   if (cursor_blinks (entry))
@@ -5336,15 +5367,15 @@
     }
   else
     {
-      if (entry->blink_timeout)  
-	{ 
+      if (entry->blink_timeout)
+	{
 	  g_source_remove (entry->blink_timeout);
 	  entry->blink_timeout = 0;
 	}
-      
+
       entry->cursor_visible = TRUE;
     }
-  
+
 }
 
 static void
@@ -5354,7 +5385,7 @@
     {
       if (entry->blink_timeout != 0)
 	g_source_remove (entry->blink_timeout);
-      
+
       entry->blink_timeout = g_timeout_add (get_cursor_time (entry) * CURSOR_PEND_MULTIPLIER / CURSOR_DIVIDER,
 					    blink_cb,
 					    entry);
@@ -5365,10 +5396,10 @@
 static void
 gtk_entry_reset_blink_time (GtkEntry *entry)
 {
-  GtkEntryPrivate *priv; 
-  
+  GtkEntryPrivate *priv;
+
   priv = GTK_ENTRY_GET_PRIVATE (entry);
-  
+
   priv->blink_time = 0;
 }
 
@@ -5405,13 +5436,13 @@
 
       g_object_get (completion, "popup-single-match", &popup_single, NULL);
       if ((matches > (popup_single ? 0: 1)) || actions > 0)
-	{ 
+	{
 	  if (GTK_WIDGET_VISIBLE (completion->priv->popup_window))
 	    _gtk_entry_completion_resize_popup (completion);
           else
 	    _gtk_entry_completion_popup (completion);
 	}
-      else 
+      else
 	_gtk_entry_completion_popdown (completion);
     }
   else if (GTK_WIDGET_VISIBLE (completion->priv->popup_window))
@@ -5461,7 +5492,7 @@
   if (keyval_is_cursor_move (event->keyval))
     {
       GtkTreePath *path = NULL;
-      
+
       if (event->keyval == GDK_Up || event->keyval == GDK_KP_Up)
         {
 	  if (completion->priv->current_selected < 0)
@@ -5482,13 +5513,13 @@
 	    completion->priv->current_selected = matches + actions - 1;
 	  else if (completion->priv->current_selected == 0)
 	    completion->priv->current_selected = -1;
-	  else if (completion->priv->current_selected < matches) 
+	  else if (completion->priv->current_selected < matches)
 	    {
 	      completion->priv->current_selected -= 14;
 	      if (completion->priv->current_selected < 0)
 		completion->priv->current_selected = 0;
 	    }
-	  else 
+	  else
 	    {
 	      completion->priv->current_selected -= 14;
 	      if (completion->priv->current_selected < matches - 1)
@@ -5543,21 +5574,21 @@
 
       return TRUE;
     }
-  else if (event->keyval == GDK_Escape) 
+  else if (event->keyval == GDK_Escape)
     {
       _gtk_entry_completion_popdown (completion);
 
       return TRUE;
     }
-  else if (event->keyval == GDK_Tab || 
+  else if (event->keyval == GDK_Tab ||
 	   event->keyval == GDK_KP_Tab ||
-	   event->keyval == GDK_ISO_Left_Tab) 
+	   event->keyval == GDK_ISO_Left_Tab)
     {
-      GtkDirectionType dir = event->keyval == GDK_ISO_Left_Tab ? 
+      GtkDirectionType dir = event->keyval == GDK_ISO_Left_Tab ?
 	GTK_DIR_TAB_BACKWARD : GTK_DIR_TAB_FORWARD;
 
       _gtk_entry_completion_popdown (completion);
-      
+
       gtk_widget_child_focus (gtk_widget_get_toplevel (widget), dir);
 
       return TRUE;
@@ -5653,7 +5684,7 @@
 check_completion_callback (GtkEntryCompletion *completion)
 {
   completion->priv->check_completion_idle = NULL;
-  
+
   gtk_entry_completion_complete (completion);
   gtk_entry_completion_insert_prefix (completion);
 
@@ -5668,7 +5699,7 @@
       pspec->name == I_("selection-bound"))
     {
       GtkEntryCompletion *completion = gtk_entry_get_completion (entry);
-      
+
       completion->priv->has_completion = FALSE;
     }
 }
@@ -5723,21 +5754,21 @@
 disconnect_completion_signals (GtkEntry           *entry,
 			       GtkEntryCompletion *completion)
 {
-  g_signal_handlers_disconnect_by_func (completion, 
+  g_signal_handlers_disconnect_by_func (completion,
 				       G_CALLBACK (completion_changed), entry);
   if (completion->priv->changed_id > 0 &&
       g_signal_handler_is_connected (entry, completion->priv->changed_id))
     g_signal_handler_disconnect (entry, completion->priv->changed_id);
-  g_signal_handlers_disconnect_by_func (entry, 
+  g_signal_handlers_disconnect_by_func (entry,
 					G_CALLBACK (gtk_entry_completion_key_press), completion);
   if (completion->priv->insert_text_id > 0 &&
       g_signal_handler_is_connected (entry, completion->priv->insert_text_id))
     g_signal_handler_disconnect (entry, completion->priv->insert_text_id);
-  g_signal_handlers_disconnect_by_func (entry, 
+  g_signal_handlers_disconnect_by_func (entry,
 					G_CALLBACK (completion_insert_text_callback), completion);
-  g_signal_handlers_disconnect_by_func (entry, 
+  g_signal_handlers_disconnect_by_func (entry,
 					G_CALLBACK (clear_completion_callback), completion);
-  g_signal_handlers_disconnect_by_func (entry, 
+  g_signal_handlers_disconnect_by_func (entry,
 					G_CALLBACK (accept_completion_callback), completion);
 }
 
@@ -5753,7 +5784,7 @@
       g_signal_connect (entry, "key_press_event",
 			G_CALLBACK (gtk_entry_completion_key_press), completion);
     }
- 
+
   if (completion->priv->inline_completion)
     {
       completion->priv->insert_text_id =
@@ -5795,7 +5826,7 @@
 
   if (old == completion)
     return;
-  
+
   if (old)
     {
       if (old->priv->completion_timeout)
@@ -5822,7 +5853,7 @@
   /* hook into the entry */
   g_object_ref (completion);
 
-  connect_completion_signals (entry, completion);    
+  connect_completion_signals (entry, completion);
   completion->priv->entry = GTK_WIDGET (entry);
   g_object_set_data (G_OBJECT (entry), I_(GTK_ENTRY_COMPLETION_KEY), completion);
 }
Index: gtk+/gtk/gtkentry.h
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkentry.h,v
retrieving revision 1.68
diff -u -r1.68 gtkentry.h
--- gtk+/gtk/gtkentry.h	15 Aug 2006 18:52:11 -0000	1.68
+++ gtk+/gtk/gtkentry.h	28 Sep 2006 20:31:14 -0000
@@ -21,7 +21,7 @@
  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
  * file for a list of people on the GTK+ Team.  See the ChangeLog
  * files for a list of changes.  These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
  */
 
 #ifndef __GTK_ENTRY_H__
@@ -57,7 +57,8 @@
   guint      editable : 1;
   guint      visible  : 1;
   guint      overwrite_mode : 1;
-  guint      in_drag : 1;	/* Dragging within the selection */
+  guint      dragable : 1;
+  guint      in_drag  : 1;	/* Dragging within the selection */
 
   guint16 text_length;	/* length in use, in chars */
   guint16 text_max_length;
@@ -66,10 +67,10 @@
   GdkWindow *text_area;
   GtkIMContext *im_context;
   GtkWidget   *popup_menu;
-  
+
   gint         current_pos;
   gint         selection_bound;
-  
+
   PangoLayout *cached_layout;
 
   guint        cache_includes_preedit : 1;
@@ -92,7 +93,7 @@
   gint    scroll_offset;
   gint    ascent;	/* font ascent, in pango units  */
   gint    descent;	/* font descent, in pango units  */
-  
+
   guint16 text_size;	/* allocated size, in bytes */
   guint16 n_bytes;	/* length in use, in bytes */
 
@@ -103,7 +104,7 @@
 
   gint drag_start_x;
   gint drag_start_y;
-  
+
   gunichar invisible_char;
 
   gint width_chars;
@@ -116,7 +117,7 @@
   /* Hook to customize right-click popup */
   void (* populate_popup)   (GtkEntry       *entry,
                              GtkMenu        *menu);
-  
+
   /* Action signals
    */
   void (* activate)           (GtkEntry       *entry);
Index: gtk+/gtk/gtkfilechooserdefault.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkfilechooserdefault.c,v
retrieving revision 1.335
diff -u -r1.335 gtkfilechooserdefault.c
--- gtk+/gtk/gtkfilechooserdefault.c	22 Sep 2006 16:10:43 -0000	1.335
+++ gtk+/gtk/gtkfilechooserdefault.c	28 Sep 2006 20:31:17 -0000
@@ -4362,11 +4362,13 @@
   gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 0);
 
   impl->save_expander = gtk_expander_new_with_mnemonic (_("_Browse for other folders"));
+  gtk_expander_set_expanded (GTK_EXPANDER (impl->save_expander),TRUE);
   gtk_container_add (GTK_CONTAINER (alignment), impl->save_expander);
   g_signal_connect (impl->save_expander, "notify::expanded",
 		    G_CALLBACK (expander_changed_cb),
 		    impl);
   gtk_widget_show_all (alignment);
+  gtk_widget_hide (impl->save_expander);
 
   impl->save_widgets = vbox;
   gtk_box_pack_start (GTK_BOX (impl), impl->save_widgets, FALSE, FALSE, 0);
Index: gtk+/gtk/gtkpathbar.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkpathbar.c,v
retrieving revision 1.58
diff -u -r1.58 gtkpathbar.c
--- gtk+/gtk/gtkpathbar.c	10 Sep 2006 06:39:16 -0000	1.58
+++ gtk+/gtk/gtkpathbar.c	28 Sep 2006 20:31:17 -0000
@@ -1285,11 +1285,11 @@
 
   switch (button_data->type)
     {
-    case ROOT_BUTTON:
-      button_data->image = gtk_image_new ();
-      child = button_data->image;
-      button_data->label = NULL;
-      break;
+//    case ROOT_BUTTON:
+//      button_data->image = gtk_image_new ();
+//      child = button_data->image;
+//      button_data->label = NULL;
+//      break;
     case HOME_BUTTON:
     case DESKTOP_BUTTON:
       button_data->image = gtk_image_new ();
Index: gtk+/gtk/gtkstyle.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkstyle.c,v
retrieving revision 1.201
diff -u -r1.201 gtkstyle.c
--- gtk+/gtk/gtkstyle.c	22 Sep 2006 20:47:23 -0000	1.201
+++ gtk+/gtk/gtkstyle.c	28 Sep 2006 20:31:20 -0000
@@ -2956,9 +2956,12 @@
       cairo_line_to (cr, x,              y + height);
     }
 
-  cairo_close_path (cr);
-  cairo_fill (cr);
-
+  if (arrow_type != GTK_ARROW_NONE)
+    {
+      cairo_close_path (cr);
+      cairo_fill (cr);
+    }
+    
   cairo_destroy (cr);
 }
 
Index: gtk+/gtk/gtktreeviewcolumn.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtktreeviewcolumn.c,v
retrieving revision 1.183
diff -u -r1.183 gtktreeviewcolumn.c
--- gtk+/gtk/gtktreeviewcolumn.c	24 Sep 2006 17:03:45 -0000	1.183
+++ gtk+/gtk/gtktreeviewcolumn.c	28 Sep 2006 20:31:21 -0000
@@ -958,6 +958,14 @@
   else
     gtk_widget_hide (arrow);
 
+  if (!(tree_column->show_sort_indicator))
+  {
+     gtk_arrow_set (GTK_ARROW (arrow),
+        GTK_ARROW_NONE,
+        GTK_SHADOW_IN);
+  }
+  gtk_widget_show (arrow);
+
   /* It's always safe to hide the button.  It isn't always safe to show it, as
    * if you show it before it's realized, it'll get the wrong window. */
   if (tree_column->button &&
