Added a splitter to Privat Chat

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3345 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2010-08-06 14:58:53 +00:00
parent cfc17398dd
commit 0abfbbb911
3 changed files with 453 additions and 408 deletions

View file

@ -156,6 +156,38 @@ PopupChatDialog::PopupChatDialog(std::string id, std::string name,
updateAvatar() ;
updatePeerAvatar(id) ;
// load settings
processSettings(true);
}
/** Destructor. */
PopupChatDialog::~PopupChatDialog()
{
// save settings
processSettings(false);
}
void PopupChatDialog::processSettings(bool bLoad)
{
Settings->beginGroup(QString("ChatDialog"));
if (bLoad) {
// load settings
// state of splitter
ui.chatsplitter->restoreState(Settings->value("ChatSplitter").toByteArray());
} else {
// save settings
// state of splitter
Settings->setValue("ChatSplitter", ui.chatsplitter->saveState());
}
Settings->endGroup();
}
/*static*/ PopupChatDialog *PopupChatDialog::getPrivateChat(std::string id, std::string name, uint chatflags)
@ -338,12 +370,6 @@ void PopupChatDialog::updateStatusString(const QString& status_string)
QTimer::singleShot(5000,this,SLOT(resetStatusBar())) ;
}
/** Destructor. */
PopupChatDialog::~PopupChatDialog()
{
}
/**
Overloads the default show() slot so we can set opacity*/
@ -834,7 +860,7 @@ void PopupChatDialog::updatePeerAvatar(const std::string& peer_id)
#ifdef CHAT_DEBUG
std::cerr << "Got no image" << std::endl ;
#endif
ui.avatarlabel->setPixmap(QPixmap(":/images/no_avatar.png"));
ui.avatarlabel->setPixmap(QPixmap(":/images/no_avatar_70.png"));
return ;
}