Changeset 501

Show
Ignore:
Timestamp:
09/18/08 19:59:29 (5 years ago)
Author:
wolke
Message:

add new checkbox to audio file browser 'filename to instrument name', update translations, add german translation

Location:
branches/audiofilebrowser
Files:
19 modified

Legend:

Unmodified
Added
Removed
  • branches/audiofilebrowser/data/i18n/hydrogen.de.ts

    r497 r501  
    593593    <message> 
    594594        <source>Home</source> 
    595         <translation type="unfinished">Eigene Dateien</translation> 
     595        <translation type="unfinished">Persöhnlicher Ordner</translation> 
     596    </message> 
     597    <message> 
     598        <source>Filename to instrument name</source> 
     599        <translation type="unfinished">Dateiname wird Instrument Name</translation> 
    596600    </message> 
    597601</context> 
  • branches/audiofilebrowser/data/i18n/hydrogen.es.ts

    r497 r501  
    595595        <translation type="unfinished"></translation> 
    596596    </message> 
     597    <message> 
     598        <source>Filename to instrument name</source> 
     599        <translation type="unfinished"></translation> 
     600    </message> 
    597601</context> 
    598602<context> 
  • branches/audiofilebrowser/data/i18n/hydrogen.fr.ts

    r497 r501  
    594594        <translation type="unfinished"></translation> 
    595595    </message> 
     596    <message> 
     597        <source>Filename to instrument name</source> 
     598        <translation type="unfinished"></translation> 
     599    </message> 
    596600</context> 
    597601<context> 
  • branches/audiofilebrowser/data/i18n/hydrogen.hu_HU.ts

    r497 r501  
    594594        <translation type="unfinished"></translation> 
    595595    </message> 
     596    <message> 
     597        <source>Filename to instrument name</source> 
     598        <translation type="unfinished"></translation> 
     599    </message> 
    596600</context> 
    597601<context> 
  • branches/audiofilebrowser/data/i18n/hydrogen.it.ts

    r497 r501  
    594594        <translation type="unfinished"></translation> 
    595595    </message> 
     596    <message> 
     597        <source>Filename to instrument name</source> 
     598        <translation type="unfinished"></translation> 
     599    </message> 
    596600</context> 
    597601<context> 
  • branches/audiofilebrowser/data/i18n/hydrogen.ja.ts

    r497 r501  
    594594        <translation type="unfinished"></translation> 
    595595    </message> 
     596    <message> 
     597        <source>Filename to instrument name</source> 
     598        <translation type="unfinished"></translation> 
     599    </message> 
    596600</context> 
    597601<context> 
  • branches/audiofilebrowser/data/i18n/hydrogen.nl.ts

    r497 r501  
    594594        <translation type="unfinished"></translation> 
    595595    </message> 
     596    <message> 
     597        <source>Filename to instrument name</source> 
     598        <translation type="unfinished"></translation> 
     599    </message> 
    596600</context> 
    597601<context> 
  • branches/audiofilebrowser/data/i18n/hydrogen.pl.ts

    r497 r501  
    594594        <translation type="unfinished"></translation> 
    595595    </message> 
     596    <message> 
     597        <source>Filename to instrument name</source> 
     598        <translation type="unfinished"></translation> 
     599    </message> 
    596600</context> 
    597601<context> 
  • branches/audiofilebrowser/data/i18n/hydrogen.pt_BR.ts

    r497 r501  
    594594        <translation type="unfinished"></translation> 
    595595    </message> 
     596    <message> 
     597        <source>Filename to instrument name</source> 
     598        <translation type="unfinished"></translation> 
     599    </message> 
    596600</context> 
    597601<context> 
  • branches/audiofilebrowser/data/i18n/hydrogen.ru.ts

    r497 r501  
    595595        <translation type="unfinished"></translation> 
    596596    </message> 
     597    <message> 
     598        <source>Filename to instrument name</source> 
     599        <translation type="unfinished"></translation> 
     600    </message> 
    597601</context> 
    598602<context> 
  • branches/audiofilebrowser/data/i18n/hydrogen.sv.ts

    r497 r501  
    594594        <translation type="unfinished"></translation> 
    595595    </message> 
     596    <message> 
     597        <source>Filename to instrument name</source> 
     598        <translation type="unfinished"></translation> 
     599    </message> 
    596600</context> 
    597601<context> 
  • branches/audiofilebrowser/gui/src/AudioFileBrowser/AudioFileBrowser.cpp

    r494 r501  
    5151        installEventFilter( this ); 
    5252 
     53        filters << "*.wav" << "*.WAV" << "*.flac"<< "*.FLAC" << "*.aiff" << "*.AIFF"<< "*.au" << "*.AU" ; 
    5354 
    5455        model = new QDirModel(); 
     56//      model->setNameFilters(filters); 
    5557        model->setFilter( QDir::AllEntries | QDir::NoDotAndDotDot ); 
    5658        model->setSorting( QDir::DirsFirst |QDir::Name ); 
     
    117119        m_pSampleWaveDisplay->updateDisplay( sEmptySampleFilename ); 
    118120 
    119  
    120121        updateModelIndex(); //with this you have a navigation like konqueror  
    121122 
    122123        if ( model->isDir( index ) ) 
    123124                 return; 
    124          
     125 
    125126        QString name = path.section( '/', -1 );  
    126127         
     
    251252QString AudioFileBrowser::selectedFile() 
    252253{ 
     254        if ( useNameCheckBox->isChecked() ){ 
     255                 m_pselectedFile.append( "___trUe" ); 
     256        } 
    253257        return m_pselectedFile; 
    254258} 
  • branches/audiofilebrowser/gui/src/AudioFileBrowser/AudioFileBrowser.h

    r493 r501  
    7171                SampleWaveDisplay *m_pSampleWaveDisplay; 
    7272                QString sEmptySampleFilename; 
    73                  
     73                QStringList filters; 
    7474 
    7575 
  • branches/audiofilebrowser/gui/src/AudioFileBrowser/AudioFileBrowser_UI.ui

    r490 r501  
    66    <x>0</x> 
    77    <y>0</y> 
    8     <width>824</width> 
    9     <height>529</height> 
     8    <width>821</width> 
     9    <height>562</height> 
    1010   </rect> 
    1111  </property> 
     
    1313   <string>Dialog</string> 
    1414  </property> 
    15   <widget class="QPushButton" name="openBTN" > 
    16    <property name="geometry" > 
    17     <rect> 
    18      <x>604</x> 
    19      <y>490</y> 
    20      <width>101</width> 
    21      <height>26</height> 
    22     </rect> 
    23    </property> 
    24    <property name="text" > 
    25     <string>Open</string> 
    26    </property> 
    27   </widget> 
    2815  <widget class="QFrame" name="waveformview" > 
    2916   <property name="geometry" > 
     
    4835     <y>390</y> 
    4936     <width>341</width> 
    50      <height>91</height> 
     37     <height>131</height> 
    5138    </rect> 
    5239   </property> 
     
    5744    <enum>QFrame::Raised</enum> 
    5845   </property> 
    59    <widget class="QLabel" name="m_pNameLabel" > 
     46   <widget class="QWidget" name="" > 
    6047    <property name="geometry" > 
    6148     <rect> 
     
    6350      <y>10</y> 
    6451      <width>321</width> 
    65       <height>16</height> 
     52      <height>111</height> 
    6653     </rect> 
    6754    </property> 
    68     <property name="text" > 
    69      <string>Name:</string> 
    70     </property> 
     55    <layout class="QVBoxLayout" name="verticalLayout_3" > 
     56     <item> 
     57      <widget class="QLabel" name="m_pNameLabel" > 
     58       <property name="text" > 
     59        <string>Name:</string> 
     60       </property> 
     61      </widget> 
     62     </item> 
     63     <item> 
     64      <widget class="QLabel" name="m_pSamplerateLable" > 
     65       <property name="text" > 
     66        <string>Samplerate:</string> 
     67       </property> 
     68      </widget> 
     69     </item> 
     70     <item> 
     71      <widget class="QLabel" name="m_pNBytesLable" > 
     72       <property name="text" > 
     73        <string>Size:</string> 
     74       </property> 
     75      </widget> 
     76     </item> 
     77     <item> 
     78      <widget class="QLabel" name="m_pLengthLable" > 
     79       <property name="text" > 
     80        <string>Length:</string> 
     81       </property> 
     82      </widget> 
     83     </item> 
     84    </layout> 
    7185   </widget> 
    72    <widget class="QLabel" name="m_pSamplerateLable" > 
    73     <property name="geometry" > 
    74      <rect> 
    75       <x>10</x> 
    76       <y>30</y> 
    77       <width>321</width> 
    78       <height>16</height> 
    79      </rect> 
    80     </property> 
    81     <property name="text" > 
    82      <string>Samplerate:</string> 
    83     </property> 
    84    </widget> 
    85    <widget class="QLabel" name="m_pNBytesLable" > 
    86     <property name="geometry" > 
    87      <rect> 
    88       <x>10</x> 
    89       <y>50</y> 
    90       <width>321</width> 
    91       <height>16</height> 
    92      </rect> 
    93     </property> 
    94     <property name="text" > 
    95      <string>Size:</string> 
    96     </property> 
    97    </widget> 
    98    <widget class="QLabel" name="m_pLengthLable" > 
    99     <property name="geometry" > 
    100      <rect> 
    101       <x>10</x> 
    102       <y>70</y> 
    103       <width>321</width> 
    104       <height>16</height> 
    105      </rect> 
    106     </property> 
    107     <property name="text" > 
    108      <string>Length:</string> 
    109     </property> 
    110    </widget> 
    111   </widget> 
    112   <widget class="QPushButton" name="cancelBTN" > 
    113    <property name="geometry" > 
    114     <rect> 
    115      <x>714</x> 
    116      <y>490</y> 
    117      <width>101</width> 
    118      <height>26</height> 
    119     </rect> 
    120    </property> 
    121    <property name="text" > 
    122     <string>Cancel</string> 
    123    </property> 
    124   </widget> 
    125   <widget class="QPushButton" name="m_pPlayBtn" > 
    126    <property name="geometry" > 
    127     <rect> 
    128      <x>360</x> 
    129      <y>490</y> 
    130      <width>111</width> 
    131      <height>26</height> 
    132     </rect> 
    133    </property> 
    134    <property name="text" > 
    135     <string>Play Sample</string> 
    136    </property> 
    137   </widget> 
    138   <widget class="QWidget" name="layoutWidget" > 
     86  </widget> 
     87  <widget class="QCheckBox" name="playSamplescheckBox" > 
    13988   <property name="geometry" > 
    14089    <rect> 
    14190     <x>10</x> 
    142      <y>40</y> 
    143      <width>801</width> 
    144      <height>341</height> 
    145     </rect> 
    146    </property> 
    147    <layout class="QVBoxLayout" name="verticalLayout" > 
    148     <item> 
    149      <widget class="QTreeView" name="treeView" /> 
    150     </item> 
    151     <item> 
    152      <widget class="QLineEdit" name="filelineedit" /> 
    153     </item> 
    154    </layout> 
    155   </widget> 
    156   <widget class="QCheckBox" name="playSamplescheckBox" > 
    157    <property name="geometry" > 
    158     <rect> 
    159      <x>10</x> 
    160      <y>490</y> 
    161      <width>311</width> 
     91     <y>530</y> 
     92     <width>271</width> 
    16293     <height>21</height> 
    16394    </rect> 
     
    193124      </property> 
    194125     </widget> 
     126    </item> 
     127   </layout> 
     128  </widget> 
     129  <widget class="QPushButton" name="m_pPlayBtn" > 
     130   <property name="geometry" > 
     131    <rect> 
     132     <x>360</x> 
     133     <y>490</y> 
     134     <width>121</width> 
     135     <height>26</height> 
     136    </rect> 
     137   </property> 
     138   <property name="text" > 
     139    <string>Play Sample</string> 
     140   </property> 
     141  </widget> 
     142  <widget class="QWidget" name="" > 
     143   <property name="geometry" > 
     144    <rect> 
     145     <x>11</x> 
     146     <y>41</y> 
     147     <width>801</width> 
     148     <height>341</height> 
     149    </rect> 
     150   </property> 
     151   <layout class="QVBoxLayout" name="verticalLayout" > 
     152    <item> 
     153     <widget class="QTreeView" name="treeView" /> 
     154    </item> 
     155    <item> 
     156     <layout class="QHBoxLayout" name="horizontalLayout_2" > 
     157      <item> 
     158       <widget class="QLineEdit" name="filelineedit" /> 
     159      </item> 
     160     </layout> 
     161    </item> 
     162   </layout> 
     163  </widget> 
     164  <widget class="QWidget" name="" > 
     165   <property name="geometry" > 
     166    <rect> 
     167     <x>550</x> 
     168     <y>490</y> 
     169     <width>261</width> 
     170     <height>61</height> 
     171    </rect> 
     172   </property> 
     173   <layout class="QVBoxLayout" name="verticalLayout_2" > 
     174    <item> 
     175     <widget class="QCheckBox" name="useNameCheckBox" > 
     176      <property name="text" > 
     177       <string>Filename to instrument name</string> 
     178      </property> 
     179     </widget> 
     180    </item> 
     181    <item> 
     182     <layout class="QHBoxLayout" name="horizontalLayout_3" > 
     183      <item> 
     184       <widget class="QPushButton" name="openBTN" > 
     185        <property name="text" > 
     186         <string>Open</string> 
     187        </property> 
     188       </widget> 
     189      </item> 
     190      <item> 
     191       <widget class="QPushButton" name="cancelBTN" > 
     192        <property name="text" > 
     193         <string>Cancel</string> 
     194        </property> 
     195       </widget> 
     196      </item> 
     197     </layout> 
    195198    </item> 
    196199   </layout> 
     
    202205  <tabstop>filelineedit</tabstop> 
    203206  <tabstop>playSamplescheckBox</tabstop> 
    204   <tabstop>m_pPlayBtn</tabstop> 
    205207  <tabstop>openBTN</tabstop> 
    206   <tabstop>cancelBTN</tabstop> 
    207208 </tabstops> 
    208209 <resources/> 
  • branches/audiofilebrowser/gui/src/InstrumentEditor/InstrumentEditor.cpp

    r481 r501  
    498498        delete fb; 
    499499 
     500        bool fnc = false;        
     501        if ( filename.endsWith( "___trUe" )){ 
     502                fnc = true; 
     503                filename.replace( "___trUe", "" ); 
     504        } 
     505 
    500506        if (filename != "") { 
    501507//              lastUsedDir = fd->directory().absolutePath(); 
     
    521527                        pLayer = new H2Core::InstrumentLayer(newSample); 
    522528                        pInstr->set_layer( pLayer, m_nSelectedLayer ); 
     529                } 
     530 
     531                if ( fnc ){ 
     532                        QString newfilename = filename.section( '/', -1 ); 
     533                                newfilename.replace( "." + newfilename.section( '.', -1 ), ""); 
     534                        m_pInstrument->set_name( newfilename ); 
    523535                } 
    524536 
  • branches/audiofilebrowser/gui/src/MainForm.cpp

    r472 r501  
    869869        Instrument *pNewInstr = new Instrument(to_string( nID ), "New instrument", new ADSR()); 
    870870        pList->add( pNewInstr ); 
     871        Hydrogen::get_instance()->renameJackPorts(); 
    871872        AudioEngine::get_instance()->unlock(); 
    872873 
  • branches/audiofilebrowser/gui/src/PatternEditor/PatternEditorInstrumentList.cpp

    r420 r501  
    531531        } 
    532532 
    533  
    534  
    535533} 
    536534 
     
    558556         
    559557 
    560         if(sText.startsWith("Songs:") or sText.startsWith("Patterns:") or sText.startsWith("move pattern:")or sText.startsWith("drag pattern:")) return; 
     558        if(sText.startsWith("Songs:") || sText.startsWith("Patterns:") || sText.startsWith("move pattern:") || sText.startsWith("drag pattern:")) return; 
    561559 
    562560        if (sText.startsWith("move instrument:")) { 
     
    627625                event->acceptProposedAction(); 
    628626        } 
    629  
    630627} 
    631628 
  • branches/audiofilebrowser/gui/src/SongEditor/SongEditor.cpp

    r447 r501  
    12731273        ERRORLOG(sText); 
    12741274         
    1275         if(sText.startsWith("Songs:") or sText.startsWith("Instruments:")) return; 
     1275        if(sText.startsWith("Songs:") || sText.startsWith("Instruments:")) return; 
    12761276 
    12771277        if (sText.startsWith("move pattern:")) {