@@ -5,7 +5,7 @@ const path = require('path');
55const handlers = { } ;
66
77handlers . layoutOpen = ( callback ) => {
8- const filenames = dialog . showOpenDialog ( {
8+ const filenames = dialog . showOpenDialogSync ( {
99 filters : [
1010 { name : 'Thinreports Layout File' , extensions : [ 'tlf' ] }
1111 ] ,
@@ -32,7 +32,7 @@ handlers.layoutSave = (callback, data, attrs) => {
3232}
3333
3434handlers . layoutSaveAs = ( callback , data ) => {
35- const filename = dialog . showSaveDialog ( {
35+ const filename = dialog . showSaveDialogSync ( {
3636 filters : [
3737 { name : 'Thinreports Layout File' , extensions : [ 'tlf' ] }
3838 ]
@@ -53,7 +53,7 @@ handlers.layoutSaveAs = (callback, data) => {
5353}
5454
5555handlers . imageOpen = ( callback ) => {
56- const imagefiles = dialog . showOpenDialog ( {
56+ const imagefiles = dialog . showOpenDialogSync ( {
5757 filters : [
5858 { name : 'Images' , extensions : [ 'jpg' , 'png' ] }
5959 ]
@@ -83,7 +83,7 @@ handlers.exportAs = (callback, type, content) => {
8383 break ;
8484 }
8585
86- const filename = dialog . showSaveDialog ( {
86+ const filename = dialog . showSaveDialogSync ( {
8787 filters : [
8888 { extensions : [ extName ] , name : description }
8989 ]
@@ -99,4 +99,4 @@ handlers.exportAs = (callback, type, content) => {
9999 callback . onSuccess ( ) ;
100100}
101101
102- module . exports = handlers ;
102+ window . handlers = handlers ;
0 commit comments