diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-09-19 12:57:59 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-09-19 12:57:59 -0500 |
commit | 8f3ff1fb3e490ec82f20e33672a5285a1d3a6200 (patch) | |
tree | f5fe86027579601d7eb98949b18e60a16976966e | |
parent | 851d4c9bea54059b375cc6b90b08887bc2ed3e25 (diff) | |
download | ulab-8f3ff1fb3e490ec82f20e33672a5285a1d3a6200.tar.gz ulab-8f3ff1fb3e490ec82f20e33672a5285a1d3a6200.zip |
Fix updating of admin console
-rw-r--r-- | clients/tde/src/part/adminconsole/part.cpp | 26 |
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()) { |