traverso-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Traverso-commit] traverso resources/keymap.xml src/traverso/song...


From: Ben Levitt
Subject: [Traverso-commit] traverso resources/keymap.xml src/traverso/song...
Date: Thu, 31 May 2007 04:32:12 +0000

CVSROOT:        /sources/traverso
Module name:    traverso
Changes by:     Ben Levitt <benjie>     07/05/31 04:32:12

Modified files:
        resources      : keymap.xml 
        src/traverso/songcanvas: SongView.cpp SongView.h 

Log message:
        add center_playhead() to SongView.  Now << V >> centers the playhead in 
the song, and if currently transporting, will resume following the playhead

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/keymap.xml?cvsroot=traverso&r1=1.72&r2=1.73
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/SongView.cpp?cvsroot=traverso&r1=1.65&r2=1.66
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/SongView.h?cvsroot=traverso&r1=1.28&r2=1.29

Patches:
Index: resources/keymap.xml
===================================================================
RCS file: /sources/traverso/traverso/resources/keymap.xml,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -b -r1.72 -r1.73
--- resources/keymap.xml        30 May 2007 06:05:05 -0000      1.72
+++ resources/keymap.xml        31 May 2007 04:32:12 -0000      1.73
@@ -434,6 +434,12 @@
                                <Object objectname="Interface" 
slotsignature="show_export_widget" modes="All" instantanious="0" />
                        </Objects>
                </keyfact>
+               <keyfact type="D_FKEY" key1="RETURN" >
+                       <Objects>
+                               <Object objectname="SpectralMeterView" 
slotsignature="export_avarage_curve" modes="All" instantanious="0" />
+                               <Object objectname="Interface" 
slotsignature="show_export_widget" modes="All" instantanious="0" />
+                       </Objects>
+               </keyfact>
                <keyfact type="D_FKEY" key1="U" >
                        <Objects>
                                <Object objectname="Song" 
slotsignature="toggle_mute" modes="All" sortorder="25" instantanious="0" />
@@ -449,12 +455,6 @@
                                <Object objectname="Song" 
slotsignature="toggle_arm" modes="All" sortorder="24" instantanious="0" />
                        </Objects>
                </keyfact>
-               <keyfact type="D_FKEY" key1="RETURN" >
-                       <Objects>
-                               <Object objectname="SpectralMeterView" 
slotsignature="export_avarage_curve" modes="All" instantanious="0" />
-                               <Object objectname="Interface" 
slotsignature="show_export_widget" modes="All" instantanious="0" />
-                       </Objects>
-               </keyfact>
                <keyfact type="D_FKEY" key1="G" >
                        <Objects>
                                <Object objectname="AudioClip" modes="All" 
sortorder="22" pluginname="TraversoCommands" commandname="ResetGain" 
arguments="1.0" />
@@ -497,6 +497,11 @@
                                <Object objectname="SongView" 
slotsignature="playhead_to_workcursor" modes="All" sortorder="12" 
submenu="Playhead" instantanious="0" />
                        </Objects>
                </keyfact>
+               <keyfact type="D_FKEY" key1="V" >
+                       <Objects>
+                               <Object objectname="SongView" 
slotsignature="center_playhead" modes="All" sortorder="15" submenu="Playhead" 
instantanious="0" />
+                       </Objects>
+               </keyfact>
                <keyfact type="D_FKEY" key1="HOME" >
                        <Objects>
                                <Object objectname="AudioClipView" 
mousehint="LRUD" modes="All" sortorder="7" pluginname="TraversoCommands" 
commandname="MoveClip"  arguments="move_to_start" />

Index: src/traverso/songcanvas/SongView.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/songcanvas/SongView.cpp,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -b -r1.65 -r1.66
--- src/traverso/songcanvas/SongView.cpp        31 May 2007 03:59:27 -0000      
1.65
+++ src/traverso/songcanvas/SongView.cpp        31 May 2007 04:32:12 -0000      
1.66
@@ -582,6 +582,16 @@
        return (Command*) 0;
 }
 
+Command * SongView::center_playhead( )
+{
+       nframes_t centerX = m_song->get_transport_frame();
+       set_hscrollbar_value(centerX / scalefactor - m_clipsViewPort->width() / 
2);
+       
+       follow_play_head();
+
+       return (Command*) 0;
+}
+
 void SongView::set_hscrollbar_value(int value)
 {
        m_clipsViewPort->horizontalScrollBar()->setValue(value);

Index: src/traverso/songcanvas/SongView.h
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/songcanvas/SongView.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- src/traverso/songcanvas/SongView.h  25 May 2007 06:55:33 -0000      1.28
+++ src/traverso/songcanvas/SongView.h  31 May 2007 04:32:12 -0000      1.29
@@ -59,6 +59,7 @@
        Q_CLASSINFO("work_cursor_move", tr("Workcursor: Move"))
        Q_CLASSINFO("add_marker", tr("Add Marker"))
        Q_CLASSINFO("playhead_to_workcursor", tr("Playhead: To workcursor"))
+       Q_CLASSINFO("center_playhead", tr("Playhead: Center"))
 
 public :
 
@@ -142,6 +143,7 @@
        Command* work_cursor_move();
        Command* add_marker();
        Command* playhead_to_workcursor();
+       Command* center_playhead();
        
 private slots:
        void scale_factor_changed();




reply via email to

[Prev in Thread] Current Thread [Next in Thread]