Logo Search packages:      
Sourcecode: kmess version File versions

void EmoticonManager::connected ( QString  handle = QString::null  )  [slot]

Load an account's emoticon themes

To load the custom emoticon theme we use the account's handle as the theme name, so every account will get its very own emoticons. Giving this method an account handle is only useful if we're loading the Account Settings for an account different than the currently connected one.

Parameters:
handle Optional account email, if given will load the specified account's theme instead of the current one's

Definition at line 91 of file emoticonmanager.cpp.

References Account::getHandle(), Account::isGuestAccount(), EmoticonTheme::loadTheme(), and slotChangedEmoticonSettings().

{
  QString themeName;

  // The account will be needed in the disconnected() method, to decide whether to save the theme or not
  Account *account = CurrentAccount::instance();
  shouldSaveTheme_ = ! account->isGuestAccount();

  if( handle.isEmpty() )
  {
    // Update the standard emoticons with the user's preferred theme
    slotChangedEmoticonSettings();

    themeName = account->getHandle();
  }
  else
  {
    // Not updating the standard emoticons when loading an account's settings

    themeName = handle;
  }

#ifdef KMESSDEBUG_EMOTICONS_GENERAL
  kDebug() << "Loading custom emoticon theme of: " << themeName;
#endif

  // When this call fails, it'll give feedback about the cause. No need to do it here too.
  customTheme_->loadTheme( themeName, true );

  emit updated();
}


Generated by  Doxygen 1.6.0   Back to index