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

« back to all changes in this revision

Viewing changes to conf.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: conf.cpp,v 1.2 2002/02/27 08:48:09 muse Exp $
 
4
//  $Id: conf.cpp,v 1.1.1.1 2003/10/29 10:05:08 wschweer Exp $
5
5
//
6
6
//  (C) Copyright 1999/2000 Werner Schweer (ws@seh.de)
7
7
//=========================================================
35
35
#include "seq.h"
36
36
#include "conf.h"
37
37
#include "pitchedit.h"
38
 
#include "device.h"
39
38
#include "midiport.h"
40
 
#include "audioport.h"
41
39
#include "driver/mididev.h"
42
40
#include "driver/midiserial.h"
43
41
#include "driver/audiodev.h"
50
48
#include "midiitransform.h"
51
49
#include "synth.h"
52
50
#include "audioconf.h"
 
51
#include "audio.h"
 
52
#include "sync.h"
53
53
 
54
54
#include <errno.h>
55
55
 
151
151
            QString tag = xml.s1();
152
152
            switch (token) {
153
153
                  case Xml::TagStart:
154
 
                        if (tag == "geometry")
 
154
                        if (tag == "geometry") {
155
155
                              configGeometryTransport = readGeometry(xml);
 
156
                              // use only position
 
157
                              configGeometryTransport.setWidth(0);
 
158
                              configGeometryTransport.setHeight(0);
 
159
                              }
156
160
                        else if (tag == "handlecolor")
157
161
                              configTransportHandleColor = readColor(xml);
158
162
                        else
280
284
                              configGeometryMain = readGeometry(xml);
281
285
                        else if (tag == "theme")
282
286
                              configTheme = xml.parse1();
283
 
                        else if (tag == "fontSize")
284
 
                              configFontSize = xml.parseInt();
 
287
                        else if (tag == "fontSize")  // obsolete
 
288
                              ;
 
289
                        else if (tag == "font0")
 
290
                              font0.fromString(xml.parse1());
 
291
                        else if (tag == "font1")
 
292
                              font1.fromString(xml.parse1());
 
293
                        else if (tag == "font2")
 
294
                              font2.fromString(xml.parse1());
 
295
                        else if (tag == "font3")
 
296
                              font3.fromString(xml.parse1());
 
297
                        else if (tag == "font4")
 
298
                              font4.fromString(xml.parse1());
 
299
                        else if (tag == "font5")
 
300
                              font5.fromString(xml.parse1());
285
301
                        else if (tag == "activityMode")
286
302
                              configActivityMode = xml.parseInt();
287
303
                        else if (tag == "activityColor")
288
304
                              configActivityColor = readColor(xml);
289
305
                        else if (tag == "selectedTrackColor")
290
 
                              configSelectedTrackColor = readColor(xml);
 
306
                              /*configSelectedTrackColor =*/ readColor(xml);
291
307
                        else if (tag == "extendedMidi")
292
308
                              extendedMidi = xml.parseInt();
293
309
                        else if (tag == "midiExportDivision")
312
328
                              readConfigTransport(xml);
313
329
                        else if (tag == "bigtime")
314
330
                              readConfigBigTime(xml);
315
 
                        else if (tag == "deviceid")
316
 
                              deviceId = xml.parseInt();
317
 
                        else if (tag == "syncport")
318
 
                              extSyncPort= xml.parseInt();
 
331
                        else if (tag == "deviceid")    // obsolete
 
332
                              xml.parseInt();
 
333
                        else if (tag == "txDeviceId")
 
334
                              txDeviceId = xml.parseInt();
 
335
                        else if (tag == "rxDeviceId")
 
336
                              rxDeviceId = xml.parseInt();
 
337
                        else if (tag == "syncport")   // obsolete
 
338
                              xml.parseInt();
 
339
                        else if (tag == "txSyncPort")
 
340
                              txSyncPort= xml.parseInt();
 
341
                        else if (tag == "rxSyncPort")
 
342
                              rxSyncPort= xml.parseInt();
319
343
                        else if (tag == "mtctype")
320
344
                              mtcType= xml.parseInt();
321
345
                        else if (tag == "extSync")
367
391
                              division = xml.parseInt();
368
392
                        else if (tag == "samplerate")
369
393
                              sampleRate = xml.parseInt();
 
394
                        else if (tag == "useAlsa") {
 
395
                              useAlsaAudio = xml.parseInt();
 
396
                              useJackAudio = !useAlsaAudio;
 
397
                              }
 
398
                        else if (tag == "useJack") {
 
399
                              useJackAudio = xml.parseInt();
 
400
                              useAlsaAudio = ! useJackAudio;
 
401
                              }
370
402
                        else if (tag == "segmentsize")
371
403
                              segmentSize = xml.parseInt();
372
404
                        else if (tag == "rtcTicks")
374
406
                        else if (tag == "minMeter")
375
407
                              minMeter = xml.parseInt();
376
408
                        else if (tag == "minSlider")
377
 
                              minSlider = xml.parseInt();
 
409
                              minSlider = xml.parseDouble();
378
410
                        else if (tag == "guiRefresh")
379
411
                              guiRefresh = xml.parseInt();
 
412
                        else if (tag == "helpBrowser")
 
413
                              helpBrowser = xml.parse1();
 
414
                        else if (tag == "audioInput") {
 
415
                              QString s = xml.parse1();
 
416
                              if (audioDevice)
 
417
                                    audioDevice->setInputPort(s);
 
418
                              }
 
419
                        else if (tag == "audioOutput") {
 
420
                              QString s = xml.parse1();
 
421
                              if (audioDevice)
 
422
                                    audioDevice->setOutputPort(s);
 
423
                              }
380
424
                        else if (tag == "serialPort")
381
425
                              readSerialPort(xml);
382
426
                        else if (tag == "midiTransform")
445
489
            xml.intTag(level, "segmentsize", segmentSize);
446
490
      if (rtcTicks != 4096)
447
491
            xml.intTag(level, "rtcTicks", rtcTicks);
 
492
      if (useAlsaAudio)
 
493
            xml.intTag(level, "useAlsa", useAlsaAudio);
 
494
      if (useJackAudio)
 
495
            xml.intTag(level, "useJack", useJackAudio);
448
496
      if (minMeter != -60)
449
497
            xml.intTag(level, "minMeter", minMeter);
450
 
      if (minSlider != -60)
451
 
            xml.intTag(level, "minSlider", minSlider);
 
498
      if (minSlider != -60.0)
 
499
            xml.doubleTag(level, "minSlider", minSlider);
452
500
      if (guiRefresh != 20)
453
501
            xml.intTag(level, "guiRefresh", guiRefresh);
454
 
 
 
502
      if (helpBrowser != QString("konqueror"))
 
503
            xml.strTag(level, "helpBrowser", helpBrowser);
 
504
      if (audioDevice) {
 
505
            xml.strTag(level, "audioInput", audioDevice->inputPort());
 
506
            xml.strTag(level, "audioOutput", audioDevice->outputPort());
 
507
            }
455
508
      xml.intTag(level, "extendedMidi", extendedMidi);
456
509
      xml.intTag(level, "midiExportDivision", midiDivision);
457
510
      xml.intTag(level, "midiInputDevice", midiInputPorts);
462
515
      xml.intTag(level, "midiFilterCtrl2", midiFilterCtrl2);
463
516
      xml.intTag(level, "midiFilterCtrl3", midiFilterCtrl3);
464
517
      xml.intTag(level, "midiFilterCtrl4", midiFilterCtrl4);
465
 
      xml.intTag(level, "deviceid", deviceId);
466
 
      xml.nput(level, "<theme>%s</theme>\n", _currentTheme.data());
467
 
      xml.nput(level, "<fontSize>%d</fontSize>\n", configFontSize);
 
518
      xml.intTag(level, "txDeviceId", txDeviceId);
 
519
      xml.intTag(level, "rxDeviceId", rxDeviceId);
 
520
      xml.nput(level, "<theme>%s</theme>\n", _currentTheme.ascii());
 
521
 
 
522
      xml.strTag(level, "font0", font0.toString());
 
523
      xml.strTag(level, "font1", font1.toString());
 
524
      xml.strTag(level, "font2", font2.toString());
 
525
      xml.strTag(level, "font3", font3.toString());
 
526
      xml.strTag(level, "font4", font4.toString());
 
527
      xml.strTag(level, "font5", font5.toString());
 
528
 
468
529
      xml.nput(level, "<activityColor r=\"%d\" g=\"%d\" b=\"%d\"></activityColor>\n",
469
530
                arranger->getActivityColor().red(),
470
531
                arranger->getActivityColor().green(),
471
532
                arranger->getActivityColor().blue());
472
 
      xml.nput(level, "<selectedTrackColor r=\"%d\" g=\"%d\" b=\"%d\"></selectedTrackColor>\n",
 
533
/*      xml.nput(level, "<selectedTrackColor r=\"%d\" g=\"%d\" b=\"%d\"></selectedTrackColor>\n",
473
534
                arranger->getSelectedTrackColor().red(),
474
535
                arranger->getSelectedTrackColor().green(),
475
536
                arranger->getSelectedTrackColor().blue());
 
537
 */
476
538
      xml.intTag(level, "activityMode", arranger->getActivityMode());
477
539
 
478
 
      xml.intTag(level, "syncport", extSyncPort);
 
540
      xml.intTag(level, "txSyncPort", txSyncPort);
 
541
      xml.intTag(level, "rxSyncPort", rxSyncPort);
479
542
      xml.intTag(level, "mtctype", mtcType);
480
543
      xml.nput(level, "<mtcoffset>%02d:%02d:%02d:%02d:%02d</mtcoffset>\n",
481
544
        mtcOffset.h(), mtcOffset.m(), mtcOffset.s(),
583
646
//---------------------------------------------------------
584
647
 
585
648
MidiFileConfig::MidiFileConfig()
586
 
   : QGroupBox(2, Horizontal, "Config exported Midi Files", 0)
 
649
   : QGroupBox(2, Horizontal, tr("Config exported Midi Files"), 0)
587
650
      {
588
 
      setCaption("MusE");
 
651
      setCaption(tr("MusE: Config exported Midi Files"));
589
652
      QWidget* w = new QWidget(this);
590
653
      QGridLayout* grid = new QGridLayout(w);
591
654
      grid->setSpacing(5);
595
658
 
596
659
      QLabel* l1 = new QLabel(tr("Division"), w);
597
660
      QComboBox* cb1 = new QComboBox(w);
598
 
      cb1->insertItem("96");
599
 
      cb1->insertItem("192");
600
 
      cb1->insertItem("384");
 
661
      cb1->insertItem(QString("96"));
 
662
      cb1->insertItem(QString("192"));
 
663
      cb1->insertItem(QString("384"));
601
664
      int curItem = -1;
602
665
      switch(midiDivision) {
603
666
            case 96:    curItem = 0; break;