mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-22 06:05:08 -05:00
add a check button to hide unconnected friends
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2088 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
2f13d31725
commit
f8d2fb5de3
@ -106,6 +106,8 @@ PeersDialog::PeersDialog(QWidget *parent)
|
|||||||
connect( ui.actionSet_your_Avatar, SIGNAL(triggered()), this, SLOT(getAvatar()));
|
connect( ui.actionSet_your_Avatar, SIGNAL(triggered()), this, SLOT(getAvatar()));
|
||||||
connect( ui.actionSet_your_Personal_Message, SIGNAL(triggered()), this, SLOT(statusmessage()));
|
connect( ui.actionSet_your_Personal_Message, SIGNAL(triggered()), this, SLOT(statusmessage()));
|
||||||
|
|
||||||
|
connect(ui.hide_unconnected, SIGNAL(clicked()), this, SLOT(insertPeers()));
|
||||||
|
|
||||||
ui.peertabWidget->setTabPosition(QTabWidget::West);
|
ui.peertabWidget->setTabPosition(QTabWidget::West);
|
||||||
ui.peertabWidget->addTab(new ProfileWidget(),QString(tr("Profile")));
|
ui.peertabWidget->addTab(new ProfileWidget(),QString(tr("Profile")));
|
||||||
|
|
||||||
@ -445,6 +447,7 @@ void PeersDialog::insertPeers()
|
|||||||
/* change color and icon */
|
/* change color and icon */
|
||||||
int i;
|
int i;
|
||||||
if (sslDetail.state & RS_PEER_STATE_CONNECTED) {
|
if (sslDetail.state & RS_PEER_STATE_CONNECTED) {
|
||||||
|
sslItem->setHidden(false);
|
||||||
gpg_connected = true;
|
gpg_connected = true;
|
||||||
|
|
||||||
sslItem -> setIcon(0,(QIcon(":/images/connect_established.png")));
|
sslItem -> setIcon(0,(QIcon(":/images/connect_established.png")));
|
||||||
@ -455,6 +458,7 @@ void PeersDialog::insertPeers()
|
|||||||
sslItem -> setFont(i,font);
|
sslItem -> setFont(i,font);
|
||||||
}
|
}
|
||||||
} else if (sslDetail.state & RS_PEER_STATE_ONLINE) {
|
} else if (sslDetail.state & RS_PEER_STATE_ONLINE) {
|
||||||
|
sslItem->setHidden(ui.hide_unconnected->isChecked());
|
||||||
gpg_online = true;
|
gpg_online = true;
|
||||||
|
|
||||||
QFont font;
|
QFont font;
|
||||||
@ -464,6 +468,7 @@ void PeersDialog::insertPeers()
|
|||||||
sslItem -> setFont(i,font);
|
sslItem -> setFont(i,font);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
sslItem->setHidden(ui.hide_unconnected->isChecked());
|
||||||
if (sslDetail.autoconnect !="Offline") {
|
if (sslDetail.autoconnect !="Offline") {
|
||||||
sslItem -> setIcon(0, (QIcon(":/images/connect_creating.png")));
|
sslItem -> setIcon(0, (QIcon(":/images/connect_creating.png")));
|
||||||
} else {
|
} else {
|
||||||
@ -490,6 +495,7 @@ void PeersDialog::insertPeers()
|
|||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
if (gpg_connected) {
|
if (gpg_connected) {
|
||||||
|
gpg_item->setHidden(false);
|
||||||
gpg_item -> setIcon(0,(QIcon(IMAGE_ONLINE)));
|
gpg_item -> setIcon(0,(QIcon(IMAGE_ONLINE)));
|
||||||
gpg_item -> setText(1, tr("Online"));
|
gpg_item -> setText(1, tr("Online"));
|
||||||
QFont font;
|
QFont font;
|
||||||
@ -499,6 +505,7 @@ void PeersDialog::insertPeers()
|
|||||||
gpg_item -> setFont(i,font);
|
gpg_item -> setFont(i,font);
|
||||||
}
|
}
|
||||||
} else if (gpg_online) {
|
} else if (gpg_online) {
|
||||||
|
gpg_item->setHidden(ui.hide_unconnected->isChecked());
|
||||||
gpg_item -> setIcon(0,(QIcon(IMAGE_AVAIBLE)));
|
gpg_item -> setIcon(0,(QIcon(IMAGE_AVAIBLE)));
|
||||||
gpg_item -> setText(1, tr("Available"));
|
gpg_item -> setText(1, tr("Available"));
|
||||||
QFont font;
|
QFont font;
|
||||||
@ -508,6 +515,7 @@ void PeersDialog::insertPeers()
|
|||||||
gpg_item -> setFont(i,font);
|
gpg_item -> setFont(i,font);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
gpg_item->setHidden(ui.hide_unconnected->isChecked());
|
||||||
gpg_item -> setIcon(0,(QIcon(IMAGE_OFFLINE)));
|
gpg_item -> setIcon(0,(QIcon(IMAGE_OFFLINE)));
|
||||||
gpg_item -> setText(1, tr("Offline"));
|
gpg_item -> setText(1, tr("Offline"));
|
||||||
QFont font;
|
QFont font;
|
||||||
|
@ -544,7 +544,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="2">
|
||||||
<spacer>
|
<spacer>
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
@ -557,7 +557,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2">
|
<item row="0" column="3">
|
||||||
<widget class="QPushButton" name="menupushButton">
|
<widget class="QPushButton" name="menupushButton">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Add</string>
|
<string>Add</string>
|
||||||
@ -598,6 +598,13 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QCheckBox" name="hide_unconnected">
|
||||||
|
<property name="text">
|
||||||
|
<string>hide unconnected</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
Reference in New Issue
Block a user