Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Show more breadcrumbs
pub
frama-c
Commits
e2b03d89
Commit
e2b03d89
authored
3 years ago
by
David Bühler
Browse files
Options
Downloads
Patches
Plain Diff
[dome] Dialogs: uses title instead of message (only supported by macos).
parent
83e22db4
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ivette/src/dome/renderer/dialogs.tsx
+9
-9
9 additions, 9 deletions
ivette/src/dome/renderer/dialogs.tsx
ivette/src/frama-c/menu.ts
+1
-1
1 addition, 1 deletion
ivette/src/frama-c/menu.ts
with
10 additions
and
10 deletions
ivette/src/dome/renderer/dialogs.tsx
+
9
−
9
View file @
e2b03d89
...
@@ -157,7 +157,7 @@ export interface FileFilter {
...
@@ -157,7 +157,7 @@ export interface FileFilter {
export
interface
FileDialogProps
{
export
interface
FileDialogProps
{
/** Prompt message. */
/** Prompt message. */
messag
e
?:
string
;
titl
e
?:
string
;
/** Open button label (default is « Open »). */
/** Open button label (default is « Open »). */
label
?:
string
;
label
?:
string
;
/** Initially selected path. */
/** Initially selected path. */
...
@@ -196,11 +196,11 @@ export interface OpenDirProps extends FileDialogProps {
...
@@ -196,11 +196,11 @@ export interface OpenDirProps extends FileDialogProps {
export
async
function
showOpenFile
(
export
async
function
showOpenFile
(
props
:
OpenFileProps
,
props
:
OpenFileProps
,
):
Promise
<
string
|
undefined
>
{
):
Promise
<
string
|
undefined
>
{
const
{
messag
e
,
label
,
path
,
hidden
=
false
,
filters
}
=
props
;
const
{
titl
e
,
label
,
path
,
hidden
=
false
,
filters
}
=
props
;
return
remote
.
dialog
.
showOpenDialog
(
return
remote
.
dialog
.
showOpenDialog
(
remote
.
getCurrentWindow
(),
remote
.
getCurrentWindow
(),
{
{
messag
e
,
titl
e
,
buttonLabel
:
label
,
buttonLabel
:
label
,
defaultPath
:
path
&&
defaultPath
(
path
),
defaultPath
:
path
&&
defaultPath
(
path
),
properties
:
(
hidden
?
[
'
openFile
'
,
'
showHiddenFiles
'
]
:
[
'
openFile
'
]),
properties
:
(
hidden
?
[
'
openFile
'
,
'
showHiddenFiles
'
]
:
[
'
openFile
'
]),
...
@@ -219,12 +219,12 @@ export async function showOpenFile(
...
@@ -219,12 +219,12 @@ export async function showOpenFile(
export
async
function
showOpenFiles
(
export
async
function
showOpenFiles
(
props
:
OpenFileProps
,
props
:
OpenFileProps
,
):
Promise
<
string
[]
|
undefined
>
{
):
Promise
<
string
[]
|
undefined
>
{
const
{
messag
e
,
label
,
path
,
hidden
,
filters
}
=
props
;
const
{
titl
e
,
label
,
path
,
hidden
,
filters
}
=
props
;
return
remote
.
dialog
.
showOpenDialog
(
return
remote
.
dialog
.
showOpenDialog
(
remote
.
getCurrentWindow
(),
remote
.
getCurrentWindow
(),
{
{
messag
e
,
titl
e
,
buttonLabel
:
label
,
buttonLabel
:
label
,
defaultPath
:
path
&&
defaultPath
(
path
),
defaultPath
:
path
&&
defaultPath
(
path
),
properties
:
(
properties
:
(
...
@@ -257,11 +257,11 @@ export async function showOpenFiles(
...
@@ -257,11 +257,11 @@ export async function showOpenFiles(
export
async
function
showSaveFile
(
export
async
function
showSaveFile
(
props
:
SaveFileProps
,
props
:
SaveFileProps
,
):
Promise
<
string
|
undefined
>
{
):
Promise
<
string
|
undefined
>
{
const
{
messag
e
,
label
,
path
,
filters
}
=
props
;
const
{
titl
e
,
label
,
path
,
filters
}
=
props
;
return
remote
.
dialog
.
showSaveDialog
(
return
remote
.
dialog
.
showSaveDialog
(
remote
.
getCurrentWindow
(),
remote
.
getCurrentWindow
(),
{
{
messag
e
,
titl
e
,
buttonLabel
:
label
,
buttonLabel
:
label
,
defaultPath
:
path
,
defaultPath
:
path
,
filters
,
filters
,
...
@@ -282,7 +282,7 @@ type openDirProperty =
...
@@ -282,7 +282,7 @@ type openDirProperty =
export
async
function
showOpenDir
(
export
async
function
showOpenDir
(
props
:
OpenDirProps
,
props
:
OpenDirProps
,
):
Promise
<
string
|
undefined
>
{
):
Promise
<
string
|
undefined
>
{
const
{
messag
e
,
label
,
path
,
hidden
}
=
props
;
const
{
titl
e
,
label
,
path
,
hidden
}
=
props
;
const
properties
:
openDirProperty
[]
=
[
'
openDirectory
'
];
const
properties
:
openDirProperty
[]
=
[
'
openDirectory
'
];
if
(
hidden
)
properties
.
push
(
'
showHiddenFiles
'
);
if
(
hidden
)
properties
.
push
(
'
showHiddenFiles
'
);
...
@@ -295,7 +295,7 @@ export async function showOpenDir(
...
@@ -295,7 +295,7 @@ export async function showOpenDir(
return
remote
.
dialog
.
showOpenDialog
(
return
remote
.
dialog
.
showOpenDialog
(
remote
.
getCurrentWindow
(),
remote
.
getCurrentWindow
(),
{
{
messag
e
,
titl
e
,
buttonLabel
:
label
,
buttonLabel
:
label
,
defaultPath
:
path
,
defaultPath
:
path
,
properties
,
properties
,
...
...
This diff is collapsed.
Click to expand it.
ivette/src/frama-c/menu.ts
+
1
−
1
View file @
e2b03d89
...
@@ -30,7 +30,7 @@ import * as Server from 'frama-c/server';
...
@@ -30,7 +30,7 @@ import * as Server from 'frama-c/server';
import
*
as
Ast
from
'
frama-c/api/kernel/ast
'
;
import
*
as
Ast
from
'
frama-c/api/kernel/ast
'
;
async
function
setFiles
():
Promise
<
void
>
{
async
function
setFiles
():
Promise
<
void
>
{
const
files
=
await
Dialogs
.
showOpenFiles
({
messag
e
:
'
Open files
'
});
const
files
=
await
Dialogs
.
showOpenFiles
({
titl
e
:
'
Open files
'
});
await
Server
.
send
(
Ast
.
setFiles
,
files
);
await
Server
.
send
(
Ast
.
setFiles
,
files
);
await
Server
.
send
(
Ast
.
compute
,
{
});
await
Server
.
send
(
Ast
.
compute
,
{
});
return
;
return
;
...
...
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