3 # JACK FreeWheel button
5 # Copyright (C) 2010 Nikita Zlobin <cook60020tmp@mail.ru>
7 #*************************************************************************
8 # This file implements dialogs that are not implemented in dedicated files
9 #*************************************************************************
11 # LADI Session Handler is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation; either version 2 of the License, or
14 # (at your option) any later version.
16 # LADI Session Handler is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 # GNU General Public License for more details.
21 # You should have received a copy of the GNU General Public License
22 # along with LADI Session Handler. If not, see <http://www.gnu.org/licenses/>
23 # or write to the Free Software Foundation, Inc.,
24 # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
33 text_generic
= "Free wheel: "
35 jclient_name
= "jack_freewheel_button"
37 def on_button_toggled(button
):
38 if button
.get_active():
39 button
.set_label(text_generic
+text_freewheel
)
42 button
.set_label(text_generic
+text_rtwheel
)
43 button
.set_sensitive(True)
47 if jack
.get_freewheel() > 0:
48 if button
.get_active() == False:
49 button
.set_active(True)
50 button
.set_sensitive(False)
52 button
.set_active(False)
58 window
.set_title("JACK time wheel control")
59 window
.set_resizable(False)
60 window
.set_decorated(False)
62 button
= gtk
.ToggleButton()
63 button
.set_active(False)
64 button
.set_label(text_generic
+text_rtwheel
)
67 window
.connect("delete-event", gtk
.main_quit
);
68 button
.connect("toggled", on_button_toggled
);
72 jack
.attach(jclient_name
)
74 glib
.timeout_add(300, timeout
)