Fixed reaction of the checkbox "web of trust". Now the list of unvalid gpg keys is shown or hide directly after the click.

Fixed calculation of the unread messages in MessagesDialog. The starred messages was not counted as unread.
Set some tree widgets to allColumnsShowFocus.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4285 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2011-06-17 20:51:05 +00:00
parent ed24033323
commit cbb3b4587f
10 changed files with 38 additions and 31 deletions

View file

@ -164,7 +164,6 @@ ForumsDialog::ForumsDialog(QWidget *parent)
/* Set own item delegate */ /* Set own item delegate */
RSItemDelegate *itemDelegate = new RSItemDelegate(this); RSItemDelegate *itemDelegate = new RSItemDelegate(this);
itemDelegate->removeFocusRect(COLUMN_THREAD_READ);
itemDelegate->setSpacing(QSize(0, 2)); itemDelegate->setSpacing(QSize(0, 2));
ui.threadTreeWidget->setItemDelegate(itemDelegate); ui.threadTreeWidget->setItemDelegate(itemDelegate);
@ -1433,7 +1432,7 @@ void ForumsDialog::replytomessage()
QTextDocument doc ; QTextDocument doc ;
doc.setHtml(QString::fromStdWString(msgInfo.msg)) ; doc.setHtml(QString::fromStdWString(msgInfo.msg)) ;
nMsgDialog->insertPastedText(doc.toPlainText()); nMsgDialog->insertReplyText(doc.toPlainText());
nMsgDialog->addRecipient(MessageComposer::TO, msgInfo.srcId, false); nMsgDialog->addRecipient(MessageComposer::TO, msgInfo.srcId, false);
nMsgDialog->show(); nMsgDialog->show();
nMsgDialog->activateWindow(); nMsgDialog->activateWindow();

View file

@ -805,6 +805,9 @@ background: white;
<property name="sortingEnabled"> <property name="sortingEnabled">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="allColumnsShowFocus">
<bool>true</bool>
</property>
<column> <column>
<property name="text"> <property name="text">
<string>Title</string> <string>Title</string>

View file

@ -711,6 +711,9 @@ background: white;}</string>
<property name="sortingEnabled"> <property name="sortingEnabled">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="allColumnsShowFocus">
<bool>true</bool>
</property>
<property name="wordWrap"> <property name="wordWrap">
<bool>false</bool> <bool>false</bool>
</property> </property>

View file

@ -215,8 +215,6 @@ MessagesDialog::MessagesDialog(QWidget *parent)
connect(ui.messagestreeView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(updateInterface())); connect(ui.messagestreeView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(updateInterface()));
RSItemDelegate *itemDelegate = new RSItemDelegate(this); RSItemDelegate *itemDelegate = new RSItemDelegate(this);
itemDelegate->removeFocusRect(COLUMN_UNREAD);
itemDelegate->removeFocusRect(COLUMN_STAR);
itemDelegate->setSpacing(QSize(0, 2)); itemDelegate->setSpacing(QSize(0, 2));
ui.messagestreeView->setItemDelegate(itemDelegate); ui.messagestreeView->setItemDelegate(itemDelegate);
@ -1636,7 +1634,6 @@ void MessagesDialog::updateMessageSummaryList()
if (it->msgflags & RS_MSG_STAR) { if (it->msgflags & RS_MSG_STAR) {
starredCount++; starredCount++;
continue;
} }
/* calculate box */ /* calculate box */

View file

@ -1311,6 +1311,9 @@ padding: 4px;
<property name="sortingEnabled"> <property name="sortingEnabled">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="allColumnsShowFocus">
<bool>true</bool>
</property>
</widget> </widget>
<widget class="QWidget" name="layoutWidget"> <widget class="QWidget" name="layoutWidget">
<layout class="QGridLayout" name="msgLayout"/> <layout class="QGridLayout" name="msgLayout"/>

View file

@ -38,7 +38,6 @@
#include "GenCertDialog.h" #include "GenCertDialog.h"
#include "connect/ConfCertDialog.h" #include "connect/ConfCertDialog.h"
#include "settings/rsharesettings.h" #include "settings/rsharesettings.h"
#include "common/RSItemDelegate.h"
#include "RetroShareLink.h" #include "RetroShareLink.h"
#include <time.h> #include <time.h>
@ -101,11 +100,6 @@ NetworkDialog::NetworkDialog(QWidget *parent)
ui.connecttreeWidget -> setColumnCount(5); ui.connecttreeWidget -> setColumnCount(5);
ui.unvalidGPGkeyWidget-> setColumnCount(5); ui.unvalidGPGkeyWidget-> setColumnCount(5);
RSItemDelegate *itemDelegate = new RSItemDelegate(this);
itemDelegate->removeFocusRect(0);
ui.connecttreeWidget->setItemDelegate(itemDelegate);
ui.unvalidGPGkeyWidget->setItemDelegate(itemDelegate);
/* Set header resize modes and initial section sizes */ /* Set header resize modes and initial section sizes */
QHeaderView * _header = ui.connecttreeWidget->header () ; QHeaderView * _header = ui.connecttreeWidget->header () ;
_header->setResizeMode (0, QHeaderView::Custom); _header->setResizeMode (0, QHeaderView::Custom);
@ -370,6 +364,12 @@ void NetworkDialog::insertConnect()
if (!rsPeers) if (!rsPeers)
return; return;
if (ui.showUnvalidKeys->isChecked()) {
ui.unvalidGPGkeyWidget->show();
} else {
ui.unvalidGPGkeyWidget->hide();
}
// Because this is called from a qt signal, there's no limitation between calls. // Because this is called from a qt signal, there's no limitation between calls.
time_t now = time(NULL); time_t now = time(NULL);
if(last_time + 5 > now) // never update more often then every 5 seconds. if(last_time + 5 > now) // never update more often then every 5 seconds.
@ -557,11 +557,6 @@ void NetworkDialog::insertConnect()
} }
connectWidget->addTopLevelItem(self_item); connectWidget->addTopLevelItem(self_item);
if (ui.showUnvalidKeys->isChecked()) {
ui.unvalidGPGkeyWidget->show();
} else {
ui.unvalidGPGkeyWidget->hide();
}
connectWidget->update(); /* update display */ connectWidget->update(); /* update display */
ui.unvalidGPGkeyWidget->update(); /* update display */ ui.unvalidGPGkeyWidget->update(); /* update display */

View file

