Commit 3efaa91b authored by Stefan Tauner's avatar Stefan Tauner
Browse files

FIJIModalDialog: get rid of delete_mw and mw parameters

This also makes delete_mw superfluous in FIJISettingsViewer and FIJITestsViewer.
'mw' always was useless because there exists a Mainwindow() in all widgets.
parent 4a712960
......@@ -21,8 +21,6 @@ sub ClassInit {
sub Populate {
my $logger = get_logger("");
my ($self, $args) = @_;
$self->{'delete_mw'} = delete $args->{'-delete_mw'};
$self->{'mw'} = delete $args->{'-mw'};
my $image = delete $args->{'-image'};
my $text = delete $args->{'-text'};
my $wraplength = delete $args->{'-wraplength'};
......@@ -37,17 +35,22 @@ sub Populate {
sub Show {
my ($self) = @_;
# first set action to perform when the main window is closed to be ignored
if (defined $self->{'mw'} && defined $self->{'delete_mw'}) {
$self->{'mw'}->protocol('WM_DELETE_WINDOW' => sub {
return 1;
});
my $parent = $self->parent;
my $old_action;
if (defined($parent)) {
# first set action to perform when the main window is closed to be ignored
$old_action = $parent->protocol('WM_DELETE_WINDOW');
if (defined($old_action)) {
$parent->protocol('WM_DELETE_WINDOW' => sub {
return 1;
});
}
}
# then show the dialog
my $rv = $self->SUPER::Show();
# and finally reset the original action to be performed when the main window is closed
if (defined $self->{'mw'} && defined $self->{'delete_mw'}) {
$self->{'mw'}->protocol('WM_DELETE_WINDOW' => $self->{'delete_mw'});
if (defined($old_action)) {
$parent->protocol('WM_DELETE_WINDOW' => $old_action);
}
return $rv;
}
\ No newline at end of file
......@@ -57,7 +57,6 @@ sub ClassInit {
# -nets A list of net names as strings
# All parameters a Tk::Frame accepts
sub Populate {
my $logger = get_logger("");
my ($self, $args) = @_;
$self->{'nets'} = delete $args->{'-nets'};
$self->{'netname_ref'} = delete $args->{'-netname_ref'};
......@@ -182,19 +181,23 @@ sub _populate_widget {
}
sub _match_nets {
my $logger = get_logger("");
my ($self) = @_;
my $regex = $self->{'search_entry'}->get;
$self->Busy;
print $self->{'search_regex'};
if ($self->{'search_regex'}) {
# check if regex is valid:
eval {"" =~ m!$regex!};
if ($@) {
my $msg = "Error in regular expression:\n$@";
my $d = $self->FIJIModalDialog(-text=>$msg,-wraplength=>200,-title=>'Error')->Show();
my $msg = "Error in regular expression: $@";
$logger->error("$msg");
my $d = $self->MainWindow->FIJIModalDialog(
-text => $msg,
-wraplength => 400,
-title => 'Error',
)->Show();
return
}
}
......
......@@ -79,7 +79,6 @@ sub Populate {
my ($self, $args) = @_;
my $settings = delete $args->{'-settings'};
$self->{'changes_callback'} = delete $args->{'-changes_callback'};
$self->{'delete_mw'} = delete $args->{'-delete_mw'};
$self->{'mw'} = delete $args->{'-mw'};
my $lib_path = delete $args->{'-lib_path'};
......@@ -149,9 +148,7 @@ sub netlist {
my $msg = "Some nets defined in the specified netlist do not match the loaded settings.";
$logger->error($msg);
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => $self->{'delete_mw'},
-mw => $self->{'mw'},
-image => $alert_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $alert_image,
-text => $msg . "\n" . "Proceed with new netlist nevertheless?",
-wraplength => 200,
-title => 'Warning',
......@@ -196,9 +193,7 @@ sub settings {
my $msg = "Some nets defined in the specified settings do not match the loaded netlist.";
$logger->info($msg);
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => $self->{'delete_mw'},
-mw => $self->{'mw'},
-image => $alert_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $alert_image,
-text => $msg . "\n" . "Proceed with new netlist nevertheless?",
-wraplength => 200,
-title => 'Warning',
......@@ -274,9 +269,7 @@ sub update {
my $msg = "Could not find FIJI definition for constant named \"$name\"";
$logger->error($msg);
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => $self->{'delete_mw'},
-mw => $self->{'mw'},
-image => $error_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $error_image,
-text => 'Something went horribly wrong!',
-wraplength => 200,
-title => 'Warning',
......@@ -458,9 +451,7 @@ sub _populate_widget {
} elsif ($^O eq "linux") {
$ret = FIJI::Utils::system("xdg-open " . FIJI_DOCUMENTATION_PATH);
} else {
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => $self->{'delete_mw'},
-mw => $self->{'mw'},
-image => $error_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $error_image,
-text => "No default PDF viewer for OS \"" . $^O . "\"...",
-title => "Open Documentation failed",
-buttons => ["OK"]);
......@@ -468,9 +459,7 @@ sub _populate_widget {
return;
}
if (defined($ret)) {
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => $self->{'delete_mw'},
-mw => $self->{'mw'},
-image => $error_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $error_image,
-text => $ret,
-title => "Open Documentation failed",
-buttons => ["OK"]);
......@@ -612,9 +601,7 @@ sub _populate_widget {
if (defined $rv) {
$logger->warn($rv);
$logger->error($rv);
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => $self->{'delete_mw'},
-mw => $self->{'mw'},
-image => $alert_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $alert_image,
-wraplength => $self->screenwidth,
-text => "$rv",
-title => "Warning",
......@@ -971,10 +958,7 @@ sub _add_fiu ($$) {
my $rv = $self->_select_net_dialog(\$netname,"Select Net for FIU $i");
if (defined $rv) {
$logger->warn($rv);
$logger->error($rv);
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => $self->{'delete_mw'},
-mw => $self->{'mw'},
-image => $alert_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $alert_image,
-wraplength => $fr_fiu->screenwidth,
-text => "$rv",
-title => "Warning",
......@@ -996,9 +980,7 @@ sub _add_fiu ($$) {
if (defined $rvd || defined $rvn) {
my $msg = ((defined $rvd) ? $rvd : "").((defined $rvn) ? $rvn : "");
$logger->warn($msg);
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => $self->{'delete_mw'},
-mw => $self->{'mw'},
-image => $alert_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $alert_image,
-wraplength => $fr_fiu->screenwidth,
-text => "$msg",
-title => "Warning",
......@@ -1018,9 +1000,7 @@ sub _add_fiu ($$) {
my $rv = $self->_select_driver_dialog($i);
if (defined $rv) {
$logger->warn($rv);
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => $self->{'delete_mw'},
-mw => $self->{'mw'},
-image => $alert_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $alert_image,
-wraplength => $fr_fiu->screenwidth,
-text => "$rv",
-title => "Warning",
......@@ -1196,9 +1176,7 @@ sub _set_fields_by_button {
} elsif (${$button->cget('-variable')} && ${$f->cget('-variable')}) {
${$button->cget('-variable')} = 0;
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => $self->{'delete_mw'},
-mw => $self->{'mw'},
-image => $error_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $error_image,
-wraplength => 200,
-text => "\"" . $f->{'description'} . "\"\nforbids\n\"" . $button->{'description'} . "\".",
-title => "Error",
......
......@@ -113,7 +113,6 @@ sub Populate {
my $tests = delete $args->{'-tests'};
$self->{'changes_callback'} = delete $args->{'-changes_callback'};
$self->{'test_callback'} = delete $args->{'-test_callback'};
$self->{'delete_mw'} = delete $args->{'-delete_mw'};
$self->{'mw'} = delete $args->{'-mw'};
$self->{'worker'} = delete $args->{'-worker'};
$self->{'queue_to_worker'} = delete $args->{'-queue_to_worker'};
......@@ -315,9 +314,7 @@ sub _download {
$text .= RMSG_ERROR_STRINGS->{$k} . "\n" if $rmsg->{'error'}->{$k};
}
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => $self->{'delete_mw'},
-mw => $self->{'mw'},
-image => $error_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $error_image,
-text => $text,
-title => "Error while downloading.",
-buttons => [qw/OK/]);
......@@ -351,9 +348,7 @@ sub get_last_test {
if (!defined $self->{'last_test'}) {
my $msg = "No data available.";
$logger->error($msg);
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => $self->{'delete_mw'},
-mw => $self->{'mw'},
-image => $error_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $error_image,
-wraplength => "200",
-text => $msg,
-title => 'Export failed!',
......@@ -901,12 +896,10 @@ sub remove_test ($) {
}
sub edit_test {
my ($self, $p, $i) = @_;
my ($self, $i) = @_;
my $test = @{$self->{'tests'}->{'tests'}}[$i];
my $db = $p->FIJIModalDialog(
-delete_mw => $self->{'delete_mw'},
-mw => $self->{'mw'},
my $db = $self->{'mw'}->FIJIModalDialog(
-title => "Edit Test $i",
-buttons => [qw(OK Cancel)],
);
......@@ -937,7 +930,7 @@ sub _add_test ($$) {
my $edit_button = $self->{'fr_tests'}->Button(
-text => 'Edit',
-command => [\&edit_test, $self, $self->{'fr_tests'}, $i],
-command => [\&edit_test, $self, $i],
);
my $del_button = $self->{'fr_tests'}->Button(
......@@ -1065,9 +1058,7 @@ sub _set_fields_by_button {
$logger->error("Type mismatch: 'forbidden_by' must only include boolean values");
} elsif (${$button->cget('-variable')} && ${$f->cget('-variable')}) {
${$button->cget('-variable')} = 0;
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => $self->{'delete_mw'},
-mw => $self->{'mw'},
-image => $error_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $error_image,
-text => "\"" . $f->{'description'} . "\"\nforbids\n\"" . $button->{'description'} . "\".",
-title => "Error.",
-buttons => [qw/OK/]);
......
......@@ -253,9 +253,7 @@ sub main {
if (defined($warn)) {
my $msg = "settings file $filename could not be loaded correctly: $tmp_settings";
$logger->error($msg);
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => [\&_onexit, $self],
-mw => $self->{'mw'},
-image => (!defined($tmp_settings) ? $error_image : $alert_image),
my $d = $self->{'mw'}->FIJIModalDialog(-image => (!defined($tmp_settings) ? $error_image : $alert_image),
-wraplength => "200",
-text => $warn,
-title => 'Open FIJI Settings failed!',
......@@ -288,9 +286,7 @@ sub main {
if (!ref($tmp_tests)) {
my $msg = "Tests file $filename could not be loaded correctly: $tmp_tests";
$logger->error($msg);
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => [\&_onexit, $self],
-mw => $self->{'mw'},
-image => $error_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $error_image,
-wraplength => "200",
-text => $msg,
-title => 'Open FIJI Tests failed!',
......@@ -334,7 +330,6 @@ sub main {
-changes_callback => sub { my $value = shift; _indicate_changes($self, $value) },
-test_callback => sub { my $value = shift; $self->{'export_menuentry'}->configure(-state => ($value > 0) ? "normal" : "disabled")},
-mw => $self->{'mw'},
-delete_mw => [\&_onexit, $self],
-lib_path => $libdir,
-tests => $self->{'tests'},
-settings => $self->{'settings'},
......@@ -360,9 +355,7 @@ sub main {
$mw->afterIdle(sub {
my $worker_msg = $self->{'FIJITestsViewer'}->{'queue_from_worker'}->dequeue();
if ($worker_msg->{'state'} eq "dying") {
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => [\&_onexit, $self],
-mw => $self->{'mw'},
-image => $error_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $error_image,
-wraplength => "400",
-text => $worker_msg->{'rmsg'},
-title => 'Starting the download worker thread failed!',
......@@ -475,9 +468,7 @@ sub _export_test {
if(defined $rv) {
$logger->error($rv);
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => $self->{'delete_mw'},
-mw => $self->{'mw'},
-image => $error_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $error_image,
-text => $rv,
-title => "Error saving tests.",
-buttons => [qw/OK/]);
......@@ -501,9 +492,7 @@ sub _export_gate_level_sim {
$rv = $last_test_ref->export_gate_level($name,$self->{'FIJITestsViewer'}->{'settings'});
if(defined $rv) {
$logger->error($rv);
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => $self->{'delete_mw'},
-mw => $self->{'mw'},
-image => $error_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $error_image,
-text => $rv,
-title => "Error FIJI simulation model for gate-level simulation.",
-buttons => [qw/OK/]);
......@@ -527,9 +516,7 @@ sub _export_rtl_sim {
$rv = $last_test_ref->export_tb($name,$self->{'FIJITestsViewer'}->{'settings'});
if(defined $rv) {
$logger->error($rv);
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => $self->{'delete_mw'},
-mw => $self->{'mw'},
-image => $error_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $error_image,
-text => $rv,
-title => "Error saving RTL simulation templates.",
-buttons => [qw/OK/]);
......@@ -578,9 +565,7 @@ sub _load_settings_prompt {
if (defined($warn)) {
my $msg = "settings file $filename could not be loaded correctly: $warn";
$logger->error($msg);
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => [\&_onexit, $self],
-mw => $self->{'mw'},
-image => (!defined($tmp_settings) ? $error_image : $alert_image),
my $d = $self->{'mw'}->FIJIModalDialog(-image => (!defined($tmp_settings) ? $error_image : $alert_image),
-wraplength => "200",
-text => $warn,
-title => 'Open FIJI Settings failed!',
......@@ -680,9 +665,7 @@ sub _show_documentation {
} elsif ($^O eq "linux") {
$ret = FIJI::Utils::system("xdg-open " . FIJI_DOCUMENTATION_PATH);
} else {
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => [\&_onexit, $self],
-mw => $self->{'mw'},
-image => $error_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $error_image,
-text => "No default PDF viewer for OS \"" . $^O . "\"...",
-title => "Open Documentation failed",
-buttons => ["OK"]);
......@@ -690,9 +673,7 @@ sub _show_documentation {
return;
}
if (defined($ret)) {
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => [\&_onexit, $self],
-mw => $self->{'mw'},
-image => $error_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $error_image,
-text => $ret,
-title => "Open Documentation failed",
-buttons => ["OK"]);
......@@ -722,9 +703,7 @@ sub _open_tests_file {
if (!ref($tmp_tests)) {
my $msg = "tests file $filename could not be loaded correctly: $tmp_tests";
$logger->error($msg);
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => [\&_onexit, $self],
-mw => $self->{'mw'},
-image => $error_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $error_image,
-wraplength => "200",
-text => $msg,
-title => 'Open FIJI Tests failed!',
......@@ -735,9 +714,7 @@ sub _open_tests_file {
if (!defined($self->{'FIJITestsViewer'}->configure(-tests => $tmp_tests))) {
my $msg = "Could not update GUI correctly with new tests.";
$logger->error($msg);
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => [\&_onexit, $self],
-mw => $self->{'mw'},
-image => $error_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $error_image,
-wraplength => "200",
-text => $msg,
-title => 'Open FIJI Tests failed!',
......@@ -756,11 +733,9 @@ sub _overwrite_existing_file ($) {
if (!-e $filename) {
return 1;
}
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => [\&_onexit, $self],
-mw => $self->{'mw'},
my $d = $self->{'mw'}->FIJIModalDialog(-title => 'Really overwrite?',
-image => $alert_image,
-text => "File \"$filename\" already exists.\nDo you want to overwrite it?",
-title => 'Really overwrite?',
-buttons => ["Yes", "No"]);
my $reply = $d->Show();
return (defined $reply && lc($reply) eq 'yes');
......@@ -776,9 +751,7 @@ sub _save_file {
if (defined($err)) {
my $msg = "Saving to file $filename failed!\n$err";
$logger->error($msg);
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => [\&_onexit, $self],
-mw => $self->{'mw'},
-image => $error_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $error_image,
-text => $msg,
-title => 'Save failed!',
-buttons => ["OK"]);
......@@ -833,9 +806,7 @@ sub _onexit {
my $response;
if ($unsaved_changes == 1) {
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => [\&_onexit, $self],
-mw => $self->{'mw'},
-image => $alert_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $alert_image,
-text => "Unsaved changes.\nDo you really want to quit?",
-wraplength => 350,
-title => 'Really quit?',
......
......@@ -175,7 +175,6 @@ sub main {
$self->{'FIJISettingsViewer'} = $mw->FIJISettingsViewer(
-mw => $self->{'mw'},
-delete_mw => [\&_onexit, $self],
-settings => $self->{'settings'},
-lib_path => $libdir,
-changes_callback => sub { my $set = shift; _indicate_changes($self, $set) },
......@@ -212,9 +211,7 @@ sub main {
if (defined($warn)) {
my $msg = "Settings file $filename could not be loaded correctly: $warn";
$logger->error($msg);
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => [\&_onexit, $self],
-mw => $self->{'mw'},
-image => (!defined($tmp_settings) ? $error_image : $alert_image),
my $d = $self->{'mw'}->FIJIModalDialog(-image => (!defined($tmp_settings) ? $error_image : $alert_image),
-wraplength => "200",
-text => $msg,
-title => 'Open FIJI Settings failed!',
......@@ -228,9 +225,7 @@ sub main {
if (!defined($self->{'FIJISettingsViewer'}->settings($tmp_settings))) {
my $msg = "Could not update GUI correctly with new settings.";
$logger->error($msg);
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => [\&_onexit, $self],
-mw => $self->{'mw'},
-image => $error_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $error_image,
-wraplength => "200",
-text => $msg,
-title => 'Open FIJI Settings failed!',
......@@ -498,9 +493,7 @@ sub _open_settings_file {
if (!ref($tmp_settings)) {
my $msg = "Settings file $filename could not be loaded correctly: $tmp_settings";
$logger->error($msg);
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => [\&_onexit, $self],
-mw => $self->{'mw'},
-image => $error_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $error_image,
-wraplength => "200",
-text => $msg,
-title => 'Open FIJI Settings failed!',
......@@ -514,9 +507,7 @@ sub _open_settings_file {
my $msg = "Could not update GUI correctly with new settings.";
$logger->error($msg);
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => [\&_onexit, $self],
-mw => $self->{'mw'},
-image => $error_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $error_image,
-wraplength => "200",
-text => $msg,
-title => 'Open FIJI Settings failed!',
......@@ -578,9 +569,7 @@ sub _load_netlist_file {
if ($nl->read_file($filename) != 0) {
my $msg = "Netlist could not be loaded correctly from \"$filename\".";
$logger->error($msg);
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => [\&_onexit, $self],
-mw => $self->{'mw'},
-image => $error_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $error_image,
-wraplength => "200",
-text => $msg,
-title => 'Open netlist failed!',
......@@ -599,9 +588,7 @@ sub _load_netlist_file {
my $msg = "Could not update GUI correctly with new netlist.";
$logger->error($msg);
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => [\&_onexit, $self],
-mw => $self->{'mw'},
-image => $error_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $error_image,
-wraplength => "200",
-text => $msg,
-title => 'Open netlist failed!',
......@@ -643,9 +630,7 @@ sub _overwrite_existing_file ($) {
if (!-e $filename) {
return 1;
}
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => [\&_onexit, $self],
-mw => $self->{'mw'},
-image => $alert_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $alert_image,
-text => "File \"$filename\" already exists.\nDo you want to overwrite it?",
-title => 'Really overwrite?',
-buttons => ["Yes", "No"]);
......@@ -684,9 +669,7 @@ sub _save_file {
}
if (defined($drv) || defined($dsgn) || defined($dup)) {
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => [\&_onexit, $self],
-mw => $self->{'mw'},
-image => $alert_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $alert_image,
-text => $rv . "Save Settings nevertheless?",
-wraplength => 350,
-title => 'Validation failed',
......@@ -706,9 +689,7 @@ sub _save_file {
my $msg = "Saving to file $filename failed!\n$err";
$logger->error($msg);
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => [\&_onexit, $self],
-mw => $self->{'mw'},
-image => $error_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $error_image,
-text => $msg,
-title => 'Save failed!',
-buttons => ["OK"]);
......@@ -763,9 +744,7 @@ sub _onexit {
my $response;
if ($unsaved_changes == 1) {
my $d = $self->{'mw'}->FIJIModalDialog(-delete_mw => [\&_onexit, $self],
-mw => $self->{'mw'},
-image => $alert_image,
my $d = $self->{'mw'}->FIJIModalDialog(-image => $alert_image,
-text => "Unsaved changes.\nDo you really want to quit?",
-wraplength => 350,
-title => 'Really quit?',
......
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