Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vecs
FIJI Public
Commits
6af09956
Commit
6af09956
authored
Jul 13, 2016
by
Stefan Tauner
Browse files
Make use of the accelerator feature of DialogBoxUL
parent
c5c4d9b2
Changes
6
Hide whitespace changes
Inline
Side-by-side
bin/Tk/FIJIModalDialog.pm
View file @
6af09956
...
...
@@ -2,11 +2,11 @@ package Tk::FIJIModalDialog;
use
Log::
Log4perl
qw(get_logger)
;
use
Tk
;
use
Tk::
widgets
qw(LabFrame Label Entry Button DialogBox)
;
use
Tk::
widgets
qw(LabFrame Label Entry Button DialogBox
UL
)
;
use
Tk::
PNG
;
use
File::
Spec
;
use
base
qw(Tk::DialogBox)
;
use
base
qw(Tk::DialogBox
UL
)
;
Construct
Tk::
Widget
'
FIJIModalDialog
';
sub
ClassInit
{
...
...
@@ -34,8 +34,10 @@ sub Populate {
my
$esc_button
;
if
(
@buttons
==
1
)
{
$esc_button
=
@buttons
[
0
];
$esc_button
=~
tr/~//d
;
# filter ~
}
else
{
foreach
my
$b
(
@buttons
)
{
$b
=~
tr/~//d
;
# filter ~
if
(
$b
eq
"
Cancel
")
{
$esc_button
=
$b
;
last
;
...
...
bin/Tk/FIJISettingsViewer.pm
View file @
6af09956
...
...
@@ -147,7 +147,7 @@ sub netlist {
-
text
=>
$msg
.
"
\n
"
.
"
Proceed with new netlist nevertheless?
",
-
wraplength
=>
200
,
-
title
=>
'
Warning
',
-
buttons
=>
[
qw/Yes No/
]);
-
buttons
=>
[
qw/
~
Yes
~
No/
]);
my
$rv
=
$d
->
Show
();
if
(
!
defined
$rv
||
$rv
eq
"
No
")
{
...
...
@@ -192,7 +192,7 @@ sub settings {
-
text
=>
$msg
.
"
\n
"
.
"
Proceed with new netlist nevertheless?
",
-
wraplength
=>
200
,
-
title
=>
'
Warning
',
-
buttons
=>
[
qw/Yes No/
]);
-
buttons
=>
[
qw/
~
Yes
~
No/
]);
my
$rv
=
$d
->
Show
();
if
(
!
defined
$rv
||
$rv
eq
"
No
")
{
...
...
@@ -1367,7 +1367,11 @@ sub _select_net_dialog {
$title
=
"
Select Net
"
if
(
!
defined
$title
);
my
$d
=
$self
->
MainWindow
->
DialogBox
(
-
title
=>
$title
,
-
buttons
=>
[
qw/OK Cancel/
],
-
default_button
=>
'
OK
');
my
$d
=
$self
->
MainWindow
->
DialogBox
(
-
title
=>
$title
,
-
buttons
=>
[
qw/~OK ~Cancel/
],
-
default_button
=>
'
OK
'
);
$d
->
bind
('
<Return>
',
=>
sub
{});
my
$sel
=
$d
->
FIJINetSelection
(
-
nets
=>
$self
->
{'
nets
'},
-
netname_ref
=>
$netname_ref
);
...
...
@@ -1425,7 +1429,7 @@ sub _select_driver_dialog($) {
}
# Build the DialogBox
my
$d
=
$self
->
DialogBox
(
-
title
=>
"
Driver for FIU
$fiu_idx
",
-
buttons
=>
["
OK
",
"
Cancel
"]);
my
$d
=
$self
->
DialogBox
(
-
title
=>
"
Driver for FIU
$fiu_idx
",
-
buttons
=>
["
~
OK
",
"
~
Cancel
"]);
my
$f
=
$d
->
add
('
Frame
');
Tk::FIJIUtils::
set_icon
(
$d
);
...
...
bin/Tk/FIJITestsViewer.pm
View file @
6af09956
...
...
@@ -888,7 +888,7 @@ sub edit_test {
my
$test
=
@
{
$self
->
{'
tests
'}
->
{'
tests
'}}[
$i
];
my
$db
=
$self
->
{'
mw
'}
->
FIJIModalDialog
(
-
title
=>
"
Edit Test
$i
",
-
buttons
=>
[
qw(OK Cancel)
],
-
buttons
=>
[
qw(
~
OK
~
Cancel)
],
);
$db
->
geometry
("
576x300
");
my
$tf
=
$db
->
FIJITestFrame
(
-
test
=>
$test
,
-
settings
=>
$self
->
{'
settings
'},
-
scrolled
=>
1
)
->
pack
(
-
expand
=>
1
,
-
fill
=>
"
both
");
...
...
bin/Tk/FIJIUtils.pm
View file @
6af09956
...
...
@@ -136,7 +136,7 @@ sub show_about {
my
$logo_image
=
logo_image
(
$parent
);
my
$d
=
$parent
->
FIJIModalDialog
(
-
title
=>
"
About
",
-
buttons
=>
["
Close
"],
-
buttons
=>
["
~
Close
"],
-
image
=>
$logo_image
,
-
markuptext
=>
$about_text
,
);
...
...
bin/fiji_ee_gui.pl
View file @
6af09956
...
...
@@ -694,7 +694,7 @@ sub _overwrite_existing_file ($) {
my
$d
=
$self
->
{'
mw
'}
->
FIJIModalDialog
(
-
title
=>
'
Really overwrite?
',
-
image
=>
Tk::FIJIUtils::
alert_image
(
$self
->
{'
mw
'}),
-
text
=>
"
File
\"
$filename
\"
already exists.
\n
Do you want to overwrite it?
",
-
buttons
=>
["
Yes
",
"
No
"]);
-
buttons
=>
["
~
Yes
",
"
~
No
"]);
my
$reply
=
$d
->
Show
();
return
(
defined
$reply
&&
lc
(
$reply
)
eq
'
yes
');
}
...
...
@@ -769,7 +769,7 @@ sub _onexit {
-
text
=>
"
Unsaved changes.
\n
Do you really want to quit?
",
-
wraplength
=>
350
,
-
title
=>
'
Really quit?
',
-
buttons
=>
["
Save
",
"
Cancel
",
"
Quit
"]);
-
buttons
=>
["
~
Save
",
"
~
Cancel
",
"
~
Quit
"]);
$response
=
$d
->
Show
();
$self
->
{'
already_clicked
'}
=
0
;
...
...
bin/fiji_setup.pl
View file @
6af09956
...
...
@@ -572,7 +572,7 @@ sub _overwrite_existing_file ($) {
my
$d
=
$self
->
{'
mw
'}
->
FIJIModalDialog
(
-
image
=>
Tk::FIJIUtils::
alert_image
(
$self
->
{'
mw
'}),
-
text
=>
"
File
\"
$filename
\"
already exists.
\n
Do you want to overwrite it?
",
-
title
=>
'
Really overwrite?
',
-
buttons
=>
["
Yes
",
"
No
"]);
-
buttons
=>
["
~
Yes
",
"
~
No
"]);
my
$reply
=
$d
->
Show
();
return
(
defined
$reply
&&
lc
(
$reply
)
eq
'
yes
');
...
...
@@ -612,7 +612,7 @@ sub _save_file {
-
text
=>
$rv
.
"
Save Settings nevertheless?
",
-
wraplength
=>
350
,
-
title
=>
'
Validation failed
',
-
buttons
=>
[
qw/Yes No/
]);
-
buttons
=>
[
qw/
~
Yes
~
No/
]);
my
$save
=
$d
->
Show
();
if
(
!
defined
$save
||
$save
eq
"
No
")
{
...
...
@@ -687,7 +687,7 @@ sub _onexit {
-
text
=>
"
Unsaved changes.
\n
Do you really want to quit?
",
-
wraplength
=>
350
,
-
title
=>
'
Really quit?
',
-
buttons
=>
["
Save
",
"
Cancel
",
"
Quit
"]);
-
buttons
=>
["
~
Save
",
"
~
Cancel
",
"
~
Quit
"]);
$response
=
$d
->
Show
();
$self
->
{'
already_clicked
'}
=
0
;
...
...
Write
Preview
Supports
Markdown
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