[prev in list] [next in list] [prev in thread] [next in thread] 

List:       atlantik-devel
Subject:    [atlantik-cvs] CVS: kdegames/atlantik/client atlantik.cpp,1.137,1.138 main.h,1.31,1.32 selectconfigu
From:       kde () office ! kde ! org
Date:       2003-02-08 15:11:01
[Download RAW message or body]

Update of /home/kde/kdegames/atlantik/client
In directory office:/tmp/cvs-serv25515/client

Modified Files:
	atlantik.cpp main.h selectconfiguration_widget.cpp 
	selectconfiguration_widget.h 
Log Message:
another fosdem fix: disable Start Game button when playerSelf is not the game master

Index: atlantik.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/client/atlantik.cpp,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -d -r1.137 -r1.138
--- atlantik.cpp	20 Jan 2003 02:22:19 -0000	1.137
+++ atlantik.cpp	8 Feb 2003 15:10:58 -0000	1.138
@@ -296,6 +296,7 @@
 		return;
 
 	m_selectConfiguration = new SelectConfiguration(m_mainWidget, "selectConfiguration");
+	m_selectConfiguration->setCanStart(m_playerSelf ? m_playerSelf->master() : false);
 	m_mainLayout->addMultiCellWidget(m_selectConfiguration, 0, 2, 1, 1);
 	m_selectConfiguration->show();
 
@@ -525,6 +526,9 @@
 
 	if (player == m_playerSelf)
 	{
+		if (m_selectConfiguration)
+			m_selectConfiguration->setCanStart(player->master());
+
 		m_roll->setEnabled(player->canRoll());
 		m_buyEstate->setEnabled(player->canBuy());
 		m_auctionEstate->setEnabled(player->canBuy());

Index: main.h
===================================================================
RCS file: /home/kde/kdegames/atlantik/client/main.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- main.h	20 Jan 2003 17:18:47 -0000	1.31
+++ main.h	8 Feb 2003 15:10:58 -0000	1.32
@@ -18,7 +18,7 @@
 #define ATLANTIK_MAIN_H
 
 #define	ATLANTIK_VERSION 060
-#define	ATLANTIK_VERSION_STRING "0.6.0 (CVS >= 20030120)"
+#define	ATLANTIK_VERSION_STRING "0.6.0 (CVS >= 20030208)"
 #define ATLANTIK_VERSION_MAJOR 0
 #define ATLANTIK_VERSION_MINOR 6
 #define ATLANTIK_VERSION_RELEASE 0

Index: selectconfiguration_widget.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/client/selectconfiguration_widget.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- selectconfiguration_widget.cpp	21 Jan 2003 02:44:31 -0000	1.32
+++ selectconfiguration_widget.cpp	8 Feb 2003 15:10:58 -0000	1.33
@@ -67,10 +67,10 @@
 
 	serverButtons->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum));
 
-	m_connectButton = new KPushButton(SmallIcon("forward"), i18n("Start Game"), this);
-	serverButtons->addWidget(m_connectButton);
+	m_startButton = new KPushButton(SmallIcon("forward"), i18n("Start Game"), this);
+	serverButtons->addWidget(m_startButton);
 
-	connect(m_connectButton, SIGNAL(clicked()), this, SLOT(connectClicked()));
+	connect(m_startButton, SIGNAL(clicked()), this, SLOT(connectClicked()));
 
     // Status indicator.
 	status_label = new QLabel(this);
@@ -140,14 +140,6 @@
 
 	emit statusChanged();
 }
-
-bool ConfigureGame::validateNext()
-{
-	if (list->childCount() >= 2)
-		return true;
-	else
-		return false;
-}
 */
 
 void SelectConfiguration::optionChanged()
@@ -159,4 +151,9 @@
 		command.append(QString::number(checkBox->isChecked()));
 		emit buttonCommand(command);
 	}
+}
+
+void SelectConfiguration::setCanStart(const bool &canStart)
+{
+	m_startButton->setEnabled(canStart);
 }

Index: selectconfiguration_widget.h
===================================================================
RCS file: /home/kde/kdegames/atlantik/client/selectconfiguration_widget.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- selectconfiguration_widget.h	21 Jan 2003 02:44:31 -0000	1.16
+++ selectconfiguration_widget.h	8 Feb 2003 15:10:58 -0000	1.17
@@ -39,7 +39,7 @@
 	SelectConfiguration(QWidget *parent, const char *name=0);
 
 	void initPage();
-	bool validateNext();
+	void setCanStart(const bool &canStart);
 	QString hostToConnect() const;
 	int portToConnect();
 
@@ -63,7 +63,7 @@
 	QVBoxLayout *m_mainLayout;
 	QLabel *status_label;
 	QVGroupBox *m_configBox, *m_messageBox;
-	KPushButton *m_backButton, *m_connectButton, *m_tokenButton;
+	KPushButton *m_backButton, *m_startButton, *m_tokenButton;
 	QMap <QObject *, QString> m_optionCommandMap;
 	QMap <QString, QCheckBox *> m_checkBoxMap;
 	QMap <Player *, QListViewItem *> m_items;

_______________________________________________
atlantik-cvs mailing list
atlantik-cvs@mail.kde.org
http://mail.kde.org/mailman/listinfo/atlantik-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic