Commit 5a577fc7 authored by Stefan Tauner's avatar Stefan Tauner
Browse files

Get rid of useless, single OK buttons

They are generated by DialogBoxUL automatically.
parent 6af09956
...@@ -267,8 +267,7 @@ sub update { ...@@ -267,8 +267,7 @@ sub update {
my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}), my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}),
-text => 'Something went horribly wrong!', -text => 'Something went horribly wrong!',
-wraplength => 200, -wraplength => 200,
-title => 'Warning', -title => 'Warning',);
-buttons => ["OK"]);
$d->Show(); $d->Show();
return; return;
...@@ -568,8 +567,7 @@ sub _populate_widget { ...@@ -568,8 +567,7 @@ sub _populate_widget {
my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::alert_image($self->{'mw'}), my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::alert_image($self->{'mw'}),
-wraplength => $self->screenwidth, -wraplength => $self->screenwidth,
-text => "$rv", -text => "$rv",
-title => "Warning", -title => "Warning",);
-buttons => ["OK"]);
$d->Show(); $d->Show();
} elsif (defined $netname) { } elsif (defined $netname) {
$self->{'settings'}->{'design'}->{$k} = $netname; $self->{'settings'}->{'design'}->{$k} = $netname;
...@@ -927,8 +925,7 @@ sub _add_fiu ($$) { ...@@ -927,8 +925,7 @@ sub _add_fiu ($$) {
my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::alert_image($self->{'mw'}), my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::alert_image($self->{'mw'}),
-wraplength => $fr_fiu->screenwidth, -wraplength => $fr_fiu->screenwidth,
-text => "$rv", -text => "$rv",
-title => "Warning", -title => "Warning",);
-buttons => ["OK"]);
$d->Show(); $d->Show();
} elsif (defined $netname && $netname ne "") { } elsif (defined $netname && $netname ne "") {
@{$self->{'settings'}->{'fius'}}[$i]->{'FIU_NET_NAME'} = $netname; @{$self->{'settings'}->{'fius'}}[$i]->{'FIU_NET_NAME'} = $netname;
...@@ -949,8 +946,7 @@ sub _add_fiu ($$) { ...@@ -949,8 +946,7 @@ sub _add_fiu ($$) {
my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::alert_image($self->{'mw'}), my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::alert_image($self->{'mw'}),
-wraplength => $fr_fiu->screenwidth, -wraplength => $fr_fiu->screenwidth,
-text => "$msg", -text => "$msg",
-title => "Warning", -title => "Warning",);
-buttons => ["OK"]);
$d->Show(); $d->Show();
} }
...@@ -969,8 +965,7 @@ sub _add_fiu ($$) { ...@@ -969,8 +965,7 @@ sub _add_fiu ($$) {
my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::alert_image($self->{'mw'}), my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::alert_image($self->{'mw'}),
-wraplength => $fr_fiu->screenwidth, -wraplength => $fr_fiu->screenwidth,
-text => "$rv", -text => "$rv",
-title => "Warning", -title => "Warning",);
-buttons => ["OK"]);
$d->Show(); $d->Show();
} else { } else {
$self->_highlight_widget($drv_entry, 0); $self->_highlight_widget($drv_entry, 0);
...@@ -1145,8 +1140,7 @@ sub _set_fields_by_button { ...@@ -1145,8 +1140,7 @@ sub _set_fields_by_button {
my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}), my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}),
-wraplength => 200, -wraplength => 200,
-text => "\"" . $f->{'description'} . "\"\nforbids\n\"" . $button->{'description'} . "\".", -text => "\"" . $f->{'description'} . "\"\nforbids\n\"" . $button->{'description'} . "\".",
-title => "Error", -title => "Error",);
-buttons => ["OK"]);
$d->Show(); $d->Show();
} }
} }
......
...@@ -306,8 +306,7 @@ sub _download { ...@@ -306,8 +306,7 @@ sub _download {
my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}), my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}),
-text => $text, -text => $text,
-title => "Error while downloading.", -title => "Error while downloading.",);
-buttons => [qw/OK/]);
$d->Show(); $d->Show();
} }
...@@ -341,8 +340,7 @@ sub get_last_test { ...@@ -341,8 +340,7 @@ sub get_last_test {
my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}), my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}),
-wraplength => "200", -wraplength => "200",
-text => $msg, -text => $msg,
-title => 'Export failed!', -title => 'Export failed!',);
-buttons => ["OK"]);
$d->Show(); $d->Show();
} else { } else {
$lt = $self->{'last_test'}; $lt = $self->{'last_test'};
...@@ -1047,8 +1045,7 @@ sub _set_fields_by_button { ...@@ -1047,8 +1045,7 @@ sub _set_fields_by_button {
${$button->cget('-variable')} = 0; ${$button->cget('-variable')} = 0;
my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}), my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}),
-text => "\"" . $f->{'description'} . "\"\nforbids\n\"" . $button->{'description'} . "\".", -text => "\"" . $f->{'description'} . "\"\nforbids\n\"" . $button->{'description'} . "\".",
-title => "Error.", -title => "Error.",);
-buttons => [qw/OK/]);
$d->Show(); $d->Show();
} }
} }
......
...@@ -106,8 +106,7 @@ sub cross_platform_open { ...@@ -106,8 +106,7 @@ sub cross_platform_open {
if (defined($ret)) { if (defined($ret)) {
my $d = $parent->FIJIModalDialog(-image => error_image($parent), my $d = $parent->FIJIModalDialog(-image => error_image($parent),
-text => $ret, -text => $ret,
-title => "Could not open $path", -title => "Could not open $path",);
-buttons => ["OK"]);
$d->Show(); $d->Show();
} }
} }
......
...@@ -248,7 +248,7 @@ sub main { ...@@ -248,7 +248,7 @@ sub main {
-wraplength => "200", -wraplength => "200",
-text => $warn, -text => $warn,
-title => 'Open FIJI Settings failed!', -title => 'Open FIJI Settings failed!',
-buttons => ["OK"]); );
$d->Show(); $d->Show();
if (!defined($tmp_settings)) { if (!defined($tmp_settings)) {
$ret = 1; $ret = 1;
...@@ -280,8 +280,7 @@ sub main { ...@@ -280,8 +280,7 @@ sub main {
my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}), my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}),
-wraplength => "200", -wraplength => "200",
-text => $msg, -text => $msg,
-title => 'Open FIJI Tests failed!', -title => 'Open FIJI Tests failed!',);
-buttons => ["OK"]);
$d->Show(); $d->Show();
$ret = 1; $ret = 1;
goto bailout; goto bailout;
...@@ -347,8 +346,7 @@ sub main { ...@@ -347,8 +346,7 @@ sub main {
my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}), my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}),
-wraplength => "400", -wraplength => "400",
-text => $worker_msg->{'rmsg'}, -text => $worker_msg->{'rmsg'},
-title => 'Starting the download worker thread failed!', -title => 'Starting the download worker thread failed!',);
-buttons => ["OK"]);
$d->Show(); $d->Show();
$self->{'FIJITestsViewer'}->{'mw'}->destroy(); $self->{'FIJITestsViewer'}->{'mw'}->destroy();
$ret = 1; $ret = 1;
...@@ -449,8 +447,7 @@ sub _export_test { ...@@ -449,8 +447,7 @@ sub _export_test {
my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}), my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}),
-text => $rv, -text => $rv,
-title => "Error saving tests.", -title => "Error saving tests.",);
-buttons => [qw/OK/]);
$d->Show(); $d->Show();
return; return;
} }
...@@ -473,8 +470,7 @@ sub _export_gate_level_sim { ...@@ -473,8 +470,7 @@ sub _export_gate_level_sim {
$logger->error($rv); $logger->error($rv);
my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}), my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}),
-text => $rv, -text => $rv,
-title => "Error FIJI simulation model for gate-level simulation.", -title => "Error FIJI simulation model for gate-level simulation.",);
-buttons => [qw/OK/]);
$d->Show(); $d->Show();
return; return;
} }
...@@ -497,8 +493,7 @@ sub _export_rtl_sim { ...@@ -497,8 +493,7 @@ sub _export_rtl_sim {
$logger->error($rv); $logger->error($rv);
my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}), my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}),
-text => $rv, -text => $rv,
-title => "Error saving RTL simulation templates.", -title => "Error saving RTL simulation templates.",);
-buttons => [qw/OK/]);
$d->Show(); $d->Show();
return; return;
} }
...@@ -549,8 +544,7 @@ sub _load_settings_prompt { ...@@ -549,8 +544,7 @@ sub _load_settings_prompt {
my $d = $self->{'mw'}->FIJIModalDialog(-image => (!defined($tmp_settings) ? Tk::FIJIUtils::error_image($self->{'mw'}) : Tk::FIJIUtils::alert_image($self->{'mw'})), my $d = $self->{'mw'}->FIJIModalDialog(-image => (!defined($tmp_settings) ? Tk::FIJIUtils::error_image($self->{'mw'}) : Tk::FIJIUtils::alert_image($self->{'mw'})),
-wraplength => "200", -wraplength => "200",
-text => $warn, -text => $warn,
-title => 'Open FIJI Settings failed!', -title => 'Open FIJI Settings failed!',);
-buttons => ["OK"]);
$d->Show(); $d->Show();
} }
} }
...@@ -664,8 +658,7 @@ sub _open_tests_file { ...@@ -664,8 +658,7 @@ sub _open_tests_file {
my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}), my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}),
-wraplength => "200", -wraplength => "200",
-text => $msg, -text => $msg,
-title => 'Open FIJI Tests failed!', -title => 'Open FIJI Tests failed!',);
-buttons => ["OK"]);
$d->Show(); $d->Show();
return; return;
} }
...@@ -675,8 +668,7 @@ sub _open_tests_file { ...@@ -675,8 +668,7 @@ sub _open_tests_file {
my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}), my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}),
-wraplength => "200", -wraplength => "200",
-text => $msg, -text => $msg,
-title => 'Open FIJI Tests failed!', -title => 'Open FIJI Tests failed!',);
-buttons => ["OK"]);
$d->Show(); $d->Show();
return; return;
} }
...@@ -711,8 +703,7 @@ sub _save_file { ...@@ -711,8 +703,7 @@ sub _save_file {
$logger->error($msg); $logger->error($msg);
my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}), my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}),
-text => $msg, -text => $msg,
-title => 'Save failed!', -title => 'Save failed!',);
-buttons => ["OK"]);
$d->Show(); $d->Show();
return; return;
} }
......
...@@ -189,8 +189,7 @@ sub main { ...@@ -189,8 +189,7 @@ sub main {
), ),
-wraplength => "200", -wraplength => "200",
-text => $msg, -text => $msg,
-title => 'Open FIJI Settings failed!', -title => 'Open FIJI Settings failed!',);
-buttons => ["OK"]);
$d->Show() if !$only_load; $d->Show() if !$only_load;
if (!defined($tmp_settings)) { if (!defined($tmp_settings)) {
$rv = 1; $rv = 1;
...@@ -203,8 +202,7 @@ sub main { ...@@ -203,8 +202,7 @@ sub main {
my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}), my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}),
-wraplength => "200", -wraplength => "200",
-text => $msg, -text => $msg,
-title => 'Open FIJI Settings failed!', -title => 'Open FIJI Settings failed!',);
-buttons => ["OK"]);
$d->Show() if !$only_load; $d->Show() if !$only_load;
$rv = 1; $rv = 1;
goto bailout; goto bailout;
...@@ -433,8 +431,7 @@ sub _open_settings_file { ...@@ -433,8 +431,7 @@ sub _open_settings_file {
my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}), my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}),
-wraplength => "200", -wraplength => "200",
-text => $msg, -text => $msg,
-title => 'Open FIJI Settings failed!', -title => 'Open FIJI Settings failed!',);
-buttons => ["OK"]);
$d->Show(); $d->Show();
return; return;
} }
...@@ -447,8 +444,7 @@ sub _open_settings_file { ...@@ -447,8 +444,7 @@ sub _open_settings_file {
my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}), my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}),
-wraplength => "200", -wraplength => "200",
-text => $msg, -text => $msg,
-title => 'Open FIJI Settings failed!', -title => 'Open FIJI Settings failed!',);
-buttons => ["OK"]);
$d->Show(); $d->Show();
return; return;
} elsif (ref($rv) eq "FIJI::Settings") { } elsif (ref($rv) eq "FIJI::Settings") {
...@@ -511,8 +507,7 @@ sub _load_netlist_file { ...@@ -511,8 +507,7 @@ sub _load_netlist_file {
my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}), my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}),
-wraplength => "200", -wraplength => "200",
-text => $msg, -text => $msg,
-title => 'Open netlist failed!', -title => 'Open netlist failed!',);
-buttons => ["OK"]);
$d->Show(); $d->Show();
undef $do_splash; undef $do_splash;
$splash->placeForget(); $splash->placeForget();
...@@ -530,8 +525,7 @@ sub _load_netlist_file { ...@@ -530,8 +525,7 @@ sub _load_netlist_file {
my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}), my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}),
-wraplength => "200", -wraplength => "200",
-text => $msg, -text => $msg,
-title => 'Open netlist failed!', -title => 'Open netlist failed!',);
-buttons => ["OK"]);
$d->Show(); $d->Show();
undef $do_splash; undef $do_splash;
$splash->placeForget(); $splash->placeForget();
...@@ -630,8 +624,7 @@ sub _save_file { ...@@ -630,8 +624,7 @@ sub _save_file {
my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}), my $d = $self->{'mw'}->FIJIModalDialog(-image => Tk::FIJIUtils::error_image($self->{'mw'}),
-text => $msg, -text => $msg,
-title => 'Save failed!', -title => 'Save failed!',);
-buttons => ["OK"]);
$d->Show(); $d->Show();
return; return;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment