Update of /cvsroot/audacity/audacity-src/src
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv32574
Modified Files:
LabelDialog.cpp LabelDialog.h Menus.cpp
Log Message:
Tracks are now selected when moving from row to row, similar to the way
selecting a label with the mouse in a label track.
Index: LabelDialog.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/LabelDialog.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- LabelDialog.cpp 10 Aug 2006 10:34:36 -0000 1.6
+++ LabelDialog.cpp 17 Sep 2006 06:14:20 -0000 1.7
@@ -19,20 +19,22 @@
#include <wx/choice.h>
#include <wx/dc.h>
#include <wx/dialog.h>
+#include <wx/filedlg.h>
#include <wx/grid.h>
#include <wx/intl.h>
+#include <wx/msgdlg.h>
#include <wx/settings.h>
#include <wx/sizer.h>
#include <wx/textdlg.h>
-#include <wx/msgdlg.h>
-#include <wx/filedlg.h>
+#include "Internat.h"
#include "LabelDialog.h"
#include "LabelTrack.h"
+#include "Prefs.h"
+#include "Project.h"
#include "Track.h"
+#include "ViewInfo.h"
#include "widgets/TimeTextCtrl.h"
-#include "Prefs.h"
-#include "Internat.h"
enum Column
{
@@ -74,6 +76,7 @@
};
BEGIN_EVENT_TABLE(LabelDialog, wxDialog)
+ EVT_GRID_SELECT_CELL(LabelDialog::OnSelectCell)
EVT_GRID_CELL_CHANGE(LabelDialog::OnCellChange)
EVT_BUTTON(ID_INSERTA, LabelDialog::OnInsert)
EVT_BUTTON(ID_INSERTB, LabelDialog::OnInsert)
@@ -88,6 +91,7 @@
LabelDialog::LabelDialog(wxWindow *parent,
DirManager *dirmanager,
TrackList *tracks,
+ ViewInfo &viewinfo,
double rate)
: wxDialog(parent,
wxID_ANY,
@@ -97,6 +101,7 @@
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER),
mDirManager(dirmanager),
mTracks(tracks),
+ mViewInfo(&viewinfo),
mRate(rate)
{
// Create the main sizer
@@ -608,6 +613,29 @@
f.Close();
}
+void LabelDialog::OnSelectCell(wxGridEvent &event)
+{
+ TrackListIterator iter(mTracks);
+ Track *t = iter.First();
+ RowData *rd;
+
+ rd = mData[event.GetRow()];
+
+ t = iter.First();
+ while( t )
+ {
+ t->SetSelected( true );
+ t = iter.Next();
+ }
+
+ mViewInfo->sel0 = rd->stime;
+ mViewInfo->sel1 = rd->etime;
+
+ GetActiveProject()->RedrawProject();
+
+ event.Skip();
+}
+
void LabelDialog::OnCellChange(wxGridEvent &event)
{
static bool guard = false;
Index: Menus.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Menus.cpp,v
retrieving revision 1.275
retrieving revision 1.276
diff -u -d -r1.275 -r1.276
--- Menus.cpp 17 Sep 2006 01:07:11 -0000 1.275
+++ Menus.cpp 17 Sep 2006 06:14:21 -0000 1.276
@@ -3950,7 +3950,7 @@
void AudacityProject::OnEditLabels()
{
- LabelDialog d(this, mDirManager, mTracks, mRate);
+ LabelDialog d(this, mDirManager, mTracks, mViewInfo, mRate);
if (d.ShowModal() == wxID_OK) {
PushState(_("Edited labels"), _("Label"));
Index: LabelDialog.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/LabelDialog.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- LabelDialog.h 2 Aug 2006 03:36:46 -0000 1.3
+++ LabelDialog.h 17 Sep 2006 06:14:21 -0000 1.4
@@ -21,6 +21,7 @@
class DirManager;
class TrackList;
+class ViewInfo;
class RowData;
class EmptyLabelRenderer;
class LabelTrack;
@@ -34,6 +35,7 @@
LabelDialog(wxWindow *parent,
DirManager *dirmanager,
TrackList *tracks,
+ ViewInfo &viewinfo,
double rate);
~LabelDialog();
@@ -51,6 +53,7 @@
void OnRemove(wxCommandEvent &event);
void OnImport(wxCommandEvent &event);
void OnExport(wxCommandEvent &event);
+ void OnSelectCell(wxGridEvent &event);
void OnCellChange(wxGridEvent &event);
void OnChangeTrack(wxGridEvent &event, int row, RowData *rd);
void OnChangeLabel(wxGridEvent &event, int row, RowData *rd);
@@ -67,6 +70,7 @@
DirManager *mDirManager;
TrackList *mTracks;
+ ViewInfo *mViewInfo;
wxArrayString mTrackNames;
wxString mFormat;
double mRate;
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs