Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ardublockly
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
ardublockly
Commits
60d62ade
Commit
60d62ade
authored
Jul 07, 2015
by
carlosperate
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update electron version which allows to save the xml files.
Updated the main code to better control the splash screen.
parent
563503c2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
21 deletions
+29
-21
package/electron/app/appmenu.js
package/electron/app/appmenu.js
+2
-1
package/electron/app/main.js
package/electron/app/main.js
+26
-19
package/electron/package.json
package/electron/package.json
+1
-1
No files found.
package/electron/app/appmenu.js
View file @
60d62ade
...
...
@@ -191,7 +191,8 @@ var getEditMenuData = function() {
click
:
function
()
{
BrowserWindow
.
getFocusedWindow
()
.
webContents
.
executeJavaScript
(
"
ArduinoMaterial.discard()
"
);
.
executeJavaScript
(
"
ArduinoMaterial.discardAllBlocks()
"
);
}
}
]
...
...
package/electron/app/main.js
View file @
60d62ade
...
...
@@ -19,8 +19,9 @@ var env = require('./vendor/electron_boilerplate/env_config');
var
windowStateKeeper
=
require
(
'
./vendor/electron_boilerplate/window_state
'
);
// Global reference of the window object must be maintain, or the window will
// be closed automatically when the
javas
cript object is garbage collected.
// be closed automatically when the
JavaS
cript object is garbage collected.
var
mainWindow
=
null
;
var
splashWindow
=
null
;
// Preserver of the window size and position between app launches.
var
mainWindowState
=
windowStateKeeper
(
'
main
'
,
{
...
...
@@ -29,7 +30,7 @@ var mainWindowState = windowStateKeeper('main', {
});
app
.
on
(
'
ready
'
,
function
()
{
var
splashWindow
=
createSplashWindow
();
createSplashWindow
();
server
.
startServer
();
...
...
@@ -49,6 +50,9 @@ app.on('ready', function () {
'
text-areas-are-resizable
'
:
false
,
'
webgl
'
:
false
,
'
webaudio
'
:
true
,
'
subpixel-font-scaling
'
:
true
,
'
direct-write
'
:
true
,
//'overlay-scrollbars': true,
'
plugins
'
:
false
}
});
...
...
@@ -75,7 +79,10 @@ app.on('ready', function () {
mainWindow
.
webContents
.
on
(
'
did-finish-load
'
,
function
()
{
mainWindow
.
show
();
splashWindow
.
close
();
if
(
splashWindow
!==
null
)
{
splashWindow
.
close
();
splashWindow
=
null
;
}
});
mainWindow
.
loadUrl
(
'
http://localhost:8000/ardublockly
'
);
...
...
@@ -94,20 +101,20 @@ app.on('window-all-closed', function () {
});
function
createSplashWindow
()
{
var
imagePath
=
'
file://
'
+
server
.
getProjectJetpack
().
path
(
'
ardublockly
'
,
'
img
'
,
'
ardublockly_splash.png
'
);
var
splashWindow
=
new
BrowserWindow
({
width
:
450
,
height
:
30
0
,
frame
:
false
,
show
:
tru
e
,
transparent
:
true
,
images
:
true
,
center
:
true
,
'
use-content-size
'
:
true
});
splashWindow
.
loadUrl
(
imagePath
);
return
splashWindow
;
if
(
splashWindow
===
null
)
{
var
imagePath
=
'
file://
'
+
server
.
getProjectJetpack
().
path
(
'
ardublockly
'
,
'
img
'
,
'
ardublockly_splash.png
'
);
splashWindow
=
new
BrowserWindow
({
width
:
45
0
,
height
:
300
,
frame
:
fals
e
,
show
:
true
,
transparent
:
true
,
images
:
true
,
center
:
true
,
'
use-content-size
'
:
true
}
);
splashWindow
.
loadUrl
(
imagePath
);
}
}
package/electron/package.json
View file @
60d62ade
{
"devDependencies"
:
{
"asar"
:
"^0.7.2"
,
"electron-prebuilt"
:
"^0.2
8.3
"
,
"electron-prebuilt"
:
"^0.2
9.2
"
,
"esperanto"
:
"^0.7.2"
,
"fs-jetpack"
:
"^0.6.5"
,
"gulp"
:
"^3.9.0"
,
...
...
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