added modified project indicator, fixed some segfaults

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@615 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Javier Serrano Polo
2007-11-27 05:02:50 +00:00
parent 37860380ff
commit 14253bc705
21 changed files with 371 additions and 280 deletions

View File

@@ -1,3 +1,47 @@
2007-11-27 Javier Serrano Polo <jasp00/at/terra/dot/es>
* include/main_window.h:
* include/song_editor.h:
* src/core/engine.cpp:
* src/core/main_window.cpp:
* src/core/song_editor.cpp:
* src/lib/project_journal.cpp:
added modified project indicator
* include/ladspa_base.h:
* include/plugin.h:
* plugins/ladspa_effect/ladspa_effect.cpp:
* plugins/ladspa_effect/ladspa_subplugin_features.cpp:
* plugins/ladspa_effect/ladspa_subplugin_features.h:
fixed invalid key segfault
* src/core/main_window.cpp:
fixed instrument track visual glitches when loading
* include/instrument_track.h:
* src/tracks/instrument_track.cpp:
removed QMdiSubWindow inheritance, fixes MDI focus segfault
* src/core/track_container.cpp:
fixed interrupted loading segfault
* plugins/ladspa_effect/ladspa_effect.cpp:
* plugins/ladspa_effect/ladspa_effect.h:
removed singleton reference
* src/core/config_mgr.cpp:
integrated mkPath() calls
* plugins/ladspa_browser/ladspa_browser.cpp:
centralized title change
* include/song_editor.h:
* src/core/song_editor.cpp:
reduced dependencies
* data/locale/ca.ts:
updated translation
2007-11-26 Paul Giblock <drfaygo/at/gmail/dot/com>
* plugins/lb302/lb302.cpp:

View File

@@ -2,8 +2,8 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.50)
AC_INIT(lmms, 0.4.0-svn20071123, lmms-devel/at/lists/dot/sf/dot/net)
AM_INIT_AUTOMAKE(lmms, 0.4.0-svn20071123)
AC_INIT(lmms, 0.4.0-svn20071127, lmms-devel/at/lists/dot/sf/dot/net)
AM_INIT_AUTOMAKE(lmms, 0.4.0-svn20071127)
AM_CONFIG_HEADER(config.h)

