* Fixed Colors and Fonts for Private and Group Chat.

* Fixed Chat Delay.
 * Cleaned up Options->Server, removing unneccessary stuff.
 * Cleaned up Config Friend, removing stuff.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@472 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2008-04-05 12:14:49 +00:00
parent cb795b3c67
commit 65bb6a65d7
9 changed files with 453 additions and 501 deletions

View File

@ -83,12 +83,14 @@ ChatDialog::ChatDialog(QWidget *parent)
/* to hide the header */
ui.msgSendList->header()->hide();
textColor = Qt::black;
_currentColor = Qt::black;
QPixmap pxm(24,24);
pxm.fill(textColor);
pxm.fill(_currentColor);
ui.colorChatButton->setIcon(pxm);
QFont font = QFont("Comic Sans MS", 10);
//QFont font = QFont("Comic Sans MS", 10);
mCurrentFont = QFont("Comic Sans MS", 12);
ui.lineEdit->setFont(mCurrentFont);
setChatInfo(tr("Welcome to RetroShare's group chat."), QString::fromUtf8("blue"));
@ -98,6 +100,9 @@ ChatDialog::ChatDialog(QWidget *parent)
_underline = false;
QTimer *timer = new QTimer(this);
timer->connect(timer, SIGNAL(timeout()), this, SLOT(insertChat()));
timer->start(500); /* half a second */
/* Hide platform specific features */
#ifdef Q_WS_WIN
@ -121,6 +126,11 @@ void ChatDialog::msgSendListCostumPopupMenu( QPoint point )
void ChatDialog::insertChat()
{
if (!rsMsgs->chatAvailable())
{
return;
}
std::list<ChatInfo> newchat;
if (!rsMsgs->getNewChat(newchat))
{
@ -134,6 +144,9 @@ void ChatDialog::insertChat()
/* add in lines at the bottom */
for(it = newchat.begin(); it != newchat.end(); it++)
{
std::string msg(it->msg.begin(), it->msg.end());
std::cerr << "ChatDialog::insertChat(): " << msg << std::endl;
/* are they private? */
if (it->chatflags & RS_CHAT_PRIVATE)
{
@ -205,8 +218,12 @@ void ChatDialog::sendMsg()
ci.msg = lineWidget->toHtml().toStdWString();
ci.chatflags = RS_CHAT_PUBLIC;
std::string msg(ci.msg.begin(), ci.msg.end());
std::cerr << "ChatDialog::sendMsg(): " << msg << std::endl;
rsMsgs -> ChatSend(ci);
ui.lineEdit->clear();
setFont();
/* redraw send list */
insertSendList();
@ -340,39 +357,34 @@ void ChatDialog::clearOldChats()
void ChatDialog::setColor()
{
bool ok;
QRgb color = QColorDialog::getRgba(ui.lineEdit->textColor().rgba(), &ok, this);
if (ok) {
_currentColor = QColor(color);
ui.lineEdit->setTextColor(_currentColor);
QPixmap pxm(24,24);
pxm.fill(_currentColor);
ui.colorChatButton->setIcon(pxm);
}
ui.lineEdit->setFocus();
bool ok;
QRgb color = QColorDialog::getRgba(ui.lineEdit->textColor().rgba(), &ok, this);
if (ok) {
_currentColor = QColor(color);
QPixmap pxm(24,24);
pxm.fill(_currentColor);
ui.colorChatButton->setIcon(pxm);
}
setFont();
}
void ChatDialog::getFont()
{
bool ok;
QFont font = QFontDialog::getFont(&ok, QFont(ui.lineEdit->toHtml()), this);
if (ok) {
ui.lineEdit->setFont(font);
}
void ChatDialog::getFont()
{
bool ok;
mCurrentFont = QFontDialog::getFont(&ok, mCurrentFont, this);
setFont();
}
void ChatDialog::setFont()
{
void ChatDialog::setFont()
{
mCurrentFont.setBold(ui.textboldChatButton->isChecked());
mCurrentFont.setUnderline(ui.textunderlineChatButton->isChecked());
mCurrentFont.setItalic(ui.textitalicChatButton->isChecked());
ui.lineEdit->setFont(mCurrentFont);
ui.lineEdit->setTextColor(_currentColor);
ui.lineEdit->setFocus();
QFont font = QFont("Comic Sans MS", 10);
font.setBold(ui.textboldChatButton->isChecked());
font.setUnderline(ui.textunderlineChatButton->isChecked());
font.setItalic(ui.textitalicChatButton->isChecked());
//font.setStrikeOut(ui.textstrikeChatButton->isChecked());
ui.lineEdit->setFont(font);
}
void ChatDialog::underline()

View File

@ -24,7 +24,6 @@
#include "mainpage.h"
#include "ui_ChatDialog.h"
#include "ui_SmWidget.h"
#include "chat/PopupChatDialog.h"
@ -42,7 +41,6 @@ public:
ChatDialog(QWidget *parent = 0);
/** Default Destructor */
void insertChat();
PopupChatDialog *getPrivateChat(std::string id, std::string name, bool show);
void clearOldChats();
@ -52,6 +50,7 @@ public:
public slots:
void insertChat();
void setChatInfo(QString info, QColor color=QApplication::palette().color(QPalette::WindowText));
void smileyWidgetgroupchat();
@ -94,7 +93,7 @@ private:
QTreeView *msgSendList;
QColor textColor;
// QColor textColor;
QColor _currentColor;
bool _underline;
@ -102,7 +101,7 @@ private:
std::map<std::string, PopupChatDialog *> chatDialogs;
QFont mCurrentFont; /* how the text will come out */
/** Qt Designer generated object */
Ui::ChatDialog ui;

View File

@ -5,8 +5,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>459</width>
<height>409</height>
<width>451</width>
<height>438</height>
</rect>
</property>
<property name="sizePolicy" >
@ -498,78 +498,113 @@
<property name="contextMenuPolicy" >
<enum>Qt::NoContextMenu</enum>
</property>
<layout class="QVBoxLayout" >
<item>
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QGroupBox" name="groupBox_2" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title" >
<string>Network Address Configuration (takes effect after restart)</string>
<string>Network Configuration (takes effect after restart)</string>
</property>
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QComboBox" name="netModeComboBox" >
<property name="leftMargin" >
<number>4</number>
</property>
<property name="topMargin" >
<number>2</number>
</property>
<property name="rightMargin" >
<number>4</number>
</property>
<property name="bottomMargin" >
<number>2</number>
</property>
<item row="1" column="0" >
<layout class="QVBoxLayout" >
<item>
<property name="text" >
<string>Automatic (Firewalled)</string>
</property>
<widget class="QComboBox" name="netModeComboBox" >
<item>
<property name="text" >
<string>Automatic (Firewalled)</string>
</property>
</item>
<item>
<property name="text" >
<string>Firewalled + No UPnP</string>
</property>
</item>
<item>
<property name="text" >
<string>External (Forwarded) Port</string>
</property>
</item>
</widget>
</item>
<item>
<property name="text" >
<string>Firewalled + No UPnP</string>
</property>
<layout class="QHBoxLayout" >
<item>
<widget class="QComboBox" name="dhtComboBox" >
<item>
<property name="text" >
<string>DHT Enabled</string>
</property>
</item>
<item>
<property name="text" >
<string>DHT Disabled</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QComboBox" name="discComboBox" >
<item>
<property name="text" >
<string>Discovery Enabled</string>
</property>
</item>
<item>
<property name="text" >
<string>Discovery Disabled</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<property name="text" >
<string>External (Forwarded) Port</string>
</property>
</item>
</widget>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_4" >
<property name="title" >
<string>External Visibility / Discovery Configuration</string>
</property>
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QComboBox" name="dhtComboBox" >
<item>
<property name="text" >
<string>DHT Enabled</string>
</property>
</item>
<item>
<property name="text" >
<string>DHT Disabled</string>
</property>
</item>
</widget>
</item>
<item row="0" column="1" >
<widget class="QComboBox" name="discComboBox" >
<item>
<property name="text" >
<string>Discovery Enabled</string>
</property>
</item>
<item>
<property name="text" >
<string>Discovery Disabled</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<item row="1" column="0" >
<widget class="QGroupBox" name="groupBox" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Expanding" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title" >
<string>Server Status And Network Settings</string>
</property>
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>4</number>
</property>
<property name="topMargin" >
<number>4</number>
</property>
<property name="rightMargin" >
<number>4</number>
</property>
<property name="bottomMargin" >
<number>4</number>
</property>
<item row="0" column="0" >
<layout class="QVBoxLayout" >
<item>
@ -663,12 +698,30 @@
</layout>
</widget>
</item>
<item>
<item row="2" column="0" >
<widget class="QGroupBox" name="groupBox_3" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title" >
<string>Transfer Rates</string>
</property>
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>4</number>
</property>
<property name="topMargin" >
<number>4</number>
</property>
<property name="rightMargin" >
<number>4</number>
</property>
<property name="bottomMargin" >
<number>4</number>
</property>
<item row="0" column="0" >
<layout class="QHBoxLayout" >
<property name="spacing" >

View File

@ -101,15 +101,16 @@ PopupChatDialog::PopupChatDialog(std::string id, std::string name,
fontmenu->addAction(ui.actionItalic);
fontmenu->addAction(ui.actionStrike);
ui.fontButton->setMenu(fontmenu);*/
QPixmap pxm(24,24);
pxm.fill(Qt::black);
ui.colorButton->setIcon(pxm);
QFont font = QFont("Comic Sans MS", 10);
}
mCurrentColor = Qt::black;
mCurrentFont = QFont("Comic Sans MS", 12);
colorChanged(mCurrentColor);
setFont();
}
/** Destructor. */
PopupChatDialog::~PopupChatDialog()
{
@ -258,7 +259,8 @@ void PopupChatDialog::sendChat()
ci.name = dialogName;
rsMsgs -> ChatSend(ci);
chatWidget ->clear();
chatWidget ->clear();
setFont();
/* redraw send list */
}
@ -279,22 +281,19 @@ void PopupChatDialog::showAvatarFrame(bool show)
ui.avatarFrameButton->setToolTip(tr("Show Avatar"));
ui.avatarFrameButton->setIcon(QIcon(tr(":images/show_toolbox_frame.png")));
}
}
void PopupChatDialog::setColor()
{
bool ok;
QRgb color = QColorDialog::getRgba(ui.chattextEdit->textColor().rgba(), &ok, this);
if (ok) {
currentColor = QColor(color);
ui.chattextEdit->setTextColor(currentColor);
colorChanged(currentColor);
}
ui.chattextEdit->setFocus();
QTextCursor cursor = ui.chattextEdit->textCursor();
}
}
void PopupChatDialog::setColor()
{
bool ok;
QRgb color = QColorDialog::getRgba(ui.chattextEdit->textColor().rgba(), &ok, this);
if (ok) {
mCurrentColor = QColor(color);
colorChanged(mCurrentColor);
}
setFont();
}
void PopupChatDialog::colorChanged(const QColor &c)
{
QPixmap pix(16, 16);
@ -302,24 +301,27 @@ void PopupChatDialog::colorChanged(const QColor &c)
ui.colorButton->setIcon(pix);
}
void PopupChatDialog::getFont()
{
bool ok;
QFont font = QFontDialog::getFont(&ok, QFont(ui.chattextEdit->toHtml()), this);
if (ok) {
ui.chattextEdit->setFont(font);
}
}
void PopupChatDialog::setFont()
{
QFont font = QFont("Comic Sans MS", 10);
font.setBold(ui.textboldButton->isChecked());
font.setUnderline(ui.textunderlineButton->isChecked());
font.setItalic(ui.textitalicButton->isChecked());
ui.chattextEdit->setFont(font);
}
void PopupChatDialog::getFont()
{
bool ok;
mCurrentFont = QFontDialog::getFont(&ok, mCurrentFont, this);
setFont();
}
void PopupChatDialog::setFont()
{
mCurrentFont.setBold(ui.textboldButton->isChecked());
mCurrentFont.setUnderline(ui.textunderlineButton->isChecked());
mCurrentFont.setItalic(ui.textitalicButton->isChecked());
ui.chattextEdit->setFont(mCurrentFont);
ui.chattextEdit->setTextColor(mCurrentColor);
ui.chattextEdit->setFocus();
}
void PopupChatDialog::loadEmoticons()
{
QDir smdir(QApplication::applicationDirPath() + "/emoticons/kopete");

View File

@ -91,7 +91,8 @@ private:
std::string lastChatName;
QHash<QString, QString> smileys;
QColor currentColor;
QColor mCurrentColor;
QFont mCurrentFont;
/** Qt Designer generated object */
Ui::PopupChatDialog ui;

View File

@ -100,10 +100,10 @@ void ConfCertDialog::loadDialog()
/**** TODO ****/
//ui.chkFirewall ->setChecked(ni->firewalled);
//ui.chkForwarded ->setChecked(ni->forwardPort);
ui.chkFirewall ->setChecked(0);
ui.chkForwarded ->setChecked(0);
//ui.chkFirewall ->setChecked(0);
//ui.chkForwarded ->setChecked(0);
ui.indivRate->setValue(0);
//ui.indivRate->setValue(0);
ui.trustLvl->setText(QString::fromStdString(RsPeerTrustString(detail.trustLvl)));

View File

@ -5,14 +5,12 @@
<rect>
<x>0</x>
<y>0</y>
<width>434</width>
<height>462</height>
<width>425</width>
<height>449</height>
</rect>
</property>
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -506,75 +504,53 @@
<widget class="QGroupBox" name="groupBox_3" >
<property name="geometry" >
<rect>
<x>10</x>
<y>300</y>
<width>411</width>
<height>121</height>
<x>9</x>
<y>279</y>
<width>407</width>
<height>127</height>
</rect>
</property>
<property name="title" >
<string>Trust Settings</string>
</property>
<widget class="QLabel" name="label_9" >
<property name="geometry" >
<rect>
<x>20</x>
<y>20</y>
<width>81</width>
<height>21</height>
</rect>
</property>
<property name="text" >
<string>Trust Level</string>
</property>
</widget>
<widget class="QCheckBox" name="trustBox" >
<property name="geometry" >
<rect>
<x>120</x>
<y>70</y>
<width>271</width>
<height>23</height>
</rect>
</property>
<property name="text" >
<string>Trust Their Signature</string>
</property>
</widget>
<widget class="QCheckBox" name="signBox" >
<property name="geometry" >
<rect>
<x>120</x>
<y>50</y>
<width>271</width>
<height>23</height>
</rect>
</property>
<property name="text" >
<string>Sign The Certificate</string>
</property>
</widget>
<widget class="QLineEdit" name="trustLvl" >
<property name="geometry" >
<rect>
<x>110</x>
<y>20</y>
<width>221</width>
<height>23</height>
</rect>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QLabel" name="label_9" >
<property name="text" >
<string>Trust Level</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="trustLvl" >
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QCheckBox" name="signBox" >
<property name="text" >
<string>Sign The Certificate</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QCheckBox" name="trustBox" >
<property name="text" >
<string>Trust Their Signature</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QPushButton" name="cancelButton" >
<property name="geometry" >
<rect>
<x>210</x>
<y>430</y>
<width>101</width>
<height>23</height>
<x>9</x>
<y>415</y>
<width>199</width>
<height>25</height>
</rect>
</property>
<property name="text" >
@ -584,10 +560,10 @@
<widget class="QPushButton" name="applyButton" >
<property name="geometry" >
<rect>
<x>320</x>
<y>430</y>
<width>101</width>
<height>23</height>
<x>218</x>
<y>415</y>
<width>198</width>
<height>25</height>
</rect>
</property>
<property name="text" >
@ -603,318 +579,229 @@
<widget class="QGroupBox" name="groupBox" >
<property name="geometry" >
<rect>
<x>10</x>
<y>110</y>
<width>411</width>
<height>191</height>
<x>9</x>
<y>143</y>
<width>407</width>
<height>127</height>
</rect>
</property>
<property name="title" >
<string>Peer Adress</string>
<string>Peer Address</string>
</property>
<widget class="QWidget" name="layoutWidget" >
<property name="geometry" >
<rect>
<x>100</x>
<y>20</y>
<width>274</width>
<height>130</height>
</rect>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<layout class="QGridLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="2" >
<widget class="QSpinBox" name="localPort" >
<property name="maximum" >
<number>65535</number>
</property>
<property name="minimum" >
<number>0</number>
</property>
<property name="value" >
<number>7812</number>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLabel" name="label_5" >
<property name="text" >
<string>Port:</string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLineEdit" name="localAddress" />
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QCheckBox" name="chkFirewall" >
<property name="text" >
<string>behind zee Firewall</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkForwarded" >
<property name="text" >
<string>Forwarded External Port</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="0" >
<widget class="QLineEdit" name="extAddress" />
</item>
<item row="0" column="2" >
<widget class="QSpinBox" name="extPort" >
<property name="maximum" >
<number>65535</number>
</property>
<property name="minimum" >
<number>0</number>
</property>
<property name="value" >
<number>7812</number>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLabel" name="label_4" >
<property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QLabel" name="label" >
<property name="text" >
<string>Local Address:</string>
</property>
</widget>
</item>
<item rowspan="3" row="0" column="1" >
<layout class="QVBoxLayout" >
<property name="spacing" >
<number>6</number>
</property>
<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>
<layout class="QGridLayout" >
<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="horizontalSpacing" >
<number>6</number>
</property>
<property name="verticalSpacing" >
<number>6</number>
</property>
<item row="0" column="2" >
<widget class="QSpinBox" name="localPort" >
<property name="minimum" >
<number>0</number>
</property>
<property name="maximum" >
<number>65535</number>
</property>
<property name="value" >
<number>7812</number>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLabel" name="label_5" >
<property name="text" >
<string>Port:</string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLineEdit" name="localAddress" />
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" >
<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="horizontalSpacing" >
<number>6</number>
</property>
<property name="verticalSpacing" >
<number>6</number>
</property>
<item row="0" column="0" >
<widget class="QLineEdit" name="extAddress" />
</item>
<item row="0" column="2" >
<widget class="QSpinBox" name="extPort" >
<property name="minimum" >
<number>0</number>
</property>
<property name="maximum" >
<number>65535</number>
</property>
<property name="value" >
<number>7812</number>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLabel" name="label_4" >
<property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Port:&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLineEdit" name="extName" />
</item>
</layout>
</widget>
<widget class="QLabel" name="label_2" >
<property name="geometry" >
<rect>
<x>10</x>
<y>90</y>
<width>91</width>
<height>21</height>
</rect>
</property>
<property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLineEdit" name="extName" >
<property name="enabled" >
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">External Address:&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
<widget class="QLabel" name="label_3" >
<property name="geometry" >
<rect>
<x>10</x>
<y>120</y>
<width>80</width>
<height>21</height>
</rect>
</property>
<property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_3" >
<property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">External Name&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
<widget class="QLabel" name="label" >
<property name="geometry" >
<rect>
<x>12</x>
<y>21</y>
<width>66</width>
<height>21</height>
</rect>
</property>
<property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Lokal Adress:&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
<widget class="QWidget" name="layoutWidget_3" >
<property name="geometry" >
<rect>
<x>120</x>
<y>150</y>
<width>194</width>
<height>33</height>
</rect>
</property>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="label_14" >
<property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Max Transfer Rate (kb/s) &lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="indivRate" >
<property name="maximum" >
<number>65535</number>
</property>
<property name="minimum" >
<number>1</number>
</property>
<property name="value" >
<number>7812</number>
</property>
</widget>
</item>
</layout>
</widget>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QGroupBox" name="groupBox_2" >
<property name="geometry" >
<rect>
<x>10</x>
<y>0</y>
<width>411</width>
<height>111</height>
<x>9</x>
<y>7</y>
<width>407</width>
<height>127</height>
</rect>
</property>
<property name="title" >
<string>Peer Info</string>
</property>
<widget class="QLineEdit" name="name" >
<property name="geometry" >
<rect>
<x>101</x>
<y>25</y>
<width>259</width>
<height>19</height>
</rect>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
<widget class="QLineEdit" name="country" >
<property name="geometry" >
<rect>
<x>101</x>
<y>85</y>
<width>259</width>
<height>19</height>
</rect>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
<widget class="QLineEdit" name="orgloc" >
<property name="geometry" >
<rect>
<x>101</x>
<y>55</y>
<width>259</width>
<height>19</height>
</rect>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
<widget class="QLabel" name="label_10" >
<property name="geometry" >
<rect>
<x>11</x>
<y>21</y>
<width>79</width>
<height>26</height>
</rect>
</property>
<property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QLabel" name="label_10" >
<property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Name:&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
<widget class="QLabel" name="label_8" >
<property name="geometry" >
<rect>
<x>11</x>
<y>84</y>
<width>79</width>
<height>26</height>
</rect>
</property>
<property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Country/State:&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
<widget class="QLabel" name="label_11" >
<property name="geometry" >
<rect>
<x>11</x>
<y>53</y>
<width>79</width>
<height>25</height>
</rect>
</property>
<property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="name" >
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_11" >
<property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Org / Loc:&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLineEdit" name="orgloc" >
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_8" >
<property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Country/State:&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QLineEdit" name="country" >
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<tabstops>
@ -923,12 +810,9 @@ p, li { white-space: pre-wrap; }
<tabstop>country</tabstop>
<tabstop>localAddress</tabstop>
<tabstop>localPort</tabstop>
<tabstop>chkFirewall</tabstop>
<tabstop>chkForwarded</tabstop>
<tabstop>extAddress</tabstop>
<tabstop>extPort</tabstop>
<tabstop>extName</tabstop>
<tabstop>indivRate</tabstop>
<tabstop>trustLvl</tabstop>
<tabstop>signBox</tabstop>
<tabstop>trustBox</tabstop>

View File

@ -114,7 +114,7 @@ void NotifyQt::UpdateGUI()
bool uNeigh = iface->hasChanged(RsIface::Neighbour);
bool uFri = iface->hasChanged(RsIface::Friend);
bool uTrans = iface->hasChanged(RsIface::Transfer);
bool uChat = iface->hasChanged(RsIface::Chat);
//bool uChat = iface->hasChanged(RsIface::Chat);
bool uMsg = iface->hasChanged(RsIface::Message);
bool uChan = iface->hasChanged(RsIface::Channel);
bool uRecom = iface->hasChanged(RsIface::Recommend);
@ -132,7 +132,7 @@ static time_t lastTs = 0;
uNeigh = true;
uFri = true;
uTrans = true;
uChat = true;
//uChat = true;
uMsg = true;
uChan = true;
uRecom = true;
@ -148,8 +148,8 @@ static time_t lastTs = 0;
if (uTrans)
displayTransfers();
if (uChat)
displayChat();
//if (uChat)
// displayChat();
if (uMsg)
displayMessages();

View File

@ -127,6 +127,7 @@ virtual bool MessageRead(std::string mid) = 0;
/****************************************/
/* Chat */
virtual bool chatAvailable() = 0;
virtual bool ChatSend(ChatInfo &ci) = 0;
virtual bool getNewChat(std::list<ChatInfo> &chats) = 0;