mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
* Enabled by default to display Friends Avatar on Friendslist
* Changed for RS 0.6 the status icons * beautify the status string which displays after nicknames git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7695 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
3ef04a61c9
commit
4cdd83cc89
@ -201,7 +201,7 @@ FriendsDialog::FriendsDialog(QWidget *parent)
|
|||||||
RsAutoUpdatePage::lockAllEvents();
|
RsAutoUpdatePage::lockAllEvents();
|
||||||
ui.friendList->setShowStatusColumn(false);
|
ui.friendList->setShowStatusColumn(false);
|
||||||
ui.friendList->setShowLastContactColumn(false);
|
ui.friendList->setShowLastContactColumn(false);
|
||||||
ui.friendList->setShowAvatarColumn(false);
|
ui.friendList->setShowAvatarColumn(true);
|
||||||
ui.friendList->setShowIPColumn(false);
|
ui.friendList->setShowIPColumn(false);
|
||||||
ui.friendList->setRootIsDecorated(true);
|
ui.friendList->setRootIsDecorated(true);
|
||||||
ui.friendList->setShowGroups(true);
|
ui.friendList->setShowGroups(true);
|
||||||
|
@ -1320,19 +1320,19 @@ void MainWindow::initializeStatusObject(QObject *pObject, bool bConnect)
|
|||||||
/* initialize menu */
|
/* initialize menu */
|
||||||
QActionGroup *pGroup = new QActionGroup(pMenu);
|
QActionGroup *pGroup = new QActionGroup(pMenu);
|
||||||
|
|
||||||
QAction *pAction = new QAction(QIcon(StatusDefs::imageIM(RS_STATUS_ONLINE)), StatusDefs::name(RS_STATUS_ONLINE), pMenu);
|
QAction *pAction = new QAction(QIcon(StatusDefs::imageStatus(RS_STATUS_ONLINE)), StatusDefs::name(RS_STATUS_ONLINE), pMenu);
|
||||||
pAction->setData(RS_STATUS_ONLINE);
|
pAction->setData(RS_STATUS_ONLINE);
|
||||||
pAction->setCheckable(true);
|
pAction->setCheckable(true);
|
||||||
pMenu->addAction(pAction);
|
pMenu->addAction(pAction);
|
||||||
pGroup->addAction(pAction);
|
pGroup->addAction(pAction);
|
||||||
|
|
||||||
pAction = new QAction(QIcon(StatusDefs::imageIM(RS_STATUS_BUSY)), StatusDefs::name(RS_STATUS_BUSY), pMenu);
|
pAction = new QAction(QIcon(StatusDefs::imageStatus(RS_STATUS_BUSY)), StatusDefs::name(RS_STATUS_BUSY), pMenu);
|
||||||
pAction->setData(RS_STATUS_BUSY);
|
pAction->setData(RS_STATUS_BUSY);
|
||||||
pAction->setCheckable(true);
|
pAction->setCheckable(true);
|
||||||
pMenu->addAction(pAction);
|
pMenu->addAction(pAction);
|
||||||
pGroup->addAction(pAction);
|
pGroup->addAction(pAction);
|
||||||
|
|
||||||
pAction = new QAction(QIcon(StatusDefs::imageIM(RS_STATUS_AWAY)), StatusDefs::name(RS_STATUS_AWAY), pMenu);
|
pAction = new QAction(QIcon(StatusDefs::imageStatus(RS_STATUS_AWAY)), StatusDefs::name(RS_STATUS_AWAY), pMenu);
|
||||||
pAction->setData(RS_STATUS_AWAY);
|
pAction->setData(RS_STATUS_AWAY);
|
||||||
pAction->setCheckable(true);
|
pAction->setCheckable(true);
|
||||||
pMenu->addAction(pAction);
|
pMenu->addAction(pAction);
|
||||||
@ -1345,9 +1345,9 @@ void MainWindow::initializeStatusObject(QObject *pObject, bool bConnect)
|
|||||||
/* initialize combobox */
|
/* initialize combobox */
|
||||||
QComboBox *pComboBox = dynamic_cast<QComboBox*>(pObject);
|
QComboBox *pComboBox = dynamic_cast<QComboBox*>(pObject);
|
||||||
if (pComboBox) {
|
if (pComboBox) {
|
||||||
pComboBox->addItem(QIcon(StatusDefs::imageIM(RS_STATUS_ONLINE)), StatusDefs::name(RS_STATUS_ONLINE), RS_STATUS_ONLINE);
|
pComboBox->addItem(QIcon(StatusDefs::imageStatus(RS_STATUS_ONLINE)), StatusDefs::name(RS_STATUS_ONLINE), RS_STATUS_ONLINE);
|
||||||
pComboBox->addItem(QIcon(StatusDefs::imageIM(RS_STATUS_BUSY)), StatusDefs::name(RS_STATUS_BUSY), RS_STATUS_BUSY);
|
pComboBox->addItem(QIcon(StatusDefs::imageStatus(RS_STATUS_BUSY)), StatusDefs::name(RS_STATUS_BUSY), RS_STATUS_BUSY);
|
||||||
pComboBox->addItem(QIcon(StatusDefs::imageIM(RS_STATUS_AWAY)), StatusDefs::name(RS_STATUS_AWAY), RS_STATUS_AWAY);
|
pComboBox->addItem(QIcon(StatusDefs::imageStatus(RS_STATUS_AWAY)), StatusDefs::name(RS_STATUS_AWAY), RS_STATUS_AWAY);
|
||||||
|
|
||||||
if (bConnect) {
|
if (bConnect) {
|
||||||
connect(pComboBox, SIGNAL(activated(int)), this, SLOT(statusChangedComboBox(int)));
|
connect(pComboBox, SIGNAL(activated(int)), this, SLOT(statusChangedComboBox(int)));
|
||||||
|
@ -296,6 +296,7 @@ void FriendList::initializeHeader(bool /*afterLoadSettings*/)
|
|||||||
header->resizeSection(COLUMN_NAME, 150);
|
header->resizeSection(COLUMN_NAME, 150);
|
||||||
header->resizeSection(COLUMN_LAST_CONTACT, 120);
|
header->resizeSection(COLUMN_LAST_CONTACT, 120);
|
||||||
}*/
|
}*/
|
||||||
|
header->resizeSection(COLUMN_NAME, 220);
|
||||||
header->resizeSection(COLUMN_AVATAR, COLUMN_AVATAR_WIDTH);
|
header->resizeSection(COLUMN_AVATAR, COLUMN_AVATAR_WIDTH);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1083,7 +1084,7 @@ void FriendList::insertPeers()
|
|||||||
gpgItem->setFont(i, font);
|
gpgItem->setFont(i, font);
|
||||||
}
|
}
|
||||||
|
|
||||||
gpgIcon = QIcon(StatusDefs::imageUser(bestRSState));
|
gpgIcon = QIcon(StatusDefs::imageStatus(bestRSState));
|
||||||
|
|
||||||
if (!isStatusColumnHidden) {
|
if (!isStatusColumnHidden) {
|
||||||
gpgItem->setText(COLUMN_STATE, StatusDefs::name(bestRSState));
|
gpgItem->setText(COLUMN_STATE, StatusDefs::name(bestRSState));
|
||||||
@ -1096,13 +1097,13 @@ void FriendList::insertPeers()
|
|||||||
gpgItemText += "\n" + bestCustomStateString;
|
gpgItemText += "\n" + bestCustomStateString;
|
||||||
}
|
}
|
||||||
} else if (isStatusColumnHidden && !mHideState){
|
} else if (isStatusColumnHidden && !mHideState){
|
||||||
gpgItemText += " [" + StatusDefs::name(bestRSState) + "]";
|
gpgItemText += " - " + StatusDefs::name(bestRSState);
|
||||||
}
|
}
|
||||||
} else if (gpg_online) {
|
} else if (gpg_online) {
|
||||||
if (!isStatusColumnHidden) {
|
if (!isStatusColumnHidden) {
|
||||||
gpgItem->setText(COLUMN_STATE, tr("Available"));
|
gpgItem->setText(COLUMN_STATE, tr("Available"));
|
||||||
} else if (!mHideState && !mBigName) {
|
} else if (!mHideState && !mBigName) {
|
||||||
gpgItemText += " [" + tr("Available") + "]";
|
gpgItemText += " - " + tr("Available") ;
|
||||||
}
|
}
|
||||||
|
|
||||||
bestPeerState = PEER_STATE_AVAILABLE;
|
bestPeerState = PEER_STATE_AVAILABLE;
|
||||||
@ -1121,12 +1122,12 @@ void FriendList::insertPeers()
|
|||||||
if (!isStatusColumnHidden) {
|
if (!isStatusColumnHidden) {
|
||||||
gpgItem->setText(COLUMN_STATE, StatusDefs::name(RS_STATUS_OFFLINE));
|
gpgItem->setText(COLUMN_STATE, StatusDefs::name(RS_STATUS_OFFLINE));
|
||||||
} else if (!mHideState && !mBigName) {
|
} else if (!mHideState && !mBigName) {
|
||||||
gpgItemText += " [" + StatusDefs::name(RS_STATUS_OFFLINE) + "]";
|
gpgItemText += " - " + StatusDefs::name(RS_STATUS_OFFLINE) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
bestPeerState = PEER_STATE_OFFLINE;
|
bestPeerState = PEER_STATE_OFFLINE;
|
||||||
gpgItem->setHidden(mHideUnconnected);
|
gpgItem->setHidden(mHideUnconnected);
|
||||||
gpgIcon = QIcon(StatusDefs::imageUser(RS_STATUS_OFFLINE));
|
gpgIcon = QIcon(StatusDefs::imageStatus(RS_STATUS_OFFLINE));
|
||||||
|
|
||||||
QColor textColor = mTextColorStatus[RS_STATUS_OFFLINE];
|
QColor textColor = mTextColorStatus[RS_STATUS_OFFLINE];
|
||||||
QFont font = StatusDefs::font(RS_STATUS_OFFLINE);
|
QFont font = StatusDefs::font(RS_STATUS_OFFLINE);
|
||||||
@ -1769,6 +1770,7 @@ void FriendList::setShowAvatarColumn(bool show)
|
|||||||
ui->peerTreeWidget->setColumnHidden(COLUMN_AVATAR, !show);
|
ui->peerTreeWidget->setColumnHidden(COLUMN_AVATAR, !show);
|
||||||
|
|
||||||
updateHeader();
|
updateHeader();
|
||||||
|
initializeHeader(true);
|
||||||
insertPeers();
|
insertPeers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,6 +82,25 @@ const char *StatusDefs::imageUser(unsigned int status)
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *StatusDefs::imageStatus(unsigned int status)
|
||||||
|
{
|
||||||
|
switch (status) {
|
||||||
|
case RS_STATUS_OFFLINE:
|
||||||
|
return ":/images/status/user-offline.png";
|
||||||
|
case RS_STATUS_AWAY:
|
||||||
|
return ":/images/status/user-away.png";
|
||||||
|
case RS_STATUS_BUSY:
|
||||||
|
return ":/images/status/user-busy.png";
|
||||||
|
case RS_STATUS_ONLINE:
|
||||||
|
return ":/images/status/user-online.png";
|
||||||
|
case RS_STATUS_INACTIVE:
|
||||||
|
return ":/images/status/user-away-extended.png";
|
||||||
|
}
|
||||||
|
|
||||||
|
std::cerr << "StatusDefs::imageUser: Unknown status requested " << status;
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
QString StatusDefs::tooltip(unsigned int status)
|
QString StatusDefs::tooltip(unsigned int status)
|
||||||
{
|
{
|
||||||
switch (status) {
|
switch (status) {
|
||||||
|
@ -34,6 +34,7 @@ public:
|
|||||||
static QString name(unsigned int status);
|
static QString name(unsigned int status);
|
||||||
static const char* imageIM(unsigned int status);
|
static const char* imageIM(unsigned int status);
|
||||||
static const char* imageUser(unsigned int status);
|
static const char* imageUser(unsigned int status);
|
||||||
|
static const char* imageStatus(unsigned int status);
|
||||||
static QString tooltip(unsigned int status);
|
static QString tooltip(unsigned int status);
|
||||||
|
|
||||||
static QFont font(unsigned int status);
|
static QFont font(unsigned int status);
|
||||||
|
@ -680,6 +680,11 @@
|
|||||||
<file>images/tags/dev-translator.png</file>
|
<file>images/tags/dev-translator.png</file>
|
||||||
<file>images/tags/dev-patcher.png</file>
|
<file>images/tags/dev-patcher.png</file>
|
||||||
<file>images/tags/developer.png</file>
|
<file>images/tags/developer.png</file>
|
||||||
|
<file>images/status/user-online.png</file>
|
||||||
|
<file>images/status/user-offline.png</file>
|
||||||
|
<file>images/status/user-busy.png</file>
|
||||||
|
<file>images/status/user-away-extended.png</file>
|
||||||
|
<file>images/status/user-away.png</file>
|
||||||
<file>images/circles/circles_32.png</file>
|
<file>images/circles/circles_32.png</file>
|
||||||
<file>images/circles/circles_64.png</file>
|
<file>images/circles/circles_64.png</file>
|
||||||
<file>images/newsfeed/news-feed-32.png</file>
|
<file>images/newsfeed/news-feed-32.png</file>
|
||||||
|
BIN
retroshare-gui/src/gui/images/status/user-away-extended.png
Normal file
BIN
retroshare-gui/src/gui/images/status/user-away-extended.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
BIN
retroshare-gui/src/gui/images/status/user-away.png
Normal file
BIN
retroshare-gui/src/gui/images/status/user-away.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
BIN
retroshare-gui/src/gui/images/status/user-busy.png
Normal file
BIN
retroshare-gui/src/gui/images/status/user-busy.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
retroshare-gui/src/gui/images/status/user-offline.png
Normal file
BIN
retroshare-gui/src/gui/images/status/user-offline.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
retroshare-gui/src/gui/images/status/user-online.png
Normal file
BIN
retroshare-gui/src/gui/images/status/user-online.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
Loading…
Reference in New Issue
Block a user