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

@ -37,17 +37,18 @@
/* Definitions ****************************************************************/
/* 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
correction is implemented) */
#define CON_TIME_OUT_CNT_MAX 50
correction is implemented) */
#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) */
#define MAX_NUM_CHANNELS 10 /* max number channels for server */
#define MAX_NUM_CHANNELS 10 /* max number channels for server */
/* no valid channel number */
#define INVALID_CHANNEL_ID (MAX_NUM_CHANNELS + 1)
#define INVALID_CHANNEL_ID (MAX_NUM_CHANNELS + 1)
/* no valid time stamp index */
#define INVALID_TIME_STAMP_IDX -1
#define INVALID_TIME_STAMP_IDX -1
/* Classes ********************************************************************/

View file

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

View file

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

View file

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