"%.2f ms".printf (command.duration));
button.clicked.connect (on_ramp_wait_clicked);
break;
case CommandType.SET_PWM:
"%.2f ms".printf (command.duration));
button.clicked.connect (on_ramp_wait_clicked);
break;
case CommandType.SET_PWM:
double old_step_time = command.step_time;
int old_steps = command.steps;
var dialog = new Gtk.Dialog ();
double old_step_time = command.step_time;
int old_steps = command.steps;
var dialog = new Gtk.Dialog ();
content.pack_start (lpv, true, true, 0);
var scale1 = new Gtk.HScale.with_range (1, 62, 1);
content.pack_start (lpv, true, true, 0);
var scale1 = new Gtk.HScale.with_range (1, 62, 1);
hbox2.pack_start (radio_dec, false, false, 0);
hbox.pack_start (hbox2, false, false, 0);
var scale2 = new Gtk.HScale.with_range (0, 255, 1);
hbox2.pack_start (radio_dec, false, false, 0);
hbox.pack_start (hbox2, false, false, 0);
var scale2 = new Gtk.HScale.with_range (0, 255, 1);
scale2.set_value ((command.steps < 0) ? -command.steps : command.steps);
scale2.set_value_pos (Gtk.PositionType.RIGHT);
scale2.format_value.connect ((v) => {
scale2.set_value ((command.steps < 0) ? -command.steps : command.steps);
scale2.set_value_pos (Gtk.PositionType.RIGHT);
scale2.format_value.connect ((v) => {
content.pack_start (hbox, false, false, 0);
content.show_all ();
content.pack_start (hbox, false, false, 0);
content.show_all ();
- dialog.add_button ("Delete", 1);
- dialog.add_button ("Done", Gtk.ResponseType.OK);
+ dialog.add_button (_("Delete"), 1);
+ dialog.add_button (_("Done"), Gtk.ResponseType.OK);
int response = dialog.run ();
if (response == Gtk.ResponseType.OK) {
var button = source as Hildon.Button;
int response = dialog.run ();
if (response == Gtk.ResponseType.OK) {
var button = source as Hildon.Button;
private void on_set_pwm_clicked (Gtk.Button source) {
int old_level = command.level;
var dialog = new Gtk.Dialog ();
private void on_set_pwm_clicked (Gtk.Button source) {
int old_level = command.level;
var dialog = new Gtk.Dialog ();
content.pack_start (lpv, true, true, 0);
var scale = new Gtk.HScale.with_range (0, 255, 1);
content.pack_start (lpv, true, true, 0);
var scale = new Gtk.HScale.with_range (0, 255, 1);
scale.set_value (command.level);
scale.value_changed.connect ((s) => {
command.set_pwm ((int) s.get_value ());
scale.set_value (command.level);
scale.value_changed.connect ((s) => {
command.set_pwm ((int) s.get_value ());
content.pack_start (scale, true, true, 0);
content.show_all ();
content.pack_start (scale, true, true, 0);
content.show_all ();
- dialog.add_button ("Delete", 1);
- dialog.add_button ("Done", Gtk.ResponseType.OK);
+ dialog.add_button (_("Delete"), 1);
+ dialog.add_button (_("Done"), Gtk.ResponseType.OK);
int response = dialog.run ();
if (response == Gtk.ResponseType.OK) {
command.set_pwm ((int) scale.get_value ());
var button = source as Hildon.Button;
int response = dialog.run ();
if (response == Gtk.ResponseType.OK) {
command.set_pwm ((int) scale.get_value ());
var button = source as Hildon.Button;
uint16 old_code = command.code;
var dialog = new Gtk.Dialog ();
if (command.type == CommandType.END)
uint16 old_code = command.code;
var dialog = new Gtk.Dialog ();
if (command.type == CommandType.END)
var hbox = new Gtk.HBox (true, 0);
var radio_end = (Gtk.RadioButton) Hildon.gtk_radio_button_new (Hildon.SizeType.FINGER_HEIGHT, null);
radio_end.set_mode (false);
var hbox = new Gtk.HBox (true, 0);
var radio_end = (Gtk.RadioButton) Hildon.gtk_radio_button_new (Hildon.SizeType.FINGER_HEIGHT, null);
radio_end.set_mode (false);
hbox.pack_start (radio_end, true, true, 0);
var radio_go_to_start = (Gtk.RadioButton) Hildon.gtk_radio_button_new_from_widget (Hildon.SizeType.FINGER_HEIGHT, radio_end);
radio_go_to_start.set_mode (false);
hbox.pack_start (radio_end, true, true, 0);
var radio_go_to_start = (Gtk.RadioButton) Hildon.gtk_radio_button_new_from_widget (Hildon.SizeType.FINGER_HEIGHT, radio_end);
radio_go_to_start.set_mode (false);
hbox.pack_start (radio_go_to_start, true, true, 0);
content.pack_start (hbox, true, true, 0);
hbox = new Gtk.HBox (true, 0);
var radio_hold = (Gtk.RadioButton) Hildon.gtk_radio_button_new (Hildon.SizeType.FINGER_HEIGHT, null);
radio_hold.set_mode (false);
hbox.pack_start (radio_go_to_start, true, true, 0);
content.pack_start (hbox, true, true, 0);
hbox = new Gtk.HBox (true, 0);
var radio_hold = (Gtk.RadioButton) Hildon.gtk_radio_button_new (Hildon.SizeType.FINGER_HEIGHT, null);
radio_hold.set_mode (false);
hbox.pack_start (radio_hold, true, true, 0);
var radio_reset = (Gtk.RadioButton) Hildon.gtk_radio_button_new_from_widget (Hildon.SizeType.FINGER_HEIGHT, radio_hold);
radio_reset.set_mode (false);
hbox.pack_start (radio_hold, true, true, 0);
var radio_reset = (Gtk.RadioButton) Hildon.gtk_radio_button_new_from_widget (Hildon.SizeType.FINGER_HEIGHT, radio_hold);
radio_reset.set_mode (false);
hbox.pack_start (radio_reset, true, true, 0);
content.pack_start (hbox, true, true, 0);
hbox.pack_start (radio_reset, true, true, 0);
content.pack_start (hbox, true, true, 0);
command.end (radio_reset.get_active ());
radio_hold.set_sensitive (true);
radio_reset.set_sensitive (true);
command.end (radio_reset.get_active ());
radio_hold.set_sensitive (true);
radio_reset.set_sensitive (true);
- dialog.add_button ("Delete", 1);
- dialog.add_button ("Done", Gtk.ResponseType.OK);
+ dialog.add_button (_("Delete"), 1);
+ dialog.add_button (_("Done"), Gtk.ResponseType.OK);
int response = dialog.run ();
if (response == Gtk.ResponseType.OK) {
var button = source as Hildon.Button;
button.set_value ((command.type == CommandType.END) ?
int response = dialog.run ();
if (response == Gtk.ResponseType.OK) {
var button = source as Hildon.Button;
button.set_value ((command.type == CommandType.END) ?
private void on_trigger_clicked (Gtk.Button source) {
uint16 old_code = command.code;
var dialog = new Gtk.Dialog ();
private void on_trigger_clicked (Gtk.Button source) {
uint16 old_code = command.code;
var dialog = new Gtk.Dialog ();
content.pack_start (lpv, true, true, 0);
var check = new Hildon.CheckButton (Hildon.SizeType.FINGER_HEIGHT);
content.pack_start (lpv, true, true, 0);
var check = new Hildon.CheckButton (Hildon.SizeType.FINGER_HEIGHT);
content.pack_start (check, true, true, 0);
check = new Hildon.CheckButton (Hildon.SizeType.FINGER_HEIGHT);
content.pack_start (check, true, true, 0);
check = new Hildon.CheckButton (Hildon.SizeType.FINGER_HEIGHT);
content.pack_start (check, true, true, 0);
content.show_all ();
content.pack_start (check, true, true, 0);
content.show_all ();
- dialog.add_button ("Delete", 1);
- dialog.add_button ("Done", Gtk.ResponseType.OK);
+ dialog.add_button (_("Delete"), 1);
+ dialog.add_button (_("Done"), Gtk.ResponseType.OK);
int response = dialog.run ();
if (response == Gtk.ResponseType.OK) {
var button = source as Hildon.Button;
string text = "";
if (0x0100 in command.code)
int response = dialog.run ();
if (response == Gtk.ResponseType.OK) {
var button = source as Hildon.Button;
string text = "";
if (0x0100 in command.code)