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
f6a4b4c5
Commit
f6a4b4c5
authored
Jun 11, 2007
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The thread safety stuff is only needed for GTK
parent
ca1d3a64
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
25 deletions
+27
-25
src/gfx/generated_image.hpp
src/gfx/generated_image.hpp
+19
-15
src/gui/new_window.cpp
src/gui/new_window.cpp
+7
-7
src/gui/set/window.cpp
src/gui/set/window.cpp
+0
-2
src/script/image.hpp
src/script/image.hpp
+1
-1
No files found.
src/gfx/generated_image.hpp
View file @
f6a4b4c5
...
...
@@ -65,7 +65,7 @@ class LinearBlendImage : public GeneratedImage {
virtual
ImageCombine
combine
()
const
;
virtual
bool
operator
==
(
const
GeneratedImage
&
that
)
const
;
virtual
bool
threadSafe
()
const
{
return
true
;
}
virtual
bool
threadSafe
()
const
{
return
true
;
}
private:
GeneratedImageP
image1
,
image2
;
double
x1
,
y1
,
x2
,
y2
;
...
...
@@ -83,7 +83,7 @@ class MaskedBlendImage : public GeneratedImage {
virtual
ImageCombine
combine
()
const
;
virtual
bool
operator
==
(
const
GeneratedImage
&
that
)
const
;
virtual
bool
threadSafe
()
const
{
return
true
;
}
virtual
bool
threadSafe
()
const
{
return
true
;
}
private:
GeneratedImageP
light
,
dark
,
mask
;
};
...
...
@@ -100,7 +100,7 @@ class CombineBlendImage : public GeneratedImage {
virtual
ImageCombine
combine
()
const
;
virtual
bool
operator
==
(
const
GeneratedImage
&
that
)
const
;
virtual
bool
threadSafe
()
const
{
return
true
;
}
virtual
bool
threadSafe
()
const
{
return
true
;
}
private:
GeneratedImageP
image1
,
image2
;
ImageCombine
image_combine
;
...
...
@@ -118,7 +118,7 @@ class SetMaskImage : public GeneratedImage {
virtual
ImageCombine
combine
()
const
;
virtual
bool
operator
==
(
const
GeneratedImage
&
that
)
const
;
virtual
bool
threadSafe
()
const
{
return
true
;
}
virtual
bool
threadSafe
()
const
{
return
true
;
}
private:
GeneratedImageP
image
,
mask
;
};
...
...
@@ -152,7 +152,7 @@ class PackagedImage : public GeneratedImage {
virtual
Image
generate
(
const
Options
&
opt
)
const
;
virtual
bool
operator
==
(
const
GeneratedImage
&
that
)
const
;
virtual
bool
threadSafe
()
const
{
return
true
;
}
virtual
bool
threadSafe
()
const
{
return
true
;
}
private:
String
filename
;
};
...
...
@@ -168,7 +168,7 @@ class BuiltInImage : public GeneratedImage {
virtual
Image
generate
(
const
Options
&
opt
)
const
;
virtual
bool
operator
==
(
const
GeneratedImage
&
that
)
const
;
virtual
bool
threadSafe
()
const
{
return
true
;
}
virtual
bool
threadSafe
()
const
{
return
true
;
}
private:
String
name
;
};
...
...
@@ -183,7 +183,11 @@ class SymbolToImage : public GeneratedImage {
virtual
Image
generate
(
const
Options
&
opt
)
const
;
virtual
bool
operator
==
(
const
GeneratedImage
&
that
)
const
;
virtual
bool
threadSafe
()
const
{
return
false
;}
#ifdef __WXGTK__
virtual
bool
threadSafe
()
const
{
return
false
;
}
#else
virtual
bool
threadSafe
()
const
{
return
true
;
}
#endif
private:
SymbolToImage
(
const
SymbolToImage
&
);
// copy ctor
String
filename
;
...
...
src/gui/new_window.cpp
View file @
f6a4b4c5
...
...
@@ -96,9 +96,9 @@ void NewSetWindow::done() {
set
=
new_intrusive1
<
Set
>
(
stylesheet
);
set
->
validate
();
EndModal
(
wxID_OK
);
}
catch
(
Error
&
e
)
{
}
catch
(
const
Error
&
e
)
{
handle_error
(
e
);
throw
;
// We want to crash.
EndModal
(
wxID_CANCEL
);
}
}
...
...
src/gui/set/window.cpp
View file @
f6a4b4c5
...
...
@@ -173,8 +173,6 @@ SetWindow::~SetWindow() {
delete
find_dialog
;
// remove from list of set windows
set_windows
.
erase
(
remove
(
set_windows
.
begin
(),
set_windows
.
end
(),
this
));
// stop updating
onBeforeChangeSet
();
}
// ----------------------------------------------------------------------------- : Panel managment
...
...
src/script/image.hpp
View file @
f6a4b4c5
...
...
@@ -47,7 +47,7 @@ class ScriptableImage {
}
/// Can this be safely generated from another thread?
bool
threadSafe
()
const
{
return
value
!=
nullptr
?
value
->
threadSafe
()
:
false
;
}
inline
bool
threadSafe
()
const
{
return
!
value
||
value
->
threadSafe
()
;
}
private:
OptionalScript
script
;
///< The script, not really optional
...
...
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