summaryrefslogtreecommitdiffstats
path: root/korn/kconf_update
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-27 01:05:15 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-27 01:05:15 -0600
commit64df902cf71a8ee258fb85f6be26248f399aa01f (patch)
treedba58f705042c22cea26b678d5b0e4e9a34bf202 /korn/kconf_update
parentde53c98cab07e9c4b0f5e25dab82830fb6fc67ec (diff)
downloadtdepim-64df902cf71a8ee258fb85f6be26248f399aa01f.tar.gz
tdepim-64df902cf71a8ee258fb85f6be26248f399aa01f.zip
Rename a number of libraries and executables to avoid conflicts with KDE4
Diffstat (limited to 'korn/kconf_update')
-rw-r--r--korn/kconf_update/CMakeLists.txt38
-rw-r--r--korn/kconf_update/Makefile.am12
-rw-r--r--korn/kconf_update/korn-3-4-config_change.cpp261
-rw-r--r--korn/kconf_update/korn-3-4-config_change.upd3
-rw-r--r--korn/kconf_update/korn-3-5-metadata-update.pl43
-rw-r--r--korn/kconf_update/korn-3-5-ssl-update.pl39
-rw-r--r--korn/kconf_update/korn-3-5-update.upd10
7 files changed, 0 insertions, 406 deletions
diff --git a/korn/kconf_update/CMakeLists.txt b/korn/kconf_update/CMakeLists.txt
deleted file mode 100644
index 88c06088c..000000000
--- a/korn/kconf_update/CMakeLists.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-#################################################
-#
-# (C) 2010-2011 Serghei Amelian
-# serghei (DOT) amelian (AT) gmail.com
-#
-# Improvements and feedback are welcome
-#
-# This file is released under GPL >= 2
-#
-#################################################
-
-include_directories(
- ${TQT_INCLUDE_DIRS}
-)
-
-link_directories(
- ${TQT_LIBRARY_DIRS}
-)
-
-
-##### other data ################################
-
-install( FILES
- korn-3-4-config_change.upd korn-3-5-update.upd
- DESTINATION ${KCONF_UPDATE_INSTALL_DIR} )
-
-install( PROGRAMS
- korn-3-5-ssl-update.pl korn-3-5-metadata-update.pl
- DESTINATION ${KCONF_UPDATE_INSTALL_DIR} )
-
-
-##### korn-3-4-config_change (executable) #######
-
-tde_add_executable( korn-3-4-config_change
- SOURCES korn-3-4-config_change.cpp
- LINK ${TQT_LIBRARIES}
- DESTINATION ${LIB_INSTALL_DIR}/kconf_update_bin
-)
diff --git a/korn/kconf_update/Makefile.am b/korn/kconf_update/Makefile.am
deleted file mode 100644
index 74991a930..000000000
--- a/korn/kconf_update/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-INCLUDES=$(all_includes)
-
-update_DATA = korn-3-4-config_change.upd korn-3-5-update.upd
-update_SCRIPTS = korn-3-5-ssl-update.pl korn-3-5-metadata-update.pl
-updatedir = $(kde_datadir)/kconf_update
-
-kconf_PROGRAMS = korn-3-4-config_change
-kconfdir = $(libdir)/kconf_update_bin
-
-korn_3_4_config_change_SOURCES = korn-3-4-config_change.cpp
-korn_3_4_config_change_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor
-korn_3_4_config_change_LDADD = $(LIB_QT)
diff --git a/korn/kconf_update/korn-3-4-config_change.cpp b/korn/kconf_update/korn-3-4-config_change.cpp
deleted file mode 100644
index 7eff3ad38..000000000
--- a/korn/kconf_update/korn-3-4-config_change.cpp
+++ /dev/null
@@ -1,261 +0,0 @@
-/*
- * Copyright (C) 2004, Mart Kelder (mart.kde@hccnet.nl)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <tqstring.h>
-#include <tqregexp.h>
-#include <tqtextstream.h>
-#include <tqmap.h>
-#include <tqvaluelist.h>
-
-#include <stdio.h>
-
-TQString decodeString( const TQString &password )
-{
- unsigned int i, val;
- unsigned int len = password.length();
- TQString result="";
- for ( i=0; i < len; i++ )
- {
- val = password[i].latin1() - ' ';
- val = (255-' ') - val;
- result += (char)(val + ' ');
- }
- return result;
-}
-
-void printToprint( TQTextStream &out, TQMap<TQString,TQString> &to_printed, const TQString type )
-{
- out << "printToprint( " << type << " )" << endl;
-
- if( type == "mbox" )
- {
- out << "mailbox=" << to_printed[ "file" ] << endl;
- }
- else if( type == "qmail" )
- {
- out << "mailbox=" << to_printed[ "maildir" ] << endl;
- }
- else if( type == "pop3" )
- {
- out << "host=" << to_printed[ "host" ] << endl;
- out << "port=" << to_printed[ "port" ] << endl;
- out << "username=" << to_printed[ "user" ] << endl;
- if( to_printed[ "APOP" ] == "true" )
- out << "auth=APOP" << endl;
- else
- out << "auth=" << endl;
- }
- else if( type == "imap4" )
- {
- out << "host=" << to_printed[ "host" ] << endl;
- out << "port=" << to_printed[ "port" ] << endl;
- out << "username=" << to_printed[ "user" ] << endl;
- out << "mailbox=" << to_printed[ "mailbox" ] << endl;
- }
- else if( type == "nntp" )
- {
- out << "host=" << to_printed[ "host" ] << endl;
- out << "port=" << to_printed[ "port" ] << endl;
- out << "mailbox=" << to_printed[ "group" ] << endl;
- }
- else if( type == "process" )
- {
- out << "mailbox=" << to_printed[ "command" ] << endl;
- }
- else if( type == "kio" )
- {
- out << "host=" << to_printed[ "host" ] << endl;
- out << "port=" << to_printed[ "port" ] << endl;
- out << "username=" << to_printed[ "username" ] << endl;
- out << "mailbox=" << to_printed[ "mailbox" ] << endl;
- out << "password=" << decodeString( to_printed[ "password" ] ) << endl;
- }
-
- if( type == "pop3" || type == "imap4" )
- {
- out << "password=" << to_printed[ "pass" ] << endl;
- if( to_printed[ "pass" ].isEmpty() )
- out << "savepassword=false" << endl;
- else
- out << "savepassword=true" << endl;
- }
-
- if( to_printed[ "resetcounter" ] != "-1" )
- out << "reset=" << to_printed[ "resetcounter" ] << endl;
- else
- out << "reset=0" << endl;
- out << "interval=" << to_printed[ "poll" ] << endl;
-}
-
-int main( int, char** )
-{
- TQString line = TQString();
- TQString currentGroup1 = TQString();
- TQString currentGroup2 = TQString();
- TQString type = TQString();
- TQString password = TQString();
- TQRegExp interesting_group( "^\\[box-(\\d+)\\]" );
- TQRegExp key_value( "^(\\w*)=(.*)$" );
- TQValueList<TQString> tobe_deleted;
- int numboxes = -1;
- bool isKey = false;
-
- TQTextStream in( stdin, IO_ReadOnly );
- TQTextStream out( stdout, IO_WriteOnly );
-
- in.setEncoding( TQTextStream::UnicodeUTF8 );
- out.setEncoding( TQTextStream::UnicodeUTF8 );
-
- TQMap<TQString,TQString> mapping1;
- TQValueList<TQString> mapping2;
- TQMap<TQString,TQString> to_printed;
-
- mapping1.insert( "caption", "name" );
- mapping1.insert( "onclick", "command" );
- mapping1.insert( "onnewmail", "newcommand" );
- mapping1.insert( "soundfile", "sound" );
- mapping1.insert( "passive_popup", "passivepopup" );
- mapping1.insert( "passive_data", "passivedata" );
- mapping1.insert( "reset", "reset" );
- mapping1.insert( "fgcolour", "normalfgcolour" );
- mapping1.insert( "bgcolour", "normalbgcolour" );
- mapping1.insert( "newmailfgcolour", "newfgcolour" );
- mapping1.insert( "newmailbgcolour", "newbgcolour" );
- mapping1.insert( "icon", "normalicon" );
- mapping1.insert( "newmailicon", "newicon" );
-
- mapping2.append( "file" );
- mapping2.append( "maildir" );
- mapping2.append( "host" );
- mapping2.append( "port" );
- mapping2.append( "user" );
- mapping2.append( "APOP" );
- mapping2.append( "mailbox" );
- mapping2.append( "group" );
- mapping2.append( "command" );
- mapping2.append( "protocol" );
- mapping2.append( "pass" );
- mapping2.append( "password" );
- mapping2.append( "resetcounter" );
- mapping2.append( "poll" );
-
- while( !in.atEnd() )
- {
- line = in.readLine();
-
- isKey = key_value.search( line ) >= 0;
-
- if( line.left( 1 ) == "[" )
- {
- if( !currentGroup1.isNull() )
- {
- out << currentGroup2 << endl;
- printToprint( out, to_printed, type );
- }
-
- currentGroup1 = TQString();
- }
-
- if( interesting_group.search( line ) >= 0 )
- {
- if( numboxes > -1 && interesting_group.cap( 1 ).toInt() < numboxes )
- {
- currentGroup1 = TQString( "[korn-%1]" ).arg( interesting_group.cap( 1 ) );
- currentGroup2 = TQString( "[korn-%1-0]" ).arg( interesting_group.cap( 1 ) );
- }
- tobe_deleted.append( line );
- continue;
- }
- else if( isKey && key_value.cap( 1 ) == "numboxes" )
- {
- numboxes = key_value.cap( 2 ).toInt();
- continue;
- }
- else if( currentGroup1.isNull() || !isKey )
- continue;
- if( mapping1.contains( key_value.cap( 1 ) ) )
- {
- out << currentGroup1 << endl;
- out << mapping1[ key_value.cap( 1 ) ] << "=" << key_value.cap( 2 ) << endl;
- if( key_value.cap( 1 ) == "caption" )
- {
- out << currentGroup2 << endl;
- out << "name=" << key_value.cap( 2 ) << endl;
- }
- }
- else if( mapping2.contains( key_value.cap( 1 ) ) )
- {
- to_printed.insert( key_value.cap( 1 ), key_value.cap( 2 ) );
- }
- else if( key_value.cap( 1 ) == "type" && key_value.cap( 2 ) != "kio" )
- {
- out << currentGroup2 << endl;
- if( key_value.cap( 2 ) == "imap4" )
- out << "protocol=imap" << endl;
- else
- out << "protocol=" << key_value.cap( 2 ) << endl;
- type = key_value.cap( 2 );
-
- }
- else if( key_value.cap( 1 ) == "type" && key_value.cap( 2 ) == "kio" )
- {
- type = "kio";
- }
- else if( key_value.cap( 1 ) == "displaystyle" )
- {
- out << currentGroup1 << endl;
- if( key_value.cap( 2 ) == "2" )
- {
- out << "hasnormalfgcolour=false" << endl;
- out << "hasnormalbgcolour=false" << endl;
- out << "hasnewfgcolour=false" << endl;
- out << "hasnewbgcolour=false" << endl;
- out << "hasnormalicon=true" << endl;
- out << "hasnormalanim=false" << endl;
- out << "hasnewicon=true" << endl;
- out << "hasnewanim=false" << endl;
- }
- else
- {
- out << "hasnormalfgcolour=true" << endl;
- out << "hasnormalbgcolour=true" << endl;
- out << "hasnewfgcolour=true" << endl;
- out << "hasnewbgcolour=true" << endl;
- out << "hasnormalicon=false" << endl;
- out << "hasnormalanim=false" << endl;
- out << "hasnewicon=false" << endl;
- out << "hasnewanim=false" << endl;
- }
- }
- }
-
- if( !currentGroup1.isNull() )
- {
- out << currentGroup2 << endl;
- printToprint( out, to_printed, type );
- }
-
- TQValueList<TQString>::Iterator it1 = tobe_deleted.begin();
- TQValueList<TQString>::Iterator it1_end = tobe_deleted.end();
-
- for( ; it1 != it1_end; ++it1 )
- out << "# DELETEGROUP " << *it1 << endl;
-
- return 0;
-}
-
diff --git a/korn/kconf_update/korn-3-4-config_change.upd b/korn/kconf_update/korn-3-4-config_change.upd
deleted file mode 100644
index 530304fad..000000000
--- a/korn/kconf_update/korn-3-4-config_change.upd
+++ /dev/null
@@ -1,3 +0,0 @@
-Id=korn_kde_3_4_config_change
-File=kornrc
-Script=korn-3-4-config_change
diff --git a/korn/kconf_update/korn-3-5-metadata-update.pl b/korn/kconf_update/korn-3-5-metadata-update.pl
deleted file mode 100644
index 95723c4ee..000000000
--- a/korn/kconf_update/korn-3-5-metadata-update.pl
+++ /dev/null
@@ -1,43 +0,0 @@
-my $input;
-my $group;
-my $auth = "";
-my $tls = "";
-my $metadata = "";
-
-while( $input = <STDIN> )
-{
- chop $input;
- if( $input =~ /^\[.*\]$/ )
- {
- if( $metadata )
- {
- print "[$group]\n";
- print "metadata=$metadata\n";
- $metadata="";
- }
-
- if( $input =~ /^\[(korn-(\d+)-\d+)\]$/ )
- {
- $group = $1;
- }
- else
- {
- $group = "";
- }
- $auth="";
- $tls="";
- }
-
- if( $input =~ /^auth\=(.*)/ )
- {
- $metadata=$tls ? "auth=$1,tls=$tls" : "auth=$1";
- $auth=$1;
- print "# DELETE [$group]auth\n";
- }
- elsif( $input =~ /^tls\=(.*)/ )
- {
- $metadata=$auth ? "auth=$auth,tls=$1" : "tls=$1";
- $tls=$1;
- print "# DELETE [$tls]tls\n";
- }
-}
diff --git a/korn/kconf_update/korn-3-5-ssl-update.pl b/korn/kconf_update/korn-3-5-ssl-update.pl
deleted file mode 100644
index b44ce10ff..000000000
--- a/korn/kconf_update/korn-3-5-ssl-update.pl
+++ /dev/null
@@ -1,39 +0,0 @@
-my $input;
-my $group;
-my $protocol;
-
-while( $input = <STDIN> )
-{
- chop $input;
- if( $input =~ /^\[.*\]$/ )
- {
- if( $input =~ /^\[(korn-(\d+)-\d+)\]$/ )
- {
- $group = $1;
- }
- else
- {
- $group = "";
- }
- }
-
- if( $input =~ /^protocol\=(.*)/ )
- {
- $protocol=$1;
- print "[$group]\n";
- if( $protocol eq "imaps" )
- {
- print "protocol=imap\n";
- print "ssl=true\n";
- }
- elsif( $protocol eq "pop3s" )
- {
- print "protocol=pop3\n";
- print "ssl=true\n";
- }
- else
- {
- print "ssl=false\n";
- }
- }
-}
diff --git a/korn/kconf_update/korn-3-5-update.upd b/korn/kconf_update/korn-3-5-update.upd
deleted file mode 100644
index d954d7826..000000000
--- a/korn/kconf_update/korn-3-5-update.upd
+++ /dev/null
@@ -1,10 +0,0 @@
-Id=korn-3-5-ssl-update
-File=kornrc
-Options=overwrite
-Script=korn-3-5-ssl-update.pl,perl
-
-Id=korn-3-5-metadata-update
-File=kornrc
-Options=overwrite
-Script=korn-3-5-metadata-update.pl,perl
-