diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-05-04 22:02:05 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-05-04 22:02:05 -0400 |
commit | 40944574c620868b43872f64600a8a42d382a6a1 (patch) | |
tree | ea1eda6147b34afdfccf4882d99602b0565fd944 /gtk2_ardour/big_clock_window.cc | |
parent | 69a3310037e013c074b1d8643323017ac1c815f9 (diff) |
the big rework of window management. probably not complete at thsi point, but this is mostly functional
Diffstat (limited to 'gtk2_ardour/big_clock_window.cc')
-rw-r--r-- | gtk2_ardour/big_clock_window.cc | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/gtk2_ardour/big_clock_window.cc b/gtk2_ardour/big_clock_window.cc index b080167d34..7a96293b05 100644 --- a/gtk2_ardour/big_clock_window.cc +++ b/gtk2_ardour/big_clock_window.cc @@ -17,29 +17,37 @@ */ -#ifdef WAF_BUILD -#include "gtk2ardour-config.h" -#endif +#include <algorithm> +#include <string> -#include "big_clock_window.h" +#include "ardour_ui.h" #include "audio_clock.h" +#include "big_clock_window.h" +#include "public_editor.h" +#include "utils.h" #include "i18n.h" +using std::min; +using std::string; BigClockWindow::BigClockWindow (AudioClock& c) : ArdourWindow (_("Big Clock")) , clock (c) , resize_in_progress (false) + , original_height (0) + , original_width (0) + , original_font_size (0) { ARDOUR_UI::Clock.connect (sigc::mem_fun (clock, &AudioClock::set)); clock.set_corner_radius (0.0); clock.mode_changed.connect (sigc::mem_fun (*this, &BigClockWindow::reset_aspect_ratio)); - win->set_keep_above (true); - win->set_border_width (0); - win->add (*clock); + set_keep_above (true); + set_border_width (0); + add (clock); + clock.show_all (); } void @@ -51,7 +59,7 @@ BigClockWindow::on_unmap () bool BigClockWindow::on_key_press_event (GdkEventKey* ev) { - return relay_key_press (ev); + return relay_key_press (ev, this); } void @@ -82,24 +90,13 @@ BigClockWindow::on_size_allocate (Gtk::Allocation& alloc) { ArdourWindow::on_size_allocate (alloc); - if (!big_clock_resize_in_progress) { + if (!resize_in_progress) { Glib::signal_idle().connect (sigc::bind (sigc::mem_fun (*this, &BigClockWindow::text_resizer), 0, 0)); resize_in_progress = true; } } void -BigClockWindow::float (Gtk::Window* parent) -{ - if (parent) { - set_transient_for (*parent); - } else { - /* Gtkmm doesn't allow a call to this for a null parent */ - gtk_window_set_transient_for (big_clock_window->gobj(), (GtkWindow*) 0); - } -} - -void BigClockWindow::reset_aspect_ratio () { Gtk::Requisition req; |