summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_ops.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-03-16 15:04:28 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-03-16 15:04:28 +0000
commit0d4825d62eb265be7555d2bb4b97993ea5dea74e (patch)
tree49d2f2088ca41d29ca9905419b2291bcf16073b6 /gtk2_ardour/editor_ops.cc
parente945505731de4a256e3595610b756a0e085c7975 (diff)
forward port save/goto visual state changes from 2.X (now uses ctrl-Fn to save, Fn to goto)
git-svn-id: svn://localhost/ardour2/branches/3.0@11703 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r--gtk2_ardour/editor_ops.cc35
1 files changed, 9 insertions, 26 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index 5060038f0e..ac1de28e8d 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -6567,7 +6567,9 @@ Editor::save_visual_state (uint32_t n)
visual_states.push_back (0);
}
- delete visual_states[n];
+ if (visual_states[n] != 0) {
+ delete visual_states[n];
+ }
visual_states[n] = current_visual_state (true);
gdk_beep ();
@@ -6590,38 +6592,19 @@ Editor::goto_visual_state (uint32_t n)
void
Editor::start_visual_state_op (uint32_t n)
{
- if (visual_state_op_connection.empty()) {
- visual_state_op_connection = Glib::signal_timeout().connect (sigc::bind (sigc::mem_fun (*this, &Editor::end_visual_state_op), n), 1000);
- }
-}
-
-void
-Editor::cancel_visual_state_op (uint32_t n)
-{
- if (!visual_state_op_connection.empty()) {
- visual_state_op_connection.disconnect();
- goto_visual_state (n);
- } else {
- //we land here if called from the menu OR if end_visual_state_op has been called
- //so check if we are already in visual state n
- // XXX not yet checking it at all, but redoing does not hurt
- goto_visual_state (n);
- }
-}
-
-bool
-Editor::end_visual_state_op (uint32_t n)
-{
- visual_state_op_connection.disconnect();
save_visual_state (n);
-
+
PopUp* pup = new PopUp (WIN_POS_MOUSE, 1000, true);
char buf[32];
snprintf (buf, sizeof (buf), _("Saved view %u"), n+1);
pup->set_text (buf);
pup->touch();
+}
- return false; // do not call again
+void
+Editor::cancel_visual_state_op (uint32_t n)
+{
+ goto_visual_state (n);
}
void