summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gvcore/externaltooldialog.cpp24
-rw-r--r--src/gvcore/externaltoolmanager.cpp34
-rw-r--r--src/gvcore/externaltoolmanager.h8
-rw-r--r--src/gvcore/filedetailview.cpp4
-rw-r--r--src/gvcore/mngformattype.cpp20
-rw-r--r--src/gvcore/pngformattype.cpp14
-rw-r--r--src/gvcore/xpm.cpp12
-rw-r--r--src/imageutils/jpegint.h20
8 files changed, 68 insertions, 68 deletions
diff --git a/src/gvcore/externaltooldialog.cpp b/src/gvcore/externaltooldialog.cpp
index 5ccc277..e0aadb4 100644
--- a/src/gvcore/externaltooldialog.cpp
+++ b/src/gvcore/externaltooldialog.cpp
@@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// KDE
#include <kdebug.h>
-#include <kdesktopfile.h>
+#include <tdedesktopfile.h>
#include <kicondialog.h>
#include <kiconloader.h>
#include <kimageio.h>
@@ -53,22 +53,22 @@ public:
ToolListViewItem(TDEListView* parent, const TQString& label)
: TDEListViewItem(parent, label), mDesktopFile(0L) {}
- void setDesktopFile(KDesktopFile* df) {
+ void setDesktopFile(TDEDesktopFile* df) {
mDesktopFile=df;
}
- KDesktopFile* desktopFile() const {
+ TDEDesktopFile* desktopFile() const {
return mDesktopFile;
}
private:
- KDesktopFile* mDesktopFile;
+ TDEDesktopFile* mDesktopFile;
};
struct ExternalToolDialogPrivate {
ExternalToolDialogBase* mContent;
- TQPtrList<KDesktopFile> mDeletedTools;
+ TQPtrList<TDEDesktopFile> mDeletedTools;
ToolListViewItem* mSelectedItem;
@@ -88,9 +88,9 @@ struct ExternalToolDialogPrivate {
void fillToolListView() {
- TQDict<KDesktopFile> desktopFiles=ExternalToolManager::instance()->desktopFiles();
+ TQDict<TDEDesktopFile> desktopFiles=ExternalToolManager::instance()->desktopFiles();
- TQDictIterator<KDesktopFile> it(desktopFiles);
+ TQDictIterator<TDEDesktopFile> it(desktopFiles);
for (; it.current(); ++it) {
ToolListViewItem* item=new ToolListViewItem(mContent->mToolListView, it.current()->readName());
item->setPixmap(0, SmallIcon(it.current()->readIcon()) );
@@ -101,7 +101,7 @@ struct ExternalToolDialogPrivate {
}
- void writeServiceTypes(KDesktopFile* desktopFile) {
+ void writeServiceTypes(TDEDesktopFile* desktopFile) {
TQButton* button=mContent->mFileAssociationGroup->selected();
if (!button) {
desktopFile->writeEntry("X-TDE-ServiceTypes", "*");
@@ -149,7 +149,7 @@ struct ExternalToolDialogPrivate {
}
// Save data
- KDesktopFile* desktopFile=mSelectedItem->desktopFile();
+ TDEDesktopFile* desktopFile=mSelectedItem->desktopFile();
if (desktopFile) {
if (desktopFile->isReadOnly()) {
desktopFile=ExternalToolManager::instance()->editSystemDesktopFile(desktopFile);
@@ -207,7 +207,7 @@ struct ExternalToolDialogPrivate {
mContent->mDetails->setEnabled(mSelectedItem!=0);
if (mSelectedItem) {
- KDesktopFile* desktopFile=mSelectedItem->desktopFile();
+ TDEDesktopFile* desktopFile=mSelectedItem->desktopFile();
if (desktopFile) {
mContent->mName->setText(desktopFile->readName());
mContent->mCommand->setURL(desktopFile->readEntry("Exec"));
@@ -226,7 +226,7 @@ struct ExternalToolDialogPrivate {
bool apply() {
if (!saveChanges()) return false;
- TQPtrListIterator<KDesktopFile> it(mDeletedTools);
+ TQPtrListIterator<TDEDesktopFile> it(mDeletedTools);
for(; it.current(); ++it) {
ExternalToolManager::instance()->hideDesktopFile(it.current());
}
@@ -332,7 +332,7 @@ void ExternalToolDialog::deleteTool() {
ToolListViewItem* item=static_cast<ToolListViewItem*>(view->selectedItem());
if (!item) return;
- KDesktopFile* desktopFile=item->desktopFile();
+ TDEDesktopFile* desktopFile=item->desktopFile();
delete item;
d->mDeletedTools.append(desktopFile);
d->mSelectedItem=0L;
diff --git a/src/gvcore/externaltoolmanager.cpp b/src/gvcore/externaltoolmanager.cpp
index 564604a..a76c696 100644
--- a/src/gvcore/externaltoolmanager.cpp
+++ b/src/gvcore/externaltoolmanager.cpp
@@ -25,7 +25,7 @@ Copyright 2000-2004 Aur�lien G�teau
// KDE
#include <kdebug.h>
-#include <kdesktopfile.h>
+#include <tdedesktopfile.h>
#include <tdeglobal.h>
#include <kservice.h>
#include <tdestandarddirs.h>
@@ -80,7 +80,7 @@ inline bool isSubSetOf(const TQStringList& subSet, const TQStringList& set) {
struct ExternalToolManagerPrivate {
- TQDict<KDesktopFile> mDesktopFiles;
+ TQDict<TDEDesktopFile> mDesktopFiles;
TQPtrList<KService> mServices;
TQString mUserToolDir;
@@ -125,12 +125,12 @@ struct ExternalToolManagerPrivate {
// Helper function for ctor
-void loadDesktopFiles(TQDict<KDesktopFile>& dict, const TQString& dirString) {
+void loadDesktopFiles(TQDict<TDEDesktopFile>& dict, const TQString& dirString) {
TQDir dir(dirString);
TQStringList list=dir.entryList("*.desktop");
TQStringList::ConstIterator it=list.begin();
for (; it!=list.end(); ++it) {
- KDesktopFile* df=new KDesktopFile( dir.filePath(*it) );
+ TDEDesktopFile* df=new TDEDesktopFile( dir.filePath(*it) );
dict.insert(*it, df);
}
}
@@ -154,7 +154,7 @@ ExternalToolManager::ExternalToolManager() {
LOG("dirs:" << dirs.join(","));
// Loading desktop files
- TQDict<KDesktopFile> systemDesktopFiles;
+ TQDict<TDEDesktopFile> systemDesktopFiles;
TQStringList::ConstIterator it;
for (it=dirs.begin(); it!=dirs.end(); ++it) {
if (addSlash(*it)==d->mUserToolDir) {
@@ -164,17 +164,17 @@ ExternalToolManager::ExternalToolManager() {
LOG("loading system desktop files from " << *it);
loadDesktopFiles(systemDesktopFiles, *it);
}
- TQDict<KDesktopFile> userDesktopFiles;
+ TQDict<TDEDesktopFile> userDesktopFiles;
loadDesktopFiles(userDesktopFiles, d->mUserToolDir);
- // Merge system and user desktop files into our KDesktopFile dictionary
+ // Merge system and user desktop files into our TDEDesktopFile dictionary
d->mDesktopFiles=systemDesktopFiles;
d->mDesktopFiles.setAutoDelete(true);
- TQDictIterator<KDesktopFile> itDict(userDesktopFiles);
+ TQDictIterator<TDEDesktopFile> itDict(userDesktopFiles);
for (; itDict.current(); ++itDict) {
TQString name=itDict.currentKey();
- KDesktopFile* df=itDict.current();
+ TDEDesktopFile* df=itDict.current();
if (d->mDesktopFiles.find(name)) {
d->mDesktopFiles.remove(name);
}
@@ -203,9 +203,9 @@ ExternalToolManager* ExternalToolManager::instance() {
void ExternalToolManager::updateServices() {
d->mServices.clear();
- TQDictIterator<KDesktopFile> it(d->mDesktopFiles);
+ TQDictIterator<TDEDesktopFile> it(d->mDesktopFiles);
for (; it.current(); ++it) {
- KDesktopFile* desktopFile=it.current();
+ TDEDesktopFile* desktopFile=it.current();
// If sync() is not called, KService does not read up to date content
desktopFile->sync();
KService* service=new KService(desktopFile);
@@ -214,19 +214,19 @@ void ExternalToolManager::updateServices() {
}
-TQDict<KDesktopFile>& ExternalToolManager::desktopFiles() const {
+TQDict<TDEDesktopFile>& ExternalToolManager::desktopFiles() const {
return d->mDesktopFiles;
}
-void ExternalToolManager::hideDesktopFile(KDesktopFile* desktopFile) {
+void ExternalToolManager::hideDesktopFile(TDEDesktopFile* desktopFile) {
TQFileInfo fi(desktopFile->fileName());
TQString name=TQString("%1.desktop").arg( fi.baseName(true) );
d->mDesktopFiles.take(name);
if (desktopFile->isReadOnly()) {
delete desktopFile;
- desktopFile=new KDesktopFile(d->mUserToolDir + "/" + name, false);
+ desktopFile=new TDEDesktopFile(d->mUserToolDir + "/" + name, false);
}
desktopFile->writeEntry("Hidden", true);
desktopFile->sync();
@@ -234,7 +234,7 @@ void ExternalToolManager::hideDesktopFile(KDesktopFile* desktopFile) {
}
-KDesktopFile* ExternalToolManager::editSystemDesktopFile(const KDesktopFile* desktopFile) {
+TDEDesktopFile* ExternalToolManager::editSystemDesktopFile(const TDEDesktopFile* desktopFile) {
Q_ASSERT(desktopFile);
TQFileInfo fi(desktopFile->fileName());
@@ -245,9 +245,9 @@ KDesktopFile* ExternalToolManager::editSystemDesktopFile(const KDesktopFile* des
}
-KDesktopFile* ExternalToolManager::createUserDesktopFile(const TQString& name) {
+TDEDesktopFile* ExternalToolManager::createUserDesktopFile(const TQString& name) {
Q_ASSERT(!name.isEmpty());
- KDesktopFile* desktopFile=new KDesktopFile(
+ TDEDesktopFile* desktopFile=new TDEDesktopFile(
d->mUserToolDir + "/" + name + ".desktop", false);
d->mDesktopFiles.insert(TQString("%1.desktop").arg(name), desktopFile);
diff --git a/src/gvcore/externaltoolmanager.h b/src/gvcore/externaltoolmanager.h
index 82734dd..ad5a2f9 100644
--- a/src/gvcore/externaltoolmanager.h
+++ b/src/gvcore/externaltoolmanager.h
@@ -45,15 +45,15 @@ public:
ExternalToolContext* createContext(TQObject* parent, const KURL&);
static ExternalToolManager* instance();
- TQDict<KDesktopFile>& desktopFiles() const;
+ TQDict<TDEDesktopFile>& desktopFiles() const;
- void hideDesktopFile(KDesktopFile*);
+ void hideDesktopFile(TDEDesktopFile*);
// Create a new desktop file
- KDesktopFile* createUserDesktopFile(const TQString& name);
+ TDEDesktopFile* createUserDesktopFile(const TQString& name);
// Create a desktop file based on a existing (system) desktop file
- KDesktopFile* editSystemDesktopFile(const KDesktopFile* desktopFile);
+ TDEDesktopFile* editSystemDesktopFile(const TDEDesktopFile* desktopFile);
void updateServices();
private:
diff --git a/src/gvcore/filedetailview.cpp b/src/gvcore/filedetailview.cpp
index b3ff35b..a8e2679 100644
--- a/src/gvcore/filedetailview.cpp
+++ b/src/gvcore/filedetailview.cpp
@@ -84,8 +84,8 @@ FileDetailView::FileDetailView(TQWidget *parent, const char *name)
addColumn( i18n( "Permissions" ) );
addColumn( i18n( "Owner" ) );
addColumn( i18n( "Group" ) );
- setShowSortIndicator( TRUE );
- setAllColumnsShowFocus( TRUE );
+ setShowSortIndicator( true );
+ setAllColumnsShowFocus( true );
connect( header(), TQ_SIGNAL( sectionClicked(int)),
TQ_SLOT(slotSortingChanged(int) ));
diff --git a/src/gvcore/mngformattype.cpp b/src/gvcore/mngformattype.cpp
index b3b37a5..0a6a9a7 100644
--- a/src/gvcore/mngformattype.cpp
+++ b/src/gvcore/mngformattype.cpp
@@ -105,13 +105,13 @@ public:
// ### We should figure out how many loops an MNG has, but for now always assume infinite.
if (consumer)
consumer->setLooping(0);
- return TRUE;
+ return true;
}
bool closestream( )
{
if (consumer)
consumer->end();
- return TRUE;
+ return true;
}
bool readdata( mng_ptr pBuf, mng_uint32 iBuflen, mng_uint32p pRead )
{
@@ -125,7 +125,7 @@ public:
// enough in buffer
memcpy(pBuf, buffer+ubuffer, iBuflen);
ubuffer += iBuflen;
- return TRUE;
+ return true;
}
if ( n ) {
// consume buffer
@@ -140,7 +140,7 @@ public:
data += iBuflen;
ndata -= iBuflen;
}
- return TRUE;
+ return true;
}
bool errorproc( mng_int32 iErrorcode,
mng_int8 /*iSeverity*/,
@@ -157,18 +157,18 @@ public:
(iChunkname>>8)&0xff,
(iChunkname>>0)&0xff,
iExtra1,iExtra2);
- return TRUE;
+ return true;
}
bool processheader( mng_uint32 iWidth, mng_uint32 iHeight )
{
image->create(iWidth,iHeight,32);
- image->setAlphaBuffer(TRUE);
+ image->setAlphaBuffer(true);
memset(image->bits(),0,iWidth*iHeight*4);
consumer->setSize(iWidth,iHeight);
mng_set_canvasstyle(handle,
TQImage::systemByteOrder() == TQImage::LittleEndian
? MNG_CANVAS_BGRA8 : MNG_CANVAS_ARGB8 );
- return TRUE;
+ return true;
}
mng_ptr getcanvasline( mng_uint32 iLinenr )
{
@@ -193,7 +193,7 @@ public:
state = Time;
losingtimer.start();
losttime -= iMsecs;
- return TRUE;
+ return true;
}
private:
@@ -490,9 +490,9 @@ void gvCleanupMngIO()
void gvInitMngIO()
{
- static bool done = FALSE;
+ static bool done = false;
if ( !done ) {
- done = TRUE;
+ done = true;
#ifndef TQT_NO_ASYNC_IMAGE_IO
globalMngFormatTypeObject = new MNGFormatType;
tqAddPostRoutine( gvCleanupMngIO );
diff --git a/src/gvcore/pngformattype.cpp b/src/gvcore/pngformattype.cpp
index 96273b2..2e03c63 100644
--- a/src/gvcore/pngformattype.cpp
+++ b/src/gvcore/pngformattype.cpp
@@ -225,7 +225,7 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr )
if (!image.create(width, height, 32))
return;
- image.setAlphaBuffer(TRUE);
+ image.setAlphaBuffer(true);
if (TQImage::systemByteOrder() == TQImage::BigEndian)
png_set_swap_alpha(png_ptr);
@@ -255,7 +255,7 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr )
const int g = info_ptr->trans_values.gray;
#endif
if (g < ncols) {
- image.setAlphaBuffer(TRUE);
+ image.setAlphaBuffer(true);
image.setColor(g, image.color(g) & TQT_RGB_MASK);
}
}
@@ -283,7 +283,7 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr )
int num_trans;
png_color_16p trans_color;
png_get_tRNS(png_ptr, info_ptr, &trans_alpha, &num_trans, &trans_color);
- image.setAlphaBuffer( TRUE );
+ image.setAlphaBuffer( true );
while ( i < num_trans ) {
image.setColor(i, tqRgba(
palette[i].red,
@@ -334,7 +334,7 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr )
PNG_FILLER_BEFORE : PNG_FILLER_AFTER);
// We want 4 bytes, but it isn't an alpha channel
} else {
- image.setAlphaBuffer(TRUE);
+ image.setAlphaBuffer(true);
}
if ( TQImage::systemByteOrder() == TQImage::BigEndian ) {
@@ -515,14 +515,14 @@ void PNGFormat::end(png_structp png, png_infop info)
static bool skip(png_uint_32& max, png_bytep& data)
{
while (*data) {
- if ( !max ) return FALSE;
+ if ( !max ) return false;
max--;
data++;
}
- if ( !max ) return FALSE;
+ if ( !max ) return false;
max--;
data++; // skip to after NUL
- return TRUE;
+ return true;
}
#endif
*/
diff --git a/src/gvcore/xpm.cpp b/src/gvcore/xpm.cpp
index c398540..b499919 100644
--- a/src/gvcore/xpm.cpp
+++ b/src/gvcore/xpm.cpp
@@ -92,14 +92,14 @@ static TQString fbname( const TQString &fileName ) // get file basename (sort of
// Skip until ", read until the next ", return the rest in *buf
-// Returns FALSE on error, TRUE on success
+// Returns false on error, true on success
static bool read_xpm_string( TQCString &buf, TQIODevice *d,
const char * const *source, int &index )
{
if ( source ) {
buf = source[index++];
- return TRUE;
+ return true;
}
if ( buf.size() < 69 ) //# just an approximation
@@ -110,7 +110,7 @@ static bool read_xpm_string( TQCString &buf, TQIODevice *d,
int i;
while ( (c=d->getch()) != EOF && c != '"' ) { }
if ( c == EOF ) {
- return FALSE;
+ return false;
}
i = 0;
while ( (c=d->getch()) != EOF && c != '"' ) {
@@ -119,13 +119,13 @@ static bool read_xpm_string( TQCString &buf, TQIODevice *d,
buf[i++] = c;
}
if ( c == EOF ) {
- return FALSE;
+ return false;
}
if ( i == (int)buf.size() ) // always use a 0 terminator
buf.resize( i+1 );
buf[i] = '\0';
- return TRUE;
+ return true;
}
@@ -217,7 +217,7 @@ static void read_xpm_image_or_array( TQImageIO * iio, const char * const * sourc
buf.truncate(end);
buf = buf.stripWhiteSpace();
if ( buf == "none" ) {
- image.setAlphaBuffer( TRUE );
+ image.setAlphaBuffer( true );
int transparentColor = currentColor;
if ( image.depth() == 8 ) {
image.setColor( transparentColor,
diff --git a/src/imageutils/jpegint.h b/src/imageutils/jpegint.h
index 21a0146..e32a833 100644
--- a/src/imageutils/jpegint.h
+++ b/src/imageutils/jpegint.h
@@ -51,8 +51,8 @@ struct jpeg_comp_master {
JMETHOD(void, finish_pass, (j_compress_ptr cinfo));
/* State variables made visible to other modules */
- boolean call_pass_startup; /* True if pass_startup must be called */
- boolean is_last_pass; /* True during last pass */
+ boolean call_pass_startup; /* TRUE if pass_startup must be called */
+ boolean is_last_pass; /* TRUE during last pass */
};
/* Main buffer control (downsampled-data buffer) */
@@ -144,7 +144,7 @@ struct jpeg_decomp_master {
JMETHOD(void, finish_output_pass, (j_decompress_ptr cinfo));
/* State variables made visible to other modules */
- boolean is_dummy_pass; /* True during 1st pass for 2-pass quant */
+ boolean is_dummy_pass; /* TRUE during 1st pass for 2-pass quant */
};
/* Input control module */
@@ -155,8 +155,8 @@ struct jpeg_input_controller {
JMETHOD(void, finish_input_pass, (j_decompress_ptr cinfo));
/* State variables made visible to other modules */
- boolean has_multiple_scans; /* True if file has multiple scans */
- boolean eoi_reached; /* True when EOI has been consumed */
+ boolean has_multiple_scans; /* TRUE if file has multiple scans */
+ boolean eoi_reached; /* TRUE when EOI has been consumed */
};
/* Main buffer control (downsampled-data buffer) */
@@ -460,8 +460,8 @@ struct jpeg_comp_master {
JMETHOD(void, finish_pass, (j_compress_ptr cinfo));
/* State variables made visible to other modules */
- boolean call_pass_startup; /* True if pass_startup must be called */
- boolean is_last_pass; /* True during last pass */
+ boolean call_pass_startup; /* TRUE if pass_startup must be called */
+ boolean is_last_pass; /* TRUE during last pass */
};
/* Main buffer control (downsampled-data buffer) */
@@ -551,7 +551,7 @@ struct jpeg_decomp_master {
JMETHOD(void, finish_output_pass, (j_decompress_ptr cinfo));
/* State variables made visible to other modules */
- boolean is_dummy_pass; /* True during 1st pass for 2-pass quant */
+ boolean is_dummy_pass; /* TRUE during 1st pass for 2-pass quant */
};
/* Input control module */
@@ -562,8 +562,8 @@ struct jpeg_input_controller {
JMETHOD(void, finish_input_pass, (j_decompress_ptr cinfo));
/* State variables made visible to other modules */
- boolean has_multiple_scans; /* True if file has multiple scans */
- boolean eoi_reached; /* True when EOI has been consumed */
+ boolean has_multiple_scans; /* TRUE if file has multiple scans */
+ boolean eoi_reached; /* TRUE when EOI has been consumed */
};
/* Main buffer control (downsampled-data buffer) */