Rename NewLayerGroup command -> NewGroup command

This commit is contained in:
David Capello 2016-06-08 15:20:11 -03:00
parent 44f44c3126
commit 33d7f6509f
4 changed files with 13 additions and 13 deletions

View File

@ -664,7 +664,7 @@
<item command="LayerVisibility" text="&amp;Visible" />
<separator />
<item command="NewLayer" text="&amp;New Layer" />
<item command="NewLayerGroup" text="New &amp;Group" />
<item command="NewGroup" text="New &amp;Group" />
<item command="RemoveLayer" text="&amp;Remove Layer" />
<item command="BackgroundFromLayer" text="&amp;Background from Layer" />
<item command="LayerFromBackground" text="&amp;Layer from Background" />

View File

@ -228,8 +228,8 @@ add_library(app-lib
commands/cmd_new_file.cpp
commands/cmd_new_frame.cpp
commands/cmd_new_frame_tag.cpp
commands/cmd_new_group.cpp
commands/cmd_new_layer.cpp
commands/cmd_new_layer_set.cpp
commands/cmd_new_sprite_from_selection.cpp
commands/cmd_onionskin.cpp
commands/cmd_open_file.cpp

View File

@ -27,30 +27,30 @@ namespace app {
using namespace ui;
class NewLayerGroupCommand : public Command {
class NewGroupCommand : public Command {
public:
NewLayerGroupCommand();
Command* clone() const override { return new NewLayerGroupCommand(*this); }
NewGroupCommand();
Command* clone() const override { return new NewGroupCommand(*this); }
protected:
bool onEnabled(Context* context) override;
void onExecute(Context* context) override;
};
NewLayerGroupCommand::NewLayerGroupCommand()
: Command("NewLayerGroup",
NewGroupCommand::NewGroupCommand()
: Command("NewGroup",
"New Layer Group",
CmdRecordableFlag)
{
}
bool NewLayerGroupCommand::onEnabled(Context* context)
bool NewGroupCommand::onEnabled(Context* context)
{
return context->checkFlags(ContextFlags::ActiveDocumentIsWritable |
ContextFlags::HasActiveSprite);
}
void NewLayerGroupCommand::onExecute(Context* context)
void NewGroupCommand::onExecute(Context* context)
{
ContextWriter writer(context);
Document* document(writer.document());
@ -76,12 +76,12 @@ void NewLayerGroupCommand::onExecute(Context* context)
update_screen_for_document(document);
StatusBar::instance()->invalidate();
StatusBar::instance()->showTip(1000, "Layer `%s' created", name.c_str());
StatusBar::instance()->showTip(1000, "Group `%s' created", name.c_str());
}
Command* CommandFactory::createNewLayerGroupCommand()
Command* CommandFactory::createNewGroupCommand()
{
return new NewLayerGroupCommand;
return new NewGroupCommand;
}
} // namespace app

View File

@ -78,8 +78,8 @@ FOR_EACH_COMMAND(NewBrush)
FOR_EACH_COMMAND(NewFile)
FOR_EACH_COMMAND(NewFrame)
FOR_EACH_COMMAND(NewFrameTag)
FOR_EACH_COMMAND(NewGroup)
FOR_EACH_COMMAND(NewLayer)
FOR_EACH_COMMAND(NewLayerGroup)
FOR_EACH_COMMAND(NewSpriteFromSelection)
FOR_EACH_COMMAND(OpenFile)
FOR_EACH_COMMAND(OpenInFolder)