| @@ -135,7 +135,7 @@ public: | |||
| ASIOAudioIODevice (const String& name_, CLSID classId_) | |||
| : AudioIODevice (name_, T("ASIO")), | |||
| Thread (T("Juce ASIO")), | |||
| Thread ("Juce ASIO"), | |||
| classId (classId_), | |||
| currentBitDepth (16), | |||
| currentSampleRate (0), | |||
| @@ -153,60 +153,60 @@ BEGIN_JUCE_NAMESPACE | |||
| static const String getDSErrorMessage (HRESULT hr) | |||
| { | |||
| const tchar* result = 0; | |||
| const char* result = 0; | |||
| switch (hr) | |||
| { | |||
| case MAKE_HRESULT(1, 0x878, 10): | |||
| result = T("Device already allocated"); | |||
| result = "Device already allocated"; | |||
| break; | |||
| case MAKE_HRESULT(1, 0x878, 30): | |||
| result = T("Control unavailable"); | |||
| result = "Control unavailable"; | |||
| break; | |||
| case E_INVALIDARG: | |||
| result = T("Invalid parameter"); | |||
| result = "Invalid parameter"; | |||
| break; | |||
| case MAKE_HRESULT(1, 0x878, 50): | |||
| result = T("Invalid call"); | |||
| result = "Invalid call"; | |||
| break; | |||
| case E_FAIL: | |||
| result = T("Generic error"); | |||
| result = "Generic error"; | |||
| break; | |||
| case MAKE_HRESULT(1, 0x878, 70): | |||
| result = T("Priority level error"); | |||
| result = "Priority level error"; | |||
| break; | |||
| case E_OUTOFMEMORY: | |||
| result = T("Out of memory"); | |||
| result = "Out of memory"; | |||
| break; | |||
| case MAKE_HRESULT(1, 0x878, 100): | |||
| result = T("Bad format"); | |||
| result = "Bad format"; | |||
| break; | |||
| case E_NOTIMPL: | |||
| result = T("Unsupported function"); | |||
| result = "Unsupported function"; | |||
| break; | |||
| case MAKE_HRESULT(1, 0x878, 120): | |||
| result = T("No driver"); | |||
| result = "No driver"; | |||
| break; | |||
| case MAKE_HRESULT(1, 0x878, 130): | |||
| result = T("Already initialised"); | |||
| result = "Already initialised"; | |||
| break; | |||
| case CLASS_E_NOAGGREGATION: | |||
| result = T("No aggregation"); | |||
| result = "No aggregation"; | |||
| break; | |||
| case MAKE_HRESULT(1, 0x878, 150): | |||
| result = T("Buffer lost"); | |||
| result = "Buffer lost"; | |||
| break; | |||
| case MAKE_HRESULT(1, 0x878, 160): | |||
| result = T("Another app has priority"); | |||
| result = "Another app has priority"; | |||
| break; | |||
| case MAKE_HRESULT(1, 0x878, 170): | |||
| result = T("Uninitialised"); | |||
| result = "Uninitialised"; | |||
| break; | |||
| case E_NOINTERFACE: | |||
| result = T("No interface"); | |||
| result = "No interface"; | |||
| break; | |||
| case S_OK: | |||
| result = T("No error"); | |||
| result = "No error"; | |||
| break; | |||
| default: | |||
| @@ -982,7 +982,7 @@ public: | |||
| const int index, | |||
| const int inputIndex_) | |||
| : AudioIODevice (deviceName, T("DirectSound")), | |||
| Thread (T("Juce DSound")), | |||
| Thread ("Juce DSound"), | |||
| isOpen_ (false), | |||
| isStarted (false), | |||
| deviceIndex (index), | |||
| @@ -211,9 +211,9 @@ void Font::getDefaultFontNames (String& defaultSans, | |||
| String& defaultSerif, | |||
| String& defaultFixed) | |||
| { | |||
| defaultSans = T("Verdana"); | |||
| defaultSerif = T("Times"); | |||
| defaultFixed = T("Lucida Console"); | |||
| defaultSans = "Verdana"; | |||
| defaultSerif = "Times"; | |||
| defaultFixed = "Lucida Console"; | |||
| } | |||
| //============================================================================== | |||
| @@ -208,7 +208,7 @@ static const String getMessageWindowClassName() | |||
| if (number == 0) | |||
| number = 0x7fffffff & (int) Time::getHighResolutionTicks(); | |||
| return T("JUCEWindowClass_") + String (number); | |||
| return T("JUCEcs_") + String (number); | |||
| } | |||
| void MessageManager::doPlatformSpecificInitialisation() | |||
| @@ -55,7 +55,7 @@ public: | |||
| //============================================================================== | |||
| MidiInThread (MidiInput* const input_, | |||
| MidiInputCallback* const callback_) | |||
| : Thread (T("Juce Midi")), | |||
| : Thread ("Juce Midi"), | |||
| hIn (0), | |||
| input (input_), | |||
| callback (callback_), | |||
| @@ -226,7 +226,7 @@ static int getMACAddressViaGetAdaptersInfo (int64* addresses, int maxNum) | |||
| { | |||
| int numFound = 0; | |||
| DynamicLibraryLoader dll (T("iphlpapi.dll")); | |||
| DynamicLibraryLoader dll ("iphlpapi.dll"); | |||
| DynamicLibraryImport (GetAdaptersInfo, getAdaptersInfo, DWORD, dll, (PIP_ADAPTER_INFO, PULONG)) | |||
| if (getAdaptersInfo != 0) | |||
| @@ -266,7 +266,7 @@ static int getMACAddressesViaNetBios (int64* addresses, int maxNum) | |||
| { | |||
| int numFound = 0; | |||
| DynamicLibraryLoader dll (T("netapi32.dll")); | |||
| DynamicLibraryLoader dll ("netapi32.dll"); | |||
| DynamicLibraryImport (Netbios, NetbiosCall, UCHAR, dll, (PNCB)) | |||
| if (NetbiosCall != 0) | |||
| @@ -993,7 +993,7 @@ private: | |||
| { | |||
| public: | |||
| JUCE_CALLTYPE WindowClassHolder() | |||
| : windowClassName (T("JUCE_")) | |||
| : windowClassName ("JUCE_") | |||
| { | |||
| // this name has to be different for each app/dll instance because otherwise | |||
| // poor old Win32 can get a bit confused (even despite it not being a process-global | |||
| @@ -138,7 +138,7 @@ public: | |||
| glLoadIdentity(); | |||
| glOrtho (0.0, getWidth(), 0.0, getHeight(), 0, 1); | |||
| glColor4f (1.0f, 1.0f, 1.0f, fabsf (sinf (rotation / 100.0f))); | |||
| glColor4f (1.0f, 1.0f, 1.0f, fabsf (::sinf (rotation / 100.0f))); | |||
| glBegin(GL_QUADS); | |||
| glTexCoord2i (0, 0); glVertex2f (50.0f, getHeight() - 50.0f); | |||
| glTexCoord2i (1, 0); glVertex2f (getWidth() - 50.0f, getHeight() - 50.0f); | |||
| @@ -134,9 +134,9 @@ void JUCEApplication::getCommandInfo (const CommandID commandID, ApplicationComm | |||
| { | |||
| if (commandID == StandardApplicationCommandIDs::quit) | |||
| { | |||
| result.setInfo (T("Quit"), | |||
| T("Quits the application"), | |||
| T("Application"), | |||
| result.setInfo ("Quit", | |||
| "Quits the application", | |||
| "Application", | |||
| 0); | |||
| result.defaultKeypresses.add (KeyPress (T('q'), ModifierKeys::commandModifier, 0)); | |||
| @@ -199,7 +199,7 @@ int JUCEApplication::main (String& commandLine, JUCEApplication* const app) | |||
| JUCE_TRY | |||
| { | |||
| juce_setCurrentThreadName (T("Juce Message Thread")); | |||
| juce_setCurrentThreadName ("Juce Message Thread"); | |||
| // let the app do its setting-up.. | |||
| app->initialise (commandLine.trim()); | |||
| @@ -415,9 +415,9 @@ bool OggVorbisAudioFormat::isCompressed() | |||
| const StringArray OggVorbisAudioFormat::getQualityOptions() | |||
| { | |||
| StringArray s; | |||
| s.add (T("Low Quality")); | |||
| s.add (T("Medium Quality")); | |||
| s.add (T("High Quality")); | |||
| s.add ("Low Quality"); | |||
| s.add ("Medium Quality"); | |||
| s.add ("High Quality"); | |||
| return s; | |||
| } | |||
| @@ -974,13 +974,13 @@ const String MidiMessage::getMidiNoteName (int note, | |||
| bool includeOctaveNumber, | |||
| int octaveNumForMiddleC) throw() | |||
| { | |||
| static const tchar* sharpNoteNames[] = { T("C"), T("C#"), T("D"), T("D#"), T("E"), | |||
| T("F"), T("F#"), T("G"), T("G#"), T("A"), | |||
| T("A#"), T("B") }; | |||
| static const char* const sharpNoteNames[] = { "C", "C#", "D", "D#", "E", | |||
| "F", "F#", "G", "G#", "A", | |||
| "A#", "B" }; | |||
| static const tchar* flatNoteNames[] = { T("C"), T("Db"), T("D"), T("Eb"), T("E"), | |||
| T("F"), T("Gb"), T("G"), T("Ab"), T("A"), | |||
| T("Bb"), T("B") }; | |||
| static const char* const flatNoteNames[] = { "C", "Db", "D", "Eb", "E", | |||
| "F", "Gb", "G", "Ab", "A", | |||
| "Bb", "B" }; | |||
| if (note >= 0 && note < 128) | |||
| { | |||
| @@ -105,7 +105,7 @@ bool FileBasedDocument::loadFrom (const File& newFile, | |||
| } | |||
| else | |||
| { | |||
| error = T("The file doesn't exist"); | |||
| error = "The file doesn't exist"; | |||
| } | |||
| documentFile = oldFile; | |||
| @@ -40,7 +40,7 @@ BEGIN_JUCE_NAMESPACE | |||
| //============================================================================== | |||
| InterprocessConnection::InterprocessConnection (const bool callbacksOnMessageThread, | |||
| const uint32 magicMessageHeaderNumber) | |||
| : Thread (T("Juce IPC connection")), | |||
| : Thread ("Juce IPC connection"), | |||
| socket (0), | |||
| pipe (0), | |||
| callbackConnectionState (false), | |||
| @@ -38,7 +38,7 @@ BEGIN_JUCE_NAMESPACE | |||
| //============================================================================== | |||
| InterprocessConnectionServer::InterprocessConnectionServer() | |||
| : Thread (T("Juce IPC server")), | |||
| : Thread ("Juce IPC server"), | |||
| socket (0) | |||
| { | |||
| } | |||
| @@ -164,7 +164,7 @@ private: | |||
| public: | |||
| InternalTimerThread() | |||
| : Thread (T("Juce Timer")), | |||
| : Thread ("Juce Timer"), | |||
| firstTimer (0), | |||
| callbackNeeded (false) | |||
| { | |||
| @@ -106,9 +106,9 @@ const String Button::getTooltip() | |||
| String key (keyPresses.getUnchecked(i).getTextDescription()); | |||
| if (key.length() == 1) | |||
| tt << T(" [shortcut: '") << key << T("']"); | |||
| tt << " [shortcut: '" << key << "']"; | |||
| else | |||
| tt << T(" [") << key << T(']'); | |||
| tt << " [" << key << ']'; | |||
| } | |||
| return tt; | |||
| @@ -450,7 +450,7 @@ const BitArray FileBrowserComponent::getRoots (StringArray& rootNames, StringArr | |||
| if (volume.isEmpty()) | |||
| volume = TRANS("Hard Drive"); | |||
| name << T(" [") << drive->getVolumeLabel() << T(']'); | |||
| name << " [" << drive->getVolumeLabel() << ']'; | |||
| } | |||
| else if (drive->isOnCDRomDrive()) | |||
| { | |||
| @@ -463,18 +463,18 @@ const BitArray FileBrowserComponent::getRoots (StringArray& rootNames, StringArr | |||
| separators.setBit (rootPaths.size()); | |||
| rootPaths.add (File::getSpecialLocation (File::userDocumentsDirectory).getFullPathName()); | |||
| rootNames.add (T("Documents")); | |||
| rootNames.add ("Documents"); | |||
| rootPaths.add (File::getSpecialLocation (File::userDesktopDirectory).getFullPathName()); | |||
| rootNames.add (T("Desktop")); | |||
| rootNames.add ("Desktop"); | |||
| #endif | |||
| #ifdef JUCE_MAC | |||
| rootPaths.add (File::getSpecialLocation (File::userHomeDirectory).getFullPathName()); | |||
| rootNames.add (T("Home folder")); | |||
| rootNames.add ("Home folder"); | |||
| rootPaths.add (File::getSpecialLocation (File::userDocumentsDirectory).getFullPathName()); | |||
| rootNames.add (T("Documents")); | |||
| rootNames.add ("Documents"); | |||
| rootPaths.add (File::getSpecialLocation (File::userDesktopDirectory).getFullPathName()); | |||
| rootNames.add (T("Desktop")); | |||
| rootNames.add ("Desktop"); | |||
| separators.setBit (rootPaths.size()); | |||
| @@ -495,12 +495,12 @@ const BitArray FileBrowserComponent::getRoots (StringArray& rootNames, StringArr | |||
| #endif | |||
| #ifdef JUCE_LINUX | |||
| rootPaths.add (T("/")); | |||
| rootNames.add (T("/")); | |||
| rootPaths.add ("/"); | |||
| rootNames.add ("/"); | |||
| rootPaths.add (File::getSpecialLocation (File::userHomeDirectory).getFullPathName()); | |||
| rootNames.add (T("Home folder")); | |||
| rootNames.add ("Home folder"); | |||
| rootPaths.add (File::getSpecialLocation (File::userDesktopDirectory).getFullPathName()); | |||
| rootNames.add (T("Desktop")); | |||
| rootNames.add ("Desktop"); | |||
| #endif | |||
| return separators; | |||
| @@ -96,9 +96,9 @@ void ImagePreviewComponent::timerCallback() | |||
| int h = currentThumbnail->getHeight(); | |||
| currentDetails | |||
| << fileToLoad.getFileName() << T("\n") | |||
| << format->getFormatName() << T("\n") | |||
| << w << T(" x ") << h << T(" pixels\n") | |||
| << fileToLoad.getFileName() << "\n" | |||
| << format->getFormatName() << "\n" | |||
| << w << " x " << h << " pixels\n" | |||
| << File::descriptionOfSizeInBytes (fileToLoad.getSize()); | |||
| getThumbSize (w, h); | |||
| @@ -229,22 +229,22 @@ const String KeyPress::getTextDescription() const | |||
| if (keyCode > 0) | |||
| { | |||
| if (mods.isCtrlDown()) | |||
| desc += T("ctrl + "); | |||
| desc << "ctrl + "; | |||
| if (mods.isShiftDown()) | |||
| desc += T("shift + "); | |||
| desc << "shift + "; | |||
| #ifdef JUCE_MAC | |||
| // only do this on the mac, because on Windows ctrl and command are the same, | |||
| // and this would get confusing | |||
| if (mods.isCommandDown()) | |||
| desc += T("command + "); | |||
| desc << "command + "; | |||
| if (mods.isAltDown()) | |||
| desc += T("option + "); | |||
| desc << "option + "; | |||
| #else | |||
| if (mods.isAltDown()) | |||
| desc += T("alt + "); | |||
| desc << "alt + "; | |||
| #endif | |||
| for (int i = 0; i < numElementsInArray (keyNameTranslations); ++i) | |||
| @@ -252,13 +252,13 @@ const String KeyPress::getTextDescription() const | |||
| return desc + keyNameTranslations[i].name; | |||
| if (keyCode >= F1Key && keyCode <= F16Key) | |||
| desc << T("F") << (1 + keyCode - F1Key); | |||
| desc << 'F' << (1 + keyCode - F1Key); | |||
| else if (keyCode >= numberPad0 && keyCode <= numberPad9) | |||
| desc << numberPadPrefix << (keyCode - numberPad0); | |||
| else if (keyCode >= 33 && keyCode < 176) | |||
| desc += CharacterFunctions::toUpperCase ((tchar) keyCode); | |||
| else | |||
| desc << T('#') << String::toHexString (keyCode); | |||
| desc << '#' << String::toHexString (keyCode); | |||
| } | |||
| return desc; | |||
| @@ -1346,7 +1346,7 @@ Button* LookAndFeel::createDocumentWindowButton (int buttonType) | |||
| shape.addLineSegment (0.0f, 0.0f, 1.0f, 1.0f, 0.35f); | |||
| shape.addLineSegment (1.0f, 0.0f, 0.0f, 1.0f, 0.35f); | |||
| ShapeButton* const b = new ShapeButton (T("close"), | |||
| ShapeButton* const b = new ShapeButton ("close", | |||
| Colour (0x7fff3333), | |||
| Colour (0xd7ff3333), | |||
| Colour (0xf7ff3333)); | |||
| @@ -1358,7 +1358,7 @@ Button* LookAndFeel::createDocumentWindowButton (int buttonType) | |||
| { | |||
| shape.addLineSegment (0.0f, 0.5f, 1.0f, 0.5f, 0.25f); | |||
| DrawableButton* b = new DrawableButton (T("minimise"), DrawableButton::ImageFitted); | |||
| DrawableButton* b = new DrawableButton ("minimise", DrawableButton::ImageFitted); | |||
| DrawablePath dp; | |||
| dp.setPath (shape); | |||
| dp.setSolidFill (Colours::black.withAlpha (0.3f)); | |||
| @@ -1370,7 +1370,7 @@ Button* LookAndFeel::createDocumentWindowButton (int buttonType) | |||
| shape.addLineSegment (0.5f, 0.0f, 0.5f, 1.0f, 0.25f); | |||
| shape.addLineSegment (0.0f, 0.5f, 1.0f, 0.5f, 0.25f); | |||
| DrawableButton* b = new DrawableButton (T("maximise"), DrawableButton::ImageFitted); | |||
| DrawableButton* b = new DrawableButton ("maximise", DrawableButton::ImageFitted); | |||
| DrawablePath dp; | |||
| dp.setPath (shape); | |||
| dp.setSolidFill (Colours::black.withAlpha (0.3f)); | |||
| @@ -553,7 +553,7 @@ void ShinyLookAndFeel::drawLinearSlider (Graphics& g, | |||
| Button* ShinyLookAndFeel::createSliderButton (const bool isIncrement) | |||
| { | |||
| return new TextButton (isIncrement ? T("+") : T("-"), String::empty); | |||
| return new TextButton (isIncrement ? "+" : "-", String::empty); | |||
| } | |||
| ImageEffectFilter* ShinyLookAndFeel::getSliderEffect() | |||
| @@ -735,13 +735,13 @@ Button* ShinyLookAndFeel::createDocumentWindowButton (int buttonType) | |||
| shape.addLineSegment (0.0f, 0.0f, 1.0f, 1.0f, crossThickness * 1.4f); | |||
| shape.addLineSegment (1.0f, 0.0f, 0.0f, 1.0f, crossThickness * 1.4f); | |||
| return new GlassWindowButton (T("close"), Colour (0xffdd1100), shape, shape); | |||
| return new GlassWindowButton ("close", Colour (0xffdd1100), shape, shape); | |||
| } | |||
| else if (buttonType == DocumentWindow::minimiseButton) | |||
| { | |||
| shape.addLineSegment (0.0f, 0.5f, 1.0f, 0.5f, crossThickness); | |||
| return new GlassWindowButton (T("minimise"), Colour (0xffaa8811), shape, shape); | |||
| return new GlassWindowButton ("minimise", Colour (0xffaa8811), shape, shape); | |||
| } | |||
| else if (buttonType == DocumentWindow::maximiseButton) | |||
| { | |||
| @@ -757,7 +757,7 @@ Button* ShinyLookAndFeel::createDocumentWindowButton (int buttonType) | |||
| fullscreenShape.addRectangle (45.0f, 45.0f, 100.0f, 100.0f); | |||
| PathStrokeType (30.0f).createStrokedPath (fullscreenShape, fullscreenShape); | |||
| return new GlassWindowButton (T("maximise"), Colour (0xff119911), shape, fullscreenShape); | |||
| return new GlassWindowButton ("maximise", Colour (0xff119911), shape, fullscreenShape); | |||
| } | |||
| jassertfalse | |||
| @@ -115,10 +115,10 @@ public: | |||
| const String key (keyPresses.getUnchecked(i).getTextDescription()); | |||
| if (shortcutKey.isNotEmpty()) | |||
| shortcutKey << T(", "); | |||
| shortcutKey << ", "; | |||
| if (key.length() == 1) | |||
| shortcutKey << T("shortcut: '") << key << T("'"); | |||
| shortcutKey << "shortcut: '" << key << '\''; | |||
| else | |||
| shortcutKey << key; | |||
| } | |||
| @@ -126,7 +126,7 @@ public: | |||
| shortcutKey = shortcutKey.trim(); | |||
| if (shortcutKey.isNotEmpty()) | |||
| text << T("<end>") << shortcutKey; | |||
| text << "<end>" << shortcutKey; | |||
| } | |||
| } | |||
| @@ -277,7 +277,7 @@ AudioDeviceSelectorComponent::AudioDeviceSelectorComponent (AudioDeviceManager& | |||
| jassert (minOutputChannels >= 0 && minOutputChannels <= maxOutputChannels); | |||
| jassert (minInputChannels >= 0 && minInputChannels <= maxInputChannels); | |||
| audioDeviceDropDown = new ComboBox (T("device")); | |||
| audioDeviceDropDown = new ComboBox ("device"); | |||
| deviceManager_.addDeviceNamesToComboBox (*audioDeviceDropDown); | |||
| audioDeviceDropDown->setSelectedId (-1, true); | |||
| @@ -287,7 +287,7 @@ AudioDeviceSelectorComponent::AudioDeviceSelectorComponent (AudioDeviceManager& | |||
| audioDeviceDropDown->addListener (this); | |||
| addAndMakeVisible (audioDeviceDropDown); | |||
| Label* label = new Label (T("l1"), TRANS ("audio device:")); | |||
| Label* label = new Label ("l1", TRANS ("audio device:")); | |||
| label->attachToComponent (audioDeviceDropDown, true); | |||
| if (showMidiOptions) | |||
| @@ -298,7 +298,7 @@ AudioDeviceSelectorComponent::AudioDeviceSelectorComponent (AudioDeviceManager& | |||
| TRANS("(no midi inputs available)"), | |||
| 0, 0)); | |||
| midiInputsLabel = new Label (T("lm"), TRANS ("active midi inputs:")); | |||
| midiInputsLabel = new Label ("lm", TRANS ("active midi inputs:")); | |||
| midiInputsLabel->setJustificationType (Justification::topRight); | |||
| midiInputsLabel->attachToComponent (midiInputsList, true); | |||
| } | |||
| @@ -458,8 +458,8 @@ void AudioDeviceSelectorComponent::changeListenerCallback (void*) | |||
| if (currentDevice != 0) | |||
| { | |||
| // sample rate | |||
| addAndMakeVisible (sampleRateDropDown = new ComboBox (T("samplerate"))); | |||
| sampleRateLabel = new Label (T("l2"), TRANS ("sample rate:")); | |||
| addAndMakeVisible (sampleRateDropDown = new ComboBox ("samplerate")); | |||
| sampleRateLabel = new Label ("l2", TRANS ("sample rate:")); | |||
| sampleRateLabel->attachToComponent (sampleRateDropDown, true); | |||
| const int numRates = currentDevice->getNumSampleRates(); | |||
| @@ -476,8 +476,8 @@ void AudioDeviceSelectorComponent::changeListenerCallback (void*) | |||
| sampleRateDropDown->addListener (this); | |||
| // buffer size | |||
| addAndMakeVisible (bufferSizeDropDown = new ComboBox (T("buffersize"))); | |||
| bufferSizeLabel = new Label (T("l2"), TRANS ("audio buffer size:")); | |||
| addAndMakeVisible (bufferSizeDropDown = new ComboBox ("buffersize")); | |||
| bufferSizeLabel = new Label ("l2", TRANS ("audio buffer size:")); | |||
| bufferSizeLabel->attachToComponent (bufferSizeDropDown, true); | |||
| const int numBufferSizes = currentDevice->getNumBufferSizesAvailable(); | |||
| @@ -509,10 +509,10 @@ void AudioDeviceSelectorComponent::changeListenerCallback (void*) | |||
| addAndMakeVisible (outputChansBox | |||
| = new AudioDeviceSelectorComponentListBox (deviceManager, | |||
| AudioDeviceSelectorComponentListBox::audioOutputType, | |||
| TRANS("(no audio output channels found)"), | |||
| TRANS ("(no audio output channels found)"), | |||
| minOutputChannels, maxOutputChannels)); | |||
| outputsLabel = new Label (T("l3"), TRANS ("active output channels:")); | |||
| outputsLabel = new Label ("l3", TRANS ("active output channels:")); | |||
| outputsLabel->attachToComponent (outputChansBox, true); | |||
| } | |||
| @@ -522,10 +522,10 @@ void AudioDeviceSelectorComponent::changeListenerCallback (void*) | |||
| addAndMakeVisible (inputChansBox | |||
| = new AudioDeviceSelectorComponentListBox (deviceManager, | |||
| AudioDeviceSelectorComponentListBox::audioInputType, | |||
| TRANS("(no audio input channels found)"), | |||
| TRANS ("(no audio input channels found)"), | |||
| minInputChannels, maxInputChannels)); | |||
| inputsLabel = new Label (T("l4"), TRANS("active input channels:")); | |||
| inputsLabel = new Label ("l4", TRANS ("active input channels:")); | |||
| inputsLabel->attachToComponent (inputChansBox, true); | |||
| } | |||
| @@ -43,7 +43,7 @@ ThreadWithProgressWindow::ThreadWithProgressWindow (const String& title, | |||
| const bool hasProgressBar, | |||
| const bool hasCancelButton, | |||
| const int timeOutMsWhenCancelling_) | |||
| : Thread (T("Juce Progress Window")), | |||
| : Thread ("Juce Progress Window"), | |||
| progress (0.0), | |||
| alertWindow (title, String::empty, AlertWindow::NoIcon), | |||
| timeOutMsWhenCancelling (timeOutMsWhenCancelling_) | |||
| @@ -43,7 +43,7 @@ BEGIN_JUCE_NAMESPACE | |||
| //============================================================================== | |||
| TooltipWindow::TooltipWindow (Component* const parentComponent, | |||
| const int millisecondsBeforeTipAppears_) | |||
| : Component (T("tooltip")), | |||
| : Component ("tooltip"), | |||
| millisecondsBeforeTipAppears (millisecondsBeforeTipAppears_), | |||
| mouseX (0), | |||
| mouseY (0), | |||
| @@ -58,11 +58,13 @@ FileLogger::FileLogger (const File& logFile_, | |||
| logStream = logFile_.createOutputStream (256); | |||
| jassert (logStream != 0); | |||
| logMessage (T("\r\n**********************************************************\r\n") | |||
| + welcomeMessage | |||
| + T("\r\nLog started: ") | |||
| + Time::getCurrentTime().toString (true, true) | |||
| + T("\r\n")); | |||
| String welcome; | |||
| welcome << "\r\n**********************************************************\r\n" | |||
| << welcomeMessage | |||
| << "\r\nLog started: " << Time::getCurrentTime().toString (true, true) | |||
| << "\r\n"; | |||
| logMessage (welcome); | |||
| } | |||
| FileLogger::~FileLogger() | |||
| @@ -69,8 +69,8 @@ void Logger::writeToLog (const String& message) | |||
| #if JUCE_LOG_ASSERTIONS | |||
| void juce_LogAssertion (const char* filename, const int lineNum) throw() | |||
| { | |||
| String m (T("JUCE Assertion failure in ")); | |||
| m << filename << T(", line ") << lineNum; | |||
| String m ("JUCE Assertion failure in "); | |||
| m << filename << ", line " << lineNum; | |||
| Logger::writeToLog (m); | |||
| } | |||
| @@ -45,7 +45,7 @@ BEGIN_JUCE_NAMESPACE | |||
| //============================================================================== | |||
| const String SystemStats::getJUCEVersion() throw() | |||
| { | |||
| return T("JUCE v") + String (JUCE_MAJOR_VERSION) + T(".") + String (JUCE_MINOR_VERSION); | |||
| return T("JUCE v") + String (JUCE_MAJOR_VERSION) + "." + String (JUCE_MINOR_VERSION); | |||
| } | |||
| @@ -447,25 +447,25 @@ const String Time::getWeekdayName (const bool threeLetterVersion) const throw() | |||
| const String Time::getMonthName (int monthNumber, | |||
| const bool threeLetterVersion) throw() | |||
| { | |||
| const tchar* const shortMonthNames[] = { T("Jan"), T("Feb"), T("Mar"), T("Apr"), T("May"), T("Jun"), T("Jul"), T("Aug"), T("Sep"), T("Oct"), T("Nov"), T("Dec") }; | |||
| const tchar* const longMonthNames[] = { T("January"), T("February"), T("March"), T("April"), T("May"), T("June"), T("July"), T("August"), T("September"), T("October"), T("November"), T("December") }; | |||
| const char* const shortMonthNames[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; | |||
| const char* const longMonthNames[] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }; | |||
| monthNumber %= 12; | |||
| return TRANS((threeLetterVersion) ? shortMonthNames [monthNumber] | |||
| : longMonthNames [monthNumber]); | |||
| return TRANS (threeLetterVersion ? shortMonthNames [monthNumber] | |||
| : longMonthNames [monthNumber]); | |||
| } | |||
| const String Time::getWeekdayName (int day, | |||
| const bool threeLetterVersion) throw() | |||
| { | |||
| const tchar* const shortDayNames[] = { T("Sun"), T("Mon"), T("Tue"), T("Wed"), T("Thu"), T("Fri"), T("Sat") }; | |||
| const tchar* const longDayNames[] = { T("Sunday"), T("Monday"), T("Tuesday"), T("Wednesday"), T("Thursday"), T("Friday"), T("Saturday") }; | |||
| const char* const shortDayNames[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; | |||
| const char* const longDayNames[] = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" }; | |||
| day %= 7; | |||
| return TRANS((threeLetterVersion) ? shortDayNames [day] | |||
| : longDayNames [day]); | |||
| return TRANS (threeLetterVersion ? shortDayNames [day] | |||
| : longDayNames [day]); | |||
| } | |||
| END_JUCE_NAMESPACE | |||
| @@ -514,23 +514,23 @@ const String JUCE_CALLTYPE File::descriptionOfSizeInBytes (const int64 bytes) | |||
| { | |||
| if (bytes == 1) | |||
| { | |||
| return T("1 byte"); | |||
| return "1 byte"; | |||
| } | |||
| else if (bytes < 1024) | |||
| { | |||
| return String ((int) bytes) + T(" bytes"); | |||
| return String ((int) bytes) + " bytes"; | |||
| } | |||
| else if (bytes < 1024 * 1024) | |||
| { | |||
| return String (bytes / 1024.0, 1) + T(" KB"); | |||
| return String (bytes / 1024.0, 1) + " KB"; | |||
| } | |||
| else if (bytes < 1024 * 1024 * 1024) | |||
| { | |||
| return String (bytes / (1024.0 * 1024.0), 1) + T(" MB"); | |||
| return String (bytes / (1024.0 * 1024.0), 1) + " MB"; | |||
| } | |||
| else | |||
| { | |||
| return String (bytes / (1024.0 * 1024.0 * 1024.0), 1) + T(" GB"); | |||
| return String (bytes / (1024.0 * 1024.0 * 1024.0), 1) + " GB"; | |||
| } | |||
| } | |||
| @@ -325,7 +325,7 @@ bool Socket::createListener (int newPortNumber) | |||
| if (connected) | |||
| close(); | |||
| hostName = T("listener"); | |||
| hostName = "listener"; | |||
| portNumber = newPortNumber; | |||
| isListener = true; | |||
| @@ -50,9 +50,11 @@ PerformanceCounter::PerformanceCounter (const String& name_, | |||
| { | |||
| if (outputFile != File::nonexistent) | |||
| { | |||
| String s (T("**** Counter for \"")); | |||
| s += name_ + T("\" started at: "); | |||
| s += Time::getCurrentTime().toString (true, true) + T("\r\n"); | |||
| String s ("**** Counter for \""); | |||
| s << name_ << "\" started at: " | |||
| << Time::getCurrentTime().toString (true, true) | |||
| << "\r\n"; | |||
| outputFile.appendText (s, false, false); | |||
| } | |||
| } | |||
| @@ -81,22 +83,24 @@ void PerformanceCounter::printStatistics() | |||
| { | |||
| if (numRuns > 0) | |||
| { | |||
| String s (T("Performance count for \"")); | |||
| s << name << T("\" - average over ") << numRuns << T(" run(s) = "); | |||
| String s ("Performance count for \""); | |||
| s << name << "\" - average over " << numRuns << " run(s) = "; | |||
| const int micros = (int)(totalTime * (1000.0 / numRuns)); | |||
| const int micros = (int) (totalTime * (1000.0 / numRuns)); | |||
| if (micros > 10000) | |||
| s << (micros/1000) << T(" millisecs"); | |||
| s << (micros/1000) << " millisecs"; | |||
| else | |||
| s << micros << T(" microsecs"); | |||
| s << micros << " microsecs"; | |||
| s << (", total = ") << String (totalTime / 1000, 5) << T(" seconds"); | |||
| s << ", total = " << String (totalTime / 1000, 5) << " seconds"; | |||
| Logger::outputDebugString (s); | |||
| s << "\r\n"; | |||
| if (outputFile != File::nonexistent) | |||
| outputFile.appendText (s + T("\r\n"), false, false); | |||
| outputFile.appendText (s, false, false); | |||
| numRuns = 0; | |||
| totalTime = 0; | |||
| @@ -1922,7 +1922,6 @@ const String JUCE_CALLTYPE String::toHexString (const unsigned char* data, | |||
| String s (numChars, (int) 0); | |||
| tchar* d = s.text->text; | |||
| static const tchar* hexDigits = T("0123456789abcdef"); | |||
| for (int i = 0; i < size; ++i) | |||
| { | |||
| @@ -375,7 +375,7 @@ void XmlDocument::readQuotedString (String& result) throw() | |||
| else if (character == 0) | |||
| { | |||
| outOfData = true; | |||
| setLastError (T("unmatched quotes"), false); | |||
| setLastError ("unmatched quotes", false); | |||
| break; | |||
| } | |||
| @@ -408,7 +408,7 @@ XmlElement* XmlDocument::readNextElement (const bool alsoParseSubElements) throw | |||
| if (tagLen == 0) | |||
| { | |||
| setLastError (T("tag name missing"), false); | |||
| setLastError ("tag name missing", false); | |||
| return node; | |||
| } | |||
| } | |||
| @@ -484,7 +484,7 @@ XmlElement* XmlDocument::readNextElement (const bool alsoParseSubElements) throw | |||
| else | |||
| { | |||
| if (! outOfData) | |||
| setLastError (T("illegal characters found"), false); | |||
| setLastError ("illegal characters found", false); | |||
| } | |||
| break; | |||
| @@ -504,7 +504,7 @@ void XmlDocument::readChildElements (XmlElement* parent) throw() | |||
| if (outOfData) | |||
| { | |||
| setLastError (T("unmatched tags"), false); | |||
| setLastError ("unmatched tags", false); | |||
| break; | |||
| } | |||
| @@ -535,7 +535,7 @@ void XmlDocument::readChildElements (XmlElement* parent) throw() | |||
| { | |||
| if (*input == 0) | |||
| { | |||
| setLastError (T("unterminated CDATA section"), false); | |||
| setLastError ("unterminated CDATA section", false); | |||
| outOfData = true; | |||
| break; | |||
| } | |||
| @@ -604,7 +604,7 @@ void XmlDocument::readChildElements (XmlElement* parent) throw() | |||
| if (c == 0) | |||
| { | |||
| setLastError (T("unmatched tags"), false); | |||
| setLastError ("unmatched tags", false); | |||
| outOfData = true; | |||
| return; | |||
| } | |||
| @@ -660,7 +660,7 @@ void XmlDocument::readChildElements (XmlElement* parent) throw() | |||
| } | |||
| else if (c == 0) | |||
| { | |||
| setLastError (T("unmatched tags"), false); | |||
| setLastError ("unmatched tags", false); | |||
| outOfData = true; | |||
| return; | |||
| } | |||
| @@ -727,7 +727,7 @@ void XmlDocument::readEntity (String& result) throw() | |||
| if (hexValue < 0 || ++numChars > 8) | |||
| { | |||
| setLastError (T("illegal escape sequence"), true); | |||
| setLastError ("illegal escape sequence", true); | |||
| break; | |||
| } | |||
| @@ -745,7 +745,7 @@ void XmlDocument::readEntity (String& result) throw() | |||
| { | |||
| if (++numChars > 12) | |||
| { | |||
| setLastError (T("illegal escape sequence"), true); | |||
| setLastError ("illegal escape sequence", true); | |||
| break; | |||
| } | |||
| @@ -757,7 +757,7 @@ void XmlDocument::readEntity (String& result) throw() | |||
| } | |||
| else | |||
| { | |||
| setLastError (T("illegal escape sequence"), true); | |||
| setLastError ("illegal escape sequence", true); | |||
| result += T("&"); | |||
| return; | |||
| } | |||
| @@ -817,7 +817,7 @@ const String XmlDocument::expandEntity (const String& ent) | |||
| return String::charToString ((tchar) ent.substring (1).getIntValue()); | |||
| } | |||
| setLastError (T("illegal escape sequence"), false); | |||
| setLastError ("illegal escape sequence", false); | |||
| return T("&"); | |||
| } | |||
| else | |||
| @@ -902,7 +902,7 @@ const String XmlDocument::expandExternalEntity (const String& entity) | |||
| if (semiColon < 0) | |||
| { | |||
| setLastError (T("entity without terminating semi-colon"), false); | |||
| setLastError ("entity without terminating semi-colon", false); | |||
| break; | |||
| } | |||
| @@ -920,7 +920,7 @@ const String XmlDocument::expandExternalEntity (const String& entity) | |||
| } | |||
| } | |||
| setLastError (T("unknown entity"), true); | |||
| setLastError ("unknown entity", true); | |||
| return entity; | |||
| } | |||
| @@ -393,21 +393,21 @@ const String XmlElement::createDocument (const String& dtd, | |||
| if (includeXmlHeader) | |||
| { | |||
| doc << T("<?xml version=\"1.0\" encoding=\"") | |||
| doc << "<?xml version=\"1.0\" encoding=\"" | |||
| << encoding; | |||
| if (allOnOneLine) | |||
| doc += T("\"?> "); | |||
| doc += "\"?> "; | |||
| else | |||
| doc += T("\"?>\n\n"); | |||
| doc += "\"?>\n\n"; | |||
| } | |||
| if (dtd.isNotEmpty()) | |||
| { | |||
| if (allOnOneLine) | |||
| doc << dtd << T(" "); | |||
| doc << dtd << " "; | |||
| else | |||
| doc << dtd << T("\r\n"); | |||
| doc << dtd << "\r\n"; | |||
| } | |||
| MemoryOutputStream mem (2048, 4096); | |||
| @@ -429,8 +429,8 @@ bool XmlElement::writeToFile (const File& f, | |||
| if (out != 0) | |||
| { | |||
| *out << T("<?xml version=\"1.0\" encoding=\"") << encoding << T("\"?>\r\n\r\n") | |||
| << dtd << T("\r\n"); | |||
| *out << "<?xml version=\"1.0\" encoding=\"" << encoding << "\"?>\r\n\r\n" | |||
| << dtd << "\r\n"; | |||
| writeElementAsText (*out, 0); | |||
| @@ -183,7 +183,7 @@ void Thread::stopThread (const int timeOutMilliseconds) | |||
| // there are bound to be locks and events left in | |||
| // silly states when a thread is killed by force.. | |||
| jassertfalse | |||
| Logger::writeToLog (T("!! killing thread by force !!")); | |||
| Logger::writeToLog ("!! killing thread by force !!"); | |||
| juce_killThread (threadHandle_); | |||
| threadHandle_ = 0; | |||