summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clients/tde/src/part/adminconsole/part.cpp26
1 files changed, 22 insertions, 4 deletions
diff --git a/clients/tde/src/part/adminconsole/part.cpp b/clients/tde/src/part/adminconsole/part.cpp
index 2b5a619..f38500b 100644
--- a/clients/tde/src/part/adminconsole/part.cpp
+++ b/clients/tde/src/part/adminconsole/part.cpp
@@ -408,16 +408,26 @@ void AdminConsolePart::mainEventLoop() {
TerminalServiceStatusType info = *it;
it2 = TQListViewItemIterator(m_base->ts_list);
bool found = false;
+ TQListViewItem* item = NULL;
while (it2.current()) {
- TQListViewItem* item = *it2;
+ item = *it2;
if (info.sessionID == item->text(0).toInt()) {
found = true;
+ break;
}
++it2;
}
if (!found) {
- new TQListViewItem(m_base->ts_list, TQString("%1").arg(info.sessionID), info.username, info.serverName, TQString("%1").arg(info.serverPID), TQString("%1").arg(info.wmPID), TQString(":%1").arg(info.display), info.loginStamp.toString(), info.activityStamp.toString());
+ item = new TQListViewItem(m_base->ts_list);
}
+ item->setText(0, TQString("%1").arg(info.sessionID));
+ item->setText(1, info.username);
+ item->setText(2, info.serverName);
+ item->setText(3, TQString("%1").arg(info.serverPID));
+ item->setText(4, TQString("%1").arg(info.wmPID));
+ item->setText(5, TQString(":%1").arg(info.display));
+ item->setText(6, info.loginStamp.toString());
+ item->setText(7, info.activityStamp.toString());
}
it2 = TQListViewItemIterator(m_base->ts_list);
while (it2.current()) {
@@ -480,16 +490,24 @@ void AdminConsolePart::mainEventLoop() {
}
it2 = TQListViewItemIterator(m_base->workspace_list);
bool found = false;
+ TQListViewItem* item = NULL;
while (it2.current()) {
- TQListViewItem* item = *it2;
+ item = *it2;
if (info.sessionID == item->text(0).toInt()) {
found = true;
+ break;
}
++it2;
}
if (!found) {
- new TQListViewItem(m_base->workspace_list, TQString("%1").arg(info.sessionID), info.username, info.realmname, TQString("%1").arg(info.stationName), info.loginStamp.toString(), (info.terminateStamp.toTime_t()==0)?i18n("Not Set"):info.terminateStamp.toString());
+ item = new TQListViewItem(m_base->workspace_list);
}
+ item->setText(0, TQString("%1").arg(info.sessionID));
+ item->setText(1, info.username);
+ item->setText(2, info.realmname);
+ item->setText(3, TQString("%1").arg(info.stationName));
+ item->setText(4, info.loginStamp.toString());
+ item->setText(5, (info.terminateStamp.toTime_t()==0)?i18n("Not Set"):info.terminateStamp.toString());
}
it2 = TQListViewItemIterator(m_base->workspace_list);
while (it2.current()) {