Binary file not shown.

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS><TS version="1.1" language="ca_ES">
<defaultcodec></defaultcodec>
<context>
<name>QWidget</name>
<message>
@@ -1206,12 +1207,12 @@ http://lmms.sourceforge.net</translation>
<context>
<name>configManager</name>
<message>
<location filename="../../src/core/config_mgr.cpp" line="196"/>
<location filename="../../src/core/config_mgr.cpp" line="187"/>
<source>Setup LMMS</source>
<translation>Configuració de LMMS</translation>
</message>
<message>
<location filename="../../src/core/config_mgr.cpp" line="221"/>
<location filename="../../src/core/config_mgr.cpp" line="212"/>
<source>LMMS needs to be setup in order to run properly. This wizard will help you to setup your personal LMMS-installation.
If you&apos;re unsure what to do at a step, just click on &apos;Next&apos;. LMMS will automatically select the best options for you.
@@ -1225,7 +1226,7 @@ Si no estàs segur del que s&apos;ha de fer en un pas, senzillament pica &apos;S
Ara pica &apos;Següent&apos; per a anar a la següent pàgina.</translation>
</message>
<message>
<location filename="../../src/core/config_mgr.cpp" line="251"/>
<location filename="../../src/core/config_mgr.cpp" line="242"/>
<source>When working with LMMS there needs to be a working-directory.
This directory is used for storing your projects, presets, samples etc.
@@ -1238,81 +1239,81 @@ Aquest directori s&apos;usarà per a emmagatzemar els teus projectes, plantilles
Per favor, selecciona un directori:</translation>
</message>
<message>
<location filename="../../src/core/config_mgr.cpp" line="428"/>
<location filename="../../src/core/config_mgr.cpp" line="419"/>
<source>Welcome to LMMS</source>
<translation>Benvingut a LMMS</translation>
</message>
<message>
<location filename="../../src/core/config_mgr.cpp" line="429"/>
<location filename="../../src/core/config_mgr.cpp" line="420"/>
<source>Select working directory</source>
<translation>Selecciona directori de treball</translation>
</message>
<message>
<location filename="../../src/core/config_mgr.cpp" line="510"/>
<location filename="../../src/core/config_mgr.cpp" line="501"/>
<source>Directory not existing</source>
<translation>El directori no existeix</translation>
</message>
<message>
<location filename="../../src/core/config_mgr.cpp" line="703"/>
<location filename="../../src/core/config_mgr.cpp" line="694"/>
<source>Error in configuration-file</source>
<translation>Error al fitxer de configuració</translation>
</message>
<message>
<location filename="../../src/core/config_mgr.cpp" line="708"/>
<location filename="../../src/core/config_mgr.cpp" line="699"/>
<source>Error while parsing configuration-file %1.
The setup-wizard will be shown for reconfiguring LMMS.</source>
<translation>Error analitzant el fitxer de configuració %1.
Es mostrarà l&apos;assistent per a reconfigurar LMMS.</translation>
</message>
<message>
<location filename="../../src/core/config_mgr.cpp" line="513"/>
<location filename="../../src/core/config_mgr.cpp" line="504"/>
<source>The directory you specified does not exist. Create it?</source>
<translation>El directori especificat no existeix. Crear-lo?</translation>
</message>
<message>
<location filename="../../src/core/config_mgr.cpp" line="173"/>
<location filename="../../src/core/config_mgr.cpp" line="164"/>
<source>&lt; &amp;Back</source>
<translation>&lt; &amp;Enrere</translation>
</message>
<message>
<location filename="../../src/core/config_mgr.cpp" line="175"/>
<location filename="../../src/core/config_mgr.cpp" line="166"/>
<source>&amp;Finish</source>
<translation>&amp;Finalitza</translation>
</message>
<message>
<location filename="../../src/core/config_mgr.cpp" line="893"/>
<location filename="../../src/core/config_mgr.cpp" line="884"/>
<source>Could not save config-file</source>
<translation>No s&apos;ha pogut desar el fitxer de configuració</translation>
</message>
<message>
<location filename="../../src/core/config_mgr.cpp" line="900"/>
<location filename="../../src/core/config_mgr.cpp" line="891"/>
<source>Could not save configuration file %1. You probably are not permitted to write to this file.
Please make sure you have write-access to the file and try again.</source>
<translation>No s&apos;ha pogut desar el fitxer de configuració %1.
Per favor, comprova que tens permís d&apos;escriptura per a aquest fitxer i torna-ho a provar.</translation>
</message>
<message>
<location filename="../../src/core/config_mgr.cpp" line="814"/>
<location filename="../../src/core/config_mgr.cpp" line="805"/>
<source>Version mismatches</source>
<translation>La versió no coincideix</translation>
</message>
<message>
<location filename="../../src/core/config_mgr.cpp" line="172"/>
<location filename="../../src/core/config_mgr.cpp" line="163"/>
<source>&amp;Cancel</source>
<translation>&amp;Cancel·la</translation>
</message>
<message>
<location filename="../../src/core/config_mgr.cpp" line="174"/>
<location filename="../../src/core/config_mgr.cpp" line="165"/>
<source>&amp;Next &gt;</source>
<translation>&amp;Següent &gt;</translation>
</message>
<message>
<location filename="../../src/core/config_mgr.cpp" line="440"/>
<location filename="../../src/core/config_mgr.cpp" line="431"/>
<source>Choose LMMS working directory</source>
<translation>Escull el directori de treball de LMMS</translation>
</message>
<message>
<location filename="../../src/core/config_mgr.cpp" line="826"/>
<location filename="../../src/core/config_mgr.cpp" line="817"/>
<source>Accordingly to the information in your LMMS-configuration-file you seem to have run a different (probably older) version of LMMS before.
It is recommended to run the setup-wizard again to ensure that the latest samples, presets, demo-projects etc. are installed in your LMMS-working-directory.
Run the setup-wizard now?</source>
@@ -1967,62 +1968,62 @@ Assegura&apos;t que tens permís d&apos;escriptura per al fitxer/dispositiu sele
<context>
<name>instrumentTrack</name>
<message>
<location filename="../../src/tracks/instrument_track.cpp" line="84"/>
<location filename="../../src/tracks/instrument_track.cpp" line="82"/>
<source>With this knob you can set the volume of the opened channel.</source>
<translation>Amb aquesta roda pots ajustar el volum del canal obert.</translation>
</message>
<message>
<location filename="../../src/tracks/instrument_track.cpp" line="92"/>
<location filename="../../src/tracks/instrument_track.cpp" line="90"/>
<source>Within this rectangle you can set the position where the channel should be audible. You should have a soundcard supporting at least surround 4.0 for enjoying this feature.</source>
<translation>Amb aquest rectangle pots ajustar la posició on el canal ha de ser audible. Necessites una targeta de so que suporti almenys l&apos;envoltant 4.0 per a gaudir d&apos;aquesta característica.</translation>
</message>
<message>
<location filename="../../src/tracks/instrument_track.cpp" line="107"/>
<location filename="../../src/tracks/instrument_track.cpp" line="104"/>
<source>unnamed_channel</source>
<translation>canal_sense_nom</translation>
</message>
<message>
<location filename="../../src/tracks/instrument_track.cpp" line="193"/>
<location filename="../../src/tracks/instrument_track.cpp" line="187"/>
<source>Channel volume</source>
<translation>Volum del canal</translation>
</message>
<message>
<location filename="../../src/tracks/instrument_track.cpp" line="197"/>
<location filename="../../src/tracks/instrument_track.cpp" line="191"/>
<source>Channel volume:</source>
<translation>Volum del canal:</translation>
</message>
<message>
<location filename="../../src/tracks/instrument_track.cpp" line="136"/>
<location filename="../../src/tracks/instrument_track.cpp" line="130"/>
<source>VOL</source>
<translation>VOL</translation>
</message>
<message>
<location filename="../../src/tracks/instrument_track.cpp" line="147"/>
<location filename="../../src/tracks/instrument_track.cpp" line="141"/>
<source>MIDI input/output</source>
<translation>Entrada/sortida MIDI</translation>
</message>
<message>
<location filename="../../src/tracks/instrument_track.cpp" line="178"/>
<location filename="../../src/tracks/instrument_track.cpp" line="172"/>
<source>GENERAL SETTINGS</source>
<translation>CONFIGURACIÓ GENERAL</translation>
</message>
<message>
<location filename="../../src/tracks/instrument_track.cpp" line="198"/>
<location filename="../../src/tracks/instrument_track.cpp" line="192"/>
<source>VOLUME</source>
<translation>VOLUM</translation>
</message>
<message>
<location filename="../../src/tracks/instrument_track.cpp" line="226"/>
<location filename="../../src/tracks/instrument_track.cpp" line="220"/>
<source>FX CHNL</source>
<translation>CANAL FX</translation>
</message>
<message>
<location filename="../../src/tracks/instrument_track.cpp" line="240"/>
<location filename="../../src/tracks/instrument_track.cpp" line="234"/>
<source>Save current channel settings in a preset-file</source>
<translation>Desa la configuració del canal actual en una plantilla</translation>
</message>
<message>
<location filename="../../src/tracks/instrument_track.cpp" line="244"/>
<location filename="../../src/tracks/instrument_track.cpp" line="238"/>
<source>Click here, if you want to save current channel settings in a preset-file. Later you can load this preset by double-clicking it in the preset-browser.</source>
<translation>Pica aquí si vols desar la configuració del canal actual en una plantilla. Més tard podràs carregar aquesta plantilla picant-la dos cops al navegador de plantilles.</translation>
</message>
@@ -2032,57 +2033,57 @@ Assegura&apos;t que tens permís d&apos;escriptura per al fitxer/dispositiu sele
<translation>Defecte</translation>
</message>
<message>
<location filename="../../src/tracks/instrument_track.cpp" line="261"/>
<location filename="../../src/tracks/instrument_track.cpp" line="255"/>
<source>ENV/LFO/FILTER</source>
<translation>ENV/OBF/FILTRE</translation>
</message>
<message>
<location filename="../../src/tracks/instrument_track.cpp" line="262"/>
<location filename="../../src/tracks/instrument_track.cpp" line="256"/>
<source>ARP/CHORD</source>
<translation>ARP/ACORD</translation>
</message>
<message>
<location filename="../../src/tracks/instrument_track.cpp" line="264"/>
<location filename="../../src/tracks/instrument_track.cpp" line="258"/>
<source>MIDI</source>
<translation>MIDI</translation>
</message>
<message>
<location filename="../../src/tracks/instrument_track.cpp" line="297"/>
<location filename="../../src/tracks/instrument_track.cpp" line="291"/>
<source>MIDI input</source>
<translation>Entrada MIDI</translation>
</message>
<message>
<location filename="../../src/tracks/instrument_track.cpp" line="298"/>
<location filename="../../src/tracks/instrument_track.cpp" line="292"/>
<source>MIDI output</source>
<translation>Sortida MIDI</translation>
</message>
<message>
<location filename="../../src/tracks/instrument_track.cpp" line="351"/>
<location filename="../../src/tracks/instrument_track.cpp" line="347"/>
<source>Save channel-settings in file</source>
<translation>Desa configuració de canal en fitxer</translation>
</message>
<message>
<location filename="../../src/tracks/instrument_track.cpp" line="352"/>
<location filename="../../src/tracks/instrument_track.cpp" line="348"/>
<source>Channel-Settings-File (*.cs.xml)</source>
<translation>Fitxer de Configuració de Canal (*.cs.xml)</translation>
</message>
<message>
<location filename="../../src/tracks/instrument_track.cpp" line="1167"/>
<location filename="../../src/tracks/instrument_track.cpp" line="1163"/>
<source>PLUGIN</source>
<translation>CONN</translation>
</message>
<message>
<location filename="../../src/tracks/instrument_track.cpp" line="208"/>
<location filename="../../src/tracks/instrument_track.cpp" line="202"/>
<source>Surround area</source>
<translation>Àrea envoltant</translation>
</message>
<message>
<location filename="../../src/tracks/instrument_track.cpp" line="223"/>
<location filename="../../src/tracks/instrument_track.cpp" line="217"/>
<source>FX channel</source>
<translation>Canal FX</translation>
</message>
<message>
<location filename="../../src/tracks/instrument_track.cpp" line="263"/>
<location filename="../../src/tracks/instrument_track.cpp" line="257"/>
<source>FX</source>
<translation>FX</translation>
</message>
@@ -2259,6 +2260,11 @@ Desconeguts són connectors on no s&apos;han identificat canals d&apos;entrada o
Fent doble clic a qualsevol connector mostrarà informació sobre els ports.</translation>
</message>
<message>
<location filename="../../plugins/ladspa_browser/ladspa_browser.cpp" line="187"/>
<source>Type:</source>
<translation>Tipus:</translation>
</message>
</context>
<context>
<name>ladspaControl</name>
@@ -2342,42 +2348,42 @@ Fent doble clic a qualsevol connector mostrarà informació sobre els ports.</tr
<translation>Depenent SR</translation>
</message>
<message>
<location filename="../../plugins/ladspa_browser/ladspa_port_dialog.cpp" line="77"/>
<location filename="../../plugins/ladspa_browser/ladspa_port_dialog.cpp" line="78"/>
<source>Audio</source>
<translation>Àudio</translation>
</message>
<message>
<location filename="../../plugins/ladspa_browser/ladspa_port_dialog.cpp" line="77"/>
<location filename="../../plugins/ladspa_browser/ladspa_port_dialog.cpp" line="78"/>
<source>Control</source>
<translation>Control</translation>
</message>
<message>
<location filename="../../plugins/ladspa_browser/ladspa_port_dialog.cpp" line="81"/>
<location filename="../../plugins/ladspa_browser/ladspa_port_dialog.cpp" line="82"/>
<source>Input</source>
<translation>Entrada</translation>
</message>
<message>
<location filename="../../plugins/ladspa_browser/ladspa_port_dialog.cpp" line="81"/>
<location filename="../../plugins/ladspa_browser/ladspa_port_dialog.cpp" line="82"/>
<source>Output</source>
<translation>Sortida</translation>
</message>
<message>
<location filename="../../plugins/ladspa_browser/ladspa_port_dialog.cpp" line="84"/>
<location filename="../../plugins/ladspa_browser/ladspa_port_dialog.cpp" line="85"/>
<source>Toggled</source>
<translation>Commutat</translation>
</message>
<message>
<location filename="../../plugins/ladspa_browser/ladspa_port_dialog.cpp" line="85"/>
<location filename="../../plugins/ladspa_browser/ladspa_port_dialog.cpp" line="86"/>
<source>Integer</source>
<translation>Enter</translation>
</message>
<message>
<location filename="../../plugins/ladspa_browser/ladspa_port_dialog.cpp" line="86"/>
<location filename="../../plugins/ladspa_browser/ladspa_port_dialog.cpp" line="87"/>
<source>Float</source>
<translation>Flotant</translation>
</message>
<message>
<location filename="../../plugins/ladspa_browser/ladspa_port_dialog.cpp" line="162"/>
<location filename="../../plugins/ladspa_browser/ladspa_port_dialog.cpp" line="163"/>
<source>Yes</source>
<translation></translation>
</message>
@@ -2484,11 +2490,6 @@ Fent doble clic a qualsevol connector mostrarà informació sobre els ports.</tr
<source>SLIDE</source>
<translation>LLISCA</translation>
</message>
<message>
<location filename="../../plugins/lb302/lb302.cpp" line="379"/>
<source>Fine detuning of the VCO. Ranged between -100 and 100 centes.</source>
<translation>Desafinament fi del VCO. Graduat entre -100 i 100 cents.</translation>
</message>
<message>
<location filename="../../plugins/lb302/lb302.cpp" line="384"/>
<source>VCO Fine Detuning:</source>
@@ -2559,6 +2560,11 @@ Fent doble clic a qualsevol connector mostrarà informació sobre els ports.</tr
<source>WAVE:</source>
<translation>ONA:</translation>
</message>
<message>
<location filename="../../plugins/lb302/lb302.cpp" line="379"/>
<source>Fine detuning of the VCO. Ranged between -100 and 100 centes.</source>
<translation>Desafinament fi del VCO. Graduat entre -100 i 100 cents.</translation>
</message>
</context>
<context>
<name>lcdSpinBox</name>
@@ -2753,12 +2759,12 @@ Les tecles F1-F10 apaguen els 10 primers instruments a l&apos;Editor de Ritme Ba
<translation>&amp;Projecte</translation>
</message>
<message>
<location filename="../../src/core/main_window.cpp" line="619"/>
<location filename="../../src/core/main_window.cpp" line="618"/>
<source>Open project</source>
<translation>Obre projecte</translation>
</message>
<message>
<location filename="../../src/core/main_window.cpp" line="676"/>
<location filename="../../src/core/main_window.cpp" line="675"/>
<source>Save project</source>
<translation>Desa projecte</translation>
</message>
@@ -2823,7 +2829,7 @@ Les tecles F1-F10 apaguen els 10 primers instruments a l&apos;Editor de Ritme Ba
<translation>Mostra el diàleg de configuració</translation>
</message>
<message>
<location filename="../../src/core/main_window.cpp" line="724"/>
<location filename="../../src/core/main_window.cpp" line="723"/>
<source>Help not available</source>
<translation>Ajuda no disponible</translation>
</message>
@@ -2843,12 +2849,12 @@ Les tecles F1-F10 apaguen els 10 primers instruments a l&apos;Editor de Ritme Ba
<translation>E&amp;ines</translation>
</message>
<message>
<location filename="../../src/core/main_window.cpp" line="620"/>
<location filename="../../src/core/main_window.cpp" line="619"/>
<source>MultiMedia Project (*.mmp *.mmpz *.xml)</source>
<translation>Projecte MultiMèdia (*.mmp *.mmpz *.xml)</translation>
</message>
<message>
<location filename="../../src/core/main_window.cpp" line="678"/>
<location filename="../../src/core/main_window.cpp" line="677"/>
<source>MultiMedia Project (*.mmp *.mmpz);;MultiMedia Project Template (*.mpt)</source>
<translation>Projecte MultiMèdia (*.mmp *.mmpz);;Plantilla de Projecte MultiMèdia (*.mpt)</translation>
</message>
@@ -2868,7 +2874,7 @@ Les tecles F1-F10 apaguen els 10 primers instruments a l&apos;Editor de Ritme Ba
<translation>E&amp;xporta...</translation>
</message>
<message>
<location filename="../../src/core/main_window.cpp" line="729"/>
<location filename="../../src/core/main_window.cpp" line="728"/>
<source>Currently there&apos;s no help available in LMMS.
Please visit http://lmms.sf.net/wiki for documentation on LMMS.</source>
<translation>Actualment no hi ha ajuda disponible a LMMS.
@@ -2879,6 +2885,11 @@ Per favor, visita http://lmms.sf.net/wiki per a documentació sobre LMMS.</trans
<source>Recently opened projects</source>
<translation>Projectes oberts recentment</translation>
</message>
<message>
<location filename="../../src/core/main_window.cpp" line="524"/>
<source>Untitled</source>
<translation>Sense títol</translation>
</message>
</context>
<context>
<name>mallets</name>
@@ -3715,12 +3726,7 @@ usa la roda del ratolí per a ajustar el volum d&apos;un pas</translation>
<translation>Coses melòdiques per a fer soroll</translation>
</message>
<message>
<location filename="../../plugins/lb302/lb302.cpp" line="85"/>
<source>Incomplete monophonic immitation tb303</source>
<translation>Imitació monofònica incompleta tb303</translation>
</message>
<message>
<location filename="../../plugins/ladspa_effect/ladspa_effect.cpp" line="49"/>
<location filename="../../plugins/ladspa_effect/ladspa_effect.cpp" line="51"/>
<source>plugin for using arbitrary LADSPA-effects inside LMMS.</source>
<translation>connector per a usar efectes LADSPA arbitraris a LMMS.</translation>
</message>
@@ -3764,6 +3770,11 @@ usa la roda del ratolí per a ajustar el volum d&apos;un pas</translation>
<source>List installed LADSPA plugins</source>
<translation>Llista connectors LADSPA instal·lats</translation>
</message>
<message>
<location filename="../../plugins/lb302/lb302.cpp" line="85"/>
<source>Incomplete monophonic immitation tb303</source>
<translation>Imitació monofònica incompleta tb303</translation>
</message>
</context>
<context>
<name>polyb302Synth</name>
@@ -4592,12 +4603,12 @@ Fixa&apos;t que en alguns casos la paral·lelització no funcionarà amb memòri
<context>
<name>songEditor</name>
<message>
<location filename="../../src/core/song_editor.cpp" line="324"/>
<location filename="../../src/core/song_editor.cpp" line="325"/>
<source>Click here, if you want to stop playing of your song. The song-position-marker will be set to the start of your song.</source>
<translation>Pica aquí si vols aturar la reproducció de la cançó. El marcador de posició de cançó serà col·locat a l&apos;inici de la cançó.</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="1604"/>
<location filename="../../src/core/song_editor.cpp" line="1601"/>
<source>untitled</source>
<translation>sense títol</translation>
</message>
@@ -4627,57 +4638,57 @@ Fixa&apos;t que en alguns casos la paral·lelització no funcionarà amb memòri
<translation>No es pot escriure el fitxer</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="98"/>
<location filename="../../src/core/song_editor.cpp" line="99"/>
<source>Song-Editor</source>
<translation>Editor de Cançó</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="1633"/>
<location filename="../../src/core/song_editor.cpp" line="1630"/>
<source>The file &quot;%1&quot; already exists. Do you want to overwrite it?</source>
<translation>El fitxer &quot;%1&quot; ja existeix. Vols sobreescriure&apos;l?</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="319"/>
<location filename="../../src/core/song_editor.cpp" line="320"/>
<source>Click here, if you want to play your whole song. Playing will be started at the song-position-marker (green). You can also move it while playing.</source>
<translation>Pica aquí si vols reproduir la cançó sencera. La reproducció començarà al marcador de posició de cançó (verd). També pots moure&apos;l mentre es reprodueix.</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="275"/>
<location filename="../../src/core/song_editor.cpp" line="276"/>
<source>Play song (Space)</source>
<translation>Reprodueix cançó (Espai)</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="279"/>
<location filename="../../src/core/song_editor.cpp" line="280"/>
<source>Stop song (Space)</source>
<translation>Atura cançó (Espai)</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="140"/>
<location filename="../../src/core/song_editor.cpp" line="141"/>
<source>The tempo of a song is specified in beats per minute (BPM). If you want to change the tempo of your song, change this value. Every tact has four beats, so the tempo in BPM specifies, how many tacts / 4 should be played within a minute (or how many tacts should be played within four minutes).</source>
<translation>El tempo d&apos;una cançó s&apos;especifica en batecs per minut (BPM). Si vols canviar el tempo de la cançó, canvia aquest valor. Cada compàs quatre batecs, llavors el tempo en BPM especifica quants compassos / 4 s&apos;han de tocar en un minut (o quants compassos s&apos;han de tocar en quatre minuts).</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="219"/>
<location filename="../../src/core/song_editor.cpp" line="220"/>
<source>master pitch</source>
<translation>to mestre</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="132"/>
<location filename="../../src/core/song_editor.cpp" line="133"/>
<source>tempo of song</source>
<translation>tempo de cançó</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="284"/>
<location filename="../../src/core/song_editor.cpp" line="285"/>
<source>Add beat/bassline</source>
<translation>Afegeix ritme base</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="290"/>
<location filename="../../src/core/song_editor.cpp" line="291"/>
<source>Add sample-track</source>
<translation>Afegeix pista de mostra</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="1542"/>
<location filename="../../src/core/song_editor.cpp" line="1539"/>
<source>Project NOT saved.</source>
<translation>Projecte NO desat.</translation>
</message>
@@ -4689,27 +4700,27 @@ Do you want to overwrite it?</source>
Vols sobreescriure&apos;l?</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="1620"/>
<location filename="../../src/core/song_editor.cpp" line="1617"/>
<source>Select file for project-export...</source>
<translation>Selecciona fitxer per a exportar projecte...</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="1303"/>
<location filename="../../src/core/song_editor.cpp" line="1304"/>
<source>Project not saved</source>
<translation>Projecte no desat</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="1306"/>
<location filename="../../src/core/song_editor.cpp" line="1307"/>
<source>The current project was modified since last saving. Do you want to save it now?</source>
<translation>El projecte actual ha estat modificat des del darrer desament. Vols desar-lo ara?</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="1575"/>
<location filename="../../src/core/song_editor.cpp" line="1572"/>
<source>Import file</source>
<translation>Importa fitxer</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="127"/>
<location filename="../../src/core/song_editor.cpp" line="128"/>
<source>TEMPO/BPM</source>
<translation>TEMPO/BPM</translation>
</message>
@@ -4721,62 +4732,62 @@ Please make sure you have at least read-access to the file and try again.</sourc
Per favor, assegura&apos;t que tens permís de lectura per al fitxer i torna-ho a provar.</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="147"/>
<location filename="../../src/core/song_editor.cpp" line="148"/>
<source>High quality mode</source>
<translation>Mode alta qualitat</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="157"/>
<location filename="../../src/core/song_editor.cpp" line="158"/>
<source>Auto limiter</source>
<translation>Autolimitador</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="185"/>
<location filename="../../src/core/song_editor.cpp" line="186"/>
<source>master volume</source>
<translation>volum mestre</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="197"/>
<location filename="../../src/core/song_editor.cpp" line="198"/>
<source>Master volume</source>
<translation>Volum mestre</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="230"/>
<location filename="../../src/core/song_editor.cpp" line="231"/>
<source>Master pitch</source>
<translation>To mestre</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="296"/>
<location filename="../../src/core/song_editor.cpp" line="297"/>
<source>Draw mode</source>
<translation>Mode dibuixar</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="303"/>
<location filename="../../src/core/song_editor.cpp" line="304"/>
<source>Edit mode (select and move)</source>
<translation>Mode editar (selecciona i mou)</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="603"/>
<location filename="../../src/core/song_editor.cpp" line="604"/>
<source>Value: %1%</source>
<translation>Valor: %1%</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="651"/>
<location filename="../../src/core/song_editor.cpp" line="652"/>
<source>Value: %1 semitones</source>
<translation>Valor: %1 semitons</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="1532"/>
<location filename="../../src/core/song_editor.cpp" line="1529"/>
<source>Project saved</source>
<translation>Projecte desat</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="1534"/>
<location filename="../../src/core/song_editor.cpp" line="1531"/>
<source>The project %1 is now saved.</source>
<translation>El projecte %1 està desat.</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="1543"/>
<location filename="../../src/core/song_editor.cpp" line="1540"/>
<source>The project %1 was not saved!</source>
<translation>El projecte %1 no està desat!</translation>
</message>
@@ -4788,7 +4799,7 @@ Please make sure you have write-access to the file and try again.</source>
Per favor, assegura&apos;t que tens permís d&apos;escriptura per a aquest fitxer i torna-ho a provar.</translation>
</message>
<message>
<location filename="../../src/core/song_editor.cpp" line="125"/>
<location filename="../../src/core/song_editor.cpp" line="126"/>
<source>Tempo</source>
<translation>Tempo</translation>
</message>

