mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 15:39:27 -05:00
removed the Log Tab
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3817 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f0cc412e73
commit
d8da5082a1
@ -86,8 +86,6 @@ NetworkDialog::NetworkDialog(QWidget *parent)
|
|||||||
connect( ui.connecttreeWidget, SIGNAL( itemSelectionChanged()), ui.unvalidGPGkeyWidget, SLOT( clearSelection() ) );
|
connect( ui.connecttreeWidget, SIGNAL( itemSelectionChanged()), ui.unvalidGPGkeyWidget, SLOT( clearSelection() ) );
|
||||||
connect( ui.unvalidGPGkeyWidget, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( connecttreeWidgetCostumPopupMenu( QPoint ) ) );
|
connect( ui.unvalidGPGkeyWidget, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( connecttreeWidgetCostumPopupMenu( QPoint ) ) );
|
||||||
connect( ui.unvalidGPGkeyWidget, SIGNAL( itemSelectionChanged()), ui.connecttreeWidget, SLOT( clearSelection() ) );
|
connect( ui.unvalidGPGkeyWidget, SIGNAL( itemSelectionChanged()), ui.connecttreeWidget, SLOT( clearSelection() ) );
|
||||||
|
|
||||||
connect( ui.infoLog, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayInfoLogMenu(const QPoint&)));
|
|
||||||
|
|
||||||
connect( ui.filterPatternLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(filterRegExpChanged()));
|
connect( ui.filterPatternLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(filterRegExpChanged()));
|
||||||
connect( ui.filterColumnComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(filterColumnChanged()));
|
connect( ui.filterColumnComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(filterColumnChanged()));
|
||||||
@ -164,11 +162,6 @@ NetworkDialog::NetworkDialog(QWidget *parent)
|
|||||||
if (retv && versions.end() != (vit = versions.find(rsPeers->getOwnId()))) {
|
if (retv && versions.end() != (vit = versions.find(rsPeers->getOwnId()))) {
|
||||||
version = QString::fromStdString(vit->second);
|
version = QString::fromStdString(vit->second);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set Log infos
|
|
||||||
setLogInfo(tr("RetroShare %1 started.").arg(version));
|
|
||||||
|
|
||||||
setLogInfo(tr("Welcome to RetroShare."), QString::fromUtf8("blue"));
|
|
||||||
|
|
||||||
QMenu *menu = new QMenu();
|
QMenu *menu = new QMenu();
|
||||||
//menu->addAction(ui.actionAddFriend);
|
//menu->addAction(ui.actionAddFriend);
|
||||||
@ -185,21 +178,12 @@ NetworkDialog::NetworkDialog(QWidget *parent)
|
|||||||
menu->addAction(ui.actionTabsRounded);
|
menu->addAction(ui.actionTabsRounded);
|
||||||
ui.viewButton->setMenu(menu);
|
ui.viewButton->setMenu(menu);
|
||||||
|
|
||||||
QTimer *timer = new QTimer(this);
|
|
||||||
connect(timer, SIGNAL(timeout()), this, SLOT(getNetworkStatus()));
|
|
||||||
timer->start(100000);
|
|
||||||
|
|
||||||
QTimer *timer2 = new QTimer(this);
|
QTimer *timer2 = new QTimer(this);
|
||||||
connect(timer2, SIGNAL(timeout()), this, SLOT(updateNetworkStatus()));
|
connect(timer2, SIGNAL(timeout()), this, SLOT(updateNetworkStatus()));
|
||||||
timer2->start(1000);
|
timer2->start(1000);
|
||||||
|
|
||||||
getNetworkStatus();
|
|
||||||
updateNetworkStatus();
|
updateNetworkStatus();
|
||||||
loadtabsettings();
|
loadtabsettings();
|
||||||
|
|
||||||
#ifdef RS_RELEASE_VERSION
|
|
||||||
ui.tabBottom->removeTab(0); //hide the logs tab
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ui.clearButton->hide();
|
ui.clearButton->hide();
|
||||||
|
|
||||||
@ -708,97 +692,12 @@ void NetworkDialog::on_actionExportKey_activated()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update Log Info information
|
|
||||||
void NetworkDialog::setLogInfo(QString info, QColor color) {
|
|
||||||
static unsigned int nbLines = 0;
|
|
||||||
++nbLines;
|
|
||||||
// Check log size, clear it if too big
|
|
||||||
if(nbLines > 200) {
|
|
||||||
ui.infoLog->clear();
|
|
||||||
nbLines = 1;
|
|
||||||
}
|
|
||||||
ui.infoLog->append(QString::fromUtf8("<font color='grey'>")+ QTime::currentTime().toString(QString::fromUtf8("hh:mm:ss")) + QString::fromUtf8("</font> - <font color='") + color.name() +QString::fromUtf8("'><i>") + info + QString::fromUtf8("</i></font>"));
|
|
||||||
}
|
|
||||||
|
|
||||||
void NetworkDialog::on_actionClearLog_triggered() {
|
|
||||||
ui.infoLog->clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
void NetworkDialog::on_actionCreate_New_Profile_activated()
|
void NetworkDialog::on_actionCreate_New_Profile_activated()
|
||||||
{
|
{
|
||||||
// GenCertDialog gencertdialog (this);
|
// GenCertDialog gencertdialog (this);
|
||||||
// gencertdialog.exec ();
|
// gencertdialog.exec ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void NetworkDialog::displayInfoLogMenu(const QPoint& pos) {
|
|
||||||
// Log Menu
|
|
||||||
QMenu myLogMenu(this);
|
|
||||||
myLogMenu.addAction(ui.actionClearLog);
|
|
||||||
// XXX: Why mapToGlobal() is not enough?
|
|
||||||
// myLogMenu.exec(mapToGlobal(pos)+QPoint(0,320));
|
|
||||||
// No. Simple use QCursor::pos() to retrieve the position of the cursor.
|
|
||||||
myLogMenu.exec(QCursor::pos());
|
|
||||||
}
|
|
||||||
|
|
||||||
void NetworkDialog::getNetworkStatus()
|
|
||||||
{
|
|
||||||
if(RsAutoUpdatePage::eventsLocked())
|
|
||||||
return ;
|
|
||||||
|
|
||||||
rsiface->lockData(); /* Lock Interface */
|
|
||||||
|
|
||||||
/* now the extra bit .... switch on check boxes */
|
|
||||||
const RsConfig &config = rsiface->getConfig();
|
|
||||||
|
|
||||||
/****** Log Tab **************************/
|
|
||||||
if(config.netUpnpOk)
|
|
||||||
{
|
|
||||||
setLogInfo(tr("UPNP is active."), QString::fromUtf8("blue"));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
setLogInfo(tr("UPNP not found or not enabled."), QString::fromUtf8("red"));
|
|
||||||
}
|
|
||||||
|
|
||||||
if(config.netDhtOk)
|
|
||||||
{
|
|
||||||
setLogInfo(tr("DHT is running."), QString::fromUtf8("green"));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
setLogInfo(tr("DHT is off."), QString::fromUtf8("red"));
|
|
||||||
}
|
|
||||||
|
|
||||||
if(config.netStunOk)
|
|
||||||
{
|
|
||||||
setLogInfo(tr("Stun external address detection is working."), QString::fromUtf8("green"));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
setLogInfo(tr("Stun is not working."), QString::fromUtf8("red"));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (config.netLocalOk)
|
|
||||||
{
|
|
||||||
setLogInfo(tr("Local network detected"), QString::fromUtf8("magenta"));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
setLogInfo(tr("No local network detected"), QString::fromUtf8("red"));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (config.netExtraAddressOk)
|
|
||||||
{
|
|
||||||
setLogInfo(tr("ip found via external address finder"), QString::fromUtf8("magenta"));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
setLogInfo(tr("external address finder didn't found anything"), QString::fromUtf8("red"));
|
|
||||||
}
|
|
||||||
|
|
||||||
rsiface->unlockData(); /* UnLock Interface */
|
|
||||||
}
|
|
||||||
|
|
||||||
void NetworkDialog::updateNetworkStatus()
|
void NetworkDialog::updateNetworkStatus()
|
||||||
{
|
{
|
||||||
if(RsAutoUpdatePage::eventsLocked())
|
if(RsAutoUpdatePage::eventsLocked())
|
||||||
|
@ -41,7 +41,6 @@ public slots:
|
|||||||
void insertConnect();
|
void insertConnect();
|
||||||
std::string loadneighbour();
|
std::string loadneighbour();
|
||||||
/* void loadneighbour(); */
|
/* void loadneighbour(); */
|
||||||
void setLogInfo(QString info, QColor color=QApplication::palette().color(QPalette::WindowText));
|
|
||||||
void updateNewDiscoveryInfo() ;
|
void updateNewDiscoveryInfo() ;
|
||||||
|
|
||||||
|
|
||||||
@ -66,12 +65,7 @@ private slots:
|
|||||||
void on_actionExportKey_activated();
|
void on_actionExportKey_activated();
|
||||||
|
|
||||||
void on_actionCreate_New_Profile_activated();
|
void on_actionCreate_New_Profile_activated();
|
||||||
|
|
||||||
|
|
||||||
void on_actionClearLog_triggered();
|
|
||||||
void displayInfoLogMenu(const QPoint& pos);
|
|
||||||
|
|
||||||
void getNetworkStatus();
|
|
||||||
void updateNetworkStatus();
|
void updateNetworkStatus();
|
||||||
|
|
||||||
void loadtabsettings();
|
void loadtabsettings();
|
||||||
|
@ -340,40 +340,8 @@ subcontrol-position: bottom right;
|
|||||||
<enum>QTabWidget::North</enum>
|
<enum>QTabWidget::North</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="log_tab">
|
|
||||||
<attribute name="title">
|
|
||||||
<string>Log</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QVBoxLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QTextBrowser" name="infoLog">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>142</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="contextMenuPolicy">
|
|
||||||
<enum>Qt::CustomContextMenu</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="networkstatus">
|
<widget class="QWidget" name="networkstatus">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Network Status</string>
|
<string>Network Status</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user