mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-17 00:44:19 +00:00
Introjucer: added a translation tool utility
This commit is contained in:
parent
e64c91f71e
commit
6c8fa3e6e7
13 changed files with 436 additions and 41 deletions
|
|
@ -30,7 +30,7 @@
|
|||
#include "jucer_ConfigPage.h"
|
||||
#include "jucer_TreeViewTypes.h"
|
||||
#include "../Project Saving/jucer_ProjectExporter.h"
|
||||
|
||||
#include "../Utility/jucer_TranslationTool.h"
|
||||
|
||||
//==============================================================================
|
||||
class FileTreeTab : public TreePanelBase
|
||||
|
|
@ -546,6 +546,26 @@ void ProjectContentComponent::showBubbleMessage (const Rectangle<int>& pos, cons
|
|||
bubbleMessage.showAt (pos, AttributedString (text), 3000, true, false);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void ProjectContentComponent::showTranslationTool()
|
||||
{
|
||||
if (translationTool != nullptr)
|
||||
{
|
||||
translationTool->toFront (true);
|
||||
}
|
||||
else if (project != nullptr)
|
||||
{
|
||||
TranslationToolComponent* ttc = new TranslationToolComponent();
|
||||
ttc->initialiseForProject (*project);
|
||||
|
||||
new FloatingToolWindow ("Translation File Builder",
|
||||
"transToolWindowPos_" + project->getProjectUID(),
|
||||
ttc, translationTool,
|
||||
600, 700,
|
||||
500, 400, 10000, 10000);
|
||||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
ApplicationCommandTarget* ProjectContentComponent::getNextCommandTarget()
|
||||
{
|
||||
|
|
@ -566,7 +586,8 @@ void ProjectContentComponent::getAllCommands (Array <CommandID>& commands)
|
|||
CommandIDs::goToPreviousDoc,
|
||||
CommandIDs::goToNextDoc,
|
||||
CommandIDs::goToCounterpart,
|
||||
CommandIDs::deleteSelectedItem };
|
||||
CommandIDs::deleteSelectedItem,
|
||||
CommandIDs::showTranslationTool };
|
||||
|
||||
commands.addArray (ids, numElementsInArray (ids));
|
||||
}
|
||||
|
|
@ -691,6 +712,10 @@ void ProjectContentComponent::getCommandInfo (const CommandID commandID, Applica
|
|||
result.setActive (dynamic_cast<TreePanelBase*> (treeViewTabs.getCurrentContentComponent()) != nullptr);
|
||||
break;
|
||||
|
||||
case CommandIDs::showTranslationTool:
|
||||
result.setInfo ("Translation File Builder", "Shows the translation file helper tool", CommandCategories::general, 0);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -751,6 +776,8 @@ bool ProjectContentComponent::perform (const InvocationInfo& info)
|
|||
|
||||
break;
|
||||
|
||||
case CommandIDs::showTranslationTool: showTranslationTool(); break;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue