xref: /haiku/src/apps/icon-o-matic/shape/commands/AddPathsCommand.cpp (revision 5c868338ec95a6d42343bc7ad66311e21113ac0e)
1 /*
2  * Copyright 2006, 2023, Haiku.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Stephan Aßmus <superstippi@gmx.de>
7  *		Zardshard
8  */
9 
10 #include "AddPathsCommand.h"
11 
12 #include <Catalog.h>
13 #include <Locale.h>
14 
15 #include "VectorPath.h"
16 
17 
18 #undef B_TRANSLATION_CONTEXT
19 #define B_TRANSLATION_CONTEXT "Icon-O-Matic-AddPathsCmd"
20 
21 
22 AddPathsCommand::AddPathsCommand(Container<VectorPath>* container,
23 		const VectorPath* const* paths, int32 count, bool ownsPaths, int32 index)
24 	: AddCommand<VectorPath>(container, paths, count, ownsPaths, index)
25 {
26 }
27 
28 
29 AddPathsCommand::~AddPathsCommand()
30 {
31 }
32 
33 
34 void
35 AddPathsCommand::GetName(BString& name)
36 {
37 	if (fOwnsItems) {
38 		if (fCount > 1)
39 			name << B_TRANSLATE("Add Paths");
40 		else
41 			name << B_TRANSLATE("Add Path");
42 	} else {
43 		if (fCount > 1)
44 			name << B_TRANSLATE("Assign Paths");
45 		else
46 			name << B_TRANSLATE("Assign Path");
47 	}
48 }
49