diff options
| author | Mavridis Philippe <mavridisf@gmail.com> | 2024-08-09 14:50:19 +0300 |
|---|---|---|
| committer | Mavridis Philippe <mavridisf@gmail.com> | 2024-08-09 14:50:19 +0300 |
| commit | 1920d57b50b8fcd06d62c6592fa83b9417bd1cc6 (patch) | |
| tree | 70103b849989d0c43b902765a8a85110b560abaa /src | |
| parent | 2fbdf2c0982e3e2147774c2034c21aebb67f732d (diff) | |
| download | tdealternatives-1920d57b50b8fcd06d62c6592fa83b9417bd1cc6.tar.gz tdealternatives-1920d57b50b8fcd06d62c6592fa83b9417bd1cc6.zip | |
KDE3->TDE port
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/Makefile.am | 2 | ||||
| -rw-r--r-- | src/addalternatives.cpp | 4 | ||||
| -rw-r--r-- | src/addslaves.cpp | 2 | ||||
| -rw-r--r-- | src/altcontroller.cpp | 2 | ||||
| -rw-r--r-- | src/altcontroller.h | 4 | ||||
| -rw-r--r-- | src/altitemelement.cpp | 24 | ||||
| -rw-r--r-- | src/altitemelement.h | 12 | ||||
| -rw-r--r-- | src/kalternatives.cpp | 20 | ||||
| -rw-r--r-- | src/kalternatives.desktop | 26 | ||||
| -rw-r--r-- | src/kalternatives.h | 20 | ||||
| -rw-r--r-- | src/main.cpp | 22 | ||||
| -rw-r--r-- | src/mainwindow.ui | 8 | ||||
| -rw-r--r-- | src/treeitemelement.cpp | 2 | ||||
| -rw-r--r-- | src/treeitemelement.h | 4 |
14 files changed, 76 insertions, 76 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 765d616..bb80034 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 diff --git a/src/addalternatives.cpp b/src/addalternatives.cpp index 9c4544d..4ecda4a 100644 --- a/src/addalternatives.cpp +++ b/src/addalternatives.cpp @@ -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> diff --git a/src/addslaves.cpp b/src/addslaves.cpp index 12b47ba..aef6756 100644 --- a/src/addslaves.cpp +++ b/src/addslaves.cpp @@ -21,7 +21,7 @@ #include "addslaves.h" #include "addalternatives.h" -#include <klocale.h> +#include <tdelocale.h> #include <kstdguiitem.h> #include <kurlrequester.h> diff --git a/src/altcontroller.cpp b/src/altcontroller.cpp index f06ac8e..5588a9f 100644 --- a/src/altcontroller.cpp +++ b/src/altcontroller.cpp @@ -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; diff --git a/src/altcontroller.h b/src/altcontroller.h index 76baaf9..a140c3a 100644 --- a/src/altcontroller.h +++ b/src/altcontroller.h @@ -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;} }; diff --git a/src/altitemelement.cpp b/src/altitemelement.cpp index 58fa2e0..0e695f9 100644 --- a/src/altitemelement.cpp +++ b/src/altitemelement.cpp @@ -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); } diff --git a/src/altitemelement.h b/src/altitemelement.h index 2539114..dad1693 100644 --- a/src/altitemelement.h +++ b/src/altitemelement.h @@ -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_ diff --git a/src/kalternatives.cpp b/src/kalternatives.cpp index 72a260a..940fc57 100644 --- a/src/kalternatives.cpp +++ b/src/kalternatives.cpp @@ -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; diff --git a/src/kalternatives.desktop b/src/kalternatives.desktop index abbd53c..1a83fbb 100644 --- a/src/kalternatives.desktop +++ b/src/kalternatives.desktop @@ -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; diff --git a/src/kalternatives.h b/src/kalternatives.h index 32c50ad..e035f10 100644 --- a/src/kalternatives.h +++ b/src/kalternatives.h @@ -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(); diff --git a/src/main.cpp b/src/main.cpp index 860a2ba..03e1093 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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 diff --git a/src/mainwindow.ui b/src/mainwindow.ui index d1fa92b..a9d2e1e 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -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> diff --git a/src/treeitemelement.cpp b/src/treeitemelement.cpp index 0ef3ca6..4bc6d92 100644 --- a/src/treeitemelement.cpp +++ b/src/treeitemelement.cpp @@ -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()), diff --git a/src/treeitemelement.h b/src/treeitemelement.h index 49a436f..bc7affa 100644 --- a/src/treeitemelement.h +++ b/src/treeitemelement.h @@ -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; } |
