[proaudio] [997] seq24: optionally apply some patches from devel ml |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/proaudio Archives
]
Revision: 997
Author: gimpel
Date: 2007-12-11 14:32:10 +0000 (Tue, 11 Dec 2007)
Log Message:
-----------
seq24: optionally apply some patches from devel ml
Modified Paths:
--------------
trunk/overlays/proaudio/media-sound/seq24/Manifest
trunk/overlays/proaudio/media-sound/seq24/seq24-0.8.7.ebuild
Added Paths:
-----------
trunk/overlays/proaudio/media-sound/seq24/files/seq24-0.8.7-label-fix.diff
trunk/overlays/proaudio/media-sound/seq24/files/seq24-0.8.7-menu-changes.diff
trunk/overlays/proaudio/media-sound/seq24/files/seq24-0.8.7-sams.patch
trunk/overlays/proaudio/media-sound/seq24/files/seq24-0.8.7.olivier.patch
trunk/overlays/proaudio/media-sound/seq24/files/seq24-0.8.7.olivier2.patch
trunk/overlays/proaudio/media-sound/seq24/files/seq24-0.8.7.prio.diff
Modified: trunk/overlays/proaudio/media-sound/seq24/Manifest
===================================================================
--- trunk/overlays/proaudio/media-sound/seq24/Manifest 2007-12-11 13:47:21 UTC (rev 996)
+++ trunk/overlays/proaudio/media-sound/seq24/Manifest 2007-12-11 14:32:10 UTC (rev 997)
@@ -6,6 +6,30 @@
MD5 94259848552898fdedcd1e0018aad224 files/seq24-0.8.3-dr-lash-cairo.bz2 25987
RMD160 52b1d924abfa60f052fb3a448ddd580d7ff45a86 files/seq24-0.8.3-dr-lash-cairo.bz2 25987
SHA256 f9ca9b6255f955d5400e34bb9451c651c003d46d15e95de73f8d43ec96071f07 files/seq24-0.8.3-dr-lash-cairo.bz2 25987
+AUX seq24-0.8.7-label-fix.diff 418 RMD160 ee4699fa03ae345b31ac5e9b160c3dff76f50163 SHA1 2c8511b281858d99188984a9e6900362247f66d8 SHA256 4f71ad71f4a0b8e041da77b80518ad844c6c60cb99e51688dfa18d10db299fb9
+MD5 32597fd642d84bc525f8ade48dc3d546 files/seq24-0.8.7-label-fix.diff 418
+RMD160 ee4699fa03ae345b31ac5e9b160c3dff76f50163 files/seq24-0.8.7-label-fix.diff 418
+SHA256 4f71ad71f4a0b8e041da77b80518ad844c6c60cb99e51688dfa18d10db299fb9 files/seq24-0.8.7-label-fix.diff 418
+AUX seq24-0.8.7-menu-changes.diff 3446 RMD160 0be7c10a7b56cbf5fb227c9cd7432b33c70915cf SHA1 35fff69d41293342b1dd07a8aa9a7dec6a13e51c SHA256 30e2082ccf9a4ddece01aafa672f2ac3f1cbc5b8b7c308a6b5e247c7073af96b
+MD5 fe85a88fdc7c6e07e280605c0ff8752e files/seq24-0.8.7-menu-changes.diff 3446
+RMD160 0be7c10a7b56cbf5fb227c9cd7432b33c70915cf files/seq24-0.8.7-menu-changes.diff 3446
+SHA256 30e2082ccf9a4ddece01aafa672f2ac3f1cbc5b8b7c308a6b5e247c7073af96b files/seq24-0.8.7-menu-changes.diff 3446
+AUX seq24-0.8.7-sams.patch 17299 RMD160 c19a5bc3338cc0ead64e96ba3a8272a6f5f92ac2 SHA1 8997715a54fccd3df85b0eeabc1bc3c8ae579e69 SHA256 409f2eb48ec9859e2c2b2a8216f45c4def324417197af4bc899f3a6b599d6180
+MD5 f9fd6f274e362b590e35e07d33dc9a8c files/seq24-0.8.7-sams.patch 17299
+RMD160 c19a5bc3338cc0ead64e96ba3a8272a6f5f92ac2 files/seq24-0.8.7-sams.patch 17299
+SHA256 409f2eb48ec9859e2c2b2a8216f45c4def324417197af4bc899f3a6b599d6180 files/seq24-0.8.7-sams.patch 17299
+AUX seq24-0.8.7.olivier.patch 30802 RMD160 f5f1c89c450f105481afaf5af9cf266f83d9fc58 SHA1 696e0921f25b2b8e07eef410ac7b16d3a5835e55 SHA256 eca19d6d017fdad07e8870ac9001125172b794eb2f321c85647a584c09879c98
+MD5 a1b8d90567971e13436dfdae9e7fbe40 files/seq24-0.8.7.olivier.patch 30802
+RMD160 f5f1c89c450f105481afaf5af9cf266f83d9fc58 files/seq24-0.8.7.olivier.patch 30802
+SHA256 eca19d6d017fdad07e8870ac9001125172b794eb2f321c85647a584c09879c98 files/seq24-0.8.7.olivier.patch 30802
+AUX seq24-0.8.7.olivier2.patch 47109 RMD160 bf853107670de5b79dfc734c1c1a93ff19768b9d SHA1 83679034e6ec12e2ce7eeb31a7b112dfd7007d72 SHA256 50f39e209be96091e59b00f97243123d629a669ac04c1dbb64baa4ce0719f0b4
+MD5 919b97f24e7a34224820ad1303a68678 files/seq24-0.8.7.olivier2.patch 47109
+RMD160 bf853107670de5b79dfc734c1c1a93ff19768b9d files/seq24-0.8.7.olivier2.patch 47109
+SHA256 50f39e209be96091e59b00f97243123d629a669ac04c1dbb64baa4ce0719f0b4 files/seq24-0.8.7.olivier2.patch 47109
+AUX seq24-0.8.7.prio.diff 3013 RMD160 66cae26eede06323cd03896a634a946a34ad0aaf SHA1 d98ad460499f780457a643c488f0f46b81e66a2e SHA256 b801e9256bfc17b3995f846c74f2b672c6d4a7ee1b71def16d1a070a45bf0310
+MD5 692978549aa292fe526e4ecd7ea6524a files/seq24-0.8.7.prio.diff 3013
+RMD160 66cae26eede06323cd03896a634a946a34ad0aaf files/seq24-0.8.7.prio.diff 3013
+SHA256 b801e9256bfc17b3995f846c74f2b672c6d4a7ee1b71def16d1a070a45bf0310 files/seq24-0.8.7.prio.diff 3013
AUX seq24.png 1327 RMD160 ea0847e38413ad332ce3ef62b747f6a194214473 SHA1 fb92c157664fcd3de61ca60b72dfa0221fc12b1e SHA256 f1add80cac5ccd8708269b41fd03cdcb3da7b2824e208cf466156acc3867db65
MD5 5887c694bb35eb07359453f38a0eb549 files/seq24.png 1327
RMD160 ea0847e38413ad332ce3ef62b747f6a194214473 files/seq24.png 1327
@@ -21,10 +45,10 @@
MD5 dc64786dafa2f966952c0b5166f16bcc seq24-0.8.6.ebuild 1063
RMD160 8bf0c564d01ec7973ffdc37ee14971c9a02d7fb7 seq24-0.8.6.ebuild 1063
SHA256 f59e9fe421f214faedcf6ddfab37a0cc59d66148f94a41e8df73c96faf63d91b seq24-0.8.6.ebuild 1063
-EBUILD seq24-0.8.7.ebuild 1118 RMD160 3214cb9b2634e99dbf6d18c59175c00bacd77f95 SHA1 28604a4117e67dab7d56ca58647191b9459f9a61 SHA256 07f894f36d80f3b843285c6a00f7b6e1c248815195043d391a030f20e369f4f6
-MD5 7e8b8cf947548d6a78761243b9542f5d seq24-0.8.7.ebuild 1118
-RMD160 3214cb9b2634e99dbf6d18c59175c00bacd77f95 seq24-0.8.7.ebuild 1118
-SHA256 07f894f36d80f3b843285c6a00f7b6e1c248815195043d391a030f20e369f4f6 seq24-0.8.7.ebuild 1118
+EBUILD seq24-0.8.7.ebuild 1378 RMD160 601058b2a6997bbf92db64b784a92ab9b695f662 SHA1 b243182415ce6c4839e9f5c2526860d35bedbe31 SHA256 83c2b1ef7295c1d3b5fd4a1d968783662fe01a3734bf71e3edebd2e3593d1701
+MD5 fc3cace82a949330339236c2fd709bec seq24-0.8.7.ebuild 1378
+RMD160 601058b2a6997bbf92db64b784a92ab9b695f662 seq24-0.8.7.ebuild 1378
+SHA256 83c2b1ef7295c1d3b5fd4a1d968783662fe01a3734bf71e3edebd2e3593d1701 seq24-0.8.7.ebuild 1378
MD5 0627b58dabe3375c332c01835b4caeb6 files/digest-seq24-0.8.3-r2 235
RMD160 7861c8054aea6a9695c317867f8eaf049fd678bd files/digest-seq24-0.8.3-r2 235
SHA256 ea8db22606111b62fd8e76e300fd6d02ab1c050582baa0ac998e8173ba1b6db6 files/digest-seq24-0.8.3-r2 235
Added: trunk/overlays/proaudio/media-sound/seq24/files/seq24-0.8.7-label-fix.diff
===================================================================
--- trunk/overlays/proaudio/media-sound/seq24/files/seq24-0.8.7-label-fix.diff (rev 0)
+++ trunk/overlays/proaudio/media-sound/seq24/files/seq24-0.8.7-label-fix.diff 2007-12-11 14:32:10 UTC (rev 997)
@@ -0,0 +1,11 @@
+--- seq24-0.8.7/src/mainwid.cpp 2006-05-17 21:31:23.000000000 -0400
++++ seq24-0.8.7-patched/src/mainwid.cpp 2006-11-04 14:11:34.000000000 -0500
+@@ -212,7 +212,7 @@ mainwid::draw_sequence_on_pixmap( int a_
+ char str[20];
+ sprintf( str,
+ "%d-%d %ld/%ld",
+- seq->get_midi_bus(),
++ seq->get_midi_bus()+1,
+ seq->get_midi_channel()+1,
+ seq->get_bpm(), seq->get_bw() );
+
\ No newline at end of file
Added: trunk/overlays/proaudio/media-sound/seq24/files/seq24-0.8.7-menu-changes.diff
===================================================================
--- trunk/overlays/proaudio/media-sound/seq24/files/seq24-0.8.7-menu-changes.diff (rev 0)
+++ trunk/overlays/proaudio/media-sound/seq24/files/seq24-0.8.7-menu-changes.diff 2007-12-11 14:32:10 UTC (rev 997)
@@ -0,0 +1,78 @@
+--- seq24-0.8.7/src/seqmenu.cpp 2006-05-30 09:12:05.000000000 -0400
++++ seq24-0.8.7-patched/src/seqmenu.cpp 2006-11-04 14:04:09.000000000 -0500
+@@ -79,35 +79,38 @@ seqmenu::popup_menu( void )
+ m_menu->items().push_back(SeparatorElem());
+ Menu *menu_buses = manage( new Menu() );
+
+- m_menu->items().push_back( MenuElem( "Midi Bus", *menu_buses) );
++ m_menu->items().push_back( MenuElem( "MIDI Bus", *menu_buses) );
+
+- /* midi buses */
++ /* midi bus menu */
+ mastermidibus *masterbus = m_mainperf->get_master_midi_bus();
+ for ( int i=0; i< masterbus->get_num_out_buses(); i++ ){
++ menu_buses->items().push_back(MenuElem( masterbus->get_midi_out_bus_name(i),
++ SigC::bind(mem_fun(*this,&seqmenu::set_bus_and_midi_channel), i, -1 )));
++ }
+
+- Menu *menu_channels = manage( new Menu() );
++ char b[4];
++ Menu *menu_channels = manage( new Menu() );
+
+- menu_buses->items().push_back(MenuElem( masterbus->get_midi_out_bus_name(i),
+- *menu_channels ));
+- char b[4];
++ m_menu->items().push_back( MenuElem( "MIDI Channel", *menu_channels) );
+
+- /* midi channel menu */
+- for( int j=0; j<16; j++ ){
+- sprintf( b, "%d", j+1 );
+- std::string name = string(b);
+- int instrument = global_user_midi_bus_definitions[i].instrument[j];
+- if ( instrument >= 0 && instrument < c_maxBuses )
+- {
+- name = name + (string(" (") +
+- global_user_instrument_definitions[instrument].instrument +
+- string(")") );
+- }
+-
+- menu_channels->items().push_back(MenuElem(name,
+- SigC::bind(mem_fun(*this,&seqmenu::set_bus_and_midi_channel),
+- i, j )));
++ /* midi channel menu */
++ for( int j=0; j<16; j++ ){
++ sprintf( b, "%d", j+1 );
++ std::string name = string(b);
++ int a_bus = m_mainperf->get_sequence( m_current_seq )->get_midi_bus();
++ int instrument = global_user_midi_bus_definitions[a_bus].instrument[j];
++ if ( instrument >= 0 && instrument < c_maxBuses )
++ {
++ name = name + (string(" (") +
++ global_user_instrument_definitions[instrument].instrument +
++ string(")") );
+ }
+- }
++
++ menu_channels->items().push_back(MenuElem(name,
++ SigC::bind(mem_fun(*this,&seqmenu::set_bus_and_midi_channel),
++ -1, j )));
++ }
++
+ }
+
+ m_menu->popup(0,0);
+@@ -118,8 +121,12 @@ seqmenu::popup_menu( void )
+ seqmenu::set_bus_and_midi_channel( int a_bus, int a_ch )
+ {
+ if ( m_mainperf->is_active( m_current_seq )) {
+- m_mainperf->get_sequence( m_current_seq )->set_midi_bus( a_bus );
+- m_mainperf->get_sequence( m_current_seq )->set_midi_channel( a_ch );
++ if ( a_bus >= 0 ) {
++ m_mainperf->get_sequence( m_current_seq )->set_midi_bus( a_bus );
++ }
++ if ( a_ch >= 0 ) {
++ m_mainperf->get_sequence( m_current_seq )->set_midi_channel( a_ch );
++ }
+ m_mainperf->get_sequence( m_current_seq )->set_dirty();
+ }
+ }
\ No newline at end of file
Added: trunk/overlays/proaudio/media-sound/seq24/files/seq24-0.8.7-sams.patch
===================================================================
--- trunk/overlays/proaudio/media-sound/seq24/files/seq24-0.8.7-sams.patch (rev 0)
+++ trunk/overlays/proaudio/media-sound/seq24/files/seq24-0.8.7-sams.patch 2007-12-11 14:32:10 UTC (rev 997)
@@ -0,0 +1,530 @@
+diff -Naur seq24-0.8.7/src/mainwnd.cpp seq24-0.8.7-sam/src/mainwnd.cpp
+--- seq24-0.8.7/src/mainwnd.cpp 2006-08-13 16:44:32.000000000 -0400
++++ seq24-0.8.7-sam/src/mainwnd.cpp 2007-05-29 10:18:58.000000000 -0400
+@@ -198,6 +198,7 @@
+ void
+ mainwnd::start_playing( void )
+ {
++ global_jack_start_mode = false; // set live mode
+ m_mainperf->position_jack( false );
+ m_mainperf->start( false );
+ m_mainperf->start_jack( );
+diff -Naur seq24-0.8.7/src/perfedit.cpp seq24-0.8.7-sam/src/perfedit.cpp
+--- seq24-0.8.7/src/perfedit.cpp 2006-08-13 16:58:37.000000000 -0400
++++ seq24-0.8.7-sam/src/perfedit.cpp 2007-05-29 10:18:58.000000000 -0400
+@@ -251,6 +251,15 @@
+ bool
+ perfedit::on_key_press_event(GdkEventKey* a_ev)
+ {
++ if ( a_ev->state & GDK_CONTROL_MASK )
++ {
++ /* Ctrl-Z: Undo */
++ if ( a_ev->keyval == GDK_z || a_ev->keyval == GDK_Z )
++ {
++ undo();
++ return true;
++ }
++ }
+ if ( a_ev->type == GDK_KEY_PRESS ){
+
+ if ( global_print_keys ){
+@@ -267,6 +276,7 @@
+ stop_playing();
+ return true;
+ }
++
+ }
+
+ return false;
+@@ -282,6 +292,7 @@
+ void
+ perfedit::start_playing( void )
+ {
++ global_jack_start_mode = true; // set song mode
+ m_mainperf->position_jack( true );
+ m_mainperf->start_jack( );
+ m_mainperf->start( true );
+diff -Naur seq24-0.8.7/src/seqedit.cpp seq24-0.8.7-sam/src/seqedit.cpp
+--- seq24-0.8.7/src/seqedit.cpp 2006-05-30 10:04:52.000000000 -0400
++++ seq24-0.8.7-sam/src/seqedit.cpp 2007-05-29 10:18:58.000000000 -0400
+@@ -43,6 +43,8 @@
+ #include "menu_full.xpm"
+ #include "sequences.xpm"
+ #include "tools.xpm"
++#include "play2.xpm"
++#include "stop.xpm"
+
+ int seqedit::m_initial_zoom = 2;
+ int seqedit::m_initial_snap = c_ppqn / 4;
+@@ -127,6 +129,8 @@
+ m_seqdata_wid,
+ m_hadjust));
+
++ m_toggle_play = manage( new ToggleButton() );
++
+ m_seqroll_wid = manage( new seqroll( m_mainperf,
+ m_seq,
+ m_zoom,
+@@ -136,7 +140,8 @@
+ m_seqkeys_wid,
+ m_pos,
+ m_hadjust,
+- m_vadjust ));
++ m_vadjust,
++ m_toggle_play));
+
+
+
+@@ -201,8 +206,18 @@
+ /* exapand, cause rollview expands */
+ m_vbox->pack_start(*m_table, true, true, 0);
+
++ /* Stop and play buttons */
++ m_button_stop = manage( new Button( ));
++ m_button_stop->add( *manage( new Image(Gdk::Pixbuf::create_from_xpm_data( stop_xpm ))));
++ m_button_stop->signal_clicked().connect( mem_fun(*this,&seqedit::stop_playing));
++ dhbox->pack_start(*m_button_stop, false, false);
++
++ m_button_play = manage( new Button() );
++ m_button_play->add( *manage( new Image(Gdk::Pixbuf::create_from_xpm_data( play2_xpm ))));
++ m_button_play->signal_clicked().connect( mem_fun( *this, &seqedit::start_playing));
++ dhbox->pack_start(*m_button_play, false, false);
+
+-
++ dhbox->pack_start( *(manage(new VSeparator( ))), false, false, 4);
+
+ /* data button */
+ m_button_data = manage( new Button( " Event " ));
+@@ -216,7 +231,7 @@
+ dhbox->pack_start( *m_entry_data, true, true );
+
+ /* play, rec, thru */
+- m_toggle_play = manage( new ToggleButton() );
++ //m_toggle_play = manage( new ToggleButton() );
+ m_toggle_play->add( *manage( new Image(Gdk::Pixbuf::create_from_xpm_data( play_xpm ))));
+ m_toggle_play->signal_clicked().connect( mem_fun( *this, &seqedit::play_change_callback));
+ m_tooltips->set_tip( *m_toggle_play, "Sequence dumps data to midi bus." );
+@@ -234,10 +249,12 @@
+ m_toggle_play->set_active( m_seq->get_playing());
+ m_toggle_record->set_active( m_seq->get_recording());
+ m_toggle_thru->set_active( m_seq->get_thru());
+-
+- dhbox->pack_end( *m_toggle_record, false, false, 4);
+- dhbox->pack_end( *m_toggle_thru, false, false, 4);
+- dhbox->pack_end( *m_toggle_play, false, false, 4);
++
++ dhbox->pack_end( *m_toggle_record, false, false);
++ dhbox->pack_end( *m_toggle_thru, false, false);
++ dhbox->pack_end( *m_toggle_play, false, false);
++
++
+ dhbox->pack_end( *(manage(new VSeparator( ))), false, false, 4);
+
+ fill_top_bar();
+@@ -270,6 +287,9 @@
+ set_key( m_key );
+ set_key( m_key );
+
++ /* Put focus on the seqroll widget, so the start and stop keyboard shortcuts will work when the window first pops up. */
++ m_seqroll_wid->grab_focus();
++
+ }
+
+
+@@ -1337,3 +1357,16 @@
+
+ return false;
+ }
++
++
++void
++seqedit::start_playing( void )
++{
++ m_seqroll_wid->start_playing();
++}
++
++void
++seqedit::stop_playing( void )
++{
++ m_seqroll_wid->stop_playing();
++}
+diff -Naur seq24-0.8.7/src/seqedit.h seq24-0.8.7-sam/src/seqedit.h
+--- seq24-0.8.7/src/seqedit.h 2006-05-30 02:24:11.000000000 -0400
++++ seq24-0.8.7-sam/src/seqedit.h 2007-05-29 10:18:58.000000000 -0400
+@@ -161,6 +161,9 @@
+ Button *m_button_bw;
+ Entry *m_entry_bw;
+
++ Button *m_button_stop;
++ Button *m_button_play;
++
+ ToggleButton *m_toggle_play;
+ ToggleButton *m_toggle_record;
+ ToggleButton *m_toggle_thru;
+@@ -250,6 +253,9 @@
+
+ void mouse_action( mouse_action_e a_action );
+
++ void start_playing();
++ void stop_playing();
++
+ public:
+
+ seqedit( sequence *a_seq,
+@@ -259,10 +265,8 @@
+
+ ~seqedit( );
+
+-
+-
+ bool on_delete_event(GdkEventAny *a_event);
+-
++
+ };
+
+
+diff -Naur seq24-0.8.7/src/seqevent.cpp seq24-0.8.7-sam/src/seqevent.cpp
+--- seq24-0.8.7/src/seqevent.cpp 2006-05-29 01:19:55.000000000 -0400
++++ seq24-0.8.7-sam/src/seqevent.cpp 2007-05-29 11:36:34.000000000 -0400
+@@ -584,6 +584,7 @@
+ long tick_s;
+ long tick_f;
+ long tick_w;
++ bool check_for_unselect = true;
+
+ convert_x( c_eventevent_x, &tick_w );
+
+@@ -662,49 +663,57 @@
+ }
+ else
+ {
++ check_for_unselect = false;
+ /// needs update
+ }
+ }
+
+ if ( m_seq->select_events( tick_s, tick_f,
+ m_status, m_cc, sequence::e_is_selected ))
+- {
+
+- m_moving_init = true;
+- int note;
++ {
++ if ( check_for_unselect && (a_ev->state & GDK_CONTROL_MASK) )
++ {
++ m_seq->select_events( tick_s, tick_f,
++ m_status, m_cc, sequence::e_unselect_one );
++ } else
++ {
++ m_moving_init = true;
++ int note;
+
+- /* get the box that selected elements are in */
+- m_seq->get_selected_box( &tick_s, ¬e,
+- &tick_f, ¬e );
++ /* get the box that selected elements are in */
++ m_seq->get_selected_box( &tick_s, ¬e,
++ &tick_f, ¬e );
+
+- tick_f += tick_w;
++ tick_f += tick_w;
+
+- /* convert box to X,Y values */
+- convert_t( tick_s, &x );
+- convert_t( tick_f, &w );
++ /* convert box to X,Y values */
++ convert_t( tick_s, &x );
++ convert_t( tick_f, &w );
+
+- /* w is actually corrids now, so we have to change */
+- w = w-x;
++ /* w is actually corrids now, so we have to change */
++ w = w-x;
+
+- /* set the m_selected rectangle to hold the
+- x,y,w,h of our selected events */
++ /* set the m_selected rectangle to hold the
++ x,y,w,h of our selected events */
+
+- m_selected.x = x;
+- m_selected.width=w;
++ m_selected.x = x;
++ m_selected.width=w;
+
+- m_selected.y = (c_eventarea_y - c_eventevent_y)/2;
+- m_selected.height = c_eventevent_y;
++ m_selected.y = (c_eventarea_y - c_eventevent_y)/2;
++ m_selected.height = c_eventevent_y;
+
+
+- /* save offset that we get from the snap above */
+- int adjusted_selected_x = m_selected.x;
+- snap_x( &adjusted_selected_x );
+- m_move_snap_offset_x = ( m_selected.x - adjusted_selected_x);
++ /* save offset that we get from the snap above */
++ int adjusted_selected_x = m_selected.x;
++ snap_x( &adjusted_selected_x );
++ m_move_snap_offset_x = ( m_selected.x - adjusted_selected_x);
+
+- /* align selection for drawing */
+- snap_x( &m_selected.x );
+- snap_x( &m_current_x );
+- snap_x( &m_drop_x );
++ /* align selection for drawing */
++ snap_x( &m_selected.x );
++ snap_x( &m_current_x );
++ snap_x( &m_drop_x );
++ }
+
+ }
+ }
+@@ -957,3 +966,4 @@
+
+ return false;
+ }
++
+diff -Naur seq24-0.8.7/src/seqroll.cpp seq24-0.8.7-sam/src/seqroll.cpp
+--- seq24-0.8.7/src/seqroll.cpp 2006-05-29 00:58:37.000000000 -0400
++++ seq24-0.8.7-sam/src/seqroll.cpp 2007-05-29 11:34:07.000000000 -0400
+@@ -30,7 +30,8 @@
+ seqkeys *a_seqkeys_wid,
+ int a_pos,
+ Adjustment *a_hadjust,
+- Adjustment *a_vadjust )
++ Adjustment *a_vadjust,
++ ToggleButton *a_toggle_play)
+ : DrawingArea()
+ {
+ using namespace Menu_Helpers;
+@@ -57,6 +58,7 @@
+ m_seqevent_wid = a_seqevent_wid;
+ m_seqkeys_wid = a_seqkeys_wid;
+ m_pos = a_pos;
++ m_toggle_play = a_toggle_play;
+
+ m_clipboard = new sequence( );
+
+@@ -117,6 +119,7 @@
+ seqroll::~seqroll( )
+ {
+ delete m_clipboard;
++ //delete m_toggle_play; // FIXME?
+ }
+
+ /* popup menu calls this */
+@@ -863,6 +866,7 @@
+ grab_focus( );
+
+ bool needs_update = false;
++ bool check_for_unselect = true;
+
+ snapped_x = norm_x = (int) (a_ev->x + m_scroll_offset_x );
+ snapped_y = norm_y = (int) (a_ev->y + m_scroll_offset_y );
+@@ -937,7 +941,6 @@
+ {
+ m_seq->unselect();
+ }
+-
+
+ /* on direct click select only one event */
+ numsel = m_seq->select_note_events( tick_s,note_h,tick_s,note_h,
+@@ -952,6 +955,7 @@
+ else
+ {
+ needs_update = true;
++ check_for_unselect = false;
+ }
+ }
+
+@@ -962,30 +966,38 @@
+ {
+ if ( a_ev->button == 1 )
+ {
+- m_moving_init = true;
+ needs_update = true;
+
++ if(check_for_unselect && (a_ev->state & GDK_CONTROL_MASK))
++ {
++ /* on direct click unselect one event */
++ m_seq->select_note_events( tick_s,note_h,tick_s,note_h, sequence::e_unselect_one );
++ }
++ else
++ {
++ m_moving_init = true;
+
+- /* get the box that selected elements are in */
+- m_seq->get_selected_box( &tick_s, ¬e_h,
+- &tick_f, ¬e_l );
++ /* get the box that selected elements are in */
++ m_seq->get_selected_box( &tick_s, ¬e_h,
++ &tick_f, ¬e_l );
+
+
+- convert_tn_box_to_rect( tick_s, tick_f, note_h, note_l,
+- &m_selected.x,
+- &m_selected.y,
+- &m_selected.width,
+- &m_selected.height );
+-
+- /* save offset that we get from the snap above */
+- int adjusted_selected_x = m_selected.x;
+- snap_x( &adjusted_selected_x );
+- m_move_snap_offset_x = ( m_selected.x - adjusted_selected_x);
++ convert_tn_box_to_rect( tick_s, tick_f, note_h, note_l,
++ &m_selected.x,
++ &m_selected.y,
++ &m_selected.width,
++ &m_selected.height );
++
++ /* save offset that we get from the snap above */
++ int adjusted_selected_x = m_selected.x;
++ snap_x( &adjusted_selected_x );
++ m_move_snap_offset_x = ( m_selected.x - adjusted_selected_x);
+
+- /* align selection for drawing */
+- snap_x( &m_selected.x );
++ /* align selection for drawing */
++ snap_x( &m_selected.x );
+
+- m_current_x = m_drop_x = snapped_x;
++ m_current_x = m_drop_x = snapped_x;
++ }
+ }
+
+ /* middle mouse button */
+@@ -1251,6 +1263,18 @@
+
+ if ( a_p0->type == GDK_KEY_PRESS ){
+
++ if ( a_p0->keyval == m_perform->m_key_start )
++ {
++ start_playing();
++ return true;
++ }
++
++ if ( a_p0->keyval == m_perform->m_key_stop )
++ {
++ stop_playing();
++ return true;
++ }
++
+ if ( a_p0->keyval == GDK_Delete ){
+
+ m_seq->push_undo();
+@@ -1345,3 +1369,21 @@
+
+ }
+
++
++void
++seqroll::start_playing( void )
++{
++ global_jack_start_mode = false; // set live mode
++ m_seq->set_playing( true );
++ m_toggle_play->set_active( true );
++ m_perform->position_jack( false );
++ m_perform->start( false );
++ m_perform->start_jack( );
++}
++
++void
++seqroll::stop_playing( void )
++{
++ m_perform->stop_jack();
++ m_perform->stop();
++}
+diff -Naur seq24-0.8.7/src/seqroll.h seq24-0.8.7-sam/src/seqroll.h
+--- seq24-0.8.7/src/seqroll.h 2006-05-26 00:00:39.000000000 -0400
++++ seq24-0.8.7-sam/src/seqroll.h 2007-05-29 10:18:58.000000000 -0400
+@@ -76,6 +76,8 @@
+ seqevent *m_seqevent_wid;
+ seqkeys *m_seqkeys_wid;
+
++ ToggleButton *m_toggle_play;
++
+ int m_pos;
+
+ /* one pixel == m_zoom ticks */
+@@ -168,8 +170,6 @@
+
+ void force_draw( void );
+
+-
+-
+ public:
+
+ void reset();
+@@ -202,11 +202,16 @@
+ seqkeys *a_seqkeys_wid,
+ int a_pos,
+ Adjustment *a_hadjust,
+- Adjustment *a_vadjust );
++ Adjustment *a_vadjust,
++ ToggleButton *a_toggle_play);
+
+ void set_data_type( unsigned char a_status, unsigned char a_control );
+
+ ~seqroll( );
++
++ void start_playing( void );
++
++ void stop_playing( void );
+ };
+
+ #endif
+diff -Naur seq24-0.8.7/src/sequence.cpp seq24-0.8.7-sam/src/sequence.cpp
+--- seq24-0.8.7/src/sequence.cpp 2006-05-29 21:44:51.000000000 -0400
++++ seq24-0.8.7-sam/src/sequence.cpp 2007-05-29 10:18:58.000000000 -0400
+@@ -787,6 +787,13 @@
+ ret = 1;
+ break;
+ }
++ if ( a_action == e_unselect_one )
++ {
++ (*i).unselect( );
++ ev->unselect( );
++ ret++;
++ break;
++ }
+ }
+ }
+ }
+@@ -820,6 +827,12 @@
+ ret = 1;
+ break;
+ }
++ if ( a_action == e_unselect_one )
++ {
++ (*i).unselect( );
++ ret++;
++ break;
++ }
+ }
+ }
+
+@@ -875,6 +888,12 @@
+ ret = 1;
+ break;
+ }
++ if ( a_action == e_unselect_one )
++ {
++ (*i).unselect( );
++ ret++;
++ break;
++ }
+ }
+ }
+ }
+diff -Naur seq24-0.8.7/src/sequence.h seq24-0.8.7-sam/src/sequence.h
+--- seq24-0.8.7/src/sequence.h 2006-05-29 00:17:06.000000000 -0400
++++ seq24-0.8.7-sam/src/sequence.h 2007-05-29 10:18:58.000000000 -0400
+@@ -318,7 +318,8 @@
+ e_select,
+ e_select_one,
+ e_is_selected,
+- e_would_select
++ e_would_select,
++ e_unselect_one
+ };
+
+ /* select note events in range, returns number
Added: trunk/overlays/proaudio/media-sound/seq24/files/seq24-0.8.7.olivier.patch
===================================================================
--- trunk/overlays/proaudio/media-sound/seq24/files/seq24-0.8.7.olivier.patch (rev 0)
+++ trunk/overlays/proaudio/media-sound/seq24/files/seq24-0.8.7.olivier.patch 2007-12-11 14:32:10 UTC (rev 997)
@@ -0,0 +1,1186 @@
+diff -uN seq24-0.8.7/src/globals.h seq24-0.8.7-olivier/src/globals.h
+--- seq24-0.8.7/src/globals.h 2006-05-30 15:42:18.000000000 +0200
++++ seq24-0.8.7-olivier/src/globals.h 2007-07-01 10:39:42.000000000 +0200
+@@ -27,10 +27,12 @@
+ #include <gtkmm/main.h>
+ #include <gtkmm/drawingarea.h>
+
++#define printstack(f) printf("DEBUG: %s(%d)->%s\n",__FILE__,__LINE__,f)
++
+ using namespace std;
+
+ /* 16 per screen */
+-const int c_mainwnd_rows = 4;
++const int c_mainwnd_rows = 5;
+ const int c_mainwnd_cols = 8;
+ const int c_seqs_in_set = c_mainwnd_rows * c_mainwnd_cols;
+ const int c_max_sets = 32;
+@@ -55,7 +57,8 @@
+ const int c_seqarea_x = c_text_x * 15;
+ const int c_seqarea_y = c_text_y * 5;
+
+-const int c_mainwid_border = 0;
++const int c_mainwid_border = 2;
++const int c_mainwid_activator = 16;
+ const int c_mainwid_spacing = 2;
+
+ const int c_control_height = 0;
+@@ -63,7 +66,7 @@
+
+ const int c_mainwid_x = ((c_seqarea_x + c_mainwid_spacing )
+ * c_mainwnd_cols - c_mainwid_spacing
+- + c_mainwid_border * 2 );
++ + c_mainwid_border * 2 + c_mainwid_activator);
+ const int c_mainwid_y = ((c_seqarea_y + c_mainwid_spacing )
+ * c_mainwnd_rows
+ + c_mainwid_border * 2
+@@ -149,7 +152,7 @@
+ const int c_paste = 2;
+
+ /* redraw when recording ms */
+-const int c_redraw_ms = 40;
++const int c_redraw_ms = 100;
+
+
+
+diff -uN seq24-0.8.7/src/mainwid.cpp seq24-0.8.7-olivier/src/mainwid.cpp
+--- seq24-0.8.7/src/mainwid.cpp 2006-05-18 03:31:23.000000000 +0200
++++ seq24-0.8.7-olivier/src/mainwid.cpp 2007-07-01 18:18:58.000000000 +0200
+@@ -97,8 +97,9 @@
+ -1 );
+
+ fill_background_window();
++ draw_activator_on_pixmap();
+ draw_sequences_on_pixmap();
+-
++
+
+
+ }
+@@ -115,6 +116,44 @@
+ }
+
+
++
++void
++mainwid::draw_activator_on_pixmap(){
++ int base_y;
++
++ for (int i=0;i<c_mainwnd_rows;i++){
++ base_y = (c_mainwid_border + (c_seqarea_y + c_mainwid_spacing) * i);
++ m_gc->set_foreground(m_black);
++ m_pixmap->draw_rectangle(m_gc, true,
++ m_window_x-c_mainwid_activator,
++ c_mainwid_border+base_y-2,
++ c_mainwid_activator-2, c_seqarea_y-1);
++ m_gc->set_foreground((m_lines_activator[i])?m_black:m_white);
++ m_pixmap->draw_rectangle(m_gc, true,
++ m_window_x-c_mainwid_activator+1,
++ c_mainwid_border+base_y-1,
++ c_mainwid_activator-4, c_seqarea_y-3);
++ }
++
++
++}
++
++void
++mainwid::draw_activator_pixmap_on_window( int act )
++{
++ int base_y = (c_mainwid_border +
++ (c_seqarea_y + c_mainwid_spacing) * act);
++
++ m_window->draw_drawable(m_gc,
++ m_pixmap,
++ m_window_x-c_mainwid_activator,
++ base_y,
++ m_window_x-c_mainwid_activator,
++ base_y,
++ c_mainwid_activator,
++ c_seqarea_y );
++}
++
+ // updates background
+ void
+ mainwid::fill_background_window()
+@@ -193,7 +232,7 @@
+
+ font::Color col = font::BLACK;;
+
+- if ( m_foreground == m_black ){
++ if ( m_foreground == m_black || m_foreground == m_grey){
+ col = font::BLACK;
+ }
+ if ( m_foreground == m_white ){
+@@ -310,6 +349,9 @@
+ }
+ }
+
++
++
++
+ void
+ mainwid::draw_sequence_pixmap_on_window( int a_seq )
+ {
+@@ -331,10 +373,8 @@
+ base_x,
+ base_y,
+ c_seqarea_x,
+- c_seqarea_y ); }
+-
+-
+-
++ c_seqarea_y );
++ }
+ }
+
+ void
+@@ -435,7 +475,7 @@
+ void
+ mainwid::draw_pixmap_on_window()
+ {
+- queue_draw();
++ queue_draw();
+ }
+
+
+@@ -454,6 +494,25 @@
+ return true;
+ }
+
++// Translates XY corridinates to a activator number
++int
++mainwid::activator_from_xy( int a_x, int a_y ){
++ /* adjust for border */
++ int x = a_x - c_mainwid_border;
++ int y = a_y - c_mainwid_border;
++
++ if (x>m_window_x-c_mainwid_activator){
++ y /= (c_seqarea_y + c_mainwid_spacing);
++ m_lines_activator[y]=!m_lines_activator[y];
++ draw_activator_on_pixmap();
++ draw_activator_pixmap_on_window(y);
++
++// printf("activator selected :%d activated(%d)\n",y,m_lines_activator[y]);
++ return y;
++ }
++ return -1;
++}
++
+ // Translates XY corridinates to a sequence number
+ int
+ mainwid::seq_from_xy( int a_x, int a_y )
+@@ -500,13 +559,15 @@
+ {
+ grab_focus();
+
+- m_current_seq = seq_from_xy( (int) a_p0->x, (int) a_p0->y );
+
++ m_current_seq = seq_from_xy( (int) a_p0->x, (int) a_p0->y );
+ if ( m_current_seq != -1 && a_p0->button == 1 ){
+
+ m_button_down = true;
+ }
+
++
++
+ return true;
+ }
+
+@@ -519,6 +580,19 @@
+
+ m_button_down = false;
+
++ int act_line=activator_from_xy( (int) a_p0->x, (int) a_p0->y );
++ if (act_line!=-1 && a_p0->button == 1 && !m_moving){
++ for (int i=0;i<c_mainwnd_cols;i++){
++ if (m_mainperf->is_active( i*c_mainwnd_rows+act_line )){
++ if (m_lines_activator[act_line])
++ m_mainperf->sequence_playing_on( i*c_mainwnd_rows+act_line );
++ else
++ m_mainperf->sequence_playing_off( i*c_mainwnd_rows+act_line );
++ draw_sequence_on_pixmap( i*c_mainwnd_rows+act_line );
++ draw_sequence_pixmap_on_window( i*c_mainwnd_rows+act_line);
++ }
++ }
++ }else
+ /* it hit a sequence ? */
+ // toggle play mode of sequence (left button)
+
+diff -uN seq24-0.8.7/src/mainwid.h seq24-0.8.7-olivier/src/mainwid.h
+--- seq24-0.8.7/src/mainwid.h 2006-03-28 06:36:59.000000000 +0200
++++ seq24-0.8.7-olivier/src/mainwid.h 2007-06-29 11:37:13.000000000 +0200
+@@ -68,6 +68,8 @@
+ GdkRectangle m_old;
+ GdkRectangle m_selected;
+
++ int m_lines_activator[c_mainwnd_rows];
++
+ int m_screenset;
+
+ perform *m_mainperf;
+@@ -109,8 +111,11 @@
+
+ void fill_background_window();
+ void draw_pixmap_on_window();
++ void draw_activator_on_pixmap();
++ void draw_activator_pixmap_on_window(int act);
+ void draw_sequence_pixmap_on_window( int a_seq );
+
++ int activator_from_xy( int a_x, int a_y );
+ int seq_from_xy( int a_x, int a_y );
+
+ int timeout( void );
+Les fichiers seq24-0.8.7/src/mainwid.o et seq24-0.8.7-olivier/src/mainwid.o sont diff\xE9rents.
+diff -uN seq24-0.8.7/src/mainwnd.cpp seq24-0.8.7-olivier/src/mainwnd.cpp
+--- seq24-0.8.7/src/mainwnd.cpp 2006-08-13 22:44:32.000000000 +0200
++++ seq24-0.8.7-olivier/src/mainwnd.cpp 2007-07-01 18:13:22.000000000 +0200
+@@ -21,14 +21,38 @@
+ #include "perform.h"
+ #include "midifile.h"
+ #include "perfedit.h"
+-
++#include "seqedit.h"
+ #include "play2.xpm"
+ #include "stop.xpm"
+ #include "perfedit.xpm"
+ #include "seq24.xpm"
+
++#include <gtkmm/stock.h>
++#include "gtkmm/expander.h"
++
++
++static mainwnd* __mainwnd=NULL;
++
++mainwnd* mainwnd::get_instance(){
++ return __mainwnd;
++}
++
++void
++mainwnd::display_sequence(seqedit* seq){
++
++ int nb_seq=m_notebook_seq->page_num(*seq);
++ if (nb_seq==-1){
++ m_notebook_seq->append_page(* ((seq)), seq->get_sequence()->get_name());
++ nb_seq=m_notebook_seq->get_n_pages()-1;
++ seq->link_to_notebook(m_notebook_seq);
++ }
++ m_notebook_seq->set_current_page(nb_seq);
++
++}
++
+ mainwnd::mainwnd(perform *a_p)
+ {
++ __mainwnd=this;
+
+
+ /* set the performance */
+@@ -40,6 +64,11 @@
+ m_main_wid = manage( new mainwid( m_mainperf ));
+ m_main_time = manage( new maintime( ));
+
++ m_notebook_seq = manage(new Notebook());
++ m_notebook_seq->set_border_width(0);
++ m_notebook_seq->set_show_tabs(false);
++
++
+ m_menubar = manage(new MenuBar());
+ m_menu_file = manage(new Menu());
+ m_menu_control = manage( new Menu());
+@@ -106,24 +135,37 @@
+ hbox->pack_start( *m_entry_notes, true, true );
+
+ /* 2nd hbox */
+- HBox *hbox2 = manage( new HBox( false, 0 ) );
+- hbox2->pack_start( *manage( new Image(Gdk::Pixbuf::create_from_xpm_data( seq24_xpm ))), false, false );
+- hbox2->pack_end( *m_main_time, false, false );
++ HBox *hbox_top = manage( new HBox( false, 0 ) );
++ hbox_top->pack_start( *manage( new Image(Gdk::Pixbuf::create_from_xpm_data( seq24_xpm ))), false, false );
++ hbox_top->pack_end( *m_main_time, false, false );
+
+ /* set up a vbox, put the menu in it, and add it */
+ VBox *vbox = new VBox();
++ m_expand_seqedit=manage(new Expander("View sequences"));
++ m_expand_seqedit->property_expanded().signal_changed().connect(
++ sigc::mem_fun(*this, &mainwnd::on_expander_changed)
++ );
++ m_expand_seqedit->add(*m_notebook_seq);
+ vbox->set_border_width( 10 );
+- vbox->pack_start(*hbox2, false, false );
++ vbox->pack_start(*hbox_top, false, false);
+ vbox->pack_start(*m_main_wid, true, true, 10 );
+- vbox->pack_start(*hbox, false, false );
++ vbox->pack_start(*m_expand_seqedit, false, true, 10 );
++
++ /* put all in vertical scrollwindow*/
++ ScrolledWindow* vscroll=manage(new ScrolledWindow());
++ vscroll->set_policy(Gtk::POLICY_NEVER,Gtk::POLICY_AUTOMATIC);
++ vscroll->add (*vbox);
++ vscroll->set_size_request(c_mainwid_x+40, c_mainwid_y+180); //border+the size of empty expander
+
+
+ VBox *ovbox = new VBox();
+
+ ovbox->pack_start(*m_menubar, false, false );
+- ovbox->pack_start( *vbox );
++ ovbox->pack_start( *vscroll );
++ ovbox->pack_start(*hbox, false, false );
+
+ /* add box */
++
+ this->add (*ovbox);
+
+ /* show everything */
+@@ -142,6 +184,16 @@
+
+ }
+
++void
++mainwnd::on_expander_changed(){
++
++ static int w=0,h=0;
++ resize_children ();
++ if(!m_expand_seqedit->get_expanded())
++// resize (w,h);
++// else
++ get_size(w,h);
++}
+
+ mainwnd::~mainwnd()
+ {
+@@ -273,12 +325,14 @@
+ }
+
+ }
+-
+ void
+ mainwnd::file_saveas_dialog( void )
+ {
+
+- FileSelection dialog( "Save As..." );
++// FileSelection dialog( "Save As..." );
++ FileChooserDialog dialog( "Save As..." , FILE_CHOOSER_ACTION_SAVE);
++ dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
++ dialog.add_button("Save", Gtk::RESPONSE_OK);
+ int result = dialog.run();
+
+ //Handle the response:
+@@ -323,7 +377,10 @@
+ void
+ mainwnd::file_open_dialog( void )
+ {
+- FileSelection dialog( "Open..." );
++// FileSelection dialog( "Open..." );
++ FileChooserDialog dialog( "Open..." , FILE_CHOOSER_ACTION_OPEN);
++ dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
++ dialog.add_button("Select", Gtk::RESPONSE_OK);
+ int result = dialog.run();
+
+ //Handle the response:
+@@ -374,10 +431,12 @@
+ mainwnd::file_import_dialog( void )
+ {
+
+- FileSelection dialog( "Import..." );
+-
++// FileSelection dialog( "Import..." );
++ FileChooserDialog dialog( "Import..." , FILE_CHOOSER_ACTION_OPEN);
++ dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
++ dialog.add_button("Select", Gtk::RESPONSE_OK);
+
+- HBox *abox = dialog.get_action_area();
++ HBox *abox = (HBox *)dialog.get_action_area();
+ HBox hbox( false, 2 );
+
+ m_adjust_load_offset = manage( new Adjustment( 0, -(c_max_sets - 1) , c_max_sets - 1, 1 ));
+@@ -566,12 +625,13 @@
+ bool
+ mainwnd::on_key_press_event(GdkEventKey* a_ev)
+ {
++ Gtk::Window::on_key_press_event(a_ev);
+
+- if( m_entry_notes->has_focus()){
+- m_entry_notes->event( (GdkEvent*) a_ev );
+- return false;
+- }
+- else
++// if( m_entry_notes->has_focus()){
++// m_entry_notes->event( (GdkEvent*) a_ev );
++// return false;
++// }
++// else
+ {
+ if ( a_ev->type == GDK_KEY_PRESS ){
+
+@@ -638,7 +698,6 @@
+ }
+ }
+ }
+-
+ return false;
+ }
+
+diff -uN seq24-0.8.7/src/mainwnd.h seq24-0.8.7-olivier/src/mainwnd.h
+--- seq24-0.8.7/src/mainwnd.h 2006-03-28 06:36:59.000000000 +0200
++++ seq24-0.8.7-olivier/src/mainwnd.h 2007-07-01 16:22:34.000000000 +0200
+@@ -46,7 +46,7 @@
+ #include <gtkmm/drawingarea.h>
+ #include <gtkmm/label.h>
+ #include <gtkmm/viewport.h>
+-#include <gtkmm/fileselection.h>
++#include <gtkmm/filechooserdialog.h>
+ #include <gtkmm/dialog.h>
+ #include <gtkmm/messagedialog.h>
+ #include <gtkmm/textview.h>
+@@ -54,6 +54,8 @@
+ #include <gtkmm/spinbutton.h>
+ #include <gtkmm/progressbar.h>
+ #include <gtkmm/dialog.h>
++#include <gtkmm/notebook.h>
++#include <gtkmm/expander.h>
+ #include <gtkmm/label.h>
+ #include <gdkmm/cursor.h>
+ #include <gtkmm/image.h>
+@@ -69,6 +71,7 @@
+
+ using namespace Menu_Helpers;
+
++class maintime;
+
+ class mainwnd : public Gtk::Window
+ {
+@@ -106,6 +109,10 @@
+
+ SpinButton *m_spinbutton_load_offset;
+ Adjustment *m_adjust_load_offset;
++
++ Notebook *m_notebook_seq;
++
++ Expander *m_expand_seqedit;
+
+ Entry *m_entry_notes;
+
+@@ -138,6 +145,7 @@
+ void sequence_key( int a_seq );
+
+ void set_window_title_filename( std::string a_file );
++ void on_expander_changed();
+
+ public:
+
+@@ -147,6 +155,9 @@
+ bool on_delete_event(GdkEventAny *a_e);
+ bool on_key_press_event(GdkEventKey* a_ev);
+ bool on_key_release_event(GdkEventKey* a_ev);
++ void display_sequence(seqedit*);
++
++ static mainwnd* get_instance();
+
+
+ };
+
+diff -uN seq24-0.8.7/src/seqdata.cpp seq24-0.8.7-olivier/src/seqdata.cpp
+--- seq24-0.8.7/src/seqdata.cpp 2006-05-18 06:40:15.000000000 +0200
++++ seq24-0.8.7-olivier/src/seqdata.cpp 2007-07-01 10:51:27.000000000 +0200
+@@ -58,12 +58,14 @@
+
+ m_scroll_offset_ticks = 0;
+ m_scroll_offset_x = 0;
++
++
+ }
+
+ void
+ seqdata::update_sizes()
+ {
+- if( is_realized() ) {
++ if(is_realized() && check_is_drawable() ) {
+ /* create pixmaps with window dimentions */
+
+ m_pixmap = Gdk::Pixmap::create( m_window,
+@@ -84,9 +86,12 @@
+ }
+
+
++
+ void
+ seqdata::redraw()
+ {
++ if (!check_is_drawable())
++ return;
+ update_pixmap();
+ queue_draw();
+ }
+@@ -177,6 +182,9 @@
+ void
+ seqdata::draw_events_on( Glib::RefPtr<Gdk::Drawable> a_draw )
+ {
++ if(!check_is_drawable())
++ return;
++
+ long tick;
+
+ unsigned char d0,d1;
+@@ -189,9 +197,8 @@
+
+ int start_tick = m_scroll_offset_ticks ;
+ int end_tick = (m_window_x * m_zoom) + m_scroll_offset_ticks;
+-
+- //printf( "draw_events_on\n" );
+-
++
++
+ m_gc->set_foreground( m_white );
+ a_draw->draw_rectangle(m_gc,true,
+ 0,
+@@ -267,17 +274,19 @@
+ int
+ seqdata::idle_redraw()
+ {
+- /* no flicker, redraw */
+- if ( !m_dragging ){
+- draw_events_on( m_window );
+- draw_events_on( m_pixmap );
+- }
++ /* no flicker, redraw */
++ if ( !m_dragging ){
++ draw_events_on( m_window );
++ draw_events_on( m_pixmap );
++ }
+ return true;
+ }
+
+ bool
+ seqdata::on_expose_event(GdkEventExpose* a_e)
+ {
++ if(!check_is_drawable())
++ return true;
+ m_window->draw_drawable(m_gc,
+ m_pixmap,
+ a_e->area.x,
+@@ -462,6 +471,9 @@
+ seqdata::draw_line_on_window( void )
+ {
+ int x,y,w,h;
++ if(!check_is_drawable())
++ return;
++
+ m_gc->set_foreground( m_black );
+ m_gc->set_line_attributes( 1,
+ Gdk::LINE_SOLID,
+@@ -517,8 +529,9 @@
+ void
+ seqdata::on_size_allocate(Gtk::Allocation& a_r )
+ {
+- Gtk::DrawingArea::on_size_allocate( a_r );
+-
++
++ Gtk::DrawingArea::on_size_allocate( a_r );
++
+ m_window_x = a_r.get_width();
+ m_window_y = a_r.get_height();
+
+@@ -530,7 +543,10 @@
+ void
+ seqdata::force_draw(void )
+ {
+- m_window->draw_drawable(m_gc,
++ if(!check_is_drawable())
++ return;
++
++ m_window->draw_drawable(m_gc,
+ m_pixmap,
+ 0,
+ 0,
+@@ -539,3 +555,24 @@
+ m_window_x,
+ m_window_y );
+ }
++
++
++bool
++seqdata::check_is_drawable(){
++ if (!is_drawable()||!is_realized())
++ return false;
++
++ if (!m_gc){
++ m_window = get_window();
++ m_gc = Gdk::GC::create( m_window );
++ }
++ if(!m_window_x){
++ m_window_x=m_window_y=10;
++ }
++
++ if(!m_gc){
++ printstack("check_is_drawable() : could not create GC");
++ return false;
++ }
++ return true;
++}
+diff -uN seq24-0.8.7/src/seqdata.h seq24-0.8.7-olivier/src/seqdata.h
+--- seq24-0.8.7/src/seqdata.h 2006-03-28 06:36:59.000000000 +0200
++++ seq24-0.8.7-olivier/src/seqdata.h 2007-07-01 10:20:41.000000000 +0200
+@@ -110,7 +110,8 @@
+ void change_horz( void );
+
+ void force_draw( void );
+-
++ bool check_is_drawable();
++
+ public:
+
+ seqdata( sequence *a_seq, int a_zoom, Gtk::Adjustment *a_hadjust );
+Les fichiers seq24-0.8.7/src/seqdata.o et seq24-0.8.7-olivier/src/seqdata.o sont diff\xE9rents.
+diff -uN seq24-0.8.7/src/seqedit.cpp seq24-0.8.7-olivier/src/seqedit.cpp
+--- seq24-0.8.7/src/seqedit.cpp 2006-05-30 16:04:52.000000000 +0200
++++ seq24-0.8.7-olivier/src/seqedit.cpp 2007-07-01 17:31:55.000000000 +0200
+@@ -25,6 +25,7 @@
+ #include "event.h"
+ #include "options.h"
+
++#include "mainwnd.h"
+
+ #include "play.xpm"
+ #include "rec.xpm"
+@@ -76,12 +77,15 @@
+
+
+
+-seqedit::seqedit( sequence *a_seq,
+- perform *a_perf,
+- // mainwid *a_mainwid,
+- int a_pos )
++//constructor
++seqedit::seqedit( sequence *a_seq, perform *a_perf, /* mainwid *a_mainwid, */ int a_pos )
++ :ScrolledWindow()
+ {
+
++ set_policy(Gtk::POLICY_AUTOMATIC,Gtk::POLICY_AUTOMATIC);
++
++
++
+ /* set the performance */
+ m_seq = a_seq;
+
+@@ -97,9 +101,10 @@
+ m_pos = a_pos;
+
+ /* main window */
+- set_title ( m_seq->get_name());
+- set_size_request(700, 500);
++ set_size_request(250, 500);
++ set_border_width (0);
+
++
+ m_seq->set_editing( true );
+
+ /* scroll bars */
+@@ -179,7 +184,7 @@
+
+ /* fill table */
+ m_table->attach( *m_seqkeys_wid, 0, 1, 1, 2, Gtk::SHRINK, Gtk::FILL );
+-
++
+ m_table->attach( *m_seqtime_wid, 1, 2, 0, 1, Gtk::FILL, Gtk::SHRINK );
+ m_table->attach( *m_seqroll_wid , 1, 2, 1, 2,
+ Gtk::FILL | Gtk::SHRINK,
+@@ -269,12 +274,9 @@
+ set_scale( m_scale );
+ set_key( m_key );
+ set_key( m_key );
+-
+ }
+
+
+-
+-
+ void
+ seqedit::create_menus( void )
+ {
+@@ -557,7 +559,7 @@
+
+ m_entry_name = manage( new Entry( ));
+ m_entry_name->set_max_length(26);
+- m_entry_name->set_width_chars(26);
++ m_entry_name->set_width_chars(20);
+ m_entry_name->set_text( m_seq->get_name());
+ m_entry_name->select_region(0,0);
+ m_entry_name->set_position(0);
+@@ -621,11 +623,11 @@
+
+ m_entry_bus = manage( new Entry());
+ m_entry_bus->set_max_length(60);
+- m_entry_bus->set_width_chars(60);
++ m_entry_bus->set_width_chars(30);
+ m_entry_bus->set_editable( false );
+
+ m_hbox->pack_start( *m_button_bus , false, false );
+- m_hbox->pack_start( *m_entry_bus , true, true );
++ m_hbox->pack_start( *m_entry_bus , false, false );
+
+ /* midi channel */
+ m_button_channel = manage( new Button());
+@@ -1194,6 +1196,8 @@
+ seqedit::name_change_callback( void )
+ {
+ m_seq->set_name( m_entry_name->get_text());
++ if (m_notebook)
++ m_notebook->set_tab_label_text(*this,(m_entry_name->get_text()));
+ // m_mainwid->update_sequence_on_window( m_pos );
+ }
+
+@@ -1285,12 +1289,12 @@
+
+ }
+
+-
+ void
+ seqedit::on_realize()
+ {
++
+ // we need to do the default realize
+- Gtk::Window::on_realize();
++ Gtk::ScrolledWindow::on_realize();
+
+ Glib::signal_timeout().connect(mem_fun(*this,&seqedit::timeout ), c_redraw_ms);
+
+@@ -1299,11 +1303,10 @@
+ bool
+ seqedit::timeout( void )
+ {
+-
+ if (m_seq->get_raise())
+ {
+ m_seq->set_raise(false);
+- raise();
++ mainwnd::get_instance()->display_sequence(this);
+ }
+
+ if (m_seq->is_dirty_edit() ){
+@@ -1328,7 +1331,6 @@
+ bool
+ seqedit::on_delete_event(GdkEventAny *a_event)
+ {
+- //printf( "seqedit::on_delete_event()\n" );
+ m_seq->set_recording( false );
+ m_mainperf->get_master_midi_bus()->set_sequence_input( false, NULL );
+ m_seq->set_editing( false );
+@@ -1337,3 +1339,15 @@
+
+ return false;
+ }
++
++
++void
++seqedit::link_to_notebook(Notebook* tabs){
++ m_notebook=tabs;
++}
++
++sequence*
++seqedit::get_sequence(){
++ return m_seq;
++}
++
+diff -uN seq24-0.8.7/src/seqedit.h seq24-0.8.7-olivier/src/seqedit.h
+--- seq24-0.8.7/src/seqedit.h 2006-05-30 08:24:11.000000000 +0200
++++ seq24-0.8.7-olivier/src/seqedit.h 2007-06-30 17:11:50.000000000 +0200
+@@ -38,7 +38,6 @@
+ #include <gtkmm/menu.h>
+ #include <gtkmm/menubar.h>
+ #include <gtkmm/eventbox.h>
+-#include <gtkmm/window.h>
+ #include <gtkmm/table.h>
+ #include <gtkmm/drawingarea.h>
+ #include <gtkmm/widget.h>
+@@ -55,6 +54,10 @@
+ #include <gtkmm/tooltips.h>
+ #include <gtkmm/invisible.h>
+ #include <gtkmm/image.h>
++#include <gtkmm/scrolledwindow.h>
++#include <gtkmm/box.h>
++#include <gtkmm/drawingarea.h>
++#include <gtkmm/notebook.h>
+
+ #include <sigc++/bind.h>
+
+@@ -66,13 +69,25 @@
+
+ using namespace Gtk;
+
++class seqtime;
++class seqroll;
++class seqkeys;
++class seqevent;
+
+ /* has a seqroll and paino roll */
+-class seqedit : public Gtk::Window
++class seqedit : public Gtk::ScrolledWindow
+ {
+-
++/*
++ protected:
++ virtual void on_size_request(Gtk::Requisition* requisition);
++ virtual void forall_vfunc(gboolean include_internals, GtkCallback callback, gpointer callback_data);
++
++ virtual void on_add(Gtk::Widget* child);
++ virtual void on_remove(Gtk::Widget* child);
++ virtual GtkType child_type_vfunc() const;
++*/
+ private:
+-
++ ScrolledWindow *content;
+ MenuBar *m_menubar;
+
+ Menu *m_menu_tools;
+@@ -171,6 +186,8 @@
+
+ Entry *m_entry_name;
+
++ Notebook *m_notebook;
++
+ /* the zoom 0 1 2 3 4
+ 1, 2, 4, 8, 16 */
+ int m_zoom;
+@@ -251,7 +268,6 @@
+ void mouse_action( mouse_action_e a_action );
+
+ public:
+-
+ seqedit( sequence *a_seq,
+ perform *a_perf,
+ // mainwid *a_mainwid,
+@@ -259,8 +275,9 @@
+
+ ~seqedit( );
+
+-
++ sequence* get_sequence();
+
++ void link_to_notebook(Notebook* tabs);
+ bool on_delete_event(GdkEventAny *a_event);
+
+ };
+Les fichiers seq24-0.8.7/src/seqedit.o et seq24-0.8.7-olivier/src/seqedit.o sont diff\xE9rents.
+diff -uN seq24-0.8.7/src/seqevent.cpp seq24-0.8.7-olivier/src/seqevent.cpp
+--- seq24-0.8.7/src/seqevent.cpp 2006-05-29 07:19:55.000000000 +0200
++++ seq24-0.8.7-olivier/src/seqevent.cpp 2007-07-01 10:52:23.000000000 +0200
+@@ -135,8 +135,10 @@
+ void
+ seqevent::update_sizes()
+ {
++ if(!check_is_drawable())
++ return;
+
+- if( is_realized() ) {
++ if( is_realized()) {
+ /* create pixmaps with window dimentions */
+
+ //printf( "update_sizes() m_window_x[%d] m_window_y[%d]\n",
+@@ -168,6 +170,8 @@
+ void
+ seqevent::redraw()
+ {
++ if(!check_is_drawable())
++ return;
+ m_scroll_offset_ticks = (int) m_hadjust->get_value();
+ m_scroll_offset_x = m_scroll_offset_ticks / m_zoom;
+
+@@ -180,8 +184,9 @@
+ void
+ seqevent::draw_background()
+ {
+- //printf ("draw_background()\n" );
+-
++ if(!check_is_drawable())
++ return;
++
+ /* clear background */
+ m_gc->set_foreground(m_white);
+ m_pixmap->draw_rectangle(m_gc,true,
+@@ -328,8 +333,9 @@
+ unsigned char d0,d1;
+
+ bool selected;
+-
+-
++ if(!check_is_drawable())
++ return;
++
+ /* draw boxes from sequence */
+ m_gc->set_foreground( m_black );
+
+@@ -412,11 +418,12 @@
+ void
+ seqevent::draw_selection_on_window()
+ {
++ if(!check_is_drawable())
++ return;
+ int x,w;
+
+ int y = (c_eventarea_y - c_eventevent_y)/2;
+ int h = c_eventevent_y;
+-
+ m_gc->set_line_attributes( 1,
+ Gdk::LINE_SOLID,
+ Gdk::CAP_NOT_LAST,
+@@ -470,6 +477,9 @@
+ bool
+ seqevent::on_expose_event(GdkEventExpose* e)
+ {
++ if(!check_is_drawable())
++ return true;
++
+ m_window->draw_drawable(m_gc,
+ m_pixmap,
+ e->area.x,
+@@ -957,3 +967,24 @@
+
+ return false;
+ }
++
++
++bool
++seqevent::check_is_drawable(){
++ if (!is_drawable()||!is_realized())
++ return false;
++
++ if (!m_gc){
++ m_window = get_window();
++ m_gc = Gdk::GC::create( m_window );
++ }
++ if(!m_window_x){
++ m_window_x=m_window_y=10;
++ }
++
++ if(!m_gc){
++ printstack("check_is_drawable() : could not create GC");
++ return false;
++ }
++ return true;
++}
+diff -uN seq24-0.8.7/src/seqevent.h seq24-0.8.7-olivier/src/seqevent.h
+--- seq24-0.8.7/src/seqevent.h 2006-05-26 12:34:19.000000000 +0200
++++ seq24-0.8.7-olivier/src/seqevent.h 2007-07-01 10:43:46.000000000 +0200
+@@ -125,7 +125,8 @@
+ void change_horz( void );
+
+ void force_draw( void );
+-
++ bool check_is_drawable();
++
+ public:
+
+ seqevent( sequence *a_seq,
+Les fichiers seq24-0.8.7/src/seqevent.o et seq24-0.8.7-olivier/src/seqevent.o sont diff\xE9rents.
+diff -uN seq24-0.8.7/src/seqkeys.cpp seq24-0.8.7-olivier/src/seqkeys.cpp
+--- seq24-0.8.7/src/seqkeys.cpp 2006-05-18 06:40:15.000000000 +0200
++++ seq24-0.8.7-olivier/src/seqkeys.cpp 2007-07-01 11:02:51.000000000 +0200
+@@ -122,6 +122,7 @@
+ void
+ seqkeys::update_pixmap()
+ {
++
+ m_gc->set_foreground(m_black);
+ m_pixmap->draw_rectangle(m_gc,true,
+ 0,
+Les fichiers seq24-0.8.7/src/seqkeys.o et seq24-0.8.7-olivier/src/seqkeys.o sont diff\xE9rents.
+diff -uN seq24-0.8.7/src/seqmenu.cpp seq24-0.8.7-olivier/src/seqmenu.cpp
+--- seq24-0.8.7/src/seqmenu.cpp 2006-05-30 15:12:05.000000000 +0200
++++ seq24-0.8.7-olivier/src/seqmenu.cpp 2007-06-30 18:10:02.000000000 +0200
+@@ -22,6 +22,7 @@
+ #include "seqedit.h"
+ #include "font.h"
+
++#include "mainwnd.h"
+
+ // Constructor
+
+@@ -144,6 +145,8 @@
+ m_mainperf,
+ m_current_seq
+ );
++ mainwnd::get_instance()->display_sequence(manage(seq_edit));
++
+ }
+ else {
+ m_mainperf->get_sequence( m_current_seq )->set_raise(true);
+@@ -155,6 +158,7 @@
+ m_mainperf,
+ m_current_seq
+ );
++ mainwnd::get_instance()->display_sequence(manage(seq_edit));
+ }
+ }
+
+Les fichiers seq24-0.8.7/src/seqmenu.o et seq24-0.8.7-olivier/src/seqmenu.o sont diff\xE9rents.
+diff -uN seq24-0.8.7/src/seqroll.cpp seq24-0.8.7-olivier/src/seqroll.cpp
+--- seq24-0.8.7/src/seqroll.cpp 2006-05-29 06:58:37.000000000 +0200
++++ seq24-0.8.7-olivier/src/seqroll.cpp 2007-07-01 10:53:46.000000000 +0200
+@@ -260,7 +260,8 @@
+ void
+ seqroll::draw_background()
+ {
+-
++ if(!is_drawable() || !m_gc)
++ return;
+ //printf ("draw_background()\n" );
+
+ /* clear background */
+@@ -447,6 +448,8 @@
+ void
+ seqroll::draw_progress_on_window()
+ {
++ if(!is_drawable())
++ return;
+ m_window->draw_drawable(m_gc,
+ m_pixmap,
+ m_old_progress_x,
+@@ -473,6 +476,8 @@
+
+ void seqroll::draw_events_on( Glib::RefPtr<Gdk::Drawable> a_draw )
+ {
++ if(!is_drawable())
++ return;
+
+
+ long tick_s;
+@@ -489,7 +494,6 @@
+ int velocity;
+
+ draw_type dt;
+-
+
+
+ int start_tick = m_scroll_offset_ticks ;
+@@ -620,6 +624,8 @@
+ seqroll::draw_selection_on_window()
+ {
+ int x,y,w,h;
++ if(!is_drawable())
++ return;
+
+
+ if ( m_selecting || m_moving || m_paste || m_growing ){
+@@ -721,7 +727,9 @@
+ bool
+ seqroll::on_expose_event(GdkEventExpose* e)
+ {
+-
++ if(!is_drawable())
++ return true;
++
+ m_window->draw_drawable(m_gc,
+ m_pixmap,
+ e->area.x,
+@@ -739,6 +747,9 @@
+ void
+ seqroll::force_draw(void )
+ {
++ if(!is_drawable())
++ return;
++
+ m_window->draw_drawable(m_gc,
+ m_pixmap,
+ 0,
+Les fichiers seq24-0.8.7/src/seqroll.o et seq24-0.8.7-olivier/src/seqroll.o sont diff\xE9rents.
+diff -uN seq24-0.8.7/src/seqtime.cpp seq24-0.8.7-olivier/src/seqtime.cpp
+--- seq24-0.8.7/src/seqtime.cpp 2006-03-28 06:36:59.000000000 +0200
++++ seq24-0.8.7-olivier/src/seqtime.cpp 2007-07-01 16:56:48.000000000 +0200
+@@ -23,8 +23,11 @@
+
+
+ seqtime::seqtime(sequence *a_seq, int a_zoom,
+- Gtk::Adjustment *a_hadjust): DrawingArea()
++ Gtk::Adjustment *a_hadjust): DrawingArea()
+ {
++ m_window_x = 40;
++ m_window_y = 40;
++
+ m_seq = a_seq;
+ m_zoom = a_zoom;
+
+@@ -54,6 +57,7 @@
+ set_double_buffered( false );
+
+
++
+ }
+
+
+@@ -64,7 +68,7 @@
+
+ /* set these for later */
+ if( is_realized() ) {
+-
++
+ m_pixmap = Gdk::Pixmap::create( m_window,
+ m_window_x,
+ m_window_y, -1 );
+@@ -83,8 +87,6 @@
+ //Gtk::Main::idle.connect(mem_fun(this,&seqtime::idleProgress));
+ Glib::signal_timeout().connect(mem_fun(*this,&seqtime::idle_progress), 50);
+
+-
+-
+
+ // Now we can allocate any additional resources we need
+ m_window = get_window();
+@@ -117,8 +119,7 @@
+ m_window_x = a_r.get_width();
+ m_window_y = a_r.get_height();
+
+- update_sizes();
+-
++ update_sizes();
+ }
+
+
+@@ -169,7 +170,9 @@
+ {
+
+
+-
++ if(!is_drawable())
++ return;
++
+ /* clear background */
+ m_gc->set_foreground(m_white);
+ m_pixmap->draw_rectangle(m_gc,true,
+@@ -275,6 +278,8 @@
+ void
+ seqtime::draw_pixmap_on_window()
+ {
++ if(!is_drawable())
++ return;
+ m_window->draw_drawable(m_gc,
+ m_pixmap,
+ 0,0,
+@@ -286,6 +291,8 @@
+ bool
+ seqtime::on_expose_event(GdkEventExpose* a_e)
+ {
++ if(!is_drawable())
++ return true;
+ m_window->draw_drawable(m_gc,
+ m_pixmap,
+ a_e->area.x,
+@@ -300,6 +307,8 @@
+ void
+ seqtime::force_draw( void )
+ {
++ if(!is_drawable())
++ return;
+ m_window->draw_drawable(m_gc,
+ m_pixmap,
+ 0,0,
+Les fichiers seq24-0.8.7/src/seqtime.o et seq24-0.8.7-olivier/src/seqtime.o sont diff\xE9rents.
+diff -uN seq24-0.8.7/src/sequence.cpp seq24-0.8.7-olivier/src/sequence.cpp
+--- seq24-0.8.7/src/sequence.cpp 2006-05-30 03:44:51.000000000 +0200
++++ seq24-0.8.7-olivier/src/sequence.cpp 2007-06-30 14:45:58.000000000 +0200
+@@ -18,7 +18,6 @@
+ //
+ //-----------------------------------------------------------------------------
+ #include "sequence.h"
+-#include "seqedit.h"
+ #include <stdlib.h>
+
+ list < event > sequence::m_list_clipboard;
Added: trunk/overlays/proaudio/media-sound/seq24/files/seq24-0.8.7.olivier2.patch
===================================================================
--- trunk/overlays/proaudio/media-sound/seq24/files/seq24-0.8.7.olivier2.patch (rev 0)
+++ trunk/overlays/proaudio/media-sound/seq24/files/seq24-0.8.7.olivier2.patch 2007-12-11 14:32:10 UTC (rev 997)
@@ -0,0 +1,1715 @@
+diff -uN seq24-0.8.7/src/globals.h seq24-0.8.7-olivier/src/globals.h
+--- seq24-0.8.7/src/globals.h 2006-05-30 15:42:18.000000000 +0200
++++ seq24-0.8.7-olivier/src/globals.h 2007-07-01 10:39:42.000000000 +0200
+@@ -27,10 +27,12 @@
+ #include <gtkmm/main.h>
+ #include <gtkmm/drawingarea.h>
+
++#define printstack(f) printf("DEBUG: %s(%d)->%s\n",__FILE__,__LINE__,f)
++
+ using namespace std;
+
+ /* 16 per screen */
+-const int c_mainwnd_rows = 4;
++const int c_mainwnd_rows = 5;
+ const int c_mainwnd_cols = 8;
+ const int c_seqs_in_set = c_mainwnd_rows * c_mainwnd_cols;
+ const int c_max_sets = 32;
+@@ -55,7 +57,8 @@
+ const int c_seqarea_x = c_text_x * 15;
+ const int c_seqarea_y = c_text_y * 5;
+
+-const int c_mainwid_border = 0;
++const int c_mainwid_border = 2;
++const int c_mainwid_activator = 16;
+ const int c_mainwid_spacing = 2;
+
+ const int c_control_height = 0;
+@@ -63,7 +66,7 @@
+
+ const int c_mainwid_x = ((c_seqarea_x + c_mainwid_spacing )
+ * c_mainwnd_cols - c_mainwid_spacing
+- + c_mainwid_border * 2 );
++ + c_mainwid_border * 2 + c_mainwid_activator);
+ const int c_mainwid_y = ((c_seqarea_y + c_mainwid_spacing )
+ * c_mainwnd_rows
+ + c_mainwid_border * 2
+@@ -149,7 +152,7 @@
+ const int c_paste = 2;
+
+ /* redraw when recording ms */
+-const int c_redraw_ms = 40;
++const int c_redraw_ms = 100;
+
+
+
+
+diff -uN seq24-0.8.7/src/mainwid.cpp seq24-0.8.7-olivier/src/mainwid.cpp
+--- seq24-0.8.7/src/mainwid.cpp 2006-05-18 03:31:23.000000000 +0200
++++ seq24-0.8.7-olivier/src/mainwid.cpp 2007-07-04 23:37:24.000000000 +0200
+@@ -70,7 +70,14 @@
+ m_button_down = false;
+ m_moving = false;
+
++ // init queued play (0==off, 1==on, -1==nothing)
++ for (int i=0;i<(c_mainwnd_rows * c_mainwnd_cols);i++)
++ m_queued_to_play[i]=-1;
++
+ set_double_buffered( false );
++
++ m_cursor_move=Gdk::Cursor(get_display (), Gdk::HAND1);
++
+
+ }
+
+@@ -97,8 +104,9 @@
+ -1 );
+
+ fill_background_window();
++ draw_activator_on_pixmap();
+ draw_sequences_on_pixmap();
+-
++
+
+
+ }
+@@ -115,6 +123,44 @@
+ }
+
+
++
++void
++mainwid::draw_activator_on_pixmap(){
++ int base_y;
++
++ for (int i=0;i<c_mainwnd_rows;i++){
++ base_y = (c_mainwid_border + (c_seqarea_y + c_mainwid_spacing) * i);
++ m_gc->set_foreground(m_black);
++ m_pixmap->draw_rectangle(m_gc, true,
++ m_window_x-c_mainwid_activator,
++ c_mainwid_border+base_y-2,
++ c_mainwid_activator-2, c_seqarea_y-1);
++ m_gc->set_foreground((m_lines_activator[i])?m_black:m_white);
++ m_pixmap->draw_rectangle(m_gc, true,
++ m_window_x-c_mainwid_activator+1,
++ c_mainwid_border+base_y-1,
++ c_mainwid_activator-4, c_seqarea_y-3);
++ }
++
++
++}
++
++void
++mainwid::draw_activator_pixmap_on_window( int act )
++{
++ int base_y = (c_mainwid_border +
++ (c_seqarea_y + c_mainwid_spacing) * act);
++
++ m_window->draw_drawable(m_gc,
++ m_pixmap,
++ m_window_x-c_mainwid_activator,
++ base_y,
++ m_window_x-c_mainwid_activator,
++ base_y,
++ c_mainwid_activator,
++ c_seqarea_y );
++}
++
+ // updates background
+ void
+ mainwid::fill_background_window()
+@@ -168,17 +214,16 @@
+ if ( seq->get_playing() ){
+
+ m_last_playing[a_seq] = true;
+- m_background = m_black;
++ m_background = (m_queued_to_play[a_seq]!=-1)?m_grey:m_black;
+ m_foreground = m_white;
+
+- } else {
+-
++ } else{
+ m_last_playing[a_seq] = false;
+ m_background = m_white;
+- m_foreground = m_black;
++ m_foreground = (m_queued_to_play[a_seq]!=-1)?m_grey:m_black;
+ }
+
+- m_gc->set_foreground(m_background);
++ m_gc->set_foreground(m_background);
+ m_pixmap->draw_rectangle(m_gc,true,
+ base_x + 1,
+ base_y + 1,
+@@ -186,6 +231,7 @@
+ c_seqarea_y - 2 );
+
+
++// m_gc->set_background(m_background);
+ m_gc->set_foreground(m_foreground);
+ char name[20];
+ sprintf( name, "%.13s", seq->get_name() );
+@@ -193,10 +239,10 @@
+
+ font::Color col = font::BLACK;;
+
+- if ( m_foreground == m_black ){
++ if ( m_foreground == m_black){
+ col = font::BLACK;
+ }
+- if ( m_foreground == m_white ){
++ if ( m_foreground == m_white && m_background != m_grey){
+ col = font::WHITE;
+ }
+
+@@ -310,6 +356,9 @@
+ }
+ }
+
++
++
++
+ void
+ mainwid::draw_sequence_pixmap_on_window( int a_seq )
+ {
+@@ -331,10 +380,8 @@
+ base_x,
+ base_y,
+ c_seqarea_x,
+- c_seqarea_y ); }
+-
+-
+-
++ c_seqarea_y );
++ }
+ }
+
+ void
+@@ -435,7 +482,7 @@
+ void
+ mainwid::draw_pixmap_on_window()
+ {
+- queue_draw();
++ queue_draw();
+ }
+
+
+@@ -454,9 +501,32 @@
+ return true;
+ }
+
++// Translates XY corridinates to a activator number
++int
++mainwid::activator_from_xy( int a_x, int a_y ){
++ /* adjust for border */
++ int x = a_x - c_mainwid_border;
++ int y = a_y - c_mainwid_border;
++ if (!m_mainperf->is_running())
++ return -1;
++
++ if (x>m_window_x-c_mainwid_activator && x<= m_window_x){
++ y /= (c_seqarea_y + c_mainwid_spacing);
++ m_lines_activator[y]=!m_lines_activator[y];
++ draw_activator_on_pixmap();
++ draw_activator_pixmap_on_window(y);
++ return y;
++ }
++ return -1;
++}
++
+ // Translates XY corridinates to a sequence number
++// I splitted sequence on two part, one small on the top
++// to get a fast access to the editor, and one part to toggle the play
++// it's really ugly but it works ;)
++
+ int
+-mainwid::seq_from_xy( int a_x, int a_y )
++mainwid::seq_from_xy( int a_x, int a_y , bool& top)
+ {
+ /* adjust for border */
+ int x = a_x - c_mainwid_border;
+@@ -476,11 +546,11 @@
+ int box_test_y = y % (c_seqarea_y + c_mainwid_spacing);
+
+ /* right inactive side of area */
+- if ( box_test_x > c_seqarea_x
+- || box_test_y > c_seqarea_y ){
+-
+- return -1;
++ if ( box_test_x > c_seqarea_x || box_test_y > c_seqarea_y ){
++ return -1;
+ }
++ /* top area of seq (in fact for edit action) */
++ top =( box_test_y <= (c_text_y+4));
+
+ x /= (c_seqarea_x + c_mainwid_spacing);
+ y /= (c_seqarea_y + c_mainwid_spacing);
+@@ -499,64 +569,97 @@
+ mainwid::on_button_press_event(GdkEventButton* a_p0)
+ {
+ grab_focus();
++ bool top=false;
+
+- m_current_seq = seq_from_xy( (int) a_p0->x, (int) a_p0->y );
+
++ m_current_seq = seq_from_xy( (int) a_p0->x, (int) a_p0->y ,top);
+ if ( m_current_seq != -1 && a_p0->button == 1 ){
+
+ m_button_down = true;
+ }
+
++
++
+ return true;
+ }
+
++void
++mainwid::toggle_queued_sequences(){
++ for (int i=0;i<c_mainwnd_cols*c_mainwnd_rows;i++){
++ if (m_queued_to_play[i]==1)
++ m_mainperf->sequence_playing_on(i);
++ else if (m_queued_to_play[i]==0)
++ m_mainperf->sequence_playing_off(i);
++
++ if (m_queued_to_play[i]!=-1){
++ draw_sequence_on_pixmap( i);
++ draw_sequence_pixmap_on_window( i);
++ }
++ m_queued_to_play[i]=-1;
++ }
++
++}
+
+ bool
+ mainwid::on_button_release_event(GdkEventButton* a_p0)
+ {
+-
+- m_current_seq = seq_from_xy( (int) a_p0->x, (int) a_p0->y );
++ bool top=false;
++ m_current_seq = seq_from_xy( (int) a_p0->x, (int) a_p0->y , top);
+
+ m_button_down = false;
+
++ int act_line=activator_from_xy( (int) a_p0->x, (int) a_p0->y );
++ if (act_line!=-1 && a_p0->button == 1 && !m_moving){
++ for (int i=0;i<c_mainwnd_cols;i++){
++ if (m_mainperf->is_active( i*c_mainwnd_rows+act_line )){
++ m_queued_to_play[i*c_mainwnd_rows+act_line]=m_lines_activator[act_line];
++ if (m_lines_activator[act_line])
++ m_queued_to_play[ i*c_mainwnd_rows+act_line ]=1;
++ else
++ m_queued_to_play[ i*c_mainwnd_rows+act_line ]=0;
++ draw_sequence_on_pixmap( i*c_mainwnd_rows+act_line );
++ draw_sequence_pixmap_on_window( i*c_mainwnd_rows+act_line);
++ }
++ }
++ }else if ( m_current_seq != -1 && top && a_p0->button == 1 &&
++ !m_moving && m_mainperf->is_active(m_current_seq)){
+ /* it hit a sequence ? */
+- // toggle play mode of sequence (left button)
++ // fast edit access
++ seq_edit();
++
+
+- if ( m_current_seq != -1 && a_p0->button == 1 && !m_moving ){
++ }else if ( m_current_seq != -1 && a_p0->button == 1 && !m_moving ){
++ /* it hit a sequence ? */
++ // toggle play mode of sequence (left button)
+
+ if ( m_mainperf->is_active( m_current_seq )){
+
+- //sequence *seq = m_mainperf->get_sequence( m_current_seq );
+- //seq->set_playing( !seq->get_playing() );
+-
+- m_mainperf->sequence_playing_toggle( m_current_seq );
++ sequence *seq = m_mainperf->get_sequence( m_current_seq );
++ if (!m_mainperf->is_running())
++ m_mainperf->sequence_playing_toggle( m_current_seq );
++ else
++ m_queued_to_play[m_current_seq]=(seq->get_playing())?0:1;
+
+ draw_sequence_on_pixmap( m_current_seq );
+ draw_sequence_pixmap_on_window( m_current_seq);
+ }
+ }
++
+
+ if ( a_p0->button == 1 && m_moving ){
++ get_window()->set_cursor();
+
+ m_moving = false;
+
+- if ( ! m_mainperf->is_active( m_current_seq ) && m_current_seq != -1
+- && !m_mainperf->is_sequence_in_edit( m_current_seq ) ){
+-
+- m_mainperf->new_sequence( m_current_seq );
+- *(m_mainperf->get_sequence( m_current_seq )) = m_moving_seq;
++ if ( ! m_mainperf->is_active( m_current_seq ) && m_current_seq != -1){
+
++ m_mainperf->mov_sequence(m_old_seq,m_current_seq);
++ draw_sequence_on_pixmap( m_old_seq );
++ draw_sequence_pixmap_on_window( m_old_seq );
+ draw_sequence_on_pixmap( m_current_seq );
+ draw_sequence_pixmap_on_window( m_current_seq );
+
+- } else {
+-
+- m_mainperf->new_sequence( m_old_seq );
+- *(m_mainperf->get_sequence( m_old_seq )) = m_moving_seq;
+-
+- draw_sequence_on_pixmap( m_old_seq );
+- draw_sequence_pixmap_on_window( m_old_seq );
+- }
++ }
+
+
+ }
+@@ -572,24 +675,20 @@
+ bool
+ mainwid::on_motion_notify_event(GdkEventMotion* a_p0)
+ {
+- int seq = seq_from_xy( (int) a_p0->x, (int) a_p0->y );
++ bool top=false;
++ int seq = seq_from_xy( (int) a_p0->x, (int) a_p0->y ,top);
+
+ if ( m_button_down ){
++ if ( seq != m_current_seq && !m_moving ){
+
+- if ( seq != m_current_seq && !m_moving &&
+- !m_mainperf->is_sequence_in_edit( m_current_seq ) ){
+-
+- if ( m_mainperf->is_active( m_current_seq )){
++ if ( m_mainperf->is_active( m_current_seq )){
+
+- m_old_seq = m_current_seq;
+- m_moving = true;
+-
+- m_moving_seq = *(m_mainperf->get_sequence( m_current_seq ));
+- m_mainperf->delete_sequence( m_current_seq );
+- draw_sequence_on_pixmap( m_current_seq );
+- draw_sequence_pixmap_on_window( m_current_seq );
+- }
+- }
++ m_old_seq = m_current_seq;
++ m_moving = true;
++ get_window()->set_cursor(m_cursor_move);
++
++ }
++ }
+ }
+
+ return true;
+diff -uN seq24-0.8.7/src/mainwid.h seq24-0.8.7-olivier/src/mainwid.h
+--- seq24-0.8.7/src/mainwid.h 2006-03-28 06:36:59.000000000 +0200
++++ seq24-0.8.7-olivier/src/mainwid.h 2007-07-04 23:34:30.000000000 +0200
+@@ -42,6 +42,7 @@
+ #include <gtkmm/table.h>
+ #include <gtkmm/drawingarea.h>
+ #include <gtkmm/widget.h>
++#include <gdkmm/cursor.h>
+ #include <gtkmm/style.h>
+
+
+@@ -68,6 +69,8 @@
+ GdkRectangle m_old;
+ GdkRectangle m_selected;
+
++ int m_lines_activator[c_mainwnd_rows];
++
+ int m_screenset;
+
+ perform *m_mainperf;
+@@ -81,6 +84,7 @@
+ bool m_button_down;
+ bool m_moving;
+
++ Gdk::Cursor m_cursor_move;
+ /* when highlighting a bunch of events */
+
+ /* where the dragging started */
+@@ -90,6 +94,8 @@
+ int m_current_y;
+
+ int m_old_seq;
++
++ int m_queued_to_play[c_mainwnd_rows * c_mainwnd_cols];
+
+ long m_last_tick_x[c_max_sequence];
+ bool m_last_playing[c_max_sequence];
+@@ -109,9 +115,12 @@
+
+ void fill_background_window();
+ void draw_pixmap_on_window();
++ void draw_activator_on_pixmap();
++ void draw_activator_pixmap_on_window(int act);
+ void draw_sequence_pixmap_on_window( int a_seq );
+
+- int seq_from_xy( int a_x, int a_y );
++ int activator_from_xy( int a_x, int a_y );
++ int seq_from_xy( int a_x, int a_y ,bool&);
+
+ int timeout( void );
+
+@@ -132,6 +141,7 @@
+
+ void update_markers( int a_ticks );
+ void draw_marker_on_sequence( int a_seq, int a_tick );
++ void toggle_queued_sequences();
+
+ };
+
+diff -uN seq24-0.8.7/src/mainwnd.cpp seq24-0.8.7-olivier/src/mainwnd.cpp
+--- seq24-0.8.7/src/mainwnd.cpp 2006-08-13 22:44:32.000000000 +0200
++++ seq24-0.8.7-olivier/src/mainwnd.cpp 2007-07-04 21:50:27.000000000 +0200
+@@ -21,14 +21,52 @@
+ #include "perform.h"
+ #include "midifile.h"
+ #include "perfedit.h"
+-
++#include "seqedit.h"
+ #include "play2.xpm"
+ #include "stop.xpm"
+ #include "perfedit.xpm"
+ #include "seq24.xpm"
+
++#include <gtkmm/stock.h>
++#include "gtkmm/expander.h"
++
++
++static mainwnd* __mainwnd=NULL;
++
++mainwnd* mainwnd::get_instance(){
++ return __mainwnd;
++}
++
++void
++mainwnd::display_sequence(seqedit* seq){
++
++ int nb_seq=m_notebook_seq->page_num(*seq);
++ if (nb_seq==-1){
++ m_notebook_seq->append_page(* ((seq)), seq->get_sequence()->get_name());
++ nb_seq=m_notebook_seq->get_n_pages()-1;
++ seq->link_to_notebook(m_notebook_seq);
++ }
++ m_notebook_seq->set_current_page(nb_seq);
++
++}
++
++void
++mainwnd::dispose_sequedit(sequence *seq){
++ seqedit* m_seqedit;
++ for (int i=0;i<m_notebook_seq->get_n_pages();i++){
++ m_seqedit=(seqedit*)m_notebook_seq->get_nth_page(i);
++ if(m_seqedit->get_sequence()==seq){
++ m_notebook_seq->remove_page(i);
++ seq->set_editing(false);
++ printstack("FIXME:dispose_sequedit() Segmentation fault when delete m_seqedit ");
++ }
++ }
++}
++
++
+ mainwnd::mainwnd(perform *a_p)
+ {
++ __mainwnd=this;
+
+
+ /* set the performance */
+@@ -40,6 +78,11 @@
+ m_main_wid = manage( new mainwid( m_mainperf ));
+ m_main_time = manage( new maintime( ));
+
++ m_notebook_seq = manage(new Notebook());
++ m_notebook_seq->set_border_width(0);
++ m_notebook_seq->set_show_tabs(false);
++
++
+ m_menubar = manage(new MenuBar());
+ m_menu_file = manage(new Menu());
+ m_menu_control = manage( new Menu());
+@@ -106,24 +149,38 @@
+ hbox->pack_start( *m_entry_notes, true, true );
+
+ /* 2nd hbox */
+- HBox *hbox2 = manage( new HBox( false, 0 ) );
+- hbox2->pack_start( *manage( new Image(Gdk::Pixbuf::create_from_xpm_data( seq24_xpm ))), false, false );
+- hbox2->pack_end( *m_main_time, false, false );
++ HBox *hbox_top = manage( new HBox( false, 0 ) );
++ hbox_top->pack_start( *manage( new Image(Gdk::Pixbuf::create_from_xpm_data( seq24_xpm ))), false, false );
++ hbox_top->pack_end( *m_main_time, false, false );
+
+ /* set up a vbox, put the menu in it, and add it */
+ VBox *vbox = new VBox();
++ m_expand_seqedit=manage(new Expander("View sequences"));
++ m_expand_seqedit->set_expanded(true);
++ m_expand_seqedit->property_expanded().signal_changed().connect(
++ sigc::mem_fun(*this, &mainwnd::on_expander_changed)
++ );
++ m_expand_seqedit->add(*m_notebook_seq);
+ vbox->set_border_width( 10 );
+- vbox->pack_start(*hbox2, false, false );
++ vbox->pack_start(*hbox_top, false, false);
+ vbox->pack_start(*m_main_wid, true, true, 10 );
+- vbox->pack_start(*hbox, false, false );
++ vbox->pack_start(*m_expand_seqedit, false, true, 10 );
++
++ /* put all in vertical scrollwindow*/
++ ScrolledWindow* vscroll=manage(new ScrolledWindow());
++ vscroll->set_policy(Gtk::POLICY_NEVER,Gtk::POLICY_AUTOMATIC);
++ vscroll->add (*vbox);
++ vscroll->set_size_request(c_mainwid_x+40, c_mainwid_y+180); //border+the size of empty expander
+
+
+ VBox *ovbox = new VBox();
+
+ ovbox->pack_start(*m_menubar, false, false );
+- ovbox->pack_start( *vbox );
++ ovbox->pack_start( *vscroll );
++ ovbox->pack_start(*hbox, false, false );
+
+ /* add box */
++
+ this->add (*ovbox);
+
+ /* show everything */
+@@ -133,7 +190,7 @@
+
+ m_entry_notes->set_text( * m_mainperf->get_screen_set_notepad( m_mainperf->get_screenset() ));
+
+- m_timeout_connect = Glib::signal_timeout().connect(mem_fun(*this,&mainwnd::timer_callback), 25);
++ m_timeout_connect = Glib::signal_timeout().connect(mem_fun(*this,&mainwnd::timer_callback), 10);
+
+ m_quit = false;
+
+@@ -142,6 +199,16 @@
+
+ }
+
++void
++mainwnd::on_expander_changed(){
++
++ static int w=0,h=0;
++ resize_children ();
++ if(!m_expand_seqedit->get_expanded())
++// resize (w,h);
++// else
++ get_size(w,h);
++}
+
+ mainwnd::~mainwnd()
+ {
+@@ -161,7 +228,13 @@
+
+ m_main_time->idle_progress( ticks );
+ m_main_wid->update_markers( ticks );
+-
++ if (!ticks || ((ticks+5) % (c_ppqn*4))>6){
++ return true;
++ }
++ m_main_wid->toggle_queued_sequences();
++// printf("auto start seqs on(%d)\n",(ticks % c_ppqn)) ;
++
++
+ if ( m_adjust_bpm->get_value() != m_mainperf->get_bpm()){
+ m_adjust_bpm->set_value( m_mainperf->get_bpm());
+ }
+@@ -273,12 +346,14 @@
+ }
+
+ }
+-
+ void
+ mainwnd::file_saveas_dialog( void )
+ {
+
+- FileSelection dialog( "Save As..." );
++// FileSelection dialog( "Save As..." );
++ FileChooserDialog dialog( "Save As..." , FILE_CHOOSER_ACTION_SAVE);
++ dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
++ dialog.add_button("Save", Gtk::RESPONSE_OK);
+ int result = dialog.run();
+
+ //Handle the response:
+@@ -323,7 +398,10 @@
+ void
+ mainwnd::file_open_dialog( void )
+ {
+- FileSelection dialog( "Open..." );
++// FileSelection dialog( "Open..." );
++ FileChooserDialog dialog( "Open..." , FILE_CHOOSER_ACTION_OPEN);
++ dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
++ dialog.add_button("Select", Gtk::RESPONSE_OK);
+ int result = dialog.run();
+
+ //Handle the response:
+@@ -374,10 +452,12 @@
+ mainwnd::file_import_dialog( void )
+ {
+
+- FileSelection dialog( "Import..." );
++// FileSelection dialog( "Import..." );
++ FileChooserDialog dialog( "Import..." , FILE_CHOOSER_ACTION_OPEN);
++ dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
++ dialog.add_button("Select", Gtk::RESPONSE_OK);
+
+-
+- HBox *abox = dialog.get_action_area();
++ HBox *abox = (HBox *)dialog.get_action_area();
+ HBox hbox( false, 2 );
+
+ m_adjust_load_offset = manage( new Adjustment( 0, -(c_max_sets - 1) , c_max_sets - 1, 1 ));
+@@ -566,79 +646,73 @@
+ bool
+ mainwnd::on_key_press_event(GdkEventKey* a_ev)
+ {
++ if(Gtk::Window::on_key_press_event(a_ev))
++ return true;
+
+- if( m_entry_notes->has_focus()){
+- m_entry_notes->event( (GdkEvent*) a_ev );
+- return false;
+- }
+- else
+- {
+- if ( a_ev->type == GDK_KEY_PRESS ){
++ if ( a_ev->type == GDK_KEY_PRESS ){
+
+- if ( global_print_keys ){
+- printf( "key_press[%d]\n", a_ev->keyval );
+- }
+-
+- if ( a_ev->keyval == m_mainperf->m_key_bpm_dn ){
+- m_mainperf->set_bpm( m_mainperf->get_bpm() - 1 );
+- m_adjust_bpm->set_value( m_mainperf->get_bpm() );
+- }
+-
+- if ( a_ev->keyval == m_mainperf->m_key_bpm_up ){
+- m_mainperf->set_bpm( m_mainperf->get_bpm() + 1 );
+- m_adjust_bpm->set_value( m_mainperf->get_bpm() );
+- }
+-
+- if ( a_ev->keyval == m_mainperf->m_key_replace )
+- {
+- m_mainperf->set_sequence_control_status( c_status_replace );
+- }
+-
+- if (a_ev->keyval == m_mainperf->m_key_queue )
+- {
+- m_mainperf->set_sequence_control_status( c_status_queue );
+- }
+-
+- if ( a_ev->keyval == m_mainperf->m_key_snapshot_1 ||
+- a_ev->keyval == m_mainperf->m_key_snapshot_2 )
+- {
+- m_mainperf->set_sequence_control_status( c_status_snapshot );
+- }
+-
+- if ( a_ev->keyval == m_mainperf->m_key_screenset_dn ){
++ if ( global_print_keys ){
++ printf( "key_press[%d]\n", a_ev->keyval );
++ }
++
++ if ( a_ev->keyval == m_mainperf->m_key_bpm_dn ){
++ m_mainperf->set_bpm( m_mainperf->get_bpm() - 1 );
++ m_adjust_bpm->set_value( m_mainperf->get_bpm() );
++ }
++
++ if ( a_ev->keyval == m_mainperf->m_key_bpm_up ){
++ m_mainperf->set_bpm( m_mainperf->get_bpm() + 1 );
++ m_adjust_bpm->set_value( m_mainperf->get_bpm() );
++ }
++
++ if ( a_ev->keyval == m_mainperf->m_key_replace )
++ {
++ m_mainperf->set_sequence_control_status( c_status_replace );
++ }
++
++ if (a_ev->keyval == m_mainperf->m_key_queue )
++ {
++ m_mainperf->set_sequence_control_status( c_status_queue );
++ }
++
++ if ( a_ev->keyval == m_mainperf->m_key_snapshot_1 ||
++ a_ev->keyval == m_mainperf->m_key_snapshot_2 )
++ {
++ m_mainperf->set_sequence_control_status( c_status_snapshot );
++ }
++
++ if ( a_ev->keyval == m_mainperf->m_key_screenset_dn ){
+
+- m_mainperf->set_screenset( m_mainperf->get_screenset() - 1 );
+- m_main_wid->set_screenset( m_mainperf->get_screenset() );
+- m_adjust_ss->set_value( m_mainperf->get_screenset() );
+- m_entry_notes->set_text( * m_mainperf->get_screen_set_notepad(m_mainperf->get_screenset() ));
+- }
+-
+- if ( a_ev->keyval == m_mainperf->m_key_screenset_up ){
++ m_mainperf->set_screenset( m_mainperf->get_screenset() - 1 );
++ m_main_wid->set_screenset( m_mainperf->get_screenset() );
++ m_adjust_ss->set_value( m_mainperf->get_screenset() );
++ m_entry_notes->set_text( * m_mainperf->get_screen_set_notepad(m_mainperf->get_screenset() ));
++ }
++
++ if ( a_ev->keyval == m_mainperf->m_key_screenset_up ){
+
+- m_mainperf->set_screenset( m_mainperf->get_screenset() + 1 );
+- m_main_wid->set_screenset( m_mainperf->get_screenset() );
+- m_adjust_ss->set_value( m_mainperf->get_screenset() );
+- m_entry_notes->set_text( * m_mainperf->get_screen_set_notepad(m_mainperf->get_screenset() ));
+- }
+-
+- if ( a_ev->keyval == m_mainperf->m_key_start )
+- {
+- start_playing();
+- }
++ m_mainperf->set_screenset( m_mainperf->get_screenset() + 1 );
++ m_main_wid->set_screenset( m_mainperf->get_screenset() );
++ m_adjust_ss->set_value( m_mainperf->get_screenset() );
++ m_entry_notes->set_text( * m_mainperf->get_screen_set_notepad(m_mainperf->get_screenset() ));
++ }
++
++ if ( a_ev->keyval == m_mainperf->m_key_start )
++ {
++ start_playing();
++ }
+
+- if ( a_ev->keyval == m_mainperf->m_key_stop )
+- {
+- stop_playing();
+- }
++ if ( a_ev->keyval == m_mainperf->m_key_stop )
++ {
++ stop_playing();
++ }
+
+
+- if( m_mainperf->get_key_events()->count( a_ev->keyval) != 0 ){
+-
+- sequence_key( (*m_mainperf->get_key_events())[a_ev->keyval] );
+- }
++ if( m_mainperf->get_key_events()->count( a_ev->keyval) != 0 ){
++
++ sequence_key( (*m_mainperf->get_key_events())[a_ev->keyval] );
+ }
+ }
+-
+ return false;
+ }
+
+diff -uN seq24-0.8.7/src/mainwnd.h seq24-0.8.7-olivier/src/mainwnd.h
+--- seq24-0.8.7/src/mainwnd.h 2006-03-28 06:36:59.000000000 +0200
++++ seq24-0.8.7-olivier/src/mainwnd.h 2007-07-04 16:45:05.000000000 +0200
+@@ -46,7 +46,7 @@
+ #include <gtkmm/drawingarea.h>
+ #include <gtkmm/label.h>
+ #include <gtkmm/viewport.h>
+-#include <gtkmm/fileselection.h>
++#include <gtkmm/filechooserdialog.h>
+ #include <gtkmm/dialog.h>
+ #include <gtkmm/messagedialog.h>
+ #include <gtkmm/textview.h>
+@@ -54,6 +54,8 @@
+ #include <gtkmm/spinbutton.h>
+ #include <gtkmm/progressbar.h>
+ #include <gtkmm/dialog.h>
++#include <gtkmm/notebook.h>
++#include <gtkmm/expander.h>
+ #include <gtkmm/label.h>
+ #include <gdkmm/cursor.h>
+ #include <gtkmm/image.h>
+@@ -69,6 +71,7 @@
+
+ using namespace Menu_Helpers;
+
++class maintime;
+
+ class mainwnd : public Gtk::Window
+ {
+@@ -106,6 +109,10 @@
+
+ SpinButton *m_spinbutton_load_offset;
+ Adjustment *m_adjust_load_offset;
++
++ Notebook *m_notebook_seq;
++
++ Expander *m_expand_seqedit;
+
+ Entry *m_entry_notes;
+
+@@ -138,6 +145,7 @@
+ void sequence_key( int a_seq );
+
+ void set_window_title_filename( std::string a_file );
++ void on_expander_changed();
+
+ public:
+
+@@ -147,6 +155,9 @@
+ bool on_delete_event(GdkEventAny *a_e);
+ bool on_key_press_event(GdkEventKey* a_ev);
+ bool on_key_release_event(GdkEventKey* a_ev);
++ void display_sequence(seqedit*);
++ void dispose_sequedit(sequence *seq);
++ static mainwnd* get_instance();
+
+
+ };
+
+diff -uN seq24-0.8.7/src/perform.cpp seq24-0.8.7-olivier/src/perform.cpp
+--- seq24-0.8.7/src/perform.cpp 2006-08-13 22:42:38.000000000 +0200
++++ seq24-0.8.7-olivier/src/perform.cpp 2007-07-04 23:05:34.000000000 +0200
+@@ -536,6 +536,13 @@
+
+ }
+
++void
++perform::mov_sequence( int seq_ori, int seq_dest ){
++ set_active(seq_ori, false);
++ m_seqs[ seq_dest ]=m_seqs[ seq_ori ];m_seqs[ seq_ori ]=NULL;
++ set_active(seq_dest, true);
++}
++
+ bool
+ perform::is_sequence_in_edit( int a_num )
+ {
+@@ -554,6 +561,7 @@
+
+ }
+
++
+ midi_control *
+ perform::get_midi_control_toggle( unsigned int a_seq )
+ {
+@@ -865,6 +873,7 @@
+ }
+
+
++
+ void
+ perform::inner_start( bool a_state )
+ {
+diff -uN seq24-0.8.7/src/perform.h seq24-0.8.7-olivier/src/perform.h
+--- seq24-0.8.7/src/perform.h 2006-08-13 22:37:42.000000000 +0200
++++ seq24-0.8.7-olivier/src/perform.h 2007-07-04 15:03:34.000000000 +0200
+@@ -107,7 +107,6 @@
+ long m_tick;
+
+ void set_running( bool a_running );
+- bool is_running();
+
+ void set_playback_mode( bool a_playback_mode );
+
+@@ -216,6 +215,7 @@
+ void start_jack();
+ void stop_jack();
+ void position_jack( bool a_state );
++ bool is_running();
+
+ void off_sequences( void );
+
+@@ -228,6 +228,7 @@
+ bool is_dirty_names (int a_sequence);
+
+ void new_sequence( int a_sequence );
++ void mov_sequence( int seq_ori, int seq_dest );
+
+ /* plays all notes to Curent tick */
+ void play( long a_tick );
+diff -uN seq24-0.8.7/src/q_rec.xpm seq24-0.8.7-olivier/src/q_rec.xpm
+--- seq24-0.8.7/src/q_rec.xpm 2007-07-01 21:49:59.000000000 +0200
++++ seq24-0.8.7-olivier/src/q_rec.xpm 1970-01-01 01:00:00.000000000 +0100
+@@ -1,24 +0,0 @@
+-/* XPM */
+-static char * q_rec_xpm[] = {
+-"36 14 7 1",
+-" c None",
+-". c #000000",
+-"+ c #FFFFFF",
+-"@ c #9E9E9E",
+-"# c #FFBABA",
+-"$ c #FF5454",
+-"% c #B51E1E",
+-" ...... ",
+-" ...+..+... ",
+-" ..+++@@+++.. . .... ",
+-" .++++++++++. .. .. .. ",
+-"..++++++++++.. .#. .. .. ",
+-".++++++++++++. ......#$. .. .. ",
+-".+..++++++..+. .#####$$$. .. .. ",
+-".+@.++++++.@+. .$$$$$$$%. .. .. ",
+-".++++++++++++. ......$%. .. .. ",
+-"..+..++++..+.. .%. .. . .. ",
+-" .+@.+..+.@+. .. .. ... ",
+-" ..+++..+++.. . ..... ",
+-" ...++++... . ",
+-" ...... "};
+diff -uN seq24-0.8.7/src/quanize.xpm seq24-0.8.7-olivier/src/quanize.xpm
+--- seq24-0.8.7/src/quanize.xpm 2007-07-01 21:49:59.000000000 +0200
++++ seq24-0.8.7-olivier/src/quanize.xpm 1970-01-01 01:00:00.000000000 +0100
+@@ -1,19 +0,0 @@
+-/* XPM */
+-static char * quanize_xpm[] = {
+-"16 14 2 1",
+-" c None",
+-". c #000000",
+-" ",
+-" ",
+-" .... ",
+-" .. .. ",
+-" .. .. ",
+-" .. .. ",
+-" .. .. ",
+-" .. .. ",
+-" .. .. ",
+-" .. . .. ",
+-" .. ... ",
+-" ..... ",
+-" . ",
+-" "};
+diff -uN seq24-0.8.7/src/seqdata.cpp seq24-0.8.7-olivier/src/seqdata.cpp
+--- seq24-0.8.7/src/seqdata.cpp 2006-05-18 06:40:15.000000000 +0200
++++ seq24-0.8.7-olivier/src/seqdata.cpp 2007-07-01 10:51:27.000000000 +0200
+@@ -58,12 +58,14 @@
+
+ m_scroll_offset_ticks = 0;
+ m_scroll_offset_x = 0;
++
++
+ }
+
+ void
+ seqdata::update_sizes()
+ {
+- if( is_realized() ) {
++ if(is_realized() && check_is_drawable() ) {
+ /* create pixmaps with window dimentions */
+
+ m_pixmap = Gdk::Pixmap::create( m_window,
+@@ -84,9 +86,12 @@
+ }
+
+
++
+ void
+ seqdata::redraw()
+ {
++ if (!check_is_drawable())
++ return;
+ update_pixmap();
+ queue_draw();
+ }
+@@ -177,6 +182,9 @@
+ void
+ seqdata::draw_events_on( Glib::RefPtr<Gdk::Drawable> a_draw )
+ {
++ if(!check_is_drawable())
++ return;
++
+ long tick;
+
+ unsigned char d0,d1;
+@@ -189,9 +197,8 @@
+
+ int start_tick = m_scroll_offset_ticks ;
+ int end_tick = (m_window_x * m_zoom) + m_scroll_offset_ticks;
+-
+- //printf( "draw_events_on\n" );
+-
++
++
+ m_gc->set_foreground( m_white );
+ a_draw->draw_rectangle(m_gc,true,
+ 0,
+@@ -267,17 +274,19 @@
+ int
+ seqdata::idle_redraw()
+ {
+- /* no flicker, redraw */
+- if ( !m_dragging ){
+- draw_events_on( m_window );
+- draw_events_on( m_pixmap );
+- }
++ /* no flicker, redraw */
++ if ( !m_dragging ){
++ draw_events_on( m_window );
++ draw_events_on( m_pixmap );
++ }
+ return true;
+ }
+
+ bool
+ seqdata::on_expose_event(GdkEventExpose* a_e)
+ {
++ if(!check_is_drawable())
++ return true;
+ m_window->draw_drawable(m_gc,
+ m_pixmap,
+ a_e->area.x,
+@@ -462,6 +471,9 @@
+ seqdata::draw_line_on_window( void )
+ {
+ int x,y,w,h;
++ if(!check_is_drawable())
++ return;
++
+ m_gc->set_foreground( m_black );
+ m_gc->set_line_attributes( 1,
+ Gdk::LINE_SOLID,
+@@ -517,8 +529,9 @@
+ void
+ seqdata::on_size_allocate(Gtk::Allocation& a_r )
+ {
+- Gtk::DrawingArea::on_size_allocate( a_r );
+-
++
++ Gtk::DrawingArea::on_size_allocate( a_r );
++
+ m_window_x = a_r.get_width();
+ m_window_y = a_r.get_height();
+
+@@ -530,7 +543,10 @@
+ void
+ seqdata::force_draw(void )
+ {
+- m_window->draw_drawable(m_gc,
++ if(!check_is_drawable())
++ return;
++
++ m_window->draw_drawable(m_gc,
+ m_pixmap,
+ 0,
+ 0,
+@@ -539,3 +555,24 @@
+ m_window_x,
+ m_window_y );
+ }
++
++
++bool
++seqdata::check_is_drawable(){
++ if (!is_drawable()||!is_realized())
++ return false;
++
++ if (!m_gc){
++ m_window = get_window();
++ m_gc = Gdk::GC::create( m_window );
++ }
++ if(!m_window_x){
++ m_window_x=m_window_y=10;
++ }
++
++ if(!m_gc){
++ printstack("check_is_drawable() : could not create GC");
++ return false;
++ }
++ return true;
++}
+diff -uN seq24-0.8.7/src/seqdata.h seq24-0.8.7-olivier/src/seqdata.h
+--- seq24-0.8.7/src/seqdata.h 2006-03-28 06:36:59.000000000 +0200
++++ seq24-0.8.7-olivier/src/seqdata.h 2007-07-01 10:20:41.000000000 +0200
+@@ -110,7 +110,8 @@
+ void change_horz( void );
+
+ void force_draw( void );
+-
++ bool check_is_drawable();
++
+ public:
+
+ seqdata( sequence *a_seq, int a_zoom, Gtk::Adjustment *a_hadjust );
+diff -uN seq24-0.8.7/src/seqedit.cpp seq24-0.8.7-olivier/src/seqedit.cpp
+--- seq24-0.8.7/src/seqedit.cpp 2006-05-30 16:04:52.000000000 +0200
++++ seq24-0.8.7-olivier/src/seqedit.cpp 2007-07-01 17:31:55.000000000 +0200
+@@ -25,6 +25,7 @@
+ #include "event.h"
+ #include "options.h"
+
++#include "mainwnd.h"
+
+ #include "play.xpm"
+ #include "rec.xpm"
+@@ -76,12 +77,15 @@
+
+
+
+-seqedit::seqedit( sequence *a_seq,
+- perform *a_perf,
+- // mainwid *a_mainwid,
+- int a_pos )
++//constructor
++seqedit::seqedit( sequence *a_seq, perform *a_perf, /* mainwid *a_mainwid, */ int a_pos )
++ :ScrolledWindow()
+ {
+
++ set_policy(Gtk::POLICY_AUTOMATIC,Gtk::POLICY_AUTOMATIC);
++
++
++
+ /* set the performance */
+ m_seq = a_seq;
+
+@@ -97,9 +101,10 @@
+ m_pos = a_pos;
+
+ /* main window */
+- set_title ( m_seq->get_name());
+- set_size_request(700, 500);
++ set_size_request(250, 500);
++ set_border_width (0);
+
++
+ m_seq->set_editing( true );
+
+ /* scroll bars */
+@@ -179,7 +184,7 @@
+
+ /* fill table */
+ m_table->attach( *m_seqkeys_wid, 0, 1, 1, 2, Gtk::SHRINK, Gtk::FILL );
+-
++
+ m_table->attach( *m_seqtime_wid, 1, 2, 0, 1, Gtk::FILL, Gtk::SHRINK );
+ m_table->attach( *m_seqroll_wid , 1, 2, 1, 2,
+ Gtk::FILL | Gtk::SHRINK,
+@@ -269,12 +274,9 @@
+ set_scale( m_scale );
+ set_key( m_key );
+ set_key( m_key );
+-
+ }
+
+
+-
+-
+ void
+ seqedit::create_menus( void )
+ {
+@@ -557,7 +559,7 @@
+
+ m_entry_name = manage( new Entry( ));
+ m_entry_name->set_max_length(26);
+- m_entry_name->set_width_chars(26);
++ m_entry_name->set_width_chars(20);
+ m_entry_name->set_text( m_seq->get_name());
+ m_entry_name->select_region(0,0);
+ m_entry_name->set_position(0);
+@@ -621,11 +623,11 @@
+
+ m_entry_bus = manage( new Entry());
+ m_entry_bus->set_max_length(60);
+- m_entry_bus->set_width_chars(60);
++ m_entry_bus->set_width_chars(30);
+ m_entry_bus->set_editable( false );
+
+ m_hbox->pack_start( *m_button_bus , false, false );
+- m_hbox->pack_start( *m_entry_bus , true, true );
++ m_hbox->pack_start( *m_entry_bus , false, false );
+
+ /* midi channel */
+ m_button_channel = manage( new Button());
+@@ -1194,6 +1196,8 @@
+ seqedit::name_change_callback( void )
+ {
+ m_seq->set_name( m_entry_name->get_text());
++ if (m_notebook)
++ m_notebook->set_tab_label_text(*this,(m_entry_name->get_text()));
+ // m_mainwid->update_sequence_on_window( m_pos );
+ }
+
+@@ -1285,12 +1289,12 @@
+
+ }
+
+-
+ void
+ seqedit::on_realize()
+ {
++
+ // we need to do the default realize
+- Gtk::Window::on_realize();
++ Gtk::ScrolledWindow::on_realize();
+
+ Glib::signal_timeout().connect(mem_fun(*this,&seqedit::timeout ), c_redraw_ms);
+
+@@ -1299,11 +1303,10 @@
+ bool
+ seqedit::timeout( void )
+ {
+-
+ if (m_seq->get_raise())
+ {
+ m_seq->set_raise(false);
+- raise();
++ mainwnd::get_instance()->display_sequence(this);
+ }
+
+ if (m_seq->is_dirty_edit() ){
+@@ -1328,7 +1331,6 @@
+ bool
+ seqedit::on_delete_event(GdkEventAny *a_event)
+ {
+- //printf( "seqedit::on_delete_event()\n" );
+ m_seq->set_recording( false );
+ m_mainperf->get_master_midi_bus()->set_sequence_input( false, NULL );
+ m_seq->set_editing( false );
+@@ -1337,3 +1339,15 @@
+
+ return false;
+ }
++
++
++void
++seqedit::link_to_notebook(Notebook* tabs){
++ m_notebook=tabs;
++}
++
++sequence*
++seqedit::get_sequence(){
++ return m_seq;
++}
++
+diff -uN seq24-0.8.7/src/seqedit.h seq24-0.8.7-olivier/src/seqedit.h
+--- seq24-0.8.7/src/seqedit.h 2006-05-30 08:24:11.000000000 +0200
++++ seq24-0.8.7-olivier/src/seqedit.h 2007-06-30 17:11:50.000000000 +0200
+@@ -38,7 +38,6 @@
+ #include <gtkmm/menu.h>
+ #include <gtkmm/menubar.h>
+ #include <gtkmm/eventbox.h>
+-#include <gtkmm/window.h>
+ #include <gtkmm/table.h>
+ #include <gtkmm/drawingarea.h>
+ #include <gtkmm/widget.h>
+@@ -55,6 +54,10 @@
+ #include <gtkmm/tooltips.h>
+ #include <gtkmm/invisible.h>
+ #include <gtkmm/image.h>
++#include <gtkmm/scrolledwindow.h>
++#include <gtkmm/box.h>
++#include <gtkmm/drawingarea.h>
++#include <gtkmm/notebook.h>
+
+ #include <sigc++/bind.h>
+
+@@ -66,13 +69,25 @@
+
+ using namespace Gtk;
+
++class seqtime;
++class seqroll;
++class seqkeys;
++class seqevent;
+
+ /* has a seqroll and paino roll */
+-class seqedit : public Gtk::Window
++class seqedit : public Gtk::ScrolledWindow
+ {
+-
++/*
++ protected:
++ virtual void on_size_request(Gtk::Requisition* requisition);
++ virtual void forall_vfunc(gboolean include_internals, GtkCallback callback, gpointer callback_data);
++
++ virtual void on_add(Gtk::Widget* child);
++ virtual void on_remove(Gtk::Widget* child);
++ virtual GtkType child_type_vfunc() const;
++*/
+ private:
+-
++ ScrolledWindow *content;
+ MenuBar *m_menubar;
+
+ Menu *m_menu_tools;
+@@ -171,6 +186,8 @@
+
+ Entry *m_entry_name;
+
++ Notebook *m_notebook;
++
+ /* the zoom 0 1 2 3 4
+ 1, 2, 4, 8, 16 */
+ int m_zoom;
+@@ -251,7 +268,6 @@
+ void mouse_action( mouse_action_e a_action );
+
+ public:
+-
+ seqedit( sequence *a_seq,
+ perform *a_perf,
+ // mainwid *a_mainwid,
+@@ -259,8 +275,9 @@
+
+ ~seqedit( );
+
+-
++ sequence* get_sequence();
+
++ void link_to_notebook(Notebook* tabs);
+ bool on_delete_event(GdkEventAny *a_event);
+
+ };
+diff -uN seq24-0.8.7/src/seqevent.cpp seq24-0.8.7-olivier/src/seqevent.cpp
+--- seq24-0.8.7/src/seqevent.cpp 2006-05-29 07:19:55.000000000 +0200
++++ seq24-0.8.7-olivier/src/seqevent.cpp 2007-07-01 10:52:23.000000000 +0200
+@@ -135,8 +135,10 @@
+ void
+ seqevent::update_sizes()
+ {
++ if(!check_is_drawable())
++ return;
+
+- if( is_realized() ) {
++ if( is_realized()) {
+ /* create pixmaps with window dimentions */
+
+ //printf( "update_sizes() m_window_x[%d] m_window_y[%d]\n",
+@@ -168,6 +170,8 @@
+ void
+ seqevent::redraw()
+ {
++ if(!check_is_drawable())
++ return;
+ m_scroll_offset_ticks = (int) m_hadjust->get_value();
+ m_scroll_offset_x = m_scroll_offset_ticks / m_zoom;
+
+@@ -180,8 +184,9 @@
+ void
+ seqevent::draw_background()
+ {
+- //printf ("draw_background()\n" );
+-
++ if(!check_is_drawable())
++ return;
++
+ /* clear background */
+ m_gc->set_foreground(m_white);
+ m_pixmap->draw_rectangle(m_gc,true,
+@@ -328,8 +333,9 @@
+ unsigned char d0,d1;
+
+ bool selected;
+-
+-
++ if(!check_is_drawable())
++ return;
++
+ /* draw boxes from sequence */
+ m_gc->set_foreground( m_black );
+
+@@ -412,11 +418,12 @@
+ void
+ seqevent::draw_selection_on_window()
+ {
++ if(!check_is_drawable())
++ return;
+ int x,w;
+
+ int y = (c_eventarea_y - c_eventevent_y)/2;
+ int h = c_eventevent_y;
+-
+ m_gc->set_line_attributes( 1,
+ Gdk::LINE_SOLID,
+ Gdk::CAP_NOT_LAST,
+@@ -470,6 +477,9 @@
+ bool
+ seqevent::on_expose_event(GdkEventExpose* e)
+ {
++ if(!check_is_drawable())
++ return true;
++
+ m_window->draw_drawable(m_gc,
+ m_pixmap,
+ e->area.x,
+@@ -957,3 +967,24 @@
+
+ return false;
+ }
++
++
++bool
++seqevent::check_is_drawable(){
++ if (!is_drawable()||!is_realized())
++ return false;
++
++ if (!m_gc){
++ m_window = get_window();
++ m_gc = Gdk::GC::create( m_window );
++ }
++ if(!m_window_x){
++ m_window_x=m_window_y=10;
++ }
++
++ if(!m_gc){
++ printstack("check_is_drawable() : could not create GC");
++ return false;
++ }
++ return true;
++}
+diff -uN seq24-0.8.7/src/seqevent.h seq24-0.8.7-olivier/src/seqevent.h
+--- seq24-0.8.7/src/seqevent.h 2006-05-26 12:34:19.000000000 +0200
++++ seq24-0.8.7-olivier/src/seqevent.h 2007-07-01 10:43:46.000000000 +0200
+@@ -125,7 +125,8 @@
+ void change_horz( void );
+
+ void force_draw( void );
+-
++ bool check_is_drawable();
++
+ public:
+
+ seqevent( sequence *a_seq,
+diff -uN seq24-0.8.7/src/seqkeys.cpp seq24-0.8.7-olivier/src/seqkeys.cpp
+--- seq24-0.8.7/src/seqkeys.cpp 2006-05-18 06:40:15.000000000 +0200
++++ seq24-0.8.7-olivier/src/seqkeys.cpp 2007-07-01 11:02:51.000000000 +0200
+@@ -122,6 +122,7 @@
+ void
+ seqkeys::update_pixmap()
+ {
++
+ m_gc->set_foreground(m_black);
+ m_pixmap->draw_rectangle(m_gc,true,
+ 0,
+diff -uN seq24-0.8.7/src/seqmenu.cpp seq24-0.8.7-olivier/src/seqmenu.cpp
+--- seq24-0.8.7/src/seqmenu.cpp 2006-05-30 15:12:05.000000000 +0200
++++ seq24-0.8.7-olivier/src/seqmenu.cpp 2007-07-04 21:42:38.000000000 +0200
+@@ -22,6 +22,7 @@
+ #include "seqedit.h"
+ #include "font.h"
+
++#include "mainwnd.h"
+
+ // Constructor
+
+@@ -144,6 +145,8 @@
+ m_mainperf,
+ m_current_seq
+ );
++ mainwnd::get_instance()->display_sequence(manage(seq_edit));
++
+ }
+ else {
+ m_mainperf->get_sequence( m_current_seq )->set_raise(true);
+@@ -155,6 +158,7 @@
+ m_mainperf,
+ m_current_seq
+ );
++ mainwnd::get_instance()->display_sequence(manage(seq_edit));
+ }
+ }
+
+@@ -182,8 +186,10 @@
+ void
+ seqmenu::seq_cut(){
+
+- if ( m_mainperf->is_active( m_current_seq ) &&
+- !m_mainperf->is_sequence_in_edit( m_current_seq ) ){
++ if ( m_mainperf->is_active( m_current_seq ) ){
++
++ if(m_mainperf->is_sequence_in_edit( m_current_seq ))
++ mainwnd::get_instance()->dispose_sequedit(m_mainperf->get_sequence( m_current_seq ));
+
+ m_clipboard = *(m_mainperf->get_sequence( m_current_seq ));
+ m_mainperf->delete_sequence( m_current_seq );
+diff -uN seq24-0.8.7/src/seqmenu.h seq24-0.8.7-olivier/src/seqmenu.h
+--- seq24-0.8.7/src/seqmenu.h 2006-05-18 06:39:58.000000000 +0200
++++ seq24-0.8.7-olivier/src/seqmenu.h 2007-07-03 22:27:59.000000000 +0200
+@@ -59,7 +59,6 @@
+
+ void on_realize();
+
+- void seq_edit();
+ void seq_new();
+
+ void seq_copy();
+@@ -77,6 +76,7 @@
+
+ int m_current_seq;
+ void popup_menu();
++ void seq_edit();
+
+ public:
+
+diff -uN seq24-0.8.7/src/seqroll.cpp seq24-0.8.7-olivier/src/seqroll.cpp
+--- seq24-0.8.7/src/seqroll.cpp 2006-05-29 06:58:37.000000000 +0200
++++ seq24-0.8.7-olivier/src/seqroll.cpp 2007-07-01 10:53:46.000000000 +0200
+@@ -260,7 +260,8 @@
+ void
+ seqroll::draw_background()
+ {
+-
++ if(!is_drawable() || !m_gc)
++ return;
+ //printf ("draw_background()\n" );
+
+ /* clear background */
+@@ -447,6 +448,8 @@
+ void
+ seqroll::draw_progress_on_window()
+ {
++ if(!is_drawable())
++ return;
+ m_window->draw_drawable(m_gc,
+ m_pixmap,
+ m_old_progress_x,
+@@ -473,6 +476,8 @@
+
+ void seqroll::draw_events_on( Glib::RefPtr<Gdk::Drawable> a_draw )
+ {
++ if(!is_drawable())
++ return;
+
+
+ long tick_s;
+@@ -489,7 +494,6 @@
+ int velocity;
+
+ draw_type dt;
+-
+
+
+ int start_tick = m_scroll_offset_ticks ;
+@@ -620,6 +624,8 @@
+ seqroll::draw_selection_on_window()
+ {
+ int x,y,w,h;
++ if(!is_drawable())
++ return;
+
+
+ if ( m_selecting || m_moving || m_paste || m_growing ){
+@@ -721,7 +727,9 @@
+ bool
+ seqroll::on_expose_event(GdkEventExpose* e)
+ {
+-
++ if(!is_drawable())
++ return true;
++
+ m_window->draw_drawable(m_gc,
+ m_pixmap,
+ e->area.x,
+@@ -739,6 +747,9 @@
+ void
+ seqroll::force_draw(void )
+ {
++ if(!is_drawable())
++ return;
++
+ m_window->draw_drawable(m_gc,
+ m_pixmap,
+ 0,
+diff -uN seq24-0.8.7/src/seqtime.cpp seq24-0.8.7-olivier/src/seqtime.cpp
+--- seq24-0.8.7/src/seqtime.cpp 2006-03-28 06:36:59.000000000 +0200
++++ seq24-0.8.7-olivier/src/seqtime.cpp 2007-07-01 16:56:48.000000000 +0200
+@@ -23,8 +23,11 @@
+
+
+ seqtime::seqtime(sequence *a_seq, int a_zoom,
+- Gtk::Adjustment *a_hadjust): DrawingArea()
++ Gtk::Adjustment *a_hadjust): DrawingArea()
+ {
++ m_window_x = 40;
++ m_window_y = 40;
++
+ m_seq = a_seq;
+ m_zoom = a_zoom;
+
+@@ -54,6 +57,7 @@
+ set_double_buffered( false );
+
+
++
+ }
+
+
+@@ -64,7 +68,7 @@
+
+ /* set these for later */
+ if( is_realized() ) {
+-
++
+ m_pixmap = Gdk::Pixmap::create( m_window,
+ m_window_x,
+ m_window_y, -1 );
+@@ -83,8 +87,6 @@
+ //Gtk::Main::idle.connect(mem_fun(this,&seqtime::idleProgress));
+ Glib::signal_timeout().connect(mem_fun(*this,&seqtime::idle_progress), 50);
+
+-
+-
+
+ // Now we can allocate any additional resources we need
+ m_window = get_window();
+@@ -117,8 +119,7 @@
+ m_window_x = a_r.get_width();
+ m_window_y = a_r.get_height();
+
+- update_sizes();
+-
++ update_sizes();
+ }
+
+
+@@ -169,7 +170,9 @@
+ {
+
+
+-
++ if(!is_drawable())
++ return;
++
+ /* clear background */
+ m_gc->set_foreground(m_white);
+ m_pixmap->draw_rectangle(m_gc,true,
+@@ -275,6 +278,8 @@
+ void
+ seqtime::draw_pixmap_on_window()
+ {
++ if(!is_drawable())
++ return;
+ m_window->draw_drawable(m_gc,
+ m_pixmap,
+ 0,0,
+@@ -286,6 +291,8 @@
+ bool
+ seqtime::on_expose_event(GdkEventExpose* a_e)
+ {
++ if(!is_drawable())
++ return true;
+ m_window->draw_drawable(m_gc,
+ m_pixmap,
+ a_e->area.x,
+@@ -300,6 +307,8 @@
+ void
+ seqtime::force_draw( void )
+ {
++ if(!is_drawable())
++ return;
+ m_window->draw_drawable(m_gc,
+ m_pixmap,
+ 0,0,
+diff -uN seq24-0.8.7/src/sequence.cpp seq24-0.8.7-olivier/src/sequence.cpp
+--- seq24-0.8.7/src/sequence.cpp 2006-05-30 03:44:51.000000000 +0200
++++ seq24-0.8.7-olivier/src/sequence.cpp 2007-07-04 17:06:57.000000000 +0200
+@@ -18,7 +18,7 @@
+ //
+ //-----------------------------------------------------------------------------
+ #include "sequence.h"
+-#include "seqedit.h"
++#include "mainwnd.h"
+ #include <stdlib.h>
+
+ list < event > sequence::m_list_clipboard;
+@@ -179,7 +179,6 @@
+
+ sequence::~sequence()
+ {
+-
+ }
+
+ /* adds event in sorted manner */
+@@ -2873,7 +2872,6 @@
+ sequence::put_event_on_bus( event *a_e )
+ {
+ lock();
+-
+ unsigned char note = a_e->get_note();
+ bool skip = false;
+
Added: trunk/overlays/proaudio/media-sound/seq24/files/seq24-0.8.7.prio.diff
===================================================================
--- trunk/overlays/proaudio/media-sound/seq24/files/seq24-0.8.7.prio.diff (rev 0)
+++ trunk/overlays/proaudio/media-sound/seq24/files/seq24-0.8.7.prio.diff 2007-12-11 14:32:10 UTC (rev 997)
@@ -0,0 +1,73 @@
+diff -Nru /tmp/seq24-0.8.7/src/globals.h seq24-0.8.7/src/globals.h
+--- /tmp/seq24-0.8.7/src/globals.h 2006-05-30 15:42:18.000000000 +0200
++++ seq24-0.8.7/src/globals.h 2007-01-27 02:42:49.000000000 +0100
+@@ -159,7 +159,7 @@
+ const int c_perf_scale_x = 32; /*ticks per pixel */
+
+ extern bool global_showmidi;
+-extern bool global_priority;
++extern int global_priority;
+ extern bool global_stats;
+ extern bool global_pass_sysex;
+ extern bool global_with_jack_transport;
+diff -Nru /tmp/seq24-0.8.7/src/perform.cpp seq24-0.8.7/src/perform.cpp
+--- /tmp/seq24-0.8.7/src/perform.cpp 2006-08-13 22:42:38.000000000 +0200
++++ seq24-0.8.7/src/perform.cpp 2007-01-27 02:45:51.000000000 +0100
+@@ -1006,7 +1006,7 @@
+ if ( global_priority ){
+
+ memset(schp, 0, sizeof(sched_param));
+- schp->sched_priority = 1;
++ schp->sched_priority = global_priority;
+
+ if (sched_setscheduler(0, SCHED_FIFO, schp) != 0) {
+
+@@ -1564,7 +1564,7 @@
+ if ( global_priority ){
+
+ memset(schp, 0, sizeof(sched_param));
+- schp->sched_priority = 1;
++ schp->sched_priority = global_priority;
+
+ if (sched_setscheduler(0, SCHED_FIFO, schp) != 0) {
+
+Binary files /tmp/seq24-0.8.7/src/.perform.cpp.swp and seq24-0.8.7/src/.perform.cpp.swp differ
+diff -Nru /tmp/seq24-0.8.7/src/seq24.cpp seq24-0.8.7/src/seq24.cpp
+--- /tmp/seq24-0.8.7/src/seq24.cpp 2006-05-30 15:42:45.000000000 +0200
++++ seq24-0.8.7/src/seq24.cpp 2007-01-27 02:47:50.000000000 +0100
+@@ -38,7 +38,7 @@
+ {"help", 0, 0, 'h'},
+ {"showmidi", 0, 0, 's'},
+ {"stats", 0, 0, 'S' },
+- {"priority", 0, 0, 'p' },
++ {"priority", required_argument, 0, 'p' },
+ {"ignore",required_argument, 0, 'i'},
+ {"jack_transport",0, 0, 'j'},
+ {"jack_master",0, 0, 'J'},
+@@ -53,7 +53,7 @@
+
+ bool global_manual_alsa_ports = false;
+ bool global_showmidi = false;
+-bool global_priority = false;
++int global_priority = 0;
+ bool global_device_ignore = false;
+ int global_device_ignore_num = 0;
+ bool global_stats = false;
+@@ -160,7 +160,7 @@
+ printf( " --file <filename> : load midi file on startup\n" );
+ printf( " --manual_alsa_ports : seq24 won't attach alsa ports\n" );
+ printf( " --showmidi : dumps incoming midi to screen\n" );
+- printf( " --priority : runs higher priority with FIFO scheduler (must be root)\n" );
++ printf( " --priority <priority>: runs higher priority with FIFO scheduler\n" );
+ printf( " --pass_sysex : passes any incoming sysex messages to all outputs \n" );
+ printf( " --show_keys : prints pressed key value\n" );
+ printf( " --jack_transport : seq24 will sync to jack transport\n" );
+@@ -187,7 +187,7 @@
+
+ case 'p':
+
+- global_priority = true;
++ global_priority = atoi ( optarg );
+
+ break;
+
Modified: trunk/overlays/proaudio/media-sound/seq24/seq24-0.8.7.ebuild
===================================================================
--- trunk/overlays/proaudio/media-sound/seq24/seq24-0.8.7.ebuild 2007-12-11 13:47:21 UTC (rev 996)
+++ trunk/overlays/proaudio/media-sound/seq24/seq24-0.8.7.ebuild 2007-12-11 14:32:10 UTC (rev 997)
@@ -4,7 +4,7 @@
inherit eutils
RESTRICT="nomirror"
-IUSE="jack lash" # cairo"
+IUSE="jack lash devel-patches" # cairo"
DESCRIPTION="Seq24 is a loop based MIDI sequencer with focus on live performances."
HOMEPAGE="http://www.filter24.org/seq24/"
SRC_URI="http://www.filter24.org/seq24/${P}.tar.gz"
@@ -23,6 +23,14 @@
unpack ${A}
cd ${S}
#use cairo && use lash && epatch "${FILESDIR}/seq24-0.8.3-dr-lash-cairo.bz2"
+
+ if use devel-patches; then
+ epatch "${FILESDIR}/${P}.prio.diff"
+ epatch "${FILESDIR}/${P}-menu-changes.diff"
+ epatch "${FILESDIR}/${P}-label-fix.diff"
+ epatch "${FILESDIR}/${P}.olivier.patch"
+ #epatch "${FILESDIR}/${P}.olivier2.patch"
+ fi
}
src_compile() {