2 # Convert KAlarm pre-1.2.1 General section settings.
7 my $haveEmailUseCtrlCentre = 0;
8 my $haveEmailBccUseCtrlCentre = 0;
9 my $emailUseCtrlCentre = 1; # default = true
10 my $emailBccUseCtrlCentre = 1; # default = true
17 if (/^EmailFrom=(.*)$/) {
20 elsif (/^EmailUseControlCenter=(.*)$/) {
21 $haveEmailUseCtrlCentre = 1;
22 $emailUseCtrlCentre = ($1 eq "true");
24 elsif (/^EmailBccUseControlCenter=(.*)$/) {
25 $haveEmailBccUseCtrlCentre = 1;
26 $emailBccUseCtrlCentre = ($1 eq "true");
28 elsif (/^EmailAddress=(.*)$/) {
31 elsif (/^EmailBccAddress=(.*)$/) {
32 $emailBccAddress = $1;
36 if (!$haveEmailFrom && $haveEmailUseCtrlCentre)
38 my $bccUseCC = $haveEmailBccUseCtrlCentre ?
$emailBccUseCtrlCentre : $emailUseCtrlCentre;
39 print "EmailFrom=" . ($emailUseCtrlCentre ?
"\@ControlCenter" : $emailAddress) . "\n";
40 print "EmailBccAddress=" . ($bccUseCC ?
"\@ControlCenter" : $emailBccAddress) . "\n";
41 print "# DELETE EmailAddress\n";
42 if ($haveEmailUseCtrlCentre) {
43 print "# DELETE EmailUseControlCenter\n";
45 if ($haveEmailBccUseCtrlCentre) {
46 print "# DELETE EmailBccUseControlCenter\n";