Logo Search packages:      
Sourcecode: kmess version File versions

void EmoticonTheme::setThemeName ( const QString &  newThemeName  ) 

Change the theme name.

Alter the name of the theme, which is the name of the directory where the theme will be stored.

newThemeName The new name

Definition at line 695 of file emoticontheme.cpp.

References KMessConfig::getAccountDirectory().

Referenced by loadTheme().

  KStandardDirs *dirs = KGlobal::dirs();

  // Try to find the theme between all possible locations
  if( isCustomTheme_ )
    // Custom themes are located in: <kmess app data folder>/<account@email>/customemoticons
    themePath_ = KMessConfig::instance()->getAccountDirectory( newThemeName ) + "/customemoticons/";
    // Standard themes can be in the KDE global emoticons dir, or in the ~/.kde/share/emoticons folder, and possibly elsewhere
    themePath_ = dirs->findResourceDir( "emoticons", newThemeName + "/emoticons.xml" );

    // findResourceDir() only returns the base path for the file you pass to it.
    themePath_ += newThemeName + "/";

Generated by  Doxygen 1.6.0   Back to index