summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-06-02 03:17:53 +0000
committerDavid Robillard <d@drobilla.net>2011-06-02 03:17:53 +0000
commitc43c219c2ed300cbbff099445dedcce1c54db791 (patch)
treedd90d55428119c1883d911f434c3600a2468625b /gtk2_ardour
parent3f68aa26387f6b02ab6c0b10e8bb432d419a21b1 (diff)
Fix some weird style
git-svn-id: svn://localhost/ardour2/branches/3.0@9668 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/midi_region_view.cc31
-rw-r--r--gtk2_ardour/rc_option_editor.cc2
2 files changed, 14 insertions, 19 deletions
diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc
index c2b3462bd2..802263810e 100644
--- a/gtk2_ardour/midi_region_view.cc
+++ b/gtk2_ardour/midi_region_view.cc
@@ -433,7 +433,7 @@ MidiRegionView::button_release (GdkEventButton* ev)
{
clear_selection();
- if (Keyboard::is_insert_note_event(ev)){
+ if (Keyboard::is_insert_note_event(ev)) {
double event_x, event_y;
@@ -484,7 +484,7 @@ MidiRegionView::button_release (GdkEventButton* ev)
_mouse_state = None;
- if (Keyboard::is_insert_note_event(ev) || trackview.editor().current_mouse_mode() == MouseRange){
+ if (Keyboard::is_insert_note_event(ev) || trackview.editor().current_mouse_mode() == MouseRange) {
if (_drag_rect->property_x2() > _drag_rect->property_x1() + 2) {
@@ -522,23 +522,20 @@ MidiRegionView::motion (GdkEventMotion* ev)
if (!_ghost_note && trackview.editor().current_mouse_mode() != MouseRange
&& Keyboard::modifier_state_contains (ev->state, Keyboard::insert_note_modifier())
- && _mouse_state != AddDragging){
+ && _mouse_state != AddDragging) {
create_ghost_note (ev->x, ev->y);
- }
- else if (_ghost_note && trackview.editor().current_mouse_mode() != MouseRange
- && Keyboard::modifier_state_contains (ev->state, Keyboard::insert_note_modifier())){
+ } else if (_ghost_note && trackview.editor().current_mouse_mode() != MouseRange
+ && Keyboard::modifier_state_contains (ev->state, Keyboard::insert_note_modifier())) {
update_ghost_note (ev->x, ev->y);
- }
- else if (_ghost_note && trackview.editor().current_mouse_mode() != MouseRange){
+ } else if (_ghost_note && trackview.editor().current_mouse_mode() != MouseRange) {
delete _ghost_note;
_ghost_note = 0;
trackview.editor().verbose_cursor()->hide ();
- }
- else if (_ghost_note && trackview.editor().current_mouse_mode() == MouseRange) {
+ } else if (_ghost_note && trackview.editor().current_mouse_mode() == MouseRange) {
update_ghost_note (ev->x, ev->y);
}
@@ -556,9 +553,9 @@ MidiRegionView::motion (GdkEventMotion* ev)
return false;
}
- // Select drag start
if (_pressed_button == 1 && trackview.editor().current_mouse_mode() == MouseObject
&& !Keyboard::modifier_state_contains (ev->state, Keyboard::insert_note_modifier())) {
+ // Select drag start
group->grab(GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
Gdk::Cursor(Gdk::FLEUR), ev->time);
@@ -582,8 +579,8 @@ MidiRegionView::motion (GdkEventMotion* ev)
_mouse_state = SelectRectDragging;
return true;
- // Add note drag start
} else if (trackview.editor().internal_editing()) {
+ // Add note drag start
delete _ghost_note;
_ghost_note = 0;
@@ -610,7 +607,7 @@ MidiRegionView::motion (GdkEventMotion* ev)
_mouse_state = AddDragging;
- if (_ghost_note){
+ if (_ghost_note) {
delete _ghost_note;
_ghost_note = 0;
@@ -635,13 +632,13 @@ MidiRegionView::motion (GdkEventMotion* ev)
event_y = t_y;
}
- if (_mouse_state == AddDragging){
+ if (_mouse_state == AddDragging) {
event_x = trackview.editor().frame_to_pixel(event_frame);
}
if (_drag_rect) {
- if (event_x > _drag_start_x){
+ if (event_x > _drag_start_x) {
_drag_rect->property_x2() = event_x;
}
else {
@@ -651,7 +648,7 @@ MidiRegionView::motion (GdkEventMotion* ev)
if (_drag_rect && _mouse_state == SelectRectDragging) {
- if (event_y > _drag_start_y){
+ if (event_y > _drag_start_y) {
_drag_rect->property_y2() = event_y;
}
else {
@@ -702,7 +699,7 @@ MidiRegionView::key_press (GdkEventKey* ev)
repeated presses, carry out key actions at key press, not release.
*/
- if (ev->keyval == GDK_Alt_L || ev->keyval == GDK_Alt_R){
+ if (ev->keyval == GDK_Alt_L || ev->keyval == GDK_Alt_R) {
_mouse_state = SelectTouchDragging;
return true;
diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc
index 3858ebaff0..a74a0cca7e 100644
--- a/gtk2_ardour/rc_option_editor.cc
+++ b/gtk2_ardour/rc_option_editor.cc
@@ -282,8 +282,6 @@ public:
_edit_button_spin (_edit_button_adjustment),
_insert_note_button_adjustment (3, 1, 5),
_insert_note_button_spin (_insert_note_button_adjustment)
-
-
{
/* internationalize and prepare for use with combos */