}
private bool keep_screen_on() {
- if (this.recording) {
+ if (this.recording || this.playing) {
Osso.Status status = this.osso_context.display_blanking_pause();
/*if (Osso.Status.OK == status) {
stdout.printf("%s\n", "OK");
int idx = 0;
if (0 < project.tracks.length()) {
this.playing = true;
+ keep_screen_on();
+ if (0 != screen_timer_id) Source.remove(screen_timer_id);
+ screen_timer_id = Timeout.add ((uint)Time.Milliseconds.SECOND * 20, keep_screen_on);
// for (int i = 0; i < tracks.children.length(); ++i) {
// TrackTransport tt = tracks.children.nth_data(i) as TrackTransport;
// if (null != tt) {
playback_timer_id = Timeout.add ((uint)Time.Milliseconds.SECOND / 10, update_time_and_duration_play_pipeline);
}
if (this.recording) {
- keep_screen_on();
- if (0 != screen_timer_id) Source.remove(screen_timer_id);
- screen_timer_id = Timeout.add ((uint)Time.Milliseconds.SECOND * 20, keep_screen_on);
+ if (!this.playing) {
+ keep_screen_on();
+ if (0 != screen_timer_id) Source.remove(screen_timer_id);
+ screen_timer_id = Timeout.add ((uint)Time.Milliseconds.SECOND * 20, keep_screen_on);
+ }
this.playback_position_duration.disconnect(player.position_duration_callback);
this.recording_position_duration.connect(player.position_duration_callback);
recordpipeline.position_duration.connect(recordpipeline_position_duration_callback);
var btnSettings = new Gtk.Button.with_label("Settings");
btnSettings.clicked.connect(show_settings);
menu.append(btnSettings);
+ var btnAbout = new Gtk.Button.with_label("About");
+ btnAbout.clicked.connect(show_about);
+ menu.append(btnAbout);
menu.show_all();
window.set_app_menu(menu);
}
+ private void show_about() {
+ AboutDialog dlg = new AboutDialog(window);
+ dlg.set_transient_for(window);
+ dlg.run();
+ dlg.destroy();
+ dlg = null;
+ }
private void show_settings() {
File settings = File.new_for_path(Environment.get_home_dir() + "/.demorecorder/settings.xml");
string errors = "";
);
}
public void from_xml_string(Xml.Node* node) {}
- }
- public bool deserialize_from_string(string data) {
- bool good = false;
- // call parser to build an array of string of parts
- string[] values = CdlParser.ParseLine(data);
- // check length of array
- if (13 == values.length) {
- // parse parts into this
- name = values[0];
- for (int i = 0; i < 10; ++i) {
- bands[i] = values[i + 1].to_double();
+ public bool deserialize_from_string(string data) {
+ bool good = false;
+ // call parser to build an array of string of parts
+ string[] values = CdlParser.ParseLine(data);
+ // check length of array
+ if (13 == values.length) {
+ // parse parts into this
+ name = values[0];
+ for (int i = 0; i < 10; ++i) {
+ bands[i] = values[i + 1].to_double();
+ }
+ good = true;
}
- good = true;
+ return good;
}
- return good;
+
}
}
-
-}