Rename SkeinPanel::on_close() to make it more generice

This commit is contained in:
Henrik Brix Andersen 2012-06-30 22:57:30 +02:00
parent 4f179a5197
commit df658eb636
2 changed files with 3 additions and 3 deletions

View file

@ -127,7 +127,7 @@ sub about {
sub on_close { sub on_close {
my ($frame, $event) = @_; my ($frame, $event) = @_;
$event->CanVeto ? $event->Skip($frame->{skeinpanel}->on_close) : $event->Skip(1); $event->CanVeto ? $event->Skip($frame->{skeinpanel}->check_unsaved_changes) : $event->Skip(1);
} }
sub catch_error { sub catch_error {

View file

@ -232,7 +232,7 @@ sub config_wizard {
} }
} }
sub on_close { sub check_unsaved_changes {
my $self = shift; my $self = shift;
my @dirty; my @dirty;
@ -242,7 +242,7 @@ sub on_close {
if (@dirty) { if (@dirty) {
my $titles = join ', ', @dirty; my $titles = join ', ', @dirty;
my $confirm = Wx::MessageDialog->new($self, "You have unsaved changes ($titles). Exit anyway?", my $confirm = Wx::MessageDialog->new($self, "You have unsaved changes ($titles). Discard changes and continue anyway?",
'Unsaved Presets', wxICON_QUESTION | wxOK | wxCANCEL); 'Unsaved Presets', wxICON_QUESTION | wxOK | wxCANCEL);
return ($confirm->ShowModal == wxID_OK); return ($confirm->ShowModal == wxID_OK);
} }