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

View File

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

View File

@ -5,8 +5,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>459</width> <width>451</width>
<height>409</height> <height>438</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy" > <property name="sizePolicy" >
@ -498,14 +498,34 @@
<property name="contextMenuPolicy" > <property name="contextMenuPolicy" >
<enum>Qt::NoContextMenu</enum> <enum>Qt::NoContextMenu</enum>
</property> </property>
<layout class="QVBoxLayout" >
<item>
<widget class="QGroupBox" name="groupBox_2" >
<property name="title" >
<string>Network Address Configuration (takes effect after restart)</string>
</property>
<layout class="QGridLayout" > <layout class="QGridLayout" >
<item row="0" column="0" > <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 Configuration (takes effect after restart)</string>
</property>
<layout class="QGridLayout" >
<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>
<widget class="QComboBox" name="netModeComboBox" > <widget class="QComboBox" name="netModeComboBox" >
<item> <item>
<property name="text" > <property name="text" >
@ -524,16 +544,9 @@
</item> </item>
</widget> </widget>
</item> </item>
</layout>
</widget>
</item>
<item> <item>
<widget class="QGroupBox" name="groupBox_4" > <layout class="QHBoxLayout" >
<property name="title" > <item>
<string>External Visibility / Discovery Configuration</string>
</property>
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QComboBox" name="dhtComboBox" > <widget class="QComboBox" name="dhtComboBox" >
<item> <item>
<property name="text" > <property name="text" >
@ -547,7 +560,7 @@
</item> </item>
</widget> </widget>
</item> </item>
<item row="0" column="1" > <item>
<widget class="QComboBox" name="discComboBox" > <widget class="QComboBox" name="discComboBox" >
<item> <item>
<property name="text" > <property name="text" >
@ -562,14 +575,36 @@
</widget> </widget>
</item> </item>
</layout> </layout>
</item>
</layout>
</item>
</layout>
</widget> </widget>
</item> </item>
<item> <item row="1" column="0" >
<widget class="QGroupBox" name="groupBox" > <widget class="QGroupBox" name="groupBox" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Expanding" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title" > <property name="title" >
<string>Server Status And Network Settings</string> <string>Server Status And Network Settings</string>
</property> </property>
<layout class="QGridLayout" > <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" > <item row="0" column="0" >
<layout class="QVBoxLayout" > <layout class="QVBoxLayout" >
<item> <item>
@ -663,12 +698,30 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item> <item row="2" column="0" >
<widget class="QGroupBox" name="groupBox_3" > <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" > <property name="title" >
<string>Transfer Rates</string> <string>Transfer Rates</string>
</property> </property>
<layout class="QGridLayout" > <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" > <item row="0" column="0" >
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" >
<property name="spacing" > <property name="spacing" >

View File

@ -102,11 +102,12 @@ PopupChatDialog::PopupChatDialog(std::string id, std::string name,
fontmenu->addAction(ui.actionStrike); fontmenu->addAction(ui.actionStrike);
ui.fontButton->setMenu(fontmenu);*/ ui.fontButton->setMenu(fontmenu);*/
QPixmap pxm(24,24); mCurrentColor = Qt::black;
pxm.fill(Qt::black); mCurrentFont = QFont("Comic Sans MS", 12);
ui.colorButton->setIcon(pxm);
colorChanged(mCurrentColor);
setFont();
QFont font = QFont("Comic Sans MS", 10);
} }
@ -259,6 +260,7 @@ void PopupChatDialog::sendChat()
rsMsgs -> ChatSend(ci); rsMsgs -> ChatSend(ci);
chatWidget ->clear(); chatWidget ->clear();
setFont();
/* redraw send list */ /* redraw send list */
} }
@ -286,13 +288,10 @@ void PopupChatDialog::setColor()
bool ok; bool ok;
QRgb color = QColorDialog::getRgba(ui.chattextEdit->textColor().rgba(), &ok, this); QRgb color = QColorDialog::getRgba(ui.chattextEdit->textColor().rgba(), &ok, this);
if (ok) { if (ok) {
mCurrentColor = QColor(color);
currentColor = QColor(color); colorChanged(mCurrentColor);
ui.chattextEdit->setTextColor(currentColor);
colorChanged(currentColor);
} }
ui.chattextEdit->setFocus(); setFont();
QTextCursor cursor = ui.chattextEdit->textCursor();
} }
void PopupChatDialog::colorChanged(const QColor &c) void PopupChatDialog::colorChanged(const QColor &c)
@ -305,19 +304,22 @@ void PopupChatDialog::colorChanged(const QColor &c)
void PopupChatDialog::getFont() void PopupChatDialog::getFont()
{ {
bool ok; bool ok;
QFont font = QFontDialog::getFont(&ok, QFont(ui.chattextEdit->toHtml()), this); mCurrentFont = QFontDialog::getFont(&ok, mCurrentFont, this);
if (ok) { setFont();
ui.chattextEdit->setFont(font);
}
} }
void PopupChatDialog::setFont() void PopupChatDialog::setFont()
{ {
QFont font = QFont("Comic Sans MS", 10);
font.setBold(ui.textboldButton->isChecked()); mCurrentFont.setBold(ui.textboldButton->isChecked());
font.setUnderline(ui.textunderlineButton->isChecked()); mCurrentFont.setUnderline(ui.textunderlineButton->isChecked());
font.setItalic(ui.textitalicButton->isChecked()); mCurrentFont.setItalic(ui.textitalicButton->isChecked());
ui.chattextEdit->setFont(font);
ui.chattextEdit->setFont(mCurrentFont);
ui.chattextEdit->setTextColor(mCurrentColor);
ui.chattextEdit->setFocus();
} }
void PopupChatDialog::loadEmoticons() void PopupChatDialog::loadEmoticons()

