Fix use of undefined value
[clawsker.git] / clawsker
index 0b8dc165eadb327671462a1529d0eefa43b5b527..497b42aed8277b3de5b3fee6c9db7c93de865cf3 100755 (executable)
--- a/clawsker
+++ b/clawsker
@@ -14,6 +14,7 @@
 
 binmode STDOUT, ":encoding(utf8)";
 
+use 5.010_000;
 use strict;
 use utf8;
 use Glib qw(TRUE FALSE);
@@ -166,7 +167,7 @@ sub _ {
     l_beh_inline_at => _('Show inline attachments'),
     h_beh_inline_at => _('Allows hiding inline attachments already shown in mail structure view.'),
     l_beh_addr_swc => _('Address search in compose window matches any'),
-    h_beh_addr_swc => _('On Tab-key completion, address text will match any part of the string or only the from the start.'),
+    h_beh_addr_swc => _('On Tab-key completion, address text will match any part of the string or only from the start.'),
     l_beh_fold_swc => _('Folder search in folder selector matches any'),
     h_beh_fold_swc => _('On folder name completion text will match any part of the string or only from the start.'),
 
@@ -466,8 +467,10 @@ sub new_text_box_for_int {
     my $glabel = Gtk2::Label->new ($label);
     my $pagei = int (($type[2] - $type[1]) / 10);
     my $gentry = Gtk2::SpinButton->new_with_range ($type[1], $type[2], $pagei);
+    my $value = $HPVALUE{$name};
+    $value //= $type[1];
     $gentry->set_numeric (TRUE);
-    $gentry->set_value ($HPVALUE{$name});
+    $gentry->set_value ($value);
     $$hash{$key}[GUI] = $gentry;
     $gentry->signal_connect('value-changed' => sub {
             my ($w, $e) = @_;
@@ -1005,7 +1008,7 @@ sub new_gui_page() {
     addr_swc => [
         'address_search_wildcard',
         $xl::s{l_beh_addr_swc},
-        $xl::s{h_beh_addr_sw1},
+        $xl::s{h_beh_addr_swc},
         'bool',
         '3.9.3.18',
         '0',
@@ -1014,7 +1017,7 @@ sub new_gui_page() {
     fold_swc => [
         'folder_search_wildcard',
         $xl::s{l_beh_fold_swc},
-        $xl::s{h_beh_fold_sw1},
+        $xl::s{h_beh_fold_swc},
         'bool',
         '3.9.3.18',
         '0',