KDE3->TDE port

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
pull/1/head
Mavridis Philippe 11 months ago
parent 2fbdf2c098
commit 1920d57b50
No known key found for this signature in database
GPG Key ID: F8D2D7E2F989A494

@ -2,7 +2,7 @@
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
<!ENTITY kalternatives "<application>kalternatives 0&#46;10</application>">
<!ENTITY kappname "&kalternatives;"><!-- Do *not* replace kappname-->
<!ENTITY package "kde-module"><!-- kdebase, kdeadmin, etc -->
<!ENTITY package "kde-module"><!-- tdebase, tdeadmin, etc -->
<!ENTITY % addindex "IGNORE">
<!ENTITY % English "INCLUDE"><!-- change language only here -->
@ -488,8 +488,8 @@ application -->
<!--
List any special requirements for your application here. This should include:
.Libraries or other software that is not included in kdesupport,
kdelibs, or kdebase.
.Libraries or other software that is not included in tdesupport,
tdelibs, or tdebase.
.Hardware requirements like amount of RAM, disk space, graphics card
capabilities, screen resolution, special expansion cards, etc.
.Operating systems the app will run on. If your app is designed only for a

@ -9,7 +9,7 @@ kde_module_LTLIBRARIES = kcm_kalternatives.la
kcm_kalternatives_la_SOURCES = addslavesui.ui propertieswindow.ui addalternativesui.ui mainwindow.ui altcontroller.cpp kalternatives.cpp altparser.cpp altitemelement.cpp treeitemelement.cpp addslaves.cpp addalternatives.cpp
kcm_kalternatives_la_LIBADD = $(LIB_KDEUI) $(LIB_KIO)
kcm_kalternatives_la_LIBADD = $(LIB_TDEUI) $(LIB_TDEIO)
kcm_kalternatives_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined

@ -29,8 +29,8 @@
#include <tqregexp.h>
#include <tqstringlist.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <tdelocale.h>
#include <tdemessagebox.h>
#include <knuminput.h>
#include <kstdguiitem.h>
#include <kurlrequester.h>

@ -21,7 +21,7 @@
#include "addslaves.h"
#include "addalternatives.h"
#include <klocale.h>
#include <tdelocale.h>
#include <kstdguiitem.h>
#include <kurlrequester.h>

@ -33,7 +33,7 @@ AltController::~AltController()
}
void AltController::setBoutonOnOff(KListView *list, AltItemElement *altItem)
void AltController::setBoutonOnOff(TDEListView *list, AltItemElement *altItem)
{
TQListViewItemIterator it( list );
AltItemElement *alt;

@ -21,7 +21,7 @@
#ifndef _ALTCONTROLLER_H_
#define _ALTCONTROLLER_H_
#include <klistview.h>
#include <tdelistview.h>
#include <tqptrlist.h>
class AltItemElement;
@ -37,7 +37,7 @@ public:
AltController();
~AltController();
void setBoutonOnOff(KListView *list, AltItemElement *altItem);
void setBoutonOnOff(TDEListView *list, AltItemElement *altItem);
void addAltItem(AltItemElement *altItem) {m_altItemslist->append(altItem);}
AltItemList *getAltItemList() {return m_altItemslist;}
};

