Index: gtk2_ardour/location_ui.cc
===================================================================
--- gtk2_ardour/location_ui.cc	(revision 5968)
+++ gtk2_ardour/location_ui.cc	(working copy)
@@ -56,7 +56,8 @@
 	  hide_check_button (_("Hidden")),
 	  remove_button (_("Remove")),
 	  scms_check_button (_("SCMS")),
-	  preemph_check_button (_("Pre-Emphasis"))
+	  preemph_check_button (_("Pre-Emphasis")),
+	  lock_check_button(_("Locked"))
 
 {
 	
@@ -80,6 +81,7 @@
 	performer_entry.set_name ("LocationEditNameEntry");
 	composer_label.set_name ("LocationEditNumberLabel");
 	composer_entry.set_name ("LocationEditNameEntry");
+	lock_check_button.set_name ("LocationEditHideButton");
 
 	ARDOUR_UI::instance()->tooltips().set_tip(start_set_button, _("Set value to Playhead"));
 	ARDOUR_UI::instance()->tooltips().set_tip(end_set_button, _("Set value to Playhead"));
@@ -115,6 +117,7 @@
 	composer_entry.signal_changed().connect (mem_fun(*this, &LocationEditRow::composer_entry_changed));
 	scms_check_button.signal_toggled().connect(mem_fun(*this, &LocationEditRow::scms_toggled));
 	preemph_check_button.signal_toggled().connect(mem_fun(*this, &LocationEditRow::preemph_toggled));
+	lock_check_button.signal_toggled().connect(mem_fun(*this, &LocationEditRow::lock_toggled));
 
 
 	set_session (sess);
@@ -214,8 +217,13 @@
 
 	if (!location) return;
 
+	if (!lock_check_button.get_parent()) {
+		item_table.attach (lock_check_button, 5, 6, 0, 1, FILL, Gtk::FILL, 4, 0);
+	}
+	lock_check_button.set_active (location->locked());
+
 	if (!hide_check_button.get_parent()) {
-		item_table.attach (hide_check_button, 6, 7, 0, 1, FILL, Gtk::FILL, 4, 0);
+		item_table.attach (hide_check_button, 7, 8, 0, 1, FILL, Gtk::FILL, 4, 0);
 	}
 	hide_check_button.set_active (location->is_hidden());
 	
@@ -244,10 +252,10 @@
 		name_entry.show();
 
 		if (!cd_check_button.get_parent()) {
-			item_table.attach (cd_check_button, 5, 6, 0, 1, FILL, FILL, 4, 0);
+			item_table.attach (cd_check_button, 6, 7, 0, 1, FILL, FILL, 4, 0);
 		}
 		if (!remove_button.get_parent()) {
-			item_table.attach (remove_button, 7, 8, 0, 1, FILL, FILL, 4, 0);
+			item_table.attach (remove_button, 8, 9, 0, 1, FILL, FILL, 4, 0);
 		}
 
 		/* XXX i can't find a way to hide the button without messing up 
@@ -268,6 +276,7 @@
 		}
 
 		hide_check_button.show();
+		lock_check_button.show();
 	}
 
 	start_clock.set (location->start(), true);
@@ -301,6 +310,8 @@
 	start_clock.set_sensitive (!location->locked());
 	end_clock.set_sensitive (!location->locked());
 	length_clock.set_sensitive (!location->locked());
+	start_set_button.set_sensitive (!location->locked());
+	end_set_button.set_sensitive (!location->locked());
 
 	start_changed_connection = location->start_changed.connect (mem_fun(*this, &LocationEditRow::start_changed));
 	end_changed_connection = location->end_changed.connect (mem_fun(*this, &LocationEditRow::end_changed));
@@ -488,6 +499,18 @@
 }
 
 void
+LocationEditRow::lock_toggled ()
+{
+	if (i_am_the_modifier || !location) return;
+
+	if (lock_check_button.get_active()) {
+		location->lock ();
+	} else {
+		location->unlock ();
+	}
+}
+
+void
 LocationEditRow::remove_button_pressed ()
 {
 	if (!location) return;
@@ -592,6 +615,10 @@
 	start_clock.set_sensitive (!location->locked());
 	end_clock.set_sensitive (!location->locked());
 	length_clock.set_sensitive (!location->locked());
+	start_set_button.set_sensitive (!location->locked());
+	end_set_button.set_sensitive (!location->locked());
+	
+	lock_check_button.set_active(location->locked());
 
 	i_am_the_modifier--;
 
@@ -608,6 +635,7 @@
 
 	cd_check_button.set_active (location->is_cd_marker());
 	hide_check_button.set_active (location->is_hidden());
+	lock_check_button.set_active (location->locked());
 
 	i_am_the_modifier--;
 }
Index: gtk2_ardour/location_ui.h
===================================================================
--- gtk2_ardour/location_ui.h	(revision 5968)
+++ gtk2_ardour/location_ui.h	(working copy)
@@ -101,6 +101,7 @@
  	Gtk::Entry  composer_entry;
 	Gtk::CheckButton   scms_check_button;
 	Gtk::CheckButton   preemph_check_button;
+	Gtk::CheckButton   lock_check_button;
 
 
 	guint32 i_am_the_modifier;
@@ -123,6 +124,7 @@
 
 	void scms_toggled ();
 	void preemph_toggled ();
+	void lock_toggled ();
 
 	void end_changed (ARDOUR::Location *);
 	void start_changed (ARDOUR::Location *);
