[prev in list] [next in list] [prev in thread] [next in thread]
List: atlantik-devel
Subject: [atlantik-cvs]
From: kde () office ! kde ! org
Date: 2003-07-25 1:16:02
[Download RAW message or body]
Update of /home/kde/kdegames/atlantik/client
In directory office:/tmp/cvs-serv5848/client
Modified Files:
monopigator.cpp monopigator.h selectserver_widget.cpp
Log Message:
initially sort based on latency
Index: monopigator.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/client/monopigator.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- monopigator.cpp 24 Jul 2003 21:07:01 -0000 1.16
+++ monopigator.cpp 25 Jul 2003 01:15:59 -0000 1.17
@@ -109,6 +109,9 @@
MonopigatorEntry::MonopigatorEntry(QListView *parent, QString host, QString latency, \
QString version, QString users, QString port) : QObject(), QListViewItem(parent, \
host, latency, version, users, port) {
+// setEnabled(false);
+ parent->sort();
+
m_latencyTimer = new KLatencyTimer(port.toInt(), this, "latencyTimer");
QPtrList<KAddressInfo> addresses = KExtendedSocket::lookup(host, port);
addresses.setAutoDelete(true);
@@ -121,6 +124,9 @@
void MonopigatorEntry::updateLatency(int msec)
{
setText(1, QString::number(msec));
+// setEnabled(true);
+
+ listView()->sort();
}
int MonopigatorEntry::compare(QListViewItem *i, int col, bool ascending) const
Index: monopigator.h
===================================================================
RCS file: /home/kde/kdegames/atlantik/client/monopigator.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- monopigator.h 24 Jul 2003 19:20:29 -0000 1.14
+++ monopigator.h 25 Jul 2003 01:15:59 -0000 1.15
@@ -67,6 +67,7 @@
private:
KLatencyTimer *m_latencyTimer;
+ QListView *m_parent;
};
#endif
Index: selectserver_widget.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/client/selectserver_widget.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- selectserver_widget.cpp 24 Jul 2003 19:20:29 -0000 1.32
+++ selectserver_widget.cpp 25 Jul 2003 01:15:59 -0000 1.33
@@ -63,6 +63,7 @@
m_serverList->addColumn(i18n("Version"));
m_serverList->addColumn(i18n("Users"));
m_serverList->setAllColumnsShowFocus(true);
+ m_serverList->setSorting(1);
// m_mainLayout->addWidget(m_serverList);
connect(m_serverList, SIGNAL(clicked(QListViewItem *)), this, \
SLOT(validateConnectButton())); @@ -138,7 +139,7 @@
if (m_hideDevelopmentServers && version.contains("CVS"))
return;
- MonopigatorEntry *item = new MonopigatorEntry(m_serverList, host, i18n("Unknown"), \
version, (users == -1) ? i18n("unknown") : QString::number(users), port); \
+ MonopigatorEntry *item = new MonopigatorEntry(m_serverList, host, \
QString::number(9999), version, (users == -1) ? i18n("unknown") : \
QString::number(users), port); item->setPixmap(0, BarIcon("atlantik", \
KIcon::SizeSmall)); validateConnectButton();
}
@@ -147,7 +148,7 @@
{
m_localServerAvailable = true;
- MonopigatorEntry *item = new MonopigatorEntry(m_serverList, m_localSocket->host(), \
i18n("Unknown"), i18n("unknown"), i18n("unknown"), m_localSocket->port()); \
+ MonopigatorEntry *item = new MonopigatorEntry(m_serverList, m_localSocket->host(), \
QString::number(9999), i18n("unknown"), i18n("unknown"), m_localSocket->port()); \
item->setPixmap(0, BarIcon("atlantik", KIcon::SizeSmall)); validateConnectButton();
}
_______________________________________________
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