From 64a38ea6ee672e950850ff9babb26ba635e41bd5 Mon Sep 17 00:00:00 2001 From: jules Date: Thu, 19 Dec 2013 18:31:32 +0000 Subject: [PATCH] Sanity-checked places where introjucer GUI editor added TRANS macros. --- .../Source/ComponentEditor/components/jucer_ButtonHandler.h | 4 ++-- .../Source/ComponentEditor/components/jucer_ComboBoxHandler.h | 4 ++-- .../components/jucer_GenericComponentHandler.h | 2 +- .../ComponentEditor/components/jucer_GroupComponentHandler.h | 4 ++-- .../ComponentEditor/components/jucer_HyperlinkButtonHandler.h | 4 ++-- .../Source/ComponentEditor/components/jucer_LabelHandler.h | 2 +- .../Source/ComponentEditor/components/jucer_SliderHandler.h | 4 ++-- .../ComponentEditor/components/jucer_TextEditorHandler.h | 4 ++-- .../Source/ComponentEditor/components/jucer_TreeViewHandler.h | 4 ++-- .../Source/ComponentEditor/components/jucer_ViewportHandler.h | 4 ++-- .../Source/ComponentEditor/documents/jucer_ButtonDocument.cpp | 2 +- .../Introjucer/Source/ComponentEditor/jucer_JucerDocument.cpp | 2 +- modules/juce_graphics/native/juce_win32_Fonts.cpp | 1 - 13 files changed, 20 insertions(+), 21 deletions(-) diff --git a/extras/Introjucer/Source/ComponentEditor/components/jucer_ButtonHandler.h b/extras/Introjucer/Source/ComponentEditor/components/jucer_ButtonHandler.h index 4a520ed465..ebc076e327 100644 --- a/extras/Introjucer/Source/ComponentEditor/components/jucer_ButtonHandler.h +++ b/extras/Introjucer/Source/ComponentEditor/components/jucer_ButtonHandler.h @@ -80,9 +80,9 @@ public: return true; } - String getCreationParameters (GeneratedCode& code, Component* component) + String getCreationParameters (GeneratedCode&, Component* component) { - return quotedString (component->getName(), code.shouldUseTransMacro()); + return quotedString (component->getName(), false); } void fillInCreationCode (GeneratedCode& code, Component* component, const String& memberVariableName) diff --git a/extras/Introjucer/Source/ComponentEditor/components/jucer_ComboBoxHandler.h b/extras/Introjucer/Source/ComponentEditor/components/jucer_ComboBoxHandler.h index 5e4e22a36b..a8df7077f3 100644 --- a/extras/Introjucer/Source/ComponentEditor/components/jucer_ComboBoxHandler.h +++ b/extras/Introjucer/Source/ComponentEditor/components/jucer_ComboBoxHandler.h @@ -85,9 +85,9 @@ public: props.add (new ComboTextWhenNoItemsProperty (c, document)); } - String getCreationParameters (GeneratedCode& code, Component* component) + String getCreationParameters (GeneratedCode&, Component* component) { - return quotedString (component->getName(), code.shouldUseTransMacro()); + return quotedString (component->getName(), false); } void fillInCreationCode (GeneratedCode& code, Component* component, const String& memberVariableName) diff --git a/extras/Introjucer/Source/ComponentEditor/components/jucer_GenericComponentHandler.h b/extras/Introjucer/Source/ComponentEditor/components/jucer_GenericComponentHandler.h index 3d0b94395f..bbdf588f7c 100644 --- a/extras/Introjucer/Source/ComponentEditor/components/jucer_GenericComponentHandler.h +++ b/extras/Introjucer/Source/ComponentEditor/components/jucer_GenericComponentHandler.h @@ -122,7 +122,7 @@ public: if (component->getName().isNotEmpty()) code.constructorCode << memberVariableName << "->setName (" - << quotedString (component->getName(), code.shouldUseTransMacro()) + << quotedString (component->getName(), false) << ");\n\n"; else code.constructorCode << "\n"; diff --git a/extras/Introjucer/Source/ComponentEditor/components/jucer_GroupComponentHandler.h b/extras/Introjucer/Source/ComponentEditor/components/jucer_GroupComponentHandler.h index deeaed7c0a..1806eb74f9 100644 --- a/extras/Introjucer/Source/ComponentEditor/components/jucer_GroupComponentHandler.h +++ b/extras/Introjucer/Source/ComponentEditor/components/jucer_GroupComponentHandler.h @@ -67,9 +67,9 @@ public: String getCreationParameters (GeneratedCode& code, Component* component) { - GroupComponent* g = dynamic_cast (component); + GroupComponent* g = dynamic_cast (component); - return quotedString (component->getName(), code.shouldUseTransMacro()) + return quotedString (component->getName(), false) + ",\n" + quotedString (g->getText(), code.shouldUseTransMacro()); } diff --git a/extras/Introjucer/Source/ComponentEditor/components/jucer_HyperlinkButtonHandler.h b/extras/Introjucer/Source/ComponentEditor/components/jucer_HyperlinkButtonHandler.h index dd8d23c80e..cc4ac2013e 100644 --- a/extras/Introjucer/Source/ComponentEditor/components/jucer_HyperlinkButtonHandler.h +++ b/extras/Introjucer/Source/ComponentEditor/components/jucer_HyperlinkButtonHandler.h @@ -69,11 +69,11 @@ public: String getCreationParameters (GeneratedCode& code, Component* comp) { - HyperlinkButton* const hb = dynamic_cast (comp); + HyperlinkButton* const hb = dynamic_cast (comp); return quotedString (hb->getButtonText(), code.shouldUseTransMacro()) + ",\nURL (" - + quotedString (hb->getURL().toString (false), code.shouldUseTransMacro()) + + quotedString (hb->getURL().toString (false), false) + ")"; } diff --git a/extras/Introjucer/Source/ComponentEditor/components/jucer_LabelHandler.h b/extras/Introjucer/Source/ComponentEditor/components/jucer_LabelHandler.h index 93f74eb459..c59afa0d25 100644 --- a/extras/Introjucer/Source/ComponentEditor/components/jucer_LabelHandler.h +++ b/extras/Introjucer/Source/ComponentEditor/components/jucer_LabelHandler.h @@ -101,7 +101,7 @@ public: { Label* const l = dynamic_cast (component); - return quotedString (component->getName(), code.shouldUseTransMacro()) + return quotedString (component->getName(), false) + ",\n" + quotedString (l->getText(), code.shouldUseTransMacro()); } diff --git a/extras/Introjucer/Source/ComponentEditor/components/jucer_SliderHandler.h b/extras/Introjucer/Source/ComponentEditor/components/jucer_SliderHandler.h index 514f794de4..dcf9e05d61 100644 --- a/extras/Introjucer/Source/ComponentEditor/components/jucer_SliderHandler.h +++ b/extras/Introjucer/Source/ComponentEditor/components/jucer_SliderHandler.h @@ -85,9 +85,9 @@ public: return true; } - String getCreationParameters (GeneratedCode& code, Component* component) + String getCreationParameters (GeneratedCode&, Component* component) { - return quotedString (component->getName(), code.shouldUseTransMacro()); + return quotedString (component->getName(), false); } void fillInCreationCode (GeneratedCode& code, Component* component, const String& memberVariableName) diff --git a/extras/Introjucer/Source/ComponentEditor/components/jucer_TextEditorHandler.h b/extras/Introjucer/Source/ComponentEditor/components/jucer_TextEditorHandler.h index e4a10c8573..e1a399fd2b 100644 --- a/extras/Introjucer/Source/ComponentEditor/components/jucer_TextEditorHandler.h +++ b/extras/Introjucer/Source/ComponentEditor/components/jucer_TextEditorHandler.h @@ -96,9 +96,9 @@ public: addColourProperties (t, document, props); } - String getCreationParameters (GeneratedCode& code, Component* component) + String getCreationParameters (GeneratedCode&, Component* component) { - return quotedString (component->getName(), code.shouldUseTransMacro()); + return quotedString (component->getName(), false); } void fillInCreationCode (GeneratedCode& code, Component* component, const String& memberVariableName) diff --git a/extras/Introjucer/Source/ComponentEditor/components/jucer_TreeViewHandler.h b/extras/Introjucer/Source/ComponentEditor/components/jucer_TreeViewHandler.h index bcfe933cb5..98d458dd16 100644 --- a/extras/Introjucer/Source/ComponentEditor/components/jucer_TreeViewHandler.h +++ b/extras/Introjucer/Source/ComponentEditor/components/jucer_TreeViewHandler.h @@ -73,9 +73,9 @@ public: addColourProperties (t, document, props); } - String getCreationParameters (GeneratedCode& code, Component* comp) + String getCreationParameters (GeneratedCode&, Component* comp) { - return quotedString (comp->getName(), code.shouldUseTransMacro()); + return quotedString (comp->getName(), false); } void fillInCreationCode (GeneratedCode& code, Component* component, const String& memberVariableName) diff --git a/extras/Introjucer/Source/ComponentEditor/components/jucer_ViewportHandler.h b/extras/Introjucer/Source/ComponentEditor/components/jucer_ViewportHandler.h index 6d1c08a477..5756f6f1a2 100644 --- a/extras/Introjucer/Source/ComponentEditor/components/jucer_ViewportHandler.h +++ b/extras/Introjucer/Source/ComponentEditor/components/jucer_ViewportHandler.h @@ -97,9 +97,9 @@ public: } } - String getCreationParameters (GeneratedCode& code, Component* comp) + String getCreationParameters (GeneratedCode&, Component* comp) { - return quotedString (comp->getName(), code.shouldUseTransMacro()); + return quotedString (comp->getName(), false); } void fillInCreationCode (GeneratedCode& code, Component* component, const String& memberVariableName) diff --git a/extras/Introjucer/Source/ComponentEditor/documents/jucer_ButtonDocument.cpp b/extras/Introjucer/Source/ComponentEditor/documents/jucer_ButtonDocument.cpp index a0635bb46a..bb3d2707a6 100644 --- a/extras/Introjucer/Source/ComponentEditor/documents/jucer_ButtonDocument.cpp +++ b/extras/Introjucer/Source/ComponentEditor/documents/jucer_ButtonDocument.cpp @@ -318,7 +318,7 @@ void ButtonDocument::fillInGeneratedCode (GeneratedCode& code) const { JucerDocument::fillInGeneratedCode (code); - code.parentClassInitialiser = "Button (" + quotedString (code.componentName, shouldUseTransMacro()) + ")"; + code.parentClassInitialiser = "Button (" + quotedString (code.componentName, false) + ")"; code.removeCallback ("void", "paint (Graphics& g)"); } diff --git a/extras/Introjucer/Source/ComponentEditor/jucer_JucerDocument.cpp b/extras/Introjucer/Source/ComponentEditor/jucer_JucerDocument.cpp index 45b04e26ef..154a39d16d 100644 --- a/extras/Introjucer/Source/ComponentEditor/jucer_JucerDocument.cpp +++ b/extras/Introjucer/Source/ComponentEditor/jucer_JucerDocument.cpp @@ -426,7 +426,7 @@ void JucerDocument::fillInGeneratedCode (GeneratedCode& code) const code.initialisers.addLines (variableInitialisers); if (! componentName.isEmpty()) - code.constructorCode << "setName (" + quotedString (componentName, shouldUseTransMacro()) + ");\n"; + code.constructorCode << "setName (" + quotedString (componentName, false) + ");\n"; // call these now, just to make sure they're the first two methods in the list. code.getCallbackCode (String::empty, "void", "paint (Graphics& g)", false) diff --git a/modules/juce_graphics/native/juce_win32_Fonts.cpp b/modules/juce_graphics/native/juce_win32_Fonts.cpp index 4c72e93b41..59a6032758 100644 --- a/modules/juce_graphics/native/juce_win32_Fonts.cpp +++ b/modules/juce_graphics/native/juce_win32_Fonts.cpp @@ -330,7 +330,6 @@ public: defaultGlyph (-1) { DWORD numInstalled = 0; - memoryFont = AddFontMemResourceEx (const_cast (data), (DWORD) dataSize, nullptr, &numInstalled);