~ubuntu-branches/ubuntu/breezy/muse/breezy

« back to all changes in this revision

Viewing changes to cliplist/cliplist.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Kobras
  • Date: 2004-02-07 15:18:22 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040207151822-es27xxkzbcxkebjm
Tags: 0.6.3-1
* New upstream version.
* Added patches:
  + [10_alsa_init_fix] New, from upstream CVS.
    Initialize direction variable when setting Alsa parameters.
  + [10_canvas_translation_fix] New, from upstream CVS.
    Do not translate tooltips twice in canvas popup.
  + [10_checkbox_fix] New, from upstream CVS.
    Use proper set/test methods on metronome checkboxes.
  + [10_html_doc_cleanup] New.
    Fix links and HTML errors in documentation.
  + [20_allow_system_timer] New.
    The new upstream version fails by default if the real-time clock
    could not be accessed (usually the case when not running suid-root).
    This patch reverts the old behaviour of falling back to the more
    inaccurate system timer.
* Updated patches:
  + [11_PIC_fixes_fixup] Rediffed.
* Removed patches:
  + [20_no_atomic_asm] Merged upstream.
* debian/compat: Splice out debhelper compatibility level from rules file.
* debian/control: Build-depend on latest jack release by default.
  Closes: #228788
* debian/control: Bump standards version.
* debian/control: Use auto-generated debconf dependency via misc:Depends.
* debian/control: Minor tweaks to the long description.
* debian/control: Tighten fluidsynth build dependency to sane version.
* debian/muse.doc-base: New. Register HTML documentation with doc-base.
* debian/templates: Tiny rewording, and typo fix.
* debian/templates, debian/po/*: Switch to po-debconf for translations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//=========================================================
2
2
//  MusE
3
3
//  Linux Music Editor
4
 
//  $Id: cliplist.cpp,v 1.1 2002/01/30 14:54:03 muse Exp $
 
4
//  $Id: cliplist.cpp,v 1.1.1.1 2003/10/29 10:06:37 wschweer Exp $
5
5
//
6
6
//  (C) Copyright 2000 Werner Schweer (ws@seh.de)
7
7
//=========================================================
10
10
#include "song.h"
11
11
#include "globals.h"
12
12
#include "wave.h"
13
 
#include "../sf/sndfile.h"
14
13
#include "xml.h"
15
14
#include "posedit.h"
16
15
#include "cliplisteditorbase.h"
38
37
      ClipItem(QListView*, SndFile*);
39
38
      ClipItem(QListViewItem*, Clip*);
40
39
      SndFile* wf() const { return _wf; }
41
 
      Clip* clip() const { return _clip; }
 
40
      Clip* clip() const  { return _clip; }
42
41
      };
43
42
 
44
43
ClipItem::ClipItem(QListView* parent, SndFile* w)
45
44
   : QListViewItem(parent)
46
45
      {
47
 
      _wf = w;
 
46
      _wf   = w;
48
47
      _clip = 0;
49
48
      }
50
49
 
130
129
//---------------------------------------------------------
131
130
 
132
131
ClipListEdit::ClipListEdit()
 
132
   : TopWin(0, "cliplist", WType_TopLevel /*|WDestructiveClose*/)
133
133
      {
134
134
      setCaption(tr("MusE: Clip List Editor"));
135
135
      curClip = 0;
158
158
      }
159
159
 
160
160
//---------------------------------------------------------
161
 
//   populateList
 
161
//   updateList
162
162
//---------------------------------------------------------
163
163
 
164
164
void ClipListEdit::updateList()
165
165
      {
166
166
      editor->view->clear();
167
167
 
168
 
      for (iSndFile f = sndFiles->begin(); f != sndFiles->end(); ++f) {
 
168
      for (iSndFile f = SndFile::sndFiles.begin(); f != SndFile::sndFiles.end(); ++f) {
169
169
            SndFile* wf = *f;
170
170
            ClipItem* fi = new ClipItem(editor->view, wf);
171
171
            fi->setOpen(true);
172
172
            for (iClip c = waveClips->begin(); c != waveClips->end(); ++c) {
173
173
                  Clip* clip = *c;
174
 
                  if (clip->file() == wf) {
 
174
                  if (clip->file1() == wf) {
175
175
                        new ClipItem(fi, clip);
176
176
                        }
177
177
                  }
266
266
void ClipListEdit::clipSelectionChanged()
267
267
      {
268
268
      ClipItem* item = (ClipItem*)(editor->view->selectedItem());
269
 
      if (item == 0 || item->clip() == 0) {
 
269
      curClip = item->clip();
 
270
      if (item == 0 || curClip == 0) {
270
271
            curClip = 0;
271
 
            editor->start->setValue(-1);
272
 
            editor->len->setValue(-1);
 
272
            editor->start->setEnabled(false);
 
273
            editor->len->setEnabled(false);
273
274
            return;
274
275
            }
275
 
      curClip = item->clip();
 
276
      editor->start->setEnabled(true);
 
277
      editor->len->setEnabled(true);
276
278
      Pos pos, len;
277
279
      pos.setType(Pos::SAMPLES);
278
280
      len.setType(Pos::SAMPLES);