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
9323c7a7
Commit
9323c7a7
authored
13 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
better interaction with Mac Finder
parent
90edd656
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Common/Gmsh.cpp
+9
-7
9 additions, 7 deletions
Common/Gmsh.cpp
Common/OpenFile.cpp
+2
-8
2 additions, 8 deletions
Common/OpenFile.cpp
Fltk/FlGui.cpp
+1
-1
1 addition, 1 deletion
Fltk/FlGui.cpp
Fltk/FlGui.h
+4
-0
4 additions, 0 deletions
Fltk/FlGui.h
with
16 additions
and
16 deletions
Common/Gmsh.cpp
+
9
−
7
View file @
9323c7a7
...
...
@@ -210,6 +210,7 @@ int GmshFLTK(int argc, char **argv)
FlGui
::
instance
()
->
check
();
// open project file and merge all other input files
if
(
!
FlGui
::
instance
()
->
getOpenedThroughMacFinder
()){
OpenProject
(
GModel
::
current
()
->
getFileName
());
for
(
unsigned
int
i
=
1
;
i
<
CTX
::
instance
()
->
files
.
size
();
i
++
){
if
(
CTX
::
instance
()
->
files
[
i
]
==
"-new"
){
...
...
@@ -219,6 +220,7 @@ int GmshFLTK(int argc, char **argv)
else
MergeFile
(
CTX
::
instance
()
->
files
[
i
]);
}
}
if
(
CTX
::
instance
()
->
post
.
combineTime
){
PView
::
combine
(
true
,
2
,
CTX
::
instance
()
->
post
.
combineRemoveOrig
);
...
...
This diff is collapsed.
Click to expand it.
Common/OpenFile.cpp
+
2
−
8
View file @
9323c7a7
...
...
@@ -504,14 +504,8 @@ void OpenProject(std::string fileName)
void
OpenProjectMacFinder
(
const
char
*
fileName
)
{
#if defined(HAVE_FLTK)
static
int
first
=
1
;
if
(
first
||
!
FlGui
::
available
()){
// just copy the filename: it will be opened when the GUI is ready
// in main()
GModel
::
current
()
->
setFileName
(
fileName
);
first
=
0
;
}
else
{
if
(
FlGui
::
available
()){
FlGui
::
instance
()
->
setOpenedThroughMacFinder
(
true
);
OpenProject
(
fileName
);
drawContext
::
global
()
->
draw
();
}
...
...
This diff is collapsed.
Click to expand it.
Fltk/FlGui.cpp
+
1
−
1
View file @
9323c7a7
...
...
@@ -174,7 +174,7 @@ static int globalShortcut(int event)
return
FlGui
::
instance
()
->
testGlobalShortcuts
(
event
);
}
FlGui
::
FlGui
(
int
argc
,
char
**
argv
)
FlGui
::
FlGui
(
int
argc
,
char
**
argv
)
:
_openedThroughMacFinder
(
false
)
{
// set X display
if
(
CTX
::
instance
()
->
display
.
size
())
...
...
This diff is collapsed.
Click to expand it.
Fltk/FlGui.h
+
4
−
0
View file @
9323c7a7
...
...
@@ -43,6 +43,7 @@ class MElement;
class
FlGui
{
private:
static
FlGui
*
_instance
;
bool
_openedThroughMacFinder
;
public:
std
::
vector
<
GVertex
*>
selectedVertices
;
std
::
vector
<
GEdge
*>
selectedEdges
;
...
...
@@ -80,6 +81,9 @@ class FlGui{
static
void
wait
(){
Fl
::
wait
();
}
// wait (at most time seconds) for any events, then process them
static
void
wait
(
double
time
){
Fl
::
wait
(
time
);
}
// is a file opened through the Mac Finder?
void
setOpenedThroughMacFinder
(
bool
val
){
_openedThroughMacFinder
=
val
;
}
bool
getOpenedThroughMacFinder
(){
return
_openedThroughMacFinder
;
}
// test application-level keyboard shortcuts
int
testGlobalShortcuts
(
int
event
);
// test the arrow shortcuts (not in the application-level shortcuts)
...
...
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