Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
bfd6f40e
Commit
bfd6f40e
authored
11 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
tweak
parent
5050e149
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Common/CreateFile.cpp
+6
-4
6 additions, 4 deletions
Common/CreateFile.cpp
Common/CreateFile.h
+2
-1
2 additions, 1 deletion
Common/CreateFile.h
Fltk/fileDialogs.cpp
+1
-1
1 addition, 1 deletion
Fltk/fileDialogs.cpp
with
9 additions
and
6 deletions
Common/CreateFile.cpp
+
6
−
4
View file @
bfd6f40e
...
@@ -222,7 +222,8 @@ static void change_print_parameter(int frame)
...
@@ -222,7 +222,8 @@ static void change_print_parameter(int frame)
ParseString
(
CTX
::
instance
()
->
print
.
parameterCommand
);
ParseString
(
CTX
::
instance
()
->
print
.
parameterCommand
);
}
}
void
CreateOutputFile
(
const
std
::
string
&
fileName
,
int
format
,
bool
status
)
void
CreateOutputFile
(
const
std
::
string
&
fileName
,
int
format
,
bool
status
,
bool
redraw
)
{
{
std
::
string
name
=
fileName
;
std
::
string
name
=
fileName
;
if
(
name
.
empty
())
name
=
GetDefaultFileName
(
format
);
if
(
name
.
empty
())
name
=
GetDefaultFileName
(
format
);
...
@@ -238,7 +239,7 @@ void CreateOutputFile(const std::string &fileName, int format, bool status)
...
@@ -238,7 +239,7 @@ void CreateOutputFile(const std::string &fileName, int format, bool status)
switch
(
format
)
{
switch
(
format
)
{
case
FORMAT_AUTO
:
case
FORMAT_AUTO
:
CreateOutputFile
(
name
,
GuessFileFormatFromFileName
(
name
),
false
);
CreateOutputFile
(
name
,
GuessFileFormatFromFileName
(
name
),
false
,
false
);
break
;
break
;
case
FORMAT_OPT
:
case
FORMAT_OPT
:
...
@@ -566,7 +567,8 @@ void CreateOutputFile(const std::string &fileName, int format, bool status)
...
@@ -566,7 +567,8 @@ void CreateOutputFile(const std::string &fileName, int format, bool status)
if
(
cycle
==
2
)
if
(
cycle
==
2
)
change_print_parameter
(
i
);
change_print_parameter
(
i
);
if
(
fp
)
if
(
fp
)
CreateOutputFile
(
CTX
::
instance
()
->
homeDir
+
frames
[
i
],
FORMAT_PPM
,
false
);
CreateOutputFile
(
CTX
::
instance
()
->
homeDir
+
frames
[
i
],
FORMAT_PPM
,
false
,
false
);
else
{
else
{
drawContext
::
global
()
->
draw
();
drawContext
::
global
()
->
draw
();
SleepInSeconds
(
CTX
::
instance
()
->
post
.
animDelay
);
SleepInSeconds
(
CTX
::
instance
()
->
post
.
animDelay
);
...
@@ -629,6 +631,6 @@ void CreateOutputFile(const std::string &fileName, int format, bool status)
...
@@ -629,6 +631,6 @@ void CreateOutputFile(const std::string &fileName, int format, bool status)
Msg
::
StatusBar
(
true
,
"Done writing '%s'"
,
name
.
c_str
());
Msg
::
StatusBar
(
true
,
"Done writing '%s'"
,
name
.
c_str
());
#if defined(HAVE_OPENGL)
#if defined(HAVE_OPENGL)
drawContext
::
global
()
->
draw
();
if
(
redraw
)
drawContext
::
global
()
->
draw
();
#endif
#endif
}
}
This diff is collapsed.
Click to expand it.
Common/CreateFile.h
+
2
−
1
View file @
bfd6f40e
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
int
GetFileFormatFromExtension
(
const
std
::
string
&
fileName
);
int
GetFileFormatFromExtension
(
const
std
::
string
&
fileName
);
int
GuessFileFormatFromFileName
(
const
std
::
string
&
fileName
);
int
GuessFileFormatFromFileName
(
const
std
::
string
&
fileName
);
std
::
string
GetDefaultFileName
(
int
format
);
std
::
string
GetDefaultFileName
(
int
format
);
void
CreateOutputFile
(
const
std
::
string
&
fileName
,
int
format
,
bool
status
=
true
);
void
CreateOutputFile
(
const
std
::
string
&
fileName
,
int
format
,
bool
status
=
true
,
bool
redraw
=
true
);
#endif
#endif
This diff is collapsed.
Click to expand it.
Fltk/fileDialogs.cpp
+
1
−
1
View file @
bfd6f40e
...
@@ -500,7 +500,7 @@ int mpegFileDialog(const char *name)
...
@@ -500,7 +500,7 @@ int mpegFileDialog(const char *name)
opt_print_delete_tmp_files
(
0
,
GMSH_SET
|
GMSH_GUI
,
(
int
)
dialog
->
c
[
2
]
->
value
());
opt_print_delete_tmp_files
(
0
,
GMSH_SET
|
GMSH_GUI
,
(
int
)
dialog
->
c
[
2
]
->
value
());
int
format
=
(
o
==
dialog
->
preview
)
?
FORMAT_MPEG_PREVIEW
:
FORMAT_MPEG
;
int
format
=
(
o
==
dialog
->
preview
)
?
FORMAT_MPEG_PREVIEW
:
FORMAT_MPEG
;
dialog
->
buttons
->
deactivate
();
dialog
->
buttons
->
deactivate
();
CreateOutputFile
(
name
,
format
,
o
==
dialog
->
ok
);
CreateOutputFile
(
name
,
format
,
o
==
dialog
->
ok
,
true
);
dialog
->
buttons
->
activate
();
dialog
->
buttons
->
activate
();
if
(
o
==
dialog
->
ok
){
if
(
o
==
dialog
->
ok
){
dialog
->
window
->
hide
();
dialog
->
window
->
hide
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment