From atlantik-devel Wed Sep 11 03:46:39 2002 From: kde () office ! kde ! org Date: Wed, 11 Sep 2002 03:46:39 +0000 To: atlantik-devel Subject: [atlantik-cvs] CVS: kdegames/atlantik/client atlantik.cpp,1.120,1.121 selectgame_widget.cpp,1.22,1.2 X-MARC-Message: https://marc.info/?l=atlantik-devel&m=103171604220604 Update of /home/kde/kdegames/atlantik/client In directory office:/tmp/cvs-serv8386/client Modified Files: atlantik.cpp selectgame_widget.cpp selectgame_widget.h Log Message: i18n: select game GUI improvements Index: atlantik.cpp =================================================================== RCS file: /home/kde/kdegames/atlantik/client/atlantik.cpp,v retrieving revision 1.120 retrieving revision 1.121 diff -u -d -r1.120 -r1.121 --- atlantik.cpp 2002/09/11 03:26:56 1.120 +++ atlantik.cpp 2002/09/11 03:46:37 1.121 @@ -255,6 +255,7 @@ connect(m_atlantikNetwork, SIGNAL(gameListAdd(QString, QString, QString, QString, QString)), m_selectGame, SLOT(slotGameListAdd(QString, QString, QString, QString, QString))); connect(m_atlantikNetwork, SIGNAL(gameListEdit(QString, QString, QString, QString, QString)), m_selectGame, SLOT(slotGameListEdit(QString, QString, QString, QString, QString))); connect(m_atlantikNetwork, SIGNAL(gameListDel(QString)), m_selectGame, SLOT(slotGameListDel(QString))); + connect(m_atlantikNetwork, SIGNAL(gameListEndUpdate()), m_selectGame, SLOT(slotGameListEndUpdate())); connect(m_selectGame, SIGNAL(joinGame(int)), m_atlantikNetwork, SLOT(joinGame(int))); connect(m_selectGame, SIGNAL(newGame(const QString &)), m_atlantikNetwork, SLOT(newGame(const QString &))); Index: selectgame_widget.cpp =================================================================== RCS file: /home/kde/kdegames/atlantik/client/selectgame_widget.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- selectgame_widget.cpp 2002/08/13 18:09:42 1.22 +++ selectgame_widget.cpp 2002/09/11 03:46:37 1.23 @@ -1,4 +1,4 @@ -// Copyright (c) 2002 Rob Kaper + // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -76,6 +76,11 @@ // emit statusChanged(); } +void SelectGame::slotGameListEndUpdate() +{ + m_statusLabel->setText(i18n("Retrieved game list.")); +} + void SelectGame::slotGameListAdd(QString gameId, QString name, QString description, QString players, QString gameType) { if (gameId == "-1") @@ -99,6 +104,8 @@ { if (item->text(2) == gameId) { + if (!name.isEmpty()) + item->setText(0, i18n("Join %1 Game #%2").arg(name).arg(gameId)); if (!description.isEmpty()) item->setText(1, description); item->setText(3, players); @@ -133,7 +140,7 @@ { if (QListViewItem *item = m_gameList->selectedItem()) { - if (int gameId = item->text(2).toInt()) + if (item->text(2).toInt() > 0) m_connectButton->setText(i18n("Join Game")); else m_connectButton->setText(i18n("Create Game")); Index: selectgame_widget.h =================================================================== RCS file: /home/kde/kdegames/atlantik/client/selectgame_widget.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- selectgame_widget.h 2002/08/01 15:16:25 1.14 +++ selectgame_widget.h 2002/09/11 03:46:37 1.15 @@ -44,8 +44,9 @@ void slotGameListEdit(QString gameId, QString name, QString description, QString players, QString gameType); void slotGameListDel(QString gameId); - private slots: - void connectClicked(); +private slots: + void connectClicked(); + void slotGameListEndUpdate(); signals: void joinGame(int gameId); _______________________________________________ atlantik-cvs mailing list atlantik-cvs@mail.kde.org http://mail.kde.org/mailman/listinfo/atlantik-cvs