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	29 Sep 2006 18:17:44 -0000
@@ -114,6 +114,7 @@
   PROP_CURSOR_POSITION,
   PROP_SELECTION_BOUND,
   PROP_EDITABLE,
+  PROP_DRAGGABLE,
   PROP_MAX_LENGTH,
   PROP_VISIBILITY,
   PROP_HAS_FRAME,
@@ -486,6 +487,14 @@
 							 GTK_PARAM_READWRITE));
   
   g_object_class_install_property (gobject_class,
+                                   PROP_EDITABLE,
+                                   g_param_spec_boolean ("draggable",
+							 P_("Draggable"),
+							 P_("Whether the entry contents can be dragged"),
+                                                         TRUE,
+							 GTK_PARAM_READWRITE));
+  
+  g_object_class_install_property (gobject_class,
                                    PROP_MAX_LENGTH,
                                    g_param_spec_int ("max-length",
                                                      P_("Maximum length"),
@@ -941,6 +950,24 @@
       }
       break;
 
+    case PROP_DRAGGABLE:
+      {
+      gboolean new_value = g_value_get_boolean (value);
+
+      if (new_value != entry->draggable)
+        {
+          if (entry->in_drag)
+          {
+            entry->drag_start_x = 0;
+            entry->drag_start_y = 0;
+          }
+
+          entry->draggable = new_value;
+          gtk_entry_queue_draw (entry);
+        }
+      }
+      break;
+
     case PROP_MAX_LENGTH:
       gtk_entry_set_max_length (entry, g_value_get_int (value));
       break;
@@ -1008,6 +1035,9 @@
     case PROP_EDITABLE:
       g_value_set_boolean (value, entry->editable);
       break;
+    case PROP_DRAGGABLE:
+      g_value_set_boolean (value, entry->draggable);
+      break;
     case PROP_MAX_LENGTH:
       g_value_set_int (value, entry->text_max_length); 
       break;
@@ -1068,6 +1098,7 @@
   entry->editing_canceled = FALSE;
   entry->has_frame = TRUE;
   entry->truncate_multiline = FALSE;
+  entry->draggable = TRUE;
   priv->xalign = 0.0;
 
   gtk_drag_dest_set (GTK_WIDGET (entry),
@@ -1670,12 +1701,12 @@
 	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->draggable) )
 	    {
 	      /* Click inside the selection - we'll either start a drag, or
 	       * clear the selection
 	       */
-	      entry->in_drag = TRUE;
+	      in_drag = TRUE;
 	      entry->drag_start_x = event->x + entry->scroll_offset;
 	      entry->drag_start_y = event->y + entry->scroll_offset;
 	    }
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	29 Sep 2006 18:17:47 -0000
@@ -57,7 +57,8 @@
   guint      editable : 1;
   guint      visible  : 1;
   guint      overwrite_mode : 1;
-  guint      in_drag : 1;	/* Dragging within the selection */
+  guint      in_drag  : 1;	/* Dragging within the selection */
+  guint      draggable : 1;
 
   guint16 text_length;	/* length in use, in chars */
   guint16 text_max_length;
