fix for text output in no GUI case, longer time out for channels

This commit is contained in:
Volker Fischer 2006-02-18 13:36:55 +00:00
parent a79354dc99
commit cfc9255ef8
4 changed files with 43 additions and 18 deletions

View file

@ -38,7 +38,8 @@
/* Set the time-out for the input buffer until the state changes from /* Set the time-out for the input buffer until the state changes from
connected to not-connected (the actual time depends on the way the error connected to not-connected (the actual time depends on the way the error
correction is implemented) */ correction is implemented) */
#define CON_TIME_OUT_CNT_MAX 50 #define CON_TIME_OUT_SEC_MAX 5 // seconds
#define CON_TIME_OUT_CNT_MAX ( ( CON_TIME_OUT_SEC_MAX * 1000 ) / BLOCK_DURATION_MS )
/* maximum number of internet connections (channels) */ /* maximum number of internet connections (channels) */
#define MAX_NUM_CHANNELS 10 /* max number channels for server */ #define MAX_NUM_CHANNELS 10 /* max number channels for server */

View file

@ -95,9 +95,6 @@ int main ( int argc, char** argv )
// actual server object // actual server object
CServer Server; CServer Server;
/* start the server */
Server.Start ();
if ( bUseGUI ) if ( bUseGUI )
{ {
// GUI object for the server // GUI object for the server
@ -115,7 +112,7 @@ int main ( int argc, char** argv )
else else
{ {
// only start application without using the GUI // only start application without using the GUI
qDebug ( CAboutDlg::GetVersionAndNameStr () ); qDebug ( CAboutDlg::GetVersionAndNameStr ( false ) );
app.exec (); app.exec ();
} }
} }

View file

@ -257,17 +257,44 @@ CAboutDlg::CAboutDlg(QWidget* parent, const char* name, bool modal, WFlags f)
TextLabelVersion->setText(GetVersionAndNameStr()); TextLabelVersion->setText(GetVersionAndNameStr());
} }
QString CAboutDlg::GetVersionAndNameStr() QString CAboutDlg::GetVersionAndNameStr ( const bool bWithHtml )
{ {
QString strVersionText; QString strVersionText = "";
// name, short description and GPL hint // name, short description and GPL hint
strVersionText = "<center><b>" + tr("llcon, Version "); if ( bWithHtml )
strVersionText += VERSION; {
strVersionText += "</b><br> " + strVersionText += "<center><b>";
tr("llcon, Low-Latency (Internet) Connection") + "<br>"; }
strVersionText += tr("Under the GNU General Public License (GPL)") +
"</center>"; strVersionText += tr("llcon, Version ") + VERSION;
if ( bWithHtml )
{
strVersionText += "</b><br>";
}
else
{
strVersionText += "\n";
}
strVersionText += tr("llcon, Low-Latency (Internet) Connection");
if ( bWithHtml )
{
strVersionText += "<br>";
}
else
{
strVersionText += "\n";
}
strVersionText += tr("Under the GNU General Public License (GPL)");
if ( bWithHtml )
{
strVersionText += "</center>";
}
return strVersionText; return strVersionText;
} }

View file

@ -304,7 +304,7 @@ public:
CAboutDlg(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, CAboutDlg(QWidget* parent = 0, const char* name = 0, bool modal = FALSE,
WFlags f = 0); WFlags f = 0);
static QString GetVersionAndNameStr(); static QString GetVersionAndNameStr ( const bool bWithHtml = true );
}; };