@ -24,11 +24,11 @@
#include "altparser.h"
#include <tqtimer.h>
#include <klocale.h>
#include <tdelocale.h>
#include <kdebug.h>
/******************************* AltItemElement ********************/
AltItemElement::AltItemElement(KListView *parent, Alternative *alternative)
AltItemElement::AltItemElement(TDEListView *parent, Alternative *alternative)
: TQCheckListItem(parent, "", TQCheckListItem::RadioButton),
m_alt(alternative),
m_parent(parent),
@ -58,22 +58,22 @@ void AltItemElement::searchDescription()
if (!exec.isEmpty())
{
KProcess *procdesc = new KProcess();
TDEProcess *procdesc = new TDEProcess();
*procdesc << "whatis";
*procdesc << exec;
connect(procdesc, SIGNAL(receivedStdout(KProcess *, char *, int)), this,
SLOT(slotGetDescription(KProcess *, char *, int)));
//connect(procdesc, SIGNAL( receivedStderr(KProcess *, char *, int) ), this,
// SLOT(slotGetDescription(KProcess *, char *, int)));
connect(procdesc, SIGNAL( processExited(KProcess *)), this,
SLOT(slotDescriptionTermined(KProcess *)));
procdesc->start(KProcess::NotifyOnExit,/*KProcess::Block,*/ KProcess::AllOutput);
connect(procdesc, SIGNAL(receivedStdout(TDEProcess *, char *, int)), this,
SLOT(slotGetDescription(TDEProcess *, char *, int)));
//connect(procdesc, SIGNAL( receivedStderr(TDEProcess *, char *, int) ), this,
// SLOT(slotGetDescription(TDEProcess *, char *, int)));
connect(procdesc, SIGNAL( processExited(TDEProcess *)), this,
SLOT(slotDescriptionTermined(TDEProcess *)));
procdesc->start(TDEProcess::NotifyOnExit,/*TDEProcess::Block,*/ TDEProcess::AllOutput);
}
}
void AltItemElement::slotDescriptionTermined(KProcess *proc)
void AltItemElement::slotDescriptionTermined(TDEProcess *proc)
{
if (!proc->exitStatus())
{
@ -108,7 +108,7 @@ void AltItemElement::slotDescriptionTermined(KProcess *proc)
setText( 3, m_desc);
}
void AltItemElement::slotGetDescription(KProcess *, char *buffer, int buflen)
void AltItemElement::slotGetDescription(TDEProcess *, char *buffer, int buflen)
{
m_desc += TQString::fromLatin1(buffer, buflen);
}

@ -22,7 +22,7 @@
#define _ALTITEMELEMENT_H_
#include <tqlistview.h>
#include <klistview.h>
#include <tdelistview.h>
#include <tqstring.h>
#include <kprocess.h>
@ -34,25 +34,25 @@ class AltItemElement : public TQObject, public TQCheckListItem
Q_OBJECT
Alternative *m_alt;
KListView *m_parent;
TDEListView *m_parent;
bool m_bisBroken;
TQString m_path;
TQString m_desc;
public:
AltItemElement(KListView *parent, Alternative *alternative );
AltItemElement(TDEListView *parent, Alternative *alternative );
~AltItemElement();
bool isBroken() const { return m_bisBroken; }
KListView *getParent() const { return m_parent; }
TDEListView *getParent() const { return m_parent; }
Alternative *getAlternative() { return m_alt; }
TQString getPath() const {return m_path; }
TQString getDescription() const {return m_desc;}
void searchDescription();
private slots:
void slotDescriptionTermined(KProcess *);
void slotGetDescription(KProcess *proc, char *buffer, int buflen);
void slotDescriptionTermined(TDEProcess *);
void slotGetDescription(TDEProcess *proc, char *buffer, int buflen);
};
#endif //_ALTITEMELEMENT_H_

