summaryrefslogtreecommitdiffstats
path: root/clients/tde
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-07-22 17:05:57 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-07-22 17:05:57 -0500
commita3e28da8e9b180a9a9552ee3e280e6520f53cc6b (patch)
treee6646fc8aeb4324492c8a1aeb05500e4dbef8944 /clients/tde
parent043cc2c3d96a6270ac4d664911ffaa54f06db925 (diff)
downloadulab-a3e28da8e9b180a9a9552ee3e280e6520f53cc6b.tar.gz
ulab-a3e28da8e9b180a9a9552ee3e280e6520f53cc6b.zip
Fix client
Diffstat (limited to 'clients/tde')
-rw-r--r--clients/tde/src/app/main.cpp18
-rw-r--r--clients/tde/src/app/remotemdi.cpp22
2 files changed, 28 insertions, 12 deletions
diff --git a/clients/tde/src/app/main.cpp b/clients/tde/src/app/main.cpp
index 09b81e0..b2d2988 100644
--- a/clients/tde/src/app/main.cpp
+++ b/clients/tde/src/app/main.cpp
@@ -4,6 +4,7 @@
#include "define.h"
#include <kaboutdata.h>
#include <kapplication.h>
+#include <kinputdialog.h>
#include <kcmdlineargs.h>
#include <klocale.h>
#include <kurl.h>
@@ -33,8 +34,8 @@ int main(int argc, char *argv[])
KApplication app;
// Read MDI settings (window positions, etc)
+ // FIXME
KConfig *c = app.config();
- // RAJA FIXME
// Create main window
RemoteMDI *mainWin = new RemoteMDI();
@@ -44,6 +45,21 @@ int main(int argc, char *argv[])
if (args->count() > 0) {
mainWin->setServerHost(args->arg(0));
}
+ else {
+ bool accepted;
+ TQString serverHost = KInputDialog::getText(i18n("Enter server FQDN"), i18n("Please enter the FQDN of the desired remote laboratory server below"), "", &accepted);
+ if (accepted) {
+ if (serverHost != "") {
+ mainWin->setServerHost(serverHost);
+ }
+ else {
+ return -1;
+ }
+ }
+ else {
+ return -1;
+ }
+ }
args->clear();
mainWin->show();
diff --git a/clients/tde/src/app/remotemdi.cpp b/clients/tde/src/app/remotemdi.cpp
index 88b3edc..669350f 100644
--- a/clients/tde/src/app/remotemdi.cpp
+++ b/clients/tde/src/app/remotemdi.cpp
@@ -47,14 +47,16 @@ RemoteMDI::RemoteMDI()
connect_action = new KAction(i18n("Connect to Server"), "connect_creating", KShortcut(), TQT_TQOBJECT(this), TQT_SLOT(connectToServer()), ac, "connect_server");
disconnect_action = new KAction(i18n("Disconnect from Server"), "connect_no", KShortcut(), TQT_TQOBJECT(this), TQT_SLOT(disconnectFromServer()), ac, "disconnect_server");
+ setMenuForSDIModeSysButtons(menuBar());
+
+ createGUI(0);
+
// Add Window menu
if ( !isFakingSDIApplication() ) {
- menuBar()->insertItem(i18n("&Window"), windowMenu());
+ menuBar()->insertItem(i18n("&Window"), windowMenu(), -1, 4);
}
-
- setMenuForSDIModeSysButtons(menuBar());
-
- createGUI( 0 );
+ // Hide task bar as no windows are currently active
+ hideViewTaskBar();
// When we change view, change the status bar text
connect(this, SIGNAL(viewActivated(KMdiChildView*)), this, SLOT(currentChanged(KMdiChildView*)));
@@ -69,6 +71,8 @@ RemoteMDI::RemoteMDI()
processActions();
processLockouts();
+
+ showMaximized();
}
RemoteMDI::~RemoteMDI()
@@ -160,6 +164,7 @@ void RemoteMDI::startModule() {
const_cast<KAction*>(sendingAction)->setEnabled(false);
}
openNewWindow(view);
+ showViewTaskBar();
if (m_serverHost != "") {
view->connectServer(m_serverHost);
}
@@ -311,8 +316,6 @@ void RemoteMDI::promptForStationType() {
ds >> slist;
m_rsvSvrSocket->clearFrameTail();
- printf("[RAJA DEBUG 200.2] Got list of stations, count is %d\n\r", slist.count()); fflush(stdout);
-
SelectServerDialog select(this, 0, slist);
const int ret = select.exec();
if (ret == KDialog::Accepted) {
@@ -329,7 +332,6 @@ void RemoteMDI::promptForStationType() {
}
ds >> result;
m_rsvSvrSocket->clearFrameTail();
-printf("[RAJA DEBUG 100.0] '%s'\n\r", result.ascii()); fflush(stdout);
if (result == "OK") {
// Success!
m_activeStation = select.m_selectedStation;
@@ -386,7 +388,6 @@ void RemoteMDI::processLockouts() {
connected = ((m_rsvSvrSocket->state() == TQSocket::Connected) && (connToServerConnecting == false) && (connToServerState > 0));
}
-printf("[RAJA DEBUG 600.0] connected: %d\n\r", connected); fflush(stdout);
connect_action->setEnabled(!connected);
disconnect_action->setEnabled(connected);
@@ -534,10 +535,9 @@ bool RemoteMDI::queryClose() {
deleteIterator(it);
// Save current MDI settings (window positions, etc.)
+ // FIXME
KConfig *c = kapp->config();
- // RAJA FIXME
-
c->sync();
// Allow this window to close