diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-11-19 02:36:30 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-11-19 02:36:30 +0000 |
commit | 82cd0093d6051545d9581d4b25a5c8779711e479 (patch) | |
tree | a7cad675f142916ab3169cca3e218be8f821d9fb /gtk2_ardour/audio_clock.cc | |
parent | 05283a63398fd7a563480a76802e6b2c2ad2e404 (diff) |
add a signal so that if the Big Clock is closed, the edit window can grab focus back (may not be correct - should really capture close/delete signal; tweak size of audio clocks so that there is less dead space at the RHS, helps scroll wheel events to always do something
git-svn-id: svn://localhost/ardour2/branches/3.0@10700 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/audio_clock.cc')
-rw-r--r-- | gtk2_ardour/audio_clock.cc | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc index 0158f00731..6e736d248e 100644 --- a/gtk2_ardour/audio_clock.cc +++ b/gtk2_ardour/audio_clock.cc @@ -341,7 +341,7 @@ AudioClock::on_size_request (Gtk::Requisition* req) where we printf a fractional value (XXX or should) */ - tmp->set_text (" 88|88:88:88,888"); + tmp->set_text (" 88888888888,|"); tmp->get_pixel_size (req->width, req->height); @@ -487,13 +487,20 @@ AudioClock::end_edit (bool modify) void AudioClock::drop_focus () { - /* move focus back to the default widget in the top level window */ - Keyboard::magic_widget_drop_focus (); - Widget* top = get_toplevel(); - if (top->is_toplevel ()) { - Window* win = dynamic_cast<Window*> (top); - win->grab_focus (); + + DropFocus (); /* EMIT SIGNAL */ + + if (has_focus()) { + + /* move focus back to the default widget in the top level window */ + + Widget* top = get_toplevel(); + + if (top->is_toplevel ()) { + Window* win = dynamic_cast<Window*> (top); + win->grab_focus (); + } } } @@ -1209,7 +1216,7 @@ AudioClock::index_to_field (int index) const return Timecode_Minutes; } else if (index < 10) { return Timecode_Seconds; - } else if (index < 13) { + } else { return Timecode_Frames; } break; @@ -1218,7 +1225,7 @@ AudioClock::index_to_field (int index) const return Bars; } else if (index < 7) { return Beats; - } else if (index < 12) { + } else { return Ticks; } break; @@ -1229,7 +1236,7 @@ AudioClock::index_to_field (int index) const return MS_Minutes; } else if (index < 9) { return MS_Seconds; - } else if (index < 12) { + } else { return MS_Milliseconds; } break; |