View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002137 | ardour | features | public | 2008-03-24 22:17 | 2010-08-15 00:50 |
| Reporter | oofus | Assigned To | paul | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Platform | Centrino 1.6GHz Laptop | OS | Linux | OS Version | Mandriva 2008 |
| Product Version | SVN/2.0-ongoing | ||||
| Target Version | 3.0-beta1 | ||||
| Summary | 0002137: There is no way to lock or unlock a mark from the locations window. | ||||
| Description | There is no way to lock or unlock a mark from the locations window. | ||||
| Tags | No tags attached. | ||||
|
2009-10-29 17:15
|
locations-window-lock.patch (4,377 bytes)
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 *);
|
|
|
I took a stab at this: I hope the attached patch (against 2.0-ongoing) is sensible. It adds 'Locked' tick boxes to the locations list (to the left of the 'CD' tick boxes), and also de-sensitises the 'Move to PH' buttons of locked ranges as well as their times. Incidentally, this now permits range markers to be locked too, which I don't think there was a way to do before. One thing that I haven't got quite right, but can't see why: clicking the new 'Locked' boxes doesn't make Ardour believe that the session has been modified, so it won't ask whether to save the session if this is all you've changed. [EDIT] Actually, I just discovered the 'Lock' & 'Unlock' marker context menu items don't set the session dirty flag either, so this isn't a new problem with this patch. |
|
|
Haven't tried this patch, but it might be nice to have this in 3.x even if it doesn't get applied to 2.x |
|
|
Implemented in 3.x, but not in 2.x yet. |
|
|
Implemented in 3.0 and unlikely to be added to 2.0 at this stage, so I'll close this. Thanks! |
|
|
See notes |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2008-03-24 22:17 | oofus | New Issue | |
| 2008-03-24 22:22 | oofus | Summary | The location window doesn't show whether a mark is locked or not. => There is no way to lock or unlock a mark from the locations window. |
| 2008-03-24 22:22 | oofus | Description Updated | |
| 2009-10-27 11:57 | cth103 | cost | => 0.00 |
| 2009-10-27 11:57 | cth103 | Category | bugs => features |
| 2009-10-29 17:15 | colinf | File Added: locations-window-lock.patch | |
| 2009-10-29 17:16 | colinf | Note Added: 0006969 | |
| 2009-10-31 14:24 | paul | Status | new => assigned |
| 2009-10-31 14:24 | paul | Assigned To | => paul |
| 2009-11-03 12:59 | colinf | Note Edited: 0006969 | |
| 2010-07-22 12:38 | oofus | Target Version | => 3.0-beta1 |
| 2010-08-09 12:04 | oofus | Note Added: 0008746 | |
| 2010-08-10 08:47 | oofus | Note Added: 0008776 | |
| 2010-08-14 15:22 | cth103 | Note Added: 0008837 | |
| 2010-08-14 15:22 | cth103 | Status | assigned => resolved |
| 2010-08-14 15:22 | cth103 | Resolution | open => fixed |
| 2010-08-15 00:50 | oofus | Note Added: 0008838 | |
| 2010-08-15 00:50 | oofus | Status | resolved => closed |