1 |
/* |
/* |
2 |
* Copyright (C) 2006-2008 Andreas Persson |
* Copyright (C) 2006-2009 Andreas Persson |
3 |
* |
* |
4 |
* This program is free software; you can redistribute it and/or |
* This program is free software; you can redistribute it and/or |
5 |
* modify it under the terms of the GNU General Public License as |
* modify it under the terms of the GNU General Public License as |
82 |
cursor_is_resize = false; |
cursor_is_resize = false; |
83 |
h1 = REGION_BLOCK_HEIGHT; |
h1 = REGION_BLOCK_HEIGHT; |
84 |
|
|
85 |
// properties of the virtual keyboard |
// properties of the virtual keyboard |
86 |
{ |
{ |
87 |
const char* choices[] = { "normal", "chord", NULL }; |
const char* choices[] = { _("normal"), _("chord"), NULL }; |
88 |
static const virt_keyboard_mode_t values[] = { |
static const virt_keyboard_mode_t values[] = { |
89 |
VIRT_KEYBOARD_MODE_NORMAL, |
VIRT_KEYBOARD_MODE_NORMAL, |
90 |
VIRT_KEYBOARD_MODE_CHORD |
VIRT_KEYBOARD_MODE_CHORD |
335 |
region = regions.first(); |
region = regions.first(); |
336 |
queue_draw(); |
queue_draw(); |
337 |
region_selected(); |
region_selected(); |
338 |
|
dimensionManager.set_region(region); |
339 |
} |
} |
340 |
|
|
341 |
bool RegionChooser::on_button_release_event(GdkEventButton* event) |
bool RegionChooser::on_button_release_event(GdkEventButton* event) |
439 |
region = r; |
region = r; |
440 |
queue_draw(); |
queue_draw(); |
441 |
region_selected(); |
region_selected(); |
442 |
|
dimensionManager.set_region(region); |
443 |
popup_menu_inside_region->popup(event->button, event->time); |
popup_menu_inside_region->popup(event->button, event->time); |
444 |
} else { |
} else { |
445 |
new_region_pos = k; |
new_region_pos = k; |
459 |
region = r; |
region = r; |
460 |
queue_draw(); |
queue_draw(); |
461 |
region_selected(); |
region_selected(); |
462 |
|
dimensionManager.set_region(region); |
463 |
|
|
464 |
get_window()->pointer_grab(false, |
get_window()->pointer_grab(false, |
465 |
Gdk::BUTTON_RELEASE_MASK | |
Gdk::BUTTON_RELEASE_MASK | |
767 |
void RegionChooser::show_region_properties() |
void RegionChooser::show_region_properties() |
768 |
{ |
{ |
769 |
if (!region) return; |
if (!region) return; |
770 |
Gtk::Dialog dialog("Region Properties", true /*modal*/); |
Gtk::Dialog dialog(_("Region Properties"), true /*modal*/); |
771 |
// add "Keygroup" checkbox |
// add "Keygroup" checkbox |
772 |
Gtk::CheckButton checkBoxKeygroup("Member of a Keygroup (Exclusive Group)"); |
Gtk::CheckButton checkBoxKeygroup(_("Member of a Keygroup (Exclusive Group)")); |
773 |
checkBoxKeygroup.set_active(region->KeyGroup); |
checkBoxKeygroup.set_active(region->KeyGroup); |
774 |
dialog.get_vbox()->pack_start(checkBoxKeygroup); |
dialog.get_vbox()->pack_start(checkBoxKeygroup); |
775 |
checkBoxKeygroup.show(); |
checkBoxKeygroup.show(); |
801 |
|
|
802 |
queue_draw(); |
queue_draw(); |
803 |
region_selected(); |
region_selected(); |
804 |
|
dimensionManager.set_region(region); |
805 |
instrument_changed(); |
instrument_changed(); |
806 |
} |
} |
807 |
|
|
815 |
region = 0; |
region = 0; |
816 |
queue_draw(); |
queue_draw(); |
817 |
region_selected(); |
region_selected(); |
818 |
|
dimensionManager.set_region(region); |
819 |
instrument_changed(); |
instrument_changed(); |
820 |
} |
} |
821 |
|
|