Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
epoc-editor
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
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
GitLab upgrade completed. Current version is 17.11.3.
Show more breadcrumbs
learninglab
epoc
epoc-editor
Commits
c765c202
Commit
c765c202
authored
1 year ago
by
VIAUD Nathan
Browse files
Options
Downloads
Patches
Plain Diff
fix
parent
c4d0019e
No related branches found
No related tags found
1 merge request
!100
Resolve "Open from file not working if editor is not running"
Pipeline
#895329
passed
1 year ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
electron/electron.js
+3
-3
3 additions, 3 deletions
electron/electron.js
with
3 additions
and
3 deletions
electron/electron.js
+
3
−
3
View file @
c765c202
...
@@ -14,8 +14,7 @@ const headless = process.argv.includes('--headless=true');
...
@@ -14,8 +14,7 @@ const headless = process.argv.includes('--headless=true');
let
mainWindow
;
let
mainWindow
;
let
splashWindow
;
let
splashWindow
;
// Open file with editor, on windows : using argv | on macOS using open-file event (see below)
let
filepath
=
process
.
argv
[
1
]
?
path
.
normalize
(
process
.
argv
[
1
])
:
null
;
let
filepath
=
process
.
platform
===
'
win32
'
&&
process
.
argv
[
1
]
?
path
.
normalize
(
process
.
argv
[
1
])
:
null
;
app
.
on
(
'
will-finish-launching
'
,
()
=>
{
app
.
on
(
'
will-finish-launching
'
,
()
=>
{
app
.
on
(
'
open-file
'
,
async
(
event
,
path
)
=>
{
app
.
on
(
'
open-file
'
,
async
(
event
,
path
)
=>
{
...
@@ -47,12 +46,13 @@ app.whenReady().then(() => {
...
@@ -47,12 +46,13 @@ app.whenReady().then(() => {
mainWindow
.
show
();
mainWindow
.
show
();
}
}
setupWindow
(
mainWindow
);
if
(
filepath
)
{
if
(
filepath
)
{
mainWindow
.
webContents
.
send
(
'
epocProjectPicked
'
,
JSON
.
stringify
({
name
:
null
,
modified
:
null
,
filepath
:
filepath
,
workdir
:
null
}));
mainWindow
.
webContents
.
send
(
'
epocProjectPicked
'
,
JSON
.
stringify
({
name
:
null
,
modified
:
null
,
filepath
:
filepath
,
workdir
:
null
}));
}
}
});
});
setupWindow
(
mainWindow
);
app
.
on
(
'
activate
'
,
function
()
{
app
.
on
(
'
activate
'
,
function
()
{
// On macOS it's common to re-create a window in the app when the dock icon is clicked and there are no other windows open.
// On macOS it's common to re-create a window in the app when the dock icon is clicked and there are no other windows open.
...
...
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