mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-27 16:35:21 -04:00
merged with upstream/master
This commit is contained in:
commit
dbd78d2401
77 changed files with 2311 additions and 1333 deletions
|
@ -72,7 +72,7 @@ ChatLobbyWidget::ChatLobbyWidget(QWidget *parent, Qt::WindowFlags flags)
|
|||
|
||||
QObject::connect( ui.filterLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(filterItems(QString)));
|
||||
QObject::connect( ui.filterLineEdit, SIGNAL(filterChanged(int)), this, SLOT(filterColumnChanged(int)));
|
||||
QObject::connect( ui.createlobbytoolButton, SIGNAL(clicked()), this, SLOT(createChatLobby()));
|
||||
QObject::connect( ui.createLobbyToolButton, SIGNAL(clicked()), this, SLOT(createChatLobby()));
|
||||
|
||||
compareRole = new RSTreeWidgetItemCompareRole;
|
||||
compareRole->setRole(COLUMN_NAME, ROLE_SORT);
|
||||
|
|
|
@ -10,8 +10,17 @@
|
|||
<height>517</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<property name="margin">
|
||||
<layout class="QVBoxLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
|
@ -28,8 +37,17 @@
|
|||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="margin">
|
||||
<layout class="QHBoxLayout" name="titleBarFrameLayout">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
|
@ -53,7 +71,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<spacer name="titleBarVSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
|
@ -91,7 +109,7 @@
|
|||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<layout class="QVBoxLayout" name="lobbyTreeVLayout">
|
||||
<item>
|
||||
<widget class="QFrame" name="toolBarFrame">
|
||||
<property name="styleSheet">
|
||||
|
@ -103,7 +121,7 @@
|
|||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<layout class="QGridLayout" name="toolBarFrameGLayout">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
|
@ -130,7 +148,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QToolButton" name="createlobbytoolButton">
|
||||
<widget class="QToolButton" name="createLobbyToolButton">
|
||||
<property name="toolTip">
|
||||
<string>Create chat lobby</string>
|
||||
</property>
|
||||
|
@ -183,8 +201,17 @@
|
|||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="_lobby_blank_page">
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<property name="margin">
|
||||
<layout class="QGridLayout" name="_lobby_blank_pageGLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
|
@ -195,13 +222,13 @@
|
|||
<property name="title">
|
||||
<string>Selected lobby info</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<layout class="QVBoxLayout" name="lobbyinfo_groupBoxVLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<layout class="QHBoxLayout" name="lobbyInfoHLayout">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<layout class="QVBoxLayout" name="lobbyInfoNameVLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<widget class="QLabel" name="lobbyname_label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
|
@ -214,7 +241,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<widget class="QLabel" name="lobbyid_label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
|
@ -227,7 +254,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<widget class="QLabel" name="lobbytopic_label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
|
@ -240,7 +267,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<widget class="QLabel" name="lobbytype_label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
|
@ -253,7 +280,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<widget class="QLabel" name="lobbysec_label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
|
@ -266,7 +293,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<widget class="QLabel" name="lobbypeers_label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
|
@ -281,7 +308,7 @@
|
|||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<layout class="QVBoxLayout" name="lobbyInfoValueVLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="lobbyname_lineEdit">
|
||||
<property name="sizePolicy">
|
||||
|
@ -372,7 +399,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<spacer name="lobbyInfoVSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
|
|
|
@ -138,6 +138,7 @@ void CreateCircleDialog::editExistingId(const RsGxsGroupId &circleId, const bool
|
|||
else
|
||||
{
|
||||
ui.circleAdminLabel->setVisible(false) ;
|
||||
ui.circleAdminLabel->hide();
|
||||
ui.idChooser->setVisible(true) ;
|
||||
}
|
||||
|
||||
|
@ -297,6 +298,8 @@ void CreateCircleDialog::addMember(const QString& keyId, const QString& idtype,
|
|||
//member->setIcon(RSCIRCLEID_COL_NICKNAME, pixmap);
|
||||
|
||||
tree->addTopLevelItem(member);
|
||||
|
||||
ui.members_groupBox->setTitle( tr("Invited Members") + " (" + QString::number(ui.treeWidget_membership->topLevelItemCount()) + ")" );
|
||||
}
|
||||
|
||||
/** Maybe we can use RsGxsCircleGroup instead of RsGxsCircleDetails ??? (TODO)**/
|
||||
|
@ -634,6 +637,7 @@ void CreateCircleDialog::updateCircleGUI()
|
|||
//ui.idChooser->setIdConstraintSet(ids) ;
|
||||
ui.idChooser->setFlags(IDCHOOSER_NO_CREATE) ;
|
||||
ui.circleAdminLabel->setVisible(false) ;
|
||||
ui.circleAdminLabel->hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>924</width>
|
||||
<width>951</width>
|
||||
<height>578</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -51,7 +51,7 @@
|
|||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<widget class="QGroupBox" name="members_groupBox">
|
||||
<property name="title">
|
||||
<string>Invited Members</string>
|
||||
</property>
|
||||
|
@ -61,6 +61,9 @@
|
|||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Members of this list will be automatically proposed to join the circle (by accepting membership). They will</p><p>not receive data that is restricted to this circle until they do so.</p></body></html></string>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
@ -143,6 +146,31 @@
|
|||
<string>Known People</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="RSTreeWidget" name="treeWidget_IdList">
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Nickname</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>ID</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Type</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_PgpTypes">
|
||||
<property name="frameShape">
|
||||
|
@ -205,31 +233,6 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="RSTreeWidget" name="treeWidget_IdList">
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Nickname</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>ID</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Type</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -258,13 +261,23 @@
|
|||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Name</string>
|
||||
<string>Name:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="3">
|
||||
<widget class="QLineEdit" name="circleName"/>
|
||||
<widget class="QLineEdit" name="circleName">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>The circle name, contact author and invted member list will be visible to all invited members. If the circle is not private, it will also be visible to neighbor nodes of the nodes who host the invited members.</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="idChooserLabel">
|
||||
|
@ -275,7 +288,7 @@
|
|||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Creator:</string>
|
||||
<string>Contact author:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -288,7 +301,7 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>The creator of a circle does not need to be known. It is however useful for public circles so that people know to whom to send a request for membership.</p></body></html></string>
|
||||
<string><html><head/><body><p>The creator of a circle ia purely optional. It is however useful for public circles so that people know with whom to discuss membership aspects.</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -324,7 +337,10 @@
|
|||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Distribution</string>
|
||||
<string>Distribution:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -362,10 +378,10 @@
|
|||
<item row="0" column="1">
|
||||
<widget class="QRadioButton" name="radioButton_Self">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Self-restricted circles (the very existance of the circle, and its actual content) are only visible to the members of these circles. In practice the circle uses itself to limit its own distribution. </p></body></html></string>
|
||||
<string><html><head/><body><p>Private (a.k.a. self-restricted) circles are only visible to the invited members of these circles. In practice the circle uses its own list of invited members to limit its own distribution. </p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Self-Restricted</string>
|
||||
<string>Private</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -375,7 +391,7 @@
|
|||
<string><html><head/><body><p>Circles can be restricted to the members of another circle. Only the members of that second circle will be allowed to see the new circle and its content (list of members, etc).</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Restricted to:</string>
|
||||
<string>Only visible to members of:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -71,8 +71,9 @@
|
|||
#define RED_BACKGROUND 3
|
||||
#define GRAY_BACKGROUND 4
|
||||
|
||||
#define CIRCLESDIALOG_GROUPMETA 1
|
||||
#define CIRCLESDIALOG_GROUPDATA 2
|
||||
#define CIRCLESDIALOG_GROUPMETA 1
|
||||
#define CIRCLESDIALOG_GROUPDATA 2
|
||||
#define CIRCLESDIALOG_GROUPUPDATE 3
|
||||
|
||||
/****************************************************************
|
||||
*/
|
||||
|
@ -98,6 +99,9 @@
|
|||
#define IMAGE_CREATE ":/icons/circle_new_128.png"
|
||||
#define IMAGE_INVITED ":/icons/bullet_yellow_128.png"
|
||||
#define IMAGE_MEMBER ":/icons/bullet_green_128.png"
|
||||
#define IMAGE_UNKNOWN ":/icons/bullet_grey_128.png"
|
||||
#define IMAGE_ADMIN ":/icons/bullet_blue_128.png"
|
||||
#define IMAGE_INFO ":/images/info16.png"
|
||||
|
||||
// comment this out in order to remove the sorting of circles into "belong to" and "other visible circles"
|
||||
#define CIRCLE_MEMBERSHIP_CATEGORIES 1
|
||||
|
@ -238,6 +242,7 @@ IdDialog::IdDialog(QWidget *parent) :
|
|||
/* Set initial section sizes */
|
||||
QHeaderView * circlesheader = ui->treeWidget_membership->header () ;
|
||||
circlesheader->resizeSection (CIRCLEGROUP_CIRCLE_COL_GROUPNAME, QFontMetricsF(ui->idTreeWidget->font()).width("Circle name")*1.5) ;
|
||||
ui->treeWidget_membership->setColumnWidth(CIRCLEGROUP_CIRCLE_COL_GROUPNAME, 270);
|
||||
|
||||
ui->filterLineEdit->addFilter(QIcon(), tr("ID"), RSID_COL_KEYID, tr("Search ID"));
|
||||
|
||||
|
@ -341,6 +346,8 @@ void IdDialog::requestCircleGroupMeta()
|
|||
mCircleQueue->requestGroupInfo(token, RS_TOKREQ_ANSTYPE_SUMMARY, opts, CIRCLESDIALOG_GROUPMETA);
|
||||
}
|
||||
|
||||
// should update this code to be called and modify the tree widget accordingly
|
||||
#ifdef SUSPENDED
|
||||
void IdDialog::requestCircleGroupData(const RsGxsCircleId& circle_id)
|
||||
{
|
||||
mStateHelper->setLoading(CIRCLESDIALOG_GROUPDATA, true);
|
||||
|
@ -355,12 +362,13 @@ void IdDialog::requestCircleGroupData(const RsGxsCircleId& circle_id)
|
|||
RsTokReqOptions opts;
|
||||
opts.mReqType = GXS_REQUEST_TYPE_GROUP_DATA;
|
||||
|
||||
std::list<RsGxsGroupId> grps ;
|
||||
grps.push_back(RsGxsGroupId(circle_id));
|
||||
|
||||
std::list<RsGxsGroupId> grps ;
|
||||
grps.push_back(RsGxsGroupId(circle_id));
|
||||
|
||||
uint32_t token;
|
||||
mCircleQueue->requestGroupInfo(token, RS_TOKREQ_ANSTYPE_DATA, opts, grps, CIRCLESDIALOG_GROUPDATA);
|
||||
}
|
||||
#endif
|
||||
|
||||
void IdDialog::loadCircleGroupMeta(const uint32_t &token)
|
||||
{
|
||||
|
@ -393,7 +401,7 @@ void IdDialog::loadCircleGroupMeta(const uint32_t &token)
|
|||
if(!mExternalOtherCircleItem)
|
||||
{
|
||||
mExternalOtherCircleItem = new QTreeWidgetItem();
|
||||
mExternalOtherCircleItem->setText(0, tr("Other visible external circles"));
|
||||
mExternalOtherCircleItem->setText(0, tr("Other circles"));
|
||||
|
||||
ui->treeWidget_membership->addTopLevelItem(mExternalOtherCircleItem);
|
||||
}
|
||||
|
@ -401,7 +409,7 @@ void IdDialog::loadCircleGroupMeta(const uint32_t &token)
|
|||
if(!mExternalBelongingCircleItem )
|
||||
{
|
||||
mExternalBelongingCircleItem = new QTreeWidgetItem();
|
||||
mExternalBelongingCircleItem->setText(0, tr("External circles my identities belong to"));
|
||||
mExternalBelongingCircleItem->setText(0, tr("Circles I belong to"));
|
||||
ui->treeWidget_membership->addTopLevelItem(mExternalBelongingCircleItem);
|
||||
}
|
||||
#endif
|
||||
|
@ -429,13 +437,13 @@ void IdDialog::loadCircleGroupMeta(const uint32_t &token)
|
|||
|
||||
// find already existing items for this circle
|
||||
|
||||
// implement the search manually, because there's no find based on user role.
|
||||
// implement the search manually, because there's no find based on user role.
|
||||
//QList<QTreeWidgetItem*> clist = ui->treeWidget_membership->findItems( QString::fromStdString(vit->mGroupId.toStdString()), Qt::MatchExactly|Qt::MatchRecursive, CIRCLEGROUP_CIRCLE_COL_GROUPID);
|
||||
QList<QTreeWidgetItem*> clist ;
|
||||
QString test_str = QString::fromStdString(vit->mGroupId.toStdString()) ;
|
||||
for(QTreeWidgetItemIterator itt(ui->treeWidget_membership);*itt;++itt)
|
||||
if( (*itt)->data(CIRCLEGROUP_CIRCLE_COL_GROUPID,Qt::UserRole).toString() == test_str)
|
||||
clist.push_back(*itt) ;
|
||||
QString test_str = QString::fromStdString(vit->mGroupId.toStdString()) ;
|
||||
for(QTreeWidgetItemIterator itt(ui->treeWidget_membership);*itt;++itt)
|
||||
if( (*itt)->data(CIRCLEGROUP_CIRCLE_COL_GROUPID,Qt::UserRole).toString() == test_str)
|
||||
clist.push_back(*itt) ;
|
||||
|
||||
if(!clist.empty())
|
||||
{
|
||||
|
@ -499,7 +507,7 @@ void IdDialog::loadCircleGroupMeta(const uint32_t &token)
|
|||
mExternalOtherCircleItem->addChild(item);
|
||||
}
|
||||
#else
|
||||
ui->treeWidget_membership->addTopLevelItem(item) ;
|
||||
ui->treeWidget_membership->addTopLevelItem(item) ;
|
||||
#endif
|
||||
}
|
||||
else if(item->text(CIRCLEGROUP_CIRCLE_COL_GROUPNAME) != QString::fromUtf8(vit->mGroupName.c_str()))
|
||||
|
@ -512,11 +520,20 @@ void IdDialog::loadCircleGroupMeta(const uint32_t &token)
|
|||
// just in case.
|
||||
|
||||
item->setData(CIRCLEGROUP_CIRCLE_COL_GROUPFLAGS, Qt::UserRole, QVariant(vit->mSubscribeFlags));
|
||||
|
||||
|
||||
QString tooltip ;
|
||||
tooltip += tr("Circle ID: ")+QString::fromStdString(vit->mGroupId.toStdString()) ;
|
||||
|
||||
tooltip += "\n"+tr("Role: ");
|
||||
tooltip += "\n"+tr("Visibility: ");
|
||||
|
||||
if(details.mRestrictedCircleId == details.mCircleId)
|
||||
tooltip += tr("Private (only visible to invited members)") ;
|
||||
else if(!details.mRestrictedCircleId.isNull())
|
||||
tooltip += tr("Only visible to full members of circle ")+QString::fromStdString(details.mRestrictedCircleId.toStdString()) ;
|
||||
else
|
||||
tooltip += tr("Public") ;
|
||||
|
||||
tooltip += "\n"+tr("Your role: ");
|
||||
|
||||
if(am_I_admin)
|
||||
tooltip += tr("Administrator (Can edit invite list, and request membership).") ;
|
||||
|
@ -529,10 +546,10 @@ void IdDialog::loadCircleGroupMeta(const uint32_t &token)
|
|||
else
|
||||
tooltip += tr("unsubscribed (Only receive invite list).") ;
|
||||
|
||||
tooltip += "\n"+tr("Permissions: ") ;
|
||||
tooltip += "\n"+tr("Your status: ") ;
|
||||
|
||||
if(am_I_in_circle)
|
||||
tooltip += tr("Full member (have access to data limited to this circle)") ;
|
||||
tooltip += tr("Full member (you have access to data limited to this circle)") ;
|
||||
else
|
||||
tooltip += tr("Not a member (do not have access to data limited to this circle)") ;
|
||||
|
||||
|
@ -553,21 +570,21 @@ void IdDialog::loadCircleGroupMeta(const uint32_t &token)
|
|||
// - own GXS id is is admin and subscribed
|
||||
// - own GXS id is is subscribed
|
||||
|
||||
bool am_I_invited = false ;
|
||||
bool am_I_pending = false ;
|
||||
bool am_I_invited = false ;
|
||||
bool am_I_pending = false ;
|
||||
#ifdef ID_DEBUG
|
||||
std::cerr << " updating status of all identities for this circle:" << std::endl;
|
||||
#endif
|
||||
// remove any identity that has an item, but no subscription flag entry
|
||||
// remove any identity that has an item, but no subscription flag entry
|
||||
std::vector<QTreeWidgetItem*> to_delete ;
|
||||
|
||||
for(int k=0;k<item->childCount();++k)
|
||||
for(uint32_t k=0;k<item->childCount();++k)
|
||||
if(details.mSubscriptionFlags.find(RsGxsId(item->child(k)->data(CIRCLEGROUP_CIRCLE_COL_GROUPID,Qt::UserRole).toString().toStdString())) == details.mSubscriptionFlags.end())
|
||||
to_delete.push_back(item->child(k));
|
||||
|
||||
for(uint32_t k=0;k<to_delete.size();++k)
|
||||
delete to_delete[k] ;
|
||||
|
||||
|
||||
for(uint32_t k=0;k<to_delete.size();++k)
|
||||
delete to_delete[k] ;
|
||||
|
||||
for(std::map<RsGxsId,uint32_t>::const_iterator it(details.mSubscriptionFlags.begin());it!=details.mSubscriptionFlags.end();++it)
|
||||
{
|
||||
#ifdef ID_DEBUG
|
||||
|
@ -580,35 +597,35 @@ void IdDialog::loadCircleGroupMeta(const uint32_t &token)
|
|||
#ifdef ID_DEBUG
|
||||
std::cerr << "invited: " << invited << ", subscription: " << subscrb ;
|
||||
#endif
|
||||
QTreeWidgetItem *subitem = NULL ;
|
||||
|
||||
// see if the item already exists
|
||||
for(uint32_t k=0;k<item->childCount();++k)
|
||||
QTreeWidgetItem *subitem = NULL ;
|
||||
|
||||
// see if the item already exists
|
||||
for(uint32_t k=0;k<item->childCount();++k)
|
||||
if(item->child(k)->data(CIRCLEGROUP_CIRCLE_COL_GROUPID,Qt::UserRole).toString().toStdString() == it->first.toStdString())
|
||||
{
|
||||
subitem = item->child(k);
|
||||
{
|
||||
subitem = item->child(k);
|
||||
#ifdef ID_DEBUG
|
||||
std::cerr << " found existing sub item." << std::endl;
|
||||
std::cerr << " found existing sub item." << std::endl;
|
||||
#endif
|
||||
break ;
|
||||
}
|
||||
|
||||
break ;
|
||||
}
|
||||
|
||||
if(!(invited || subscrb))
|
||||
{
|
||||
if(subitem != NULL)
|
||||
delete subitem ;
|
||||
{
|
||||
if(subitem != NULL)
|
||||
delete subitem ;
|
||||
#ifdef ID_DEBUG
|
||||
std::cerr << ". not relevant. Skipping." << std::endl;
|
||||
#endif
|
||||
continue ;
|
||||
}
|
||||
// remove item if flags are not ok.
|
||||
|
||||
if(subitem && subitem->data(CIRCLEGROUP_CIRCLE_COL_GROUPFLAGS, Qt::UserRole).toUInt() != it->second)
|
||||
{
|
||||
delete subitem ;
|
||||
subitem = NULL ;
|
||||
}
|
||||
}
|
||||
// remove item if flags are not ok.
|
||||
|
||||
if(subitem && subitem->data(CIRCLEGROUP_CIRCLE_COL_GROUPFLAGS, Qt::UserRole).toUInt() != it->second)
|
||||
{
|
||||
delete subitem ;
|
||||
subitem = NULL ;
|
||||
}
|
||||
|
||||
if(!subitem)
|
||||
{
|
||||
|
@ -625,14 +642,14 @@ void IdDialog::loadCircleGroupMeta(const uint32_t &token)
|
|||
if(idd.mAvatar.mSize == 0 || !pixmap.loadFromData(idd.mAvatar.mData, idd.mAvatar.mSize, "PNG"))
|
||||
pixmap = QPixmap::fromImage(GxsIdDetails::makeDefaultIcon(it->first)) ;
|
||||
|
||||
if(has_id)
|
||||
if(has_id)
|
||||
subitem->setText(CIRCLEGROUP_CIRCLE_COL_GROUPNAME, QString::fromUtf8(idd.mNickname.c_str())) ;
|
||||
else
|
||||
else
|
||||
subitem->setText(CIRCLEGROUP_CIRCLE_COL_GROUPNAME, tr("Unknown ID :")+QString::fromStdString(it->first.toStdString())) ;
|
||||
|
||||
QString tooltip ;
|
||||
tooltip += tr("Identity ID: ")+QString::fromStdString(it->first.toStdString()) ;
|
||||
tooltip += "\n"+tr("Status: ") ;
|
||||
|
||||
QString tooltip ;
|
||||
tooltip += tr("Identity ID: ")+QString::fromStdString(it->first.toStdString()) ;
|
||||
tooltip += "\n"+tr("Status: ") ;
|
||||
if(invited)
|
||||
if(subscrb)
|
||||
tooltip += tr("Full member") ;
|
||||
|
@ -643,9 +660,9 @@ void IdDialog::loadCircleGroupMeta(const uint32_t &token)
|
|||
tooltip += tr("Subscription request pending") ;
|
||||
else
|
||||
tooltip += tr("unknown") ;
|
||||
|
||||
|
||||
subitem->setToolTip(CIRCLEGROUP_CIRCLE_COL_GROUPNAME, tooltip) ;
|
||||
|
||||
|
||||
subitem->setData(CIRCLEGROUP_CIRCLE_COL_GROUPFLAGS, Qt::UserRole, QVariant(it->second)) ;
|
||||
subitem->setData(CIRCLEGROUP_CIRCLE_COL_GROUPID, Qt::UserRole, QString::fromStdString(it->first.toStdString())) ;
|
||||
|
||||
|
@ -655,23 +672,23 @@ void IdDialog::loadCircleGroupMeta(const uint32_t &token)
|
|||
}
|
||||
|
||||
if(invited && !subscrb)
|
||||
{
|
||||
{
|
||||
subitem->setText(CIRCLEGROUP_CIRCLE_COL_GROUPID, tr("Invited")) ;
|
||||
|
||||
if(is_own_id)
|
||||
|
||||
if(is_own_id)
|
||||
am_I_invited = true ;
|
||||
}
|
||||
}
|
||||
if(!invited && subscrb)
|
||||
{
|
||||
subitem->setText(CIRCLEGROUP_CIRCLE_COL_GROUPID, tr("Subscription pending")) ;
|
||||
|
||||
if(is_own_id)
|
||||
|
||||
if(is_own_id)
|
||||
am_I_pending = true ;
|
||||
}
|
||||
}
|
||||
if(invited && subscrb)
|
||||
subitem->setText(CIRCLEGROUP_CIRCLE_COL_GROUPID, tr("Member")) ;
|
||||
|
||||
if (is_own_id)
|
||||
|
||||
if (is_own_id)
|
||||
{
|
||||
QFont font = subitem->font(CIRCLEGROUP_CIRCLE_COL_GROUPNAME) ;
|
||||
font.setBold(true) ;
|
||||
|
@ -680,13 +697,15 @@ void IdDialog::loadCircleGroupMeta(const uint32_t &token)
|
|||
subitem->setFont(CIRCLEGROUP_CIRCLE_COL_GROUPFLAGS,font) ;
|
||||
}
|
||||
}
|
||||
|
||||
if(am_I_in_circle)
|
||||
item->setIcon(CIRCLEGROUP_CIRCLE_COL_GROUPNAME,QIcon(IMAGE_MEMBER)) ;
|
||||
else if(am_I_invited || am_I_pending)
|
||||
item->setIcon(CIRCLEGROUP_CIRCLE_COL_GROUPNAME,QIcon(IMAGE_INVITED)) ;
|
||||
else
|
||||
item->setIcon(CIRCLEGROUP_CIRCLE_COL_GROUPNAME,QIcon()) ;
|
||||
|
||||
if(am_I_in_circle)
|
||||
item->setIcon(CIRCLEGROUP_CIRCLE_COL_GROUPNAME,QIcon(IMAGE_MEMBER)) ;
|
||||
else if(am_I_admin)
|
||||
item->setIcon(CIRCLEGROUP_CIRCLE_COL_GROUPNAME,QIcon(IMAGE_ADMIN)) ;
|
||||
else if(am_I_invited || am_I_pending)
|
||||
item->setIcon(CIRCLEGROUP_CIRCLE_COL_GROUPNAME,QIcon(IMAGE_INVITED)) ;
|
||||
else
|
||||
item->setIcon(CIRCLEGROUP_CIRCLE_COL_GROUPNAME,QIcon(IMAGE_UNKNOWN)) ;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -748,6 +767,58 @@ void IdDialog::loadCircleGroupData(const uint32_t& token)
|
|||
mStateHelper->setLoading(CIRCLESDIALOG_GROUPDATA, false);
|
||||
}
|
||||
|
||||
void IdDialog::updateCircleGroup(const uint32_t& token)
|
||||
{
|
||||
#ifdef ID_DEBUG
|
||||
std::cerr << "Loading circle info" << std::endl;
|
||||
#endif
|
||||
|
||||
std::vector<RsGxsCircleGroup> circle_grp_v ;
|
||||
rsGxsCircles->getGroupData(token, circle_grp_v);
|
||||
|
||||
if (circle_grp_v.empty())
|
||||
{
|
||||
std::cerr << "(EE) unexpected empty result from getGroupData. Cannot process circle now!" << std::endl;
|
||||
return ;
|
||||
}
|
||||
|
||||
if (circle_grp_v.size() != 1)
|
||||
{
|
||||
std::cerr << "(EE) very weird result from getGroupData. Should get exactly one circle" << std::endl;
|
||||
return ;
|
||||
}
|
||||
|
||||
RsGxsCircleGroup cg = circle_grp_v.front();
|
||||
|
||||
/* now mark all the members */
|
||||
|
||||
std::set<RsGxsId> members = cg.mInvitedMembers;
|
||||
|
||||
std::map<uint32_t,CircleUpdateOrder>::iterator it = mCircleUpdates.find(token) ;
|
||||
|
||||
if(it == mCircleUpdates.end())
|
||||
{
|
||||
std::cerr << "(EE) Cannot find token " << token << " to perform group update!" << std::endl;
|
||||
return ;
|
||||
}
|
||||
|
||||
if(it->second.action == CircleUpdateOrder::GRANT_MEMBERSHIP)
|
||||
cg.mInvitedMembers.insert(it->second.gxs_id) ;
|
||||
else if(it->second.action == CircleUpdateOrder::REVOKE_MEMBERSHIP)
|
||||
cg.mInvitedMembers.erase(it->second.gxs_id) ;
|
||||
else
|
||||
{
|
||||
std::cerr << "(EE) unrecognised membership action to perform: " << it->second.action << "!" << std::endl;
|
||||
return ;
|
||||
}
|
||||
|
||||
uint32_t token2 ;
|
||||
rsGxsCircles->updateGroup(token2,cg) ;
|
||||
|
||||
mCircleUpdates.erase(it) ;
|
||||
requestCircleGroupMeta();
|
||||
}
|
||||
|
||||
bool IdDialog::getItemCircleId(QTreeWidgetItem *item,RsGxsCircleId& id)
|
||||
{
|
||||
#ifdef CIRCLE_MEMBERSHIP_CATEGORIES
|
||||
|
@ -791,6 +862,58 @@ void IdDialog::showEditExistingCircle()
|
|||
requestCircleGroupMeta(); // update GUI
|
||||
}
|
||||
|
||||
void IdDialog::grantCircleMembership()
|
||||
{
|
||||
RsGxsCircleId circle_id ;
|
||||
|
||||
if(!getItemCircleId(ui->treeWidget_membership->currentItem(),circle_id))
|
||||
return;
|
||||
|
||||
RsGxsId gxs_id_to_revoke(qobject_cast<QAction*>(sender())->data().toString().toStdString());
|
||||
|
||||
RsTokReqOptions opts;
|
||||
opts.mReqType = GXS_REQUEST_TYPE_GROUP_DATA;
|
||||
|
||||
std::list<RsGxsGroupId> grps ;
|
||||
grps.push_back(RsGxsGroupId(circle_id));
|
||||
|
||||
uint32_t token;
|
||||
mCircleQueue->requestGroupInfo(token, RS_TOKREQ_ANSTYPE_DATA, opts, grps, CIRCLESDIALOG_GROUPUPDATE);
|
||||
|
||||
CircleUpdateOrder c ;
|
||||
c.token = token ;
|
||||
c.gxs_id = gxs_id_to_revoke ;
|
||||
c.action = CircleUpdateOrder::GRANT_MEMBERSHIP ;
|
||||
|
||||
mCircleUpdates[token] = c ;
|
||||
}
|
||||
|
||||
void IdDialog::revokeCircleMembership()
|
||||
{
|
||||
RsGxsCircleId circle_id ;
|
||||
|
||||
if(!getItemCircleId(ui->treeWidget_membership->currentItem(),circle_id))
|
||||
return;
|
||||
|
||||
RsGxsId gxs_id_to_revoke(qobject_cast<QAction*>(sender())->data().toString().toStdString());
|
||||
|
||||
RsTokReqOptions opts;
|
||||
opts.mReqType = GXS_REQUEST_TYPE_GROUP_DATA;
|
||||
|
||||
std::list<RsGxsGroupId> grps ;
|
||||
grps.push_back(RsGxsGroupId(circle_id));
|
||||
|
||||
uint32_t token;
|
||||
mCircleQueue->requestGroupInfo(token, RS_TOKREQ_ANSTYPE_DATA, opts, grps, CIRCLESDIALOG_GROUPUPDATE);
|
||||
|
||||
CircleUpdateOrder c ;
|
||||
c.token = token ;
|
||||
c.gxs_id = gxs_id_to_revoke ;
|
||||
c.action = CircleUpdateOrder::REVOKE_MEMBERSHIP ;
|
||||
|
||||
mCircleUpdates[token] = c ;
|
||||
}
|
||||
|
||||
void IdDialog::acceptCircleSubscription()
|
||||
{
|
||||
RsGxsCircleId circle_id ;
|
||||
|
@ -828,6 +951,7 @@ void IdDialog::CircleListCustomPopupMenu( QPoint )
|
|||
RsGxsId current_gxs_id ;
|
||||
RsGxsId item_id(item->data(CIRCLEGROUP_CIRCLE_COL_GROUPID,Qt::UserRole).toString().toStdString());
|
||||
bool is_circle ;
|
||||
bool am_I_circle_admin = false ;
|
||||
|
||||
if(item_id == RsGxsId(circle_id)) // is it a circle?
|
||||
{
|
||||
|
@ -838,11 +962,14 @@ void IdDialog::CircleListCustomPopupMenu( QPoint )
|
|||
{
|
||||
#endif
|
||||
if(group_flags & GXS_SERV::GROUP_SUBSCRIBE_ADMIN)
|
||||
{
|
||||
contextMnu.addAction(QIcon(IMAGE_EDIT), tr("Edit Circle"), this, SLOT(showEditExistingCircle()));
|
||||
am_I_circle_admin = true ;
|
||||
}
|
||||
else
|
||||
contextMnu.addAction(QIcon(IMAGE_EDIT), tr("See details"), this, SLOT(showEditExistingCircle()));
|
||||
contextMnu.addAction(QIcon(IMAGE_INFO), tr("See details"), this, SLOT(showEditExistingCircle()));
|
||||
#ifdef CIRCLE_MEMBERSHIP_CATEGORIES
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
std::cerr << " Item is a circle item. Adding Edit/Details menu entry." << std::endl;
|
||||
|
@ -850,10 +977,16 @@ void IdDialog::CircleListCustomPopupMenu( QPoint )
|
|||
|
||||
contextMnu.addSeparator() ;
|
||||
}
|
||||
else if(rsIdentity->isOwnId(item_id)) // is it one of our GXS ids?
|
||||
else
|
||||
{
|
||||
current_gxs_id = RsGxsId(item_id);
|
||||
is_circle =false ;
|
||||
is_circle =false ;
|
||||
|
||||
if(item->parent() != NULL)
|
||||
{
|
||||
uint32_t group_flags = item->parent()->data(CIRCLEGROUP_CIRCLE_COL_GROUPFLAGS, Qt::UserRole).toUInt();
|
||||
am_I_circle_admin = bool(group_flags & GXS_SERV::GROUP_SUBSCRIBE_ADMIN) ;
|
||||
}
|
||||
|
||||
std::cerr << " Item is a GxsId item. Requesting flags/group id from parent: " << circle_id << std::endl;
|
||||
}
|
||||
|
@ -872,7 +1005,7 @@ void IdDialog::CircleListCustomPopupMenu( QPoint )
|
|||
static const int CANCEL = 3 ; // Admin list: no Subscription request: yes
|
||||
|
||||
const QString menu_titles[4] = { tr("Request subscription"), tr("Accept circle invitation"), tr("Quit this circle"),tr("Cancel subscribe request")} ;
|
||||
const QString image_names[4] = { ":/images/edit_16.png",":/images/edit_16.png",":/images/edit_16.png",":/images/edit_16.png" } ;
|
||||
const QString image_names[4] = { ":/images/edit_add24.png",":/images/accepted16.png",":/images/door_in.png",":/images/cancel.png" } ;
|
||||
|
||||
std::vector< std::vector<RsGxsId> > ids(4) ;
|
||||
|
||||
|
@ -911,7 +1044,7 @@ void IdDialog::CircleListCustomPopupMenu( QPoint )
|
|||
RsIdentityDetails det ;
|
||||
QString id_name ;
|
||||
if(rsIdentity->getIdDetails(ids[i][0],det))
|
||||
id_name = tr("for identity ")+QString::fromUtf8(det.mNickname.c_str()) + "(ID=" + QString::fromStdString(ids[i][0].toStdString()) + ")" ;
|
||||
id_name = tr("for identity ")+QString::fromUtf8(det.mNickname.c_str()) + " (ID=" + QString::fromStdString(ids[i][0].toStdString()) + ")" ;
|
||||
else
|
||||
id_name = tr("for identity ")+QString::fromStdString(ids[i][0].toStdString()) ;
|
||||
|
||||
|
@ -939,7 +1072,7 @@ void IdDialog::CircleListCustomPopupMenu( QPoint )
|
|||
RsIdentityDetails det ;
|
||||
QString id_name ;
|
||||
if(rsIdentity->getIdDetails(ids[i][j],det))
|
||||
id_name = tr("for identity ")+QString::fromUtf8(det.mNickname.c_str()) + "(ID=" + QString::fromStdString(ids[i][j].toStdString()) + ")" ;
|
||||
id_name = tr("for identity ")+QString::fromUtf8(det.mNickname.c_str()) + " (ID=" + QString::fromStdString(ids[i][j].toStdString()) + ")" ;
|
||||
else
|
||||
id_name = tr("for identity ")+QString::fromStdString(ids[i][j].toStdString()) ;
|
||||
|
||||
|
@ -957,6 +1090,32 @@ void IdDialog::CircleListCustomPopupMenu( QPoint )
|
|||
contextMnu.addMenu(menu) ;
|
||||
}
|
||||
}
|
||||
|
||||
if(!is_circle && am_I_circle_admin) // I am circle admin. I can therefore revoke/accept membership
|
||||
{
|
||||
std::map<RsGxsId,uint32_t>::const_iterator it = details.mSubscriptionFlags.find(current_gxs_id) ;
|
||||
|
||||
if(!current_gxs_id.isNull() && it != details.mSubscriptionFlags.end())
|
||||
{
|
||||
contextMnu.addSeparator() ;
|
||||
|
||||
if(it->second & GXS_EXTERNAL_CIRCLE_FLAGS_IN_ADMIN_LIST)
|
||||
{
|
||||
QAction *action = new QAction(tr("Revoke this member"),this) ;
|
||||
action->setData(QString::fromStdString(current_gxs_id.toStdString()));
|
||||
QObject::connect(action,SIGNAL(triggered()), this, SLOT(revokeCircleMembership()));
|
||||
contextMnu.addAction(action) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
QAction *action = new QAction(tr("Grant membership"),this) ;
|
||||
action->setData(QString::fromStdString(current_gxs_id.toStdString()));
|
||||
QObject::connect(action,SIGNAL(triggered()), this, SLOT(grantCircleMembership()));
|
||||
contextMnu.addAction(action) ;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
contextMnu.exec(QCursor::pos());
|
||||
}
|
||||
|
@ -1796,6 +1955,10 @@ void IdDialog::loadRequest(const TokenQueue * queue, const TokenRequest &req)
|
|||
loadCircleGroupData(req.mToken);
|
||||
break;
|
||||
|
||||
case CIRCLESDIALOG_GROUPUPDATE:
|
||||
updateCircleGroup(req.mToken);
|
||||
break;
|
||||
|
||||
default:
|
||||
std::cerr << "CirclesDialog::loadRequest() ERROR: INVALID TYPE";
|
||||
std::cerr << std::endl;
|
||||
|
@ -1914,13 +2077,13 @@ void IdDialog::IdListCustomPopupMenu( QPoint )
|
|||
contextMnu.addSeparator();
|
||||
|
||||
if(n_positive_reputations == 0) // only unban when all items are banned
|
||||
contextMnu.addAction(QIcon(), tr("Set positive opinion"), this, SLOT(positivePerson()));
|
||||
contextMnu.addAction(QIcon(":/images/vote_up.png"), tr("Set positive opinion"), this, SLOT(positivePerson()));
|
||||
|
||||
if(n_neutral_reputations == 0) // only unban when all items are banned
|
||||
contextMnu.addAction(QIcon(), tr("Set neutral opinion"), this, SLOT(neutralPerson()));
|
||||
contextMnu.addAction(QIcon(":/images/vote_neutral.png"), tr("Set neutral opinion"), this, SLOT(neutralPerson()));
|
||||
|
||||
if(n_negative_reputations == 0)
|
||||
contextMnu.addAction(QIcon(":/images/denied16.png"), tr("Set negative opinion"), this, SLOT(negativePerson()));
|
||||
contextMnu.addAction(QIcon(":/images/vote_down.png"), tr("Set negative opinion"), this, SLOT(negativePerson()));
|
||||
}
|
||||
|
||||
if(one_item_owned_by_you && n_selected_items==1)
|
||||
|
|
|
@ -39,6 +39,15 @@ class IdDialog;
|
|||
class UIStateHelper;
|
||||
class QTreeWidgetItem;
|
||||
|
||||
struct CircleUpdateOrder
|
||||
{
|
||||
enum { UNKNOWN_ACTION=0x00, GRANT_MEMBERSHIP=0x01, REVOKE_MEMBERSHIP=0x02 };
|
||||
|
||||
uint32_t token ;
|
||||
RsGxsId gxs_id ;
|
||||
uint32_t action ;
|
||||
};
|
||||
|
||||
class IdDialog : public RsGxsUpdateBroadcastPage, public TokenResponse
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -55,21 +64,24 @@ public:
|
|||
|
||||
protected:
|
||||
virtual void updateDisplay(bool complete);
|
||||
|
||||
void loadCircleGroupMeta(const uint32_t &token);
|
||||
void loadCircleGroupData(const uint32_t &token);
|
||||
|
||||
void requestCircleGroupMeta();
|
||||
void requestCircleGroupData(const RsGxsCircleId& circle_id);
|
||||
bool getItemCircleId(QTreeWidgetItem *item,RsGxsCircleId& id) ;
|
||||
|
||||
|
||||
void loadCircleGroupMeta(const uint32_t &token);
|
||||
void loadCircleGroupData(const uint32_t &token);
|
||||
void updateCircleGroup(const uint32_t& token);
|
||||
|
||||
void requestCircleGroupMeta();
|
||||
//void requestCircleGroupData(const RsGxsCircleId& circle_id);
|
||||
bool getItemCircleId(QTreeWidgetItem *item,RsGxsCircleId& id) ;
|
||||
|
||||
private slots:
|
||||
void createExternalCircle();
|
||||
void showEditExistingCircle();
|
||||
void createExternalCircle();
|
||||
void showEditExistingCircle();
|
||||
void updateCirclesDisplay();
|
||||
|
||||
void acceptCircleSubscription() ;
|
||||
void cancelCircleSubscription() ;
|
||||
|
||||
void acceptCircleSubscription() ;
|
||||
void cancelCircleSubscription() ;
|
||||
void grantCircleMembership() ;
|
||||
void revokeCircleMembership() ;
|
||||
|
||||
void filterComboBoxChanged();
|
||||
void filterChanged(const QString &text);
|
||||
|
@ -94,12 +106,12 @@ private slots:
|
|||
#endif
|
||||
|
||||
void addtoContacts();
|
||||
void removefromContacts();
|
||||
void removefromContacts();
|
||||
|
||||
void negativePerson();
|
||||
void positivePerson();
|
||||
void neutralPerson();
|
||||
|
||||
|
||||
static QString inviteMessage();
|
||||
void sendInvite();
|
||||
|
||||
|
@ -132,7 +144,9 @@ private:
|
|||
QTreeWidgetItem *ownItem;
|
||||
QTreeWidgetItem *mExternalBelongingCircleItem;
|
||||
QTreeWidgetItem *mExternalOtherCircleItem;
|
||||
RsGxsUpdateBroadcastBase *mCirclesBroadcastBase ;
|
||||
RsGxsUpdateBroadcastBase *mCirclesBroadcastBase ;
|
||||
|
||||
std::map<uint32_t, CircleUpdateOrder> mCircleUpdates ;
|
||||
|
||||
RsGxsGroupId mId;
|
||||
|
||||
|
|
|
@ -123,14 +123,14 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::Wi
|
|||
|
||||
{
|
||||
QIcon icon ;
|
||||
icon.addPixmap(QPixmap(":/images/edit_add24.png")) ;
|
||||
icon.addPixmap(QPixmap(":/images/user/add_user24.png")) ;
|
||||
inviteFriendsButton->setIcon(icon) ;
|
||||
inviteFriendsButton->setIconSize(QSize(2*S,2*S)) ;
|
||||
}
|
||||
|
||||
connect(inviteFriendsButton, SIGNAL(clicked()), this , SLOT(inviteFriends()));
|
||||
|
||||
getChatWidget()->addChatBarWidget(inviteFriendsButton) ;
|
||||
getChatWidget()->addTitleBarWidget(inviteFriendsButton) ;
|
||||
|
||||
RsGxsId current_id;
|
||||
rsMsgs->getIdentityForChatLobby(lobbyId, current_id);
|
||||
|
@ -159,7 +159,7 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::Wi
|
|||
QIcon icon ;
|
||||
icon.addPixmap(QPixmap(":/images/door_in.png")) ;
|
||||
unsubscribeButton->setIcon(icon) ;
|
||||
unsubscribeButton->setIconSize(QSize(1.5*S,1.5*S)) ;
|
||||
unsubscribeButton->setIconSize(QSize(2*S,2*S)) ;
|
||||
}
|
||||
|
||||
/* Initialize splitter */
|
||||
|
@ -168,7 +168,7 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::Wi
|
|||
|
||||
connect(unsubscribeButton, SIGNAL(clicked()), this , SLOT(leaveLobby()));
|
||||
|
||||
getChatWidget()->addChatBarWidget(unsubscribeButton) ;
|
||||
getChatWidget()->addTitleBarWidget(unsubscribeButton) ;
|
||||
}
|
||||
|
||||
void ChatLobbyDialog::leaveLobby()
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<property name="windowTitle">
|
||||
<string notr="true">MainWindow</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<layout class="QHBoxLayout" name="ChatLobbyDialogHLayout">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
|
@ -52,7 +52,7 @@
|
|||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<layout class="QVBoxLayout" name="participantsFrameVLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
|
|
|
@ -121,6 +121,7 @@ ChatWidget::ChatWidget(QWidget *parent) :
|
|||
|
||||
ui->actionSearchWithoutLimit->setText(tr("Don't stop to color after")+" "+QString::number(uiMaxSearchLimitColor)+" "+tr("items found (need more CPU)"));
|
||||
|
||||
ui->markButton->setVisible(false);
|
||||
ui->leSearch->setVisible(false);
|
||||
ui->searchBefore->setVisible(false);
|
||||
ui->searchBefore->setToolTip(tr("<b>Find Previous </b><br/><i>Ctrl+Shift+G</i>"));
|
||||
|
@ -183,6 +184,8 @@ ChatWidget::ChatWidget(QWidget *parent) :
|
|||
menu->addAction(ui->actionChooseFont);
|
||||
menu->addAction(ui->actionChooseColor);
|
||||
menu->addAction(ui->actionResetFont);
|
||||
menu->addAction(ui->actionNoEmbed);
|
||||
menu->addAction(ui->actionSendAsPlainText);
|
||||
ui->fontButton->setMenu(menu);
|
||||
|
||||
menu = new QMenu();
|
||||
|
@ -191,7 +194,8 @@ ChatWidget::ChatWidget(QWidget *parent) :
|
|||
menu->addAction(ui->actionSaveChatHistory);
|
||||
menu->addAction(ui->actionMessageHistory);
|
||||
ui->pushtoolsButton->setMenu(menu);
|
||||
|
||||
ui->actionSendAsPlainText->setChecked(Settings->getChatSendAsPlainTextByDef());
|
||||
|
||||
ui->textBrowser->installEventFilter(this);
|
||||
ui->textBrowser->viewport()->installEventFilter(this);
|
||||
ui->chatTextEdit->installEventFilter(this);
|
||||
|
@ -899,7 +903,8 @@ void ChatWidget::addChatMsg(bool incoming, const QString &name, const RsGxsId gx
|
|||
|
||||
// embed smileys ?
|
||||
if (Settings->valueFromGroup(QString("Chat"), QString::fromUtf8("Emoteicons_PrivatChat"), true).toBool()) {
|
||||
formatTextFlag |= RSHTML_FORMATTEXT_EMBED_SMILEYS;
|
||||
if (!message.contains("NoEmbed=\"true\""))
|
||||
formatTextFlag |= RSHTML_FORMATTEXT_EMBED_SMILEYS;
|
||||
}
|
||||
|
||||
// Always fix colors
|
||||
|
@ -1134,7 +1139,12 @@ void ChatWidget::sendChat()
|
|||
}
|
||||
|
||||
QString text;
|
||||
RsHtml::optimizeHtml(chatWidget, text);
|
||||
if (ui->actionSendAsPlainText->isChecked()){
|
||||
text = chatWidget->toPlainText();
|
||||
text.replace(QChar(-4),"");//Char used when image on text.
|
||||
} else {
|
||||
RsHtml::optimizeHtml(chatWidget, text, (ui->actionNoEmbed->isChecked() ? RSHTML_FORMATTEXT_NO_EMBED : 0));
|
||||
}
|
||||
std::string msg = text.toUtf8().constData();
|
||||
|
||||
if (msg.empty()) {
|
||||
|
@ -1188,7 +1198,7 @@ void ChatWidget::on_searchButton_clicked(bool bValue)
|
|||
qtcCurrent=QTextCursor(qtdDocument);
|
||||
}
|
||||
ui->leSearch->setVisible(bValue);
|
||||
|
||||
ui->markButton->setVisible(bValue);
|
||||
}
|
||||
void ChatWidget::on_searchBefore_clicked()
|
||||
{
|
||||
|
|
|
@ -1034,6 +1034,36 @@ border-image: url(:/images/closepressed.png)
|
|||
<string>Save image</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSendAsPlainText">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/SimpleText.png</normaloff>:/images/SimpleText.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Send as PlainText</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Send as plain text without font.</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionNoEmbed">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/SmileyText.png</normaloff>:/images/SmileyText.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Don't replace tag with Emote Icon.</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Don't replace tag with Emote Icon.</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
|
|
@ -103,9 +103,6 @@ ConfCertDialog::ConfCertDialog(const RsPeerId& id, const RsPgpId &pgp_id, QWidge
|
|||
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close()));
|
||||
connect(ui._shouldAddSignatures_CB, SIGNAL(toggled(bool)), this, SLOT(loadInvitePage()));
|
||||
|
||||
//connect(ui.denyFriendButton, SIGNAL(clicked()), this, SLOT(denyFriend()));
|
||||
//connect(ui._shouldAddSignatures_CB_2, SIGNAL(toggled(bool)), this, SLOT(loadInvitePage()));
|
||||
|
||||
ui.avatar->setFrameType(AvatarWidget::NORMAL_FRAME);
|
||||
|
||||
MainWindow *w = MainWindow::getInstance();
|
||||
|
@ -116,32 +113,16 @@ ConfCertDialog::ConfCertDialog(const RsPeerId& id, const RsPgpId &pgp_id, QWidge
|
|||
|
||||
ConfCertDialog::~ConfCertDialog()
|
||||
{
|
||||
// if(peerId.isNull())
|
||||
{
|
||||
QMap<RsPeerId, ConfCertDialog*>::iterator it = instances_ssl.find(peerId);
|
||||
if (it != instances_ssl.end())
|
||||
instances_ssl.erase(it);
|
||||
}
|
||||
// else
|
||||
{
|
||||
QMap<RsPgpId, ConfCertDialog*>::iterator it = instances_pgp.find(pgpId);
|
||||
if (it != instances_pgp.end())
|
||||
instances_pgp.erase(it);
|
||||
}
|
||||
QMap<RsPeerId, ConfCertDialog*>::iterator it = instances_ssl.find(peerId);
|
||||
if (it != instances_ssl.end())
|
||||
instances_ssl.erase(it);
|
||||
|
||||
QMap<RsPgpId, ConfCertDialog*>::iterator it2 = instances_pgp.find(pgpId);
|
||||
if (it2 != instances_pgp.end())
|
||||
instances_pgp.erase(it2);
|
||||
}
|
||||
|
||||
|
||||
void ConfCertDialog::setServiceFlags()
|
||||
{
|
||||
ServicePermissionFlags flags(0) ;
|
||||
|
||||
if( ui._direct_transfer_CB->isChecked()) flags = flags | RS_NODE_PERM_DIRECT_DL ;
|
||||
if( ui._allow_push_CB->isChecked()) flags = flags | RS_NODE_PERM_ALLOW_PUSH ;
|
||||
if( ui._require_WL_CB->isChecked()) flags = flags | RS_NODE_PERM_REQUIRE_WL ;
|
||||
|
||||
rsPeers->setServicePermissionFlags(pgpId,flags) ;
|
||||
}
|
||||
|
||||
void ConfCertDialog::loadAll()
|
||||
{
|
||||
for(QMap<RsPeerId, ConfCertDialog*>::iterator it = instances_ssl.begin(); it != instances_ssl.end(); ++it) it.value()->load();
|
||||
|
@ -161,10 +142,6 @@ void ConfCertDialog::load()
|
|||
return;
|
||||
}
|
||||
|
||||
ui._direct_transfer_CB->setChecked( detail.service_perm_flags & RS_NODE_PERM_DIRECT_DL ) ;
|
||||
ui._allow_push_CB->setChecked( detail.service_perm_flags & RS_NODE_PERM_ALLOW_PUSH) ;
|
||||
ui._require_WL_CB->setChecked( detail.service_perm_flags & RS_NODE_PERM_REQUIRE_WL) ;
|
||||
|
||||
//ui.pgpfingerprint->setText(QString::fromUtf8(detail.name.c_str()));
|
||||
ui.peerid->setText(QString::fromStdString(detail.id.toStdString()));
|
||||
|
||||
|
@ -349,55 +326,53 @@ void ConfCertDialog::applyDialog()
|
|||
RsPeerDetails detail;
|
||||
if (!rsPeers->getPeerDetails(peerId, detail))
|
||||
{
|
||||
if (!rsPeers->getGPGDetails(pgpId, detail)) {
|
||||
QMessageBox::information(this,
|
||||
tr("RetroShare"),
|
||||
tr("Error : cannot get peer details."));
|
||||
close();
|
||||
return;
|
||||
}
|
||||
if (!rsPeers->getGPGDetails(pgpId, detail)) {
|
||||
QMessageBox::information(this,
|
||||
tr("RetroShare"),
|
||||
tr("Error : cannot get peer details."));
|
||||
close();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(!detail.isHiddenNode)
|
||||
{
|
||||
/* check if the data is the same */
|
||||
bool localChanged = false;
|
||||
bool extChanged = false;
|
||||
bool dnsChanged = false;
|
||||
if(!detail.isHiddenNode)
|
||||
{
|
||||
/* check if the data is the same */
|
||||
bool localChanged = false;
|
||||
bool extChanged = false;
|
||||
bool dnsChanged = false;
|
||||
|
||||
/* set local address */
|
||||
if ((detail.localAddr != ui.localAddress->text().toStdString()) || (detail.localPort != ui.localPort -> value()))
|
||||
localChanged = true;
|
||||
/* set local address */
|
||||
if ((detail.localAddr != ui.localAddress->text().toStdString()) || (detail.localPort != ui.localPort -> value()))
|
||||
localChanged = true;
|
||||
|
||||
if ((detail.extAddr != ui.extAddress->text().toStdString()) || (detail.extPort != ui.extPort -> value()))
|
||||
extChanged = true;
|
||||
if ((detail.extAddr != ui.extAddress->text().toStdString()) || (detail.extPort != ui.extPort -> value()))
|
||||
extChanged = true;
|
||||
|
||||
if ((detail.dyndns != ui.dynDNS->text().toStdString()))
|
||||
dnsChanged = true;
|
||||
if ((detail.dyndns != ui.dynDNS->text().toStdString()))
|
||||
dnsChanged = true;
|
||||
|
||||
/* now we can action the changes */
|
||||
if (localChanged)
|
||||
rsPeers->setLocalAddress(peerId, ui.localAddress->text().toStdString(), ui.localPort->value());
|
||||
/* now we can action the changes */
|
||||
if (localChanged)
|
||||
rsPeers->setLocalAddress(peerId, ui.localAddress->text().toStdString(), ui.localPort->value());
|
||||
|
||||
if (extChanged)
|
||||
rsPeers->setExtAddress(peerId,ui.extAddress->text().toStdString(), ui.extPort->value());
|
||||
if (extChanged)
|
||||
rsPeers->setExtAddress(peerId,ui.extAddress->text().toStdString(), ui.extPort->value());
|
||||
|
||||
if (dnsChanged)
|
||||
rsPeers->setDynDNS(peerId, ui.dynDNS->text().toStdString());
|
||||
if (dnsChanged)
|
||||
rsPeers->setDynDNS(peerId, ui.dynDNS->text().toStdString());
|
||||
|
||||
if(localChanged || extChanged || dnsChanged)
|
||||
emit configChanged();
|
||||
}
|
||||
else
|
||||
{
|
||||
if((detail.hiddenNodeAddress != ui.localAddress->text().toStdString()) || (detail.hiddenNodePort != ui.localPort->value()))
|
||||
{
|
||||
rsPeers->setHiddenNode(peerId,ui.localAddress->text().toStdString(), ui.localPort->value());
|
||||
emit configChanged();
|
||||
}
|
||||
}
|
||||
|
||||
setServiceFlags() ;
|
||||
if(localChanged || extChanged || dnsChanged)
|
||||
emit configChanged();
|
||||
}
|
||||
else
|
||||
{
|
||||
if((detail.hiddenNodeAddress != ui.localAddress->text().toStdString()) || (detail.hiddenNodePort != ui.localPort->value()))
|
||||
{
|
||||
rsPeers->setHiddenNode(peerId,ui.localAddress->text().toStdString(), ui.localPort->value());
|
||||
emit configChanged();
|
||||
}
|
||||
}
|
||||
|
||||
loadAll();
|
||||
close();
|
||||
|
|
|
@ -76,11 +76,7 @@ private:
|
|||
|
||||
private slots:
|
||||
void applyDialog();
|
||||
//void makeFriend();
|
||||
//void denyFriend();
|
||||
//void signGPGKey();
|
||||
void loadInvitePage();
|
||||
void setServiceFlags();
|
||||
|
||||
void showHelpDialog();
|
||||
/** Called when a child window requests the given help <b>topic</b>. */
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>678</width>
|
||||
<height>727</height>
|
||||
<width>742</width>
|
||||
<height>915</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -35,6 +35,7 @@
|
|||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<zorder>stabWidget</zorder>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
|
@ -60,7 +61,7 @@
|
|||
<item row="0" column="0">
|
||||
<widget class="QTabWidget" name="stabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="icon">
|
||||
|
@ -407,6 +408,13 @@
|
|||
<string>Retroshare Certificate</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Use this certificate to make friends:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="userCertificateText"/>
|
||||
</item>
|
||||
|
@ -436,60 +444,6 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_4">
|
||||
<attribute name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/admin-16.png</normaloff>:/images/admin-16.png</iconset>
|
||||
</attribute>
|
||||
<attribute name="title">
|
||||
<string>Options</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="3" column="0" colspan="2">
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>196</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="_direct_transfer_CB">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p align="justify">Retroshare periodically checks your friend lists for browsable files matching your transfers, to establish a direct transfer. In this case, your friend knows you're downloading the file.</p><p align="justify">To prevent this behavior for this friend only, uncheck this box. You can still perform a direct transfer if you explicitly ask for it, by e.g. downloading from your friend's file list. </p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use as direct source, when available</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="_allow_push_CB">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>This option allows you to automatically download a file that is recommended in an message coming from this node. This can be used for instance to send files between your own nodes.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Auto-download recommended files from this node</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="_require_WL_CB">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Peers that have this option cannot connect if their connection address is not in the whitelist. This protects you from traffic forwarding attacks. When used, rejected peers will be reported by &quot;security feed items&quot; in the News Feed section. From there, you can whitelist/blacklist their IP.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Require white list clearance</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
|
@ -145,45 +145,24 @@ void PGPKeyDialog::load()
|
|||
ui.make_friend_button->setToolTip("") ;
|
||||
}
|
||||
|
||||
|
||||
//ui._direct_transfer_CB->setChecked( detail.service_perm_flags & RS_NODE_PERM_DIRECT_DL ) ;
|
||||
//ui._allow_push_CB->setChecked( detail.service_perm_flags & RS_NODE_PERM_ALLOW_PUSH) ;
|
||||
|
||||
ui.name->setText(QString::fromUtf8(detail.name.c_str()));
|
||||
//ui.peerid->setText(QString::fromStdString(detail.id.toStdString()));
|
||||
|
||||
//RetroShareLink link;
|
||||
//link.createPerson(detail.gpg_id);
|
||||
|
||||
//ui.rsid->setText(QString::fromStdString(detail.gpg_id.toStdString())) ;
|
||||
ui.pgpfingerprint->setText(misc::fingerPrintStyleSplit(QString::fromStdString(detail.fpr.toStdString())));
|
||||
//ui.rsid->setToolTip(link.title());
|
||||
|
||||
//ui.avatar->setId(pgpId.toStdString(), true);
|
||||
|
||||
// ui.rsid->show();
|
||||
// ui.peerid->hide();
|
||||
// ui.label_id->hide();
|
||||
// ui.label_rsid->show();
|
||||
|
||||
ui.pgpfingerprint->show();
|
||||
ui.pgpfingerprint_label->show();
|
||||
|
||||
// ui.loc->hide();
|
||||
// ui.label_loc->hide();
|
||||
// ui.statusline->hide();
|
||||
// ui.label_status->hide();
|
||||
// ui.lastcontact->hide();
|
||||
// ui.label_last_contact->hide();
|
||||
// ui.version->hide();
|
||||
// ui.label_version->hide();
|
||||
// ui.groupBox_4->hide();
|
||||
// ui.crypto_info->hide();
|
||||
// ui.crypto_label->hide();
|
||||
|
||||
// ui.groupBox->hide();
|
||||
// ui.tabWidget->hide();
|
||||
ui._direct_transfer_CB->setChecked( detail.service_perm_flags & RS_NODE_PERM_DIRECT_DL ) ;
|
||||
ui._allow_push_CB->setChecked( detail.service_perm_flags & RS_NODE_PERM_ALLOW_PUSH) ;
|
||||
ui._require_WL_CB->setChecked( detail.service_perm_flags & RS_NODE_PERM_REQUIRE_WL) ;
|
||||
|
||||
uint32_t max_upload_speed = 0 ;
|
||||
uint32_t max_download_speed = 0 ;
|
||||
|
||||
rsPeers->getPeerMaximumRates(pgpId,max_upload_speed,max_download_speed);
|
||||
|
||||
ui.maxUploadSpeed_SB->setValue(max_upload_speed) ;
|
||||
ui.maxDownloadSpeed_SB->setValue(max_download_speed) ;
|
||||
|
||||
if (detail.gpg_id == rsPeers->getGPGOwnId())
|
||||
{
|
||||
ui.make_friend_button->hide();
|
||||
|
@ -323,7 +302,6 @@ void PGPKeyDialog::loadKeyPage()
|
|||
ui.userCertificateText_2->setToolTip(helptext) ;
|
||||
}
|
||||
|
||||
|
||||
void PGPKeyDialog::applyDialog()
|
||||
{
|
||||
std::cerr << "PGPKeyDialog::applyDialog() called" << std::endl ;
|
||||
|
@ -343,6 +321,19 @@ void PGPKeyDialog::applyDialog()
|
|||
if(ui.trustlevel_CB->currentIndex() != (int)detail.trustLvl)
|
||||
rsPeers->trustGPGCertificate(pgpId, ui.trustlevel_CB->currentIndex());
|
||||
|
||||
uint32_t max_upload_speed = ui.maxUploadSpeed_SB->value() ;
|
||||
uint32_t max_download_speed = ui.maxDownloadSpeed_SB->value();
|
||||
|
||||
rsPeers->setPeerMaximumRates(pgpId,max_upload_speed,max_download_speed);
|
||||
|
||||
ServicePermissionFlags flags(0) ;
|
||||
|
||||
if( ui._direct_transfer_CB->isChecked()) flags = flags | RS_NODE_PERM_DIRECT_DL ;
|
||||
if( ui._allow_push_CB->isChecked()) flags = flags | RS_NODE_PERM_ALLOW_PUSH ;
|
||||
if( ui._require_WL_CB->isChecked()) flags = flags | RS_NODE_PERM_REQUIRE_WL ;
|
||||
|
||||
rsPeers->setServicePermissionFlags(pgpId,flags) ;
|
||||
|
||||
//setServiceFlags() ;
|
||||
|
||||
loadAll();
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<item>
|
||||
<widget class="QTabWidget" name="stabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
|
@ -175,7 +175,16 @@
|
|||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="friendAndSignLayout">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
|
@ -295,6 +304,16 @@ p, li { white-space: pre-wrap; }
|
|||
<string>ASCII format</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Below is the node's PGP key. It identifies the node and all its locations. A "Retroshare certificate" that you can exchange in order to make friends, is in the the "details" of each separate location.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="userCertificateText_2">
|
||||
<property name="sizePolicy">
|
||||
|
@ -321,6 +340,115 @@ p, li { white-space: pre-wrap; }
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_2">
|
||||
<attribute name="title">
|
||||
<string>Options</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>These options apply to all locations of the same node:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="_direct_transfer_CB">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p align="justify">Retroshare periodically checks your friend lists for browsable files matching your transfers, to establish a direct transfer. In this case, your friend knows you're downloading the file.</p><p align="justify">To prevent this behavior for this friend only, uncheck this box. You can still perform a direct transfer if you explicitly ask for it, by e.g. downloading from your friend's file list. This setting is applied to all locations of the same node.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use as direct source, when available</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="_allow_push_CB">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>This option allows you to automatically download a file that is recommended in an message coming from this node. This can be used for instance to send files between your own nodes. Applied to all locations of the same node.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Auto-download recommended files from this node</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="_require_WL_CB">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Peers that have this option cannot connect if their connection address is not in the whitelist. This protects you from traffic forwarding attacks. When used, rejected peers will be reported by &quot;security feed items&quot; in the News Feed section. From there, you can whitelist/blacklist their IP. Applies to all locations of the same node.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Require white list clearance</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Max upload speed (0=unlimited)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Max download speed (0=unlimited)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="QSpinBox" name="maxUploadSpeed_SB">
|
||||
<property name="suffix">
|
||||
<string> kB/s</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>10000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="maxDownloadSpeed_SB">
|
||||
<property name="suffix">
|
||||
<string> kB/s</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>10000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>274</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -334,6 +462,9 @@ p, li { white-space: pre-wrap; }
|
|||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<zorder>stabWidget</zorder>
|
||||
<zorder>headerFrame</zorder>
|
||||
<zorder>buttonBox</zorder>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>928</width>
|
||||
<height>769</height>
|
||||
<width>828</width>
|
||||
<height>612</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -208,222 +208,6 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QGroupBox" name="publishGroupBox">
|
||||
<property name="title">
|
||||
<string>Publish Signatures</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="publish_open">
|
||||
<property name="text">
|
||||
<string>Open</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="publish_threads">
|
||||
<property name="text">
|
||||
<string>New Thread</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="publish_required">
|
||||
<property name="text">
|
||||
<string>Required</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="publish_encrypt">
|
||||
<property name="text">
|
||||
<string>Encrypted Msgs</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QGroupBox" name="personalGroupBox">
|
||||
<property name="title">
|
||||
<string>Personal Signatures</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="personal_pgp">
|
||||
<property name="text">
|
||||
<string>PGP Required</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="personal_required">
|
||||
<property name="text">
|
||||
<string>Signature Required</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="personal_ifnopub">
|
||||
<property name="text">
|
||||
<string>If No Publish Signature</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QGroupBox" name="commentGroupBox">
|
||||
<property name="title">
|
||||
<string>Comments</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="comments_allowed">
|
||||
<property name="text">
|
||||
<string>Allow Comments</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="comments_no">
|
||||
<property name="text">
|
||||
<string>No Comments</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QGroupBox" name="spamProtection_GB">
|
||||
<property name="title">
|
||||
<string>Spam-protection</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="antiSpam_signedIds">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>This makes the media increase the reputation threshold to 0.4 for anonymous ids, while keeping it to 0.0 for PGP-linked ids. Therefore, anonymous ids can still post, if their local reputation score is above that threshold.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Favor PGP-signed ids</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="antiSpam_trackMessages">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p align="justify">This feature allows Retroshare to locally keep a record of who forwarded each message to you, for the last 10 days. Although useless if alone (and already available whatsoever) this information can be used by a group of collaborative friends to easily locate the source of spams. To be used with care, since it significantly decreases the anonymity of message posts.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Keep track of posts</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0" colspan="2">
|
||||
<widget class="QFrame" name="extraFrame">
|
||||
<property name="frameShape">
|
||||
|
@ -631,6 +415,222 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QGroupBox" name="publishGroupBox">
|
||||
<property name="title">
|
||||
<string>Publish Signatures</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="publish_open">
|
||||
<property name="text">
|
||||
<string>Open</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="publish_threads">
|
||||
<property name="text">
|
||||
<string>New Thread</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="publish_required">
|
||||
<property name="text">
|
||||
<string>Required</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="publish_encrypt">
|
||||
<property name="text">
|
||||
<string>Encrypted Msgs</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QGroupBox" name="personalGroupBox">
|
||||
<property name="title">
|
||||
<string>Personal Signatures</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="personal_pgp">
|
||||
<property name="text">
|
||||
<string>PGP Required</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="personal_required">
|
||||
<property name="text">
|
||||
<string>Signature Required</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="personal_ifnopub">
|
||||
<property name="text">
|
||||
<string>If No Publish Signature</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QGroupBox" name="commentGroupBox">
|
||||
<property name="title">
|
||||
<string>Comments</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="comments_allowed">
|
||||
<property name="text">
|
||||
<string>Allow Comments</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="comments_no">
|
||||
<property name="text">
|
||||
<string>No Comments</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QGroupBox" name="spamProtection_GB">
|
||||
<property name="title">
|
||||
<string>Spam-protection</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="antiSpam_signedIds">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>This makes the media increase the reputation threshold to 0.4 for anonymous ids, while keeping it to 0.0 for PGP-linked ids. Therefore, anonymous ids can still post, if their local reputation score is above that threshold.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Favor PGP-signed ids</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="antiSpam_trackMessages">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p align="justify">This feature allows Retroshare to locally keep a record of who forwarded each message to you, for the last 10 days. Although useless if alone (and already available whatsoever) this information can be used by a group of collaborative friends to easily locate the source of spams. To be used with care, since it significantly decreases the anonymity of message posts.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Keep track of posts</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="showmode">
|
||||
|
|
|
@ -14,6 +14,18 @@
|
|||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QSplitter" name="threadSplitter">
|
||||
<property name="orientation">
|
||||
|
@ -36,7 +48,16 @@
|
|||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
|
@ -449,7 +470,7 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="">
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="RSImageBlockWidget" name="imageBlockWidget" native="true">
|
||||
|
|
|
@ -554,6 +554,7 @@
|
|||
<file>images/view_split_top_bottom.png</file>
|
||||
<file>images/vote_up.png</file>
|
||||
<file>images/vote_down.png</file>
|
||||
<file>images/vote_neutral.png</file>
|
||||
<file>images/window_fullscreen.png</file>
|
||||
<file>images/window_nofullscreen.png</file>
|
||||
<file>images/identity/identities_32.png</file>
|
||||
|
@ -657,5 +658,8 @@
|
|||
<file>images/rsmessenger16.png</file>
|
||||
<file>images/rsmessenger32.png</file>
|
||||
<file>images/rsmessenger48.png</file>
|
||||
<file>images/SmileyText.png</file>
|
||||
<file>images/SimpleText.png</file>
|
||||
<file>images/ColoredText.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
BIN
retroshare-gui/src/gui/images/ColoredText.png
Executable file
BIN
retroshare-gui/src/gui/images/ColoredText.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
retroshare-gui/src/gui/images/SimpleText.png
Executable file
BIN
retroshare-gui/src/gui/images/SimpleText.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
BIN
retroshare-gui/src/gui/images/SmileyText.png
Executable file
BIN
retroshare-gui/src/gui/images/SmileyText.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
BIN
retroshare-gui/src/gui/images/vote_neutral.png
Normal file
BIN
retroshare-gui/src/gui/images/vote_neutral.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
|
@ -521,6 +521,7 @@ SubFileItem QProgressBar#progressBar::chunk {
|
|||
border-top-left-radius: 7px;
|
||||
border-bottom-left-radius: 7px;
|
||||
border: 1px solid black;
|
||||
width: 15px;
|
||||
}
|
||||
|
||||
PluginItem QLabel#infoLabel {
|
||||
|
|
|
@ -100,7 +100,7 @@ ChatPage::ChatPage(QWidget * parent, Qt::WindowFlags flags)
|
|||
/* Invoke the Qt Designer generated object setup routine */
|
||||
ui.setupUi(this);
|
||||
|
||||
connect(ui.distantChatcomboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(distantChatComboBoxChanged(int)));
|
||||
connect(ui.distantChatComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(distantChatComboBoxChanged(int)));
|
||||
|
||||
#if QT_VERSION < 0x040600
|
||||
ui.minimumContrastLabel->hide();
|
||||
|
@ -123,12 +123,13 @@ ChatPage::save(QString &/*errmsg*/)
|
|||
Settings->setValue("MinimumContrast", ui.minimumContrast->value());
|
||||
Settings->endGroup();
|
||||
// state of distant Chat combobox
|
||||
Settings->setValue("DistantChat", ui.distantChatcomboBox->currentIndex());
|
||||
Settings->setValue("DistantChat", ui.distantChatComboBox->currentIndex());
|
||||
|
||||
Settings->setChatScreenFont(fontTempChat.toString());
|
||||
NotifyQt::getInstance()->notifyChatFontChanged();
|
||||
|
||||
Settings->setChatSendMessageWithCtrlReturn(ui.sendMessageWithCtrlReturn->isChecked());
|
||||
Settings->setChatSendAsPlainTextByDef(ui.sendAsPlainTextByDef->isChecked());
|
||||
|
||||
Settings->setChatSearchCharToStartSearch(ui.sbSearch_CharToStart->value());
|
||||
Settings->setChatSearchCaseSensitively(ui.cbSearch_CaseSensitively->isChecked());
|
||||
|
@ -231,11 +232,12 @@ ChatPage::load()
|
|||
|
||||
// state of distant Chat combobox
|
||||
int index = Settings->value("DistantChat", 0).toInt();
|
||||
ui.distantChatcomboBox->setCurrentIndex(index);
|
||||
ui.distantChatComboBox->setCurrentIndex(index);
|
||||
|
||||
fontTempChat.fromString(Settings->getChatScreenFont());
|
||||
|
||||
ui.sendMessageWithCtrlReturn->setChecked(Settings->getChatSendMessageWithCtrlReturn());
|
||||
ui.sendAsPlainTextByDef->setChecked(Settings->getChatSendAsPlainTextByDef());
|
||||
|
||||
ui.sbSearch_CharToStart->setValue(Settings->getChatSearchCharToStartSearch());
|
||||
ui.cbSearch_CaseSensitively->setChecked(Settings->getChatSearchCaseSensitively());
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>705</width>
|
||||
<height>517</height>
|
||||
<width>635</width>
|
||||
<height>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<layout class="QGridLayout">
|
||||
<item row="3" column="0">
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
|
@ -20,15 +20,15 @@
|
|||
<attribute name="title">
|
||||
<string>General</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<layout class="QGridLayout" name="generalGLayout">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<widget class="QGroupBox" name="distantGBox">
|
||||
<property name="title">
|
||||
<string>Distant Chat</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<layout class="QGridLayout" name="distantGBoxGLayout">
|
||||
<item row="0" column="2">
|
||||
<widget class="QComboBox" name="distantChatcomboBox">
|
||||
<widget class="QComboBox" name="distantChatComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Everyone</string>
|
||||
|
@ -47,7 +47,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="distantchatlabel">
|
||||
<widget class="QLabel" name="distantChatLabel">
|
||||
<property name="text">
|
||||
<string>Accept encrypted distant chat from</string>
|
||||
</property>
|
||||
|
@ -57,9 +57,9 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<layout class="QVBoxLayout" name="leftVLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<widget class="QGroupBox" name="chatSettingsGBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
|
@ -69,7 +69,7 @@
|
|||
<property name="title">
|
||||
<string>Chat Settings</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<layout class="QVBoxLayout" name="chatSettingsGBoxVLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_emoteprivchat">
|
||||
<property name="text">
|
||||
|
@ -111,7 +111,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="hl_minimumFontSize">
|
||||
<layout class="QHBoxLayout" name="minimumFontSizeHLayout">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
|
@ -123,7 +123,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="hs_minimumFontSize">
|
||||
<spacer name="minimumFontSizeHSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
|
@ -168,7 +168,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_40">
|
||||
<layout class="QHBoxLayout" name="minimumContrastHLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="minimumContrastLabel">
|
||||
<property name="text">
|
||||
|
@ -177,7 +177,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<spacer name="minimumContrastHSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
|
@ -211,15 +211,22 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="sendAsPlainTextByDef">
|
||||
<property name="text">
|
||||
<string>Send as plain text by default</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="chatLobbyGroupBox">
|
||||
<widget class="QGroupBox" name="chatLobbyGBox">
|
||||
<property name="title">
|
||||
<string>Chat Lobby</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<layout class="QVBoxLayout" name="chatLobbyGBoxVLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chatLobby_Blink">
|
||||
<property name="text">
|
||||
|
@ -228,7 +235,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<widget class="QLabel" name="defIDLabel">
|
||||
<property name="text">
|
||||
<string>Default identity for chat lobbies:</string>
|
||||
</property>
|
||||
|
@ -237,7 +244,7 @@
|
|||
<item>
|
||||
<layout class="QHBoxLayout" name="nickNameLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<spacer name="chatLobbyIdentity_HSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
|
@ -261,7 +268,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<spacer name="leftVSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
|
@ -276,13 +283,13 @@
|
|||
</layout>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<layout class="QVBoxLayout" name="rightVLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<widget class="QGroupBox" name="privateChatGBox">
|
||||
<property name="title">
|
||||
<string>Private Chat</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="_2">
|
||||
<layout class="QVBoxLayout" name="privateChatGBoxVLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chat_NewWindow">
|
||||
<property name="text">
|
||||
|
@ -315,11 +322,11 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBoxIRCColors">
|
||||
<widget class="QGroupBox" name="chatFontGBox">
|
||||
<property name="title">
|
||||
<string>Chat Font</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<layout class="QVBoxLayout" name="chatFontGBoxVLayout">
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
|
@ -366,7 +373,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBoxSearch">
|
||||
<widget class="QGroupBox" name="searchGBox">
|
||||
<property name="title">
|
||||
<string>Search by default</string>
|
||||
</property>
|
||||
|
@ -530,7 +537,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<spacer name="rightVSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
|
@ -550,9 +557,9 @@
|
|||
<attribute name="title">
|
||||
<string>History</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<layout class="QVBoxLayout" name="historyVLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<widget class="QLabel" name="histHeaderLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
|
@ -574,11 +581,11 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<layout class="QHBoxLayout" name="histSetupVLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<layout class="QGridLayout" name="histSetupGLayout">
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<widget class="QLabel" name="publicHeaderLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
|
@ -591,7 +598,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<widget class="QLabel" name="privateHeaderLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
|
@ -604,7 +611,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<widget class="QLabel" name="lobbyHeaderLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
|
@ -617,7 +624,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<widget class="QLabel" name="labelChatEnable">
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
|
@ -651,7 +658,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label1">
|
||||
<widget class="QLabel" name="labelChatSaveCount">
|
||||
<property name="text">
|
||||
<string>Saved messages (0 = unlimited):</string>
|
||||
</property>
|
||||
|
@ -718,7 +725,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label2">
|
||||
<widget class="QLabel" name="labelChatLoadCount">
|
||||
<property name="text">
|
||||
<string>Number of messages restored (0 = off):</string>
|
||||
</property>
|
||||
|
@ -769,7 +776,7 @@
|
|||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<spacer name="histSetupHSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
|
@ -784,15 +791,15 @@
|
|||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_5">
|
||||
<widget class="QGroupBox" name="histGenGBox">
|
||||
<property name="title">
|
||||
<string>General</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||
<layout class="QVBoxLayout" name="histGenGBoxVLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<layout class="QHBoxLayout" name="max_storage_period_HLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<widget class="QLabel" name="max_storage_period_Label">
|
||||
<property name="text">
|
||||
<string>Maximum storage period, in days (0=keep all):</string>
|
||||
</property>
|
||||
|
@ -802,7 +809,7 @@
|
|||
<widget class="QSpinBox" name="max_storage_period"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<spacer name="max_storage_period_HSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
|
@ -820,7 +827,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_4">
|
||||
<spacer name="histVSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
|
@ -838,7 +845,7 @@
|
|||
<attribute name="title">
|
||||
<string>Style</string>
|
||||
</attribute>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<layout class="QHBoxLayout" name="styleHLayout">
|
||||
<item>
|
||||
<widget class="QTabWidget" name="styleTabWidget">
|
||||
<property name="tabPosition">
|
||||
|
@ -851,11 +858,11 @@
|
|||
<attribute name="title">
|
||||
<string>Group chat</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="publicLayout_1">
|
||||
<layout class="QVBoxLayout" name="publicTabVLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="publiclLayout_2">
|
||||
<layout class="QHBoxLayout" name="publicStyleHLayout">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="publicLayout_3">
|
||||
<layout class="QVBoxLayout" name="publicStyleListVLayout">
|
||||
<item>
|
||||
<widget class="QListWidget" name="publicList">
|
||||
<property name="sizePolicy">
|
||||
|
@ -873,7 +880,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="publicLayout_4">
|
||||
<layout class="QHBoxLayout" name="publicStyleVarHLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="publicLabelVariant">
|
||||
<property name="sizePolicy">
|
||||
|
@ -921,7 +928,7 @@
|
|||
<enum>QLayout::SetFixedSize</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelPublicAuthor">
|
||||
<widget class="QLabel" name="publicLabelAuthor">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
|
@ -934,7 +941,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelPublicDescription">
|
||||
<widget class="QLabel" name="publicLabelDescription">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
|
@ -986,11 +993,11 @@
|
|||
<attribute name="title">
|
||||
<string>Private chat</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="privateLayout_1">
|
||||
<layout class="QVBoxLayout" name="privateTabVLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="privatelLayout_2">
|
||||
<layout class="QHBoxLayout" name="privateStyleHLayout">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="privateLayout_3">
|
||||
<layout class="QVBoxLayout" name="privateStyleListVLayout">
|
||||
<item>
|
||||
<widget class="QListWidget" name="privateList">
|
||||
<property name="sizePolicy">
|
||||
|
@ -1008,7 +1015,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="privateLayout_4">
|
||||
<layout class="QHBoxLayout" name="privateStyleVarHLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="privateLabelVariant">
|
||||
<property name="sizePolicy">
|
||||
|
@ -1056,7 +1063,7 @@
|
|||
<enum>QLayout::SetFixedSize</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelPrivateAuthor">
|
||||
<widget class="QLabel" name="privateLabelAuthor">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
|
@ -1069,7 +1076,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelPrivateDescription">
|
||||
<widget class="QLabel" name="privateLabelDescription">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
|
@ -1121,11 +1128,11 @@
|
|||
<attribute name="title">
|
||||
<string>History</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="historyLayout_1">
|
||||
<layout class="QVBoxLayout" name="historyTabVLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="historylLayout_2">
|
||||
<layout class="QHBoxLayout" name="historyStyleHLayout">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="historyLayout_3">
|
||||
<layout class="QVBoxLayout" name="historyStyleListVLayout">
|
||||
<item>
|
||||
<widget class="QListWidget" name="historyList">
|
||||
<property name="sizePolicy">
|
||||
|
@ -1143,7 +1150,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="historyLayout_4">
|
||||
<layout class="QHBoxLayout" name="historyStyleVarHLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="historyLabelVariant">
|
||||
<property name="sizePolicy">
|
||||
|
@ -1191,7 +1198,7 @@
|
|||
<enum>QLayout::SetFixedSize</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelHistoryAuthor">
|
||||
<widget class="QLabel" name="historyLabelAuthor">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
|
@ -1204,7 +1211,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelHistoryDescription">
|
||||
<widget class="QLabel" name="historyLabelDescription">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
|
|
|
@ -48,6 +48,7 @@ GeneralPage::GeneralPage(QWidget * parent, Qt::WindowFlags flags)
|
|||
ui.chkRunRetroshareAtSystemStartup->setEnabled(false);
|
||||
ui.chkRunRetroshareAtSystemStartupMinimized->setEnabled(false);
|
||||
#endif
|
||||
ui.desktopFileMissingLabel->setVisible(false);
|
||||
|
||||
#else
|
||||
ui.chkRunRetroshareAtSystemStartup->setVisible(false);
|
||||
|
|
|
@ -512,6 +512,26 @@ void RshareSettings::setChatSendMessageWithCtrlReturn(bool bValue)
|
|||
setValueToGroup("Chat", "SendMessageWithCtrlReturn", bValue);
|
||||
}
|
||||
|
||||
bool RshareSettings::getChatSendAsPlainTextByDef()
|
||||
{
|
||||
return valueFromGroup("Chat", "SendAsPlainTextByDef", false).toBool();
|
||||
}
|
||||
|
||||
void RshareSettings::setChatSendAsPlainTextByDef(bool bValue)
|
||||
{
|
||||
setValueToGroup("Chat", "SendAsPlainTextByDef", bValue);
|
||||
}
|
||||
|
||||
bool RshareSettings::getChatSearchShowBarByDefault()
|
||||
{
|
||||
return valueFromGroup("Chat", "SearchShowBarByDefault", false).toBool();
|
||||
}
|
||||
|
||||
void RshareSettings::setChatSearchShowBarByDefault(bool bValue)
|
||||
{
|
||||
setValueToGroup("Chat", "SearchShowBarByDefault", bValue);
|
||||
}
|
||||
|
||||
void RshareSettings::setChatSearchCharToStartSearch(int iValue)
|
||||
{
|
||||
setValueToGroup("Chat", "SearchCharToStartSearch", iValue);
|
||||
|
|
|
@ -209,6 +209,12 @@ public:
|
|||
bool getChatSendMessageWithCtrlReturn();
|
||||
void setChatSendMessageWithCtrlReturn(bool bValue);
|
||||
|
||||
bool getChatSendAsPlainTextByDef();
|
||||
void setChatSendAsPlainTextByDef(bool bValue);
|
||||
|
||||
bool getChatSearchShowBarByDefault();
|
||||
void setChatSearchShowBarByDefault(bool bValue);
|
||||
|
||||
void setChatSearchCharToStartSearch(int iValue);
|
||||
int getChatSearchCharToStartSearch();
|
||||
|
||||
|
|
|
@ -46,6 +46,10 @@
|
|||
#include "util/RsGxsUpdateBroadcast.h"
|
||||
#include "gui/settings/WebuiPage.h"
|
||||
|
||||
#ifdef SIGFPE_DEBUG
|
||||
#include <fenv.h>
|
||||
#endif
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK (5, 0, 0)
|
||||
#ifdef WINDOWS_SYS
|
||||
#include <QFileDialog>
|
||||
|
@ -155,6 +159,9 @@ int main(int argc, char *argv[])
|
|||
QApplication app(argc, argv);
|
||||
QDir::setCurrent(QCoreApplication::applicationDirPath());
|
||||
}
|
||||
#endif
|
||||
#ifdef SIGFPE_DEBUG
|
||||
feenableexcept(FE_INVALID | FE_DIVBYZERO);
|
||||
#endif
|
||||
|
||||
QStringList args = char_array_to_stringlist(argv+1, argc-1);
|
||||
|
|
|
@ -27,9 +27,11 @@ QProgressBar:horizontal {
|
|||
text-align: center;
|
||||
padding: 1px;
|
||||
background: #201F1F;
|
||||
width: 15px;
|
||||
}
|
||||
QProgressBar::chunk:horizontal {
|
||||
background-color: qlineargradient(spread:reflect, x1:1, y1:0.545, x2:1, y2:0, stop:0 rgba(28, 66, 111, 255), stop:1 rgba(37, 87, 146, 255));
|
||||
width: 15px;
|
||||
}
|
||||
|
||||
QFrame#titleBarFrame, QFrame#toolBarFrame
|
||||
|
|
|
@ -12,6 +12,7 @@ DEFINES += TARGET=\\\"$TARGET\\\"
|
|||
#
|
||||
#CONFIG += unfinished
|
||||
#CONFIG += debug
|
||||
#DEFINES *= SIGFPE_DEBUG
|
||||
|
||||
#QMAKE_CFLAGS += -fmudflap
|
||||
#LIBS *= /usr/lib/gcc/x86_64-linux-gnu/4.4/libmudflap.a /usr/lib/gcc/x86_64-linux-gnu/4.4/libmudflapth.a
|
||||
|
@ -196,7 +197,7 @@ win32 {
|
|||
LIBS += -Wl,--export-all-symbols,--out-implib,lib/libretroshare-gui.a
|
||||
|
||||
# create lib directory
|
||||
QMAKE_PRE_LINK = $(CHK_DIR_EXISTS) lib $(MKDIR) lib
|
||||
QMAKE_PRE_LINK = $(CHK_DIR_EXISTS) lib || $(MKDIR) lib
|
||||
|
||||
DEFINES *= WINDOWS_SYS WIN32_LEAN_AND_MEAN _USE_32BIT_TIME_T
|
||||
|
||||
|
|
|
@ -167,6 +167,9 @@ Rshare::Rshare(QStringList args, int &argc, char **argv, const QString &dir)
|
|||
std::cerr << "Rshare::Rshare Connection etablished. Waiting for disconnection." << std::endl;
|
||||
localSocket.waitForDisconnected(1000);
|
||||
newArgs.detach();
|
||||
std::cerr << "Rshare::Rshare Arguments was sended." << std::endl
|
||||
<< " To disable it, in Options - General - Misc," << std::endl
|
||||
<< " uncheck \"Use Local Server to get new Arguments\"." << std::endl;
|
||||
::exit(EXIT_SUCCESS); // Terminate the program using STDLib's exit function
|
||||
}
|
||||
newArgs.detach();
|
||||
|
|
|
@ -874,6 +874,12 @@ static void styleCreate(QDomDocument& doc
|
|||
optAttr = doc.createAttribute("RSOptimized");
|
||||
optAttr.setValue("v2");
|
||||
styleElem.attributes().setNamedItem(optAttr);
|
||||
if (flag & RSHTML_FORMATTEXT_NO_EMBED) {
|
||||
QDomAttr noEmbedAttr;
|
||||
noEmbedAttr = doc.createAttribute("NoEmbed");
|
||||
noEmbedAttr.setValue("true");
|
||||
styleElem.attributes().setNamedItem(noEmbedAttr);
|
||||
}
|
||||
}
|
||||
|
||||
while(styleElem.childNodes().count()>0) {
|
||||
|
|
|
@ -31,19 +31,19 @@
|
|||
#define HANDLE_RICH_TEXT_H_
|
||||
|
||||
/* Flags for RsHtml::formatText */
|
||||
#define RSHTML_FORMATTEXT_EMBED_SMILEYS 1
|
||||
#define RSHTML_FORMATTEXT_EMBED_LINKS 2
|
||||
#define RSHTML_FORMATTEXT_OPTIMIZE 4
|
||||
#define RSHTML_FORMATTEXT_REPLACE_LINKS 8
|
||||
#define RSHTML_FORMATTEXT_REMOVE_COLOR 16
|
||||
#define RSHTML_FORMATTEXT_FIX_COLORS 32 /* Make text readable */
|
||||
#define RSHTML_FORMATTEXT_REMOVE_FONT_WEIGHT 64 /* Remove bold */
|
||||
#define RSHTML_FORMATTEXT_REMOVE_FONT_STYLE 128 /* Remove italics */
|
||||
#define RSHTML_FORMATTEXT_REMOVE_FONT_FAMILY 256
|
||||
#define RSHTML_FORMATTEXT_REMOVE_FONT_SIZE 512
|
||||
#define RSHTML_FORMATTEXT_EMBED_SMILEYS 0x0001//1
|
||||
#define RSHTML_FORMATTEXT_EMBED_LINKS 0x0002//2
|
||||
#define RSHTML_FORMATTEXT_OPTIMIZE 0x0004//4
|
||||
#define RSHTML_FORMATTEXT_REPLACE_LINKS 0x0008//8
|
||||
#define RSHTML_FORMATTEXT_REMOVE_COLOR 0x0010//16
|
||||
#define RSHTML_FORMATTEXT_FIX_COLORS 0x0020//32 /* Make text readable */
|
||||
#define RSHTML_FORMATTEXT_REMOVE_FONT_WEIGHT 0x0040//64 /* Remove bold */
|
||||
#define RSHTML_FORMATTEXT_REMOVE_FONT_STYLE 0x0080//128 /* Remove italics */
|
||||
#define RSHTML_FORMATTEXT_REMOVE_FONT_FAMILY 0x0100//256
|
||||
#define RSHTML_FORMATTEXT_REMOVE_FONT_SIZE 0x0200//512
|
||||
#define RSHTML_FORMATTEXT_REMOVE_FONT (RSHTML_FORMATTEXT_REMOVE_FONT_WEIGHT | RSHTML_FORMATTEXT_REMOVE_FONT_STYLE | RSHTML_FORMATTEXT_REMOVE_FONT_FAMILY | RSHTML_FORMATTEXT_REMOVE_FONT_SIZE)
|
||||
#define RSHTML_FORMATTEXT_CLEANSTYLE (RSHTML_FORMATTEXT_REMOVE_FONT | RSHTML_FORMATTEXT_REMOVE_COLOR)
|
||||
|
||||
#define RSHTML_FORMATTEXT_NO_EMBED 0x0400//1024
|
||||
/* Flags for RsHtml::optimizeHtml */
|
||||
#define RSHTML_OPTIMIZEHTML_MASK (RSHTML_FORMATTEXT_CLEANSTYLE | RSHTML_FORMATTEXT_FIX_COLORS | RSHTML_FORMATTEXT_OPTIMIZE)
|
||||
|
||||
|
|
|
@ -5,26 +5,34 @@
|
|||
#don't exit even if a command fails
|
||||
set +e
|
||||
|
||||
OLDLANG=${LANG}
|
||||
|
||||
export LANG=C
|
||||
|
||||
SCRIPT_PATH=$(dirname "`readlink -f "${0}"`")
|
||||
|
||||
if (ls &> /dev/null); then
|
||||
echo "Retroshare Gui version : " > gui/help/version.html
|
||||
echo "Retroshare Gui version : " > ${SCRIPT_PATH}/gui/help/version.html
|
||||
if ( /usr/bin/git log -n 1 &> /dev/null); then
|
||||
#retrieve git information
|
||||
echo "Git version : $(git status | grep branch | cut -c 3-) $(git log -n 1 | grep commit)" >> gui/help/version.html
|
||||
echo "Git version : $(git status | grep branch | head -n 1 | cut -c 4-) $(git log -n 1 | grep commit)" >> ${SCRIPT_PATH}/gui/help/version.html
|
||||
fi
|
||||
if ( /usr/bin/git log -n 1 | grep svn &> /dev/null); then
|
||||
#retrieve git svn information
|
||||
echo "Svn version : $(git log -n 1 | awk '/svn/ {print $2}' | head -1)" >> gui/help/version.html
|
||||
echo "Svn version : $(git log -n 1 | awk '/svn/ {print $2}' | head -1)" >> ${SCRIPT_PATH}/gui/help/version.html
|
||||
elif ( /usr/bin/git log -n 10 | grep svn &> /dev/null); then
|
||||
#retrieve git svn information
|
||||
echo "Svn closest version : $(git log -n 10 | awk '/svn/ {print $2}' | head -1)" >> gui/help/version.html
|
||||
echo "Svn closest version : $(git log -n 10 | awk '/svn/ {print $2}' | head -1)" >> ${SCRIPT_PATH}/gui/help/version.html
|
||||
fi
|
||||
|
||||
if ( /usr/bin/svn info &> /dev/null); then
|
||||
echo "Svn version : $(svn info | awk '/^Revision:/ {print $NF}')" >> gui/help/version.html
|
||||
echo "Svn version : $(svn info | awk '/^Revision:/ {print $NF}')" >> ${SCRIPT_PATH}/gui/help/version.html
|
||||
fi
|
||||
date >> gui/help/version.html
|
||||
echo "" >> gui/help/version.html
|
||||
echo "" >> gui/help/version.html
|
||||
date >> ${SCRIPT_PATH}/gui/help/version.html
|
||||
echo "" >> ${SCRIPT_PATH}/gui/help/version.html
|
||||
echo "" >> ${SCRIPT_PATH}/gui/help/version.html
|
||||
fi
|
||||
|
||||
export LANG=${OLDLANG}
|
||||
echo "version_detail.sh scripts finished"
|
||||
exit 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue