Verified Commit 390d2a2b authored by Alexander Lohnau's avatar Alexander Lohnau
Browse files

Remove old kconf_update files

They were added 6 years ago, by now all consumers should have updated to that version or have a fresh config anyways
parent 228934a2
Pipeline #89925 passed with stage
in 10 minutes and 52 seconds
......@@ -6,7 +6,6 @@ include_directories(
add_subdirectory(appicons)
add_subdirectory(pixmaps)
add_subdirectory(autostart)
add_subdirectory(kconf_update)
set(libkalarm_common_SRCS)
......
install(FILES kalarm.upd
DESTINATION ${KDE_INSTALL_KCONFUPDATEDIR}
)
install(PROGRAMS kalarm-version.pl
kalarm-1.2.1-general.pl
kalarm-1.9.5-defaults.pl
kalarm-2.0.2-general.pl
kalarm-2.1.5-general.pl
kalarm-15.08-kickoff.sh
DESTINATION ${KDE_INSTALL_KCONFUPDATEDIR}
)
#!/usr/bin/perl -w
# Convert KAlarm pre-1.2.1 General section settings.
# SPDX-FileCopyrightText: 2010 David Jarvie <djarvie@kde.org>
# SPDX-License-Identifier: GPL-2.0-or-later
use strict;
my $haveEmailFrom = 0;
my $haveEmailUseCtrlCentre = 0;
my $haveEmailBccUseCtrlCentre = 0;
my $emailUseCtrlCentre = 1; # default = true
my $emailBccUseCtrlCentre = 1; # default = true
my $emailAddress;
my $emailBccAddress;
while (<>)
{
chomp;
if (/^EmailFrom=(.*)$/) {
$haveEmailFrom = 1;
}
elsif (/^EmailUseControlCenter=(.*)$/) {
$haveEmailUseCtrlCentre = 1;
$emailUseCtrlCentre = ($1 eq "true");
}
elsif (/^EmailBccUseControlCenter=(.*)$/) {
$haveEmailBccUseCtrlCentre = 1;
$emailBccUseCtrlCentre = ($1 eq "true");
}
elsif (/^EmailAddress=(.*)$/) {
$emailAddress = $1;
}
elsif (/^EmailBccAddress=(.*)$/) {
$emailBccAddress = $1;
}
}
if (!$haveEmailFrom && $haveEmailUseCtrlCentre)
{
my $bccUseCC = $haveEmailBccUseCtrlCentre ? $emailBccUseCtrlCentre : $emailUseCtrlCentre;
print "EmailFrom=" . ($emailUseCtrlCentre ? "\@ControlCenter" : $emailAddress) . "\n";
print "EmailBccAddress=" . ($bccUseCC ? "\@ControlCenter" : $emailBccAddress) . "\n";
print "# DELETE EmailAddress\n";
if ($haveEmailUseCtrlCentre) {
print "# DELETE EmailUseControlCenter\n";
}
if ($haveEmailBccUseCtrlCentre) {
print "# DELETE EmailBccUseControlCenter\n";
}
}
#!/usr/bin/perl -w
# Convert pre-1.9.5 Defaults section settings.
# SPDX-FileCopyrightText: 2010 David Jarvie <djarvie@kde.org>
# SPDX-License-Identifier: GPL-2.0-or-later
use strict;
my $param;
my $cmdLogType;
my $soundType;
while (<>)
{
chomp;
# Convert KAlarm pre-1.9.5 entries
if (/^DefSoundVolume=(.*)$/) {
$param = ($1 < 0) ? -1 : ($1 > 1) ? 100 : $1 * 100;
print "SoundVolume=$param\n";
print "# DELETE DefSoundVolume\n";
}
elsif (/^DefCmdLogType=(.*)$/) {
$cmdLogType = ($1 == 1) ? "File"
: ($1 == 2) ? "Terminal" : "Discard";
print "# DELETE DefCmdLogType\n";
}
elsif (/^DefRecurPeriod=(.*)$/) {
$param = ($1 == 1) ? "Login"
: ($1 == 2) ? "SubDaily"
: ($1 == 3) ? "Daily"
: ($1 == 4) ? "Weekly"
: ($1 == 5) ? "Monthly"
: ($1 == 6) ? "Yearly" : "None";
print "RecurPeriod=$param\n";
print "# DELETE DefRecurPeriod\n";
}
elsif (/^DefRemindUnits=(.*)$/) {
$param = ($1 == 1) ? "Days"
: ($1 == 2) ? "Weeks" : "HoursMinutes";
print "RemindUnits=$param\n";
print "# DELETE DefRemindUnits\n";
}
elsif (/^DefSoundType=(.*)$/) {
if (!$soundType) {
$soundType = ($1 == 1) ? "Beep"
: ($1 == 2) ? "File"
: ($1 == 3) ? "Speak" : "None";
}
print "# DELETE DefSoundType\n";
}
# Convert KAlarm pre-1.4.6 entries
elsif (/^DefSound=(.*)$/) {
if ($1 ne "true") {
$soundType = "None";
}
print "# DELETE DefSound\n";
}
# Convert KAlarm pre-1.3.0 entries
elsif (/^DefCmdXterm=(.*)$/) {
$cmdLogType = ($1 eq "true") ? "Terminal" : "Discard";
print "# DELETE DefCmdXterm\n";
}
}
if ($cmdLogType) {
print "CmdLogType=$cmdLogType\n";
}
if ($soundType) {
print "SoundType=$soundType\n";
}
#!/bin/sh
kickoffrcname=`qtpaths --locate-file GenericConfigLocation kickoffrc`
if [ -f "$kickoffrcname" ]; then
sed -i "s/\/kalarm.desktop/\/org.kde.kalarm.desktop/" $kickoffrcname
fi
#!/usr/bin/perl -w
# Convert pre-2.0.2 General section settings.
# SPDX-FileCopyrightText: 2008 David Jarvie <djarvie@kde.org>
# SPDX-License-Identifier: GPL-2.0-or-later
use strict;
my @lines;
while (<>)
{
chomp;
if (/^(EmailFrom|EmailBccAddress)=\@ControlCenter$/) {
push @lines, "$1=\@SystemSettings\n";
}
}
if (@lines) {
print "[General]\n";
print @lines;
}
#!/usr/bin/perl -w
# Convert pre-2.1.5 General section settings.
# SPDX-FileCopyrightText: 2009 David Jarvie <djarvie@kde.org>
# SPDX-License-Identifier: GPL-2.0-or-later
use strict;
while (<>)
{
if (/^CmdXTerm=konsole/) {
s/ -T / -p tabtitle=/;
print "[General]\n";
print $_;
}
}
#!/usr/bin/perl -w
# Write the config file version
use strict;
if ($ARGV[0]) {
print "Version=$ARGV[0]\n";
}
Version=5
# KAlarm version 1.9.5
#
Id=1.9.5
File=kalarmrc
# Convert pre-1.2.1 email options
Group=General
Options=overwrite
Script=kalarm-1.2.1-general.pl
# Rename [Defaults] keys to remove "Def" prefix.
# For enum values, replace code numbers by strings.
Group=Defaults
Script=kalarm-1.9.5-defaults.pl
Group=Defaults
Key=DefLateCancel,LateCancel
Key=DefAutoClose,AutoClose
Key=DefConfirmAck,ConfirmAck
Key=DefCopyKOrg,CopyKOrg
Key=DefSoundFile,SoundFile
Key=DefSoundRepeat,SoundRepeat
Key=DefCmdScript,CmdScript
Key=DefLogFile,LogFile
Key=DefEmailBcc,EmailBcc
Key=DefPreAction,PreAction
Key=DefPostAction,PostAction
# Write the config version into [General]Version
Group=General
Options=overwrite
ScriptArguments=1.9.5
Script=kalarm-version.pl
# KAlarm version 1.9.9
# Transfer some keys from [General] to [View]
Id=1.9.9
File=kalarmrc
Group=General,View
Key=ShowResources,ShowResources
Key=ShowExpiredAlarms,ShowArchivedAlarms
Key=ShowAlarmTime,ShowAlarmTime
Key=ShowTimeToAlarm,ShowTimeToAlarm
# KAlarm version 1.9.12
# Remove obsolete keys
Id=1.9.12
File=kalarmrc
Group=General
RemoveKey=DisableAlarmsIfStopped
RemoveKey=DaemonTrayCheckInterval
Key=AutostartTray,AutoStart
Key=RunInSystemTray,ShowInSystemTray
# KAlarm version 2.0.0
Id=2.0.0
File=kalarmrc
RemoveGroup=EditDialog
# Convert pre-2.0.2 email options
Id=2.0.2
File=kalarmrc
Group=General
Options=overwrite
Script=kalarm-2.0.2-general.pl
# KAlarm version 2.1.5
# Convert KDE3 konsole -T command parameter
Id=2.1.5
File=kalarmrc
Group=General
Options=overwrite
Script=kalarm-2.1.5-general.pl
# KAlarm version 2.3.2
# Remove obsolete key
Id=2.3.2
File=kalarmrc
Group=General
RemoveKey=Sod
# KAlarm version 15.08
# Update entry in kickoffrc after the .desktop file has been renamed in 15.08
Id=kalarm-15.08-kickoff
Script=kalarm-15.08-kickoff.sh,sh
Markdown is supported
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