From 82d67da0a12ff0136f33a5e0162d4358b0f9a549 Mon Sep 17 00:00:00 2001 From: doitux Date: Sun, 18 Nov 2007 13:07:38 +0000 Subject: [PATCH] --- src/gui/qt/mainwindow/mainwindowimpl.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/gui/qt/mainwindow/mainwindowimpl.cpp b/src/gui/qt/mainwindow/mainwindowimpl.cpp index 21d27104..59185f41 100755 --- a/src/gui/qt/mainwindow/mainwindowimpl.cpp +++ b/src/gui/qt/mainwindow/mainwindowimpl.cpp @@ -423,7 +423,7 @@ mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent) pushButton_break->setMinimumSize(width+10,20); //set inputvalidator for lineeditbetvalue - QRegExp rx("[\\d]{1,5}"); + QRegExp rx("[1-9]\\d{0,4}"); QValidator *validator = new QRegExpValidator(rx, this); lineEdit_betValue->setValidator(validator); @@ -3587,6 +3587,7 @@ void mainWindowImpl::localGameModification() { setLabelArray[i]->stopTimeOutAnimation(); } + pushButton_break->show(); QFontMetrics tempMetrics = this->fontMetrics(); int width = tempMetrics.width(tr("Stop")); pushButton_break->setText(tr("Stop")); @@ -3607,10 +3608,17 @@ void mainWindowImpl::networkGameModification() { tabWidget_Left->setCurrentIndex(1); myChat->clearNewGame(); - QFontMetrics tempMetrics = this->fontMetrics(); - int width = tempMetrics.width(tr("Lobby")); - pushButton_break->setText(tr("Lobby")); - pushButton_break->setMinimumSize(width+10,20); + if(mySession->getGameType() == Session::GAME_TYPE_INTERNET) { + pushButton_break->show(); + QFontMetrics tempMetrics = this->fontMetrics(); + int width = tempMetrics.width(tr("Lobby")); + pushButton_break->setText(tr("Lobby")); + pushButton_break->setMinimumSize(width+10,20); + } + if(mySession->getGameType() == Session::GAME_TYPE_NETWORK) { + + pushButton_break->hide(); + } //Set the playing mode to "manual" radioButton_manualAction->click();