View File

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

View File

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

View File

@ -5,14 +5,12 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>434</width> <width>425</width>
<height>462</height> <height>449</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy> <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -506,75 +504,53 @@
<widget class="QGroupBox" name="groupBox_3" > <widget class="QGroupBox" name="groupBox_3" >
<property name="geometry" > <property name="geometry" >
<rect> <rect>
<x>10</x> <x>9</x>
<y>300</y> <y>279</y>
<width>411</width> <width>407</width>
<height>121</height> <height>127</height>
</rect> </rect>
</property> </property>
<property name="title" > <property name="title" >
<string>Trust Settings</string> <string>Trust Settings</string>
</property> </property>
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QLabel" name="label_9" > <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" > <property name="text" >
<string>Trust Level</string> <string>Trust Level</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" name="trustBox" > </item>
<property name="geometry" > <item row="0" column="1" >
<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" > <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" > <property name="readOnly" >
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </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>
<widget class="QPushButton" name="cancelButton" > <widget class="QPushButton" name="cancelButton" >
<property name="geometry" > <property name="geometry" >
<rect> <rect>
<x>210</x> <x>9</x>
<y>430</y> <y>415</y>
<width>101</width> <width>199</width>
<height>23</height> <height>25</height>
</rect> </rect>
</property> </property>
<property name="text" > <property name="text" >
@ -584,10 +560,10 @@
<widget class="QPushButton" name="applyButton" > <widget class="QPushButton" name="applyButton" >
<property name="geometry" > <property name="geometry" >
<rect> <rect>
<x>320</x> <x>218</x>
<y>430</y> <y>415</y>
<width>101</width> <width>198</width>
<height>23</height> <height>25</height>
</rect> </rect>
</property> </property>
<property name="text" > <property name="text" >
@ -603,47 +579,68 @@
<widget class="QGroupBox" name="groupBox" > <widget class="QGroupBox" name="groupBox" >
<property name="geometry" > <property name="geometry" >
<rect> <rect>
<x>10</x> <x>9</x>
<y>110</y> <y>143</y>
<width>411</width> <width>407</width>
<height>191</height> <height>127</height>
</rect> </rect>
</property> </property>
<property name="title" > <property name="title" >
<string>Peer Adress</string> <string>Peer Address</string>
</property> </property>
<widget class="QWidget" name="layoutWidget" > <layout class="QGridLayout" >
<property name="geometry" > <item row="0" column="0" >
<rect> <widget class="QLabel" name="label" >
<x>100</x> <property name="text" >
<y>20</y> <string>Local Address:</string>
<width>274</width>
<height>130</height>
</rect>
</property> </property>
</widget>
</item>
<item rowspan="3" row="0" column="1" >
<layout class="QVBoxLayout" > <layout class="QVBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" > <property name="spacing" >
<number>6</number> <number>6</number>
</property> </property>
<item> <property name="leftMargin" >
<layout class="QGridLayout" >
<property name="margin" >
<number>0</number> <number>0</number>
</property> </property>
<property name="spacing" > <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> <number>6</number>
</property> </property>
<item row="0" column="2" > <item row="0" column="2" >
<widget class="QSpinBox" name="localPort" > <widget class="QSpinBox" name="localPort" >
<property name="maximum" >
<number>65535</number>
</property>
<property name="minimum" > <property name="minimum" >
<number>0</number> <number>0</number>
</property> </property>
<property name="maximum" >
<number>65535</number>
</property>
<property name="value" > <property name="value" >
<number>7812</number> <number>7812</number>
</property> </property>
@ -662,35 +659,23 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" > <layout class="QGridLayout" >
<property name="margin" > <property name="leftMargin" >
<number>0</number> <number>0</number>
</property> </property>
<property name="spacing" > <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> <number>6</number>
</property> </property>
<item> <property name="verticalSpacing" >
<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> <number>6</number>
</property> </property>
<item row="0" column="0" > <item row="0" column="0" >
@ -698,12 +683,12 @@
</item> </item>
<item row="0" column="2" > <item row="0" column="2" >
<widget class="QSpinBox" name="extPort" > <widget class="QSpinBox" name="extPort" >
<property name="maximum" >
<number>65535</number>
</property>
<property name="minimum" > <property name="minimum" >
<number>0</number> <number>0</number>
</property> </property>
<property name="maximum" >
<number>65535</number>
</property>
<property name="value" > <property name="value" >
<number>7812</number> <number>7812</number>
</property> </property>
@ -722,19 +707,16 @@ p, li { white-space: pre-wrap; }
</layout> </layout>
</item> </item>
<item> <item>
<widget class="QLineEdit" name="extName" /> <widget class="QLineEdit" name="extName" >
<property name="enabled" >
<bool>false</bool>
</property>
</widget>
</item> </item>
</layout> </layout>
</widget> </item>
<item row="1" column="0" >
<widget class="QLabel" name="label_2" > <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" > <property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css"> <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
@ -742,15 +724,9 @@ p, li { white-space: pre-wrap; }
&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> &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> </property>
</widget> </widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_3" > <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" > <property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css"> <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
@ -758,124 +734,24 @@ p, li { white-space: pre-wrap; }
&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> &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> </property>
</widget> </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> </item>
</layout> </layout>
</widget> </widget>
</widget>
<widget class="QGroupBox" name="groupBox_2" > <widget class="QGroupBox" name="groupBox_2" >
<property name="geometry" > <property name="geometry" >
<rect> <rect>
<x>10</x> <x>9</x>
<y>0</y> <y>7</y>
<width>411</width> <width>407</width>
<height>111</height> <height>127</height>
</rect> </rect>
</property> </property>
<property name="title" > <property name="title" >
<string>Peer Info</string> <string>Peer Info</string>
</property> </property>
<widget class="QLineEdit" name="name" > <layout class="QGridLayout" >
<property name="geometry" > <item row="0" column="0" >
<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" > <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" > <property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css"> <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
@ -883,31 +759,16 @@ p, li { white-space: pre-wrap; }
&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> &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> </property>
</widget> </widget>
<widget class="QLabel" name="label_8" > </item>
<property name="geometry" > <item row="0" column="1" >
<rect> <widget class="QLineEdit" name="name" >
<x>11</x> <property name="readOnly" >
<y>84</y> <bool>true</bool>
<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> </property>
</widget> </widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_11" > <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" > <property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css"> <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
@ -915,6 +776,32 @@ p, li { white-space: pre-wrap; }
&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> &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> </property>
</widget> </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>
</widget> </widget>
<tabstops> <tabstops>
@ -923,12 +810,9 @@ p, li { white-space: pre-wrap; }
<tabstop>country</tabstop> <tabstop>country</tabstop>
<tabstop>localAddress</tabstop> <tabstop>localAddress</tabstop>
<tabstop>localPort</tabstop> <tabstop>localPort</tabstop>
<tabstop>chkFirewall</tabstop>
<tabstop>chkForwarded</tabstop>
<tabstop>extAddress</tabstop> <tabstop>extAddress</tabstop>
<tabstop>extPort</tabstop> <tabstop>extPort</tabstop>
<tabstop>extName</tabstop> <tabstop>extName</tabstop>
<tabstop>indivRate</tabstop>
<tabstop>trustLvl</tabstop> <tabstop>trustLvl</tabstop>
<tabstop>signBox</tabstop> <tabstop>signBox</tabstop>
<tabstop>trustBox</tabstop> <tabstop>trustBox</tabstop>

View File

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

View File

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