~ubuntu-branches/ubuntu/oneiric/muse/oneiric

« back to all changes in this revision

Viewing changes to muse/widgets/sigedit.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Fabrice Coutadeur
  • Date: 2010-11-17 21:43:38 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20101117214338-1hvfl7oo2dsqnvrb
Tags: 1.1-0ubuntu1
* New upstream release (LP: #668631)
* Switch to dpkg-source 3.0 (quilt) format
* Switch to dh7 short form
* debian/rules:
  - added --enable-dssi and --enable-osc to conf flags for dssi support
  - added -ljackserver to LDFLAGS to fix a FTBFS because of --as-needed
* debian/control:
  - added build build dependency on liblo-dev and dssi-dev for dssi support
  - bump Standards-version to 3.9.1. No changes required.
* debian/muse.desktop, debian/muse.xpm: dropped as desktop file and icon is
  now shipped upstream.
* fix-desktop-categories.patch: fix Categories tag in upstream desktop file
* 10_es_locale_fix.dpatch: refreshed and converted to quilt as
  fix_es_locale.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
extern int mtcType;
23
23
 
 
24
bool Sig::isValid() const
 
25
{
 
26
  if((z < 1) || (z > 63))
 
27
    return false;
 
28
            
 
29
  switch(n) 
 
30
  {
 
31
    case  1:
 
32
    case  2:
 
33
    case  3:
 
34
    case  4:
 
35
    case  8:
 
36
    case 16:
 
37
    case 32:
 
38
    case 64:
 
39
    case 128:
 
40
      return true;
 
41
    default:
 
42
      return false;
 
43
  }                
 
44
}
 
45
 
 
46
 
24
47
//---------------------------------------------------------
25
48
//   NumberSection
26
49
//---------------------------------------------------------
287
310
                        return true;
288
311
                        }
289
312
                  int num = txt[0].digitValue();
 
313
                  
 
314
                  //printf("SigEditor::eventFilter num:%d\n", num);
 
315
                  
290
316
                  if (num != -1) {
291
317
                        cw->addNumber(focusSec, num);
292
318
                        return true;
581
607
            case 32:
582
608
            case 64:
583
609
            case 128:
584
 
                  return true;
585
 
            default:
 
610
                  // Changed p3.3.43
 
611
                  //return true;
586
612
                  return false;
 
613
            default:
 
614
                  // Changed p3.3.43
 
615
                  //return false;
 
616
                  return true;
587
617
            }
588
618
      }
589
619
 
602
632
 
603
633
      QString txt = sectionText(secNo);
604
634
 
 
635
      //printf("SigEdit::addNumber secNo:%d num:%d voff:%d txt:%s\n", secNo, num, voff, txt.latin1());
 
636
      
605
637
      if (txt.length() == sec[secNo].len) {
 
638
            //printf("SigEdit::addNumber txt.length() == sec[secNo].len (%d)\n", sec[secNo].len);
 
639
      
606
640
            if (!outOfRange(secNo, num - voff)) {
 
641
                  //printf("SigEdit::addNumber accepted\n");
 
642
                  
607
643
                  accepted = true;
608
644
                  sec[secNo].val = num - voff;
609
645
                  }
610
646
            }
611
647
      else {
 
648
            //printf("SigEdit::addNumber txt.length() != sec[secNo].len (%d)\n", sec[secNo].len);
 
649
      
612
650
            txt += QString::number(num);
613
651
            int temp = txt.toInt() - voff;
614
652
            if (outOfRange(secNo, temp))
 
653
            {
 
654
                  //printf("SigEdit::addNumber not accepted secNo:%d txt:%s temp:%d\n", secNo, txt.latin1(), temp);
 
655
                  
615
656
                  txt = sectionText(secNo);
 
657
            }
616
658
            else {
 
659
                  //printf("SigEdit::addNumber accepted\n");
 
660
                  
617
661
                  accepted = true;
618
662
                  sec[secNo].val = temp;
619
663
                  }