@ -32,31 +32,31 @@
#include <tqtimer.h>
#include <kmessagebox.h>
#include <kaboutdialog.h>
#include <tdemessagebox.h>
#include <tdeaboutdialog.h>
#include <ktextedit.h>
#include <kdebug.h>
#include <klocale.h>
#include <tdelocale.h>
#include <tqlayout.h>
#include <tqfile.h>
#include <tqtextstream.h>
#include <kgenericfactory.h>
#include <kstdguiitem.h>
#include <kdeversion.h>
#include <tdeversion.h>
typedef KGenericFactory<Kalternatives, TQWidget> KalternativesFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kalternatives, KalternativesFactory("kcmkalternatives"))
extern "C"
{
KCModule *create_kalternatives(TQWidget *parent, const char *name)
TDECModule *create_kalternatives(TQWidget *parent, const char *name)
{
return new Kalternatives(parent, name);
};
}
Kalternatives::Kalternatives(TQWidget *parent, const char *name, const TQStringList&)
:KCModule(/*KalternativesFactory::instance(), */parent, name), myAboutData(0)
:TDECModule(/*KalternativesFactory::instance(), */parent, name), myAboutData(0)
{
setUseRootOnlyMsg(false);
@ -65,7 +65,7 @@ Kalternatives::Kalternatives(TQWidget *parent, const char *name, const TQStringL
if (user == 0)
{
m_bisRoot = true;
setButtons(KCModule::Help|KCModule::Apply);
setButtons(TDECModule::Help|TDECModule::Apply);
}
else
{
@ -124,9 +124,9 @@ m_mgr = new AltFilesManager("/var/lib/rpm/alternatives");
m_statusCombo->setEnabled(false);
}
myAboutData = new KAboutData("kcmkalternatives", I18N_NOOP("Kalternatives"),
myAboutData = new TDEAboutData("kcmkalternatives", I18N_NOOP("Kalternatives"),
KALT_VERSION, I18N_NOOP("KDE Mandrake/Debian alternatives-system manager"),
KAboutData::License_GPL, I18N_NOOP("(c) 2004 Juanjo Alvarez Martinez\n"
TDEAboutData::License_GPL, I18N_NOOP("(c) 2004 Juanjo Alvarez Martinez\n"
"(c) 2004 Mario Bensi"));
myAboutData->addAuthor("Juanjo Alvarez Martinez", 0, "juanjo@juanjoalvarez.net",
@ -186,7 +186,7 @@ void Kalternatives::load()
void Kalternatives::clearList(KListView* list)
void Kalternatives::clearList(TDEListView* list)
{
TQListViewItemIterator it( list );
TQListViewItem *tmp;

@ -1,14 +1,14 @@
[Desktop Entry]
Encoding=UTF-8
Exec=kcmshell kalternatives
Icon=misc
Exec=tdecmshell kalternatives
Icon=application-vnd.tde.misc
Type=Application
X-KDE-ModuleType=Library
X-KDE-Library=kalternatives
X-KDE-RootOnly=true
X-KDE-HasReadOnlyMode=true
X-KDE-ParentApp=kcontrol
X-TDE-ModuleType=Library
X-TDE-Library=kalternatives
X-TDE-RootOnly=true
X-TDE-HasReadOnlyMode=true
X-TDE-ParentApp=kcontrol
Comment=Kalternatives - KDE Mandrake/Debian alternatives-system manager
Comment[da]=Alternative systemhåndteringer, Kalternatives for KDE Mandrake/Debian
@ -23,15 +23,15 @@ Comment[sv]=Kalternativ - KDE:s Mandrake och Debian alternativ systemhantering
Comment[ta]=Kalternatives - கேடியி மாண்ட்ரேக்/டெபியன் மாற்றுகள் அமைப்பு மேலாளர்
Comment[tr]=Kseçenekleri - KDE Mandarake/Debian seçenekleri sistem yöneticisi
Comment[xx]=xxKalternatives - KDE Mandrake/Debian alternatives-system managerxx
Keywords=Kalternatives,kalternatives
Keywords[fr]=Kalternatives,kalternatives,alternatives
Keywords[sv]=Kalternativ,kalternativ
Keywords[tr]=Kseçenekleri,kseçenekleri
Keywords[xx]=xxKalternatives,kalternativesxx
Keywords=Kalternatives;kalternatives
Keywords[fr]=Kalternatives;kalternatives;alternatives
Keywords[sv]=Kalternativ;kalternativ
Keywords[tr]=Kseçenekleri;kseçenekleri
Keywords[xx]=xxKalternatives;kalternativesxx
Name=Kalternatives
Name[ta]=Kமாற்றுகள்
Name[tr]=Kseçenekleri
Name[xx]=xxKalternativesxx
Categories=Qt;KDE;X-KDE-settings-system;
Categories=Qt;TDE;X-TDE-settings-system;

@ -28,44 +28,44 @@
//#include <config.h>
//#endif
#include <klistview.h>
#include <tdelistview.h>
#include <kpushbutton.h>
#include <kcombobox.h>
#include <tqwidget.h>
#include <tqlabel.h>
#include <tqcheckbox.h>
#include <kcmodule.h>
#include <kaboutdata.h>
#include <tdecmodule.h>
#include <tdeaboutdata.h>
#define KALT_VERSION "0.12"
class AltFilesManager;
class Kalternatives : public KCModule
class Kalternatives : public TDECModule
{
Q_OBJECT
bool m_bisRoot;
AltFilesManager *m_mgr;
KListView* m_optionsList;
KListView* m_altList;
TDEListView* m_optionsList;
TDEListView* m_altList;
KComboBox* m_statusCombo;
TQLabel* m_altTilte;
TQCheckBox* m_hideAlt;
KAboutData *myAboutData;
TDEAboutData *myAboutData;
void clearList(KListView* list);
void clearList(TDEListView* list);
public:
Kalternatives(TQWidget *parent=0, const char *name=0, const TQStringList& = TQStringList() );
virtual ~Kalternatives();
KListView *optionsList() const {return m_optionsList;}
TDEListView *optionsList() const {return m_optionsList;}
bool isBisRoot() const {return m_bisRoot;}
virtual void load();
virtual void save();
virtual TQString quickHelp() const;
virtual const KAboutData *aboutData()const { return myAboutData; };
virtual const TDEAboutData *aboutData()const { return myAboutData; };
public slots:
void configChanged();

@ -24,10 +24,10 @@
#include "main.h"
#include "kalternatives.h"
#include <kuniqueapplication.h>
#include <kaboutdata.h>
#include <kcmdlineargs.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <tdeaboutdata.h>
#include <tdecmdlineargs.h>
#include <tdelocale.h>
#include <tdemessagebox.h>
KUniqueApplication *app = 0; // Global
@ -36,20 +36,20 @@ static const char description[] =
static const char version[] = "0.10";
static KCmdLineOptions options[] =
static TDECmdLineOptions options[] =
{
// { "+[URL]", I18N_NOOP( "Document to open." ), 0 },
KCmdLineLastOption
TDECmdLineLastOption
};
int main(int argc, char **argv)
{
KAboutData about("kalternatives", I18N_NOOP("kalternatives"), version, description,
KAboutData::License_GPL, "(C) 2004 Juanjo Alvarez Martinez and Mario Bensi", 0, 0, "juanjux@yahoo.es, nef@ipsquad.net");
TDEAboutData about("kalternatives", I18N_NOOP("kalternatives"), version, description,
TDEAboutData::License_GPL, "(C) 2004 Juanjo Alvarez Martinez and Mario Bensi", 0, 0, "juanjux@yahoo.es, nef@ipsquad.net");
about.addAuthor( "Juanjo Alvarez Martinez and Mario Bensi", 0, "juanjux@yahoo.es, nef@ipsquad.net" );
KCmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions( options );
KUniqueApplication rapp;
app = &rapp;
Kalternatives *mainWin = 0;
@ -61,7 +61,7 @@ int main(int argc, char **argv)
else
{
// no session.. just start up normally
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
/// @todo do something with the command line args here

@ -48,7 +48,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="KListView">
<widget class="TDEListView">
<column>
<property name="text">
<string>Alternatives</string>
@ -252,7 +252,7 @@
</spacer>
</hbox>
</widget>
<widget class="KListView">
<widget class="TDEListView">
<column>
<property name="text">
<string>Choice</string>
@ -382,9 +382,9 @@
</customwidgets>
<layoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klistview.h</includehint>
<includehint>tdelistview.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>klistview.h</includehint>
<includehint>tdelistview.h</includehint>
<includehint>kpushbutton.h</includehint>
<includehint>kpushbutton.h</includehint>
<includehint>kpushbutton.h</includehint>

@ -27,7 +27,7 @@
#include <iostream>
using namespace std;
TreeItemElement::TreeItemElement(KListView *parent, Item *itemarg, AltController *altControl )
TreeItemElement::TreeItemElement(TDEListView *parent, Item *itemarg, AltController *altControl )
: TQListViewItem(parent, itemarg->getName()),
m_item(itemarg),
m_name(itemarg->getName()),

@ -24,7 +24,7 @@
#include <tqstring.h>
#include <tqptrlist.h>
#include <tqlistview.h>
#include <klistview.h>
#include <tdelistview.h>
class AltController;
class Item;
@ -39,7 +39,7 @@ class TreeItemElement : public TQListViewItem
AltController *m_altControl;
public:
TreeItemElement(KListView *parent, Item *itemarg, AltController *altControl);
TreeItemElement(TDEListView *parent, Item *itemarg, AltController *altControl);
~TreeItemElement();
TQString getName() const { return m_name; }

Loading…
Cancel
Save