Rename KStandard for enhanced compatibility with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent ac666ecfcc
commit 905e326a1d

@ -171,7 +171,7 @@ void ConfigPlayer::chooseImage()
void ConfigPlayer::setImage() void ConfigPlayer::setImage()
{ {
TQString filename = locate("data", "atlantik/themes/default/tokens/" + m_playerImage); TQString filename = locate("data", "atlantik/themes/default/tokens/" + m_playerImage);
if (KStandardDirs::exists(filename)) if (TDEStandardDirs::exists(filename))
m_playerIcon->setPixmap( TQPixmap(filename) ); m_playerIcon->setPixmap( TQPixmap(filename) );
} }

@ -160,7 +160,7 @@ void PortfolioView::loadIcon()
if (!m_imageName.isEmpty()) if (!m_imageName.isEmpty())
{ {
TQString filename = locate("data", "atlantik/themes/default/tokens/" + m_imageName); TQString filename = locate("data", "atlantik/themes/default/tokens/" + m_imageName);
if (KStandardDirs::exists(filename)) if (TDEStandardDirs::exists(filename))
m_image = new TQPixmap(filename); m_image = new TQPixmap(filename);
} }
@ -172,7 +172,7 @@ void PortfolioView::loadIcon()
m_imageName = "hamburger.png"; m_imageName = "hamburger.png";
TQString filename = locate("data", "atlantik/themes/default/tokens/" + m_imageName); TQString filename = locate("data", "atlantik/themes/default/tokens/" + m_imageName);
if (KStandardDirs::exists(filename)) if (TDEStandardDirs::exists(filename))
m_image = new TQPixmap(filename); m_image = new TQPixmap(filename);
*/ */
} }

@ -97,7 +97,7 @@ void Token::loadIcon()
if (!m_imageName.isEmpty()) if (!m_imageName.isEmpty())
{ {
TQString filename = locate("data", "atlantik/themes/default/tokens/" + m_imageName); TQString filename = locate("data", "atlantik/themes/default/tokens/" + m_imageName);
if (KStandardDirs::exists(filename)) if (TDEStandardDirs::exists(filename))
m_image = new TQPixmap(filename); m_image = new TQPixmap(filename);
} }
@ -106,7 +106,7 @@ void Token::loadIcon()
m_imageName = "hamburger.png"; m_imageName = "hamburger.png";
TQString filename = locate("data", "atlantik/themes/default/tokens/" + m_imageName); TQString filename = locate("data", "atlantik/themes/default/tokens/" + m_imageName);
if (KStandardDirs::exists(filename)) if (TDEStandardDirs::exists(filename))
m_image = new TQPixmap(filename); m_image = new TQPixmap(filename);
} }

@ -31,8 +31,8 @@ int main( int argc, char *argv[] )
TDEApplication app; TDEApplication app;
TDEGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
TDEGlobal::dirs()->addResourceType("sprite", KStandardDirs::kde_default("data") + "kasteroids/sprites/"); TDEGlobal::dirs()->addResourceType("sprite", TDEStandardDirs::kde_default("data") + "kasteroids/sprites/");
TDEGlobal::dirs()->addResourceType("sounds", KStandardDirs::kde_default("data") + "kasteroids/sounds/"); TDEGlobal::dirs()->addResourceType("sounds", TDEStandardDirs::kde_default("data") + "kasteroids/sounds/");
#ifdef KA_ENABLE_SOUND #ifdef KA_ENABLE_SOUND
// setup mcop communication // setup mcop communication

@ -835,7 +835,7 @@ bool KGoldrunner::getDirectories()
// The directory strings are set by KDE at run time and might change in // The directory strings are set by KDE at run time and might change in
// later releases, so use them with caution and only if something gets lost. // later releases, so use them with caution and only if something gets lost.
KStandardDirs * dirs = new KStandardDirs(); TDEStandardDirs * dirs = new TDEStandardDirs();
#ifdef QT3 #ifdef QT3
TQString myDir = "kgoldrunner"; TQString myDir = "kgoldrunner";

@ -102,8 +102,8 @@ pWidget::pWidget()
} }
games->setItems(list); games->setItems(list);
TDEGlobal::dirs()->addResourceType("wallpaper", KStandardDirs::kde_default("data") + "kpat/backgrounds/"); TDEGlobal::dirs()->addResourceType("wallpaper", TDEStandardDirs::kde_default("data") + "kpat/backgrounds/");
TDEGlobal::dirs()->addResourceType("wallpaper", KStandardDirs::kde_default("data") + "ksnake/backgrounds/"); TDEGlobal::dirs()->addResourceType("wallpaper", TDEStandardDirs::kde_default("data") + "ksnake/backgrounds/");
wallpapers = new KSelectAction(i18n("&Change Background"), 0, TQT_TQOBJECT(this), wallpapers = new KSelectAction(i18n("&Change Background"), 0, TQT_TQOBJECT(this),
TQT_SLOT(changeWallpaper()), TQT_SLOT(changeWallpaper()),
actionCollection(), "wallpaper"); actionCollection(), "wallpaper");

@ -14,7 +14,7 @@ version 0.3.0: Date 1999-07-13
* Some changes related to KDE 2.0 / Qt 2.0 * Some changes related to KDE 2.0 / Qt 2.0
- replaced many char * with QString - replaced many char * with QString
- uses KStandardDirs instead of localtdedir - uses TDEStandardDirs instead of localtdedir
* Some minor bugfixes/cleanups * Some minor bugfixes/cleanups

@ -234,11 +234,11 @@ TQString KCardDialog::getCardPath(const TQString &carddir, int index)
KCardDialog::init(); KCardDialog::init();
TQString entry = carddir + TQString::number(index); TQString entry = carddir + TQString::number(index);
if (KStandardDirs::exists(entry + TQString::fromLatin1(".png"))) if (TDEStandardDirs::exists(entry + TQString::fromLatin1(".png")))
return entry + TQString::fromLatin1(".png"); return entry + TQString::fromLatin1(".png");
// rather theoretical // rather theoretical
if (KStandardDirs::exists(entry + TQString::fromLatin1(".xpm"))) if (TDEStandardDirs::exists(entry + TQString::fromLatin1(".xpm")))
return entry + TQString::fromLatin1(".xpm"); return entry + TQString::fromLatin1(".xpm");
return TQString(); return TQString();
@ -562,11 +562,11 @@ void KCardDialog::slotCardClicked(TQIconViewItem *item)
TQString KCardDialog::getDeckName(const TQString &desktop) TQString KCardDialog::getDeckName(const TQString &desktop)
{ {
TQString entry = desktop.left(desktop.length() - strlen(".desktop")); TQString entry = desktop.left(desktop.length() - strlen(".desktop"));
if (KStandardDirs::exists(entry + TQString::fromLatin1(".png"))) if (TDEStandardDirs::exists(entry + TQString::fromLatin1(".png")))
return entry + TQString::fromLatin1(".png"); return entry + TQString::fromLatin1(".png");
// rather theoretical // rather theoretical
if (KStandardDirs::exists(entry + TQString::fromLatin1(".xpm"))) if (TDEStandardDirs::exists(entry + TQString::fromLatin1(".xpm")))
return entry + TQString::fromLatin1(".xpm"); return entry + TQString::fromLatin1(".xpm");
return TQString(); return TQString();
} }
@ -799,7 +799,7 @@ void KCardDialog::init()
static bool _inited = false; static bool _inited = false;
if (_inited) if (_inited)
return; return;
TDEGlobal::dirs()->addResourceType("cards", KStandardDirs::kde_default("data") + TQString::fromLatin1("carddecks/")); TDEGlobal::dirs()->addResourceType("cards", TDEStandardDirs::kde_default("data") + TQString::fromLatin1("carddecks/"));
TDEGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
_inited = true; _inited = true;

Loading…
Cancel
Save