Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
magicseteditor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
magicseteditor
Commits
27080254
Commit
27080254
authored
May 18, 2008
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Names of add/remove card/keyword actions
parent
02325c19
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
547 additions
and
537 deletions
+547
-537
src/data/action/generic.hpp
src/data/action/generic.hpp
+1
-1
src/data/action/symbol.cpp
src/data/action/symbol.cpp
+2
-2
src/data/card.hpp
src/data/card.hpp
+3
-0
src/data/keyword.hpp
src/data/keyword.hpp
+6
-0
src/resource/common/expected_locale_keys
src/resource/common/expected_locale_keys
+532
-534
src/script/to_value.hpp
src/script/to_value.hpp
+3
-0
No files found.
src/data/action/generic.hpp
View file @
27080254
...
...
@@ -91,7 +91,7 @@ GenericAddAction<T>::GenericAddAction(AddingOrRemoving ar, const vector<T>& item
template
<
typename
T
>
String
GenericAddAction
<
T
>::
getName
()
const
{
String
type
=
type_name
(
steps
.
front
().
item
)
+
(
steps
.
size
()
==
1
?
_
(
""
)
:
_
(
"s"
));
return
adding
?
_ACTION_1_
(
"add
object"
,
type
)
:
_ACTION_1_
(
"remove object
"
,
type
);
return
adding
?
_ACTION_1_
(
"add
item"
,
type
)
:
_ACTION_1_
(
"remove item
"
,
type
);
}
template
<
typename
T
>
...
...
src/data/action/symbol.cpp
View file @
27080254
...
...
@@ -357,7 +357,7 @@ AddSymbolPartAction::AddSymbolPartAction(Symbol& symbol, const SymbolPartP& part
{}
String
AddSymbolPartAction
::
getName
(
bool
to_undo
)
const
{
return
_ACTION_1_
(
"add
part
"
,
part
->
name
);
return
_ACTION_1_
(
"add
item
"
,
part
->
name
);
}
void
AddSymbolPartAction
::
perform
(
bool
to_undo
)
{
...
...
@@ -396,7 +396,7 @@ void RemoveSymbolPartsAction::check(SymbolGroup& group, const set<SymbolPartP>&
}
String
RemoveSymbolPartsAction
::
getName
(
bool
to_undo
)
const
{
return
_ACTION_1_
(
"remove
parts
"
,
removals
.
size
()
==
1
?
_TYPE_
(
"shape"
)
:
_TYPE_
(
"shapes"
));
return
_ACTION_1_
(
"remove
item
"
,
removals
.
size
()
==
1
?
_TYPE_
(
"shape"
)
:
_TYPE_
(
"shapes"
));
}
void
RemoveSymbolPartsAction
::
perform
(
bool
to_undo
)
{
...
...
src/data/card.hpp
View file @
27080254
...
...
@@ -86,6 +86,9 @@ class Card : public IntrusivePtrVirtualBase {
inline
String
type_name
(
const
Card
&
)
{
return
_TYPE_
(
"card"
);
}
inline
String
type_name
(
const
vector
<
CardP
>&
)
{
return
_TYPE_
(
"cards"
);
// not actually used, only for locale.pl script
}
void
mark_dependency_member
(
const
Card
&
value
,
const
String
&
name
,
const
Dependency
&
dep
);
...
...
src/data/keyword.hpp
View file @
27080254
...
...
@@ -114,6 +114,12 @@ class Keyword : public IntrusivePtrVirtualBase {
DECLARE_REFLECTION
();
};
inline
String
type_name
(
const
Keyword
&
)
{
return
_TYPE_
(
"keyword"
);
}
inline
String
type_name
(
const
vector
<
KeywordP
>&
)
{
return
_TYPE_
(
"keywords"
);
// not actually used, only for locale.pl script
}
// ----------------------------------------------------------------------------- : Using keywords
...
...
src/resource/common/expected_locale_keys
View file @
27080254
This diff is collapsed.
Click to expand it.
src/script/to_value.hpp
View file @
27080254
...
...
@@ -35,6 +35,9 @@ void mark_dependency_member(const T& value, const String& name, const Dependency
template
<
typename
T
>
inline
String
type_name
(
const
T
&
)
{
return
_TYPE_
(
"object"
);
}
template
<
typename
T
>
inline
String
type_name
(
const
intrusive_ptr
<
T
>&
p
)
{
return
type_name
(
*
p
.
get
());
}
template
<
typename
K
,
typename
V
>
inline
String
type_name
(
const
pair
<
K
,
V
>&
p
)
{
return
type_name
(
p
.
second
);
// for maps
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment