Commit 9bee9338 authored by Stefan Tauner's avatar Stefan Tauner
Browse files

Improve on various minor usability problems

parent ded06673
...@@ -156,10 +156,8 @@ sub bind_mousewheel { ...@@ -156,10 +156,8 @@ sub bind_mousewheel {
eval { $widget->Subwidget('scrolled') }; eval { $widget->Subwidget('scrolled') };
if ($@ || !blessed($widget) || !$widget->isa("Tk::Widget")) { if ($@ || !blessed($widget) || !$widget->isa("Tk::Widget")) {
print $@; my $logger = get_logger("");
my $msg = $widget->class()." is not supported. Only Tk::Scrolled is supported."; $logger->error("Could not bind mouse wheel to wrong widget (".$widget->class().")\n($@)");
print $msg;
return $msg;
} }
# bind the mouse wheel # bind the mouse wheel
......
...@@ -653,7 +653,7 @@ sub _open_tests_file { ...@@ -653,7 +653,7 @@ sub _open_tests_file {
my $tmp_tests = (defined $self->{'tests'}) ? \%{Clone::clone($self->{'tests'})} : undef; my $tmp_tests = (defined $self->{'tests'}) ? \%{Clone::clone($self->{'tests'})} : undef;
$tmp_tests = FIJI::Tests->new('GUI', $self->{'settings'}->{'design'}->{'CFGS_PER_MSG'}, $self->{'settings'}->{'design'}->{'FIU_NUM'}, $filename, $tmp_tests); $tmp_tests = FIJI::Tests->new('GUI', $self->{'settings'}->{'design'}->{'CFGS_PER_MSG'}, $self->{'settings'}->{'design'}->{'FIU_NUM'}, $filename, $tmp_tests);
if (!ref($tmp_tests)) { if (!ref($tmp_tests)) {
my $msg = "tests file $filename could not be loaded correctly: $tmp_tests"; my $msg = "Tests file $filename could not be loaded correctly:\n$tmp_tests";
$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'}),
-wraplength => "200", -wraplength => "200",
...@@ -728,7 +728,7 @@ sub _save_as { ...@@ -728,7 +728,7 @@ sub _save_as {
my $fb = $self->{'mw'}->FBox( my $fb = $self->{'mw'}->FBox(
-type => 'save', -type => 'save',
-title => 'Save FIJI Tests file as...', -title => 'Save FIJI Tests file as...',
-defaultextension => 'cfg', -defaultextension => 'tst',
-filetypes => TESTS_FILE_TYPES_CFG, -filetypes => TESTS_FILE_TYPES_CFG,
-initialdir => $current_dir, -initialdir => $current_dir,
-initialfile => 'fiji.tst', -initialfile => 'fiji.tst',
......
...@@ -426,7 +426,7 @@ sub _open_settings_file { ...@@ -426,7 +426,7 @@ sub _open_settings_file {
my $warn; my $warn;
($tmp_settings, $warn) = FIJI::Settings->new('setup', $filename, $tmp_settings); ($tmp_settings, $warn) = FIJI::Settings->new('setup', $filename, $tmp_settings);
if (!ref($tmp_settings)) { if (!ref($tmp_settings)) {
my $msg = "Settings file $filename could not be loaded correctly: $tmp_settings"; my $msg = "Settings file $filename could not be loaded correctly:\n$warn";
$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'}),
-wraplength => "200", -wraplength => "200",
......
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