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
c67ba8bd
Commit
c67ba8bd
authored
Dec 04, 2009
by
coppro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename 'cannocial_name_form' to 'canonical_name_form'
parent
b0598130
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
265 additions
and
258 deletions
+265
-258
src/data/field.cpp
src/data/field.cpp
+1
-1
src/gui/value/choice.cpp
src/gui/value/choice.cpp
+3
-3
src/render/value/multiple_choice.cpp
src/render/value/multiple_choice.cpp
+1
-1
src/script/functions/export.cpp
src/script/functions/export.cpp
+253
-246
src/script/parser.cpp
src/script/parser.cpp
+1
-1
src/script/script.cpp
src/script/script.cpp
+1
-1
src/util/io/reader.cpp
src/util/io/reader.cpp
+1
-1
src/util/io/writer.cpp
src/util/io/writer.cpp
+1
-1
src/util/string.cpp
src/util/string.cpp
+1
-1
src/util/string.hpp
src/util/string.hpp
+2
-2
No files found.
src/data/field.cpp
View file @
c67ba8bd
...
...
@@ -50,7 +50,7 @@ IMPLEMENT_REFLECTION(Field) {
REFLECT
(
type
);
}
REFLECT
(
name
);
REFLECT_IF_READING
name
=
can
noci
al_name_form
(
name
);
REFLECT_IF_READING
name
=
can
onic
al_name_form
(
name
);
REFLECT
(
description
);
REFLECT_N
(
"icon"
,
icon_filename
);
REFLECT
(
editable
);
...
...
src/gui/value/choice.cpp
View file @
c67ba8bd
...
...
@@ -46,7 +46,7 @@ ChoiceThumbnailRequest::ChoiceThumbnailRequest(ValueViewer* viewer, int id, bool
Image
ChoiceThumbnailRequest
::
generate
()
{
ChoiceStyle
&
s
=
style
();
String
name
=
can
noci
al_name_form
(
s
.
field
().
choices
->
choiceName
(
id
));
String
name
=
can
onic
al_name_form
(
s
.
field
().
choices
->
choiceName
(
id
));
ScriptableImage
&
img
=
s
.
choice_images
[
name
];
return
img
.
isReady
()
?
img
.
generate
(
GeneratedImage
::
Options
(
16
,
16
,
&
viewer
().
getStylePackage
(),
&
viewer
().
getLocalPackage
(),
ASPECT_BORDER
,
true
))
...
...
@@ -181,7 +181,7 @@ void DropDownChoiceListBase::generateThumbnailImages() {
if
(
style
().
choice_images
.
empty
()
&&
style
().
image
.
isScripted
())
{
for
(
int
i
=
0
;
i
<
end
;
++
i
)
{
try
{
String
name
=
can
noci
al_name_form
(
field
().
choices
->
choiceName
(
i
));
String
name
=
can
onic
al_name_form
(
field
().
choices
->
choiceName
(
i
));
ctx
.
setVariable
(
_
(
"input"
),
to_script
(
name
));
GeneratedImageP
img
=
image_from_script
(
style
().
image
.
getValidScriptP
()
->
eval
(
ctx
));
style
().
choice_images
.
insert
(
make_pair
(
name
,
ScriptableImage
(
img
)));
...
...
@@ -197,7 +197,7 @@ void DropDownChoiceListBase::generateThumbnailImages() {
if
(
i
>=
image_count
||
status
!=
THUMB_OK
)
{
// update image
ChoiceStyle
&
s
=
style
();
String
name
=
can
noci
al_name_form
(
s
.
field
().
choices
->
choiceName
(
i
));
String
name
=
can
onic
al_name_form
(
s
.
field
().
choices
->
choiceName
(
i
));
ScriptableImage
&
img
=
s
.
choice_images
[
name
];
if
(
!
img
.
update
(
ctx
)
&&
status
==
THUMB_CHANGED
)
{
status
=
THUMB_OK
;
// no need to rebuild
...
...
src/render/value/multiple_choice.cpp
View file @
c67ba8bd
...
...
@@ -58,7 +58,7 @@ void MultipleChoiceValueViewer::drawChoice(RotatedDC& dc, RealPoint& pos, const
size
=
add_horizontal
(
size
,
RealSize
(
14
,
16
));
}
if
(
style
().
render_style
&
RENDER_IMAGE
)
{
map
<
String
,
ScriptableImage
>::
iterator
it
=
style
().
choice_images
.
find
(
can
noci
al_name_form
(
choice
));
map
<
String
,
ScriptableImage
>::
iterator
it
=
style
().
choice_images
.
find
(
can
onic
al_name_form
(
choice
));
if
(
it
!=
style
().
choice_images
.
end
()
&&
it
->
second
.
isReady
())
{
// TODO: caching
GeneratedImage
::
Options
options
(
0
,
0
,
&
getStylePackage
(),
&
getLocalPackage
());
...
...
src/script/functions/export.cpp
View file @
c67ba8bd
This diff is collapsed.
Click to expand it.
src/script/parser.cpp
View file @
c67ba8bd
...
...
@@ -210,7 +210,7 @@ void TokenIterator::readToken() {
// name, or a number after a . token, as in array.0
size_t
start
=
pos
-
1
;
while
(
pos
<
input
.
size
()
&&
isAlnum_
(
input
.
GetChar
(
pos
)))
++
pos
;
addToken
(
TOK_NAME
,
can
noci
al_name_form
(
input
.
substr
(
start
,
pos
-
start
)),
start
);
// convert name to cannocial form
addToken
(
TOK_NAME
,
can
onic
al_name_form
(
input
.
substr
(
start
,
pos
-
start
)),
start
);
// convert name to cannocial form
}
else
if
(
isDigit
(
c
))
{
// number
size_t
start
=
pos
-
1
;
...
...
src/script/script.cpp
View file @
c67ba8bd
...
...
@@ -27,7 +27,7 @@ Variable string_to_variable(const String& s) {
if
(
it
==
variables
.
end
())
{
#ifdef _DEBUG
variable_names
.
push_back
(
s
);
assert
(
s
==
can
noci
al_name_form
(
s
));
// only use cannocial names
assert
(
s
==
can
onic
al_name_form
(
s
));
// only use cannocial names
#endif
Variable
v
=
(
Variable
)
variables
.
size
();
variables
.
insert
(
make_pair
(
s
,
v
));
...
...
src/util/io/reader.cpp
View file @
c67ba8bd
...
...
@@ -257,7 +257,7 @@ void Reader::readLine(bool in_string) {
indent
+=
1
;
}
}
key
=
can
noci
al_name_form
(
trim
(
key
));
key
=
can
onic
al_name_form
(
trim
(
key
));
value
=
pos
==
String
::
npos
?
_
(
""
)
:
trim_left
(
line
.
substr
(
pos
+
1
));
if
(
key
.
empty
()
&&
pos
!=
String
::
npos
)
key
=
_
(
" "
);
// we don't want an empty key if there was a colon
}
...
...
src/util/io/writer.cpp
View file @
c67ba8bd
...
...
@@ -51,7 +51,7 @@ void Writer::writePending() {
}
indentation
+=
1
;
writeIndentation
();
writeUTF8
(
stream
,
can
noci
al_name_form
(
pending_opened
[
i
]));
writeUTF8
(
stream
,
can
onic
al_name_form
(
pending_opened
[
i
]));
}
pending_opened
.
clear
();
}
...
...
src/util/string.cpp
View file @
c67ba8bd
...
...
@@ -178,7 +178,7 @@ String capitalize_sentence(const String& s) {
return
ret
;
}
String
can
noci
al_name_form
(
const
String
&
str
)
{
String
can
onic
al_name_form
(
const
String
&
str
)
{
String
ret
;
ret
.
reserve
(
str
.
size
());
bool
leading
=
true
;
...
...
src/util/string.hpp
View file @
c67ba8bd
...
...
@@ -152,12 +152,12 @@ String capitalize(const String&);
/** for use in dialogs */
String
capitalize_sentence
(
const
String
&
);
/// Convert a field name to can
noci
al form
/// Convert a field name to can
onic
al form
/** - lower case and ' ' instead of '_'.
* - non alphanumeric characters are droped
* - "camalCase" is converted to words "camel case" (TODO)
*/
String
can
noci
al_name_form
(
const
String
&
);
String
can
onic
al_name_form
(
const
String
&
);
/// Returns the singular form of a string
/** Used for reflection, for example "vector<T> apples" is written with keys
...
...
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