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" [ <!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 kalternatives "<application>kalternatives 0&#46;10</application>">
<!ENTITY kappname "&kalternatives;"><!-- Do *not* replace kappname--> <!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 % addindex "IGNORE">
<!ENTITY % English "INCLUDE"><!-- change language only here --> <!ENTITY % English "INCLUDE"><!-- change language only here -->
@ -488,8 +488,8 @@ application -->
<!-- <!--
List any special requirements for your application here. This should include: List any special requirements for your application here. This should include:
.Libraries or other software that is not included in kdesupport, .Libraries or other software that is not included in tdesupport,
kdelibs, or kdebase. tdelibs, or tdebase.
.Hardware requirements like amount of RAM, disk space, graphics card .Hardware requirements like amount of RAM, disk space, graphics card
capabilities, screen resolution, special expansion cards, etc. capabilities, screen resolution, special expansion cards, etc.
.Operating systems the app will run on. If your app is designed only for a .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_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 kcm_kalternatives_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined

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

@ -21,7 +21,7 @@
#include "addslaves.h" #include "addslaves.h"
#include "addalternatives.h" #include "addalternatives.h"
#include <klocale.h> #include <tdelocale.h>
#include <kstdguiitem.h> #include <kstdguiitem.h>
#include <kurlrequester.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 ); TQListViewItemIterator it( list );
AltItemElement *alt; AltItemElement *alt;

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save