@ -80,6 +80,9 @@
<property name="animated"> <property name="animated">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="allColumnsShowFocus">
<bool>true</bool>
</property>
<property name="wordWrap"> <property name="wordWrap">
<bool>true</bool> <bool>true</bool>
</property> </property>
@ -168,7 +171,7 @@ border: 1px solid #CCCCCC;}</string>
<string/> <string/>
</property> </property>
<property name="pixmap"> <property name="pixmap">
<pixmap resource="images.qrc">:/images/rs1.png</pixmap> <pixmap>:/images/rs1.png</pixmap>
</property> </property>
<property name="scaledContents"> <property name="scaledContents">
<bool>true</bool> <bool>true</bool>
@ -203,7 +206,7 @@ p, li { white-space: pre-wrap; }
<string/> <string/>
</property> </property>
<property name="pixmap"> <property name="pixmap">
<pixmap resource="images.qrc">:/images/find-16.png</pixmap> <pixmap>:/images/find-16.png</pixmap>
</property> </property>
</widget> </widget>
</item> </item>
@ -320,7 +323,7 @@ subcontrol-position: bottom right;
<string/> <string/>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="images.qrc"> <iconset>
<normaloff>:/images/looknfeel.png</normaloff>:/images/looknfeel.png</iconset> <normaloff>:/images/looknfeel.png</normaloff>:/images/looknfeel.png</iconset>
</property> </property>
<property name="default"> <property name="default">
@ -373,7 +376,7 @@ subcontrol-position: bottom right;
<string/> <string/>
</property> </property>
<property name="pixmap"> <property name="pixmap">
<pixmap resource="images.qrc">:/images/ledoff1.png</pixmap> <pixmap>:/images/ledoff1.png</pixmap>
</property> </property>
</widget> </widget>
</item> </item>
@ -406,7 +409,7 @@ subcontrol-position: bottom right;
<string/> <string/>
</property> </property>
<property name="pixmap"> <property name="pixmap">
<pixmap resource="images.qrc">:/images/ledoff1.png</pixmap> <pixmap>:/images/ledoff1.png</pixmap>
</property> </property>
</widget> </widget>
</item> </item>
@ -439,7 +442,7 @@ subcontrol-position: bottom right;
<string/> <string/>
</property> </property>
<property name="pixmap"> <property name="pixmap">
<pixmap resource="images.qrc">:/images/ledoff1.png</pixmap> <pixmap>:/images/ledoff1.png</pixmap>
</property> </property>
</widget> </widget>
</item> </item>
@ -477,6 +480,9 @@ subcontrol-position: bottom right;
<property name="sortingEnabled"> <property name="sortingEnabled">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="allColumnsShowFocus">
<bool>true</bool>
</property>
<attribute name="headerCascadingSectionResizes"> <attribute name="headerCascadingSectionResizes">
<bool>true</bool> <bool>true</bool>
</attribute> </attribute>
@ -564,7 +570,7 @@ subcontrol-position: bottom right;
</action> </action>
<action name="actionAddFriend"> <action name="actionAddFriend">
<property name="icon"> <property name="icon">
<iconset resource="images.qrc"> <iconset>
<normaloff>:/images/user/add_user16.png</normaloff>:/images/user/add_user16.png</iconset> <normaloff>:/images/user/add_user16.png</normaloff>:/images/user/add_user16.png</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -578,7 +584,7 @@ subcontrol-position: bottom right;
</action> </action>
<action name="actionExportKey"> <action name="actionExportKey">
<property name="icon"> <property name="icon">
<iconset resource="images.qrc"> <iconset>
<normaloff>:/images/exportpeers_16x16.png</normaloff>:/images/exportpeers_16x16.png</iconset> <normaloff>:/images/exportpeers_16x16.png</normaloff>:/images/exportpeers_16x16.png</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -594,8 +600,6 @@ subcontrol-position: bottom right;
</property> </property>
</action> </action>
</widget> </widget>
<resources> <resources/>
<include location="images.qrc"/>
</resources>
<connections/> <connections/>
</ui> </ui>

View file

@ -71,7 +71,6 @@ GroupTreeWidget::GroupTreeWidget(QWidget *parent) :
/* Add own item delegate */ /* Add own item delegate */
RSItemDelegate *itemDelegate = new RSItemDelegate(this); RSItemDelegate *itemDelegate = new RSItemDelegate(this);
itemDelegate->removeFocusRect(COLUMN_POPULARITY);
itemDelegate->setSpacing(QSize(0, 2)); itemDelegate->setSpacing(QSize(0, 2));
ui->treeWidget->setItemDelegate(itemDelegate); ui->treeWidget->setItemDelegate(itemDelegate);

View file

@ -216,6 +216,9 @@ border-image: url(:/images/closepressed.png)
<height>19</height> <height>19</height>
</size> </size>
</property> </property>
<property name="allColumnsShowFocus">
<bool>true</bool>
</property>
<attribute name="headerVisible"> <attribute name="headerVisible">
<bool>false</bool> <bool>false</bool>
</attribute> </attribute>
@ -237,8 +240,6 @@ border-image: url(:/images/closepressed.png)
</item> </item>
</layout> </layout>
</widget> </widget>
<resources> <resources/>
<include location="../images.qrc"/>
</resources>
<connections/> <connections/>
</ui> </ui>

View file

@ -448,6 +448,9 @@ p, li { white-space: pre-wrap; }
<property name="sortingEnabled"> <property name="sortingEnabled">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="allColumnsShowFocus">
<bool>true</bool>
</property>
<column> <column>
<property name="text"> <property name="text">
<string>File Name</string> <string>File Name</string>