Merge pull request #2675 from csoler/v0.6-BugFixing_20

GUI improvements/fixes
This commit is contained in:
csoler 2023-01-29 17:50:34 +01:00 committed by GitHub
commit 3c17e34ed6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 32 additions and 9 deletions

View File

@ -529,7 +529,6 @@ void LocalSharedFilesDialog::checkUpdate()
void LocalSharedFilesDialog::forceCheck()
{
rsFiles->ForceDirectoryCheck();
return;
}
void RemoteSharedFilesDialog::spawnCustomPopupMenu( QPoint point )

View File

@ -285,6 +285,9 @@ border-image: url(:/images/closepressed.png)
</item>
<item>
<widget class="QPushButton" name="checkButton">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Forces the re-check of all shared directories. While automatic file checking only cares for new/removed files for efficiency reasons, this button will force the re-scan of all files, possibly re-hashing existing files that may have changed. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>check files</string>
</property>
@ -396,8 +399,8 @@ border-image: url(:/images/closepressed.png)
</customwidget>
</customwidgets>
<resources>
<include location="../icons.qrc"/>
<include location="../images.qrc"/>
<include location="../icons.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -51,7 +51,8 @@
#define ROLE_SORT_STANDARD_GROUP Qt::UserRole + 2
#define ROLE_SORT_NAME Qt::UserRole + 3
#define ROLE_SORT_STATE Qt::UserRole + 4
#define ROLE_FILTER_REASON Qt::UserRole + 5
#define ROLE_SORT_SELECTED Qt::UserRole + 5
#define ROLE_FILTER_REASON Qt::UserRole + 6
#define IMAGE_FRIENDINFO ":/images/peerdetails_16x16.png"
@ -667,8 +668,13 @@ void FriendSelectionWidget::secured_fillList()
emit itemAdded(IDTYPE_GXS, QString::fromStdString(detail.mId.toStdString()), gxsItem);
if (std::find(gxsIdsSelected.begin(), gxsIdsSelected.end(), detail.mId) != gxsIdsSelected.end())
{
setSelected(mListModus, gxsItem, true);
}
gxsItem->setData(COLUMN_NAME,ROLE_SORT_SELECTED,0);
}
else
gxsItem->setData(COLUMN_NAME,ROLE_SORT_SELECTED,1);
}
}
if(mShowTypes & SHOW_CONTACTS)
{
@ -1219,9 +1225,18 @@ std::string FriendSelectionWidget::idFromItem(QTreeWidgetItem *item)
return item->data(COLUMN_DATA, ROLE_ID).toString().toStdString();
}
void FriendSelectionWidget::sortByChecked(bool sort)
{
mCompareRole->clear();
mCompareRole->setRole(COLUMN_NAME,ROLE_SORT_SELECTED);
ui->friendList->resort();
}
void FriendSelectionWidget::sortByState(bool sort)
{
mCompareRole->setRole(COLUMN_NAME, ROLE_SORT_GROUP);
mCompareRole->clear();
mCompareRole->setRole(COLUMN_NAME, ROLE_SORT_GROUP);
mCompareRole->addRole(COLUMN_NAME, ROLE_SORT_STANDARD_GROUP);
if (sort) {

View File

@ -132,7 +132,8 @@ signals:
public slots:
void sortByState(bool sort);
void filterConnected(bool filter);
void sortByChecked(bool sort);
void filterConnected(bool filter);
private slots:
void groupsChanged(int type);

View File

@ -32,6 +32,7 @@ public:
RSTreeWidgetItemCompareRole();
explicit RSTreeWidgetItemCompareRole(QMap<int, QList<int>> map);
void clear() { QMap<int, QList<int> >::clear() ; }
void setRole(const int column, const int role);
void addRole(const int column, const int role);
void findRoles(const int column, QList<int> &roles) const;

View File

@ -889,7 +889,7 @@ void GxsGroupDialog::setSelectedModerators(const std::set<RsGxsId>& ids)
ui.adminsList->show();
ui.filtercomboBox->show();
ui.adminsList->setSelectedIds<RsGxsId,FriendSelectionWidget::IDTYPE_GXS>(ids, false);
ui.adminsList->setSelectedIds<RsGxsId,FriendSelectionWidget::IDTYPE_GXS>(ids, true);
QString moderatorsListString ;
RsIdentityDetails det;

View File

@ -151,6 +151,7 @@ bool GxsForumGroupDialog::service_loadGroup(const RsGxsGenericGroupData *data, M
// Local information. Description should be handled here.
setSelectedModerators(pgroup->mAdminList.ids);
ui.adminsList->sortByChecked(true);
mGroupData = *pgroup; // keeps the private information

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>701</width>
<height>632</height>
<height>638</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_3">
@ -67,6 +67,9 @@
</item>
<item>
<widget class="QSpinBox" name="autoCheckDirectoriesDelay_SB">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Retroshare will quickly scan shared directories for new/removed files. It will not detect changes in existing files for efficiency reasons. It is however possible to force a full re-scan of the entire hierarchy including possibly modified files using the &amp;quot;check files&amp;quot; button in shared files tab.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="suffix">
<string> minute(s)</string>
</property>
@ -289,7 +292,7 @@
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans'; font-size:8pt; font-weight:600;&quot;&gt;RetroShare&lt;/span&gt;&lt;span style=&quot; font-family:'Sans'; font-size:8pt;&quot;&gt; is capable of transferring data and search requests between peers that are not necessarily friends. This traffic however only transits through a connected list of friends and is anonymous.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans'; font-size:8pt;&quot;&gt;You can separately setup share flags for each shared directory in the shared files dialog to be:&lt;/span&gt;&lt;/p&gt;