Browse Source

Fix references to user profile directory.

pull/1/head
Darrell Anderson 10 years ago
parent
commit
6ecfcb2f4e
  1. 4
      basket.tdevelop
  2. 4
      src/archive.cpp
  3. 2
      src/backgroundmanager.cpp
  4. 10
      src/global.h

4
basket.tdevelop

@ -33,7 +33,7 @@
<mainprogram>/home/seb/Programmation/basket/debug/src/.libs/basket</mainprogram>
<directoryradio>build</directoryradio>
<customdirectory>/</customdirectory>
<programargs>--nofork --use-drkonquy --data-folder ~/.kde/share/apps/basket-debug</programargs>
<programargs>--nofork --use-drkonquy --data-folder ~/.trinity/share/apps/basket-debug</programargs>
<terminal>false</terminal>
<autocompile>true</autocompile>
<envvars>
@ -160,7 +160,7 @@
<kdevdebugger>
<general>
<dbgshell>libtool</dbgshell>
<programargs>-d --nofork --use-drkonquy --data-folder ~/.kde/share/apps/basket-debug</programargs>
<programargs>-d --nofork --use-drkonquy --data-folder ~/.trinity/share/apps/basket-debug</programargs>
<gdbpath></gdbpath>
<configGdbScript></configGdbScript>
<runShellScript></runShellScript>

4
src/archive.cpp

@ -436,7 +436,7 @@ void Archive::importTagEmblems(const TQString &extractionFolder)
// The icon does not exists on that computer, import it:
if (emblem.isNull()) {
// Of the emblem path was eg. "/home/seb/emblem.png", it was exported as "tag-emblems/_home_seb_emblem.png".
// So we need to copy that image to "~/.kde/share/apps/basket/tag-emblems/emblem.png":
// So we need to copy that image to "~/.trinity/share/apps/basket/tag-emblems/emblem.png":
int slashIndex = emblemName.findRev("/");
TQString emblemFileName = (slashIndex < 0 ? emblemName : emblemName.right(slashIndex - 2));
TQString source = extractionFolder + "tag-emblems/" + emblemName.replace('/', '_');
@ -554,7 +554,7 @@ void Archive::importBasketIcon(TQDomElement properties, const TQString &extracti
dir.mkdir(Global::savesFolder() + "basket-icons/");
FormatImporter copier; // Only used to copy files synchronously
// Of the icon path was eg. "/home/seb/icon.png", it was exported as "basket-icons/_home_seb_icon.png".
// So we need to copy that image to "~/.kde/share/apps/basket/basket-icons/icon.png":
// So we need to copy that image to "~/.trinity/share/apps/basket/basket-icons/icon.png":
int slashIndex = iconName.findRev("/");
TQString iconFileName = (slashIndex < 0 ? iconName : iconName.right(slashIndex - 2));
TQString source = extractionFolder + "basket-icons/" + iconName.replace('/', '_');

2
src/backgroundmanager.cpp

@ -68,7 +68,7 @@ OpaqueBackgroundEntry::~OpaqueBackgroundEntry()
BackgroundManager::BackgroundManager()
{
/// std::cout << "BackgroundManager: Found the following background images in ";
TQStringList directories = KGlobal::dirs()->resourceDirs("data"); // eg. { "/home/seb/.kde/share/apps/", "/usr/share/apps/" }
TQStringList directories = KGlobal::dirs()->resourceDirs("data"); // eg. { "/home/seb/.trinity/share/apps/", "/usr/share/apps/" }
// For each folder:
for (TQStringList::Iterator it = directories.begin(); it != directories.end(); ++it) {
// For each file in those directories:

10
src/global.h

@ -55,11 +55,11 @@ class Global
// Application Folders:
static void setCustomSavesFolder(const TQString &folder);
static TQString savesFolder(); /// << @return e.g. "/home/username/.kde/share/apps/basket/".
static TQString basketsFolder(); /// << @return e.g. "/home/username/.kde/share/apps/basket/baskets/".
static TQString backgroundsFolder(); /// << @return e.g. "/home/username/.kde/share/apps/basket/backgrounds/".
static TQString templatesFolder(); /// << @return e.g. "/home/username/.kde/share/apps/basket/templates/".
static TQString tempCutFolder(); /// << @return e.g. "/home/username/.kde/share/apps/basket/temp-cut/". (was ".tmp/")
static TQString savesFolder(); /// << @return e.g. "/home/username/.trinity/share/apps/basket/".
static TQString basketsFolder(); /// << @return e.g. "/home/username/.trinity/share/apps/basket/baskets/".
static TQString backgroundsFolder(); /// << @return e.g. "/home/username/.trinity/share/apps/basket/backgrounds/".
static TQString templatesFolder(); /// << @return e.g. "/home/username/.trinity/share/apps/basket/templates/".
static TQString tempCutFolder(); /// << @return e.g. "/home/username/.trinity/share/apps/basket/temp-cut/". (was ".tmp/")
// Various Things:
static TQString openNoteIcon(); /// << @return the icon used for the "Open" action on notes.

Loading…
Cancel
Save