View File

@@ -27,10 +27,8 @@
#ifndef _INSTRUMENT_TRACK_H
#define _INSTRUMENT_TRACK_H
#include <QtGui/QApplication>
#include <QtGui/QPushButton>
#include <QtGui/QPainter>
#include <QtGui/QMdiSubWindow>
#include "midi_event_processor.h"
#include "mixer.h"
@@ -55,7 +53,7 @@ class surroundArea;
class volumeKnob;
class instrumentTrack : public QMdiSubWindow, public track, public midiEventProcessor
class instrumentTrack : public QWidget, public track, public midiEventProcessor
{
Q_OBJECT
public:

View File

@@ -69,13 +69,6 @@ typedef struct portDescription
} port_desc_t;
inline ladspa_key_t subPluginKeyToLadspaKey(
const plugin::descriptor::subPluginFeatures::key * _key )
{
return( ladspa_key_t( _key->user.toStringList().first(),
_key->user.toStringList().last() ) );
}
inline plugin::descriptor::subPluginFeatures::key ladspaKeyToSubPluginKey(
plugin::descriptor * _desc,
const QString & _name,

View File

@@ -58,7 +58,7 @@ public:
int addWidgetToToolBar( QWidget * _w, int _row = -1, int _col = -1 );
void addSpacingToToolBar( int _size );
void resetWindowTitle( const QString & _add = "" );
void resetWindowTitle( void );
void clearKeyModifiers( void );

View File

@@ -93,8 +93,16 @@ public:
const QList<QVariant> l =
base64::decode( _dump_data ).
toList();
name = l[0].toString();
user = l[1];
if( l.empty() )
{
name = QString::null;
user = QVariant();
}
else
{
name = l[0].toString();
user = l[1];
}
}
inline QString dumpBase64( void ) const
{

View File

@@ -28,7 +28,6 @@
#define _SONG_EDITOR_H
#include "track_container.h"
#include "tool_button.h"
class QLabel;
@@ -40,6 +39,7 @@ class lcdSpinBox;
class pattern;
class textFloat;
class timeLine;
class toolButton;
const bpm_t MIN_BPM = 10;
@@ -183,10 +183,7 @@ public slots:
void setMasterVolume( volume _vol );
void setMasterPitch( int _master_pitch );
inline void setModified( void )
{
m_modified = TRUE;
}
void setModified( void );
void clearProject( void );
@@ -200,10 +197,7 @@ protected:
virtual QRect scrollAreaRect( void ) const;
virtual bool allowRubberband( void ) const
{
return( m_editModeButton->isChecked() );
}
virtual bool allowRubberband( void ) const;
protected slots:
@@ -275,7 +269,6 @@ private:
QString m_fileName;
QString m_oldFileName;
bool m_modified;
volatile bool m_exporting;
volatile bool m_playing;

View File

@@ -86,13 +86,12 @@ ladspaBrowser::ladspaBrowser( void ) :
QWidget * ws = new QWidget( this );
ws->setFixedSize( 500, 480 );
const QString type = "<b>" + tr( "Type:" ) + "</b> ";
QWidget * available = createTab( ws, type + tr( "Available Effects" ), VALID );
QWidget * unavailable = createTab( ws, type + tr( "Unavailable Effects" ),
QWidget * available = createTab( ws, tr( "Available Effects" ), VALID );
QWidget * unavailable = createTab( ws, tr( "Unavailable Effects" ),
INVALID );
QWidget * instruments = createTab( ws, type + tr( "Instruments" ), SOURCE );
QWidget * analysis = createTab( ws, type + tr( "Analysis Tools" ), SINK );
QWidget * other = createTab( ws, type + tr( "Don't know" ), OTHER );
QWidget * instruments = createTab( ws, tr( "Instruments" ), SOURCE );
QWidget * analysis = createTab( ws, tr( "Analysis Tools" ), SINK );
QWidget * other = createTab( ws, tr( "Don't know" ), OTHER );
m_tabBar->addTab( available, tr( "Available Effects" ),
@@ -185,7 +184,8 @@ QWidget * ladspaBrowser::createTab( QWidget * _parent, const QString & _txt,
layout->setSpacing( 0 );
layout->setMargin( 0 );
QLabel * title = new QLabel( _txt, tab );
const QString type = "<b>" + tr( "Type:" ) + "</b> ";
QLabel * title = new QLabel( type + _txt, tab );
QFont f = title->font();
f.setBold( TRUE );
title->setFont( pointSize<12>( f ) );

View File

@@ -23,14 +23,16 @@
*/
#include "ladspa_effect.h"
#include <QtGui/QMessageBox>
#include "ladspa_effect.h"
#include "mixer.h"
#include "config_mgr.h"
#include "audio_device.h"
#include "config_mgr.h"
#include "ladspa_2_lmms.h"
#include "ladspa_control.h"
#include "ladspa_subplugin_features.h"
#include "mixer.h"
#undef SINGLE_SOURCE_COMPILE
@@ -60,12 +62,12 @@ plugin::descriptor ladspaeffect_plugin_descriptor =
ladspaEffect::ladspaEffect( const descriptor::subPluginFeatures::key * _key ) :
effect( &ladspaeffect_plugin_descriptor, _key ),
m_effName( "none" ),
m_key( subPluginKeyToLadspaKey( _key )
m_key( ladspaSubPluginFeatures::subPluginKeyToLadspaKey( _key )
/* ladspa_key_t( _cdata->settings.attribute( "label" ),
_cdata->settings.attribute( "lib" ) )*/ ),
m_ladspa( engine::getLADSPAManager() )
_cdata->settings.attribute( "lib" ) )*/ )
{
if( m_ladspa->getDescription( m_key ) == NULL )
ladspa2LMMS * manager = engine::getLADSPAManager();
if( manager->getDescription( m_key ) == NULL )
{
QMessageBox::warning( 0, "Effect",
"Unknown LADSPA plugin requested: " + m_key.first,
@@ -74,15 +76,15 @@ ladspaEffect::ladspaEffect( const descriptor::subPluginFeatures::key * _key ) :
return;
}
setPublicName( m_ladspa->getShortName( m_key ) );
setPublicName( manager->getShortName( m_key ) );
// Calculate how many processing units are needed.
const ch_cnt_t lmms_chnls = engine::getMixer()->audioDev()->channels();
m_effectChannels = m_ladspa->getDescription( m_key )->inputChannels;
m_effectChannels = manager->getDescription( m_key )->inputChannels;
setProcessorCount( lmms_chnls / m_effectChannels );
// Categorize the ports, and create the buffers.
m_portCount = m_ladspa->getPortCount( m_key );
m_portCount = manager->getPortCount( m_key );
for( ch_cnt_t proc = 0; proc < getProcessorCount(); proc++ )
{
@@ -91,13 +93,13 @@ ladspaEffect::ladspaEffect( const descriptor::subPluginFeatures::key * _key ) :
{
port_desc_t * p = new portDescription;
p->name = m_ladspa->getPortName( m_key, port );
p->name = manager->getPortName( m_key, port );
p->proc = proc;
p->port_id = port;
p->control = NULL;
// Determine the port's category.
if( m_ladspa->isPortAudio( m_key, port ) )
if( manager->isPortAudio( m_key, port ) )
{
// Nasty manual memory management--was having difficulty
// with some prepackaged plugins that were segfaulting
@@ -105,18 +107,18 @@ ladspaEffect::ladspaEffect( const descriptor::subPluginFeatures::key * _key ) :
// memory management all taking place in one file.
p->buffer =
new LADSPA_Data[engine::getMixer()->framesPerPeriod()];
if( p->name.toUpper().contains( "IN" ) &&
m_ladspa->isPortInput( m_key, port ) )
if( p->name.toUpper().contains( "IN" ) &&
manager->isPortInput( m_key, port ) )
{
p->rate = CHANNEL_IN;
}
else if( p->name.toUpper().contains( "OUT" ) &&
m_ladspa->isPortOutput( m_key, port ) )
else if( p->name.toUpper().contains( "OUT" ) &&
manager->isPortOutput( m_key, port ) )
{
p->rate = CHANNEL_OUT;
}
else if( m_ladspa->isPortInput( m_key, port ) )
else if( manager->isPortInput( m_key, port ) )
{
p->rate = AUDIO_RATE_INPUT;
}
@@ -128,8 +130,8 @@ ladspaEffect::ladspaEffect( const descriptor::subPluginFeatures::key * _key ) :
else
{
p->buffer = new LADSPA_Data;
if( m_ladspa->isPortInput( m_key, port ) )
if( manager->isPortInput( m_key, port ) )
{
p->rate = CONTROL_RATE_INPUT;
}
@@ -138,13 +140,13 @@ ladspaEffect::ladspaEffect( const descriptor::subPluginFeatures::key * _key ) :
p->rate = CONTROL_RATE_OUTPUT;
}
}
p->scale = 1.0f;
if( m_ladspa->isPortToggled( m_key, port ) )
if( manager->isPortToggled( m_key, port ) )
{
p->data_type = TOGGLED;
}
else if( m_ladspa->isInteger( m_key, port ) )
else if( manager->isInteger( m_key, port ) )
{
p->data_type = INTEGER;
}
@@ -173,34 +175,34 @@ ladspaEffect::ladspaEffect( const descriptor::subPluginFeatures::key * _key ) :
{
p->data_type = FLOAT;
}
// Get the range and default values.
p->max = m_ladspa->getUpperBound( m_key, port );
p->max = manager->getUpperBound( m_key, port );
if( p->max == NOHINT )
{
p->max = p->name.toUpper() == "GAIN" ? 10.0f :
1.0f;
}
if( m_ladspa->areHintsSampleRateDependent(
if( manager->areHintsSampleRateDependent(
m_key, port ) )
{
p->max *= engine::getMixer()->sampleRate();
}
p->min = m_ladspa->getLowerBound( m_key, port );
p->min = manager->getLowerBound( m_key, port );
if( p->min == NOHINT )
{
p->min = 0.0f;
}
if( m_ladspa->areHintsSampleRateDependent(
if( manager->areHintsSampleRateDependent(
m_key, port ) )
{
p->min *= engine::getMixer()->sampleRate();
}
p->def = m_ladspa->getDefaultSetting( m_key, port );
p->def = manager->getDefaultSetting( m_key, port );
if( p->def == NOHINT )
{
if( p->data_type != TOGGLED )
@@ -212,16 +214,16 @@ ladspaEffect::ladspaEffect( const descriptor::subPluginFeatures::key * _key ) :
p->def = 1.0f;
}
}
p->max *= p->scale;
p->min *= p->scale;
p->def *= p->scale;
p->value = p->def;
ports.append( p );
// For convenience, keep a separate list of the ports that are used
// to control the processors.
if( p->rate == AUDIO_RATE_INPUT ||
@@ -233,9 +235,9 @@ ladspaEffect::ladspaEffect( const descriptor::subPluginFeatures::key * _key ) :
}
m_ports.append( ports );
}
// Instantiate the processing units.
m_descriptor = m_ladspa->getDescriptor( m_key );
m_descriptor = manager->getDescriptor( m_key );
if( m_descriptor == NULL )
{
QMessageBox::warning( 0, "Effect",
@@ -246,35 +248,34 @@ ladspaEffect::ladspaEffect( const descriptor::subPluginFeatures::key * _key ) :
}
if( m_descriptor->run == NULL )
{
QMessageBox::warning( 0, "Effect",
QMessageBox::warning( 0, "Effect",
"Plugin has no processor: " + m_key.first,
QMessageBox::Ok, QMessageBox::NoButton );
setDontRun( TRUE );
}
for( ch_cnt_t proc = 0; proc < getProcessorCount(); proc++ )
{
LADSPA_Handle effect = m_ladspa->instantiate( m_key,
LADSPA_Handle effect = manager->instantiate( m_key,
engine::getMixer()->sampleRate() );
if( effect == NULL )
{
QMessageBox::warning( 0, "Effect",
QMessageBox::warning( 0, "Effect",
"Can't get LADSPA instance: " + m_key.first,
QMessageBox::Ok, QMessageBox::NoButton );
setOkay( FALSE );
return;
}
m_handles.append( effect );
}
// Connect the ports.
for( ch_cnt_t proc = 0; proc < getProcessorCount(); proc++ )
{
for( Uint16 port = 0; port < m_portCount; port++ )
{
if( !m_ladspa->connectPort( m_key,
m_handles[proc],
port,
if( !manager->connectPort( m_key,
m_handles[proc],
port,
m_ports[proc][port]->buffer ) )
{
QMessageBox::warning( 0, "Effect",
@@ -285,11 +286,11 @@ ladspaEffect::ladspaEffect( const descriptor::subPluginFeatures::key * _key ) :
}
}
}
// Activate the processing units.
for( ch_cnt_t proc = 0; proc < getProcessorCount(); proc++ )
{
m_ladspa->activate( m_key, m_handles[proc] );
manager->activate( m_key, m_handles[proc] );
}
}
@@ -302,11 +303,12 @@ ladspaEffect::~ladspaEffect()
{
return;
}
for( ch_cnt_t proc = 0; proc < getProcessorCount(); proc++ )
{
m_ladspa->deactivate( m_key, m_handles[proc] );
m_ladspa->cleanup( m_key, m_handles[proc] );
ladspa2LMMS * manager = engine::getLADSPAManager();
manager->deactivate( m_key, m_handles[proc] );
manager->cleanup( m_key, m_handles[proc] );
for( Uint16 port = 0; port < m_portCount; port++ )
{
free( m_ports[proc][port]->buffer );

View File

@@ -29,7 +29,6 @@
#include "effect.h"
#include "engine.h"
#include "ladspa_2_lmms.h"
#include "ladspa_base.h"
#include "ladspa_control.h"
#include "ladspa_control_dialog.h"
@@ -82,7 +81,6 @@ public:
private:
QString m_effName;
ladspa_key_t m_key;
ladspa2LMMS * m_ladspa;
Uint16 m_effectChannels;
Uint16 m_portCount;
fpp_t m_bufferSize;

View File

@@ -26,16 +26,18 @@
*/
#include <QtCore/QString>
#include <QtGui/QLabel>
#include <QtGui/QBoxLayout>
#include "ladspa_subplugin_features.h"
#include "ladspa_2_lmms.h"
#include "mixer.h"
#include <QtGui/QHBoxLayout>
#include <QtGui/QLabel>
#include "audio_device.h"
#include "engine.h"
#include "ladspa_2_lmms.h"
#include "ladspa_base.h"
#include "mixer.h"
ladspaSubPluginFeatures::ladspaSubPluginFeatures( plugin::pluginTypes _type ) :
@@ -155,3 +157,15 @@ void ladspaSubPluginFeatures::listSubPluginKeys( plugin::descriptor * _desc,
}
ladspa_key_t ladspaSubPluginFeatures::subPluginKeyToLadspaKey(
const key * _key )
{
QStringList list = _key->user.toStringList();
if( list.empty() )
{
return( ladspa_key_t() );
}
return( ladspa_key_t( list.first(), list.last() ) );
}

View File

@@ -29,8 +29,8 @@
#ifndef _LADSPA_SUBPLUGIN_FEATURES_H
#define _LADSPA_SUBPLUGIN_FEATURES_H
#include "ladspa_manager.h"
#include "plugin.h"
#include "ladspa_base.h"
class ladspaSubPluginFeatures : public plugin::descriptor::subPluginFeatures
@@ -44,6 +44,8 @@ public:
virtual void listSubPluginKeys( plugin::descriptor * _desc,
keyList & _kl );
static ladspa_key_t subPluginKeyToLadspaKey( const key * _key );
} ;
#endif

View File

@@ -49,15 +49,6 @@
inline void mkPath( const QString & _path )
{
#warning TODO: directly integrate
// simple clean solution with Qt4...
QDir().mkpath( _path );
}
/*
void linkFile( const QString & _src, const QString & _dst )
{
@@ -514,7 +505,7 @@ void configManager::accept( void )
QMessageBox::Yes, QMessageBox::No )
== QMessageBox::Yes )
{
mkPath( m_workingDir );
QDir().mkpath( m_workingDir );
}
else
{
@@ -523,9 +514,9 @@ void configManager::accept( void )
}
}
mkPath( userProjectsDir() );
mkPath( userSamplesDir() );
mkPath( userPresetsDir() );
QDir().mkpath( userProjectsDir() );
QDir().mkpath( userSamplesDir() );
QDir().mkpath( userPresetsDir() );
/* processFilesRecursively( m_dataDir + "samples/", m_workingDir +
"samples/",
m_samplesCopyRB->isChecked() ?
@@ -923,7 +914,7 @@ void configManager::processFilesRecursively( const QString & _src_dir,
const QString & _dst_dir,
void( * _proc_func )( const QString & _src, const QString & _dst ) )
{
mkPath( _dst_dir );
QDir().mkpath( _dst_dir );
QStringList files = QDir( _src_dir ).entryList();
for( QStringList::iterator it = files.begin(); it != files.end(); ++it )
{

View File

@@ -72,6 +72,8 @@ void engine::init( const bool _has_gui )
s_automationEditor = new automationEditor;
s_ladspaManager = new ladspa2LMMS;
s_projectJournal->setJournalling( TRUE );
s_mixer->initDevices();
s_mainWindow->finalize();

View File

@@ -204,7 +204,7 @@ void mainWindow::finalize( void )
s_splashScreen->showMessage( tr( "Creating GUI..." ),
splash_alignment_flags,
Qt::white );
resetWindowTitle( "" );
resetWindowTitle();
setWindowIcon( embed::getIconPixmap( "icon" ) );
@@ -511,19 +511,20 @@ void mainWindow::addSpacingToToolBar( int _size )
void mainWindow::resetWindowTitle( const QString & _add )
void mainWindow::resetWindowTitle( void )
{
QString title = _add;
if( _add == "" && engine::getSongEditor()->projectFileName() != "" )
QString title = "";
if( engine::getSongEditor()->projectFileName() != "" )
{
title = QFileInfo( engine::getSongEditor()->projectFileName()
).completeBaseName();
}
if( title != "" )
if( title == "" )
{
title += " - ";
title = tr( "Untitled" );
}
setWindowTitle( title + tr( "LMMS %1" ).arg( VERSION ) );
setWindowTitle( title + "[*] - " + tr( "LMMS %1" ).arg( VERSION ) );
setWindowModified( FALSE );
}
@@ -566,9 +567,7 @@ void mainWindow::restoreWidgetState( QWidget * _w, const QDomElement & _de )
_de.attribute( "height" ).toInt() );
if( !r.isNull())
{
_w->show();
if (_w->parentWidget() != NULL &&
if ( _w->parentWidget() != NULL &&
_w->parentWidget()->inherits( "QMdiSubWindow" ) )
{
_w = _w->parentWidget();
@@ -576,7 +575,7 @@ void mainWindow::restoreWidgetState( QWidget * _w, const QDomElement & _de )
_w->resize( r.size() );
_w->move( r.topLeft() );
_w->setShown( _de.attribute( "visible" ).toInt() );
_w->setVisible( _de.attribute( "visible" ).toInt() );
}
}

View File

@@ -25,6 +25,9 @@
*/
#include "song_editor.h"
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -32,7 +35,6 @@
#include <math.h>
#include <Qt/QtXml>
#include <QtCore/QFile>
#include <QtCore/QFileInfo>
#include <QtGui/QAction>
@@ -41,41 +43,40 @@
#include <QtGui/QKeyEvent>
#include <QtGui/QLabel>
#include <QtGui/QLayout>
#include <QtGui/QMdiArea>
#include <QtGui/QMessageBox>
#include <QtGui/QScrollBar>
#include <QtGui/QStatusBar>
#include <QtGui/QMdiArea>
#include "song_editor.h"
#include "automatable_object_templates.h"
#include "automatable_slider.h"
#include "bb_editor.h"
#include "rename_dialog.h"
#include "embed.h"
#include "templates.h"
#include "export_project_dialog.h"
#include "bb_track.h"
#include "combobox.h"
#include "config_mgr.h"
#include "cpuload_widget.h"
#include "embed.h"
#include "envelope_and_lfo_widget.h"
#include "export_project_dialog.h"
#include "import_filter.h"
#include "instrument_track.h"
#include "mmp.h"
#include "lcd_spinbox.h"
#include "main_window.h"
#include "midi_client.h"
#include "mmp.h"
#include "note_play_handle.h"
#include "timeline.h"
#include "pattern.h"
#include "piano_roll.h"
#include "envelope_and_lfo_widget.h"
#include "visualization_widget.h"
#include "project_notes.h"
#include "config_mgr.h"
#include "lcd_spinbox.h"
#include "tooltip.h"
#include "tool_button.h"
#include "cpuload_widget.h"
#include "text_float.h"
#include "combobox.h"
#include "main_window.h"
#include "import_filter.h"
#include "project_journal.h"
#include "project_notes.h"
#include "rename_dialog.h"
#include "templates.h"
#include "text_float.h"
#include "timeline.h"
#include "tool_button.h"
#include "tooltip.h"
#include "visualization_widget.h"
#include "debug.h"
@@ -1295,7 +1296,7 @@ automationPattern * songEditor::tempoAutomationPattern( void )
bool songEditor::mayChangeProject( void )
{
if( m_modified == FALSE )
if( engine::getMainWindow()->isWindowModified() == FALSE )
{
return( TRUE );
}
@@ -1377,10 +1378,16 @@ void songEditor::createNewProject( void )
return;
}
m_loadingProject = TRUE;
clearProject();
engine::getProjectJournal()->setJournalling( FALSE );
m_fileName = m_oldFileName = "";
engine::getMainWindow()->resetWindowTitle();
track * t;
t = track::create( track::INSTRUMENT_TRACK, this );
dynamic_cast< instrumentTrack * >( t )->loadInstrument(
@@ -1391,20 +1398,13 @@ void songEditor::createNewProject( void )
"tripleoscillator" );
track::create( track::BB_TRACK, this );
m_loadingProject = TRUE;
m_bpmSpinBox->setInitValue( DEFAULT_BPM );
m_masterVolumeSlider->setInitValue( 100 );
m_masterPitchSlider->setInitValue( 0 );
m_loadingProject = FALSE;
m_fileName = m_oldFileName = "";
m_modified = FALSE;
engine::getMainWindow()->resetWindowTitle( "" );
engine::getProjectJournal()->setJournalling( TRUE );
m_loadingProject = FALSE;
}
@@ -1425,6 +1425,8 @@ void FASTCALL songEditor::createNewProjectFromTemplate( const QString &
// load given song
void FASTCALL songEditor::loadProject( const QString & _file_name )
{
m_loadingProject = TRUE;
clearProject();
engine::getProjectJournal()->setJournalling( FALSE );
@@ -1432,8 +1434,6 @@ void FASTCALL songEditor::loadProject( const QString & _file_name )
m_fileName = _file_name;
m_oldFileName = _file_name;
m_loadingProject = TRUE;
multimediaProject mmp( m_fileName );
// if file could not be opened, head-node is null and we create
// new project
@@ -1443,6 +1443,8 @@ void FASTCALL songEditor::loadProject( const QString & _file_name )
return;
}
engine::getMainWindow()->resetWindowTitle();
// get the header information from the DOM
m_bpmSpinBox->loadSettings( mmp.head(), "bpm" );
m_masterVolumeSlider->loadSettings( mmp.head(), "mastervol" );
@@ -1490,16 +1492,13 @@ void FASTCALL songEditor::loadProject( const QString & _file_name )
node = node.nextSibling();
}
m_modified = FALSE;
m_leftRightScroll->setValue( 0 );
m_loadingProject = FALSE;
configManager::inst()->addRecentlyOpenedProject( _file_name );
engine::getMainWindow()->resetWindowTitle( "" );
engine::getProjectJournal()->setJournalling( TRUE );
m_loadingProject = FALSE;
}
@@ -1527,15 +1526,13 @@ bool songEditor::saveProject( void )
if( mmp.writeFile( m_fileName, m_oldFileName == "" ||
m_fileName != m_oldFileName ) == TRUE )
{
m_modified = FALSE;
textFloat::displayMessage( tr( "Project saved" ),
tr( "The project %1 is now saved."
).arg( m_fileName ),
embed::getIconPixmap( "project_save", 24, 24 ),
2000 );
configManager::inst()->addRecentlyOpenedProject( m_fileName );
engine::getMainWindow()->resetWindowTitle( "" );
engine::getMainWindow()->resetWindowTitle();
}
else
{
@@ -1657,6 +1654,25 @@ void songEditor::updateFramesPerTact64th( void )
void songEditor::setModified( void )
{
if( !m_loadingProject )
{
engine::getMainWindow()->setWindowModified( TRUE );
}
}
bool songEditor::allowRubberband( void ) const
{
return( m_editModeButton->isChecked() );
}
#include "song_editor.moc"

View File

@@ -113,6 +113,7 @@ void trackContainer::loadSettings( const QDomElement & _this )
pd = new QProgressDialog( tr( "Loading project..." ),
tr( "Cancel" ), 0,
_this.childNodes().count() );
pd->setWindowModality( Qt::ApplicationModal );
pd->setWindowTitle( tr( "Please wait..." ) );
pd->show();
}

View File

@@ -37,7 +37,7 @@ projectJournal::projectJournal( void ) :
m_joIDs(),
m_journalEntries(),
m_currentJournalEntry( m_journalEntries.end() ),
m_journalling( TRUE )
m_journalling( FALSE )
{
}

View File

@@ -29,7 +29,6 @@
#include "instrument_track.h"
#include <Qt/QtXml>
#include <QtCore/QDir>
#include <QtCore/QFile>
#include <QtGui/QApplication>
@@ -38,10 +37,9 @@
#include <QtGui/QLabel>
#include <QtGui/QLayout>
#include <QtGui/QLineEdit>
#include <QtGui/QMdiArea>
#include <QtGui/QMenu>
#include <QtGui/QMessageBox>
#include <QtGui/QMdiArea>
#include <QtGui/QMdiSubWindow>
#include "arp_and_chords_tab_widget.h"
@@ -98,7 +96,6 @@ const int PIANO_HEIGHT = 84;
instrumentTrack::instrumentTrack( trackContainer * _tc ) :
QMdiSubWindow( engine::getMainWindow()->workspace() ),
track( _tc ),
midiEventProcessor(),
m_trackType( INSTRUMENT_TRACK ),
@@ -112,9 +109,6 @@ instrumentTrack::instrumentTrack( trackContainer * _tc ) :
m_midiInputAction( NULL ),
m_midiOutputAction( NULL )
{
QWidget * widget = new QWidget();
for( int i = 0; i < NOTES; ++i )
{
m_notes[i] = NULL;
@@ -171,12 +165,12 @@ instrumentTrack::instrumentTrack( trackContainer * _tc ) :
// init own layout + widgets
setFocusPolicy( Qt::StrongFocus );
QVBoxLayout * vlayout = new QVBoxLayout( widget );
QVBoxLayout * vlayout = new QVBoxLayout( this );
vlayout->setMargin( 0 );
vlayout->setSpacing( 0 );
m_generalSettingsWidget = new tabWidget( tr( "GENERAL SETTINGS" ),
widget );
this );
m_generalSettingsWidget->setFixedHeight( 90 );
// setup line-edit for changing channel-name
@@ -314,38 +308,40 @@ instrumentTrack::instrumentTrack( trackContainer * _tc ) :
_tc->updateAfterTrackAdd();
setWidget( widget );
setFixedWidth( INSTRUMENT_WIDTH );
resize( sizeHint() );
if( engine::getMainWindow()->workspace() )
{
engine::getMainWindow()->workspace()->addSubWindow( this );
parentWidget()->hide();
}
else
{
hide();
}
hide();
}
instrumentTrack::~instrumentTrack()
{
engine::getMixer()->removePlayHandles( this );
delete m_effWidget;
delete m_audioPort;
engine::getMixer()->getMIDIClient()->removePort( m_midiPort );
if( engine::getMainWindow()->workspace() )
{
parentWidget()->hide();
parentWidget()->deleteLater();
}
}
void instrumentTrack::saveSettingsBtnClicked( void )
{
QFileDialog sfd( this, tr( "Save channel-settings in file" ), "",
@@ -1209,12 +1205,28 @@ void instrumentTrack::toggledInstrumentTrackButton( bool _on )
}
if( _on )
{
show();
raise();
if( engine::getMainWindow()->workspace() )
{
show();
parentWidget()->show();
parentWidget()->raise();
}
else
{
show();
raise();
}
}
else
{
hide();
if( engine::getMainWindow()->workspace() )
{
parentWidget()->hide();
}
else
{
hide();
}
}
}
@@ -1224,7 +1236,14 @@ void instrumentTrack::toggledInstrumentTrackButton( bool _on )
void instrumentTrack::closeEvent( QCloseEvent * _ce )
{
_ce->ignore();
hide();
if( engine::getMainWindow()->workspace() )
{
parentWidget()->hide();
}
else
{
hide();
}
m_tswInstrumentTrackButton->setChecked( FALSE );
}